From 7d75154a7c5582a2343bcacbd8d1103f702e6c10 Mon Sep 17 00:00:00 2001 From: PostHog Bot Date: Thu, 2 Jan 2025 22:28:58 +0000 Subject: [PATCH] Storybook build for a7e1413d1cbeafa23d978d9afb1b9f249f326b0c --- docs/23162.44995db2.iframe.bundle.js | 5 ----- docs/23162.d4d7bb05.iframe.bundle.js | 5 +++++ ....bundle.js.map => 23162.d4d7bb05.iframe.bundle.js.map} | 2 +- docs/iframe.html | 4 ++-- ...3d.iframe.bundle.js => main.76fe5407.iframe.bundle.js} | 8 ++++---- ...e.bundle.js.map => main.76fe5407.iframe.bundle.js.map} | 2 +- docs/project.json | 2 +- ...e.bundle.js => runtime~main.fe97118f.iframe.bundle.js} | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 docs/23162.44995db2.iframe.bundle.js create mode 100644 docs/23162.d4d7bb05.iframe.bundle.js rename docs/{23162.44995db2.iframe.bundle.js.map => 23162.d4d7bb05.iframe.bundle.js.map} (99%) rename docs/{main.27cd4f3d.iframe.bundle.js => main.76fe5407.iframe.bundle.js} (91%) rename docs/{main.27cd4f3d.iframe.bundle.js.map => main.76fe5407.iframe.bundle.js.map} (99%) rename docs/{runtime~main.f2870941.iframe.bundle.js => runtime~main.fe97118f.iframe.bundle.js} (99%) diff --git a/docs/23162.44995db2.iframe.bundle.js b/docs/23162.44995db2.iframe.bundle.js deleted file mode 100644 index 592689665..000000000 --- a/docs/23162.44995db2.iframe.bundle.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";(self.webpackChunkposthog=self.webpackChunkposthog||[]).push([[23162],{"./frontend/src/scenes/data-warehouse/editor/EditorScene.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{EditorScene:()=>EditorScene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),CopyToClipboard=__webpack_require__("./frontend/src/lib/components/CopyToClipboard.tsx"),DatabaseTableTree=__webpack_require__("./frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Sidebar=__webpack_require__("./frontend/src/layout/navigation-3000/components/Sidebar.tsx"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/navigationLogic.tsx"),ViewLinkModal=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),editorSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts"),resizerLogic=__webpack_require__("./frontend/src/lib/components/Resizer/resizerLogic.ts");let editorSizingLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","data-warehouse","editor","editorSizingLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)(props=>({values:[(0,resizerLogic.Z)(props.sourceNavigatorResizerProps),["desiredSize as sourceNavigatorDesiredSize"],(0,resizerLogic.Z)(props.queryPaneResizerProps),["desiredSize as queryPaneDesiredSize"]]})),(0,index_esm.selectors)({editorSceneRef:[()=>[(_,props)=>props.editorSceneRef],editorSceneRef=>editorSceneRef],sourceNavigatorWidth:[s=>[s.sourceNavigatorDesiredSize],desiredSize=>Math.max(desiredSize||350,100)],queryPaneHeight:[s=>[s.queryPaneDesiredSize],queryPaneDesiredSize=>Math.max(queryPaneDesiredSize||400,100)],queryTabsWidth:[s=>[s.queryPaneDesiredSize],desiredSize=>desiredSize||350],sourceNavigatorResizerProps:[()=>[(_,props)=>props.sourceNavigatorResizerProps],sourceNavigatorResizerProps=>sourceNavigatorResizerProps],queryPaneResizerProps:[()=>[(_,props)=>props.queryPaneResizerProps],queryPaneResizerProps=>queryPaneResizerProps]})]);var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),variableModalLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),variablesLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts"),types=__webpack_require__("./frontend/src/types.ts"),multitabEditorLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx");__webpack_require__("./node_modules/.pnpm/react-data-grid@7.0.0-beta.47_react-dom@18.2.0_react@18.2.0/node_modules/react-data-grid/lib/styles.css");var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),animations=__webpack_require__("./frontend/src/lib/animations/animations.ts"),Animation=__webpack_require__("./frontend/src/lib/components/Animation/Animation.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),bundle=__webpack_require__("./node_modules/.pnpm/react-data-grid@7.0.0-beta.47_react-dom@18.2.0_react@18.2.0/node_modules/react-data-grid/lib/bundle.js"),EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),BoldNumber=__webpack_require__("./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),ElapsedTime=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),LineGraph=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx"),SideBar=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/SideBar.tsx"),Table=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Table.tsx"),TableDisplay=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx"),AddVariableButton=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/AddVariableButton.tsx"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx");let OutputTab=function(OutputTab){return OutputTab.Results="results",OutputTab.Visualization="visualization",OutputTab.Info="info",OutputTab.Lineage="lineage",OutputTab}({}),outputPaneLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneLogic"]),(0,index_esm.actions)({setActiveTab:tab=>({tab})}),(0,index_esm.reducers)({activeTab:[OutputTab.Results,{setActiveTab:(_,_ref)=>{let{tab}=_ref;return tab}}]})]);var LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),databaseTableListLogic=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");let infoTabLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneTabs","infoTabLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.codeEditorKey),(0,index_esm.connect)(props=>({values:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["metadata"],databaseTableListLogic.A,["posthogTablesMap","dataWarehouseTablesMap"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueryMap"]]})),(0,index_esm.selectors)({sourceTableItems:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];return view?{name:table_name,type:"table",view_id:view.id,status:view.status,last_run_at:view.last_run_at||"never"}:{name:table_name,type:"source",status:void 0,last_run_at:void 0}})||[]]})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function InfoTab(_ref){let{codeEditorKey}=_ref,{sourceTableItems}=(0,index_esm.useValues)(infoTabLogic({codeEditorKey:codeEditorKey})),{editingView,isEditingMaterializedView}=(0,index_esm.useValues)(multitabEditorLogic.tg),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 m-4 gap-4",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Materialization"}),(0,jsx_runtime.jsx)(src.oe,{type:"warning",children:"BETA"})]}),(0,jsx_runtime.jsx)("div",{children:isEditingMaterializedView?(0,jsx_runtime.jsxs)("div",{children:[editingView?.last_run_at?`Last run at ${(0,utils.bo)(editingView.last_run_at)}`:(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)("span",{children:"Materialization scheduled"})}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>editingView&&runDataWarehouseSavedQuery(editingView.id),className:"mt-2",type:"secondary",children:"Run now"})]}):(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{children:"Materialized views are a way to pre-compute data in your data warehouse. This allows you to run queries faster and more efficiently."}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>editingView&&runDataWarehouseSavedQuery(editingView.id),type:"primary",disabledReason:editingView?void 0:"You must save the view first",children:"Materialize"})]})})]}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h3",{children:"Dependencies"}),(0,jsx_runtime.jsx)("p",{children:"Dependencies are tables that this query uses. See when a source or materialized table was last run."})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:[{key:"Name",title:"Name",render:(_,_ref2)=>{let{name}=_ref2;return name}},{key:"Type",title:"Type",render:(_,_ref3)=>{let{type}=_ref3;return type}},{key:"Status",title:"Status",render:(_,_ref4)=>{let{type,status}=_ref4;return"source"===type?(0,jsx_runtime.jsx)(src.u,{title:"This is a source table, so it doesn't have a status",children:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"N/A"})}):status}},{key:"Last run at",title:"Last run at",render:(_,_ref5)=>{let{type,last_run_at}=_ref5;return"source"===type?(0,jsx_runtime.jsx)(src.u,{title:"This is a source table, so it is never run",children:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"N/A"})}):(0,utils.bo)(last_run_at)}}],dataSource:sourceTableItems})]})}let Node=function(_ref){let{pref,className="",children}=_ref;return(0,jsx_runtime.jsx)("div",{ref:pref,className:`flex w-[200px] px-4 py-3 justify-center items-center space-between gap-1 bg-bg-3000 border border-black border-2 rounded-lg ${className}`,children:children})},assignDepths=nodes=>{let nodeMap={};nodes.forEach(node=>{nodeMap[node.nodeId]={...node,depth:-1}});let assignDepthRecursive=(nodeId,currentDepth)=>{let node=nodeMap[nodeId];node&&(node.depth=currentDepth,node.leaf.forEach(leafId=>{nodeMap[leafId]&&assignDepthRecursive(leafId,currentDepth+1)}))};return nodes.forEach(node=>{-1===nodeMap[node.nodeId].depth&&assignDepthRecursive(node.nodeId,0)}),Object.values(nodeMap)},calculateNodePositions=nodesWithDepth=>{nodesWithDepth.sort((a,b)=>a.depth-b.depth);let nodePositions=[],visited=[],dfs=function(nodeId){let row=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(visited.includes(nodeId))return row;visited.push(nodeId);let node=nodesWithDepth.find(n=>n.nodeId===nodeId);if(!node)return row;let nodePosition={...node,position:{x:50+400*node.depth,y:50+300*row}};nodePositions.push(nodePosition);let maxRow=row;return node.leaf.filter(leafId=>!leafId.includes("_joined")).forEach((leafId,index)=>{dfs(leafId,row+index),maxRow=Math.max(maxRow,row+index)}),maxRow},maxRow=0;return nodesWithDepth.forEach(node=>{0===node.depth&&(maxRow=dfs(node.nodeId,maxRow)+1)}),nodePositions},calculateBound=(node,ref)=>{if(!ref)return{...node,left:null,right:null};let{x,y}=node.position,{width,height}=ref.getBoundingClientRect();return{...node,left:{x,y:y+height/2},right:{x:x+width,y:y+height/2}}},calculateEdgesFromTo=(from,to)=>{if(!from.right||!to.left)return[];let edges=[];return edges.push({from:from.right,to:to.left}),edges},calculateEdges=(nodeRefs,nodes)=>{let nodes_map=nodes.reduce((acc,node)=>(acc[node.nodeId]=node,acc),{}),dfs=function(nodeId){let visited=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;if(visited.has(nodeId))return[];visited.add(nodeId);let node=nodes_map[nodeId];if(!node)return[];let nodeRef=nodeRefs.find(ref=>ref?.id===nodeId);if(!nodeRef)return[];let edges=[],fromWithBounds=calculateBound(node,nodeRef);for(let leafId of node.leaf){let toNode=nodes_map[leafId],toRef=nodeRefs.find(ref=>ref?.id===leafId);if(toNode&&toRef){let toWithBounds=calculateBound(toNode,toRef);edges.push(...calculateEdgesFromTo(fromWithBounds,toWithBounds))}edges.push(...dfs(leafId,visited))}return edges},edges=[],visited=new Set;for(let node of nodes)visited.has(node.nodeId)||edges.push(...dfs(node.nodeId,visited));return edges};function NodeCanvas(_ref){let{nodes,renderNode}=_ref,canvasRef=(0,react.useRef)(null),[isDragging,setIsDragging]=(0,react.useState)(!1),[offset,setOffset]=(0,react.useState)({x:0,y:0}),[dragStart,setDragStart]=(0,react.useState)({x:0,y:0}),nodeRefs=(0,react.useRef)(Array(nodes.length).fill(null)),[nodePositions,setNodePositions]=(0,react.useState)([]),[edges,setEdges]=(0,react.useState)([]);(0,react.useEffect)(()=>{let nodesWithDepth=assignDepths(nodes),positions=calculateNodePositions(nodesWithDepth);setNodePositions(positions)},[nodes,offset]),(0,react.useEffect)(()=>{let allNodes=[...nodePositions],calculatedEdges=calculateEdges([...nodeRefs.current],allNodes);setEdges(calculatedEdges)},[nodePositions]);let drawGrid=(ctx,canvasWidth,canvasHeight)=>{ctx.fillStyle="#000000",ctx.imageSmoothingEnabled=!0;for(let x=offset.x%10;x{let canvas=canvasRef.current;if(!canvas)return;let ctx=canvas.getContext("2d");if(!ctx)return;let{width,height}=canvas.getBoundingClientRect();canvas.width=width,canvas.height=height,drawGrid(ctx,width,height);let handleResize=()=>{if(canvas){let{width,height}=canvas.getBoundingClientRect();canvas.width=width,canvas.height=height;let ctx=canvas.getContext("2d");ctx&&drawGrid(ctx,width,height)}};return window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)},[offset,nodePositions]);let handleMouseUp=()=>{setIsDragging(!1)};return(0,jsx_runtime.jsxs)("div",{className:"w-full h-full relative",children:[(0,jsx_runtime.jsx)("canvas",{ref:canvasRef,onMouseDown:e=>{setIsDragging(!0),setDragStart({x:e.clientX-offset.x,y:e.clientY-offset.y})},onMouseMove:e=>{if(!isDragging)return;let newOffset={x:e.clientX-dragStart.x,y:e.clientY-dragStart.y};setOffset(newOffset)},onMouseUp:handleMouseUp,onMouseLeave:handleMouseUp,className:(0,clsx_m.clsx)("w-full h-full absolute inset-0",isDragging?"cursor-grabbing":"cursor-grab")}),(0,jsx_runtime.jsx)("svg",{className:"absolute inset-0 w-full h-full pointer-events-none",children:edges.map((edge,index)=>{let controlPoint1X=edge.from.x+offset.x+(edge.to.x-edge.from.x)/3,controlPoint1Y=edge.from.y+offset.y,controlPoint2X=edge.to.x+offset.x-(edge.to.x-edge.from.x)/3,controlPoint2Y=edge.to.y+offset.y;return(0,jsx_runtime.jsx)("path",{d:`M ${edge.from.x+offset.x} ${edge.from.y+offset.y} - C ${controlPoint1X} ${controlPoint1Y}, - ${controlPoint2X} ${controlPoint2Y}, - ${edge.to.x+offset.x} ${edge.to.y+offset.y}`,stroke:"var(--text-3000)",strokeWidth:"2",fill:"none"},index)})}),nodePositions.map((nodePosition,idx)=>(0,jsx_runtime.jsx)("div",{className:"absolute",style:{left:`${nodePosition.position.x+offset.x}px`,top:`${nodePosition.position.y+offset.y}px`},children:renderNode(nodePosition,el=>{nodeRefs.current[idx]=el,nodeRefs.current[idx]?.setAttribute("id",nodePosition.nodeId)})},nodePosition.nodeId))]})}var DataWarehouseManagedSourcesTable=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let lineageTabLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneTabs","lineageTabLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.codeEditorKey),(0,index_esm.actions)({loadNodes:!0,traverseAncestors:(viewId,level)=>({viewId,level}),setNodes:nodes=>({nodes})}),(0,index_esm.connect)(props=>({values:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["metadata"],databaseTableListLogic.A,["posthogTablesMap","viewsMapById","dataWarehouseTablesMapById"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueryMap"]],actions:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["runQuery"],dataWarehouseViewsLogic.$,["loadDataWarehouseSavedQueries"]]})),(0,index_esm.reducers)({nodeMap:[{},{setNodes:(_,_ref)=>{let{nodes}=_ref;return nodes}}]}),(0,index_esm.listeners)(_ref2=>{let{actions,values}=_ref2;return{loadNodes:async()=>{let nodes={},traverseAncestors=async(viewId,level)=>{if(!nodes[viewId]?.savedQueryId)return;let result=await api.ZP.dataWarehouseSavedQueries.ancestors(viewId,level);for(let ancestor of result.ancestors)nodes[ancestor]={nodeId:ancestor,name:values.viewsMapById[ancestor]?.name||values.dataWarehouseTablesMapById[ancestor]?.name||ancestor,savedQueryId:values.viewsMapById[ancestor]?.id,leaf:[...nodes[ancestor]?.leaf||[],viewId]},await traverseAncestors(ancestor,1)};for(let view of(values.sources.forEach(source=>{source&&(nodes[source]={nodeId:source,name:source,savedQueryId:void 0,leaf:[]})}),values.views))view&&(nodes[view.id]={nodeId:view.id,name:view.name,savedQueryId:view.id,leaf:[]},await traverseAncestors(view.id,1));actions.setNodes(nodes)}}}),(0,kea_subscriptions_lib.Vt)(_ref3=>{let{actions}=_ref3;return{metadata:()=>{actions.loadNodes()}}}),(0,index_esm.selectors)({views:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];if(view)return view}).filter(Boolean)||[]],sources:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];if(!view)return table_name}).filter(Boolean)||[]],allNodes:[s=>[s.nodeMap],nodeMap=>[...Object.values(nodeMap)]]}),(0,index_esm.events)(_ref4=>{let{cache,actions}=_ref4;return{afterMount:()=>{cache.pollingInterval||(cache.pollingInterval=setInterval(actions.loadDataWarehouseSavedQueries,5e3))},beforeUnmount:()=>{clearInterval(cache.pollingInterval)}}})]);function LineageTab(){let{allNodes}=(0,index_esm.useValues)(lineageTabLogic),{dataWarehouseSavedQueryMapById}=(0,index_esm.useValues)(dataWarehouseViewsLogic.$),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$);return(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark z-0",children:(0,jsx_runtime.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,jsx_runtime.jsx)(NodeCanvas,{nodes:allNodes,renderNode:(node,ref)=>(0,jsx_runtime.jsx)(Node,{pref:ref,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col max-w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"font-bold break-all",children:node.name}),node.savedQueryId&&(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",size:"xsmall",onClick:()=>node.savedQueryId&&runDataWarehouseSavedQuery(node.savedQueryId),children:"Run"})]}),node.savedQueryId&&dataWarehouseSavedQueryMapById[node.savedQueryId]?.status&&(0,jsx_runtime.jsx)("div",{className:"text-xs mt-2 max-w-full",children:(0,jsx_runtime.jsx)(src.oe,{type:dataWarehouseSavedQueryMapById[node.savedQueryId]?.status&&DataWarehouseManagedSourcesTable.IM[dataWarehouseSavedQueryMapById[node.savedQueryId].status]||"default",className:"break-words",children:dataWarehouseSavedQueryMapById[node.savedQueryId]?.status})}),node.savedQueryId&&dataWarehouseSavedQueryMapById[node.savedQueryId]?.last_run_at&&(0,jsx_runtime.jsx)("span",{className:"text-xs mt-2 max-w-full break-words",children:`Last calculated ${(0,utils.bo)(dataWarehouseSavedQueryMapById[node.savedQueryId]?.last_run_at)}`})]})})})})})}function OutputPane(){let{activeTab}=(0,index_esm.useValues)(outputPaneLogic),{setActiveTab}=(0,index_esm.useActions)(outputPaneLogic),{variablesForInsight}=(0,index_esm.useValues)(variablesLogic.Q),{editingView,sourceQuery,exportContext,isValidView,error,editorKey}=(0,index_esm.useValues)(multitabEditorLogic.tg),{saveAsInsight,saveAsView,setSourceQuery,runQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),{response,responseLoading,responseError,queryId,pollResponse}=(0,index_esm.useValues)(dataNodeLogic.M),{dataWarehouseSavedQueriesLoading}=(0,index_esm.useValues)(dataWarehouseViewsLogic.$),{updateDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$),{visualizationType,queryCancelled}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),vizKey=(0,react.useMemo)(()=>"SQLEditorScene",[]),columns=(0,react.useMemo)(()=>{var _response$columns$map;return null!==(_response$columns$map=response?.columns?.map(column=>({key:column,name:column,resizable:!0})))&&void 0!==_response$columns$map?_response$columns$map:[]},[response]),rows=(0,react.useMemo)(()=>response?.results?response?.results?.map(row=>{let rowObject={};return response.columns.forEach((column,i)=>{rowObject[column]=row[i]}),rowObject}):[],[response]);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full flex-1 bg-bg-3000",children:[variablesForInsight.length>0&&(0,jsx_runtime.jsx)("div",{className:"py-2 px-4",children:(0,jsx_runtime.jsx)(Variables.M,{})}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-between align-center py-2 px-4 w-full h-[55px]",children:[(0,jsx_runtime.jsx)(src.TP,{activeKey:activeTab,onChange:tab=>setActiveTab(tab),tabs:[{key:OutputTab.Results,label:"Results"},{key:OutputTab.Visualization,label:"Visualization"},...featureFlags[constants.y8.DATA_MODELING]?[{key:OutputTab.Info,label:"Info"},{key:OutputTab.Lineage,label:"Lineage"}]:[]]}),(0,jsx_runtime.jsxs)("div",{className:"flex gap-4",children:[(0,jsx_runtime.jsx)(AddVariableButton.u,{}),exportContext&&(0,jsx_runtime.jsx)(ExportButton.j,{disabledReason:visualizationType!=types.Qb.ActionsTable&&"Only table results are exportable",type:"secondary",items:[{export_format:types.P5.CSV,export_context:exportContext},{export_format:types.P5.XLSX,export_context:exportContext}]}),editingView?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.Jp,{loading:dataWarehouseSavedQueriesLoading,type:"secondary",onClick:()=>{var _response$types;return updateDataWarehouseSavedQuery({id:editingView.id,query:sourceQuery.source,types:null!==(_response$types=response?.types)&&void 0!==_response$types?_response$types:[]})},children:"Update view"})}):(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>saveAsView(),disabledReason:isValidView?"":"Some fields may need an alias",children:"Save as view"}),(0,jsx_runtime.jsxs)(src.Jp,{disabledReason:error||"",loading:responseLoading,type:"primary",onClick:()=>runQuery(),children:[(0,jsx_runtime.jsx)("span",{className:"mr-1",children:"Run"}),(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0})]})]})]}),(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark",children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:lineageTabLogic,props:{codeEditorKey:editorKey},children:(0,jsx_runtime.jsx)(Content,{activeTab:activeTab,responseError:responseError,responseLoading:responseLoading,response:response,sourceQuery:sourceQuery,queryCancelled:queryCancelled,columns:columns,rows:rows,isDarkModeOn:isDarkModeOn,vizKey:vizKey,setSourceQuery:setSourceQuery,exportContext:exportContext,saveAsInsight:saveAsInsight,queryId:queryId,pollResponse:pollResponse,editorKey:editorKey})})}),(0,jsx_runtime.jsx)("div",{className:"flex justify-end pr-2 border-t",children:(0,jsx_runtime.jsx)(ElapsedTime.W,{})})]})}function InternalDataTableVisualization(props){let{query,visualizationType,showEditingUI,showResultControls,response,responseLoading,isChartSettingsPanelOpen}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{toggleChartSettingsPanel}=(0,index_esm.useActions)(dataVisualizationLogic.H8),component=null;return showEditingUI||response&&!responseLoading?visualizationType===types.Qb.ActionsTable?component=(0,jsx_runtime.jsx)(Table.i,{uniqueKey:props.uniqueKey,query:query,context:props.context,cachedResults:props.cachedResults}):visualizationType===types.Qb.ActionsLineGraph||visualizationType===types.Qb.ActionsBar||visualizationType===types.Qb.ActionsAreaGraph||visualizationType===types.Qb.ActionsStackedBar?component=(0,jsx_runtime.jsx)(LineGraph.x,{}):visualizationType===types.Qb.BoldNumber&&(component=(0,jsx_runtime.jsx)(BoldNumber.w,{})):component=(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 justify-center items-center border rounded bg-bg-light",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})}),(0,jsx_runtime.jsx)("div",{className:"h-full hide-scrollbar flex flex-1 gap-2",children:(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-row gap-4 overflow-scroll hide-scrollbar",children:[isChartSettingsPanelOpen&&(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(SideBar.K,{})}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full flex-1 overflow-auto"),children:component})]}),showResultControls&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap px-px py-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center"}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[(0,jsx_runtime.jsx)(TableDisplay.V,{}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),type:isChartSettingsPanelOpen?"primary":"secondary",onClick:()=>toggleChartSettingsPanel(),tooltip:"Visualization settings"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>props.onSaveInsight(),children:"Create insight"})]})})]})})]})})}let ErrorState=_ref=>{let{responseError,sourceQuery,queryCancelled,response}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("flex-1 absolute top-0 left-0 right-0 bottom-0 overflow-scroll"),children:(0,jsx_runtime.jsx)(EmptyStates.jC,{query:sourceQuery,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError})})},Content=_ref2=>{let{activeTab,responseError,responseLoading,response,sourceQuery,queryCancelled,columns,rows,isDarkModeOn,vizKey,setSourceQuery,exportContext,saveAsInsight,queryId,pollResponse,editorKey}=_ref2;return activeTab===OutputTab.Results?responseError?(0,jsx_runtime.jsx)(ErrorState,{responseError:responseError,sourceQuery:sourceQuery,queryCancelled:queryCancelled,response:response}):responseLoading?(0,jsx_runtime.jsx)(EmptyStates.sX,{queryId:queryId,pollResponse:pollResponse}):response?(0,jsx_runtime.jsx)("div",{className:"flex-1 absolute top-0 left-0 right-0 bottom-0",children:(0,jsx_runtime.jsx)(bundle.ZP,{className:isDarkModeOn?"rdg-dark h-full":"rdg-light h-full",columns:columns,rows:rows})}):(0,jsx_runtime.jsx)("div",{className:"flex flex-1 justify-center items-center",children:(0,jsx_runtime.jsx)("span",{className:"text-muted mt-3",children:"Query results will appear here"})}):activeTab===OutputTab.Visualization?responseError?(0,jsx_runtime.jsx)(ErrorState,{responseError:responseError,sourceQuery:sourceQuery,queryCancelled:queryCancelled,response:response}):response?(0,jsx_runtime.jsx)("div",{className:"flex-1 absolute top-0 left-0 right-0 bottom-0 px-4 py-1 hide-scrollbar",children:(0,jsx_runtime.jsx)(InternalDataTableVisualization,{uniqueKey:vizKey,query:sourceQuery,setQuery:setSourceQuery,context:{},cachedResults:void 0,exportContext:exportContext,onSaveInsight:saveAsInsight})}):(0,jsx_runtime.jsx)("div",{className:"flex flex-1 justify-center items-center",children:(0,jsx_runtime.jsx)("span",{className:"text-muted mt-3",children:"Query results will be visualized here"})}):activeTab===OutputTab.Info?(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark",children:(0,jsx_runtime.jsx)(InfoTab,{codeEditorKey:editorKey})}):activeTab===OutputTab.Lineage?(0,jsx_runtime.jsx)(LineageTab,{}):null};var Resizer=__webpack_require__("./frontend/src/lib/components/Resizer/Resizer.tsx"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js");function QueryPane(props){let{queryPaneHeight,queryPaneResizerProps}=(0,index_esm.useValues)(editorSizingLogic);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:"relative flex flex-col w-full bg-bg-3000",style:{height:`${queryPaneHeight}px`},ref:queryPaneResizerProps.containerRef,children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref=>{let{height,width}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"hogQL",value:props.queryInput,sourceQuery:props.sourceQuery,height:height,width:width,...props.codeEditorProps,options:{minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,suggest:{showInlineDetails:!0},quickSuggestionsDelay:300}})}})}),(0,jsx_runtime.jsx)(Resizer.w,{...queryPaneResizerProps})]})})}function QueryTabs(_ref){let{models,onClear,onClick,onAdd,activeModelUri}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"flex flex-row w-full overflow-scroll hide-scrollbar h-10",children:[models.map(model=>(0,jsx_runtime.jsx)(QueryTabComponent,{model:model,onClear:models.length>1?onClear:void 0,onClick:onClick,active:activeModelUri?.uri.path===model.uri.path},model.uri.path)),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>onAdd(),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{fontSize:14})})]})}function QueryTabComponent(_ref2){var _model$view$name;let{model,active,onClear,onClick}=_ref2;return(0,jsx_runtime.jsxs)("button",{onClick:()=>onClick?.(model),className:(0,clsx_m.default)("space-y-px rounded-t p-1 flex flex-row items-center gap-1 hover:bg-[var(--bg-light)] cursor-pointer",active?"bg-[var(--bg-light)] border":"bg-bg-3000",onClear?"pl-3 pr-2":"px-3"),children:[null!==(_model$view$name=model.view?.name)&&void 0!==_model$view$name?_model$view$name:"New query",onClear&&(0,jsx_runtime.jsx)(src.Jp,{onClick:e=>{e.stopPropagation(),onClear(model)},size:"xsmall",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})})]})}function QueryWindow(){let[monacoAndEditor,setMonacoAndEditor]=(0,react.useState)(null),[monaco,editor]=null!=monacoAndEditor?monacoAndEditor:[],codeEditorKey=`hogQLQueryEditor/${lib.router.values.location.pathname}`,logic=(0,multitabEditorLogic.tg)({key:codeEditorKey,monaco,editor}),{allTabs,activeModelUri,queryInput,editingView,sourceQuery}=(0,index_esm.useValues)(logic),{selectTab,deleteTab,createTab,setQueryInput,runQuery,setError,setIsValidView,setMetadata}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-col h-full overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"overflow-x-auto",children:(0,jsx_runtime.jsx)(QueryTabs,{models:allTabs,onClick:selectTab,onClear:deleteTab,onAdd:createTab,activeModelUri:activeModelUri})}),editingView&&(0,jsx_runtime.jsx)("div",{className:"h-7 bg-warning-highlight p-1",children:(0,jsx_runtime.jsxs)("span",{children:["Editing ",editingView.status?"materialized view":"view",' "',editingView.name,'"']})}),(0,jsx_runtime.jsx)(QueryPane,{queryInput:queryInput,sourceQuery:sourceQuery.source,promptError:null,codeEditorProps:{queryKey:codeEditorKey,onChange:v=>{setQueryInput(null!=v?v:"")},onMount:(editor,monaco)=>{setMonacoAndEditor([monaco,editor])},onPressCmdEnter:(value,selectionType)=>{value&&"selection"===selectionType?runQuery(value):runQuery()},onError:(error,isValidView)=>{setError(error),setIsValidView(isValidView)},onMetadata:metadata=>{setMetadata(metadata)}}}),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:multitabEditorLogic.tg,props:{key:codeEditorKey,monaco,editor},children:(0,jsx_runtime.jsx)(InternalQueryWindow,{})})]})}function InternalQueryWindow(){let{cacheLoading,sourceQuery,queryInput}=(0,index_esm.useValues)(multitabEditorLogic.tg),{setSourceQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg);if(cacheLoading)return null;let dataVisualizationLogicProps={key:multitabEditorLogic.cc,query:sourceQuery,dashboardId:void 0,dataNodeCollectionId:multitabEditorLogic.cc,insightMode:types.LO.Edit,loadPriority:void 0,cachedResults:void 0,variablesOverride:void 0,setQuery:setSourceQuery},dataNodeLogicProps={query:sourceQuery.source,key:multitabEditorLogic.cc,cachedResults:void 0,loadPriority:void 0,dataNodeCollectionId:multitabEditorLogic.cc,variablesOverride:void 0,autoLoad:!1},variablesLogicProps={key:dataVisualizationLogicProps.key,readOnly:!1,queryInput};return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataVisualizationLogic.H8,props:dataVisualizationLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:displayLogic.Y,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variablesLogic.Q,props:variablesLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variableModalLogic.b,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(OutputPane,{})})})})})})}function EditorScene(){let ref=(0,react.useRef)(null),navigatorRef=(0,react.useRef)(null),queryPaneRef=(0,react.useRef)(null),{activeNavbarItem}=(0,index_esm.useValues)(navigationLogic.f),{sidebarOverlayOpen}=(0,index_esm.useValues)(editorSceneLogic.h);return(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:editorSizingLogic,props:{editorSceneRef:ref,navigatorRef,sourceNavigatorResizerProps:{containerRef:navigatorRef,logicKey:"source-navigator",placement:"right"},queryPaneResizerProps:{containerRef:queryPaneRef,logicKey:"query-pane",placement:"bottom"}},children:[(0,jsx_runtime.jsxs)("div",{className:"w-full h-full flex flex-row overflow-hidden",ref:ref,children:[activeNavbarItem&&(0,jsx_runtime.jsx)(Sidebar.Y,{navbarItem:activeNavbarItem,sidebarOverlay:(0,jsx_runtime.jsx)(EditorSidebarOverlay,{}),sidebarOverlayProps:{isOpen:sidebarOverlayOpen}},activeNavbarItem.identifier),(0,jsx_runtime.jsx)(QueryWindow,{})]}),(0,jsx_runtime.jsx)(ViewLinkModal.WI,{})]})}let EditorSidebarOverlay=()=>{let{setSidebarOverlayOpen}=(0,index_esm.useActions)(editorSceneLogic.h),{sidebarOverlayTreeItems,selectedSchema}=(0,index_esm.useValues)(editorSceneLogic.h);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[(0,jsx_runtime.jsxs)("header",{className:"flex flex-row h-10 border-b shrink-0 p-1 gap-2",children:[(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconArrowLeft,{}),onClick:()=>setSidebarOverlayOpen(!1)}),selectedSchema?.name&&(0,jsx_runtime.jsx)(CopyToClipboard.D,{className:"font-mono",tooltipMessage:null,description:"schema",iconStyle:{color:"var(--muted-alt)"},explicitValue:selectedSchema?.name,children:selectedSchema?.name})]}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{items:sidebarOverlayTreeItems})]})}},"./frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{lL:()=>DataWarehouseManagedSourcesTable,MX:()=>RenderDataWarehouseSourceIcon,IM:()=>StatusTagSetting});var src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),lemon_ui_src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),aws_s3=__webpack_require__("./frontend/public/services/aws-s3.png");let azure=__webpack_require__.p+"images/azure.af1ab71d57e8348437183a694553a45f.png";var bigquery=__webpack_require__("./frontend/public/services/bigquery.png");let chargebee=__webpack_require__.p+"images/chargebee.394d057d1051597137e505b5fe7e86d5.png",cloudflare=__webpack_require__.p+"images/cloudflare.ac2b10d48ae784e080e8f5be0b4d19cb.png";var google_cloud_storage=__webpack_require__("./frontend/public/services/google-cloud-storage.png"),hubspot=__webpack_require__("./frontend/public/services/hubspot.png");let mysql=__webpack_require__.p+"images/mysql.7912374cef9be6a09530b67289e766b5.png";var postgres=__webpack_require__("./frontend/public/services/postgres.png"),salesforce=__webpack_require__("./frontend/public/services/salesforce.png"),snowflake=__webpack_require__("./frontend/public/services/snowflake.png");let sql_azure=__webpack_require__.p+"images/sql-azure.be99f21a93dbdf9b0e2092e1bd3f9f70.png",stripe=__webpack_require__.p+"images/stripe.675a1480d2e5d55e32e3e9e0dc54b92e.png",vitally=__webpack_require__.p+"images/vitally.2399d8a0e27a2b9b051d4500481e3009.png",zendesk=__webpack_require__.p+"images/zendesk.4febb7199e1b2b53c901089ce7fcccd1.png";var urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),sourceWizardLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx"),dataWarehouseSettingsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let StatusTagSetting={Running:"primary",Completed:"success",Error:"danger",Failed:"danger","Billing limits":"danger"};function DataWarehouseManagedSourcesTable(){var _dataWarehouseSources;let{dataWarehouseSources,dataWarehouseSourcesLoading,sourceReloadingById}=(0,index_esm.useValues)(dataWarehouseSettingsLogic.T),{deleteSource,reloadSource}=(0,index_esm.useActions)(dataWarehouseSettingsLogic.T);return(0,jsx_runtime.jsx)(lemon_ui_src.g3,{dataSource:null!==(_dataWarehouseSources=dataWarehouseSources?.results)&&void 0!==_dataWarehouseSources?_dataWarehouseSources:[],loading:dataWarehouseSourcesLoading,disableTableWhileLoading:!1,pagination:{pageSize:10},columns:[{width:0,render:function RenderAppInfo(_,source){return(0,jsx_runtime.jsx)(RenderDataWarehouseSourceIcon,{type:source.source_type})}},{title:"Source",key:"name",render:function RenderName(_,source){var _SOURCE_DETAILS$sourc;return(0,jsx_runtime.jsx)(LemonTableLink.i,{to:urls.j.pipelineNode(types.We.Source,`managed-${source.id}`,types.il.Schemas),title:null!==(_SOURCE_DETAILS$sourc=sourceWizardLogic.l2[source.source_type]?.label)&&void 0!==_SOURCE_DETAILS$sourc?_SOURCE_DETAILS$sourc:source.source_type,description:source.prefix})}},{title:"Last Successful Run",key:"last_run_at",tooltip:"Time of the last run that completed a data import",render:(_,run)=>run.last_run_at?(0,jsx_runtime.jsx)(src.w4,{time:run.last_run_at,formatDate:"MMM\xa0DD,\xa0YYYY",formatTime:"HH:mm"}):"Never"},{title:"Total Rows Synced",key:"rows_synced",tooltip:"Total number of rows synced across all schemas in this source",render:function RenderRowsSynced(_,source){return source.schemas.reduce((acc,schema)=>{var _schema$table$row_cou;return acc+(null!==(_schema$table$row_cou=schema.table?.row_count)&&void 0!==_schema$table$row_cou?_schema$table$row_cou:0)},0).toLocaleString()}},{title:"Status",key:"status",render:function RenderStatus(_,source){return(0,jsx_runtime.jsx)(lemon_ui_src.oe,{type:StatusTagSetting[source.status]||"default",children:source.status})}},{key:"actions",width:0,render:function RenderActions(_,source){return(0,jsx_runtime.jsx)("div",{className:"flex flex-row justify-end",children:sourceReloadingById[source.id]?(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(lemon_ui_src.$j,{})}):(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(lemon_ui_src.u,{title:"Start the data import for this schema again",children:(0,jsx_runtime.jsx)(lemon_ui_src.Jp,{type:"tertiary","data-attr":`reload-data-warehouse-${source.source_type}`,onClick:()=>{reloadSource(source)},children:"Reload"},`reload-data-warehouse-${source.source_type}`)}),(0,jsx_runtime.jsx)(lemon_ui_src.Jp,{status:"danger","data-attr":`delete-data-warehouse-${source.source_type}`,onClick:()=>{lemon_ui_src.dn.open({title:"Delete data source?",description:"Are you sure you want to delete this data source? All related tables will be deleted.",primaryButton:{children:"Delete",status:"danger",onClick:()=>deleteSource(source)},secondaryButton:{children:"Cancel"}})},children:"Delete"},`delete-data-warehouse-${source.source_type}`)]})})})})}}]})}function RenderDataWarehouseSourceIcon(_ref){let{type,size="small"}=_ref,sizePx="small"===size?30:60,icon={Stripe:stripe,Hubspot:hubspot.Z,Zendesk:zendesk,Postgres:postgres.Z,MySQL:mysql,Snowflake:snowflake.Z,aws:aws_s3.Z,"google-cloud":google_cloud_storage.Z,"cloudflare-r2":cloudflare,azure:azure,Salesforce:salesforce.Z,MSSQL:sql_azure,Vitally:vitally,BigQuery:bigquery.Z,Chargebee:chargebee}[type];return(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-4",children:(0,jsx_runtime.jsx)(lemon_ui_src.u,{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[type,(0,jsx_runtime.jsx)("br",{}),"Click to view docs"]}),children:(0,jsx_runtime.jsx)(lemon_ui_src.rU,{to:types.zD.includes(type)?"https://posthog.com/docs/data-warehouse/setup#step-1-creating-a-bucket-in-s3":`https://posthog.com/docs/data-warehouse/setup#${type.toLowerCase()}`,children:(0,jsx_runtime.jsx)("img",{src:icon,alt:type,height:sizePx,width:sizePx,className:"rounded object-contain max-w-none"})})})})}}}]); -//# sourceMappingURL=23162.44995db2.iframe.bundle.js.map \ No newline at end of file diff --git a/docs/23162.d4d7bb05.iframe.bundle.js b/docs/23162.d4d7bb05.iframe.bundle.js new file mode 100644 index 000000000..7e37f7b54 --- /dev/null +++ b/docs/23162.d4d7bb05.iframe.bundle.js @@ -0,0 +1,5 @@ +"use strict";(self.webpackChunkposthog=self.webpackChunkposthog||[]).push([[23162],{"./frontend/src/scenes/data-warehouse/editor/EditorScene.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{EditorScene:()=>EditorScene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),CopyToClipboard=__webpack_require__("./frontend/src/lib/components/CopyToClipboard.tsx"),DatabaseTableTree=__webpack_require__("./frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Sidebar=__webpack_require__("./frontend/src/layout/navigation-3000/components/Sidebar.tsx"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/navigationLogic.tsx"),ViewLinkModal=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),editorSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts"),resizerLogic=__webpack_require__("./frontend/src/lib/components/Resizer/resizerLogic.ts");let editorSizingLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","data-warehouse","editor","editorSizingLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)(props=>({values:[(0,resizerLogic.Z)(props.sourceNavigatorResizerProps),["desiredSize as sourceNavigatorDesiredSize"],(0,resizerLogic.Z)(props.queryPaneResizerProps),["desiredSize as queryPaneDesiredSize"]]})),(0,index_esm.selectors)({editorSceneRef:[()=>[(_,props)=>props.editorSceneRef],editorSceneRef=>editorSceneRef],sourceNavigatorWidth:[s=>[s.sourceNavigatorDesiredSize],desiredSize=>Math.max(desiredSize||350,100)],queryPaneHeight:[s=>[s.queryPaneDesiredSize],queryPaneDesiredSize=>Math.max(queryPaneDesiredSize||400,100)],queryTabsWidth:[s=>[s.queryPaneDesiredSize],desiredSize=>desiredSize||350],sourceNavigatorResizerProps:[()=>[(_,props)=>props.sourceNavigatorResizerProps],sourceNavigatorResizerProps=>sourceNavigatorResizerProps],queryPaneResizerProps:[()=>[(_,props)=>props.queryPaneResizerProps],queryPaneResizerProps=>queryPaneResizerProps]})]);var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),variableModalLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),variablesLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts"),types=__webpack_require__("./frontend/src/types.ts"),multitabEditorLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx");__webpack_require__("./node_modules/.pnpm/react-data-grid@7.0.0-beta.47_react-dom@18.2.0_react@18.2.0/node_modules/react-data-grid/lib/styles.css");var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),animations=__webpack_require__("./frontend/src/lib/animations/animations.ts"),Animation=__webpack_require__("./frontend/src/lib/components/Animation/Animation.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),bundle=__webpack_require__("./node_modules/.pnpm/react-data-grid@7.0.0-beta.47_react-dom@18.2.0_react@18.2.0/node_modules/react-data-grid/lib/bundle.js"),EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),BoldNumber=__webpack_require__("./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),ElapsedTime=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),LineGraph=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx"),SideBar=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/SideBar.tsx"),Table=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Table.tsx"),TableDisplay=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx"),AddVariableButton=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/AddVariableButton.tsx"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx");let OutputTab=function(OutputTab){return OutputTab.Results="results",OutputTab.Visualization="visualization",OutputTab.Info="info",OutputTab.Lineage="lineage",OutputTab}({}),outputPaneLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneLogic"]),(0,index_esm.actions)({setActiveTab:tab=>({tab})}),(0,index_esm.reducers)({activeTab:[OutputTab.Results,{setActiveTab:(_,_ref)=>{let{tab}=_ref;return tab}}]})]);var LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),databaseTableListLogic=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");let infoTabLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneTabs","infoTabLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.codeEditorKey),(0,index_esm.connect)(props=>({values:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["metadata"],databaseTableListLogic.A,["posthogTablesMap","dataWarehouseTablesMap"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueryMap"]]})),(0,index_esm.selectors)({sourceTableItems:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];return view?{name:table_name,type:"table",view_id:view.id,status:view.status,last_run_at:view.last_run_at||"never"}:{name:table_name,type:"source",status:void 0,last_run_at:void 0}})||[]]})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function InfoTab(_ref){let{codeEditorKey}=_ref,{sourceTableItems}=(0,index_esm.useValues)(infoTabLogic({codeEditorKey:codeEditorKey})),{editingView,isEditingMaterializedView}=(0,index_esm.useValues)(multitabEditorLogic.tg),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 m-4 gap-4",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Materialization"}),(0,jsx_runtime.jsx)(src.oe,{type:"warning",children:"BETA"})]}),(0,jsx_runtime.jsx)("div",{children:isEditingMaterializedView?(0,jsx_runtime.jsxs)("div",{children:[editingView?.last_run_at?`Last run at ${(0,utils.bo)(editingView.last_run_at)}`:(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)("span",{children:"Materialization scheduled"})}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>editingView&&runDataWarehouseSavedQuery(editingView.id),className:"mt-2",type:"secondary",children:"Run now"})]}):(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{children:"Materialized views are a way to pre-compute data in your data warehouse. This allows you to run queries faster and more efficiently."}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>editingView&&runDataWarehouseSavedQuery(editingView.id),type:"primary",disabledReason:editingView?void 0:"You must save the view first",children:"Materialize"})]})})]}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h3",{children:"Dependencies"}),(0,jsx_runtime.jsx)("p",{children:"Dependencies are tables that this query uses. See when a source or materialized table was last run."})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:[{key:"Name",title:"Name",render:(_,_ref2)=>{let{name}=_ref2;return name}},{key:"Type",title:"Type",render:(_,_ref3)=>{let{type}=_ref3;return type}},{key:"Status",title:"Status",render:(_,_ref4)=>{let{type,status}=_ref4;return"source"===type?(0,jsx_runtime.jsx)(src.u,{title:"This is a source table, so it doesn't have a status",children:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"N/A"})}):status}},{key:"Last run at",title:"Last run at",render:(_,_ref5)=>{let{type,last_run_at}=_ref5;return"source"===type?(0,jsx_runtime.jsx)(src.u,{title:"This is a source table, so it is never run",children:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"N/A"})}):(0,utils.bo)(last_run_at)}}],dataSource:sourceTableItems})]})}let Node=function(_ref){let{pref,className="",children}=_ref;return(0,jsx_runtime.jsx)("div",{ref:pref,className:`flex w-[200px] px-4 py-3 justify-center items-center space-between gap-1 bg-bg-3000 border border-black border-2 rounded-lg ${className}`,children:children})},assignDepths=nodes=>{let nodeMap={};nodes.forEach(node=>{nodeMap[node.nodeId]={...node,depth:-1}});let assignDepthRecursive=(nodeId,currentDepth)=>{let node=nodeMap[nodeId];node&&(node.depth=currentDepth,node.leaf.forEach(leafId=>{nodeMap[leafId]&&assignDepthRecursive(leafId,currentDepth+1)}))};return nodes.forEach(node=>{-1===nodeMap[node.nodeId].depth&&assignDepthRecursive(node.nodeId,0)}),Object.values(nodeMap)},calculateNodePositions=nodesWithDepth=>{nodesWithDepth.sort((a,b)=>a.depth-b.depth);let nodePositions=[],visited=[],dfs=function(nodeId){let row=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(visited.includes(nodeId))return row;visited.push(nodeId);let node=nodesWithDepth.find(n=>n.nodeId===nodeId);if(!node)return row;let nodePosition={...node,position:{x:50+400*node.depth,y:50+300*row}};nodePositions.push(nodePosition);let maxRow=row;return node.leaf.filter(leafId=>!leafId.includes("_joined")).forEach((leafId,index)=>{dfs(leafId,row+index),maxRow=Math.max(maxRow,row+index)}),maxRow},maxRow=0;return nodesWithDepth.forEach(node=>{0===node.depth&&(maxRow=dfs(node.nodeId,maxRow)+1)}),nodePositions},calculateBound=(node,ref)=>{if(!ref)return{...node,left:null,right:null};let{x,y}=node.position,{width,height}=ref.getBoundingClientRect();return{...node,left:{x,y:y+height/2},right:{x:x+width,y:y+height/2}}},calculateEdgesFromTo=(from,to)=>{if(!from.right||!to.left)return[];let edges=[];return edges.push({from:from.right,to:to.left}),edges},calculateEdges=(nodeRefs,nodes)=>{let nodes_map=nodes.reduce((acc,node)=>(acc[node.nodeId]=node,acc),{}),dfs=function(nodeId){let visited=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;if(visited.has(nodeId))return[];visited.add(nodeId);let node=nodes_map[nodeId];if(!node)return[];let nodeRef=nodeRefs.find(ref=>ref?.id===nodeId);if(!nodeRef)return[];let edges=[],fromWithBounds=calculateBound(node,nodeRef);for(let leafId of node.leaf){let toNode=nodes_map[leafId],toRef=nodeRefs.find(ref=>ref?.id===leafId);if(toNode&&toRef){let toWithBounds=calculateBound(toNode,toRef);edges.push(...calculateEdgesFromTo(fromWithBounds,toWithBounds))}edges.push(...dfs(leafId,visited))}return edges},edges=[],visited=new Set;for(let node of nodes)visited.has(node.nodeId)||edges.push(...dfs(node.nodeId,visited));return edges};function NodeCanvas(_ref){let{nodes,renderNode}=_ref,canvasRef=(0,react.useRef)(null),[isDragging,setIsDragging]=(0,react.useState)(!1),[offset,setOffset]=(0,react.useState)({x:0,y:0}),[dragStart,setDragStart]=(0,react.useState)({x:0,y:0}),nodeRefs=(0,react.useRef)(Array(nodes.length).fill(null)),[nodePositions,setNodePositions]=(0,react.useState)([]),[edges,setEdges]=(0,react.useState)([]);(0,react.useEffect)(()=>{let nodesWithDepth=assignDepths(nodes),positions=calculateNodePositions(nodesWithDepth);setNodePositions(positions)},[nodes,offset]),(0,react.useEffect)(()=>{let allNodes=[...nodePositions],calculatedEdges=calculateEdges([...nodeRefs.current],allNodes);setEdges(calculatedEdges)},[nodePositions]);let drawGrid=(ctx,canvasWidth,canvasHeight)=>{ctx.fillStyle="#000000",ctx.imageSmoothingEnabled=!0;for(let x=offset.x%10;x{let canvas=canvasRef.current;if(!canvas)return;let ctx=canvas.getContext("2d");if(!ctx)return;let{width,height}=canvas.getBoundingClientRect();canvas.width=width,canvas.height=height,drawGrid(ctx,width,height);let handleResize=()=>{if(canvas){let{width,height}=canvas.getBoundingClientRect();canvas.width=width,canvas.height=height;let ctx=canvas.getContext("2d");ctx&&drawGrid(ctx,width,height)}};return window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)},[offset,nodePositions]);let handleMouseUp=()=>{setIsDragging(!1)};return(0,jsx_runtime.jsxs)("div",{className:"w-full h-full relative",children:[(0,jsx_runtime.jsx)("canvas",{ref:canvasRef,onMouseDown:e=>{setIsDragging(!0),setDragStart({x:e.clientX-offset.x,y:e.clientY-offset.y})},onMouseMove:e=>{if(!isDragging)return;let newOffset={x:e.clientX-dragStart.x,y:e.clientY-dragStart.y};setOffset(newOffset)},onMouseUp:handleMouseUp,onMouseLeave:handleMouseUp,className:(0,clsx_m.clsx)("w-full h-full absolute inset-0",isDragging?"cursor-grabbing":"cursor-grab")}),(0,jsx_runtime.jsx)("svg",{className:"absolute inset-0 w-full h-full pointer-events-none",children:edges.map((edge,index)=>{let controlPoint1X=edge.from.x+offset.x+(edge.to.x-edge.from.x)/3,controlPoint1Y=edge.from.y+offset.y,controlPoint2X=edge.to.x+offset.x-(edge.to.x-edge.from.x)/3,controlPoint2Y=edge.to.y+offset.y;return(0,jsx_runtime.jsx)("path",{d:`M ${edge.from.x+offset.x} ${edge.from.y+offset.y} + C ${controlPoint1X} ${controlPoint1Y}, + ${controlPoint2X} ${controlPoint2Y}, + ${edge.to.x+offset.x} ${edge.to.y+offset.y}`,stroke:"var(--text-3000)",strokeWidth:"2",fill:"none"},index)})}),nodePositions.map((nodePosition,idx)=>(0,jsx_runtime.jsx)("div",{className:"absolute",style:{left:`${nodePosition.position.x+offset.x}px`,top:`${nodePosition.position.y+offset.y}px`},children:renderNode(nodePosition,el=>{nodeRefs.current[idx]=el,nodeRefs.current[idx]?.setAttribute("id",nodePosition.nodeId)})},nodePosition.nodeId))]})}var DataWarehouseManagedSourcesTable=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let lineageTabLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","outputPaneTabs","lineageTabLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.codeEditorKey),(0,index_esm.actions)({loadNodes:!0,traverseAncestors:(viewId,level)=>({viewId,level}),setNodes:nodes=>({nodes})}),(0,index_esm.connect)(props=>({values:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["metadata"],databaseTableListLogic.A,["posthogTablesMap","viewsMapById","dataWarehouseTablesMapById"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueryMap"]],actions:[(0,multitabEditorLogic.tg)({key:props.codeEditorKey}),["runQuery"],dataWarehouseViewsLogic.$,["loadDataWarehouseSavedQueries"]]})),(0,index_esm.reducers)({nodeMap:[{},{setNodes:(_,_ref)=>{let{nodes}=_ref;return nodes}}]}),(0,index_esm.listeners)(_ref2=>{let{actions,values}=_ref2;return{loadNodes:async()=>{let nodes={},traverseAncestors=async(viewId,level)=>{if(!nodes[viewId]?.savedQueryId)return;let result=await api.ZP.dataWarehouseSavedQueries.ancestors(viewId,level);for(let ancestor of result.ancestors)nodes[ancestor]={nodeId:ancestor,name:values.viewsMapById[ancestor]?.name||values.dataWarehouseTablesMapById[ancestor]?.name||ancestor,savedQueryId:values.viewsMapById[ancestor]?.id,leaf:[...nodes[ancestor]?.leaf||[],viewId]},await traverseAncestors(ancestor,1)};for(let view of(values.sources.forEach(source=>{source&&(nodes[source]={nodeId:source,name:source,savedQueryId:void 0,leaf:[]})}),values.views))view&&(nodes[view.id]={nodeId:view.id,name:view.name,savedQueryId:view.id,leaf:[]},await traverseAncestors(view.id,1));actions.setNodes(nodes)}}}),(0,kea_subscriptions_lib.Vt)(_ref3=>{let{actions}=_ref3;return{metadata:()=>{actions.loadNodes()}}}),(0,index_esm.selectors)({views:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];if(view)return view}).filter(Boolean)||[]],sources:[s=>[s.metadata,s.dataWarehouseSavedQueryMap],(metadata,dataWarehouseSavedQueryMap)=>metadata&&metadata.table_names?.map(table_name=>{let view=dataWarehouseSavedQueryMap[table_name];if(!view)return table_name}).filter(Boolean)||[]],allNodes:[s=>[s.nodeMap],nodeMap=>[...Object.values(nodeMap)]]}),(0,index_esm.events)(_ref4=>{let{cache,actions}=_ref4;return{afterMount:()=>{cache.pollingInterval||(cache.pollingInterval=setInterval(actions.loadDataWarehouseSavedQueries,1e4))},beforeUnmount:()=>{clearInterval(cache.pollingInterval)}}})]);function LineageTab(){let{allNodes}=(0,index_esm.useValues)(lineageTabLogic),{dataWarehouseSavedQueryMapById}=(0,index_esm.useValues)(dataWarehouseViewsLogic.$),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$);return(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark z-0",children:(0,jsx_runtime.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,jsx_runtime.jsx)(NodeCanvas,{nodes:allNodes,renderNode:(node,ref)=>(0,jsx_runtime.jsx)(Node,{pref:ref,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col max-w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"font-bold break-all",children:node.name}),node.savedQueryId&&(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",size:"xsmall",onClick:()=>node.savedQueryId&&runDataWarehouseSavedQuery(node.savedQueryId),children:"Run"})]}),node.savedQueryId&&dataWarehouseSavedQueryMapById[node.savedQueryId]?.status&&(0,jsx_runtime.jsx)("div",{className:"text-xs mt-2 max-w-full",children:(0,jsx_runtime.jsx)(src.oe,{type:dataWarehouseSavedQueryMapById[node.savedQueryId]?.status&&DataWarehouseManagedSourcesTable.IM[dataWarehouseSavedQueryMapById[node.savedQueryId].status]||"default",className:"break-words",children:dataWarehouseSavedQueryMapById[node.savedQueryId]?.status})}),node.savedQueryId&&dataWarehouseSavedQueryMapById[node.savedQueryId]?.last_run_at&&(0,jsx_runtime.jsx)("span",{className:"text-xs mt-2 max-w-full break-words",children:`Last calculated ${(0,utils.bo)(dataWarehouseSavedQueryMapById[node.savedQueryId]?.last_run_at)}`})]})})})})})}function OutputPane(){let{activeTab}=(0,index_esm.useValues)(outputPaneLogic),{setActiveTab}=(0,index_esm.useActions)(outputPaneLogic),{variablesForInsight}=(0,index_esm.useValues)(variablesLogic.Q),{editingView,sourceQuery,exportContext,isValidView,error,editorKey,metadataLoading}=(0,index_esm.useValues)(multitabEditorLogic.tg),{saveAsInsight,saveAsView,setSourceQuery,runQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),{response,responseLoading,responseError,queryId,pollResponse}=(0,index_esm.useValues)(dataNodeLogic.M),{updatingDataWarehouseSavedQuery}=(0,index_esm.useValues)(dataWarehouseViewsLogic.$),{updateDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$),{visualizationType,queryCancelled}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),vizKey=(0,react.useMemo)(()=>"SQLEditorScene",[]),columns=(0,react.useMemo)(()=>{var _response$columns$map;return null!==(_response$columns$map=response?.columns?.map(column=>({key:column,name:column,resizable:!0})))&&void 0!==_response$columns$map?_response$columns$map:[]},[response]),rows=(0,react.useMemo)(()=>response?.results?response?.results?.map(row=>{let rowObject={};return response.columns.forEach((column,i)=>{rowObject[column]=row[i]}),rowObject}):[],[response]);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full flex-1 bg-bg-3000",children:[variablesForInsight.length>0&&(0,jsx_runtime.jsx)("div",{className:"py-2 px-4",children:(0,jsx_runtime.jsx)(Variables.M,{})}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-between align-center py-2 px-4 w-full h-[55px]",children:[(0,jsx_runtime.jsx)(src.TP,{activeKey:activeTab,onChange:tab=>setActiveTab(tab),tabs:[{key:OutputTab.Results,label:"Results"},{key:OutputTab.Visualization,label:"Visualization"},...featureFlags[constants.y8.DATA_MODELING]?[{key:OutputTab.Info,label:(0,jsx_runtime.jsxs)("span",{className:"flex flex-row items-center gap-2",children:["Info ",metadataLoading?(0,jsx_runtime.jsx)(src.$j,{}):null]})},{key:OutputTab.Lineage,label:(0,jsx_runtime.jsxs)("span",{className:"flex flex-row items-center gap-2",children:["Lineage ",metadataLoading?(0,jsx_runtime.jsx)(src.$j,{}):null]})}]:[]]}),(0,jsx_runtime.jsxs)("div",{className:"flex gap-4",children:[(0,jsx_runtime.jsx)(AddVariableButton.u,{}),exportContext&&(0,jsx_runtime.jsx)(ExportButton.j,{disabledReason:visualizationType!=types.Qb.ActionsTable&&"Only table results are exportable",type:"secondary",items:[{export_format:types.P5.CSV,export_context:exportContext},{export_format:types.P5.XLSX,export_context:exportContext}]}),editingView?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.Jp,{loading:updatingDataWarehouseSavedQuery,type:"secondary",onClick:()=>{var _response$types;return updateDataWarehouseSavedQuery({id:editingView.id,query:sourceQuery.source,types:null!==(_response$types=response?.types)&&void 0!==_response$types?_response$types:[]})},children:"Update view"})}):(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>saveAsView(),disabledReason:isValidView?"":"Some fields may need an alias",children:"Save as view"}),(0,jsx_runtime.jsxs)(src.Jp,{disabledReason:error||"",loading:responseLoading,type:"primary",onClick:()=>runQuery(),children:[(0,jsx_runtime.jsx)("span",{className:"mr-1",children:"Run"}),(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0})]})]})]}),(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark",children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:lineageTabLogic,props:{codeEditorKey:editorKey},children:(0,jsx_runtime.jsx)(Content,{activeTab:activeTab,responseError:responseError,responseLoading:responseLoading,response:response,sourceQuery:sourceQuery,queryCancelled:queryCancelled,columns:columns,rows:rows,isDarkModeOn:isDarkModeOn,vizKey:vizKey,setSourceQuery:setSourceQuery,exportContext:exportContext,saveAsInsight:saveAsInsight,queryId:queryId,pollResponse:pollResponse,editorKey:editorKey})})}),(0,jsx_runtime.jsx)("div",{className:"flex justify-end pr-2 border-t",children:(0,jsx_runtime.jsx)(ElapsedTime.W,{})})]})}function InternalDataTableVisualization(props){let{query,visualizationType,showEditingUI,showResultControls,response,responseLoading,isChartSettingsPanelOpen}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{toggleChartSettingsPanel}=(0,index_esm.useActions)(dataVisualizationLogic.H8),component=null;return showEditingUI||response&&!responseLoading?visualizationType===types.Qb.ActionsTable?component=(0,jsx_runtime.jsx)(Table.i,{uniqueKey:props.uniqueKey,query:query,context:props.context,cachedResults:props.cachedResults}):visualizationType===types.Qb.ActionsLineGraph||visualizationType===types.Qb.ActionsBar||visualizationType===types.Qb.ActionsAreaGraph||visualizationType===types.Qb.ActionsStackedBar?component=(0,jsx_runtime.jsx)(LineGraph.x,{}):visualizationType===types.Qb.BoldNumber&&(component=(0,jsx_runtime.jsx)(BoldNumber.w,{})):component=(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 justify-center items-center border rounded bg-bg-light",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})}),(0,jsx_runtime.jsx)("div",{className:"h-full hide-scrollbar flex flex-1 gap-2",children:(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-row gap-4 overflow-scroll hide-scrollbar",children:[isChartSettingsPanelOpen&&(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(SideBar.K,{})}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full flex-1 overflow-auto"),children:component})]}),showResultControls&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap px-px py-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center"}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[(0,jsx_runtime.jsx)(TableDisplay.V,{}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),type:isChartSettingsPanelOpen?"primary":"secondary",onClick:()=>toggleChartSettingsPanel(),tooltip:"Visualization settings"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>props.onSaveInsight(),children:"Create insight"})]})})]})})]})})}let ErrorState=_ref=>{let{responseError,sourceQuery,queryCancelled,response}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("flex-1 absolute top-0 left-0 right-0 bottom-0 overflow-scroll"),children:(0,jsx_runtime.jsx)(EmptyStates.jC,{query:sourceQuery,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError})})},Content=_ref2=>{let{activeTab,responseError,responseLoading,response,sourceQuery,queryCancelled,columns,rows,isDarkModeOn,vizKey,setSourceQuery,exportContext,saveAsInsight,queryId,pollResponse,editorKey}=_ref2;return activeTab===OutputTab.Results?responseError?(0,jsx_runtime.jsx)(ErrorState,{responseError:responseError,sourceQuery:sourceQuery,queryCancelled:queryCancelled,response:response}):responseLoading?(0,jsx_runtime.jsx)(EmptyStates.sX,{queryId:queryId,pollResponse:pollResponse}):response?(0,jsx_runtime.jsx)("div",{className:"flex-1 absolute top-0 left-0 right-0 bottom-0",children:(0,jsx_runtime.jsx)(bundle.ZP,{className:isDarkModeOn?"rdg-dark h-full":"rdg-light h-full",columns:columns,rows:rows})}):(0,jsx_runtime.jsx)("div",{className:"flex flex-1 justify-center items-center",children:(0,jsx_runtime.jsx)("span",{className:"text-muted mt-3",children:"Query results will appear here"})}):activeTab===OutputTab.Visualization?responseError?(0,jsx_runtime.jsx)(ErrorState,{responseError:responseError,sourceQuery:sourceQuery,queryCancelled:queryCancelled,response:response}):response?(0,jsx_runtime.jsx)("div",{className:"flex-1 absolute top-0 left-0 right-0 bottom-0 px-4 py-1 hide-scrollbar",children:(0,jsx_runtime.jsx)(InternalDataTableVisualization,{uniqueKey:vizKey,query:sourceQuery,setQuery:setSourceQuery,context:{},cachedResults:void 0,exportContext:exportContext,onSaveInsight:saveAsInsight})}):(0,jsx_runtime.jsx)("div",{className:"flex flex-1 justify-center items-center",children:(0,jsx_runtime.jsx)("span",{className:"text-muted mt-3",children:"Query results will be visualized here"})}):activeTab===OutputTab.Info?(0,jsx_runtime.jsx)("div",{className:"flex flex-1 relative bg-dark",children:(0,jsx_runtime.jsx)(InfoTab,{codeEditorKey:editorKey})}):activeTab===OutputTab.Lineage?(0,jsx_runtime.jsx)(LineageTab,{}):null};var Resizer=__webpack_require__("./frontend/src/lib/components/Resizer/Resizer.tsx"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js");function QueryPane(props){let{queryPaneHeight,queryPaneResizerProps}=(0,index_esm.useValues)(editorSizingLogic);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:"relative flex flex-col w-full bg-bg-3000",style:{height:`${queryPaneHeight}px`},ref:queryPaneResizerProps.containerRef,children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref=>{let{height,width}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"hogQL",value:props.queryInput,sourceQuery:props.sourceQuery,height:height,width:width,...props.codeEditorProps,options:{minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,suggest:{showInlineDetails:!0},quickSuggestionsDelay:300}})}})}),(0,jsx_runtime.jsx)(Resizer.w,{...queryPaneResizerProps})]})})}function QueryTabs(_ref){let{models,onClear,onClick,onAdd,activeModelUri}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"flex flex-row w-full overflow-scroll hide-scrollbar h-10",children:[models.map(model=>(0,jsx_runtime.jsx)(QueryTabComponent,{model:model,onClear:models.length>1?onClear:void 0,onClick:onClick,active:activeModelUri?.uri.path===model.uri.path},model.uri.path)),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>onAdd(),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{fontSize:14})})]})}function QueryTabComponent(_ref2){var _model$view$name;let{model,active,onClear,onClick}=_ref2;return(0,jsx_runtime.jsxs)("button",{onClick:()=>onClick?.(model),className:(0,clsx_m.default)("space-y-px rounded-t p-1 flex flex-row items-center gap-1 hover:bg-[var(--bg-light)] cursor-pointer",active?"bg-[var(--bg-light)] border":"bg-bg-3000",onClear?"pl-3 pr-2":"px-3"),children:[null!==(_model$view$name=model.view?.name)&&void 0!==_model$view$name?_model$view$name:"New query",onClear&&(0,jsx_runtime.jsx)(src.Jp,{onClick:e=>{e.stopPropagation(),onClear(model)},size:"xsmall",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})})]})}function QueryWindow(){let[monacoAndEditor,setMonacoAndEditor]=(0,react.useState)(null),[monaco,editor]=null!=monacoAndEditor?monacoAndEditor:[],codeEditorKey=`hogQLQueryEditor/${lib.router.values.location.pathname}`,logic=(0,multitabEditorLogic.tg)({key:codeEditorKey,monaco,editor}),{allTabs,activeModelUri,queryInput,editingView,sourceQuery}=(0,index_esm.useValues)(logic),{selectTab,deleteTab,createTab,setQueryInput,runQuery,setError,setIsValidView,setMetadata,setMetadataLoading}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-col h-full overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"overflow-x-auto",children:(0,jsx_runtime.jsx)(QueryTabs,{models:allTabs,onClick:selectTab,onClear:deleteTab,onAdd:createTab,activeModelUri:activeModelUri})}),editingView&&(0,jsx_runtime.jsx)("div",{className:"h-7 bg-warning-highlight p-1",children:(0,jsx_runtime.jsxs)("span",{children:["Editing ",editingView.status?"materialized view":"view",' "',editingView.name,'"']})}),(0,jsx_runtime.jsx)(QueryPane,{queryInput:queryInput,sourceQuery:sourceQuery.source,promptError:null,codeEditorProps:{queryKey:codeEditorKey,onChange:v=>{setQueryInput(null!=v?v:"")},onMount:(editor,monaco)=>{setMonacoAndEditor([monaco,editor])},onPressCmdEnter:(value,selectionType)=>{value&&"selection"===selectionType?runQuery(value):runQuery()},onError:(error,isValidView)=>{setError(error),setIsValidView(isValidView)},onMetadata:metadata=>{setMetadata(metadata)},onMetadataLoading:loading=>{setMetadataLoading(loading)}}}),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:multitabEditorLogic.tg,props:{key:codeEditorKey,monaco,editor},children:(0,jsx_runtime.jsx)(InternalQueryWindow,{})})]})}function InternalQueryWindow(){let{cacheLoading,sourceQuery,queryInput}=(0,index_esm.useValues)(multitabEditorLogic.tg),{setSourceQuery}=(0,index_esm.useActions)(multitabEditorLogic.tg);if(cacheLoading)return null;let dataVisualizationLogicProps={key:multitabEditorLogic.cc,query:sourceQuery,dashboardId:void 0,dataNodeCollectionId:multitabEditorLogic.cc,insightMode:types.LO.Edit,loadPriority:void 0,cachedResults:void 0,variablesOverride:void 0,setQuery:setSourceQuery},dataNodeLogicProps={query:sourceQuery.source,key:multitabEditorLogic.cc,cachedResults:void 0,loadPriority:void 0,dataNodeCollectionId:multitabEditorLogic.cc,variablesOverride:void 0,autoLoad:!1},variablesLogicProps={key:dataVisualizationLogicProps.key,readOnly:!1,queryInput};return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataVisualizationLogic.H8,props:dataVisualizationLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:displayLogic.Y,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variablesLogic.Q,props:variablesLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variableModalLogic.b,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(OutputPane,{})})})})})})}function EditorScene(){let ref=(0,react.useRef)(null),navigatorRef=(0,react.useRef)(null),queryPaneRef=(0,react.useRef)(null),{activeNavbarItem}=(0,index_esm.useValues)(navigationLogic.f),{sidebarOverlayOpen}=(0,index_esm.useValues)(editorSceneLogic.h);return(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:editorSizingLogic,props:{editorSceneRef:ref,navigatorRef,sourceNavigatorResizerProps:{containerRef:navigatorRef,logicKey:"source-navigator",placement:"right"},queryPaneResizerProps:{containerRef:queryPaneRef,logicKey:"query-pane",placement:"bottom"}},children:[(0,jsx_runtime.jsxs)("div",{className:"w-full h-full flex flex-row overflow-hidden",ref:ref,children:[activeNavbarItem&&(0,jsx_runtime.jsx)(Sidebar.Y,{navbarItem:activeNavbarItem,sidebarOverlay:(0,jsx_runtime.jsx)(EditorSidebarOverlay,{}),sidebarOverlayProps:{isOpen:sidebarOverlayOpen}},activeNavbarItem.identifier),(0,jsx_runtime.jsx)(QueryWindow,{})]}),(0,jsx_runtime.jsx)(ViewLinkModal.WI,{})]})}let EditorSidebarOverlay=()=>{let{setSidebarOverlayOpen}=(0,index_esm.useActions)(editorSceneLogic.h),{sidebarOverlayTreeItems,selectedSchema}=(0,index_esm.useValues)(editorSceneLogic.h);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[(0,jsx_runtime.jsxs)("header",{className:"flex flex-row h-10 border-b shrink-0 p-1 gap-2",children:[(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconArrowLeft,{}),onClick:()=>setSidebarOverlayOpen(!1)}),selectedSchema?.name&&(0,jsx_runtime.jsx)(CopyToClipboard.D,{className:"font-mono",tooltipMessage:null,description:"schema",iconStyle:{color:"var(--muted-alt)"},explicitValue:selectedSchema?.name,children:selectedSchema?.name})]}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{items:sidebarOverlayTreeItems})]})}},"./frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{lL:()=>DataWarehouseManagedSourcesTable,MX:()=>RenderDataWarehouseSourceIcon,IM:()=>StatusTagSetting});var src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),lemon_ui_src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),aws_s3=__webpack_require__("./frontend/public/services/aws-s3.png");let azure=__webpack_require__.p+"images/azure.af1ab71d57e8348437183a694553a45f.png";var bigquery=__webpack_require__("./frontend/public/services/bigquery.png");let chargebee=__webpack_require__.p+"images/chargebee.394d057d1051597137e505b5fe7e86d5.png",cloudflare=__webpack_require__.p+"images/cloudflare.ac2b10d48ae784e080e8f5be0b4d19cb.png";var google_cloud_storage=__webpack_require__("./frontend/public/services/google-cloud-storage.png"),hubspot=__webpack_require__("./frontend/public/services/hubspot.png");let mysql=__webpack_require__.p+"images/mysql.7912374cef9be6a09530b67289e766b5.png";var postgres=__webpack_require__("./frontend/public/services/postgres.png"),salesforce=__webpack_require__("./frontend/public/services/salesforce.png"),snowflake=__webpack_require__("./frontend/public/services/snowflake.png");let sql_azure=__webpack_require__.p+"images/sql-azure.be99f21a93dbdf9b0e2092e1bd3f9f70.png",stripe=__webpack_require__.p+"images/stripe.675a1480d2e5d55e32e3e9e0dc54b92e.png",vitally=__webpack_require__.p+"images/vitally.2399d8a0e27a2b9b051d4500481e3009.png",zendesk=__webpack_require__.p+"images/zendesk.4febb7199e1b2b53c901089ce7fcccd1.png";var urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),sourceWizardLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx"),dataWarehouseSettingsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let StatusTagSetting={Running:"primary",Completed:"success",Error:"danger",Failed:"danger","Billing limits":"danger"};function DataWarehouseManagedSourcesTable(){var _dataWarehouseSources;let{dataWarehouseSources,dataWarehouseSourcesLoading,sourceReloadingById}=(0,index_esm.useValues)(dataWarehouseSettingsLogic.T),{deleteSource,reloadSource}=(0,index_esm.useActions)(dataWarehouseSettingsLogic.T);return(0,jsx_runtime.jsx)(lemon_ui_src.g3,{dataSource:null!==(_dataWarehouseSources=dataWarehouseSources?.results)&&void 0!==_dataWarehouseSources?_dataWarehouseSources:[],loading:dataWarehouseSourcesLoading,disableTableWhileLoading:!1,pagination:{pageSize:10},columns:[{width:0,render:function RenderAppInfo(_,source){return(0,jsx_runtime.jsx)(RenderDataWarehouseSourceIcon,{type:source.source_type})}},{title:"Source",key:"name",render:function RenderName(_,source){var _SOURCE_DETAILS$sourc;return(0,jsx_runtime.jsx)(LemonTableLink.i,{to:urls.j.pipelineNode(types.We.Source,`managed-${source.id}`,types.il.Schemas),title:null!==(_SOURCE_DETAILS$sourc=sourceWizardLogic.l2[source.source_type]?.label)&&void 0!==_SOURCE_DETAILS$sourc?_SOURCE_DETAILS$sourc:source.source_type,description:source.prefix})}},{title:"Last Successful Run",key:"last_run_at",tooltip:"Time of the last run that completed a data import",render:(_,run)=>run.last_run_at?(0,jsx_runtime.jsx)(src.w4,{time:run.last_run_at,formatDate:"MMM\xa0DD,\xa0YYYY",formatTime:"HH:mm"}):"Never"},{title:"Total Rows Synced",key:"rows_synced",tooltip:"Total number of rows synced across all schemas in this source",render:function RenderRowsSynced(_,source){return source.schemas.reduce((acc,schema)=>{var _schema$table$row_cou;return acc+(null!==(_schema$table$row_cou=schema.table?.row_count)&&void 0!==_schema$table$row_cou?_schema$table$row_cou:0)},0).toLocaleString()}},{title:"Status",key:"status",render:function RenderStatus(_,source){return(0,jsx_runtime.jsx)(lemon_ui_src.oe,{type:StatusTagSetting[source.status]||"default",children:source.status})}},{key:"actions",width:0,render:function RenderActions(_,source){return(0,jsx_runtime.jsx)("div",{className:"flex flex-row justify-end",children:sourceReloadingById[source.id]?(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(lemon_ui_src.$j,{})}):(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(lemon_ui_src.u,{title:"Start the data import for this schema again",children:(0,jsx_runtime.jsx)(lemon_ui_src.Jp,{type:"tertiary","data-attr":`reload-data-warehouse-${source.source_type}`,onClick:()=>{reloadSource(source)},children:"Reload"},`reload-data-warehouse-${source.source_type}`)}),(0,jsx_runtime.jsx)(lemon_ui_src.Jp,{status:"danger","data-attr":`delete-data-warehouse-${source.source_type}`,onClick:()=>{lemon_ui_src.dn.open({title:"Delete data source?",description:"Are you sure you want to delete this data source? All related tables will be deleted.",primaryButton:{children:"Delete",status:"danger",onClick:()=>deleteSource(source)},secondaryButton:{children:"Cancel"}})},children:"Delete"},`delete-data-warehouse-${source.source_type}`)]})})})})}}]})}function RenderDataWarehouseSourceIcon(_ref){let{type,size="small"}=_ref,sizePx="small"===size?30:60,icon={Stripe:stripe,Hubspot:hubspot.Z,Zendesk:zendesk,Postgres:postgres.Z,MySQL:mysql,Snowflake:snowflake.Z,aws:aws_s3.Z,"google-cloud":google_cloud_storage.Z,"cloudflare-r2":cloudflare,azure:azure,Salesforce:salesforce.Z,MSSQL:sql_azure,Vitally:vitally,BigQuery:bigquery.Z,Chargebee:chargebee}[type];return(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-4",children:(0,jsx_runtime.jsx)(lemon_ui_src.u,{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[type,(0,jsx_runtime.jsx)("br",{}),"Click to view docs"]}),children:(0,jsx_runtime.jsx)(lemon_ui_src.rU,{to:types.zD.includes(type)?"https://posthog.com/docs/data-warehouse/setup#step-1-creating-a-bucket-in-s3":`https://posthog.com/docs/data-warehouse/setup#${type.toLowerCase()}`,children:(0,jsx_runtime.jsx)("img",{src:icon,alt:type,height:sizePx,width:sizePx,className:"rounded object-contain max-w-none"})})})})}}}]); +//# sourceMappingURL=23162.d4d7bb05.iframe.bundle.js.map \ No newline at end of file diff --git a/docs/23162.44995db2.iframe.bundle.js.map b/docs/23162.d4d7bb05.iframe.bundle.js.map similarity index 99% rename from docs/23162.44995db2.iframe.bundle.js.map rename to docs/23162.d4d7bb05.iframe.bundle.js.map index 36fca74da..26b0b00ea 100644 --- a/docs/23162.44995db2.iframe.bundle.js.map +++ b/docs/23162.d4d7bb05.iframe.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"23162.44995db2.iframe.bundle.js","mappings":";AA0RA;AACA;AACA","sources":["webpack://posthog/./frontend/src/scenes/data-model/NodeCanvas.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport { useEffect, useRef, useState } from 'react'\n\nimport { Edge, Node, NodePosition, NodePositionWithBounds, NodeWithDepth } from './types'\n\nconst VERTICAL_SPACING = 300\nconst HORIZONTAL_SPACING = 400\n\n// Core graph layout calculation functions\nconst assignDepths = (nodes: Node[]): NodeWithDepth[] => {\n const nodeMap: { [id: string]: NodeWithDepth } = {}\n\n nodes.forEach((node) => {\n nodeMap[node.nodeId] = { ...node, depth: -1 }\n })\n\n const assignDepthRecursive = (nodeId: string, currentDepth: number): void => {\n const node = nodeMap[nodeId]\n if (!node) {\n return\n }\n node.depth = currentDepth\n\n node.leaf.forEach((leafId) => {\n if (nodeMap[leafId]) {\n assignDepthRecursive(leafId, currentDepth + 1)\n }\n })\n }\n\n nodes.forEach((node) => {\n if (nodeMap[node.nodeId].depth === -1) {\n assignDepthRecursive(node.nodeId, 0)\n }\n })\n\n return Object.values(nodeMap)\n}\n\nconst calculateNodePositions = (nodesWithDepth: NodeWithDepth[]): NodePosition[] => {\n const padding = 50\n nodesWithDepth.sort((a, b) => a.depth - b.depth)\n\n const nodePositions: NodePosition[] = []\n const visited: string[] = []\n\n const dfs = (nodeId: string, row: number = 0): number => {\n if (visited.includes(nodeId)) {\n return row\n }\n visited.push(nodeId)\n\n const node = nodesWithDepth.find((n) => n.nodeId === nodeId)\n if (!node) {\n return row\n }\n\n const nodePosition = {\n ...node,\n position: {\n x: padding + node.depth * HORIZONTAL_SPACING,\n y: padding + row * VERTICAL_SPACING,\n },\n }\n\n nodePositions.push(nodePosition)\n\n let maxRow = row\n node.leaf\n .filter((leafId) => !leafId.includes('_joined'))\n .forEach((leafId, index) => {\n dfs(leafId, row + index)\n maxRow = Math.max(maxRow, row + index)\n })\n\n return maxRow\n }\n\n let maxRow = 0\n nodesWithDepth.forEach((node) => {\n if (node.depth === 0) {\n maxRow = dfs(node.nodeId, maxRow) + 1\n }\n })\n\n return nodePositions\n}\n\nconst calculateBound = (node: NodePosition, ref: HTMLDivElement | null): NodePositionWithBounds => {\n if (!ref) {\n return {\n ...node,\n left: null,\n right: null,\n }\n }\n\n const { x, y } = node.position\n const { width, height } = ref.getBoundingClientRect()\n return {\n ...node,\n left: { x, y: y + height / 2 },\n right: { x: x + width, y: y + height / 2 },\n }\n}\n\nconst calculateEdgesFromTo = (from: NodePositionWithBounds, to: NodePositionWithBounds): Edge[] => {\n if (!from.right || !to.left) {\n return []\n }\n\n const edges = []\n edges.push({\n from: from.right,\n to: to.left,\n })\n\n return edges\n}\n\nconst calculateEdges = (nodeRefs: (HTMLDivElement | null)[], nodes: NodePosition[]): Edge[] => {\n const nodes_map = nodes.reduce((acc: Record, node) => {\n acc[node.nodeId] = node\n return acc\n }, {})\n\n const dfs = (nodeId: string, visited: Set = new Set()): Edge[] => {\n if (visited.has(nodeId)) {\n return []\n }\n visited.add(nodeId)\n\n const node = nodes_map[nodeId]\n if (!node) {\n return []\n }\n\n const nodeRef = nodeRefs.find((ref) => ref?.id === nodeId)\n if (!nodeRef) {\n return []\n }\n\n const edges: Edge[] = []\n const fromWithBounds = calculateBound(node, nodeRef)\n\n for (const leafId of node.leaf) {\n const toNode = nodes_map[leafId]\n const toRef = nodeRefs.find((ref) => ref?.id === leafId)\n if (toNode && toRef) {\n const toWithBounds = calculateBound(toNode, toRef)\n edges.push(...calculateEdgesFromTo(fromWithBounds, toWithBounds))\n }\n\n edges.push(...dfs(leafId, visited))\n }\n\n return edges\n }\n\n const edges: Edge[] = []\n const visited = new Set()\n\n for (const node of nodes) {\n if (!visited.has(node.nodeId)) {\n edges.push(...dfs(node.nodeId, visited))\n }\n }\n\n return edges\n}\n\ninterface NodeCanvasProps {\n nodes: T[]\n renderNode: (node: T & NodePosition, ref: (el: HTMLDivElement | null) => void) => JSX.Element\n}\n\nexport function NodeCanvas({ nodes, renderNode }: NodeCanvasProps): JSX.Element {\n const canvasRef = useRef(null)\n const [isDragging, setIsDragging] = useState(false)\n const [offset, setOffset] = useState({ x: 0, y: 0 })\n const [dragStart, setDragStart] = useState({ x: 0, y: 0 })\n const nodeRefs = useRef<(HTMLDivElement | null)[]>(Array(nodes.length).fill(null))\n const [nodePositions, setNodePositions] = useState([])\n const [edges, setEdges] = useState([])\n\n useEffect(() => {\n const nodesWithDepth = assignDepths(nodes)\n const positions = calculateNodePositions(nodesWithDepth)\n setNodePositions(positions)\n }, [nodes, offset])\n\n useEffect(() => {\n const allNodes = [...nodePositions]\n const calculatedEdges = calculateEdges([...nodeRefs.current], allNodes)\n setEdges(calculatedEdges)\n }, [nodePositions])\n\n const drawGrid = (ctx: CanvasRenderingContext2D, canvasWidth: number, canvasHeight: number): void => {\n ctx.fillStyle = '#000000'\n ctx.imageSmoothingEnabled = true\n const dotSize = 0.5\n const spacing = 10\n\n for (let x = offset.x % spacing; x < canvasWidth; x += spacing) {\n for (let y = offset.y % spacing; y < canvasHeight; y += spacing) {\n ctx.fillRect(x, y, dotSize, dotSize)\n }\n }\n }\n\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) {\n return\n }\n\n const ctx = canvas.getContext('2d')\n if (!ctx) {\n return\n }\n\n const { width, height } = canvas.getBoundingClientRect()\n canvas.width = width\n canvas.height = height\n drawGrid(ctx, width, height)\n\n const handleResize = (): void => {\n if (canvas) {\n const { width, height } = canvas.getBoundingClientRect()\n canvas.width = width\n canvas.height = height\n const ctx = canvas.getContext('2d')\n if (ctx) {\n drawGrid(ctx, width, height)\n }\n }\n }\n\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [offset, nodePositions])\n\n const handleMouseDown = (e: React.MouseEvent): void => {\n setIsDragging(true)\n setDragStart({ x: e.clientX - offset.x, y: e.clientY - offset.y })\n }\n\n const handleMouseMove = (e: React.MouseEvent): void => {\n if (!isDragging) {\n return\n }\n const newOffset = {\n x: e.clientX - dragStart.x,\n y: e.clientY - dragStart.y,\n }\n setOffset(newOffset)\n }\n\n const handleMouseUp = (): void => {\n setIsDragging(false)\n }\n\n return (\n
\n \n \n {edges.map((edge, index) => {\n const controlPoint1X = edge.from.x + offset.x + (edge.to.x - edge.from.x) / 3\n const controlPoint1Y = edge.from.y + offset.y\n const controlPoint2X = edge.to.x + offset.x - (edge.to.x - edge.from.x) / 3\n const controlPoint2Y = edge.to.y + offset.y\n return (\n \n )\n })}\n \n {nodePositions.map((nodePosition, idx) => (\n \n {renderNode(nodePosition as T & NodePosition, (el) => {\n nodeRefs.current[idx] = el\n nodeRefs.current[idx]?.setAttribute('id', nodePosition.nodeId)\n })}\n
\n ))}\n \n )\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"23162.d4d7bb05.iframe.bundle.js","mappings":";AA0RA;AACA;AACA","sources":["webpack://posthog/./frontend/src/scenes/data-model/NodeCanvas.tsx"],"sourcesContent":["import { clsx } from 'clsx'\nimport { useEffect, useRef, useState } from 'react'\n\nimport { Edge, Node, NodePosition, NodePositionWithBounds, NodeWithDepth } from './types'\n\nconst VERTICAL_SPACING = 300\nconst HORIZONTAL_SPACING = 400\n\n// Core graph layout calculation functions\nconst assignDepths = (nodes: Node[]): NodeWithDepth[] => {\n const nodeMap: { [id: string]: NodeWithDepth } = {}\n\n nodes.forEach((node) => {\n nodeMap[node.nodeId] = { ...node, depth: -1 }\n })\n\n const assignDepthRecursive = (nodeId: string, currentDepth: number): void => {\n const node = nodeMap[nodeId]\n if (!node) {\n return\n }\n node.depth = currentDepth\n\n node.leaf.forEach((leafId) => {\n if (nodeMap[leafId]) {\n assignDepthRecursive(leafId, currentDepth + 1)\n }\n })\n }\n\n nodes.forEach((node) => {\n if (nodeMap[node.nodeId].depth === -1) {\n assignDepthRecursive(node.nodeId, 0)\n }\n })\n\n return Object.values(nodeMap)\n}\n\nconst calculateNodePositions = (nodesWithDepth: NodeWithDepth[]): NodePosition[] => {\n const padding = 50\n nodesWithDepth.sort((a, b) => a.depth - b.depth)\n\n const nodePositions: NodePosition[] = []\n const visited: string[] = []\n\n const dfs = (nodeId: string, row: number = 0): number => {\n if (visited.includes(nodeId)) {\n return row\n }\n visited.push(nodeId)\n\n const node = nodesWithDepth.find((n) => n.nodeId === nodeId)\n if (!node) {\n return row\n }\n\n const nodePosition = {\n ...node,\n position: {\n x: padding + node.depth * HORIZONTAL_SPACING,\n y: padding + row * VERTICAL_SPACING,\n },\n }\n\n nodePositions.push(nodePosition)\n\n let maxRow = row\n node.leaf\n .filter((leafId) => !leafId.includes('_joined'))\n .forEach((leafId, index) => {\n dfs(leafId, row + index)\n maxRow = Math.max(maxRow, row + index)\n })\n\n return maxRow\n }\n\n let maxRow = 0\n nodesWithDepth.forEach((node) => {\n if (node.depth === 0) {\n maxRow = dfs(node.nodeId, maxRow) + 1\n }\n })\n\n return nodePositions\n}\n\nconst calculateBound = (node: NodePosition, ref: HTMLDivElement | null): NodePositionWithBounds => {\n if (!ref) {\n return {\n ...node,\n left: null,\n right: null,\n }\n }\n\n const { x, y } = node.position\n const { width, height } = ref.getBoundingClientRect()\n return {\n ...node,\n left: { x, y: y + height / 2 },\n right: { x: x + width, y: y + height / 2 },\n }\n}\n\nconst calculateEdgesFromTo = (from: NodePositionWithBounds, to: NodePositionWithBounds): Edge[] => {\n if (!from.right || !to.left) {\n return []\n }\n\n const edges = []\n edges.push({\n from: from.right,\n to: to.left,\n })\n\n return edges\n}\n\nconst calculateEdges = (nodeRefs: (HTMLDivElement | null)[], nodes: NodePosition[]): Edge[] => {\n const nodes_map = nodes.reduce((acc: Record, node) => {\n acc[node.nodeId] = node\n return acc\n }, {})\n\n const dfs = (nodeId: string, visited: Set = new Set()): Edge[] => {\n if (visited.has(nodeId)) {\n return []\n }\n visited.add(nodeId)\n\n const node = nodes_map[nodeId]\n if (!node) {\n return []\n }\n\n const nodeRef = nodeRefs.find((ref) => ref?.id === nodeId)\n if (!nodeRef) {\n return []\n }\n\n const edges: Edge[] = []\n const fromWithBounds = calculateBound(node, nodeRef)\n\n for (const leafId of node.leaf) {\n const toNode = nodes_map[leafId]\n const toRef = nodeRefs.find((ref) => ref?.id === leafId)\n if (toNode && toRef) {\n const toWithBounds = calculateBound(toNode, toRef)\n edges.push(...calculateEdgesFromTo(fromWithBounds, toWithBounds))\n }\n\n edges.push(...dfs(leafId, visited))\n }\n\n return edges\n }\n\n const edges: Edge[] = []\n const visited = new Set()\n\n for (const node of nodes) {\n if (!visited.has(node.nodeId)) {\n edges.push(...dfs(node.nodeId, visited))\n }\n }\n\n return edges\n}\n\ninterface NodeCanvasProps {\n nodes: T[]\n renderNode: (node: T & NodePosition, ref: (el: HTMLDivElement | null) => void) => JSX.Element\n}\n\nexport function NodeCanvas({ nodes, renderNode }: NodeCanvasProps): JSX.Element {\n const canvasRef = useRef(null)\n const [isDragging, setIsDragging] = useState(false)\n const [offset, setOffset] = useState({ x: 0, y: 0 })\n const [dragStart, setDragStart] = useState({ x: 0, y: 0 })\n const nodeRefs = useRef<(HTMLDivElement | null)[]>(Array(nodes.length).fill(null))\n const [nodePositions, setNodePositions] = useState([])\n const [edges, setEdges] = useState([])\n\n useEffect(() => {\n const nodesWithDepth = assignDepths(nodes)\n const positions = calculateNodePositions(nodesWithDepth)\n setNodePositions(positions)\n }, [nodes, offset])\n\n useEffect(() => {\n const allNodes = [...nodePositions]\n const calculatedEdges = calculateEdges([...nodeRefs.current], allNodes)\n setEdges(calculatedEdges)\n }, [nodePositions])\n\n const drawGrid = (ctx: CanvasRenderingContext2D, canvasWidth: number, canvasHeight: number): void => {\n ctx.fillStyle = '#000000'\n ctx.imageSmoothingEnabled = true\n const dotSize = 0.5\n const spacing = 10\n\n for (let x = offset.x % spacing; x < canvasWidth; x += spacing) {\n for (let y = offset.y % spacing; y < canvasHeight; y += spacing) {\n ctx.fillRect(x, y, dotSize, dotSize)\n }\n }\n }\n\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) {\n return\n }\n\n const ctx = canvas.getContext('2d')\n if (!ctx) {\n return\n }\n\n const { width, height } = canvas.getBoundingClientRect()\n canvas.width = width\n canvas.height = height\n drawGrid(ctx, width, height)\n\n const handleResize = (): void => {\n if (canvas) {\n const { width, height } = canvas.getBoundingClientRect()\n canvas.width = width\n canvas.height = height\n const ctx = canvas.getContext('2d')\n if (ctx) {\n drawGrid(ctx, width, height)\n }\n }\n }\n\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [offset, nodePositions])\n\n const handleMouseDown = (e: React.MouseEvent): void => {\n setIsDragging(true)\n setDragStart({ x: e.clientX - offset.x, y: e.clientY - offset.y })\n }\n\n const handleMouseMove = (e: React.MouseEvent): void => {\n if (!isDragging) {\n return\n }\n const newOffset = {\n x: e.clientX - dragStart.x,\n y: e.clientY - dragStart.y,\n }\n setOffset(newOffset)\n }\n\n const handleMouseUp = (): void => {\n setIsDragging(false)\n }\n\n return (\n
\n \n \n {edges.map((edge, index) => {\n const controlPoint1X = edge.from.x + offset.x + (edge.to.x - edge.from.x) / 3\n const controlPoint1Y = edge.from.y + offset.y\n const controlPoint2X = edge.to.x + offset.x - (edge.to.x - edge.from.x) / 3\n const controlPoint2Y = edge.to.y + offset.y\n return (\n \n )\n })}\n \n {nodePositions.map((nodePosition, idx) => (\n \n {renderNode(nodePosition as T & NodePosition, (el) => {\n nodeRefs.current[idx] = el\n nodeRefs.current[idx]?.setAttribute('id', nodePosition.nodeId)\n })}\n
\n ))}\n \n )\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html index 76fd2dae7..db93a6f60 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -348,8 +348,8 @@ window['DOCS_OPTIONS'] = {"defaultName":"Docs","autodocs":"tag"}; \ No newline at end of file + import './main.76fe5407.iframe.bundle.js'; \ No newline at end of file diff --git a/docs/main.27cd4f3d.iframe.bundle.js b/docs/main.76fe5407.iframe.bundle.js similarity index 91% rename from docs/main.27cd4f3d.iframe.bundle.js rename to docs/main.76fe5407.iframe.bundle.js index 658b7e75d..d072713da 100644 --- a/docs/main.27cd4f3d.iframe.bundle.js +++ b/docs/main.76fe5407.iframe.bundle.js @@ -1,4 +1,4 @@ -(self.webpackChunkposthog=self.webpackChunkposthog||[]).push([[40179],{"./frontend/src lazy recursive ^\\.\\/.*$ include: (?:\\/frontend\\/src(?:\\/(?%21\\.)(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/%7C\\/%7C$)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx%7Cmdx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./exporter/Exporter.stories":["./frontend/src/exporter/Exporter.stories.tsx",18146,53342,85564,26299,74653,89245],"./exporter/Exporter.stories.tsx":["./frontend/src/exporter/Exporter.stories.tsx",18146,53342,85564,26299,74653,89245],"./layout/ErrorProjectUnavailable.stories":["./frontend/src/layout/ErrorProjectUnavailable.stories.tsx",89716],"./layout/ErrorProjectUnavailable.stories.tsx":["./frontend/src/layout/ErrorProjectUnavailable.stories.tsx",89716],"./layout/FeaturePreviews/FeaturePreviews.stories":["./frontend/src/layout/FeaturePreviews/FeaturePreviews.stories.tsx",57578],"./layout/FeaturePreviews/FeaturePreviews.stories.tsx":["./frontend/src/layout/FeaturePreviews/FeaturePreviews.stories.tsx",57578],"./layout/navigation-3000/Navigation.stories":["./frontend/src/layout/navigation-3000/Navigation.stories.tsx",29749,36125],"./layout/navigation-3000/Navigation.stories.tsx":["./frontend/src/layout/navigation-3000/Navigation.stories.tsx",29749,36125],"./layout/navigation-3000/components/KeyboardShortcut.stories":["./frontend/src/layout/navigation-3000/components/KeyboardShortcut.stories.tsx",39298],"./layout/navigation-3000/components/KeyboardShortcut.stories.tsx":["./frontend/src/layout/navigation-3000/components/KeyboardShortcut.stories.tsx",39298],"./layout/navigation-3000/components/Sidebar.stories":["./frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx",43847],"./layout/navigation-3000/components/Sidebar.stories.tsx":["./frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx",43847],"./layout/navigation-3000/sidepanel/SidePanel.stories":["./frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx",67197],"./layout/navigation-3000/sidepanel/SidePanel.stories.tsx":["./frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx",67197],"./lib/components/ActivityLog/ActivityLog.stories":["./frontend/src/lib/components/ActivityLog/ActivityLog.stories.tsx",94831],"./lib/components/ActivityLog/ActivityLog.stories.tsx":["./frontend/src/lib/components/ActivityLog/ActivityLog.stories.tsx",94831],"./lib/components/ActivityLog/SentenceList.stories":["./frontend/src/lib/components/ActivityLog/SentenceList.stories.tsx",92223],"./lib/components/ActivityLog/SentenceList.stories.tsx":["./frontend/src/lib/components/ActivityLog/SentenceList.stories.tsx",92223],"./lib/components/Animation/Animation.stories":["./frontend/src/lib/components/Animation/Animation.stories.tsx",85566],"./lib/components/Animation/Animation.stories.tsx":["./frontend/src/lib/components/Animation/Animation.stories.tsx",85566],"./lib/components/Cards/InsightCard/InsightCard.stories":["./frontend/src/lib/components/Cards/InsightCard/InsightCard.stories.tsx",18146,85564,23407],"./lib/components/Cards/InsightCard/InsightCard.stories.tsx":["./frontend/src/lib/components/Cards/InsightCard/InsightCard.stories.tsx",18146,85564,23407],"./lib/components/Cards/InsightCard/InsightDetails.stories":["./frontend/src/lib/components/Cards/InsightCard/InsightDetails.stories.tsx",18146,85564,71831],"./lib/components/Cards/InsightCard/InsightDetails.stories.tsx":["./frontend/src/lib/components/Cards/InsightCard/InsightDetails.stories.tsx",18146,85564,71831],"./lib/components/Cards/TextCard/TextCard.stories":["./frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx",2543],"./lib/components/Cards/TextCard/TextCard.stories.tsx":["./frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx",2543],"./lib/components/CodeSnippet/CodeSnippet.stories":["./frontend/src/lib/components/CodeSnippet/CodeSnippet.stories.tsx",90346],"./lib/components/CodeSnippet/CodeSnippet.stories.tsx":["./frontend/src/lib/components/CodeSnippet/CodeSnippet.stories.tsx",90346],"./lib/components/CommandBar/CommandBar.stories":["./frontend/src/lib/components/CommandBar/CommandBar.stories.tsx",75110],"./lib/components/CommandBar/CommandBar.stories.tsx":["./frontend/src/lib/components/CommandBar/CommandBar.stories.tsx",75110],"./lib/components/CompactList/CompactList.stories":["./frontend/src/lib/components/CompactList/CompactList.stories.tsx",30444],"./lib/components/CompactList/CompactList.stories.tsx":["./frontend/src/lib/components/CompactList/CompactList.stories.tsx",30444],"./lib/components/EditableField/EditableField.stories":["./frontend/src/lib/components/EditableField/EditableField.stories.tsx",6319],"./lib/components/EditableField/EditableField.stories.tsx":["./frontend/src/lib/components/EditableField/EditableField.stories.tsx",6319],"./lib/components/EmptyMessage/EmptyMessage.stories":["./frontend/src/lib/components/EmptyMessage/EmptyMessage.stories.tsx",78095],"./lib/components/EmptyMessage/EmptyMessage.stories.tsx":["./frontend/src/lib/components/EmptyMessage/EmptyMessage.stories.tsx",78095],"./lib/components/Errors/ErrorDisplay.stories":["./frontend/src/lib/components/Errors/ErrorDisplay.stories.tsx",73949],"./lib/components/Errors/ErrorDisplay.stories.tsx":["./frontend/src/lib/components/Errors/ErrorDisplay.stories.tsx",73949],"./lib/components/EventSelect/EventSelect.stories":["./frontend/src/lib/components/EventSelect/EventSelect.stories.tsx",96062],"./lib/components/EventSelect/EventSelect.stories.tsx":["./frontend/src/lib/components/EventSelect/EventSelect.stories.tsx",96062],"./lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories":["./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx",59545],"./lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx":["./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx",59545],"./lib/components/HedgehogBuddy/HedgehogBuddy.stories":["./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx",46460],"./lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx":["./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx",46460],"./lib/components/HogQLEditor/HogQLEditor.stories":["./frontend/src/lib/components/HogQLEditor/HogQLEditor.stories.tsx",23398],"./lib/components/HogQLEditor/HogQLEditor.stories.tsx":["./frontend/src/lib/components/HogQLEditor/HogQLEditor.stories.tsx",23398],"./lib/components/Hogfetti/Hogfetti.stories":["./frontend/src/lib/components/Hogfetti/Hogfetti.stories.tsx",986],"./lib/components/Hogfetti/Hogfetti.stories.tsx":["./frontend/src/lib/components/Hogfetti/Hogfetti.stories.tsx",986],"./lib/components/Map/Map.stories":["./frontend/src/lib/components/Map/Map.stories.tsx",91175],"./lib/components/Map/Map.stories.tsx":["./frontend/src/lib/components/Map/Map.stories.tsx",91175],"./lib/components/NotFound/NotFound.stories":["./frontend/src/lib/components/NotFound/NotFound.stories.tsx",32146],"./lib/components/NotFound/NotFound.stories.tsx":["./frontend/src/lib/components/NotFound/NotFound.stories.tsx",32146],"./lib/components/ObjectTags/ObjectTags.stories":["./frontend/src/lib/components/ObjectTags/ObjectTags.stories.tsx",88082],"./lib/components/ObjectTags/ObjectTags.stories.tsx":["./frontend/src/lib/components/ObjectTags/ObjectTags.stories.tsx",88082],"./lib/components/PathCleanFilters/PathCleanFilters.stories":["./frontend/src/lib/components/PathCleanFilters/PathCleanFilters.stories.tsx",68097],"./lib/components/PathCleanFilters/PathCleanFilters.stories.tsx":["./frontend/src/lib/components/PathCleanFilters/PathCleanFilters.stories.tsx",68097],"./lib/components/PayGateMini/PayGateMini.stories":["./frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx",6875,15773],"./lib/components/PayGateMini/PayGateMini.stories.tsx":["./frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx",6875,15773],"./lib/components/Playlist/Playlist.stories":["./frontend/src/lib/components/Playlist/Playlist.stories.tsx",11923],"./lib/components/Playlist/Playlist.stories.tsx":["./frontend/src/lib/components/Playlist/Playlist.stories.tsx",11923],"./lib/components/ProductIntroduction/ProductIntroduction.stories":["./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.stories.tsx",87111],"./lib/components/ProductIntroduction/ProductIntroduction.stories.tsx":["./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.stories.tsx",87111],"./lib/components/PropertiesTable/PropertiesTable.stories":["./frontend/src/lib/components/PropertiesTable/PropertiesTable.stories.tsx",10057],"./lib/components/PropertiesTable/PropertiesTable.stories.tsx":["./frontend/src/lib/components/PropertiesTable/PropertiesTable.stories.tsx",10057],"./lib/components/PropertiesTimeline/PropertiesTimeline.stories":["./frontend/src/lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx",39127],"./lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx":["./frontend/src/lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx",39127],"./lib/components/PropertyFilters/PropertyFilters.stories":["./frontend/src/lib/components/PropertyFilters/PropertyFilters.stories.tsx",85205],"./lib/components/PropertyFilters/PropertyFilters.stories.tsx":["./frontend/src/lib/components/PropertyFilters/PropertyFilters.stories.tsx",85205],"./lib/components/PropertyFilters/components/OperatorValueSelect.stories":["./frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx",24792],"./lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx":["./frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx",24792],"./lib/components/PropertyFilters/components/PropertyFilterButton.stories":["./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx",59931],"./lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx":["./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx",59931],"./lib/components/PropertyIcon.stories":["./frontend/src/lib/components/PropertyIcon.stories.tsx",99387],"./lib/components/PropertyIcon.stories.tsx":["./frontend/src/lib/components/PropertyIcon.stories.tsx",99387],"./lib/components/PropertyKeyInfo.stories":["./frontend/src/lib/components/PropertyKeyInfo.stories.tsx",60665],"./lib/components/PropertyKeyInfo.stories.tsx":["./frontend/src/lib/components/PropertyKeyInfo.stories.tsx",60665],"./lib/components/PropertySelect/PropertySelect.stories":["./frontend/src/lib/components/PropertySelect/PropertySelect.stories.tsx",92176],"./lib/components/PropertySelect/PropertySelect.stories.tsx":["./frontend/src/lib/components/PropertySelect/PropertySelect.stories.tsx",92176],"./lib/components/ScrollableShadows/ScrollableShadows.stories":["./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.stories.tsx",2313],"./lib/components/ScrollableShadows/ScrollableShadows.stories.tsx":["./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.stories.tsx",2313],"./lib/components/Sharing/SharingModal.stories":["./frontend/src/lib/components/Sharing/SharingModal.stories.tsx",40722],"./lib/components/Sharing/SharingModal.stories.tsx":["./frontend/src/lib/components/Sharing/SharingModal.stories.tsx",40722],"./lib/components/Subscriptions/SubscriptionsModal.stories":["./frontend/src/lib/components/Subscriptions/SubscriptionsModal.stories.tsx",25733],"./lib/components/Subscriptions/SubscriptionsModal.stories.tsx":["./frontend/src/lib/components/Subscriptions/SubscriptionsModal.stories.tsx",25733],"./lib/components/TZLabel/TZLabel.stories":["./frontend/src/lib/components/TZLabel/TZLabel.stories.tsx",68987],"./lib/components/TZLabel/TZLabel.stories.tsx":["./frontend/src/lib/components/TZLabel/TZLabel.stories.tsx",68987],"./lib/components/TaxonomicFilter/TaxonomicFilter.stories":["./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx",47124],"./lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx":["./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx",47124],"./lib/components/TaxonomicPopover/TaxonomicPopover.stories":["./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx",18373],"./lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx":["./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx",18373],"./lib/components/UniversalFilters/UniversalFilters.stories":["./frontend/src/lib/components/UniversalFilters/UniversalFilters.stories.tsx",95858],"./lib/components/UniversalFilters/UniversalFilters.stories.tsx":["./frontend/src/lib/components/UniversalFilters/UniversalFilters.stories.tsx",95858],"./lib/components/VerticalNestedDND/VerticalNestedDND.stories":["./frontend/src/lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx",8771],"./lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx":["./frontend/src/lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx",8771],"./lib/components/hedgehogs.stories":["./frontend/src/lib/components/hedgehogs.stories.tsx",63833],"./lib/components/hedgehogs.stories.tsx":["./frontend/src/lib/components/hedgehogs.stories.tsx",63833],"./lib/lemon-ui/LemonBadge/LemonBadge.stories":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx",28308],"./lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx",28308],"./lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx",15545],"./lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx",15545],"./lib/lemon-ui/LemonBanner/LemonBanner.stories":["./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx",55409],"./lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx",55409],"./lib/lemon-ui/LemonButton/LemonButton.stories":["./frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx",90001],"./lib/lemon-ui/LemonButton/LemonButton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx",90001],"./lib/lemon-ui/LemonCalendar/LemonCalendar.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx",33214],"./lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx",33214],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx",72281],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx",72281],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx",1094],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx",1094],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx",86910],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx",86910],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx",85903],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx",85903],"./lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories":["./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx",38597],"./lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx",38597],"./lib/lemon-ui/LemonCollapse/LemonCollapse.stories":["./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx",50339],"./lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx",50339],"./lib/lemon-ui/LemonDialog/LemonDialog.stories":["./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx",39513],"./lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx":["./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx",39513],"./lib/lemon-ui/LemonDivider/LemonDivider.stories":["./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx",58168],"./lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx":["./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx",58168],"./lib/lemon-ui/LemonField/LemonField.stories":["./frontend/src/lib/lemon-ui/LemonField/LemonField.stories.tsx",7422],"./lib/lemon-ui/LemonField/LemonField.stories.tsx":["./frontend/src/lib/lemon-ui/LemonField/LemonField.stories.tsx",7422],"./lib/lemon-ui/LemonFileInput/LemonFileInput.stories":["./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx",53617],"./lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx",53617],"./lib/lemon-ui/LemonInput/LemonInput.stories":["./frontend/src/lib/lemon-ui/LemonInput/LemonInput.stories.tsx",55394],"./lib/lemon-ui/LemonInput/LemonInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonInput/LemonInput.stories.tsx",55394],"./lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories":["./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx",10223],"./lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx",10223],"./lib/lemon-ui/LemonLabel/LemonLabel.stories":["./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx",60518],"./lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx":["./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx",60518],"./lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories":["./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx",29456],"./lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx":["./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx",29456],"./lib/lemon-ui/LemonMenu/LemonMenu.stories":["./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx",95844],"./lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx":["./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx",95844],"./lib/lemon-ui/LemonModal/LemonModal.stories":["./frontend/src/lib/lemon-ui/LemonModal/LemonModal.stories.tsx",66646],"./lib/lemon-ui/LemonModal/LemonModal.stories.tsx":["./frontend/src/lib/lemon-ui/LemonModal/LemonModal.stories.tsx",66646],"./lib/lemon-ui/LemonProgress/LemonProgress.stories":["./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx",52375],"./lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx":["./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx",52375],"./lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories":["./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx",16498],"./lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx":["./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx",16498],"./lib/lemon-ui/LemonRadio/LemonRadio.stories":["./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx",2677],"./lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx":["./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx",2677],"./lib/lemon-ui/LemonRow/LemonRow.stories":["./frontend/src/lib/lemon-ui/LemonRow/LemonRow.stories.tsx",23708],"./lib/lemon-ui/LemonRow/LemonRow.stories.tsx":["./frontend/src/lib/lemon-ui/LemonRow/LemonRow.stories.tsx",23708],"./lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories":["./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx",78334],"./lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx",78334],"./lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories":["./frontend/src/lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx",21226],"./lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx",21226],"./lib/lemon-ui/LemonSelect/LemonSelect.stories":["./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx",57354],"./lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx",57354],"./lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories":["./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx",56428],"./lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx",56428],"./lib/lemon-ui/LemonSlider/LemonSlider.stories":["./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx",51554],"./lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx",51554],"./lib/lemon-ui/LemonSnack/LemonSnack.stories":["./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx",64014],"./lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx",64014],"./lib/lemon-ui/LemonSwitch/LemonSwitch.stories":["./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx",80844],"./lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx",80844],"./lib/lemon-ui/LemonTable/LemonTable.stories":["./frontend/src/lib/lemon-ui/LemonTable/LemonTable.stories.tsx",12398],"./lib/lemon-ui/LemonTable/LemonTable.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTable/LemonTable.stories.tsx",12398],"./lib/lemon-ui/LemonTabs/LemonTabs.stories":["./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx",82821],"./lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx",82821],"./lib/lemon-ui/LemonTag/LemonTag.stories":["./frontend/src/lib/lemon-ui/LemonTag/LemonTag.stories.tsx",81809],"./lib/lemon-ui/LemonTag/LemonTag.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTag/LemonTag.stories.tsx",81809],"./lib/lemon-ui/LemonTextArea/LemonTextArea.stories":["./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx",19801],"./lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx",19801],"./lib/lemon-ui/LemonToast/LemonToast.stories":["./frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx",50962],"./lib/lemon-ui/LemonToast/LemonToast.stories.tsx":["./frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx",50962],"./lib/lemon-ui/Lettermark/Lettermark.stories":["./frontend/src/lib/lemon-ui/Lettermark/Lettermark.stories.tsx",74973],"./lib/lemon-ui/Lettermark/Lettermark.stories.tsx":["./frontend/src/lib/lemon-ui/Lettermark/Lettermark.stories.tsx",74973],"./lib/lemon-ui/Link/Link.stories":["./frontend/src/lib/lemon-ui/Link/Link.stories.tsx",69106],"./lib/lemon-ui/Link/Link.stories.tsx":["./frontend/src/lib/lemon-ui/Link/Link.stories.tsx",69106],"./lib/lemon-ui/PaginationControl/PaginationControl.stories":["./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx",18587],"./lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx":["./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx",18587],"./lib/lemon-ui/Popover/Popover.stories":["./frontend/src/lib/lemon-ui/Popover/Popover.stories.tsx",28089],"./lib/lemon-ui/Popover/Popover.stories.tsx":["./frontend/src/lib/lemon-ui/Popover/Popover.stories.tsx",28089],"./lib/lemon-ui/ProfilePicture/ProfileBubbles.stories":["./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx",48379],"./lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx":["./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx",48379],"./lib/lemon-ui/Spinner/Spinner.stories":["./frontend/src/lib/lemon-ui/Spinner/Spinner.stories.tsx",92168],"./lib/lemon-ui/Spinner/Spinner.stories.tsx":["./frontend/src/lib/lemon-ui/Spinner/Spinner.stories.tsx",92168],"./lib/lemon-ui/Splotch/Splotch.stories":["./frontend/src/lib/lemon-ui/Splotch/Splotch.stories.tsx",14989],"./lib/lemon-ui/Splotch/Splotch.stories.tsx":["./frontend/src/lib/lemon-ui/Splotch/Splotch.stories.tsx",14989],"./lib/lemon-ui/UploadedLogo/UploadedLogo.stories":["./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx",24378],"./lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx":["./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx",24378],"./lib/lemon-ui/colors.stories":["./frontend/src/lib/lemon-ui/colors.stories.tsx",57297],"./lib/lemon-ui/colors.stories.tsx":["./frontend/src/lib/lemon-ui/colors.stories.tsx",57297],"./lib/lemon-ui/icons/icons.stories":["./frontend/src/lib/lemon-ui/icons/icons.stories.tsx",28462],"./lib/lemon-ui/icons/icons.stories.tsx":["./frontend/src/lib/lemon-ui/icons/icons.stories.tsx",28462],"./lib/lemon-ui/icons/icons3000.stories":["./frontend/src/lib/lemon-ui/icons/icons3000.stories.tsx",77309],"./lib/lemon-ui/icons/icons3000.stories.tsx":["./frontend/src/lib/lemon-ui/icons/icons3000.stories.tsx",77309],"./queries/nodes/DataNode/DataNode.stories":["./frontend/src/queries/nodes/DataNode/DataNode.stories.tsx",89290,71059],"./queries/nodes/DataNode/DataNode.stories.tsx":["./frontend/src/queries/nodes/DataNode/DataNode.stories.tsx",89290,71059],"./queries/nodes/DataTable/DataTable.stories":["./frontend/src/queries/nodes/DataTable/DataTable.stories.tsx",89290,44214],"./queries/nodes/DataTable/DataTable.stories.tsx":["./frontend/src/queries/nodes/DataTable/DataTable.stories.tsx",89290,44214],"./queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories":["./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx",48419],"./queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx":["./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx",48419],"./scenes/PreflightCheck/PreflightCheck.stories":["./frontend/src/scenes/PreflightCheck/PreflightCheck.stories.tsx",38396],"./scenes/PreflightCheck/PreflightCheck.stories.tsx":["./frontend/src/scenes/PreflightCheck/PreflightCheck.stories.tsx",38396],"./scenes/Unsubscribe/Unsubscribe.stories":["./frontend/src/scenes/Unsubscribe/Unsubscribe.stories.tsx",14047],"./scenes/Unsubscribe/Unsubscribe.stories.tsx":["./frontend/src/scenes/Unsubscribe/Unsubscribe.stories.tsx",14047],"./scenes/actions/Action.stories":["./frontend/src/scenes/actions/Action.stories.tsx",92412],"./scenes/actions/Action.stories.tsx":["./frontend/src/scenes/actions/Action.stories.tsx",92412],"./scenes/activity/explore/Events.stories":["./frontend/src/scenes/activity/explore/Events.stories.tsx",23046],"./scenes/activity/explore/Events.stories.tsx":["./frontend/src/scenes/activity/explore/Events.stories.tsx",23046],"./scenes/annotations/Annotations.stories":["./frontend/src/scenes/annotations/Annotations.stories.tsx",87121],"./scenes/annotations/Annotations.stories.tsx":["./frontend/src/scenes/annotations/Annotations.stories.tsx",87121],"./scenes/authentication/InviteSignup.stories":["./frontend/src/scenes/authentication/InviteSignup.stories.tsx",41694],"./scenes/authentication/InviteSignup.stories.tsx":["./frontend/src/scenes/authentication/InviteSignup.stories.tsx",41694],"./scenes/authentication/Login.stories":["./frontend/src/scenes/authentication/Login.stories.tsx",60711],"./scenes/authentication/Login.stories.tsx":["./frontend/src/scenes/authentication/Login.stories.tsx",60711],"./scenes/authentication/PasswordReset.stories":["./frontend/src/scenes/authentication/PasswordReset.stories.tsx",16680],"./scenes/authentication/PasswordReset.stories.tsx":["./frontend/src/scenes/authentication/PasswordReset.stories.tsx",16680],"./scenes/authentication/PasswordResetComplete.stories":["./frontend/src/scenes/authentication/PasswordResetComplete.stories.tsx",46925],"./scenes/authentication/PasswordResetComplete.stories.tsx":["./frontend/src/scenes/authentication/PasswordResetComplete.stories.tsx",46925],"./scenes/authentication/signup/Signup.stories":["./frontend/src/scenes/authentication/signup/Signup.stories.tsx",11854],"./scenes/authentication/signup/Signup.stories.tsx":["./frontend/src/scenes/authentication/signup/Signup.stories.tsx",11854],"./scenes/authentication/signup/verify-email/VerifyEmail.stories":["./frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx",9416],"./scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx":["./frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx",9416],"./scenes/billing/Billing.stories":["./frontend/src/scenes/billing/Billing.stories.tsx",32375],"./scenes/billing/Billing.stories.tsx":["./frontend/src/scenes/billing/Billing.stories.tsx",32375],"./scenes/billing/BillingProduct.stories":["./frontend/src/scenes/billing/BillingProduct.stories.tsx",22244],"./scenes/billing/BillingProduct.stories.tsx":["./frontend/src/scenes/billing/BillingProduct.stories.tsx",22244],"./scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx",31340],"./scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx",31340],"./scenes/cohorts/CohortFilters/CohortNumberField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx",91736],"./scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx",91736],"./scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx",79799],"./scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx",79799],"./scenes/cohorts/CohortFilters/CohortSelectorField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx",36795],"./scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx",36795],"./scenes/cohorts/CohortFilters/CohortTaxonomicField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx",97562],"./scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx",97562],"./scenes/cohorts/CohortFilters/CohortTextField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortTextField.stories.tsx",29179],"./scenes/cohorts/CohortFilters/CohortTextField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortTextField.stories.tsx",29179],"./scenes/dashboard/DashboardInsightCardLegend.stories":["./frontend/src/scenes/dashboard/DashboardInsightCardLegend.stories.tsx",48780],"./scenes/dashboard/DashboardInsightCardLegend.stories.tsx":["./frontend/src/scenes/dashboard/DashboardInsightCardLegend.stories.tsx",48780],"./scenes/dashboard/DashboardTemplateEditor.stories":["./frontend/src/scenes/dashboard/DashboardTemplateEditor.stories.tsx",47858],"./scenes/dashboard/DashboardTemplateEditor.stories.tsx":["./frontend/src/scenes/dashboard/DashboardTemplateEditor.stories.tsx",47858],"./scenes/dashboard/Dashboards.stories":["./frontend/src/scenes/dashboard/Dashboards.stories.tsx",29749,84851],"./scenes/dashboard/Dashboards.stories.tsx":["./frontend/src/scenes/dashboard/Dashboards.stories.tsx",29749,84851],"./scenes/data-management/DataManagementScene.stories":["./frontend/src/scenes/data-management/DataManagementScene.stories.tsx",82250],"./scenes/data-management/DataManagementScene.stories.tsx":["./frontend/src/scenes/data-management/DataManagementScene.stories.tsx",82250],"./scenes/early-access-features/EarlyAccessFeatures.stories":["./frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx",57195],"./scenes/early-access-features/EarlyAccessFeatures.stories.tsx":["./frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx",57195],"./scenes/error-tracking/ErrorTracking.stories":["./frontend/src/scenes/error-tracking/ErrorTracking.stories.tsx",91480],"./scenes/error-tracking/ErrorTracking.stories.tsx":["./frontend/src/scenes/error-tracking/ErrorTracking.stories.tsx",91480],"./scenes/feature-flags/FeatureFlagCodeInstructions.stories":["./frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx",86983],"./scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx":["./frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx",86983],"./scenes/feature-flags/FeatureFlags.stories":["./frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx",16023],"./scenes/feature-flags/FeatureFlags.stories.tsx":["./frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx",16023],"./scenes/funnels/FunnelTooltip.stories":["./frontend/src/scenes/funnels/FunnelTooltip.stories.tsx",49136],"./scenes/funnels/FunnelTooltip.stories.tsx":["./frontend/src/scenes/funnels/FunnelTooltip.stories.tsx",49136],"./scenes/heatmaps/HeatmapsBrowser.stories":["./frontend/src/scenes/heatmaps/HeatmapsBrowser.stories.tsx",86721],"./scenes/heatmaps/HeatmapsBrowser.stories.tsx":["./frontend/src/scenes/heatmaps/HeatmapsBrowser.stories.tsx",86721],"./scenes/insights/EmptyStates/EmptyStates.stories":["./frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx",17723],"./scenes/insights/EmptyStates/EmptyStates.stories.tsx":["./frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx",17723],"./scenes/insights/InsightTooltip/InsightTooltip.stories":["./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.stories.tsx",40961],"./scenes/insights/InsightTooltip/InsightTooltip.stories.tsx":["./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.stories.tsx",40961],"./scenes/insights/Insights.stories":["./frontend/src/scenes/insights/Insights.stories.tsx",18146,53342,26299,74653,15778],"./scenes/insights/Insights.stories.tsx":["./frontend/src/scenes/insights/Insights.stories.tsx",18146,53342,26299,74653,15778],"./scenes/insights/filters/ActionFilter/ActionFilter.stories":["./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx",53342,6396],"./scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx":["./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx",53342,6396],"./scenes/insights/views/BoldNumber/Textfit.stories":["./frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx",5180],"./scenes/insights/views/BoldNumber/Textfit.stories.tsx":["./frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx",5180],"./scenes/insights/views/Funnels/FunnelCorrelationTable.stories":["./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx",16495],"./scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx":["./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx",16495],"./scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories":["./frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx",38639],"./scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx":["./frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx",38639],"./scenes/insights/views/InsightsTable/InsightsTable.stories":["./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.stories.tsx",53342,50991],"./scenes/insights/views/InsightsTable/InsightsTable.stories.tsx":["./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.stories.tsx",53342,50991],"./scenes/max/Max.stories":["./frontend/src/scenes/max/Max.stories.tsx",73086],"./scenes/max/Max.stories.tsx":["./frontend/src/scenes/max/Max.stories.tsx",73086],"./scenes/notebooks/Notebook/Notebook.stories":["./frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx",1808],"./scenes/notebooks/Notebook/Notebook.stories.tsx":["./frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx",1808],"./scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories":["./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx",93070],"./scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx":["./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx",93070],"./scenes/onboarding/Onboarding.stories":["./frontend/src/scenes/onboarding/Onboarding.stories.tsx",6875,36501],"./scenes/onboarding/Onboarding.stories.tsx":["./frontend/src/scenes/onboarding/Onboarding.stories.tsx",6875,36501],"./scenes/persons-management/PersonsManagementScene.stories":["./frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx",68330],"./scenes/persons-management/PersonsManagementScene.stories.tsx":["./frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx",68330],"./scenes/pipeline/Pipeline.stories":["./frontend/src/scenes/pipeline/Pipeline.stories.tsx",92991],"./scenes/pipeline/Pipeline.stories.tsx":["./frontend/src/scenes/pipeline/Pipeline.stories.tsx",92991],"./scenes/products/Products.stories":["./frontend/src/scenes/products/Products.stories.tsx",16116],"./scenes/products/Products.stories.tsx":["./frontend/src/scenes/products/Products.stories.tsx",16116],"./scenes/project-homepage/ProjectHomepage.stories":["./frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx",29749,82723],"./scenes/project-homepage/ProjectHomepage.stories.tsx":["./frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx",29749,82723],"./scenes/project-homepage/WatchNextList.stories":["./frontend/src/scenes/project-homepage/WatchNextList.stories.tsx",52425],"./scenes/project-homepage/WatchNextList.stories.tsx":["./frontend/src/scenes/project-homepage/WatchNextList.stories.tsx",52425],"./scenes/saved-insights/SavedInsights.stories":["./frontend/src/scenes/saved-insights/SavedInsights.stories.tsx",26299,26657],"./scenes/saved-insights/SavedInsights.stories.tsx":["./frontend/src/scenes/saved-insights/SavedInsights.stories.tsx",26299,26657],"./scenes/session-recordings/SessionsRecordings-player-failure.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx",23237,34377],"./scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx",23237,34377],"./scenes/session-recordings/SessionsRecordings-player-success.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx",23237,38383],"./scenes/session-recordings/SessionsRecordings-player-success.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx",23237,38383],"./scenes/session-recordings/SessionsRecordings-playlist-listing.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx",70138],"./scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx",70138],"./scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories":["./frontend/src/scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx",739],"./scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx":["./frontend/src/scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx",739],"./scenes/session-recordings/player/inspector/PlayerInspector.stories":["./frontend/src/scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx",9111],"./scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx",9111],"./scenes/session-recordings/player/inspector/components/ItemComment.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx",70904],"./scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx",70904],"./scenes/session-recordings/player/inspector/components/ItemEvent.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx",69269],"./scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx",69269],"./scenes/session-recordings/player/inspector/components/NavigationItem.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx",98065],"./scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx",98065],"./scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx",16115],"./scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx",16115],"./scenes/session-recordings/playlist/SessionRecordingPreview.stories":["./frontend/src/scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx",74710],"./scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx":["./frontend/src/scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx",74710],"./scenes/settings/SettingsScene.stories":["./frontend/src/scenes/settings/SettingsScene.stories.tsx",94678],"./scenes/settings/SettingsScene.stories.tsx":["./frontend/src/scenes/settings/SettingsScene.stories.tsx",94678],"./scenes/settings/environment/SlackIntegration.stories":["./frontend/src/scenes/settings/environment/SlackIntegration.stories.tsx",71251],"./scenes/settings/environment/SlackIntegration.stories.tsx":["./frontend/src/scenes/settings/environment/SlackIntegration.stories.tsx",71251],"./scenes/settings/organization/Invites.stories":["./frontend/src/scenes/settings/organization/Invites.stories.tsx",72134],"./scenes/settings/organization/Invites.stories.tsx":["./frontend/src/scenes/settings/organization/Invites.stories.tsx",72134],"./scenes/settings/organization/VerifiedDomains/SSOSelect.stories":["./frontend/src/scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx",69700],"./scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx":["./frontend/src/scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx",69700],"./scenes/surveys/Surveys.stories":["./frontend/src/scenes/surveys/Surveys.stories.tsx",10749],"./scenes/surveys/Surveys.stories.tsx":["./frontend/src/scenes/surveys/Surveys.stories.tsx",10749],"./scenes/trends/persons-modal/PersonsModal.stories":["./frontend/src/scenes/trends/persons-modal/PersonsModal.stories.tsx",95866],"./scenes/trends/persons-modal/PersonsModal.stories.tsx":["./frontend/src/scenes/trends/persons-modal/PersonsModal.stories.tsx",95866],"./scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories":["./frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx",59001],"./scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx":["./frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx",59001],"./stories/Hello.stories.mdx":["./frontend/src/stories/Hello.stories.mdx",20527],"./stories/How to add tabs to a scene.stories.mdx":["./frontend/src/stories/How to add tabs to a scene.stories.mdx",8056],"./stories/How to build a form.stories.mdx":["./frontend/src/stories/How to build a form.stories.mdx",92029],"./stories/How to build a scene.stories.mdx":["./frontend/src/stories/How to build a scene.stories.mdx",73570],"./stories/How to create stories.stories.mdx":["./frontend/src/stories/How to create stories.stories.mdx",17549],"./stories/How to mock requests.stories.mdx":["./frontend/src/stories/How to mock requests.stories.mdx",79960],"./stories/How to use components.stories.mdx":["./frontend/src/stories/How to use components.stories.mdx",23384],"./stories/Lemon UI.stories.mdx":["./frontend/src/stories/Lemon UI.stories.mdx",32728],"./stories/Missing components.stories.mdx":["./frontend/src/stories/Missing components.stories.mdx",43342],"./stories/Missing scenes.stories.mdx":["./frontend/src/stories/Missing scenes.stories.mdx",40892],"./toolbar/Toolbar.stories":["./frontend/src/toolbar/Toolbar.stories.tsx",19651,75576,45021],"./toolbar/Toolbar.stories.tsx":["./frontend/src/toolbar/Toolbar.stories.tsx",19651,75576,45021]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then(()=>{var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e});var ids=map[req],id=ids[0];return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(()=>__webpack_require__(id))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./frontend/src lazy recursive ^\\.\\/.*$ include: (?:\\/frontend\\/src(?:\\/(?%21\\.)(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/%7C\\/%7C$)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx%7Cmdx))$",module.exports=webpackAsyncContext},"./.storybook/preview.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{decorators:()=>decorators,default:()=>_storybook_preview,parameters:()=>parameters}),__webpack_require__("./frontend/src/styles/index.tsx");var config,dist=__webpack_require__("./node_modules/.pnpm/@storybook+blocks@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/blocks/dist/index.mjs"),browser=__webpack_require__("./frontend/src/mocks/browser.tsx"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),sdk=__webpack_require__("./node_modules/.pnpm/@sentry+react@7.112.1_react@18.2.0/node_modules/@sentry/react/esm/sdk.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),features=__webpack_require__("./frontend/src/mocks/features.ts"),node_modules_history=__webpack_require__("./node_modules/.pnpm/history@5.3.0/node_modules/history/index.js"),initKea=__webpack_require__("./frontend/src/initKea.ts"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),App=__webpack_require__("./frontend/src/scenes/App.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function KeaStory(_ref){let{children}=_ref,[didReset,setDidReset]=(0,react.useState)(!1);return(0,react.useEffect)(()=>{didReset||(function(){browser.KK.resetHandlers();let history=(0,node_modules_history.PP)({});history.pushState=history.push,history.replaceState=history.replace,(0,initKea.J1)({routerLocation:history.location,routerHistory:history}),featureFlagLogic.h.mount(),teamLogic.H.mount(),projectLogic.K.mount(),userLogic.userLogic.mount(),lib.router.mount();let{store}=(0,index_esm.getContext)();store.dispatch({type:"storybook init"})}(),setDidReset(!0))},[didReset]),didReset?children||(0,jsx_runtime.jsx)(App.g,{}):null}var mockdate=__webpack_require__("./node_modules/.pnpm/mockdate@3.0.5/node_modules/mockdate/lib/mockdate.js"),mockdate_default=__webpack_require__.n(mockdate),handlers=__webpack_require__("./frontend/src/mocks/handlers.ts"),apiHost=__webpack_require__("./frontend/src/lib/utils/apiHost.ts"),api_mock=__webpack_require__("./frontend/src/lib/api.mock.ts");browser.KK.start({quiet:!0,onUnhandledRequest(request,print){["/images/"].some(path=>request.url.pathname.startsWith(path))||print.warning()}}),window.__mockServiceWorker=browser.KK,window.POSTHOG_APP_CONTEXT={anonymous:!1,current_team:api_mock.k3,current_project:api_mock.w8,current_user:void 0,default_event_name:"$pageview",persisted_feature_flags:[],commit_sha:void 0,preflight:null,switched_team:null},window.JS_POSTHOG_HOST=(0,apiHost.Y)(),window.JS_POSTHOG_API_KEY?dist_module.ZP.init(window.JS_POSTHOG_API_KEY,(config={opt_out_useragent_filter:"localhost"===window.location.hostname,api_host:window.JS_POSTHOG_HOST,ui_host:window.JS_POSTHOG_UI_HOST,rageclick:!0,persistence:"localStorage+cookie",bootstrap:window.POSTHOG_USER_IDENTITY_WITH_FLAGS?window.POSTHOG_USER_IDENTITY_WITH_FLAGS:{},opt_in_site_apps:!0,api_transport:"fetch",loaded:loadedInstance=>{loadedInstance.sessionRecording&&(loadedInstance.sessionRecording._forceAllowLocalhostNetworkCapture=!0),window.IMPERSONATED_SESSION?(loadedInstance.sessionManager?.resetSessionId(),loadedInstance.opt_out_capturing()):loadedInstance.opt_in_capturing();let Cypress=window.Cypress;Cypress&&Object.entries(Cypress.env()).forEach(_ref=>{let[key,value]=_ref;key.startsWith("POSTHOG_PROPERTY_")&&loadedInstance.register_for_session({[key.replace("POSTHOG_PROPERTY_","E2E_TESTING_").toLowerCase()]:value})});let shouldResetSessionOnLoad=loadedInstance.getFeatureFlag(constants.y8.SESSION_RESET_ON_LOAD);shouldResetSessionOnLoad&&loadedInstance.sessionManager?.resetSessionId(),window.posthog=loadedInstance},scroll_root_selector:["main","html"],autocapture:{capture_copied_text:!0},person_profiles:"always",__preview_remote_config:!0,_onCapture:window._cypress_posthog_captures?(_,event)=>window._cypress_posthog_captures.push(event):void 0},window.SENTRY_DSN&&(config.on_xhr_error=failedRequest=>{let status=failedRequest.status,statusText=failedRequest.statusText||"no status text in error";esm_exports.Tb(Error(`Failed with status ${status} while sending to PostHog. Message: ${statusText}`),{tags:{status,statusText}})}),config)):dist_module.ZP.init("fake token",{autocapture:!1,loaded:function(ph){ph.opt_out_capturing()}}),window.SENTRY_DSN&&sdk.S({dsn:window.SENTRY_DSN,environment:window.SENTRY_ENVIRONMENT,...location.host.includes("posthog.com")&&{integrations:[new dist_module.ZP.SentryIntegration(dist_module.ZP,"posthog",1899813,void 0,"*")]}});let parameters={actions:{argTypesRegex:"^on[A-Z].*",disabled:!0},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},options:{showPanel:!1,storySort:{method:"alphabetical",order:["Lemon UI",["Overview","Utilities","Icons"],"Components","Forms",["Field"],"Filters","Layout"]}},viewMode:"docs",docs:{source:{state:"closed"}},msw:{mocks:handlers.jI}},decorators=[Story=>((0,features.y)([]),(0,jsx_runtime.jsx)(KeaStory,{children:(0,jsx_runtime.jsx)(Story,{})})),(Story,_ref)=>{let{parameters}=_ref;return parameters.mockDate?mockdate_default().set(parameters.mockDate):mockdate_default().reset(),(0,jsx_runtime.jsx)(Story,{})},(Story,_ref)=>{let{parameters}=_ref;return parameters.featureFlags&&(0,browser.zt)(parameters.featureFlags),(0,jsx_runtime.jsx)(Story,{})},(Story,context)=>{let theme=context.globals.theme;return document.body.setAttribute("theme","dark"===theme?"dark":"light"),(0,jsx_runtime.jsx)(Story,{})}],_storybook_preview={parameters:{actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},docs:{page:()=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(dist.Dx,{}),(0,jsx_runtime.jsx)(dist.QE,{}),(0,jsx_runtime.jsx)(dist.dk,{}),(0,jsx_runtime.jsx)(dist.sq,{}),(0,jsx_runtime.jsx)(dist.ZX,{}),(0,jsx_runtime.jsx)(dist.fQ,{})]})}},globalTypes:{theme:{description:"",defaultValue:"light",toolbar:{title:"Theme",items:[{value:"light",icon:"sun",title:"Light"},{value:"dark",icon:"moon",title:"Dark"}],dynamicTitle:!0}}}}},"./frontend/@posthog/apps-common/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IZ:()=>scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__.I,Tk:()=>scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__.T,hi:()=>api,jk:()=>scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j,rU:()=>lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_2__.r,w4:()=>lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_3__.w}),__webpack_require__("./frontend/src/styles/index.tsx"),__webpack_require__("./frontend/src/initKea.ts");var lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/persons/PersonDisplay.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/urls.ts"),lib_api__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/api.ts");let api=lib_api__WEBPACK_IMPORTED_MODULE_6__.ZP},"./frontend/@posthog/lemon-ui/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mo:()=>LemonBadge.M,Vp:()=>LemonBanner.V,Jp:()=>lemon_ui_LemonButton.J,$K:()=>lemon_ui_LemonButton.$,bA:()=>LemonCalendarSelect.bA,he:()=>LemonCalendarSelect.he,Mi:()=>LemonCard.M,Hw:()=>LemonCheckbox.H,JL:()=>LemonCollapse.J,dn:()=>LemonDialog.d,p2:()=>LemonDivider.p,Qw:()=>LemonDropdown.Q,mH:()=>LemonFileInput.m,DF:()=>LemonInput.D,nt:()=>LemonInputSelect.n,HQ:()=>LemonLabel.H,d6:()=>LemonMenu.d,fQ:()=>LemonModal.f,Qs:()=>LemonRow.Q,P4:()=>LemonSegmentedButton.P,Yv:()=>LemonSelect.Yv,yW:()=>LemonSkeleton.y,LV:()=>LemonSnack.L,f4:()=>LemonSwitch.f,g3:()=>LemonTable.g,TP:()=>LemonTabs.T,oe:()=>LemonTag.o,_V:()=>LemonTextArea._,X7:()=>LemonTextArea.X,_j:()=>LemonWidget._,BR:()=>Lettermark.B,rU:()=>Link.r,R9:()=>PaginationControl.R,J2:()=>lemon_ui_Popover.J2,Sn:()=>lemon_ui_Popover.Sn,rw:()=>ProfilePicture.r,YY:()=>ProfilePicture.Y,$j:()=>Spinner.$,t2:()=>Spinner.t,u:()=>Tooltip.u,UJ:()=>LemonToast.U,h0:()=>PaginationControl.h}),__webpack_require__("./frontend/src/styles/global.scss"),__webpack_require__("./frontend/src/lib/lemon-ui/hooks.ts");var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonActionableTooltip=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonActionableTooltip/LemonActionableTooltip.scss"),LemonActionableTooltip_default=__webpack_require__.n(LemonActionableTooltip),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonActionableTooltip_default(),options),LemonActionableTooltip_default().locals,__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx"),__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");var LemonBadge=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/index.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),lemon_ui_LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts");__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx");var LemonCalendarSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.tsx");__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.tsx"),__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx");var LemonCard=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCard/LemonCard.tsx"),LemonCheckbox=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),LemonCollapse=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCollapse/index.ts"),LemonDialog=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/index.ts"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonDropdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDropdown/index.ts"),LemonFileInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonFileInput/index.ts"),LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/index.ts"),LemonLabel=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),LemonRow=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRow/index.ts"),LemonSegmentedButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSegmentedButton/index.ts"),LemonSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),LemonInputSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),LemonSnack=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSnack/index.ts"),LemonSwitch=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSwitch/index.ts"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/index.ts"),LemonTextArea=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/index.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/index.ts"),LemonWidget=__webpack_require__("./frontend/src/lib/lemon-ui/LemonWidget/index.ts"),Lettermark=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),PaginationControl=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/index.ts"),lemon_ui_Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts");__webpack_require__("./frontend/src/lib/lemon-ui/Splotch/index.ts");var Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts")},"./frontend/src/exporter/exporterViewLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>getCurrentExporterData,y:()=>exporterViewLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let exporterViewLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(()=>["scenes","exporter","exporterLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({exportedData:[()=>[(_,props)=>props],props=>props]}))]),getCurrentExporterData=()=>exporterViewLogic.findMounted()?.values.exportedData},"./frontend/src/initKea.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J1:()=>initKea});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_localstorage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-localstorage@3.1.0_kea@3.1.5/node_modules/kea-localstorage/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),kea_waitfor__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/kea-waitfor@0.2.1_kea@3.1.5/node_modules/kea-waitfor/lib/index.js"),kea_window_values__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/kea-window-values@3.0.0_kea@3.1.5/node_modules/kea-window-values/lib/index.js"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/utils/router-utils.ts");let ERROR_FILTER_ALLOW_LIST=["loadPreflight","loadUser","loadFunnels","authenticate","signup","loadLatestVersion","loadBilling","loadData","loadRecordingMeta"],loggerPlugin=()=>({name:"verbose-kea-logger",events:{beforeReduxStore(options){options.middleware.push(store=>next=>action=>{let response=next(action);return console.groupCollapsed("KEA LOGGER",action),console.log(store.getState()),console.groupEnd(),response})}}});function initKea(){let{routerHistory,routerLocation,beforePlugins}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},plugins=[...beforePlugins||[],(0,kea_localstorage__WEBPACK_IMPORTED_MODULE_3__.localStoragePlugin)(),(0,kea_window_values__WEBPACK_IMPORTED_MODULE_7__.windowValuesPlugin)({window:window}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.routerPlugin)({history:routerHistory,location:routerLocation,urlPatternOptions:{segmentValueCharset:"a-zA-Z0-9-_~ %.@()!'|"},pathFromRoutesToWindow:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.Jf)(path),transformPathInActions:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.Jf)(path),pathFromWindowToRoutes:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.sv)(path)}),kea_forms__WEBPACK_IMPORTED_MODULE_1__.formsPlugin,(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loadersPlugin)({onFailure(_ref){let{error,reducerKey,actionKey}=_ref;if(!ERROR_FILTER_ALLOW_LIST.includes(actionKey)&&error?.status!==void 0&&![200,201,204,401].includes(error.status)){let errorMessage=error.detail||error.statusText;errorMessage||404!==error.status||(errorMessage="URL not found"),errorMessage&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_8__.UJ.error(`${(0,lib_utils__WEBPACK_IMPORTED_MODULE_9__.UV)(actionKey)} failed: ${errorMessage}`)}console.error({error,reducerKey,actionKey}),window.Sentry?.captureException(error)}}),kea_subscriptions__WEBPACK_IMPORTED_MODULE_5__.nV,kea_waitfor__WEBPACK_IMPORTED_MODULE_6__.waitForPlugin];(window.JS_KEA_VERBOSE_LOGGING||"localStorage"in window&&window.localStorage.getItem("ph-kea-debug"))&&plugins.push(loggerPlugin),window.__REDUX_DEVTOOLS_EXTENSION__&&console.log("NB Redux Dev Tools are disabled on PostHog. See: https://github.com/PostHog/posthog/issues/17482"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.resetContext)({plugins:plugins,createStore:{compose:function(){for(var _len=arguments.length,funcs=Array(_len),_key=0;_key<_len;_key++)funcs[_key]=arguments[_key];return 0===funcs.length?arg=>arg:1===funcs.length?funcs[0]:funcs.reduce((a,b)=>function(){return a(b(...arguments))})}}})}},"./frontend/src/layout/ErrorBoundary/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>ErrorBoundary_ErrorBoundary_ErrorBoundary});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ErrorBoundary=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/ErrorBoundary/ErrorBoundary.scss"),ErrorBoundary_default=__webpack_require__.n(ErrorBoundary),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ErrorBoundary_default(),options),ErrorBoundary_default().locals;var hub=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/hub.js"),errorboundary=__webpack_require__("./node_modules/.pnpm/@sentry+react@7.112.1_react@18.2.0/node_modules/@sentry/react/esm/errorboundary.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ErrorBoundary_ErrorBoundary_ErrorBoundary(_ref){let{children,tags={}}=_ref,isSentryInitialized=!!(0,hub.Gd)().getClient(),{currentTeamId}=(0,index_esm.useValues)(teamLogic.H),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw);return(0,jsx_runtime.jsx)(errorboundary.SV,{beforeCapture:scope=>{void 0!==currentTeamId&&scope.setTag("team_id",currentTeamId),scope.setTags(tags)},fallback:_ref2=>{let{error,eventId}=_ref2;return(0,jsx_runtime.jsx)("div",{className:"ErrorBoundary",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h2",{children:"An error has occurred"}),(0,jsx_runtime.jsx)("pre",{children:(0,jsx_runtime.jsx)("code",{children:error.stack||(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[error.name,(0,jsx_runtime.jsx)("br",{}),error.message]})})}),isSentryInitialized&&eventId?.match(/[^0]/)?`We've registered this event for analysis (ID ${eventId}), but feel free to contact us directly too.`:"Please help us resolve the issue by sending a screenshot of this message.",(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",fullWidth:!0,center:!0,onClick:()=>openSupportForm({kind:"bug",isEmailFormOpen:!0}),targetBlank:!0,className:"mt-2",children:"Email an engineer"})]})})},children:children})}},"./frontend/src/layout/FeaturePreviews/FeaturePreviews.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>FeaturePreviews});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function FeaturePreviews(){let{earlyAccessFeatures,rawEarlyAccessFeaturesLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{loadEarlyAccessFeatures}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z);return(0,react__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>loadEarlyAccessFeatures(),[]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_6__.default)("flex flex-col relative min-h-24",0===earlyAccessFeatures.length&&"items-center justify-center"),children:[earlyAccessFeatures.map((feature,i)=>!!feature.flagKey&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[i>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.p2,{className:"my-4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(FeaturePreview,{feature:feature},feature.flagKey)]},feature.flagKey)),rawEarlyAccessFeaturesLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_2__.t,{}):0===earlyAccessFeatures.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("i",{className:"text-center",children:["No feature previews currently available.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("br",{}),"Check back later!"]}):null]})}function FeaturePreview(_ref){let{feature}=_ref,{activeFeedbackFlagKey,activeFeedbackFlagKeyLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{beginEarlyAccessFeatureFeedback,cancelEarlyAccessFeatureFeedback,updateEarlyAccessFeatureEnrollment}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{submitEarlyAccessFeatureFeedback}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useAsyncActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{flagKey,enabled,name,description,documentationUrl}=feature,isFeedbackActive=activeFeedbackFlagKey===flagKey,[feedback,setFeedback]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)("");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex items-center justify-between",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h4",{className:"font-semibold mb-0",children:name}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.f4,{checked:enabled,onChange:newChecked=>updateEarlyAccessFeatureEnrollment(flagKey,newChecked)})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p",{className:"my-2",children:description||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("i",{children:"No description."})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[isFeedbackActive?null:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{onClick:()=>beginEarlyAccessFeatureFeedback(flagKey),children:"Give feedback"}),documentationUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[" • ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:documentationUrl,target:"_blank",children:"Learn more"})]})]}),isFeedbackActive&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__._V,{autoFocus:!0,placeholder:`What's your experience with ${name} been like?`,className:"mt-2",value:feedback,onChange:value=>setFeedback(value),onKeyDown:e=>{"Enter"===e.key&&e.metaKey?updateEarlyAccessFeatureEnrollment(flagKey,enabled):"Escape"===e.key&&(cancelEarlyAccessFeatureFeedback(),setFeedback(""),e.stopPropagation())}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"secondary",onClick:()=>{cancelEarlyAccessFeatureFeedback(),setFeedback("")},children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary",onClick:()=>{submitEarlyAccessFeatureFeedback(feedback).then(()=>{setFeedback("")})},loading:activeFeedbackFlagKeyLoading,className:"flex-1",center:!0,children:"Submit feedback"})]})]})]})}},"./frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>CONSTRAINED_PREVIEWS,Z:()=>featurePreviewsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let CONSTRAINED_PREVIEWS=new Set([]),featurePreviewsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["layout","FeaturePreviews","featurePreviewsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__.userLogic,["user"]],actions:[lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__.Pw,["submitZendeskTicket"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({updateEarlyAccessFeatureEnrollment:(flagKey,enabled)=>({flagKey,enabled}),beginEarlyAccessFeatureFeedback:flagKey=>({flagKey}),cancelEarlyAccessFeatureFeedback:!0,submitEarlyAccessFeatureFeedback:message=>({message})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{rawEarlyAccessFeatures:[[],{loadEarlyAccessFeatures:async()=>await new Promise(resolve=>posthog_js__WEBPACK_IMPORTED_MODULE_4__.LJ.getEarlyAccessFeatures(features=>resolve(features),!0))}],activeFeedbackFlagKey:[null,{submitEarlyAccessFeatureFeedback:async _ref2=>{let{message}=_ref2;if(!values.user)throw Error("Cannot submit early access feature feedback without a user");if(!values.activeFeedbackFlagKey)throw Error("Cannot submit early access feature feedback without an active flag key");return await lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__.Pw.asyncActions.submitZendeskTicket({name:values.user.first_name,email:values.user.email,kind:"feedback",target_area:values.activeFeedbackFlagKey,severity_level:"low",message}),null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({activeFeedbackFlagKey:{beginEarlyAccessFeatureFeedback:(_,_ref3)=>{let{flagKey}=_ref3;return flagKey},cancelEarlyAccessFeatureFeedback:()=>null}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(()=>({updateEarlyAccessFeatureEnrollment:_ref4=>{let{flagKey,enabled}=_ref4;posthog_js__WEBPACK_IMPORTED_MODULE_4__.LJ.updateEarlyAccessFeatureEnrollment(flagKey,enabled)}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({earlyAccessFeatures:[s=>[s.rawEarlyAccessFeatures,s.featureFlags],(rawEarlyAccessFeatures,featureFlags)=>rawEarlyAccessFeatures.filter(feature=>!!feature.flagKey&&(!CONSTRAINED_PREVIEWS.has(feature.flagKey)||!!featureFlags[`${feature.flagKey}-preview`])).map(feature=>{if(!feature.flagKey)throw Error("Early access feature without flagKey was not filtered out");return{...feature,flagKey:feature.flagKey,enabled:!!featureFlags[feature.flagKey]}})]})])},"./frontend/src/layout/GlobalModals.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>GlobalModals,p:()=>globalModalsLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),billing_utils=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx");let confirmUpgradeModalLogic=(0,index_esm.kea)([(0,index_esm.path)(["lib","components","ConfirmUpgradeModal","confirmUpgradeModalLogic"]),(0,index_esm.actions)({showConfirmUpgradeModal:(upgradePlan,confirmCallback,cancelCallback)=>({upgradePlan,confirmCallback,cancelCallback}),hideConfirmUpgradeModal:!0,confirm:!0,cancel:!0}),(0,index_esm.reducers)({upgradePlan:[null,{showConfirmUpgradeModal:(_,_ref)=>{let{upgradePlan}=_ref;return upgradePlan},hideConfirmUpgradeModal:()=>null}],confirmCallback:[null,{showConfirmUpgradeModal:(_,_ref2)=>{let{confirmCallback}=_ref2;return confirmCallback},hideConfirmUpgradeModal:()=>null}],cancelCallback:[null,{showConfirmUpgradeModal:(_,_ref3)=>{let{cancelCallback}=_ref3;return cancelCallback},hideConfirmUpgradeModal:()=>null}]}),(0,index_esm.listeners)(_ref4=>{let{actions,values}=_ref4;return{confirm:async(_,breakpoint)=>{await breakpoint(100),values.confirmCallback&&values.confirmCallback(),actions.hideConfirmUpgradeModal()},cancel:async(_,breakpoint)=>{await breakpoint(100),values.cancelCallback&&values.cancelCallback(),actions.hideConfirmUpgradeModal()}}})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ConfirmUpgradeModal(){let{upgradePlan}=(0,index_esm.useValues)(confirmUpgradeModalLogic),{timeRemainingInSeconds,timeTotalInSeconds,billing}=(0,index_esm.useValues)(billingLogic.kr),{hideConfirmUpgradeModal,confirm,cancel}=(0,index_esm.useActions)(confirmUpgradeModalLogic),{prorationAmount,isProrated}=(0,react.useMemo)(()=>(0,billing_utils.MG)({timeRemainingInSeconds,timeTotalInSeconds,amountUsd:upgradePlan?.unit_amount_usd,hasActiveSubscription:billing?.has_active_subscription}),[billing?.has_active_subscription,upgradePlan,timeRemainingInSeconds,timeTotalInSeconds]);return(0,jsx_runtime.jsx)(src.fQ,{onClose:hideConfirmUpgradeModal,isOpen:!!upgradePlan,closable:!1,title:`Ready to subscribe to the ${upgradePlan?.name}?`,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>cancel(),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>confirm(),children:"Sign me up"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"max-w-140",children:[(0,jsx_runtime.jsxs)("p",{children:["Woo! You're gonna love the ",upgradePlan?.name,". We're just confirming that this is a $",Number(upgradePlan?.unit_amount_usd)," / ",upgradePlan?.unit," subscription."," ",isProrated?`The first payment will be prorated to ~$${prorationAmount} and it will be charged immediately.`:"The first payment will be charged immediately."]}),upgradePlan&&upgradePlan?.features?.length>1&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{className:"ml-0 mb-2 max-w-200",children:"Here are the features included:"}),(0,jsx_runtime.jsx)("div",{className:"grid grid-cols-2 gap-x-4",children:upgradePlan?.features.map((feature,index)=>jsx_runtime.jsxs("div",{className:"flex gap-x-2 items-center mb-2",children:[jsx_runtime.jsx(posthog_icons_es.IconCheckCircle,{className:"text-success"}),jsx_runtime.jsx(src.u,{title:feature.description,children:jsx_runtime.jsxs("b",{children:[feature.name,feature.note?": "+feature.note:""]})},feature.key)]},"addon-features-"+index))})]})]})})}__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.scss");var membersLogic=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),HedgehogBuddy_HedgehogBuddy=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx"),hedgehogBuddyLogic=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/hedgehogBuddyLogic.ts");function HedgehogBuddyWithLogic(){let{hedgehogConfig}=(0,index_esm.useValues)(hedgehogBuddyLogic.r),{patchHedgehogConfig}=(0,index_esm.useActions)(hedgehogBuddyLogic.r),{user}=(0,index_esm.useValues)(userLogic.userLogic),{members}=(0,index_esm.useValues)(membersLogic.m),{ensureAllMembersLoaded}=(0,index_esm.useActions)(membersLogic.m);return(0,react.useEffect)(()=>ensureAllMembersLoaded(),[hedgehogConfig.enabled]),hedgehogConfig.enabled?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(HedgehogBuddy_HedgehogBuddy.Tf,{onClose:()=>patchHedgehogConfig({enabled:!1})}),hedgehogConfig.party_mode_enabled?members?.map(member=>{if(member.user.uuid!==user?.uuid&&member.user.hedgehog_config)return jsx_runtime.jsx(HedgehogBuddy_HedgehogBuddy.Iv,{member:member},member.user.uuid)}):null]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}var TimeSensitiveAuthentication=__webpack_require__("./frontend/src/lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication.tsx"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),upgradeModalLogic=__webpack_require__("./frontend/src/lib/components/UpgradeModal/upgradeModalLogic.ts");function UpgradeModal(){let{upgradeModalFeatureKey,upgradeModalFeatureUsage,upgradeModalIsGrandfathered}=(0,index_esm.useValues)(upgradeModalLogic.J),{hideUpgradeModal}=(0,index_esm.useActions)(upgradeModalLogic.J);return upgradeModalFeatureKey?(0,jsx_runtime.jsx)(src.fQ,{onClose:hideUpgradeModal,isOpen:!!upgradeModalFeatureKey,children:(0,jsx_runtime.jsx)("div",{className:"max-w-2xl",children:(0,jsx_runtime.jsx)(PayGateMini.E,{feature:upgradeModalFeatureKey,currentUsage:null!=upgradeModalFeatureUsage?upgradeModalFeatureUsage:void 0,isGrandfathered:null!=upgradeModalIsGrandfathered?upgradeModalIsGrandfathered:void 0,background:!1,children:(0,jsx_runtime.jsx)("div",{className:"pr-7",children:"You should have access to this feature already. If you are still seeing this modal, please let us know \uD83D\uDE42"})})})}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}var LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),twoFactorLogic=__webpack_require__("./frontend/src/scenes/authentication/twoFactorLogic.ts"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Setup2FA=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/authentication/Setup2FA.scss"),Setup2FA_default=__webpack_require__.n(Setup2FA),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Setup2FA_default(),options),Setup2FA_default().locals;var lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts");function TwoFactorSetup(_ref){let{onSuccess}=_ref,{startSetupLoading,generalError}=(0,index_esm.useValues)((0,twoFactorLogic.e)({onSuccess}));return startSetupLoading?null:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(lib.Form,{logic:twoFactorLogic.e,formKey:"token",enableFormOnSubmit:!0,className:"flex flex-col space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"bg-white ml-auto mr-auto mt-2",children:(0,jsx_runtime.jsx)("img",{src:"/account/two_factor/qrcode/",className:"Setup2FA__image"})}),generalError&&(0,jsx_runtime.jsx)(LemonBanner.V,{type:"error",children:generalError.detail}),(0,jsx_runtime.jsx)(LemonField.D,{name:"token",label:"Authenticator token",children:(0,jsx_runtime.jsx)(src.DF,{className:"ph-ignore-input",autoFocus:!0,"data-attr":"token",placeholder:"123456",inputMode:"numeric",autoComplete:"one-time-code"})}),(0,jsx_runtime.jsx)(src.Jp,{htmlType:"submit","data-attr":"2fa-setup",fullWidth:!0,type:"primary",center:!0,loading:!1,children:"Submit"})]})})}function TwoFactorSetupModal(){let{isTwoFactorSetupModalOpen,forceOpenTwoFactorSetupModal}=(0,index_esm.useValues)(twoFactorLogic.e),{closeTwoFactorSetupModal}=(0,index_esm.useActions)(twoFactorLogic.e);return(0,jsx_runtime.jsx)(LemonModal.f,{title:"Set up two-factor authentication",isOpen:isTwoFactorSetupModalOpen||forceOpenTwoFactorSetupModal,onClose:forceOpenTwoFactorSetupModal?void 0:()=>closeTwoFactorSetupModal(),closable:!forceOpenTwoFactorSetupModal,children:(0,jsx_runtime.jsxs)("div",{className:"max-w-md",children:[forceOpenTwoFactorSetupModal&&(0,jsx_runtime.jsx)(LemonBanner.V,{className:"mb-4",type:"warning",children:"Your organization requires you to set up 2FA."}),(0,jsx_runtime.jsx)("p",{children:"Use an authenticator app like Google Authenticator or 1Password to scan the QR code below."}),(0,jsx_runtime.jsx)(TwoFactorSetup,{onSuccess:()=>{closeTwoFactorSetupModal(),userLogic.userLogic.actions.loadUser(),membersLogic.m.actions.loadAllMembers()}})]})})}var CreateOrganizationModal=__webpack_require__("./frontend/src/scenes/organization/CreateOrganizationModal.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx");function CreateEnvironmentModal(_ref){let{isVisible,onClose,inline=!1}=_ref,{currentProject}=(0,index_esm.useValues)(projectLogic.K),{currentTeamLoading}=(0,index_esm.useValues)(teamLogic.H),{createTeam}=(0,index_esm.useActions)(teamLogic.H),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{reportProjectCreationSubmitted}=(0,index_esm.useActions)(eventUsageLogic.vx),[name,setName]=(0,react.useState)(""),closeModal=()=>{onClose&&(onClose(),name&&setName(""))},handleSubmit=()=>{createTeam({name,is_demo:!1}),reportProjectCreationSubmitted(currentOrganization?.teams?currentOrganization.teams.length:0,name.length)};return(0,react.useEffect)(()=>{closeModal()},[currentProject]),(0,jsx_runtime.jsx)(src.fQ,{width:560,title:currentProject?`Create an environment within ${currentProject.name}`:"Create a environment",description:(0,jsx_runtime.jsx)("p",{children:"Use environments to keep your data completely separate, while sharing the setup (such as dashboards or taxonomy). The common pattern is having separate production, staging, and development environments."}),footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[onClose&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:onClose,disabledReason:currentTeamLoading?"Creating environment...":void 0,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:handleSubmit,loading:currentTeamLoading,disabledReason:name?null:"Think of a name!",children:"Create environment"})]}),isOpen:isVisible,onClose:onClose,inline:inline,closable:!currentTeamLoading,children:(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Environment name",children:(0,jsx_runtime.jsx)(src.DF,{placeholder:"E.g. development",maxLength:64,autoFocus:!0,value:name,onChange:value=>setName(value),onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},disabled:currentTeamLoading})})})}var CreateProjectModal=__webpack_require__("./frontend/src/scenes/project/CreateProjectModal.tsx"),SessionRecordingPlayer=__webpack_require__("./frontend/src/scenes/session-recordings/player/SessionRecordingPlayer.tsx"),PlayerMeta=__webpack_require__("./frontend/src/scenes/session-recordings/player/PlayerMeta.tsx"),sessionRecordingPlayerLogic=__webpack_require__("./frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts"),sessionPlayerModalLogic=__webpack_require__("./frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts");function SessionPlayerModal(){let{activeSessionRecording}=(0,index_esm.useValues)((0,sessionPlayerModalLogic.A)()),{closeSessionPlayer}=(0,index_esm.useActions)((0,sessionPlayerModalLogic.A)()),eventUUIDs=activeSessionRecording?.matching_events?.filter(matchingEvents=>matchingEvents.session_id===activeSessionRecording?.id).flatMap(matchedRecording=>matchedRecording.events.map(x=>x.uuid))||[],logicProps={playerKey:"modal",sessionRecordingId:activeSessionRecording?.id||"",autoPlay:!0,matchingEventsMatchType:{matchType:"uuid",eventUUIDs:eventUUIDs}},{isFullScreen}=(0,index_esm.useValues)((0,sessionRecordingPlayerLogic.d$)(logicProps));return(0,jsx_runtime.jsxs)(src.fQ,{isOpen:!!activeSessionRecording,onClose:closeSessionPlayer,simple:!0,title:"",width:1600,fullScreen:isFullScreen,closable:!isFullScreen,zIndex:"1061",hideCloseButton:!0,children:[(0,jsx_runtime.jsx)("header",{children:activeSessionRecording?(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:sessionRecordingPlayerLogic.d$,props:logicProps,children:(0,jsx_runtime.jsx)(PlayerMeta.L,{iconsOnly:!1})}):null}),(0,jsx_runtime.jsx)(src.fQ.Content,{embedded:!0,children:activeSessionRecording?.id&&(0,jsx_runtime.jsx)(SessionRecordingPlayer.d,{...logicProps,noMeta:!0,noBorder:!0})})]})}var inviteLogic=__webpack_require__("./frontend/src/scenes/settings/organization/inviteLogic.ts"),InviteModal=__webpack_require__("./frontend/src/scenes/settings/organization/InviteModal.tsx"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts");function PreviewingCustomCssModal(){let[editingInline,setEditingInline]=(0,react.useState)(!1),{previewingCustomCss}=(0,index_esm.useValues)(themeLogic.b),{saveCustomCss,setPreviewingCustomCss}=(0,index_esm.useActions)(themeLogic.b),{location:{pathname}}=(0,index_esm.useValues)(kea_router_lib.router),isCustomCSSPage=pathname.includes(urls.j.customCss());return(0,jsx_runtime.jsxs)("dialog",{open:!isCustomCSSPage&&!!previewingCustomCss,className:"absolute bottom-0 mb-4 px-3 py-2 space-y-2 border rounded shadow min-w-[34rem] z-[var(--z-popover)]",children:[editingInline&&(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"css",value:previewingCustomCss||"",onChange:v=>setPreviewingCustomCss(null!=v?v:null),height:600,options:{minimap:{enabled:!1}}}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center space-x-2",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Custom CSS"}),(0,jsx_runtime.jsxs)("div",{className:"flex space-x-2",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setEditingInline(!editingInline),children:editingInline?"Minimize editor":"Edit"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:saveCustomCss,children:"Save and close"})]})]})]})}let globalModalsLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation","globalModalsLogic"]),(0,index_esm.actions)({showCreateOrganizationModal:!0,hideCreateOrganizationModal:!0,showCreateProjectModal:!0,hideCreateProjectModal:!0,showCreateEnvironmentModal:!0,hideCreateEnvironmentModal:!0}),(0,index_esm.reducers)({isCreateOrganizationModalShown:[!1,{showCreateOrganizationModal:()=>!0,hideCreateOrganizationModal:()=>!1}],isCreateProjectModalShown:[!1,{showCreateProjectModal:()=>!0,hideCreateProjectModal:()=>!1}],isCreateEnvironmentModalShown:[!1,{showCreateEnvironmentModal:()=>!0,hideCreateEnvironmentModal:()=>!1}]})]);function GlobalModals(){let{isCreateOrganizationModalShown,isCreateProjectModalShown,isCreateEnvironmentModalShown}=(0,index_esm.useValues)(globalModalsLogic),{hideCreateOrganizationModal,hideCreateProjectModal,hideCreateEnvironmentModal}=(0,index_esm.useActions)(globalModalsLogic),{isInviteModalShown}=(0,index_esm.useValues)(inviteLogic.n),{hideInviteModal}=(0,index_esm.useActions)(inviteLogic.n);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(InviteModal.Gx,{isOpen:isInviteModalShown,onClose:hideInviteModal}),(0,jsx_runtime.jsx)(CreateOrganizationModal.y,{isVisible:isCreateOrganizationModalShown,onClose:hideCreateOrganizationModal}),(0,jsx_runtime.jsx)(CreateProjectModal.P,{isVisible:isCreateProjectModalShown,onClose:hideCreateProjectModal}),(0,jsx_runtime.jsx)(CreateEnvironmentModal,{isVisible:isCreateEnvironmentModalShown,onClose:hideCreateEnvironmentModal}),(0,jsx_runtime.jsx)(UpgradeModal,{}),(0,jsx_runtime.jsx)(ConfirmUpgradeModal,{}),(0,jsx_runtime.jsx)(TimeSensitiveAuthentication.g,{}),(0,jsx_runtime.jsx)(SessionPlayerModal,{}),(0,jsx_runtime.jsx)(PreviewingCustomCssModal,{}),(0,jsx_runtime.jsx)(TwoFactorSetupModal,{}),(0,jsx_runtime.jsx)(HedgehogBuddyWithLogic,{})]})}},"./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>KeyboardShortcut_KeyboardShortcut});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),KeyboardShortcut=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss"),KeyboardShortcut_default=__webpack_require__.n(KeyboardShortcut),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(KeyboardShortcut_default(),options),KeyboardShortcut_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let IS_MAC=(0,utils.V5)(),KEY_TO_SYMBOL={shift:"⇧",command:IS_MAC?"⌘":"ctrl",option:IS_MAC?"⌥":"alt",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→",enter:"↵",escape:"esc",tab:"⇥",space:"␣",forwardslash:"/"},MODIFIER_PRIORITY=["shift","command","option"];function KeyboardShortcut_KeyboardShortcut(_ref){let{muted,className,...keys}=_ref,sortedKeys=Object.keys(keys).sort((a,b)=>(-MODIFIER_PRIORITY.indexOf(a)||0)-(-MODIFIER_PRIORITY.indexOf(b)||0));return(0,utils.tq)()?null:(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("KeyboardShortcut space-x-0.5",muted&&"KeyboardShortcut--muted",className),children:sortedKeys.map(key=>(0,jsx_runtime.jsx)("span",{children:KEY_TO_SYMBOL[key]||key},key))})}},"./frontend/src/layout/navigation-3000/components/Sidebar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Sidebar});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),index_module=__webpack_require__("./node_modules/.pnpm/use-debounce@9.0.3_react@18.2.0/node_modules/use-debounce/dist/index.module.js"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/navigationLogic.tsx"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),InfiniteLoader=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/InfiniteLoader/index.js"),List=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/List/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SidebarList(_ref){let{category}=_ref,{normalizedActiveListItemKey,sidebarWidth,newItemInlineCategory,savingNewItem}=(0,index_esm.useValues)(navigationLogic.f),{cancelNewItem}=(0,index_esm.useActions)(navigationLogic.f),{saveNewItem}=(0,index_esm.useAsyncActions)(navigationLogic.f),emptyStateSkeletonCount=(0,react.useMemo)(()=>4+Math.floor(4*Math.random()),[]),{items,remote}=category,addingNewItem=newItemInlineCategory===category.key,firstItem=items.find(Boolean),listProps={className:"SidebarList",width:sidebarWidth,rowHeight:firstItem&&"summary"in firstItem?46:32,rowRenderer:_ref2=>{let active,{index:rawIndex,style}=_ref2,index=addingNewItem?rawIndex-1:rawIndex;if(-1===index)return(0,jsx_runtime.jsx)(SidebarListItem,{item:{key:"__tentative__",onSave:async newName=>saveNewItem(newName),onCancel:cancelNewItem,loading:savingNewItem},validateName:category.validateName,style:style},index);let item=items[index];if(!item)return(0,jsx_runtime.jsx)(SidebarListItemSkeleton,{style:style},index);let normalizedItemKey=Array.isArray(item.key)?item.key.map(keyPart=>`${category.key}${navigationLogic.l}${keyPart}`):`${category.key}${navigationLogic.l}${item.key}`;return active=Array.isArray(normalizedItemKey)?"string"==typeof normalizedActiveListItemKey&&normalizedItemKey.includes(normalizedActiveListItemKey):normalizedItemKey===normalizedActiveListItemKey,(0,jsx_runtime.jsx)(SidebarListItem,{item:item,validateName:category.validateName,active:active,style:style},index)},overscanRowCount:20,tabIndex:null};return(0,jsx_runtime.jsx)("div",{className:"flex-1","aria-busy":category.loading,children:(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref3=>{let{height}=_ref3;return category.loading&&0===category.items.length?Array(emptyStateSkeletonCount).fill(null).map((_,index)=>(0,jsx_runtime.jsx)(SidebarListItemSkeleton,{style:{height:32}},index)):remote?(0,jsx_runtime.jsx)(InfiniteLoader.b,{isRowLoaded:_ref4=>{let{index}=_ref4;return remote.isItemLoaded(index)},loadMoreRows:_ref5=>{let{startIndex,stopIndex}=_ref5;return remote.loadMoreItems(startIndex,stopIndex)},rowCount:remote.itemCount,minimumBatchSize:remote.minimumBatchSize||100,children:_ref6=>{let{onRowsRendered,registerChild}=_ref6;return(0,jsx_runtime.jsx)(List.aV,{...listProps,ref:registerChild,height:height,rowCount:remote.itemCount+Number(addingNewItem),onRowsRendered:onRowsRendered})}}):(0,jsx_runtime.jsx)(List.aV,{...listProps,height:height,rowCount:items.length+Number(addingNewItem)})}})})}function isItemTentative(item){return"onSave"in item}function SidebarListItem(_ref7){let content,{item,validateName,active,style}=_ref7,[isMenuOpen,setIsMenuOpen]=(0,react.useState)(!1),[newName,setNewName]=(0,react.useState)(null),[newNameValidationError,setNewNameValidationError]=(0,react.useState)(null),[isSavingName,setIsSavingName]=(0,react.useState)(!1),ref=(0,react.useRef)(null);item.ref=ref;let isSaving=isItemTentative(item)?item.loading:isSavingName,menuItems=(0,react.useMemo)(()=>{if(!isItemTentative(item)){if(item.onRename){if("function"!=typeof item.menuItems)throw Error('menuItems must be a function for renamable items so that the "Rename" item is shown');return item.menuItems(()=>setNewName(item.name))}return"function"==typeof item.menuItems?item.menuItems(()=>console.error("Cannot rename item without onRename handler")):item.menuItems}},[item,setNewName]),cancel=()=>{isItemTentative(item)&&item.onCancel(),setNewName(null),setNewNameValidationError(null)},validate=name=>{if(validateName){let validation=validateName(name);return setNewNameValidationError(validation||null),!validation}return!0},save=isItemTentative(item)?async name=>{validate(name)&&await item.onSave(name)}:item.onRename?async newName=>{if(!newName||newName===item.name)return cancel();if(validate(newName)){setIsSavingName(!0);try{await item.onRename?.(newName)}catch(error){(0,esm_exports.Tb)(error),src.UJ.error("Could not rename item")}finally{setIsSavingName(!1),cancel()}}}:null;if((0,react.useEffect)(()=>{if(!isItemTentative(item)&&save&&null===newName){let onDoubleClick=()=>{setNewName(item.name)},element=ref.current;if(element)return element.addEventListener("dblclick",onDoubleClick),()=>{element.removeEventListener("dblclick",onDoubleClick)}}}),"onClick"in item)content=(0,jsx_runtime.jsxs)("li",{className:"SidebarListItem__button",onClick:item.onClick,children:[item.icon&&(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__icon",children:item.icon}),(0,jsx_runtime.jsx)("h5",{className:"SidebarListItem__name",children:item.name})]});else if(save&&(isItemTentative(item)||null!==newName))content=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__rename",ref:ref,children:(0,jsx_runtime.jsx)("input",{value:newName||"",onChange:e=>setNewName(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(navigationLogic.f.actions.focusNextItem(),e.preventDefault()):"ArrowUp"===e.key?(navigationLogic.f.actions.focusPreviousItem(),e.preventDefault()):"Enter"===e.key?(save(newName||"").then(()=>{setTimeout(()=>ref.current?.focus(),0)}),e.preventDefault()):"Escape"===e.key&&(cancel(),setTimeout(()=>ref.current?.focus(),0),e.preventDefault())},onFocus:e=>{navigationLogic.f.actions.setLastFocusedItemByKey(Array.isArray(item.key)?item.key[0]:item.key),e.target.select()},onBlur:e=>{e.relatedTarget?.ariaLabel==="Save name"?save(newName||""):cancel()},placeholder:isItemTentative(item)?"Adding something new…":`Renaming ${item.name}…`,disabled:isSaving,autoFocus:!0})}),newNameValidationError&&(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__error",children:newNameValidationError})]});else{if(isItemTentative(item))throw Error("Tentative items should not be rendered in read mode");let formattedName=item.searchMatch?.nameHighlightRanges?.length?(0,jsx_runtime.jsx)(TextWithHighlights,{ranges:item.searchMatch.nameHighlightRanges,children:item.name}):item.name;(!item.url||item.isNamePlaceholder)&&(formattedName=(0,jsx_runtime.jsx)("i",{children:formattedName})),item.tag&&(formattedName=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[formattedName,(0,jsx_runtime.jsx)(src.oe,{type:item.tag.status,size:"small",className:"ml-2",children:item.tag.text})]})),content=(0,jsx_runtime.jsx)(apps_common_src.rU,{ref:ref,to:item.url||void 0,className:"SidebarListItem__link",onKeyDown:e=>{"ArrowDown"===e.key?e.metaKey||e.ctrlKey?e.target.click():(navigationLogic.f.actions.focusNextItem(),e.preventDefault()):"ArrowUp"===e.key?(navigationLogic.f.actions.focusPreviousItem(),e.preventDefault()):save&&"Enter"===e.key&&(setNewName(item.name),e.preventDefault())},onFocus:()=>{navigationLogic.f.actions.setLastFocusedItemByKey(Array.isArray(item.key)?item.key[0]:item.key)},children:"summary"in item?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex space-between gap-1",children:[(0,jsx_runtime.jsx)("h5",{className:"flex-1",children:formattedName}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ExtraContext,{data:item.extraContextTop})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex space-between gap-1",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1 overflow-hidden text-ellipsis",children:item.searchMatch?.matchingFields?`Matching fields: ${item.searchMatch.matchingFields.map(field=>field.replace(/_/g," ")).join(", ")}`:item.summary}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ExtraContext,{data:item.extraContextBottom})})]})]}):(0,jsx_runtime.jsx)("h5",{children:formattedName})})}return(0,jsx_runtime.jsxs)("li",{id:`sidebar-${item.key}`,title:isItemTentative(item)?"New item":item.name,className:(0,clsx_m.default)("SidebarListItem","menuItems"in item&&item.menuItems?.length&&"SidebarListItem--has-menu",isMenuOpen&&"SidebarListItem--is-menu-open",(isItemTentative(item)||null!==newName)&&"SidebarListItem--is-renaming","marker"in item&&!!item.marker&&`SidebarListItem--marker-${item.marker.type}`,"marker"in item&&!!item.marker?.status&&`SidebarListItem--marker-status-${item.marker.status}`,"summary"in item&&"SidebarListItem--extended"),"aria-disabled":!isItemTentative(item)&&!item.url,"aria-current":active?"page":void 0,"aria-invalid":!!newNameValidationError,style:style,children:[content,isItemTentative(item)||null!==newName?(0,jsx_runtime.jsxs)("div",{className:"SidebarListItem__actions",children:[!isSaving&&(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Cancel ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{escape:!0})]}),"aria-label":"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}),tooltip:isSaving?null:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Save name ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{enter:!0})]}),loading:isSaving,"aria-label":"Save name"})]}):!!menuItems?.length&&(0,jsx_runtime.jsx)(LemonMenu.d,{items:menuItems,onVisibilityChange:setIsMenuOpen,children:(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__actions",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{})})})})]})}function TextWithHighlights(_ref8){let{children,ranges}=_ref8,segments=[],previousBoldEnd=0,segmentIndex=0;for(let i=0;ipreviousBoldEnd&&(segments.push((0,jsx_runtime.jsx)(react.Fragment,{children:children.slice(previousBoldEnd,currentBoldStart)},segmentIndex)),segmentIndex++),segments.push((0,jsx_runtime.jsx)("b",{children:children.slice(currentBoldStart,currentBoldEnd)},segmentIndex)),segmentIndex++,previousBoldEnd=currentBoldEnd}return previousBoldEnd0?()=>toggleAccordion(key):void 0,children:[loading?(0,jsx_runtime.jsx)(Spinner.$,{}):(0,jsx_runtime.jsx)(icons.VG,{}),(0,jsx_runtime.jsxs)("h4",{children:[(0,utils.fm)(pluralizeCategory(category.noun)),!loading&&isEmpty&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[" ",(0,jsx_runtime.jsx)("i",{children:"(empty)"})]})]}),(0,jsx_runtime.jsx)(NewItemButton,{category:category})]}),isExpanded&&(0,jsx_runtime.jsx)(SidebarList,{category:category})]})}function pluralizeCategory(noun){return Array.isArray(noun)?noun[1]:`${noun}s`}function NewItemButton(_ref){var noun;let{category}=_ref,{newItemCategory}=(0,index_esm.useValues)(navigationLogic.f),{initiateNewItemInCategory}=(0,index_esm.useActions)(navigationLogic.f);return category.onAdd?(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),size:"small",noPadding:!0,to:"string"==typeof category.onAdd?category.onAdd:void 0,onClick:e=>{"function"==typeof category.onAdd&&initiateNewItemInCategory(category.key),e.stopPropagation()},active:newItemCategory===category.key,tooltip:`New ${Array.isArray(noun=category.noun)?noun[0]:noun}`,tooltipPlacement:"bottom"}):null}function Sidebar(_ref){let{navbarItem,sidebarOverlay,sidebarOverlayProps}=_ref,inputElementRef=(0,react.useRef)(null),{sidebarWidth:width,isSidebarShown:isShown,isResizeInProgress,sidebarOverslideDirection:overslideDirection,isSidebarKeyboardShortcutAcknowledged,isSearchShown}=(0,index_esm.useValues)((0,navigationLogic.f)({inputElement:inputElementRef.current})),{beginResize}=(0,index_esm.useActions)((0,navigationLogic.f)({inputElement:inputElementRef.current})),{contents}=(0,index_esm.useValues)(navbarItem.logic),onlyCategoryTitle=1===contents.length?(0,utils.fm)(pluralizeCategory(contents[0].noun)):null,title=onlyCategoryTitle&&onlyCategoryTitle.toLowerCase()!==navbarItem.label.toLowerCase()?`${navbarItem.label} — ${onlyCategoryTitle}`:navbarItem.label;return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("Sidebar3000",isResizeInProgress&&"Sidebar3000--resizing",overslideDirection&&`Sidebar3000--overslide-${overslideDirection}`),"aria-hidden":!isShown,style:{"--sidebar-width":`${isShown?width:0}px`},children:[(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__content",children:[(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__header",children:[(0,jsx_runtime.jsx)("h3",{className:"grow",children:title}),(0,jsx_runtime.jsx)(SidebarActions,{activeSidebarLogic:navbarItem.logic})]}),navbarItem?.logic&&isSearchShown&&(0,jsx_runtime.jsx)(SidebarSearchBar,{activeSidebarLogic:navbarItem.logic,inputElementRef:inputElementRef}),(0,jsx_runtime.jsx)("div",{className:"Sidebar3000__lists",children:navbarItem?.logic&&(0,jsx_runtime.jsx)(SidebarContent,{activeSidebarLogic:navbarItem.logic})}),!isSidebarKeyboardShortcutAcknowledged&&(0,jsx_runtime.jsx)(SidebarKeyboardShortcut,{}),contents.filter(_ref2=>{let{modalContent}=_ref2;return modalContent}).map(category=>(0,jsx_runtime.jsx)(react.Fragment,{children:category.modalContent},category.key))]}),(0,jsx_runtime.jsx)("div",{className:"Sidebar3000__slider",onMouseDown:e=>{0===e.button&&beginResize()}}),sidebarOverlay&&(0,jsx_runtime.jsx)(SidebarOverlay,{...sidebarOverlayProps,isOpen:isShown&&sidebarOverlayProps?.isOpen,width:width,children:sidebarOverlay})]})}function SidebarActions(_ref3){let{activeSidebarLogic}=_ref3,{isSearchShown}=(0,index_esm.useValues)(navigationLogic.f),{setIsSearchShown}=(0,index_esm.useActions)(navigationLogic.f),{contents}=(0,index_esm.useValues)(activeSidebarLogic);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[1===contents.length&&(0,jsx_runtime.jsx)(NewItemButton,{category:contents[0]}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconSearch,{}),size:"small",noPadding:!0,onClick:()=>setIsSearchShown(!isSearchShown),active:isSearchShown,tooltip:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Find ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{shift:!0,command:!0,f:!0})]}),tooltipPlacement:"bottom"})]})}function SidebarSearchBar(_ref4){let{activeSidebarLogic,inputElementRef}=_ref4,{searchTerm}=(0,index_esm.useValues)(navigationLogic.f),{setIsSearchShown,setSearchTerm,focusNextItem,setLastFocusedItemIndex}=(0,index_esm.useActions)(navigationLogic.f),{contents,debounceSearch}=(0,index_esm.useValues)(activeSidebarLogic),[localSearchTerm,setLocalSearchTerm]=(0,react.useState)(searchTerm),setSearchTermDebounced=(0,index_module.y1)(value=>setSearchTerm(value),debounceSearch?300:void 0),isLoading=contents.some(item=>item.loading);return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.DF,{inputRef:inputElementRef,type:"search",value:localSearchTerm,onChange:value=>{setLocalSearchTerm(value),setSearchTermDebounced(value)},size:"small",prefix:(localSearchTerm||searchTerm)&&(localSearchTerm!==searchTerm||isLoading)?(0,jsx_runtime.jsx)(Spinner.$,{textColored:!0}):null,placeholder:"Search...",onKeyDown:e=>{"Escape"===e.key?(setIsSearchShown(!1),e.preventDefault()):"ArrowDown"===e.key&&(focusNextItem(),e.preventDefault())},onFocus:()=>{setLastFocusedItemIndex(-1)},autoFocus:!0,suffix:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{muted:!0,arrowdown:!0,arrowup:!0})})})}function SidebarContent(_ref5){let{activeSidebarLogic}=_ref5,{contents}=(0,index_esm.useValues)(activeSidebarLogic);return 1!==contents.length?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:contents.map(accordion=>(0,jsx_runtime.jsx)(SidebarAccordion,{category:accordion},accordion.key))}):(0,jsx_runtime.jsx)(SidebarList,{category:contents[0]})}function SidebarKeyboardShortcut(){let{acknowledgeSidebarKeyboardShortcut}=(0,index_esm.useActions)(navigationLogic.f);return(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__hint",children:[(0,jsx_runtime.jsxs)("span",{className:"truncate",children:[(0,jsx_runtime.jsx)("i",{children:"Tip:"})," Press ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,b:!0})," to toggle this sidebar"]}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),size:"small",onClick:()=>acknowledgeSidebarKeyboardShortcut(),noPadding:!0})]})}function SidebarOverlay(_ref6){let{className,isOpen=!1,children,width}=_ref6;return isOpen?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("absolute top-0 left-0 h-full bg-bg-3000",className),style:{width:`${width}px`},children:children}):null}},"./frontend/src/layout/navigation-3000/navigationLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>ITEM_KEY_PART_SEPARATOR,f:()=>navigation3000Logic});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),fuse_esm=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),databaseTableListLogic=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),sceneLogic=__webpack_require__("./frontend/src/scenes/sceneLogic.ts"),sceneTypes=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),editorSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts"),multitabEditorLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dataWarehouseTablesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),posthogTablesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),savedQueriesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),editorSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","editorSidebarLogic"]),(0,index_esm.connect)({values:[sceneLogic.k,["activeScene","sceneParams"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueries","dataWarehouseSavedQueryMapById","dataWarehouseSavedQueriesLoading"],databaseTableListLogic.A,["posthogTables","dataWarehouseTables","databaseLoading","views","viewsMapById"]],actions:[editorSceneLogic.h,["selectSchema"],dataWarehouseViewsLogic.$,["deleteDataWarehouseSavedQuery","runDataWarehouseSavedQuery"],viewLinkLogic.t,["selectSourceTable","toggleJoinTableModal"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantSavedQueries,s.dataWarehouseSavedQueriesLoading,s.relevantPosthogTables,s.relevantDataWarehouseTables,s.databaseLoading],(relevantSavedQueries,dataWarehouseSavedQueriesLoading,relevantPosthogTables,relevantDataWarehouseTables,databaseLoading)=>[{key:"data-warehouse-sources",noun:["source","external source"],loading:databaseLoading,items:relevantDataWarehouseTables.map(_ref2=>{let[table,matches]=_ref2;return{key:table.id,name:table.name,url:"",searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(table)},menuItems:[{label:"Add join",onClick:()=>{actions.selectSourceTable(table.name),actions.toggleJoinTableModal()}}]}}),onAdd:()=>{lib.router.actions.push(urls.j.pipeline(types.J9.Sources))}},{key:"data-warehouse-tables",noun:["table","tables"],loading:databaseLoading,items:relevantPosthogTables.map(_ref3=>{let[table,matches]=_ref3;return{key:table.id,name:table.name,url:"",searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(table)},menuItems:[{label:"Add join",onClick:()=>{actions.selectSourceTable(table.name),actions.toggleJoinTableModal()}}]}})},{key:"data-warehouse-views",noun:["view","views"],loading:dataWarehouseSavedQueriesLoading,items:relevantSavedQueries.map(_ref4=>{let[savedQuery,matches]=_ref4;return{key:savedQuery.id,name:savedQuery.name,url:"",icon:savedQuery.status?(0,jsx_runtime.jsx)(src.u,{title:"Materialized view",children:(0,jsx_runtime.jsx)(icons.X8,{})}):(0,jsx_runtime.jsx)(src.u,{title:"View",children:(0,jsx_runtime.jsx)(icons.yK,{})}),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(savedQuery)},menuItems:[{label:"Edit view definition",onClick:()=>{(0,multitabEditorLogic.tg)({key:`hogQLQueryEditor/${lib.router.values.location.pathname}`}).actions.editView(savedQuery.query.query,savedQuery)}},{label:"Add join",onClick:()=>{actions.selectSourceTable(savedQuery.name),actions.toggleJoinTableModal()}},{label:"Delete",status:"danger",onClick:()=>{actions.deleteDataWarehouseSavedQuery(savedQuery.id)}}]}})}]],nonMaterializedViews:[s=>[s.dataWarehouseSavedQueries],views=>views.filter(view=>!view.status&&!view.last_run_at)],materializedViews:[s=>[s.dataWarehouseSavedQueries],views=>views.filter(view=>view.status||view.last_run_at)],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.DataWarehouse&&sceneParams.params.id?["saved-queries",parseInt(sceneParams.params.id)]:null],relevantDataWarehouseTables:[s=>[s.dataWarehouseTables,navigation3000Logic.selectors.searchTerm],(dataWarehouseTables,searchTerm)=>searchTerm?dataWarehouseTablesfuse.search(searchTerm).map(result=>[result.item,result.matches]):dataWarehouseTables.map(table=>[table,null])],relevantPosthogTables:[s=>[s.posthogTables,navigation3000Logic.selectors.searchTerm],(posthogTables,searchTerm)=>searchTerm?posthogTablesfuse.search(searchTerm).map(result=>[result.item,result.matches]):posthogTables.map(table=>[table,null])],relevantSavedQueries:[s=>[s.dataWarehouseSavedQueries,navigation3000Logic.selectors.searchTerm],(dataWarehouseSavedQueries,searchTerm)=>searchTerm?savedQueriesfuse.search(searchTerm).map(result=>[result.item,result.matches]):dataWarehouseSavedQueries.map(savedQuery=>[savedQuery,null])]}}),(0,kea_subscriptions_lib.Vt)({dataWarehouseTables:dataWarehouseTables=>{dataWarehouseTablesfuse.setCollection(dataWarehouseTables)},posthogTables:posthogTables=>{posthogTablesfuse.setCollection(posthogTables)},dataWarehouseSavedQueries:dataWarehouseSavedQueries=>{savedQueriesfuse.setCollection(dataWarehouseSavedQueries)}})]);var teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),dashboardsModel=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation/navigationLogic.ts"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),deleteDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/deleteDashboardLogic.ts"),duplicateDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),NewDashboardModal=__webpack_require__("./frontend/src/scenes/dashboard/NewDashboardModal.tsx");let fuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2},"description","tags"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),dashboardsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","dashboardsSidebarLogic"]),(0,index_esm.connect)({values:[dashboardsModel.h,["pinSortedDashboards","dashboardsLoading"],sceneLogic.k,["activeScene","sceneParams"]],actions:[dashboardsModel.h,["pinDashboard","unpinDashboard"],duplicateDashboardLogic.T,["showDuplicateDashboardModal"],deleteDashboardLogic.r,["showDeleteDashboardModal"],newDashboardLogic.Z,["showNewDashboardModal"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantDashboards,s.dashboardsLoading],(relevantDashboards,dashboardsLoading)=>[{key:"dashboards",noun:"dashboard",loading:dashboardsLoading,onAdd:()=>actions.showNewDashboardModal(),modalContent:(0,jsx_runtime.jsx)(NewDashboardModal.O,{}),items:relevantDashboards.map(_ref2=>{let[dashboard,matches]=_ref2;return{key:dashboard.id,name:dashboard.name,url:urls.j.dashboard(dashboard.id),marker:dashboard.pinned?{type:"fold"}:void 0,searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,menuItems:initiateRename=>[{items:[{to:urls.j.dashboard(dashboard.id),onClick:()=>{(0,dashboardLogic.BM)({id:dashboard.id}).mount(),(0,dashboardLogic.BM)({id:dashboard.id}).actions.setDashboardMode(types.MN.Edit,eventUsageLogic.GU.DashboardsList)},label:"Edit"},{onClick:()=>{actions.showDuplicateDashboardModal(dashboard.id,dashboard.name)},label:"Duplicate"}]},{items:[{onClick:()=>{(dashboard.pinned?actions.unpinDashboard:actions.pinDashboard)(dashboard.id,eventUsageLogic.GU.MoreDropdown)},label:dashboard.pinned?"Unpin":"Pin"}]},{items:[{onClick:initiateRename,label:"Rename",keyboardShortcut:["enter"]},{onClick:()=>{actions.showDeleteDashboardModal(dashboard.id)},status:"danger",label:"Delete dashboard"}]}],onRename:async newName=>{await dashboardsModel.h.asyncActions.updateDashboard({id:dashboard.id,name:newName})}}})}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Dashboard&&sceneParams.params.id?["dashboards",parseInt(sceneParams.params.id)]:null],relevantDashboards:[s=>[s.pinSortedDashboards,navigation3000Logic.selectors.searchTerm],(pinSortedDashboards,searchTerm)=>searchTerm?fuse.search(searchTerm).map(result=>[result.item,result.matches]):pinSortedDashboards.map(dashboard=>[dashboard,null])]}}),(0,kea_subscriptions_lib.Vt)({pinSortedDashboards:pinSortedDashboards=>{fuse.setCollection(pinSortedDashboards)}})]);var kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),TaxonomicFilter_types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),actionsLogic=__webpack_require__("./frontend/src/scenes/actions/actionsLogic.ts");function findSearchTermInItemName(name,searchTerm){if(!searchTerm||!name)return null;let ranges=[],workingName=name.toLowerCase(),workingSearchTerm=searchTerm.toLowerCase(),index=workingName.indexOf(workingSearchTerm);for(;-1!==index;)ranges.push([index,index+searchTerm.length]),index=workingName.indexOf(workingSearchTerm,index+1);return ranges.length?{nameHighlightRanges:ranges}:null}let dataManagementSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","dataManagementSidebarLogic"]),(0,index_esm.connect)(()=>({values:[sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"],actionsLogic.M,["actions","actionsLoading"]]})),(0,index_esm.actions)({loadEventDefinitions:(startIndex,stopIndex)=>({startIndex,stopIndex}),loadPropertyDefinitions:(startIndex,stopIndex)=>({startIndex,stopIndex})}),(0,kea_loaders_lib.loaders)(_ref=>{let{values,cache}=_ref;return{infiniteEventDefinitions:[[[],0],{loadEventDefinitions:async _ref2=>{let{startIndex,stopIndex}=_ref2;startIndex||(cache.requestedEventDefinitions=[]);for(let i=startIndex;i{let{startIndex,stopIndex}=_ref3;startIndex||(cache.requestedPropertyDefinitions=[]);for(let i=startIndex;i{let{actions,values,cache}=_ref4;return{contents:[s=>[s.infiniteEventDefinitions,s.infiniteEventDefinitionsLoading,s.infinitePropertyDefinitions,s.infinitePropertyDefinitionsLoading,s.relevantActions,s.actionsLoading],(_ref5,infiniteEventDefinitionsLoading,_ref6,infinitePropertyDefinitionsLoading,relevantActions,actionsLoading)=>{let[eventDefinitions,eventDefinitionCount]=_ref5,[propertyDefinitions,propertyDefinitionCount]=_ref6;return[{key:"event-definitions",noun:"event definition",loading:infiniteEventDefinitionsLoading,items:eventDefinitions.map(eventDefinition=>eventDefinition&&{key:eventDefinition.id,name:(0,taxonomy.R6)(eventDefinition.name,TaxonomicFilter_types.t.Events),url:urls.j.eventDefinition(eventDefinition.id),searchMatch:findSearchTermInItemName((0,taxonomy.R6)(eventDefinition.name,TaxonomicFilter_types.t.Events),values.searchTerm),menuItems:[{label:"View recordings",to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:eventDefinition.name,type:"events",order:0,name:eventDefinition.name}]}]}})}]}),remote:{isItemLoaded:index=>!!(cache.requestedEventDefinitions[index]||eventDefinitions[index]),loadMoreItems:(startIndex,stopIndex)=>actions.loadEventDefinitions(startIndex,stopIndex),itemCount:eventDefinitionCount}},{key:"property-definitions",noun:"property definition",loading:infinitePropertyDefinitionsLoading,items:propertyDefinitions.map(propertyDefinition=>propertyDefinition&&{key:propertyDefinition.id,name:(0,taxonomy.R6)(propertyDefinition.name,TaxonomicFilter_types.t.EventProperties),url:urls.j.propertyDefinition(propertyDefinition.id),searchMatch:findSearchTermInItemName((0,taxonomy.R6)(propertyDefinition.name,TaxonomicFilter_types.t.EventProperties),values.searchTerm)}),remote:{isItemLoaded:index=>!!(cache.requestedPropertyDefinitions[index]||propertyDefinitions[index]),loadMoreItems:(startIndex,stopIndex)=>actions.loadPropertyDefinitions(startIndex,stopIndex),itemCount:propertyDefinitionCount}},{key:"actions",noun:"action",loading:actionsLoading,onAdd:urls.j.action("new"),items:relevantActions.map(_ref7=>{let[action,matches]=_ref7;return{key:action.id,name:action.name,url:urls.j.action(action.id),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null}})}]}],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.EventDefinition?["event-definitions",sceneParams.params.id]:activeScene===sceneTypes.x.PropertyDefinition?["property-definitions",sceneParams.params.id]:activeScene===sceneTypes.x.Action?["actions",sceneParams.params.id]:null],debounceSearch:[s=>[s.searchTerm],()=>!0],relevantActions:[s=>[s.actions,navigation3000Logic.selectors.searchTerm],(actions,searchTerm)=>searchTerm?actionsLogic.J.search(searchTerm).map(result=>[result.item,result.matches]):actions.map(action=>[action,null])]}}),(0,kea_subscriptions_lib.Vt)(_ref8=>{let{actions}=_ref8;return{searchTerm:()=>{actions.loadEventDefinitions(0,100),actions.loadPropertyDefinitions(0,100)}}}),(0,index_esm.afterMount)(_ref9=>{let{actions,cache}=_ref9;cache.requestedEventDefinitions=[],cache.requestedPropertyDefinitions=[],actions.loadEventDefinitions(0,100),actions.loadPropertyDefinitions(0,100)})]);var dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),experimentsLogic=__webpack_require__("./frontend/src/scenes/experiments/experimentsLogic.ts");let experiments_fuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2},"description"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),EXPERIMENT_STATUS_TO_RIBBON_STATUS={draft:"muted",running:"success",complete:"completion"},experimentsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","experimentsSidebarLogic"]),(0,index_esm.connect)({values:[experimentsLogic.OK,["experiments","experimentsLoading"],sceneLogic.k,["activeScene","sceneParams"]],actions:[experimentsLogic.OK,["loadExperiments","deleteExperiment"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantExperiments,s.experimentsLoading],(relevantExperiments,experimentsLoading)=>[{key:"experiments",noun:"experiment",loading:experimentsLoading,items:relevantExperiments.map(_ref2=>{let[experiment,matches]=_ref2,experimentStatus=(0,experimentsLogic.Ot)(experiment);return{key:experiment.id,name:experiment.name,summary:experimentStatus===types.mN.Draft?"Draft":experimentStatus===types.mN.Complete?`Completed ${(0,dayjs.Bv)(experiment.start_date).fromNow()}`:`Running for ${(0,dayjs.Bv)(experiment.start_date).fromNow(!0)} now`,extraContextTop:(0,dayjs.Bv)(experiment.created_at),extraContextBottom:`by ${experiment.created_by?.first_name||"unknown"}`,url:urls.j.experiment(experiment.id),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,marker:{type:"ribbon",status:EXPERIMENT_STATUS_TO_RIBBON_STATUS[experimentStatus]},menuItems:[{items:[{label:"Delete experiment",onClick:()=>actions.deleteExperiment(experiment.id),status:"danger"}]}]}}),onAdd:urls.j.experiment("new")}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Experiment&&sceneParams.params.id?["experiments",parseInt(sceneParams.params.id)]:null],relevantExperiments:[s=>[s.experiments,navigation3000Logic.selectors.searchTerm],(experiments,searchTerm)=>searchTerm?experiments_fuse.search(searchTerm).map(result=>[result.item,result.matches]):experiments.map(experiment=>[experiment,null])]}}),(0,kea_subscriptions_lib.Vt)({experiments:experiments=>{experiments_fuse.setCollection(experiments)}})]);var copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),deleteWithUndo=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),feature_flags_featureFlagLogic=__webpack_require__("./frontend/src/scenes/feature-flags/featureFlagLogic.ts"),FeatureFlags=__webpack_require__("./frontend/src/scenes/feature-flags/FeatureFlags.tsx"),featureFlagsLogic=__webpack_require__("./frontend/src/scenes/feature-flags/featureFlagsLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts");let featureFlags_fuse=new fuse_esm.Z([],{keys:[{name:"key",weight:2},"name","tags"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),featureFlagsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","featureFlagsSidebarLogic"]),(0,index_esm.connect)({values:[featureFlagsLogic.bP,["featureFlags","featureFlagsLoading"],projectLogic.K,["currentProjectId"],sceneLogic.k,["activeScene","sceneParams"],groupsModel.$,["aggregationLabel"]],actions:[featureFlagsLogic.bP,["updateFeatureFlag","loadFeatureFlags"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantFeatureFlags,s.featureFlagsLoading,s.currentProjectId,s.aggregationLabel],(relevantFeatureFlags,featureFlagsLoading,currentProjectId,aggregationLabel)=>[{key:"feature-flags",noun:"feature flag",loading:featureFlagsLoading,onAdd:urls.j.featureFlag("new"),items:relevantFeatureFlags.map(_ref2=>{let[featureFlag,matches]=_ref2;if(!featureFlag.id)throw Error("Feature flag ID should never be missing in the sidebar");let query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.TrendsQuery,series:[{event:"$pageview",name:"$pageview",kind:schema.OH.EventsNode,math:types.vN.UniqueUsers}],breakdownFilter:{breakdown:`$feature/${featureFlag.key}`,breakdown_type:"event"}}};return{key:featureFlag.id,name:featureFlag.key,url:urls.j.featureFlag(featureFlag.id),summary:featureFlag.active?(0,FeatureFlags.groupFilters)(featureFlag.filters,!0,aggregationLabel):(0,jsx_runtime.jsx)("i",{children:"Disabled"}),extraContextTop:(0,dayjs.Bv)(featureFlag.created_at),extraContextBottom:`by ${featureFlag.created_by?.first_name||"unknown"}`,marker:{type:"ribbon",status:featureFlag.active?"success":"danger"},searchMatch:matches?{matchingFields:matches.map(match=>"name"===match.key?"description":match.key),nameHighlightRanges:matches.find(match=>"key"===match.key)?.indices}:null,menuItems:[{items:[{label:"Edit",to:urls.j.featureFlag(featureFlag.id),onClick:()=>{(0,feature_flags_featureFlagLogic.hk)({id:featureFlag.id}).mount(),(0,feature_flags_featureFlagLogic.hk)({id:featureFlag.id}).actions.editFeatureFlag(!0)},disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag."}]},{items:[{label:`${featureFlag.active?"Disable":"Enable"} flag`,onClick:()=>actions.updateFeatureFlag({id:featureFlag.id,payload:{active:!featureFlag.active}}),disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag."},{label:"Copy flag key",onClick:()=>{(0,copyToClipboard.v)(featureFlag.key,"feature flag key")}},{label:"Try out in Insights",to:urls.j.insightNew(void 0,void 0,query),"data-attr":"usage"}]},{items:[{label:"Delete feature flag",onClick:()=>{(0,deleteWithUndo.S)({endpoint:`projects/${currentProjectId}/feature_flags`,object:{name:featureFlag.key,id:featureFlag.id},callback:()=>{actions.loadFeatureFlags()}})},disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag.",status:"danger"}]}]}})}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.FeatureFlag&&sceneParams.params.id?["feature-flags",parseInt(sceneParams.params.id)]:null],relevantFeatureFlags:[s=>[s.featureFlags,navigation3000Logic.selectors.searchTerm],(featureFlags,searchTerm)=>searchTerm?featureFlags_fuse.search(searchTerm).map(result=>[result.item,result.matches]):featureFlags.results.map(featureFlag=>[featureFlag,null])]}}),(0,kea_subscriptions_lib.Vt)({featureFlags:featureFlags=>{featureFlags_fuse.setCollection(featureFlags)}})]);var utils_api=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),savedInsightsLogic=__webpack_require__("./frontend/src/scenes/saved-insights/savedInsightsLogic.ts"),insightsModel=__webpack_require__("./frontend/src/models/insightsModel.tsx");let insightsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","insightsSidebarLogic"]),(0,index_esm.connect)(()=>({values:[savedInsightsLogic.w,["insights","insightsLoading","paramsFromFilters"],sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"]],actions:[savedInsightsLogic.w,["loadInsights","setSavedInsightsFilters","duplicateInsight"]]})),(0,index_esm.reducers)(()=>({infiniteInsights:[[],{[savedInsightsLogic.w.actionTypes.loadInsightsSuccess]:(state,_ref)=>{let{insights}=_ref,items=0===insights.offset?[]:state.slice();for(let i=0;i{let{actions,values,cache}=_ref2;return{contents:[s=>[s.insights,s.infiniteInsights,s.insightsLoading,projectLogic.K.selectors.currentProjectId],(insights,infiniteInsights,insightsLoading,currentProjectId)=>[{key:"insights",noun:"insight",onAdd:urls.j.insightNew(),items:infiniteInsights.map(insight=>{if(insight)return{key:insight.short_id,name:insight.name||insight.derived_name||"Untitled",isNamePlaceholder:!insight.name,url:urls.j.insightView(insight.short_id),searchMatch:findSearchTermInItemName(insight.name||insight.derived_name||"",values.searchTerm),menuItems:initiateRename=>[{items:[{to:urls.j.insightEdit(insight.short_id),label:"Edit"},{onClick:()=>{actions.duplicateInsight(insight)},label:"Duplicate"}]},{items:[{onClick:initiateRename,label:"Rename",keyboardShortcut:["enter"]},{onClick:()=>{(0,deleteWithUndo.c)({object:insight,endpoint:`projects/${currentProjectId}/insights`,callback:actions.loadInsights})},status:"danger",label:"Delete insight"}]}],onRename:async newName=>{let updatedItem=await utils_api.L.update(insight.id,{name:newName});insightsModel.U.actions.renameInsightSuccess(updatedItem)}}}),loading:insightsLoading,remote:{isItemLoaded:index=>!!(cache.requestedInsights[index]||infiniteInsights[index]),loadMoreItems:async startIndex=>{for(let i=startIndex;i[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Insight&&sceneParams.params.shortId?["insights",sceneParams.params.shortId]:null],debounceSearch:[s=>[s.searchTerm],()=>!0]}}),(0,index_esm.listeners)(_ref3=>{let{values,cache}=_ref3;return{loadInsights:()=>{values.paramsFromFilters.offset||(cache.requestedInsights=[])}}}),(0,kea_subscriptions_lib.Vt)(_ref4=>{let{actions}=_ref4;return{searchTerm:searchTerm=>{actions.setSavedInsightsFilters({search:searchTerm},!1,!1)}}}),(0,index_esm.afterMount)(_ref5=>{let{cache}=_ref5;cache.requestedInsights=[]})]);var apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),groupsListLogic=__webpack_require__("./frontend/src/scenes/groups/groupsListLogic.ts"),GroupActorDisplay=__webpack_require__("./frontend/src/scenes/persons/GroupActorDisplay.tsx"),person_utils=__webpack_require__("./frontend/src/scenes/persons/person-utils.ts"),personsLogic=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx");let personsAndGroupsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","personsAndGroupsSidebarLogic"]),(0,index_esm.connect)(()=>({values:[personsLogic.T,["persons","personsLoading"],groupsModel.$,["groupTypes"],sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"]],actions:[personsLogic.T,["setListFilters as setPersonsListFilters","loadPersons"]]})),(0,index_esm.reducers)(()=>({infinitePersons:[[],{[personsLogic.T.actionTypes.loadPersonsSuccess]:(state,_ref)=>{let{persons}=_ref,items=0===persons.offset?[]:state.slice();for(let i=0;i{let{values,cache}=_ref2;return{contents:[s=>[s.persons,s.infinitePersons,s.personsLoading,s.groupTypes,s.groups,s.groupsLoading],(persons,infinitePersons,personsLoading,groupTypes,groups,groupsLoading)=>[{key:"persons",noun:"person",items:infinitePersons.map(person=>{if(!person)return person;let name=(0,person_utils.y)(person),{searchTerm}=values;return{key:person.distinct_ids,name:(0,person_utils.y)(person),url:(0,person_utils.s)(person),searchMatch:findSearchTermInItemName(name,searchTerm)}}),loading:personsLoading,remote:{isItemLoaded:index=>!!(cache.requestedPersons[index]||infinitePersons[index]),loadMoreItems:async(startIndex,stopIndex)=>{let moreUrl=persons.next||persons.previous;if(!moreUrl)throw Error("No URL for loading more persons is known");for(let i=startIndex;i<=stopIndex;i++)cache.requestedPersons[i]=!0;moreUrl=(0,lib.combineUrl)(moreUrl,{offset:startIndex,limit:stopIndex-startIndex+1}).url,await personsLogic.T.asyncActions.loadPersons(moreUrl)},itemCount:persons.count,minimumBatchSize:100}},...Array.from(groupTypes.values()).map(groupType=>({key:`groups-${groupType.group_type_index}`,noun:[groupType.name_singular||`${groupType.group_type} group`,groupType.name_plural||`${groupType.group_type} groups`],items:groups[groupType.group_type_index]?.results.map(group=>{let{searchTerm}=values,displayId=GroupActorDisplay.O(group.group_key,group.group_properties);return{key:group.group_key,name:displayId,url:apps_common_src.jk.group(groupType.group_type_index,group.group_key),searchMatch:findSearchTermInItemName(displayId,searchTerm)}})||[],loading:groupsLoading[groupType.group_type_index]}))]],groups:[s=>[,,,,,].fill(null).map((_,groupTypeIndex)=>state=>{if(s.groupTypes(state)[groupTypeIndex])return(0,groupsListLogic.z)({groupTypeIndex}).mount(),(0,groupsListLogic.z)({groupTypeIndex}).selectors.groups(state)}),(groups0,groups1,groups2,groups3,groups4)=>[groups0,groups1,groups2,groups3,groups4]],groupsLoading:[s=>[,,,,,].fill(null).map((_,groupTypeIndex)=>state=>{if(s.groupTypes(state)[groupTypeIndex])return(0,groupsListLogic.z)({groupTypeIndex}).mount(),(0,groupsListLogic.z)({groupTypeIndex}).selectors.groupsLoading(state)}),(groupsLoading0,groupsLoading1,groupsLoading2,groupsLoading3,groupsLoading4)=>[groupsLoading0,groupsLoading1,groupsLoading2,groupsLoading3,groupsLoading4]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>{if(activeScene===sceneTypes.x.Person){let{_:personDistinctId}=sceneParams.params;return personDistinctId?["persons",personDistinctId]:null}if(activeScene===sceneTypes.x.Group){let{groupKey,groupTypeIndex}=sceneParams.params;return groupKey?[`groups-${groupTypeIndex}`,decodeURIComponent(groupKey)]:null}return null}],debounceSearch:[s=>[s.searchTerm],()=>!0]}}),(0,index_esm.listeners)(_ref3=>{let{cache}=_ref3;return{loadPersons:async _ref4=>{let{url}=_ref4,offset=url?parseInt(new URL(url).searchParams.get("offset")||"0"):0;0===offset&&(cache.requestedPersons=[])}}}),(0,kea_subscriptions_lib.Vt)(_ref5=>{let{actions,values}=_ref5;return{searchTerm:searchTerm=>{for(let{group_type_index:groupTypeIndex}of(actions.setPersonsListFilters({search:searchTerm}),actions.loadPersons(),Object.values(values.groupTypes)))(0,groupsListLogic.z)({groupTypeIndex}).actions.setSearch(searchTerm,!1)}}}),(0,index_esm.afterMount)(_ref6=>{let{actions,cache}=_ref6;cache.requestedPersons=[],actions.loadPersons()})]),ITEM_KEY_PART_SEPARATOR="::",navigation3000Logic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","navigationLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)(()=>({values:[sceneLogic.k,["sceneConfig"],navigationLogic.f,["mobileLayout"],teamLogic.H,["currentTeam","hasOnboardedAnyProduct"]],actions:[navigationLogic.f,["closeAccountPopover"]]})),(0,index_esm.actions)({hideSidebar:!0,showSidebar:newNavbarItemId=>({newNavbarItemId}),toggleNavCollapsed:override=>({override}),showNavOnMobile:!0,hideNavOnMobile:!0,toggleSidebar:!0,setSidebarWidth:width=>({width}),setSidebarOverslide:overslide=>({overslide}),syncSidebarWidthWithMouseMove:delta=>({delta}),syncSidebarWidthWithViewport:!0,beginResize:!0,endResize:!0,acknowledgeSidebarKeyboardShortcut:!0,setIsSearchShown:isSearchShown=>({isSearchShown}),setSearchTerm:searchTerm=>({searchTerm}),initiateNewItemInCategory:category=>({category}),initiateNewItemInlineInCategory:category=>({category}),cancelNewItem:!0,saveNewItem:itemName=>({itemName}),saveNewItemComplete:!0,setLastFocusedItemIndex:index=>({index}),setLastFocusedItemByKey:key=>({key}),focusNextItem:!0,focusPreviousItem:!0,toggleAccordion:key=>({key})}),(0,index_esm.reducers)({isSidebarShown:[!0,{hideSidebar:()=>!1,showSidebar:()=>!0,toggleSidebar:isSidebarShown=>!isSidebarShown}],sidebarWidth:[288,{persist:!0},{setSidebarWidth:(_,_ref)=>{let{width}=_ref;return width}}],sidebarOverslide:[0,{setSidebarOverslide:(_,_ref2)=>{let{overslide}=_ref2;return overslide}}],isResizeInProgress:[!1,{beginResize:()=>!0,endResize:()=>!1}],isNavCollapsedDesktop:[!1,{persist:!0},{toggleNavCollapsed:(state,_ref3)=>{let{override}=_ref3;return null!=override?override:!state}}],isNavShownMobile:[!1,{persist:!0},{showNavOnMobile:()=>!0,hideNavOnMobile:()=>!1,closeAccountPopover:()=>!1}],isSidebarKeyboardShortcutAcknowledged:[!1,{persist:!0},{acknowledgeSidebarKeyboardShortcut:()=>!0}],activeNavbarItemIdRaw:[sceneTypes.x.Dashboards,{persist:!0},{showSidebar:(state,_ref4)=>{let{newNavbarItemId}=_ref4;return newNavbarItemId||state}}],isSearchShown:[!1,{setIsSearchShown:(_,_ref5)=>{let{isSearchShown}=_ref5;return isSearchShown}}],internalSearchTerm:["",{setSearchTerm:(_,_ref6)=>{let{searchTerm}=_ref6;return searchTerm}}],lastFocusedItemIndex:[-1,{setLastFocusedItemIndex:(_,_ref7)=>{let{index}=_ref7;return index}}],accordionCollapseMapping:[{},{persist:!0},{toggleAccordion:(state,_ref8)=>{let{key}=_ref8;return{...state,[key]:!state[key]}}}],newItemInlineCategory:[null,{initiateNewItemInlineInCategory:(_,_ref9)=>{let{category}=_ref9;return category},saveNewItemComplete:()=>null,cancelNewItem:()=>null,toggleSidebar:()=>null,showSidebar:()=>null,hideSidebar:()=>null}],savingNewItem:[!1,{saveNewItem:()=>!0,saveNewItemComplete:()=>!1}]}),(0,index_esm.listeners)(_ref10=>{let{actions,values}=_ref10;return{initiateNewItemInCategory:_ref11=>{let{category:categoryKey}=_ref11,category=values.activeNavbarItem?.logic.values.contents?.find(item=>item.key===categoryKey);if(category){if(!category.onAdd||"function"!=typeof category.onAdd)throw Error(`Sidebar category '${categoryKey}' doesn't support onAdd`)}else throw Error(`Sidebar category '${categoryKey}' doesn't exist`);0===category.onAdd.length?category.onAdd():actions.initiateNewItemInlineInCategory(categoryKey)},saveNewItem:async _ref12=>{let{itemName}=_ref12;try{let categoryKey=values.newItemInlineCategory;if(!categoryKey)throw Error("Can't save new sidebar item without a category");let category=values.activeNavbarItem?.logic.values.contents?.find(item=>item.key===categoryKey);if(category){if(!category.onAdd||"function"!=typeof category.onAdd)throw Error(`Sidebar category '${categoryKey}' doesn't support onAdd`)}else throw Error(`Sidebar category '${categoryKey}' doesn't exist`);await category.onAdd(itemName)}catch(e){(0,esm_exports.Tb)(e),console.error(e),src.UJ.error("Something went wrong while saving the item. Please try again.")}finally{actions.saveNewItemComplete()}},syncSidebarWidthWithMouseMove:_ref13=>{let{delta}=_ref13,newWidthRaw=values.sidebarWidth+values.sidebarOverslide+delta,newWidth=newWidthRaw;newWidth<192?newWidth=192:newWidth>1024&&(newWidth=1024),newWidth>.5*window.innerWidth&&(newWidth=.5*window.innerWidth),actions.setSidebarWidth(newWidth),actions.setSidebarOverslide(newWidthRaw-newWidth),newWidthRaw<96?values.isSidebarShown&&actions.hideSidebar():values.isSidebarShown||actions.showSidebar()},syncSidebarWidthWithViewport:()=>{values.sidebarWidth>.5*window.innerWidth&&actions.setSidebarWidth(.5*window.innerWidth)},endResize:()=>{actions.setSidebarOverslide(values.isSidebarShown?0:-192)},toggleSidebar:()=>{actions.endResize()},focusNextItem:()=>{let nextIndex=values.lastFocusedItemIndex+1;nextIndex{let nextIndex=values.lastFocusedItemIndex-1;nextIndex>=-1&&actions.setLastFocusedItemIndex(nextIndex)},setLastFocusedItemByKey:_ref14=>{let{key}=_ref14,index=values.sidebarContentsFlattened.findIndex(item=>Array.isArray(item.key)?item.key.includes(key):item.key===key);-1!==index&&actions.setLastFocusedItemIndex(index)}}}),(0,index_esm.selectors)({mode:[s=>[s.sceneConfig],sceneConfig=>sceneConfig?.layout!=="plain"||sceneConfig.allowUnauthenticated?sceneConfig?.layout!=="plain"?"full":"none":"minimal"],isNavShown:[s=>[s.isNavShownMobile,s.mobileLayout],(isNavShownMobile,mobileLayout)=>!mobileLayout||isNavShownMobile],isNavCollapsed:[s=>[s.isNavCollapsedDesktop,s.mobileLayout],(isNavCollapsedDesktop,mobileLayout)=>!mobileLayout&&isNavCollapsedDesktop],navbarItems:[s=>[featureFlagLogic.h.selectors.featureFlags,dashboardsModel.h.selectors.dashboardsLoading,dashboardsModel.h.selectors.pinnedDashboards,s.currentTeam,s.hasOnboardedAnyProduct],(featureFlags,dashboardsLoading,pinnedDashboards,currentTeam,hasOnboardedAnyProduct)=>{let isUsingSidebar=featureFlags[constants.y8.POSTHOG_3000_NAV],hasOnboardedFeatureFlags=currentTeam?.has_completed_onboarding_for?.[types.Md.FEATURE_FLAGS],sectionOne=hasOnboardedAnyProduct?[{identifier:sceneTypes.x.ProjectHomepage,label:"Home",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHome,{}),to:urls.j.projectHomepage()},{identifier:sceneTypes.x.Dashboards,label:"Dashboards",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDashboard,{}),logic:isUsingSidebar?dashboardsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.dashboards(),sideAction:{identifier:"pinned-dashboards-dropdown",dropdown:{overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{title:"Pinned dashboards",items:pinnedDashboards.map(dashboard=>({label:dashboard.name,to:urls.j.dashboard(dashboard.id)})),footer:dashboardsLoading&&(0,jsx_runtime.jsxs)("div",{className:"px-2 py-1 text-text-secondary-3000",children:[(0,jsx_runtime.jsx)(src.$j,{})," Loading…"]})}]}),placement:"bottom-end"}}},{identifier:sceneTypes.x.Notebooks,label:"Notebooks",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconNotebook,{}),to:urls.j.notebooks()},{identifier:sceneTypes.x.DataManagement,label:"Data management",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),logic:isUsingSidebar?dataManagementSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.eventDefinitions()},{identifier:sceneTypes.x.PersonsManagement,label:"People and groups",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPeople,{}),logic:isUsingSidebar?personsAndGroupsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.persons()},{identifier:sceneTypes.x.Activity,label:"Activity",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconLive,{}),to:urls.j.activity()}]:[{identifier:sceneTypes.x.Products,label:"Welcome to PostHog",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconLogomark,{}),to:urls.j.products()}];return featureFlags[constants.y8.ARTIFICIAL_HOG]&§ionOne.splice(1,0,{identifier:sceneTypes.x.Max,label:"Max AI",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconSparkles,{}),to:urls.j.max(),tag:"beta"}),featureFlags[constants.y8.FEATURE_MANAGEMENT_UI]&§ionOne.splice(4,0,{identifier:sceneTypes.x.FeatureManagement,label:"Features",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFeatures,{}),logic:isUsingSidebar?featureFlagsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.featureManagement()}),[sectionOne,[{identifier:sceneTypes.x.SavedInsights,label:"Product analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{}),logic:isUsingSidebar?insightsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.savedInsights(),sideAction:{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),to:urls.j.insightNew(),tooltip:"New insight",identifier:sceneTypes.x.Insight}},{identifier:sceneTypes.x.WebAnalytics,label:"Web analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPieChart,{}),to:isUsingSidebar?void 0:urls.j.webAnalytics()},{identifier:sceneTypes.x.Replay,label:"Session replay",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRewindPlay,{}),to:urls.j.replay()},featureFlags[constants.y8.ERROR_TRACKING]?{identifier:sceneTypes.x.ErrorTracking,label:"Error tracking",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconWarning,{}),to:urls.j.errorTracking(),tag:"alpha"}:null,featureFlags[constants.y8.HEATMAPS_UI]?{identifier:sceneTypes.x.Heatmaps,label:"Heatmaps",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCursorClick,{}),to:isUsingSidebar?void 0:urls.j.heatmaps(),tag:"alpha"}:null,{identifier:sceneTypes.x.FeatureFlags,label:"Feature flags",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconToggle,{}),logic:isUsingSidebar?featureFlagsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.featureFlags()},{identifier:sceneTypes.x.Experiments,label:"Experiments",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTestTube,{}),logic:isUsingSidebar?experimentsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.experiments()},{identifier:sceneTypes.x.Surveys,label:"Surveys",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMessage,{}),to:urls.j.surveys()},"test"!==featureFlags[constants.y8.PRODUCT_INTRO_PAGES]||hasOnboardedFeatureFlags?{identifier:sceneTypes.x.EarlyAccessFeatures,label:"Early access features",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRocket,{}),to:urls.j.earlyAccessFeatures()}:null,featureFlags[constants.y8.SQL_EDITOR]?{identifier:sceneTypes.x.SQLEditor,label:"SQL editor",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconServer,{}),to:urls.j.sqlEditor(),logic:editorSidebarLogic}:{identifier:sceneTypes.x.DataWarehouse,label:"Data warehouse",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),to:isUsingSidebar?void 0:urls.j.dataWarehouse()},hasOnboardedAnyProduct?{identifier:sceneTypes.x.Pipeline,label:"Data pipelines",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlug,{}),to:urls.j.pipeline()}:null,featureFlags[constants.y8.MESSAGING]&&hasOnboardedAnyProduct?{identifier:sceneTypes.x.MessagingBroadcasts,label:"Messaging",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMegaphone,{}),to:urls.j.messagingBroadcasts(),tag:"alpha"}:null].filter(utils.DX)]}],navbarItemIdMapping:[s=>[s.navbarItems],navbarItems=>Object.fromEntries(navbarItems.flat().map(item=>[item.identifier,item]))],sidebarOverslideDirection:[s=>[s.sidebarOverslide],sidebarOverslide=>sidebarOverslide<0?"min":sidebarOverslide>0?"max":null],activeNavbarItem:[s=>[s.activeNavbarItemId,s.navbarItemIdMapping],(activeNavbarItemId,navbarItemIdMapping)=>{let item=activeNavbarItemId?navbarItemIdMapping[activeNavbarItemId]:null;return item&&"logic"in item?item:null}],searchTerm:[s=>[s.internalSearchTerm,s.isSearchShown],(internalSearchTerm,isSearchShown)=>isSearchShown?internalSearchTerm:""],sidebarContentsFlattened:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state)||null],sidebarContents=>sidebarContents?sidebarContents.flatMap(item=>"items"in item?item.items:item):[]],normalizedActiveListItemKey:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.activeListItemKey?.(state)||null],activeListItemKey=>activeListItemKey?Array.isArray(activeListItemKey)?activeListItemKey.join(ITEM_KEY_PART_SEPARATOR):activeListItemKey:null],activeNavbarItemId:[s=>[s.activeNavbarItemIdRaw,featureFlagLogic.h.selectors.featureFlags],(activeNavbarItemIdRaw,featureFlags)=>featureFlags[constants.y8.SQL_EDITOR]&&activeNavbarItemIdRaw===sceneTypes.x.SQLEditor?sceneTypes.x.SQLEditor:featureFlags[constants.y8.POSTHOG_3000_NAV]?activeNavbarItemIdRaw:null],newItemCategory:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state)||null,s.newItemInlineCategory,lib.router.selectors.location],(sidebarContents,newItemInlineCategory,location1)=>sidebarContents&&(newItemInlineCategory||sidebarContents.find(category=>"string"==typeof category.onAdd&&category.onAdd===location1.pathname)?.key)||null]}),(0,kea_subscriptions_lib.Vt)(_ref15=>{let{props,cache,actions,values}=_ref15;return{isResizeInProgress:isResizeInProgress=>{if(isResizeInProgress)return cache.onMouseMove=e=>actions.syncSidebarWidthWithMouseMove(e.movementX),cache.onMouseUp=e=>{0===e.button&&actions.endResize()},document.addEventListener("mousemove",cache.onMouseMove),document.addEventListener("mouseup",cache.onMouseUp),()=>{};document.removeEventListener("mousemove",cache.onMouseMove),document.removeEventListener("mouseup",cache.onMouseUp)},sidebarContentsFlattened:sidebarContentsFlattened=>{for(let item of sidebarContentsFlattened)item.ref||(item.ref=react.createRef());actions.setLastFocusedItemIndex(-1)},lastFocusedItemIndex:lastFocusedItemIndex=>{if(lastFocusedItemIndex>=0){let item=values.sidebarContentsFlattened[lastFocusedItemIndex];item.ref?.current?.focus()}else props.inputElement?.focus()}}}),(0,index_esm.events)(_ref16=>{let{props,actions,cache}=_ref16;return{afterMount:()=>{cache.onResize=()=>actions.syncSidebarWidthWithViewport(),cache.onKeyDown=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(actions.toggleSidebar(),e.preventDefault()),"f"===e.key&&e.shiftKey&&(e.metaKey||e.ctrlKey)&&(actions.setIsSearchShown(!0),props.inputElement?.focus(),e.preventDefault())},window.addEventListener("resize",cache.onResize),window.addEventListener("keydown",cache.onKeyDown)},beforeUnmount:()=>{window.removeEventListener("resize",cache.onResize),window.removeEventListener("resize",cache.onKeyDown)}}})])},"./frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>SIDE_PANEL_TABS,W:()=>SidePanel_SidePanel});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),SidePanel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/sidepanel/SidePanel.scss"),SidePanel_default=__webpack_require__.n(SidePanel),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(SidePanel_default(),options),SidePanel_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Resizer=__webpack_require__("./frontend/src/lib/components/Resizer/Resizer.tsx"),resizerLogic=__webpack_require__("./frontend/src/lib/components/Resizer/resizerLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),NotebookPanel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/NotebookPanel/NotebookPanel.scss"),NotebookPanel_default=__webpack_require__.n(NotebookPanel),NotebookPanel_options={};NotebookPanel_options.insert="head",NotebookPanel_options.singleton=!1,injectStylesIntoStyleTag_default()(NotebookPanel_default(),NotebookPanel_options),NotebookPanel_default().locals;var useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),sidePanelStateLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SidePanelPaneHeader(_ref){let{children,title}=_ref,{modalMode}=(0,index_esm.useValues)(sidePanelStateLogic.f),{closeSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f);return(0,jsx_runtime.jsxs)("header",{className:(0,clsx_m.default)("border-b shrink-0 flex items-center justify-end gap-1",{"p-1 h-10":!modalMode,"pb-2 mt-2 mx-3":modalMode}),children:[title?(0,jsx_runtime.jsx)("h3",{className:(0,clsx_m.default)("flex-1 flex items-center gap-1 font-semibold mb-0 truncate",{"text-base px-2":!modalMode}),children:title}):null,children,(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:()=>closeSidePanel(),tooltip:modalMode?"Close":"Close this side panel",tooltipPlacement:modalMode?"top":"bottom-end"})]})}var types=__webpack_require__("./frontend/src/types.ts"),Notebook=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/Notebook.tsx"),notebooksModel=__webpack_require__("./frontend/src/models/notebooksModel.ts"),NotebookSelectButton=__webpack_require__("./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx");function NotebookListMini(_ref){let{selectedNotebookId}=_ref,{notebooks,notebookTemplates}=(0,index_esm.useValues)(notebooksModel.L),selectedTitle="scratchpad"===selectedNotebookId?"My scratchpad":notebookTemplates.find(notebook=>notebook.short_id===selectedNotebookId)?.title||notebooks.find(notebook=>notebook.short_id===selectedNotebookId)?.title||"Untitled";return(0,jsx_runtime.jsx)(NotebookSelectButton.tI,{placement:"bottom-start",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",truncate:!0,children:selectedTitle||"Notebooks"})})}var notebookLogic=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/notebookLogic.ts"),NotebookMeta=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx"),NotebookMenu=__webpack_require__("./frontend/src/scenes/notebooks/NotebookMenu.tsx"),notebookPanelLogic=__webpack_require__("./frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts");function NotebookPanelDropzone(){let[isDragActive,setIsDragActive]=(0,react.useState)(!1),{dropMode,droppedResource}=(0,index_esm.useValues)(notebookPanelLogic.F),{setDroppedResource}=(0,index_esm.useActions)(notebookPanelLogic.F);return dropMode||droppedResource?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("NotebookPanelDropzone",{"NotebookPanelDropzone--active":isDragActive,"NotebookPanelDropzone--dropped":!!droppedResource}),onDragEnter:()=>setIsDragActive(!0),onDragLeave:()=>setIsDragActive(!1),onDragOver:e=>e.preventDefault(),onDrop:event=>{if(event.preventDefault(),setIsDragActive(!1),!event.dataTransfer)return null;let text=event.dataTransfer.getData("text/plain"),node=event.dataTransfer.getData("node"),properties=event.dataTransfer.getData("properties");setDroppedResource(node?{type:node,attrs:properties?JSON.parse(properties):{}}:text)},children:droppedResource?(0,jsx_runtime.jsxs)("div",{className:"NotebookPanelDropzone__dropped",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-start justify-between",children:[(0,jsx_runtime.jsx)("h2",{children:"Add dropped resource to..."}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",onClick:()=>setDroppedResource(null),children:"Cancel"})]}),(0,jsx_runtime.jsx)(NotebookSelectButton.Ld,{onNotebookOpened:notebookLogic=>{setDroppedResource(null),droppedResource&&("string"!=typeof droppedResource?notebookLogic.actions.insertAfterLastNode(droppedResource):notebookLogic.actions.pasteAfterLastNode(droppedResource))},resource:!0})]}):(0,jsx_runtime.jsx)("div",{className:"NotebookPanelDropzone__message",children:"Drop here for a different Notebook"})}):null}var exporter=__webpack_require__("./frontend/src/lib/components/ExportButton/exporter.tsx"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),exportsLogic=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts");let sidePanelExportsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelExportsLogic"]),(0,index_esm.connect)({values:[exportsLogic.exportsLogic,["exports","freshUndownloadedExports"]],actions:[sidePanelStateLogic.f,["openSidePanel"],exportsLogic.exportsLogic,["loadExports","removeFresh"]]}),(0,index_esm.afterMount)(_ref=>{let{actions}=_ref;actions.loadExports()})]),ExportsContent=()=>{let{exports,freshUndownloadedExports}=(0,index_esm.useValues)(sidePanelExportsLogic),{loadExports,removeFresh}=(0,index_esm.useActions)(sidePanelExportsLogic);return(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 overflow-y-auto p-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex justify-end",children:(0,jsx_runtime.jsx)(src.Jp,{onClick:loadExports,type:"tertiary",size:"small",icon:(0,jsx_runtime.jsx)(icons.tr,{}),children:"Refresh"})}),exports.map(asset=>{let isNotDownloaded=freshUndownloadedExports.some(fresh=>fresh.id===asset.id);return(0,jsx_runtime.jsx)(src.Jp,{type:isNotDownloaded?"primary":"secondary",fullWidth:!0,className:"mt-2",disabledReason:asset.has_content?void 0:"Export not ready yet",onClick:()=>{removeFresh(asset),(0,exporter._)(asset)},sideIcon:asset.has_content?(0,jsx_runtime.jsx)(posthog_icons_es.IconDownload,{className:"text-link"}):void 0,children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between flex-auto p-2",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("span",{className:"text-link font-medium block",children:asset.filename}),asset.created_at&&(0,jsx_runtime.jsx)("span",{className:"text-xs mt-1",children:(0,dayjs.Bv)(asset.created_at).fromNow()}),asset.expires_after&&(0,jsx_runtime.jsxs)("span",{className:"text-xs text-muted mt-1",children:[" ","\xb7 expires ",(0,dayjs.Bv)(asset.expires_after).fromNow()]}),isNotDownloaded&&(0,jsx_runtime.jsx)("span",{className:"text-xs text-muted mt-1",children:" \xb7 not downloaded yet"})]}),(0,jsx_runtime.jsx)("div",{children:!asset.has_content&&(0,jsx_runtime.jsx)(src.$j,{})})]})},asset.id)})]})})};var themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),sidePanelContextLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelContextLogic.ts"),AccessControlObject=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),LemonProgressCircle=__webpack_require__("./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),activationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/activation/activationLogic.ts");let ActivationTask=_ref2=>{let{id,name,description,completed,canSkip,skipped,url}=_ref2,{runTask,skipTask}=(0,index_esm.useActions)(activationLogic.z),{reportActivationSideBarTaskClicked}=(0,index_esm.useActions)(eventUsageLogic.vx),content=(0,jsx_runtime.jsxs)("div",{className:"my-4 mx-2",children:[(0,jsx_runtime.jsx)("p",{className:"m-0",children:name}),!completed&&!skipped&&(0,jsx_runtime.jsx)("p",{className:"font-normal text-xs mt-2 mb-0 mx-0",children:description})]}),params={id,fullWidth:!0,type:"secondary",icon:completed?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}):skipped?(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}):null,tooltip:name};return url?(params.to=url,params.targetBlank=!0,params.onClick=()=>{reportActivationSideBarTaskClicked(id)}):params.onClick=()=>{runTask(id),reportActivationSideBarTaskClicked(id)},(0,jsx_runtime.jsx)("li",{children:completed||skipped||!canSkip?(0,jsx_runtime.jsx)(src.Jp,{...params,children:content}):(0,jsx_runtime.jsx)(src.Jp,{...params,sideAction:{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:"Skip task",onClick:()=>skipTask(id)},children:content})})};var ActivityLog=__webpack_require__("./frontend/src/lib/components/ActivityLog/ActivityLog.tsx"),humanizeActivity=__webpack_require__("./frontend/src/lib/components/ActivityLog/humanizeActivity.tsx"),MemberSelect=__webpack_require__("./frontend/src/lib/components/MemberSelect.tsx"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),usePageVisibility=__webpack_require__("./frontend/src/lib/hooks/usePageVisibility.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),sidePanelActivityLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx"),metalyticsLogic=__webpack_require__("./frontend/src/lib/components/Metalytics/metalyticsLogic.ts"),ProfileBubbles=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx");function SidePanelActivityMetalytics(){var _viewCount$views,_viewCount$users;let{scope,instanceId,viewCount,recentUserMembers,viewCountLoading,recentUsersLoading}=(0,index_esm.useValues)(metalyticsLogic.W);if(!instanceId)return(0,jsx_runtime.jsx)("p",{className:"border-dashed ",children:"You can see internal analytics of how your Organization members are using PostHog for things such as Dashboards, Insights, Playlists etc. Open an app to see the viewership data here."});let humanizedScope=`this ${scope?(0,humanizeActivity.VI)(scope,!0):"app"}`;return(0,jsx_runtime.jsxs)("div",{className:"space-y-4 ",children:[(0,jsx_runtime.jsxs)("p",{children:['You are viewing "meta" analytics of how your organization members are interacting with'," ",(0,jsx_runtime.jsx)("b",{children:humanizedScope}),"."]}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,jsx_runtime.jsx)(src.u,{title:`The total number of times ${humanizedScope} has been viewed by members of your organization.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Views"}),(0,jsx_runtime.jsx)("div",{className:"text-2xl font-semibold",children:viewCountLoading?(0,jsx_runtime.jsx)(src.$j,{}):null!==(_viewCount$views=viewCount?.views)&&void 0!==_viewCount$views?_viewCount$views:0})]})}),(0,jsx_runtime.jsx)(src.u,{title:`The total number of unique organization members who have viewed ${humanizedScope}.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Viewers"}),(0,jsx_runtime.jsx)("div",{className:"text-2xl font-semibold",children:viewCountLoading?(0,jsx_runtime.jsx)(src.$j,{}):null!==(_viewCount$users=viewCount?.users)&&void 0!==_viewCount$users?_viewCount$users:0})]})}),(0,jsx_runtime.jsx)(src.u,{title:`The most recent 30 users who have viewed ${humanizedScope}.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Recent viewers (30 days)"}),recentUsersLoading?(0,jsx_runtime.jsx)(src.$j,{}):(0,jsx_runtime.jsx)(ProfileBubbles.r,{className:"mt-2",people:recentUserMembers.map(member=>({email:member.user.email,name:member.user.first_name,title:member.user.email})),limit:3})]})})]})]})}var LinkedHogFunctions=__webpack_require__("./frontend/src/scenes/pipeline/hogfunctions/list/LinkedHogFunctions.tsx");function SidePanelActivitySubscriptions(){return(0,jsx_runtime.jsxs)("div",{className:"space-y-4 ",children:[(0,jsx_runtime.jsx)("p",{children:"Get notified of your team's activity"}),(0,jsx_runtime.jsx)(LinkedHogFunctions.k,{type:"internal_destination",subTemplateId:"activity-log",filters:{events:[{id:"$activity_log_entry_created",type:"events"}]}})]})}var KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),commentsLogic=__webpack_require__("./frontend/src/scenes/comments/commentsLogic.ts");let CommentComposer=props=>{let{key,composedComment,commentsLoading,replyingCommentId,itemContext}=(0,index_esm.useValues)((0,commentsLogic.x)(props)),{setComposedComment,sendComposedContent,setReplyingComment,setComposerRef,clearItemContext}=(0,index_esm.useActions)((0,commentsLogic.x)(props)),placeholder=replyingCommentId?"Reply...":`Comment on ${props.item_id?"this ":""}${(0,humanizeActivity.VI)(props.scope,!!props.item_id)}`;return(0,react.useEffect)(()=>()=>clearItemContext(),[key]),(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsx)(src.X7,{"data-attr":"comment-composer",placeholder:placeholder,value:composedComment,onChange:setComposedComment,disabled:commentsLoading,onPressCmdEnter:sendComposedContent,ref:setComposerRef}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),replyingCommentId?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setReplyingComment(null),children:"Cancel reply"}):null,itemContext?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>clearItemContext(),children:"Cancel"}):null,(0,jsx_runtime.jsxs)(src.Jp,{type:"primary",onClick:sendComposedContent,disabledReason:composedComment?null:"No message",sideIcon:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0}),"data-attr":"discussions-comment",children:["Add ",replyingCommentId?"reply":"comment"]})]})]})};var apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),LemonMarkdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMarkdown/index.ts");let Comment=_ref=>{var _comment$created_by$f;let{comment}=_ref,{editingComment,commentsLoading,replyingCommentId}=(0,index_esm.useValues)(commentsLogic.x),{deleteComment,setEditingComment,persistEditedComment,setReplyingComment}=(0,index_esm.useActions)(commentsLogic.x),ref=(0,react.useRef)(null),isHighlighted=replyingCommentId===comment.id||editingComment?.id===comment.id;return(0,react.useEffect)(()=>{isHighlighted&&ref.current?.scrollIntoView()},[isHighlighted]),(0,jsx_runtime.jsxs)("div",{ref:ref,className:(0,clsx_m.default)("Comment border rounded-lg bg-bg-light",isHighlighted&&"border-primary-3000"),"data-comment-id":comment.id,children:[(0,jsx_runtime.jsxs)("div",{className:"flex-1 flex justify-start p-2 gap-2",children:[(0,jsx_runtime.jsx)(src.YY,{className:"mt-1",size:"xl",user:comment.created_by}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{className:"flex-1 font-semibold ",children:null!==(_comment$created_by$f=comment.created_by?.first_name)&&void 0!==_comment$created_by$f?_comment$created_by$f:"Unknown user"}),comment.created_at?(0,jsx_runtime.jsx)("span",{className:"text-xs",children:(0,jsx_runtime.jsx)(apps_common_src.w4,{time:comment.created_at})}):null,(0,jsx_runtime.jsx)(src.d6,{items:[{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconShare,{}),label:"Reply",onClick:()=>{var _comment$source_comme;return setReplyingComment(null!==(_comment$source_comme=comment.source_comment)&&void 0!==_comment$source_comme?_comment$source_comme:comment.id)}},{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{}),label:"Edit",onClick:()=>setEditingComment(comment)},{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheck,{}),label:"Delete",onClick:()=>deleteComment(comment)}],children:(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{}),size:"xsmall"})})]}),(0,jsx_runtime.jsx)(LemonMarkdown.j,{lowKeyHeadings:!0,children:comment.content}),comment.version?(0,jsx_runtime.jsx)("span",{className:"text-xs text-muted italic",children:"(edited)"}):null]})]}),editingComment?.id===comment.id?(0,jsx_runtime.jsxs)("div",{className:"space-y-2 border-t p-2",children:[(0,jsx_runtime.jsx)(src.X7,{"data-attr":"comment-composer",placeholder:"Edit comment",value:editingComment.content,onChange:value=>setEditingComment({...editingComment,content:value}),disabled:commentsLoading,onPressCmdEnter:persistEditedComment}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setEditingComment(null),disabled:commentsLoading,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:persistEditedComment,disabledReason:editingComment.content?commentsLoading?"Saving...":null:"No message",sideIcon:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0}),children:"Save changes"})]})]}):null]})},CommentWithReplies=_ref2=>{let{commentWithReplies}=_ref2,{comment,replies}=commentWithReplies;return(0,jsx_runtime.jsxs)("div",{className:"relative space-y-2",children:[comment?(0,jsx_runtime.jsx)(Comment,{comment:comment}):(0,jsx_runtime.jsx)("div",{className:"border rounded border-dashed p-2 font-semibold italic bg-bg-accent-3000 text-muted-alt",children:"Deleted comment"}),(0,jsx_runtime.jsx)("div",{className:"pl-8 space-y-2",children:replies?.map(x=>jsx_runtime.jsx(CommentWithReplies,{commentWithReplies:{id:x.id,comment:x,replies:[]}},x.id))})]})},CommentsList=props=>{let{key,commentsWithReplies,commentsLoading}=(0,index_esm.useValues)((0,commentsLogic.x)(props)),{loadComments}=(0,index_esm.useActions)((0,commentsLogic.x)(props));return(0,react.useEffect)(()=>{loadComments()},[key]),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:commentsLogic.x,props:props,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[!commentsWithReplies?.length&&commentsLoading?(0,jsx_runtime.jsx)("div",{className:"space-y-2",children:(0,jsx_runtime.jsx)(src.yW,{className:"h-10 w-full"})}):commentsWithReplies?.length?null:(0,jsx_runtime.jsxs)("div",{className:"mx-auto p-8 max-w-160 mt-8 space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"max-w-120 mx-auto",children:(0,jsx_runtime.jsx)(hedgehogs.PhonePairHogs,{className:"w-full h-full"})}),(0,jsx_runtime.jsx)("h2",{children:"Start the discussion!"}),(0,jsx_runtime.jsx)("p",{children:"You can add comments about this page for your team members to see. Great for sharing context or ideas without getting in the way of the thing you are commenting on"})]}),(0,jsx_runtime.jsx)("div",{className:"space-y-2",children:commentsWithReplies?.map(x=>jsx_runtime.jsx(CommentWithReplies,{commentWithReplies:x},x.id))})]})})};var lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let sidePanelDiscussionLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelDiscussionLogic"]),(0,index_esm.actions)({loadCommentCount:!0,resetCommentCount:!0}),(0,index_esm.connect)({values:[featureFlagLogic.h,["featureFlags"],sidePanelContextLogic.g,["sceneSidePanelContext"]]}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{commentCount:[0,{loadCommentCount:async(_,breakpoint)=>{if(!values.featureFlags[constants.y8.DISCUSSIONS]||!values.commentsLogicProps)return 0;await breakpoint(100);let response=await api.ZP.comments.getCount({...values.commentsLogicProps});return breakpoint(),response},resetCommentCount:()=>0}]}}),(0,index_esm.selectors)({commentsLogicProps:[s=>[s.sceneSidePanelContext],sceneSidePanelContext=>sceneSidePanelContext.activity_scope?{scope:sceneSidePanelContext.activity_scope,item_id:sceneSidePanelContext.activity_item_id}:null]}),(0,kea_subscriptions_lib.Vt)(_ref2=>{let{actions}=_ref2;return{commentsLogicProps:props=>{props?actions.loadCommentCount():actions.resetCommentCount()}}})]),DiscussionContent=_ref=>{let{logicProps}=_ref,{selectedTabOptions}=(0,index_esm.useValues)(sidePanelStateLogic.f),{setReplyingComment}=(0,index_esm.useActions)((0,commentsLogic.x)(logicProps));return(0,react.useEffect)(()=>{selectedTabOptions&&setReplyingComment(selectedTabOptions)},[selectedTabOptions]),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1 overflow-y-auto p-2",children:(0,jsx_runtime.jsx)(CommentsList,{...logicProps})}),(0,jsx_runtime.jsx)("div",{className:"border-t px-3 pb-3",children:(0,jsx_runtime.jsx)(CommentComposer,{...logicProps})})]})};var kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),sceneLogic=__webpack_require__("./frontend/src/scenes/sceneLogic.ts");let POSTHOG_WEBSITE_ORIGIN="https://posthog.com",sanitizePath=path=>"/"===path[0]?path:`/${path}`,getPathFromUrl=urlOrPath=>{try{let url=new URL(urlOrPath);return url.pathname+url.search+url.hash}catch(e){return urlOrPath}},sidePanelDocsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelDocsLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)({actions:[sidePanelStateLogic.f,["openSidePanel","closeSidePanel","setSidePanelOptions"]],values:[sceneLogic.k,["sceneConfig"],sidePanelStateLogic.f,["selectedTabOptions"]]}),(0,index_esm.actions)({updatePath:path=>({path}),setInitialPath:path=>({path}),unmountIframe:!0,handleExternalUrl:urlOrPath=>({urlOrPath}),setMenuOptions:menuOptions=>({menuOptions}),setIframeReady:ready=>({ready}),setActiveMenuName:activeMenuName=>({activeMenuName}),navigateToPage:path=>({path})}),(0,index_esm.reducers)(()=>({iframeReady:[!1,{setIframeReady:(_,_ref)=>{let{ready}=_ref;return ready}}],menuOptions:[null,{setMenuOptions:(_,_ref2)=>{let{menuOptions}=_ref2;return menuOptions}}],activeMenuName:[null,{setActiveMenuName:(_,_ref3)=>{let{activeMenuName}=_ref3;return activeMenuName}}],currentPath:[null,{updatePath:(_,_ref4)=>{let{path}=_ref4;return sanitizePath(path)}}],initialPath:["/docs",{persist:!0},{setInitialPath:(_,_ref5)=>{let{path}=_ref5;return sanitizePath(path)}}]})),(0,index_esm.selectors)({iframeSrc:[s=>[s.initialPath],initialPath=>`${POSTHOG_WEBSITE_ORIGIN}${null!=initialPath?initialPath:""}`],currentUrl:[s=>[s.currentPath],currentPath=>`${POSTHOG_WEBSITE_ORIGIN}${null!=currentPath?currentPath:""}`]}),(0,index_esm.listeners)(_ref6=>{let{actions,values,props}=_ref6;return{openSidePanel:_ref7=>{let{options}=_ref7;if(options){let initialPath=getPathFromUrl(options);actions.setInitialPath(initialPath),actions.navigateToPage(initialPath)}},unmountIframe:()=>{var _values$currentPath;actions.setInitialPath(null!==(_values$currentPath=values.currentPath)&&void 0!==_values$currentPath?_values$currentPath:"/docs")},handleExternalUrl:_ref8=>{let{urlOrPath}=_ref8;kea_router_lib.router.actions.push(getPathFromUrl(urlOrPath))},navigateToPage:_ref9=>{let{path}=_ref9;path&&props.iframeRef.current?.contentWindow?.postMessage({type:"navigate",url:path},"*")},updatePath:_ref10=>{let{path}=_ref10;actions.setSidePanelOptions(path)}}}),(0,index_esm.afterMount)(_ref11=>{let{actions,values,cache}=_ref11;if(values.selectedTabOptions){let initialPath=getPathFromUrl(values.selectedTabOptions);actions.setInitialPath(initialPath)}else values.sceneConfig?.defaultDocsPath&&actions.setInitialPath(values.sceneConfig?.defaultDocsPath);cache.onWindowMessage=event=>{if(event.origin===POSTHOG_WEBSITE_ORIGIN){if("internal-navigation"===event.data.type){actions.updatePath(event.data.url);return}if("docs-ready"===event.data.type){actions.setIframeReady(!0);return}if("external-navigation"===event.data.type){actions.handleExternalUrl(event.data.url);return}if("docs-menu"===event.data.type){actions.setMenuOptions(event.data.menu);return}if("docs-active-menu"===event.data.type){actions.setActiveMenuName(event.data.activeMenuName);return}console.warn("Unhandled iframe message from Docs:",event.data)}},window.addEventListener("message",cache.onWindowMessage)}),(0,index_esm.beforeUnmount)(_ref12=>{var _values$currentPath2;let{actions,values,cache}=_ref12;actions.setInitialPath(null!==(_values$currentPath2=values.currentPath)&&void 0!==_values$currentPath2?_values$currentPath2:"/docs"),window.removeEventListener("message",cache.onWindowMessage)})]);function SidePanelDocsSkeleton(){return(0,jsx_runtime.jsxs)("div",{className:"absolute inset-0 p-4 space-y-2",children:[(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-10 mb-12"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/3 h-8"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/2 h-4 mb-10"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-80"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-60"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-40"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/2 h-4 opacity-20"})]})}var FeaturePreviews=__webpack_require__("./frontend/src/layout/FeaturePreviews/FeaturePreviews.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),Settings=__webpack_require__("./frontend/src/scenes/settings/Settings.tsx"),settingsLogic=__webpack_require__("./frontend/src/scenes/settings/settingsLogic.ts"),sidePanelSettingsLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelSettingsLogic.tsx"),sidePanelLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx"),sidePanelStatusLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelStatusLogic.tsx"),SupportForm=__webpack_require__("./frontend/src/lib/components/Support/SupportForm.tsx"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),algoliasearch_lite_umd=__webpack_require__("./node_modules/.pnpm/algoliasearch@4.22.1/node_modules/algoliasearch/dist/algoliasearch-lite.umd.js"),algoliasearch_lite_umd_default=__webpack_require__.n(algoliasearch_lite_umd),useHits=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useHits.js"),useSearchBox=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useSearchBox.js"),useRefinementList=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useRefinementList.js"),InstantSearch=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/components/InstantSearch.js"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),List=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/List/index.js");let searchClient=algoliasearch_lite_umd_default()("7VNQB5W0TX","37f41fd37095bc85af76ed4edc85eb5a"),rowRenderer=_ref=>{let{key,index,style,hits,activeOption}=_ref,{slug,title,type,resolved}=hits[index];return(0,jsx_runtime.jsx)("li",{style:style,role:"listitem",tabIndex:-1,className:"p-1 border-b last:border-b-0",children:(0,jsx_runtime.jsx)(src.Jp,{active:activeOption===index,to:`https://posthog.com/${slug}`,className:"[&_>span>span]:flex-col [&_>span>span]:items-start [&_>span>span]:space-y-1",children:(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsxs)("span",{className:"flex space-x-2 items-center",children:[(0,jsx_runtime.jsx)("p",{className:"m-0 font-bold font-sans line-clamp-1",children:title}),"question"===type&&resolved&&(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:"text-success size-4 flex-shrink-0"})]}),(0,jsx_runtime.jsxs)("p",{className:"text-xs m-0 opacity-80 font-normal font-sans line-clamp-1",children:["/",slug]})]})})},key)},Hits=_ref2=>{let{activeOption}=_ref2,{hits}=(0,useHits.O)();return(0,jsx_runtime.jsx)("ol",{role:"listbox",className:"list-none m-0 p-0 h-[80vh]",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref3=>{let{height,width}=_ref3;return(0,jsx_runtime.jsx)(List.aV,{scrollToIndex:activeOption,width:width,height:height,rowCount:hits.length,rowHeight:50,rowRenderer:options=>rowRenderer({...options,hits,activeOption})})}})})},SearchInput=_ref4=>{let{value,setValue}=_ref4,{refine}=(0,useSearchBox.l)();return(0,jsx_runtime.jsx)(src.DF,{onChange:value=>{setValue(value),refine(value)},value:value,type:"search",fullWidth:!0,placeholder:"Search..."})},tags=[{type:"all",label:"All"},{type:"docs",label:"Docs"},{type:"question",label:"Questions"},{type:"tutorial",label:"Tutorials"}],SearchTag=_ref5=>{let{type,label,active,onClick}=_ref5,{refine,items}=(0,useRefinementList.c)({attribute:"type"}),itemCount="all"!==type&&items.find(_ref6=>{let{value}=_ref6;return value===type})?.count;return(0,react.useEffect)(()=>{refine(type)},[]),(0,jsx_runtime.jsx)("button",{className:"p-0 cursor-pointer bg-bg-light",onClick:e=>{e.stopPropagation(),onClick(type)},children:(0,jsx_runtime.jsxs)(src.oe,{size:"medium",type:active?"primary":"option",children:[(0,jsx_runtime.jsx)("span",{children:label}),"all"!==type&&(0,jsx_runtime.jsxs)("span",{children:["(",null!=itemCount?itemCount:0,")"]})]})})},Tags=_ref7=>{let{activeTag,setActiveTag}=_ref7,handleClick=type=>{setActiveTag(type)};return(0,jsx_runtime.jsx)("ul",{className:"list-none m-0 p-0 flex space-x-1 mt-1 mb-0.5 pb-1.5 border-b px-2",children:tags.map(tag=>{let{type}=tag;return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(SearchTag,{...tag,active:activeTag===type,onClick:handleClick})},type)})})},Search=()=>{let{openSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f),{hits}=(0,useHits.O)(),{items,refine}=(0,useRefinementList.c)({attribute:"type"}),ref=(0,react.useRef)(null),[searchValue,setSearchValue]=(0,react.useState)(""),[activeOption,setActiveOption]=(0,react.useState)(),[activeTag,setActiveTag]=(0,react.useState)("all"),[searchOpen,setSearchOpen]=(0,react.useState)(!1);return(0,react.useEffect)(()=>{setSearchOpen(!!searchValue),setActiveOption(0)},[searchValue]),(0,react.useEffect)(()=>{if(setActiveOption(0),"all"===activeTag){let filteredItems=items.filter(_ref10=>{let{value}=_ref10;return tags.some(_ref11=>{let{type}=_ref11;return type===value})});filteredItems.forEach(_ref12=>{let{value,isRefined}=_ref12;isRefined||refine(value)})}else items.forEach(_ref13=>{let{value,isRefined}=_ref13;isRefined&&refine(value)}),refine(activeTag)},[activeTag]),(0,react.useEffect)(()=>{let handleClick=e=>{ref?.current?.contains(e.target)||setSearchOpen(!1)};return window.addEventListener("click",handleClick),()=>{window.removeEventListener("click",handleClick)}},[]),(0,jsx_runtime.jsxs)("div",{className:"relative",ref:ref,onKeyDown:e=>{switch(e.key){case"Enter":void 0!==activeOption&&openSidePanel(types.H$.Docs,`https://posthog.com/${hits[activeOption].slug}`);break;case"Escape":setSearchOpen(!1);break;case"ArrowDown":e.preventDefault(),setActiveOption(currOption=>void 0===currOption||currOption>=hits.length-1?0:currOption+1);break;case"ArrowUp":e.preventDefault(),setActiveOption(currOption=>{if(void 0!==currOption)return currOption<=0?hits.length-1:currOption-1});break;case"Tab":case"ArrowRight":{e.preventDefault();let currTagIndex=tags.findIndex(_ref8=>{let{type}=_ref8;return type===activeTag});setActiveTag(tags[currTagIndex>=tags.length-1?0:currTagIndex+1].type);break}case"ArrowLeft":{e.preventDefault();let currTagIndex=tags.findIndex(_ref9=>{let{type}=_ref9;return type===activeTag});setActiveTag(tags[currTagIndex<=0?tags.length-1:currTagIndex-1].type)}}},children:[(0,jsx_runtime.jsx)(SearchInput,{value:searchValue,setValue:setSearchValue}),searchOpen&&(0,jsx_runtime.jsxs)("div",{className:"absolute w-full bg-bg-light z-50 border rounded-lg shadow-xl mt-0.5",children:[(0,jsx_runtime.jsx)(Tags,{activeTag:activeTag,setActiveTag:setActiveTag}),(0,jsx_runtime.jsx)(Hits,{activeOption:activeOption})]})]})};function AlgoliaSearch(){return(0,jsx_runtime.jsx)(InstantSearch.p,{searchClient:searchClient,indexName:"prod_posthog_com",children:(0,jsx_runtime.jsx)(Search,{})})}let PRODUCTS=[{name:"Product OS",slug:"product-os",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconStack,{className:"text-danger h-5 w-5"})},{name:"Product analytics",slug:"product-analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{className:"text-[#2F80FA] h-5 w-5"})},{name:"Web analytics",slug:"web-analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPieChart,{className:"text-[#36C46F] h-5 w-5"})},{name:"Session replay",slug:"session-replay",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRewindPlay,{className:"text-warning h-5 w-5"})},{name:"Feature flags",slug:"feature-flags",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconToggle,{className:"text-[#30ABC6] h-5 w-5"})},{name:"Experiments",slug:"experiments",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTestTube,{className:"text-[#B62AD9] h-5 w-5"})},{name:"Surveys",slug:"surveys",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMessage,{className:"text-danger h-5 w-5"})},{name:"Data pipelines",slug:"cdp",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlug,{className:"text-[#2EA2D3] h-5 w-5"})},{name:"Data warehouse",slug:"data-warehouse",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{className:"text-[#8567FF] h-5 w-5"})},{name:"AI engineering",slug:"ai-engineering",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconAI,{className:"text-[#681291] dark:text-[#C170E8] h-5 w-5"})}],Section=_ref=>{let{title,children}=_ref;return(0,jsx_runtime.jsxs)("section",{className:"mb-6",children:[(0,jsx_runtime.jsx)("h3",{children:title}),children]})},SupportFormBlock=_ref2=>{let{onCancel}=_ref2,{supportPlans,hasSupportAddonPlan}=(0,index_esm.useValues)(billingLogic.kr),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h);return(0,jsx_runtime.jsxs)(Section,{title:"Email an engineer",children:[(0,jsx_runtime.jsx)(SupportForm.H,{}),(0,jsx_runtime.jsx)(src.Jp,{form:"support-modal-form",htmlType:"submit",type:"primary","data-attr":"submit",fullWidth:!0,center:!0,className:"mt-4",children:"Submit"}),(0,jsx_runtime.jsx)(src.Jp,{form:"support-modal-form",type:"secondary",onClick:onCancel,fullWidth:!0,center:!0,className:"mt-2 mb-4",children:"Cancel"}),(0,jsx_runtime.jsx)("br",{}),featureFlags[constants.y8.SUPPORT_MESSAGE_OVERRIDE]?(0,jsx_runtime.jsxs)("div",{className:"border bg-bg-light p-2 rounded gap-2",children:[(0,jsx_runtime.jsx)("strong",{children:"🎄 🎅 Support during the holidays 🎁 ⛄"}),(0,jsx_runtime.jsx)("p",{className:"mt-2 mb-0",children:"We're offering reduced support while we celebrate the holidays. Responses may be slower than normal over the holiday period (23rd December to the 6th January), and between the 25th and 27th of December we'll only be responding to critical issues. Thanks for your patience!"})]}):(0,jsx_runtime.jsxs)("div",{className:"grid grid-cols-2 border rounded [&_>*]:px-2 [&_>*]:py-0.5 mb-4 bg-bg-light pt-4",children:[(0,jsx_runtime.jsxs)("div",{className:"col-span-full flex justify-between py-1",children:[(0,jsx_runtime.jsx)("strong",{children:"Avg support response times"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.rU,{to:urls.j.organizationBilling([types.Md.PLATFORM_AND_SUPPORT]),children:"Explore options"})})]}),supportPlans?.map(plan=>{let currentPlan=plan.current_plan&&(!hasSupportAddonPlan||plan.plan_key?.includes("addon"));return jsx_runtime.jsxs(react.Fragment,{children:[jsx_runtime.jsxs("div",{className:currentPlan?"font-bold":void 0,children:[plan.name,currentPlan&&jsx_runtime.jsxs(jsx_runtime.Fragment,{children:[" ",jsx_runtime.jsx("span",{className:"font-normal opacity-60 text-sm",children:"(your plan)"})]})]}),jsx_runtime.jsx("div",{className:currentPlan?"font-bold":void 0,children:plan.features.find(f=>f.key==types.P$.SUPPORT_RESPONSE_TIME)?.note})]},`support-panel-${plan.plan_key}`)})]})]})},SIDE_PANEL_TABS={[types.H$.Notebooks]:{label:"Notebooks",Icon:posthog_icons_es.IconNotebook,Content:function(){let{selectedNotebook,initialAutofocus,droppedResource,dropProperties}=(0,index_esm.useValues)(notebookPanelLogic.F),{selectNotebook,closeSidePanel}=(0,index_esm.useActions)(notebookPanelLogic.F),{notebook}=(0,index_esm.useValues)((0,notebookLogic.T)({shortId:selectedNotebook,target:types.bZ.Popover})),editable=!notebook?.is_template,{ref,size}=(0,useResizeObserver.S)({0:"small",832:"medium"}),contentWidthHasEffect=(0,react.useMemo)(()=>"medium"===size,[size]);return(0,jsx_runtime.jsxs)("div",{ref:ref,className:"NotebookPanel",...dropProperties,children:[droppedResource?null:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)(NotebookListMini,{selectedNotebookId:selectedNotebook,onSelectNotebook:notebook=>{selectNotebook(notebook.short_id)}}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),selectedNotebook&&(0,jsx_runtime.jsx)(NotebookMeta.B,{shortId:selectedNotebook}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.notebook(selectedNotebook),onClick:()=>closeSidePanel(),icon:(0,jsx_runtime.jsx)(icons.pF,{}),tooltip:"Open as main focus",tooltipPlacement:"left"}),contentWidthHasEffect&&(0,jsx_runtime.jsx)(NotebookMeta.t,{size:"small"}),(0,jsx_runtime.jsx)(NotebookMenu.z,{shortId:selectedNotebook})]}),(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-y-auto px-4 py-2",children:(0,jsx_runtime.jsx)(Notebook.a,{shortId:selectedNotebook,editable:editable,initialAutofocus:initialAutofocus},selectedNotebook)})]}),(0,jsx_runtime.jsx)(NotebookPanelDropzone,{})]})},noModalSupport:!0},[types.H$.Support]:{label:"Help",Icon:posthog_icons_es.IconSupport,Content:()=>{let{openSidePanel,closeSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f),{preflight,isCloud}=(0,index_esm.useValues)(preflightLogic.preflightLogic),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{status}=(0,index_esm.useValues)(sidePanelStatusLogic.BE),theLogic=(0,supportLogic.Pw)({onClose:()=>closeSidePanel(types.H$.Support)}),{openEmailForm,closeEmailForm}=(0,index_esm.useActions)(theLogic),{title,isEmailFormOpen}=(0,index_esm.useValues)(theLogic),region=preflight?.region;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:isEmailFormOpen?title:SIDE_PANEL_TABS[types.H$.Support].label}),(0,jsx_runtime.jsx)("div",{className:"overflow-y-auto","data-attr":"side-panel-support-container",children:(0,jsx_runtime.jsx)("div",{className:"p-3 max-w-160 w-full mx-auto",children:isEmailFormOpen?(0,jsx_runtime.jsx)(SupportFormBlock,{onCancel:()=>closeEmailForm()}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Section,{title:"Search docs & community questions",children:(0,jsx_runtime.jsx)(AlgoliaSearch,{})}),(0,jsx_runtime.jsx)(Section,{title:"Explore the docs",children:(0,jsx_runtime.jsx)("ul",{className:"border rounded divide-y bg-bg-light dark:bg-transparent font-title font-medium",children:PRODUCTS.map((product,index)=>(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsxs)(src.rU,{to:`https://posthog.com/docs/${product.slug}`,className:"group flex items-center justify-between px-2 py-1.5",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-1.5",children:[product.icon,(0,jsx_runtime.jsx)("span",{className:"text-text-3000 opacity-75 group-hover:opacity-100",children:product.name})]}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(posthog_icons_es.IconChevronDown,{className:"text-text-3000 h-6 w-6 opacity-60 -rotate-90 group-hover:opacity-90"})})]})},index))})}),"operational"!==status?(0,jsx_runtime.jsx)(Section,{title:"",children:(0,jsx_runtime.jsx)(src.Vp,{type:status.includes("outage")?"error":"warning",children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("span",{children:["We are experiencing ",status.includes("outage")?"major":""," issues."]}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",fullWidth:!0,center:!0,targetBlank:!0,onClick:()=>openSidePanel(types.H$.Status),className:"mt-2 bg-[white]",children:"View system status"})]})})}):null,isCloud?(0,jsx_runtime.jsxs)(Section,{title:"Contact us",children:[(0,jsx_runtime.jsx)("p",{children:"Can't find what you need in the docs?"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",fullWidth:!0,center:!0,onClick:()=>openEmailForm(),targetBlank:!0,className:"mt-2",children:"Email an engineer"})]}):null,(0,jsx_runtime.jsx)(Section,{title:"Ask the community",children:(0,jsx_runtime.jsxs)("p",{children:["Questions about features, how-tos, or use cases? There are thousands of discussions in our community forums."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/questions",children:"Ask a question"})]})}),(0,jsx_runtime.jsx)(Section,{title:"Share feedback",children:(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:"https://posthog.com/wip",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHelmet,{}),targetBlank:!0,children:"See what we're building"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:"https://posthog.com/roadmap",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMap,{}),targetBlank:!0,children:"Vote on our roadmap"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:`https://github.com/PostHog/posthog/issues/new?&labels=enhancement&template=feature_request.yml&debug-info=${encodeURIComponent((0,supportLogic.nP)(region,currentOrganization,currentTeam))}`,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFeatures,{}),targetBlank:!0,children:"Request a feature"})})]})})]})})})]})}},[types.H$.Docs]:{label:"Docs",Icon:posthog_icons_es.IconInfo,Content:()=>{let ref=(0,react.useRef)(null),logic=sidePanelDocsLogic({iframeRef:ref}),{iframeSrc,iframeReady,currentUrl,activeMenuName,menuOptions}=(0,index_esm.useValues)(logic),{navigateToPage,unmountIframe,closeSidePanel}=(0,index_esm.useActions)(logic),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b);return(0,react.useEffect)(()=>{ref.current?.contentWindow?.postMessage({type:"theme-toggle",isDarkModeOn},"*")},[isDarkModeOn,ref.current]),(0,react.useEffect)(()=>(window.addEventListener("beforeunload",unmountIframe),()=>{window.removeEventListener("beforeunload",unmountIframe),unmountIframe()}),[]),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHome,{}),type:"secondary",onClick:()=>{ref.current?.contentWindow?.postMessage({type:"navigate",url:"/docs"},"*")}}),menuOptions&&(0,jsx_runtime.jsx)(src.Yv,{placeholder:"Navigate",dropdownMatchSelectWidth:!1,onChange:navigateToPage,size:"small",value:null!=activeMenuName?activeMenuName:"",options:menuOptions.map(_ref=>{let{name,url}=_ref;return{label:name,value:url}})}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),targetBlank:!0,onClick:()=>{window.open(currentUrl,"_blank")?.focus(),closeSidePanel()},children:"Open in new tab"})]}),(0,jsx_runtime.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("iframe",{src:iframeSrc,title:"Docs",className:(0,clsx_m.default)("w-full h-full",!iframeReady&&"hidden"),ref:ref}),!iframeReady&&(0,jsx_runtime.jsx)(SidePanelDocsSkeleton,{})]})]})},noModalSupport:!0},[types.H$.Activation]:{label:"Quick start",Icon:_ref=>{let{className}=_ref,{activeTasks,completionPercent}=(0,index_esm.useValues)(activationLogic.z);return(0,jsx_runtime.jsx)(LemonProgressCircle.L,{progress:completionPercent/100,strokePercentage:.15,size:20,className:className,children:(0,jsx_runtime.jsx)("span",{className:"text-xs font-semibold",children:activeTasks.length})})},Content:()=>{let{activeTasks,completionPercent,completedTasks}=(0,index_esm.useValues)(activationLogic.z);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Quick start"}),(0,jsx_runtime.jsxs)("div",{className:"p-4 space-y-2 overflow-y-auto",children:[(0,jsx_runtime.jsx)("p",{children:"Use our Quick Start guide to learn about everything PostHog can do for you and your product."}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-center",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center",children:[(0,jsx_runtime.jsx)(LemonProgressCircle.L,{progress:completionPercent/100,size:100,className:"text-primary",children:(0,jsx_runtime.jsx)("span",{className:"text-2xl",children:activeTasks.length})}),(0,jsx_runtime.jsx)("p",{className:"text-muted mt-2 ",children:"still to go"})]}),(0,jsx_runtime.jsx)("div",{className:"h-60",children:(0,jsx_runtime.jsx)(hedgehogs.ProfessorHog,{className:"max-h-full w-auto object-contain"})})]}),activeTasks.length>0&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h4",{children:"What's next?"}),(0,jsx_runtime.jsx)("ul",{className:"space-y-2",children:activeTasks.map(task=>(0,jsx_runtime.jsx)(ActivationTask,{...task},task.id))})]}),completedTasks.length>0&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h4",{children:"Completed"}),(0,jsx_runtime.jsx)("ul",{className:"space-y-2",children:completedTasks.map(task=>(0,jsx_runtime.jsx)(ActivationTask,{...task},task.id))})]})]})]})}},[types.H$.Settings]:{label:"Settings",Icon:posthog_icons_es.IconGear,Content:()=>{var _settings$sectionId;let{settings}=(0,index_esm.useValues)(sidePanelSettingsLogic.A),{closeSidePanel,setSettings}=(0,index_esm.useActions)(sidePanelSettingsLogic.A),settingsLogicProps={...settings,logicKey:"sidepanel"},{selectedSectionId,selectedLevel}=(0,index_esm.useValues)((0,settingsLogic.h)(settingsLogicProps));return(0,react.useEffect)(()=>{setSettings({sectionId:null!=selectedSectionId?selectedSectionId:void 0,settingLevelId:selectedLevel})},[selectedSectionId,selectedLevel]),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsxs)("span",{className:"flex-1 px-2 font-semibold text-base truncate",children:[(0,utils.fm)(selectedLevel)," settings"]}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.settings(null!==(_settings$sectionId=settings.sectionId)&&void 0!==_settings$sectionId?_settings$sectionId:settings.settingLevelId,settings.settingId),onClick:()=>closeSidePanel(),sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),children:"All settings"})]}),(0,jsx_runtime.jsx)("div",{className:"flex-1 p-3 overflow-y-auto",children:(0,jsx_runtime.jsx)(Settings.Z,{hideSections:!0,...settingsLogicProps})})]})}},[types.H$.FeaturePreviews]:{label:"Feature previews",Icon:posthog_icons_es.IconFeatures,Content:()=>(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Feature previews"}),(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-3 overflow-y-auto space-y-4",children:[(0,jsx_runtime.jsx)(src.Vp,{type:"info",children:"Get early access to these upcoming features. Let us know what you think!"}),(0,jsx_runtime.jsx)(FeaturePreviews.F,{})]})]})},[types.H$.Activity]:{label:"Team activity",Icon:props=>{let{unreadCount}=(0,index_esm.useValues)(sidePanelActivityLogic.t);return(0,jsx_runtime.jsx)(icons.Xd,{count:unreadCount,...props,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconNotification,{})})},Content:()=>{var _filters$item_id,_filters$user,_filtersForCurrentPag;let{hasNotifications,notifications,activeTab,allActivity,allActivityResponseLoading,allActivityHasNext,importantChangesLoading,hasUnread,filters,filtersForCurrentPage,showDetails}=(0,index_esm.useValues)(sidePanelActivityLogic.t),{togglePolling,setActiveTab,maybeLoadOlderActivity,markAllAsRead,loadImportantChanges,setFilters,toggleShowDetails}=(0,index_esm.useActions)(sidePanelActivityLogic.t),{user}=(0,index_esm.useValues)(userLogic.userLogic),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h);(0,usePageVisibility.d)(pageIsVisible=>{togglePolling(pageIsVisible)}),(0,react.useEffect)(()=>(loadImportantChanges(!1),()=>{markAllAsRead(),togglePolling(!1)}),[]);let lastScrollPositionRef=(0,react.useRef)(0),contentRef=(0,react.useRef)(null),scopeMenuOptions=[{value:null,label:"All activity"},...Object.values(types.jc).map(x=>({value:x,label:(0,humanizeActivity.VI)(x)}))],activeScopeMenuOption=filters?.scope?filters.scope+`${null!==(_filters$item_id=filters.item_id)&&void 0!==_filters$item_id?_filters$item_id:""}`:null;filtersForCurrentPage?.scope&&filtersForCurrentPage?.item_id&&scopeMenuOptions.unshift({value:`${filtersForCurrentPage.scope}${null!==(_filtersForCurrentPag=filtersForCurrentPage.item_id)&&void 0!==_filtersForCurrentPag?_filtersForCurrentPag:""}`,label:`This ${(0,humanizeActivity.VI)(filtersForCurrentPage.scope,!0)}`});let toggleExtendedDescription=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.f4,{bordered:!0,label:"Show details",checked:showDetails,onChange:toggleShowDetails})});return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Team activity"}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.AUDIT_LOGS,className:"flex flex-col flex-1 overflow-hidden",overrideShouldShowGate:user?.is_impersonated||!!featureFlags[constants.y8.AUDIT_LOGS_ACCESS],children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"mx-2 shrink-0",children:(0,jsx_runtime.jsx)(src.TP,{activeKey:activeTab,onChange:key=>setActiveTab(key),tabs:[{key:sidePanelActivityLogic.H.Unread,label:"My notifications"},{key:sidePanelActivityLogic.H.All,label:"All activity"},...featureFlags[constants.y8.METALYTICS]?[{key:sidePanelActivityLogic.H.Metalytics,label:"Analytics"}]:[],...featureFlags[constants.y8.CDP_ACTIVITY_LOG_NOTIFICATIONS]?[{key:sidePanelActivityLogic.H.Subscriptions,label:"Subscriptions"}]:[]]})}),activeTab===sidePanelActivityLogic.H.Unread?(0,jsx_runtime.jsxs)("div",{className:"px-2 pb-2 space-y-2 shrink-0",children:[(0,jsx_runtime.jsxs)(src.Vp,{type:"info",dismissKey:"notifications-introduction",children:["Notifications shows you changes others make to"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.savedInsights("history"),children:"Insights"})," and"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.featureFlags("history"),children:"Feature Flags"})," that you created. Come join"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/community",children:"our community forum"})," and tell us what else should be here!"]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[toggleExtendedDescription,hasUnread?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>markAllAsRead(),children:"Mark all as read"}):null]})]}):activeTab===sidePanelActivityLogic.H.All?(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2 pb-2 space-y-2 shrink-0",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[toggleExtendedDescription,allActivityResponseLoading?(0,jsx_runtime.jsx)(src.$j,{textColored:!0}):null]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{children:"Filter for activity on:"}),(0,jsx_runtime.jsx)(src.Yv,{size:"small",options:scopeMenuOptions,placeholder:"All activity",value:null!=activeScopeMenuOption?activeScopeMenuOption:void 0,onChange:value=>setFilters({...filters,scope:null!=value?value:void 0,item_id:void 0}),dropdownMatchSelectWidth:!1}),(0,jsx_runtime.jsx)("span",{children:"by"}),(0,jsx_runtime.jsx)(MemberSelect.a,{value:null!==(_filters$user=filters?.user)&&void 0!==_filters$user?_filters$user:null,onChange:user=>{var _user$id;return setFilters({...filters,user:null!==(_user$id=user?.id)&&void 0!==_user$id?_user$id:void 0})}})]})]}):null,(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden",ref:contentRef,onScroll:e=>{if(e.currentTarget.scrollTop>lastScrollPositionRef.current){let scrollPosition=e.currentTarget.scrollTop+e.currentTarget.clientHeight;e.currentTarget.scrollHeight-scrollPosition<100&&maybeLoadOlderActivity()}lastScrollPositionRef.current=e.currentTarget.scrollTop},children:(0,jsx_runtime.jsx)(ScrollableShadows.D,{direction:"vertical",innerClassName:"p-2 space-y-px",children:activeTab===sidePanelActivityLogic.H.Unread?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:importantChangesLoading&&!hasNotifications?(0,jsx_runtime.jsx)(src.yW,{className:"h-12 my-2",repeat:10,fade:!0}):hasNotifications?notifications.map((logItem,index)=>(0,jsx_runtime.jsx)(ActivityLog.h,{logItem:logItem,showExtendedDescription:showDetails},index)):(0,jsx_runtime.jsx)("div",{className:"p-6 text-center border border-dashed rounded text-muted-alt",children:"You're all caught up!"})}):activeTab===sidePanelActivityLogic.H.All?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:allActivityResponseLoading&&!allActivity.length?(0,jsx_runtime.jsx)(src.yW,{className:"h-12 my-2",repeat:10,fade:!0}):allActivity.length?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[allActivity.map((logItem,index)=>(0,jsx_runtime.jsx)(ActivityLog.h,{logItem:logItem,showExtendedDescription:showDetails},index)),(0,jsx_runtime.jsx)("div",{className:"flex items-center justify-center h-10 gap-2 m-4 text-muted-alt",children:allActivityResponseLoading?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.$j,{textColored:!0})," Loading older activity"]}):allActivityHasNext?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",fullWidth:!0,center:!0,onClick:()=>maybeLoadOlderActivity(),children:"Load more"}):"No more results"})]}):(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center gap-2 p-6 text-center border border-dashed rounded",children:[(0,jsx_runtime.jsx)("span",{children:"No activity yet"}),filters?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setFilters(null),children:"Clear filters"}):null]})}):activeTab===sidePanelActivityLogic.H.Metalytics?(0,jsx_runtime.jsx)(SidePanelActivityMetalytics,{}):activeTab===sidePanelActivityLogic.H.Subscriptions?(0,jsx_runtime.jsx)(SidePanelActivitySubscriptions,{}):null})})]})})]})}},[types.H$.Discussion]:{label:"Discussion",Icon:props=>{let{commentCount}=(0,index_esm.useValues)(sidePanelDiscussionLogic);return(0,jsx_runtime.jsx)(icons.Xd,{count:commentCount,...props,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconChat,{})})},Content:()=>{let{commentsLogicProps}=(0,index_esm.useValues)(sidePanelDiscussionLogic),{scope,item_id}=null!=commentsLogicProps?commentsLogicProps:{};return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden flex-1",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:(0,jsx_runtime.jsxs)("div",{className:"flex space-x-2",children:[(0,jsx_runtime.jsxs)("span",{children:["Discussion"," ",scope?(0,jsx_runtime.jsxs)("span",{className:"font-normal text-muted-alt",children:["about ",item_id?"this":""," ",(0,humanizeActivity.VI)(scope,!!item_id)]}):null]}),(0,jsx_runtime.jsx)(src.u,{title:"This is a feature we are experimenting with! We'd love to get your feedback on it and whether this is something useful for working with PostHog.",children:(0,jsx_runtime.jsx)(src.oe,{type:"completion",children:"Experimental"})})]})}),commentsLogicProps?(0,jsx_runtime.jsx)(DiscussionContent,{logicProps:commentsLogicProps}):(0,jsx_runtime.jsxs)("div",{className:"mx-auto p-8 max-w-160 mt-8 space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"max-w-80 mx-auto",children:(0,jsx_runtime.jsx)(hedgehogs.WarningHog,{className:"w-full h-full"})}),(0,jsx_runtime.jsx)("h2",{children:"Discussions aren't supported here yet..."}),(0,jsx_runtime.jsx)("p",{children:"This a beta feature that is currently only available when viewing things like an Insight, Dashboard or Notebook."})]})]})}},[types.H$.Exports]:{label:"Exports",Icon:()=>{let{freshUndownloadedExports}=(0,index_esm.useValues)(sidePanelExportsLogic);return(0,jsx_runtime.jsx)(icons.Xd,{count:freshUndownloadedExports.length,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconDownload,{})})},Content:()=>(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden flex-1",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:(0,jsx_runtime.jsx)("div",{className:"flex space-x-2",children:(0,jsx_runtime.jsx)("span",{children:"Exports"})})}),(0,jsx_runtime.jsx)("p",{className:"m-4",children:"Retrieve your exports here. Exports are generated asynchronously and may take a few seconds to complete."}),(0,jsx_runtime.jsx)(ExportsContent,{})]})},[types.H$.Status]:{label:"System status",Icon:props=>{let{status,statusPage}=(0,index_esm.useValues)(sidePanelStatusLogic.BE),title=statusPage?.status.description?(0,utils.fm)(statusPage.status.description.toLowerCase()):null;return(0,jsx_runtime.jsx)(src.u,{title:title,placement:"left",children:(0,jsx_runtime.jsx)("span",{...props,children:(0,jsx_runtime.jsx)(icons.T,{content:"operational"!==status?"!":"✓",status:status.includes("outage")?"danger":status.includes("degraded")||status.includes("monitoring")?"warning":"success",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconCloud,{})})})})},Content:()=>{let{closeSidePanel}=(0,index_esm.useActions)(sidePanelLogic.x),[ready,setReady]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),targetBlank:!0,onClick:()=>{window.open(sidePanelStatusLogic.UH,"_blank")?.focus(),closeSidePanel()},children:"Open in new tab"})]}),(0,jsx_runtime.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("iframe",{src:sidePanelStatusLogic.UH,title:"Status",className:(0,clsx_m.default)("w-full h-full",!ready&&"hidden"),onLoad:()=>setReady(!0)}),!ready&&(0,jsx_runtime.jsx)(SidePanelDocsSkeleton,{})]})]})},noModalSupport:!0},[types.H$.AccessControl]:{label:"Access control",Icon:posthog_icons_es.IconLock,Content:()=>{let{sceneSidePanelContext}=(0,index_esm.useValues)(sidePanelContextLogic.g);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Access control"}),(0,jsx_runtime.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:sceneSidePanelContext.access_control_resource&&sceneSidePanelContext.access_control_resource_id?(0,jsx_runtime.jsx)(AccessControlObject.m,{resource:sceneSidePanelContext.access_control_resource,resource_id:sceneSidePanelContext.access_control_resource_id}):(0,jsx_runtime.jsx)("p",{children:"Not supported"})})]})}}};function SidePanel_SidePanel(){var _theme$sidebarStyle;let{theme}=(0,index_esm.useValues)(themeLogic.b),{visibleTabs,extraTabs}=(0,index_esm.useValues)(sidePanelLogic.x),{selectedTab,sidePanelOpen,modalMode}=(0,index_esm.useValues)(sidePanelStateLogic.f),{openSidePanel,closeSidePanel,setSidePanelAvailable}=(0,index_esm.useActions)(sidePanelStateLogic.f),activeTab=sidePanelOpen&&selectedTab,PanelConent=activeTab?SIDE_PANEL_TABS[activeTab]?.Content:null,ref=(0,react.useRef)(null),resizerLogicProps={containerRef:ref,logicKey:"side-panel",persistent:!0,closeThreshold:200,placement:"left",onToggleClosed:shouldBeClosed=>{shouldBeClosed?closeSidePanel():selectedTab&&openSidePanel(selectedTab)}},{desiredSize,isResizeInProgress}=(0,index_esm.useValues)((0,resizerLogic.Z)(resizerLogicProps));if((0,react.useEffect)(()=>(setSidePanelAvailable(!0),()=>{setSidePanelAvailable(!1)}),[]),!visibleTabs.length)return null;let sidePanelOpenAndAvailable=selectedTab&&sidePanelOpen&&visibleTabs.includes(selectedTab),menuOptions=extraTabs?[{title:"Open in side panel",items:extraTabs.map(tab=>{let{Icon,label}=SIDE_PANEL_TABS[tab];return{label:label,icon:(0,jsx_runtime.jsx)(Icon,{}),onClick:()=>openSidePanel(tab)}})}]:void 0;if(modalMode){let supportsModal=!activeTab||!SIDE_PANEL_TABS[activeTab]?.noModalSupport;return(0,jsx_runtime.jsx)(src.fQ,{simple:!0,isOpen:!!PanelConent&&supportsModal,onClose:closeSidePanel,hideCloseButton:!0,width:"40rem",children:PanelConent?(0,jsx_runtime.jsx)(PanelConent,{}):null})}return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("SidePanel3000",sidePanelOpenAndAvailable&&"SidePanel3000--open",isResizeInProgress&&"SidePanel3000--resizing"),ref:ref,style:{width:sidePanelOpenAndAvailable?null!=desiredSize?desiredSize:512:void 0,...null!==(_theme$sidebarStyle=theme?.sidebarStyle)&&void 0!==_theme$sidebarStyle?_theme$sidebarStyle:{}},children:[(0,jsx_runtime.jsx)(Resizer.w,{...resizerLogicProps}),(0,jsx_runtime.jsxs)("div",{className:"SidePanel3000__bar",children:[(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__tabs",children:(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__tabs-content",children:visibleTabs.map(tab=>{let{Icon,label}=SIDE_PANEL_TABS[tab];return(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(Icon,{}),onClick:()=>activeTab===tab?closeSidePanel():openSidePanel(tab),"data-attr":`sidepanel-tab-${tab}`,"data-ph-capture-attribute-state-before-click":activeTab===tab?"open":"closed",active:activeTab===tab,type:"secondary",status:"alt",children:label},tab)})})}),menuOptions?(0,jsx_runtime.jsx)("div",{className:"shrink-0 flex items-center m-2",children:(0,jsx_runtime.jsx)(src.d6,{items:menuOptions,children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{})})})}):null]}),(0,jsx_runtime.jsx)(Resizer.w,{...resizerLogicProps,offset:"3rem"}),PanelConent?(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__content",children:(0,jsx_runtime.jsx)(PanelConent,{})}):null]})}},"./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>AccessControlObject});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),upgradeModalLogic=__webpack_require__("./frontend/src/lib/components/UpgradeModal/upgradeModalLogic.ts"),UserSelectItem=__webpack_require__("./frontend/src/lib/components/UserSelectItem.tsx"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),types=__webpack_require__("./frontend/src/types.ts"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),membersLogic=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),roleBasedAccessControlLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/roleBasedAccessControlLogic.ts");let accessControlLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)(props=>`${props.resource}-${props.resource_id}`),(0,index_esm.path)(key=>["scenes","accessControl","accessControlLogic",key]),(0,index_esm.connect)({values:[membersLogic.m,["sortedMembers"],teamLogic.H,["currentTeam"],roleBasedAccessControlLogic.Q,["roles"],upgradeModalLogic.J,["guardAvailableFeature"]],actions:[membersLogic.m,["ensureAllMembersLoaded"]]}),(0,index_esm.actions)({updateAccessControl:accessControl=>({accessControl}),updateAccessControlDefault:level=>({level}),updateAccessControlRoles:accessControls=>({accessControls}),updateAccessControlMembers:accessControls=>({accessControls})}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{accessControls:[null,{loadAccessControls:async()=>{try{let response=await api.ZP.get(values.endpoint);return response}catch(error){return{access_controls:[],available_access_levels:["none","viewer","editor"],user_access_level:"none",default_access_level:"none",user_can_edit_access_levels:!1}}},updateAccessControlDefault:async _ref2=>{let{level}=_ref2;return await api.ZP.put(values.endpoint,{access_level:level}),values.accessControls},updateAccessControlRoles:async _ref3=>{let{accessControls}=_ref3;for(let{role,level}of accessControls)await api.ZP.put(values.endpoint,{role:role,access_level:level});return values.accessControls},updateAccessControlMembers:async _ref4=>{let{accessControls}=_ref4;for(let{member,level}of accessControls)await api.ZP.put(values.endpoint,{organization_member:member,access_level:level});return values.accessControls}}]}}),(0,index_esm.listeners)(_ref5=>{let{actions}=_ref5;return{updateAccessControlDefaultSuccess:()=>actions.loadAccessControls(),updateAccessControlRolesSuccess:()=>actions.loadAccessControls(),updateAccessControlMembersSuccess:()=>actions.loadAccessControls()}}),(0,index_esm.selectors)({endpoint:[()=>[(_,props)=>props],props=>"project"===props.resource?"api/projects/@current/access_controls":`api/projects/@current/${props.resource}s/${props.resource_id}/access_controls`],humanReadableResource:[()=>[(_,props)=>props],props=>props.resource.replace(/_/g," ")],availableLevelsWithNone:[s=>[s.accessControls],accessControls=>{var _accessControls$avail;return null!==(_accessControls$avail=accessControls?.available_access_levels)&&void 0!==_accessControls$avail?_accessControls$avail:[]}],availableLevels:[s=>[s.availableLevelsWithNone],availableLevelsWithNone=>availableLevelsWithNone.filter(level=>"none"!==level)],canEditAccessControls:[s=>[s.accessControls],accessControls=>{var _accessControls$user_;return null!==(_accessControls$user_=accessControls?.user_can_edit_access_levels)&&void 0!==_accessControls$user_?_accessControls$user_:null}],accessControlDefaultLevel:[s=>[s.accessControls],accessControls=>{var _accessControls$defau;return null!==(_accessControls$defau=accessControls?.default_access_level)&&void 0!==_accessControls$defau?_accessControls$defau:null}],accessControlDefaultOptions:[s=>[s.availableLevelsWithNone,(_,props)=>props.resource],availableLevelsWithNone=>{let options=availableLevelsWithNone.map(level=>({value:level,label:"none"===level?"No access":(0,utils.wR)(level)}));return options}],accessControlDefault:[s=>[s.accessControls,s.accessControlDefaultLevel],(accessControls,accessControlDefaultLevel)=>{let found=accessControls?.access_controls?.find(accessControl=>!accessControl.organization_member&&!accessControl.role);return null!=found?found:{access_level:accessControlDefaultLevel}}],accessControlMembers:[s=>[s.accessControls],accessControls=>(accessControls?.access_controls||[]).filter(accessControl=>!!accessControl.organization_member)],accessControlRoles:[s=>[s.accessControls],accessControls=>(accessControls?.access_controls||[]).filter(accessControl=>!!accessControl.role)],rolesById:[s=>[s.roles],roles=>Object.fromEntries((roles||[]).map(role=>[role.id,role]))],addableRoles:[s=>[s.roles,s.accessControlRoles],(roles,accessControlRoles)=>roles?roles.filter(role=>!accessControlRoles.find(ac=>ac.role===role.id)):[]],membersById:[s=>[s.sortedMembers],members=>Object.fromEntries((members||[]).map(member=>[member.id,member]))],addableMembers:[s=>[s.sortedMembers,s.accessControlMembers],(members,accessControlMembers)=>members?members.filter(member=>!accessControlMembers.find(ac=>ac.organization_member===member.id)):[]]}),(0,index_esm.afterMount)(_ref6=>{let{actions}=_ref6;actions.loadAccessControls(),actions.ensureAllMembersLoaded()})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function AccessControlObject(props){let{canEditAccessControls,humanReadableResource}=(0,index_esm.useValues)(accessControlLogic(props)),suffix=`this ${humanReadableResource}`;return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:accessControlLogic,props:props,children:(0,jsx_runtime.jsxs)("div",{className:"space-y-6",children:[!0===canEditAccessControls?(0,jsx_runtime.jsxs)(src.Vp,{type:"warning",children:[(0,jsx_runtime.jsx)("b",{children:"Permission required"}),(0,jsx_runtime.jsx)("br",{}),"You don't have permission to edit access controls for ",suffix,". You must be the"," ",(0,jsx_runtime.jsx)("i",{children:"creator of it"}),", a ",(0,jsx_runtime.jsx)("i",{children:"Project admin"}),", or an ",(0,jsx_runtime.jsx)("i",{children:"Organization admin"}),"."]}):null,(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("h3",{children:["Default access to ",suffix]}),(0,jsx_runtime.jsx)(AccessControlObjectDefaults,{})]}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.PROJECT_BASED_PERMISSIONING,children:(0,jsx_runtime.jsx)(AccessControlObjectUsers,{})}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.ROLE_BASED_ACCESS,children:(0,jsx_runtime.jsx)(AccessControlObjectRoles,{})})]})})}function AccessControlObjectDefaults(){var _accessControlDefault;let{accessControlDefault,accessControlDefaultOptions,accessControlsLoading,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlDefault}=(0,index_esm.useActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J);return(0,jsx_runtime.jsx)(src.Yv,{placeholder:"Loading...",value:null!==(_accessControlDefault=accessControlDefault?.access_level)&&void 0!==_accessControlDefault?_accessControlDefault:void 0,onChange:newValue=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING,()=>{updateAccessControlDefault(newValue)})},disabledReason:accessControlsLoading?"Loading…":canEditAccessControls?void 0:"You cannot edit this",dropdownMatchSelectWidth:!1,options:accessControlDefaultOptions})}function AccessControlObjectUsers(){let{user}=(0,index_esm.useValues)(userLogic.userLogic),{membersById,addableMembers,accessControlMembers,accessControlsLoading,availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlMembers}=(0,index_esm.useAsyncActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J),[modelOpen,setModelOpen]=(0,react.useState)(!1);if(!user)return null;let member=ac=>membersById[ac.organization_member],columns=[{key:"user",title:"User",render:(_,ac)=>(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(ProfilePicture.Y,{user:member(ac)?.user}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{className:"font-medium mb-0",children:member(ac)?.user.uuid==user.uuid?`${member(ac)?.user.first_name} (you)`:member(ac)?.user.first_name}),(0,jsx_runtime.jsx)("p",{className:"text-muted-alt mb-0",children:member(ac)?.user.email})]})]}),sorter:(a,b)=>member(a)?.user.first_name.localeCompare(member(b)?.user.first_name)},{key:"level",title:"Level",width:0,render:function LevelRender(_,_ref){let{access_level,organization_member}=_ref;return(0,jsx_runtime.jsx)("div",{className:"my-1",children:(0,jsx_runtime.jsx)(SimplLevelComponent,{size:"small",level:access_level,levels:availableLevels,onChange:level=>void updateAccessControlMembers([{member:organization_member,level}])})})}},{key:"remove",width:0,render:(_,_ref2)=>{let{organization_member}=_ref2;return(0,jsx_runtime.jsx)(RemoveAccessButton,{subject:"member",onConfirm:()=>void updateAccessControlMembers([{member:organization_member,level:null}])})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Members"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>setModelOpen(!0),disabledReason:canEditAccessControls?void 0:"You cannot edit this",children:"Add"})]}),(0,jsx_runtime.jsx)(src.g3,{columns:columns,dataSource:accessControlMembers,loading:accessControlsLoading})]}),(0,jsx_runtime.jsx)(AddItemsControlsModal,{modelOpen:modelOpen,setModelOpen:setModelOpen,placeholder:"Search for team members to add…",onAdd:async(newValues,level)=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING)&&(await updateAccessControlMembers(newValues.map(member=>({member,level}))),setModelOpen(!1))},options:addableMembers.map(member=>({key:member.id,label:`${member.user.first_name} ${member.user.email}`,labelComponent:(0,jsx_runtime.jsx)(UserSelectItem.l,{user:member.user})}))})]})}function AccessControlObjectRoles(){let{accessControlRoles,accessControlsLoading,addableRoles,rolesById,availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlRoles}=(0,index_esm.useAsyncActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J),[modelOpen,setModelOpen]=(0,react.useState)(!1),columns=[{title:"Role",key:"role",width:0,render:(_,_ref3)=>{let{role}=_ref3;return(0,jsx_runtime.jsx)("span",{className:"whitespace-nowrap",children:(0,jsx_runtime.jsx)(LemonTableLink.i,{to:urls.j.settings("organization-roles")+`#role=${role}`,title:rolesById[role]?.name})})}},{title:"Members",key:"members",render:(_,_ref4)=>{var _rolesById$role$membe;let{role}=_ref4;return(0,jsx_runtime.jsx)(ProfilePicture.r,{people:null!==(_rolesById$role$membe=rolesById[role]?.members?.map(member=>({email:member.user.email,name:member.user.first_name,title:`${member.user.first_name} <${member.user.email}>`})))&&void 0!==_rolesById$role$membe?_rolesById$role$membe:[]})}},{title:"Level",key:"level",width:0,render:(_,_ref5)=>{let{access_level,role}=_ref5;return(0,jsx_runtime.jsx)("div",{className:"my-1",children:(0,jsx_runtime.jsx)(SimplLevelComponent,{size:"small",level:access_level,levels:availableLevels,onChange:level=>void updateAccessControlRoles([{role,level}])})})}},{key:"remove",width:0,render:(_,_ref6)=>{let{role}=_ref6;return(0,jsx_runtime.jsx)(RemoveAccessButton,{subject:"role",onConfirm:()=>void updateAccessControlRoles([{role,level:null}])})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Roles"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>setModelOpen(!0),disabledReason:canEditAccessControls?void 0:"You cannot edit this",children:"Add"})]}),(0,jsx_runtime.jsx)(src.g3,{columns:columns,dataSource:accessControlRoles,loading:accessControlsLoading})]}),(0,jsx_runtime.jsx)(AddItemsControlsModal,{modelOpen:modelOpen,setModelOpen:setModelOpen,placeholder:"Search for roles to add…",onAdd:async(newValues,level)=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING)&&(await updateAccessControlRoles(newValues.map(role=>({role,level}))),setModelOpen(!1))},options:addableRoles.map(role=>({key:role.id,label:role.name}))})]})}function SimplLevelComponent(props){let{canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic);return(0,jsx_runtime.jsx)(src.Yv,{size:props.size,placeholder:"Select level...",value:props.level,onChange:newValue=>props.onChange(newValue),disabledReason:canEditAccessControls?void 0:"You cannot edit this",options:props.levels.map(level=>({value:level,label:(0,utils.fm)(null!=level?level:"")}))})}function RemoveAccessButton(_ref7){let{onConfirm,subject}=_ref7,{canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic);return(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),size:"small",disabledReason:canEditAccessControls?void 0:"You cannot edit this",onClick:()=>src.dn.open({title:"Remove access",content:`Are you sure you want to remove this ${subject}'s explicit access?`,primaryButton:{children:"Remove",status:"danger",onClick:()=>onConfirm()}})})}function AddItemsControlsModal(props){var _availableLevels$;let{availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),[items,setItems]=(0,react.useState)([]),[level,setLevel]=(0,react.useState)(null!==(_availableLevels$=availableLevels[0])&&void 0!==_availableLevels$?_availableLevels$:null);(0,react.useEffect)(()=>{var _availableLevels$2;setLevel(null!==(_availableLevels$2=availableLevels[0])&&void 0!==_availableLevels$2?_availableLevels$2:null)},[availableLevels]);let onSubmit=items.length&&level?()=>void props.onAdd(items,level).then(()=>{var _availableLevels$3;setItems([]),setLevel(null!==(_availableLevels$3=availableLevels[0])&&void 0!==_availableLevels$3?_availableLevels$3:null)}):void 0;return(0,jsx_runtime.jsx)(src.fQ,{isOpen:props.modelOpen||!1,onClose:()=>props.setModelOpen(!1),title:"Add access",maxWidth:"30rem",description:"Allow other users or roles to access this resource",footer:(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>props.setModelOpen(!1),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:onSubmit,disabledReason:canEditAccessControls?onSubmit?void 0:"Please choose what you want to add and at what level":"You cannot edit this",children:"Add"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center w-full",children:[(0,jsx_runtime.jsx)("div",{className:"min-w-[16rem] w-full",children:(0,jsx_runtime.jsx)(src.nt,{placeholder:props.placeholder,value:items,onChange:newValues=>setItems(newValues),mode:"multiple",options:props.options,disabled:!canEditAccessControls})}),(0,jsx_runtime.jsx)(SimplLevelComponent,{levels:availableLevels,level:level,onChange:setLevel})]})})}},"./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/roleBasedAccessControlLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>roleBasedAccessControlLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");let roleBasedAccessControlLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","accessControl","roleBasedAccessControlLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__.m,["sortedMembers"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_7__.H,["currentTeam"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["hasAvailableFeature"]],actions:[scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__.m,["ensureAllMembersLoaded"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({updateRoleBasedAccessControls:accessControls=>({accessControls}),selectRoleId:roleId=>({roleId}),deleteRole:roleId=>({roleId}),removeMemberFromRole:(role,roleMemberId)=>({role,roleMemberId}),addMembersToRole:(role,members)=>({role,members}),setEditingRoleId:roleId=>({roleId})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({selectedRoleId:[null,{selectRoleId:(_,_ref)=>{let{roleId}=_ref;return roleId}}],editingRoleId:[null,{setEditingRoleId:(_,_ref2)=>{let{roleId}=_ref2;return roleId}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(_ref3=>{let{values}=_ref3;return{roleBasedAccessControls:[null,{loadRoleBasedAccessControls:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.get("api/projects/@current/global_access_controls");return response},updateRoleBasedAccessControls:async _ref4=>{let{accessControls}=_ref4;for(let control of accessControls)await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.put("api/projects/@current/global_access_controls",{...control});return values.roleBasedAccessControls}}],roles:[null,{loadRoles:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.list();return response?.results||[]},addMembersToRole:async _ref5=>{let{role,members}=_ref5;if(!values.roles)return null;let newMembers=await Promise.all(members.map(async userUuid=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.members.create(role.id,userUuid)));return role.members=[...role.members,...newMembers],[...values.roles]},removeMemberFromRole:async _ref6=>{let{role,roleMemberId}=_ref6;return values.roles?(await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.members.delete(role.id,roleMemberId),role.members=role.members.filter(roleMember=>roleMember.id!==roleMemberId),[...values.roles]):null},deleteRole:async _ref7=>{let{roleId}=_ref7,role=values.roles?.find(r=>r.id===roleId);return role?(await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.delete(role.id),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`Role "${role.name}" deleted`),values.roles?.filter(r=>r.id!==role.id)||[]):values.roles}}]}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref8=>{let{values,actions}=_ref8;return{editingRole:{defaults:{name:""},errors:_ref9=>{let{name}=_ref9;return{name:name?null:"Please choose a name for the role"}},submit:async _ref10=>{let{name}=_ref10;if(!values.editingRoleId)return;let role=null;role="new"===values.editingRoleId?await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.create(name):await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.update(values.editingRoleId,{name}),actions.loadRoles(),actions.setEditingRoleId(null),actions.selectRoleId(role.id)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref11=>{let{actions,values}=_ref11;return{updateRoleBasedAccessControlsSuccess:()=>actions.loadRoleBasedAccessControls(),loadRolesSuccess:()=>{kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.hashParams.role&&actions.selectRoleId(kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.hashParams.role)},deleteRoleSuccess:()=>{actions.loadRoles(),actions.setEditingRoleId(null),actions.selectRoleId(null)},setEditingRoleId:()=>{let existingRole=values.roles?.find(role=>role.id===values.editingRoleId);actions.resetEditingRole({name:existingRole?.name||""})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({availableLevels:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr;return null!==(_roleBasedAccessContr=roleBasedAccessControls?.available_access_levels)&&void 0!==_roleBasedAccessContr?_roleBasedAccessContr:[]}],defaultAccessLevel:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr2;return null!==(_roleBasedAccessContr2=roleBasedAccessControls?.default_access_level)&&void 0!==_roleBasedAccessContr2?_roleBasedAccessContr2:null}],defaultResourceAccessControls:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr3;let accessControls=null!==(_roleBasedAccessContr3=roleBasedAccessControls?.access_controls)&&void 0!==_roleBasedAccessContr3?_roleBasedAccessContr3:[],accessControlByResource=accessControls.filter(control=>!control.role).reduce((acc,control)=>({...acc,[control.resource]:control}),{});return{accessControlByResource}}],rolesWithResourceAccessControls:[s=>[s.roles,s.roleBasedAccessControls,s.defaultResourceAccessControls],(roles,roleBasedAccessControls,defaultResourceAccessControls)=>{var _roleBasedAccessContr4;if(!roles)return[];let accessControls=null!==(_roleBasedAccessContr4=roleBasedAccessControls?.access_controls)&&void 0!==_roleBasedAccessContr4?_roleBasedAccessContr4:[];return[defaultResourceAccessControls,...roles.map(role=>{let accessControlByResource=accessControls.filter(control=>control.role===role.id).reduce((acc,control)=>({...acc,[control.resource]:control}),{});return{role,accessControlByResource}})]}],resources:[()=>[],()=>["feature_flag","dashboard","insight","notebook"]],canEditRoleBasedAccessControls:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr5;return null!==(_roleBasedAccessContr5=roleBasedAccessControls?.user_can_edit_access_levels)&&void 0!==_roleBasedAccessContr5?_roleBasedAccessContr5:null}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref12=>{let{actions,values}=_ref12;values.hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.ROLE_BASED_ACCESS)&&(actions.loadRoles(),actions.loadRoleBasedAccessControls(),actions.ensureAllMembersLoaded())}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.actionToUrl)(_ref13=>{let{values}=_ref13;return{selectRoleId:()=>{var _values$selectedRoleI;let{currentLocation}=kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values;return[currentLocation.pathname,currentLocation.searchParams,{...currentLocation.hashParams,role:null!==(_values$selectedRoleI=values.selectedRoleId)&&void 0!==_values$selectedRoleI?_values$selectedRoleI:void 0}]}}})])},"./frontend/src/layout/navigation-3000/sidepanel/panels/activation/activationLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>activationLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),utils=__webpack_require__("./frontend/src/queries/utils.ts");let reverseProxyCheckerLogic=(0,index_esm.kea)([(0,index_esm.path)(["components","ReverseProxyChecker","reverseProxyCheckerLogic"]),(0,lib.loaders)({hasReverseProxy:[!1,{loadHasReverseProxy:async()=>{let query={kind:schema.OH.HogQLQuery,query:(0,utils.zP)`SELECT properties.$lib_custom_api_host AS lib_custom_api_host +(self.webpackChunkposthog=self.webpackChunkposthog||[]).push([[40179],{"./frontend/src lazy recursive ^\\.\\/.*$ include: (?:\\/frontend\\/src(?:\\/(?%21\\.)(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/%7C\\/%7C$)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx%7Cmdx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./exporter/Exporter.stories":["./frontend/src/exporter/Exporter.stories.tsx",18146,53342,85564,26299,74653,89245],"./exporter/Exporter.stories.tsx":["./frontend/src/exporter/Exporter.stories.tsx",18146,53342,85564,26299,74653,89245],"./layout/ErrorProjectUnavailable.stories":["./frontend/src/layout/ErrorProjectUnavailable.stories.tsx",89716],"./layout/ErrorProjectUnavailable.stories.tsx":["./frontend/src/layout/ErrorProjectUnavailable.stories.tsx",89716],"./layout/FeaturePreviews/FeaturePreviews.stories":["./frontend/src/layout/FeaturePreviews/FeaturePreviews.stories.tsx",57578],"./layout/FeaturePreviews/FeaturePreviews.stories.tsx":["./frontend/src/layout/FeaturePreviews/FeaturePreviews.stories.tsx",57578],"./layout/navigation-3000/Navigation.stories":["./frontend/src/layout/navigation-3000/Navigation.stories.tsx",29749,36125],"./layout/navigation-3000/Navigation.stories.tsx":["./frontend/src/layout/navigation-3000/Navigation.stories.tsx",29749,36125],"./layout/navigation-3000/components/KeyboardShortcut.stories":["./frontend/src/layout/navigation-3000/components/KeyboardShortcut.stories.tsx",39298],"./layout/navigation-3000/components/KeyboardShortcut.stories.tsx":["./frontend/src/layout/navigation-3000/components/KeyboardShortcut.stories.tsx",39298],"./layout/navigation-3000/components/Sidebar.stories":["./frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx",43847],"./layout/navigation-3000/components/Sidebar.stories.tsx":["./frontend/src/layout/navigation-3000/components/Sidebar.stories.tsx",43847],"./layout/navigation-3000/sidepanel/SidePanel.stories":["./frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx",67197],"./layout/navigation-3000/sidepanel/SidePanel.stories.tsx":["./frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx",67197],"./lib/components/ActivityLog/ActivityLog.stories":["./frontend/src/lib/components/ActivityLog/ActivityLog.stories.tsx",94831],"./lib/components/ActivityLog/ActivityLog.stories.tsx":["./frontend/src/lib/components/ActivityLog/ActivityLog.stories.tsx",94831],"./lib/components/ActivityLog/SentenceList.stories":["./frontend/src/lib/components/ActivityLog/SentenceList.stories.tsx",92223],"./lib/components/ActivityLog/SentenceList.stories.tsx":["./frontend/src/lib/components/ActivityLog/SentenceList.stories.tsx",92223],"./lib/components/Animation/Animation.stories":["./frontend/src/lib/components/Animation/Animation.stories.tsx",85566],"./lib/components/Animation/Animation.stories.tsx":["./frontend/src/lib/components/Animation/Animation.stories.tsx",85566],"./lib/components/Cards/InsightCard/InsightCard.stories":["./frontend/src/lib/components/Cards/InsightCard/InsightCard.stories.tsx",18146,85564,23407],"./lib/components/Cards/InsightCard/InsightCard.stories.tsx":["./frontend/src/lib/components/Cards/InsightCard/InsightCard.stories.tsx",18146,85564,23407],"./lib/components/Cards/InsightCard/InsightDetails.stories":["./frontend/src/lib/components/Cards/InsightCard/InsightDetails.stories.tsx",18146,85564,71831],"./lib/components/Cards/InsightCard/InsightDetails.stories.tsx":["./frontend/src/lib/components/Cards/InsightCard/InsightDetails.stories.tsx",18146,85564,71831],"./lib/components/Cards/TextCard/TextCard.stories":["./frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx",2543],"./lib/components/Cards/TextCard/TextCard.stories.tsx":["./frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx",2543],"./lib/components/CodeSnippet/CodeSnippet.stories":["./frontend/src/lib/components/CodeSnippet/CodeSnippet.stories.tsx",90346],"./lib/components/CodeSnippet/CodeSnippet.stories.tsx":["./frontend/src/lib/components/CodeSnippet/CodeSnippet.stories.tsx",90346],"./lib/components/CommandBar/CommandBar.stories":["./frontend/src/lib/components/CommandBar/CommandBar.stories.tsx",75110],"./lib/components/CommandBar/CommandBar.stories.tsx":["./frontend/src/lib/components/CommandBar/CommandBar.stories.tsx",75110],"./lib/components/CompactList/CompactList.stories":["./frontend/src/lib/components/CompactList/CompactList.stories.tsx",30444],"./lib/components/CompactList/CompactList.stories.tsx":["./frontend/src/lib/components/CompactList/CompactList.stories.tsx",30444],"./lib/components/EditableField/EditableField.stories":["./frontend/src/lib/components/EditableField/EditableField.stories.tsx",6319],"./lib/components/EditableField/EditableField.stories.tsx":["./frontend/src/lib/components/EditableField/EditableField.stories.tsx",6319],"./lib/components/EmptyMessage/EmptyMessage.stories":["./frontend/src/lib/components/EmptyMessage/EmptyMessage.stories.tsx",78095],"./lib/components/EmptyMessage/EmptyMessage.stories.tsx":["./frontend/src/lib/components/EmptyMessage/EmptyMessage.stories.tsx",78095],"./lib/components/Errors/ErrorDisplay.stories":["./frontend/src/lib/components/Errors/ErrorDisplay.stories.tsx",73949],"./lib/components/Errors/ErrorDisplay.stories.tsx":["./frontend/src/lib/components/Errors/ErrorDisplay.stories.tsx",73949],"./lib/components/EventSelect/EventSelect.stories":["./frontend/src/lib/components/EventSelect/EventSelect.stories.tsx",96062],"./lib/components/EventSelect/EventSelect.stories.tsx":["./frontend/src/lib/components/EventSelect/EventSelect.stories.tsx",96062],"./lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories":["./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx",59545],"./lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx":["./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.stories.tsx",59545],"./lib/components/HedgehogBuddy/HedgehogBuddy.stories":["./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx",46460],"./lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx":["./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.stories.tsx",46460],"./lib/components/HogQLEditor/HogQLEditor.stories":["./frontend/src/lib/components/HogQLEditor/HogQLEditor.stories.tsx",23398],"./lib/components/HogQLEditor/HogQLEditor.stories.tsx":["./frontend/src/lib/components/HogQLEditor/HogQLEditor.stories.tsx",23398],"./lib/components/Hogfetti/Hogfetti.stories":["./frontend/src/lib/components/Hogfetti/Hogfetti.stories.tsx",986],"./lib/components/Hogfetti/Hogfetti.stories.tsx":["./frontend/src/lib/components/Hogfetti/Hogfetti.stories.tsx",986],"./lib/components/Map/Map.stories":["./frontend/src/lib/components/Map/Map.stories.tsx",91175],"./lib/components/Map/Map.stories.tsx":["./frontend/src/lib/components/Map/Map.stories.tsx",91175],"./lib/components/NotFound/NotFound.stories":["./frontend/src/lib/components/NotFound/NotFound.stories.tsx",32146],"./lib/components/NotFound/NotFound.stories.tsx":["./frontend/src/lib/components/NotFound/NotFound.stories.tsx",32146],"./lib/components/ObjectTags/ObjectTags.stories":["./frontend/src/lib/components/ObjectTags/ObjectTags.stories.tsx",88082],"./lib/components/ObjectTags/ObjectTags.stories.tsx":["./frontend/src/lib/components/ObjectTags/ObjectTags.stories.tsx",88082],"./lib/components/PathCleanFilters/PathCleanFilters.stories":["./frontend/src/lib/components/PathCleanFilters/PathCleanFilters.stories.tsx",68097],"./lib/components/PathCleanFilters/PathCleanFilters.stories.tsx":["./frontend/src/lib/components/PathCleanFilters/PathCleanFilters.stories.tsx",68097],"./lib/components/PayGateMini/PayGateMini.stories":["./frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx",6875,15773],"./lib/components/PayGateMini/PayGateMini.stories.tsx":["./frontend/src/lib/components/PayGateMini/PayGateMini.stories.tsx",6875,15773],"./lib/components/Playlist/Playlist.stories":["./frontend/src/lib/components/Playlist/Playlist.stories.tsx",11923],"./lib/components/Playlist/Playlist.stories.tsx":["./frontend/src/lib/components/Playlist/Playlist.stories.tsx",11923],"./lib/components/ProductIntroduction/ProductIntroduction.stories":["./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.stories.tsx",87111],"./lib/components/ProductIntroduction/ProductIntroduction.stories.tsx":["./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.stories.tsx",87111],"./lib/components/PropertiesTable/PropertiesTable.stories":["./frontend/src/lib/components/PropertiesTable/PropertiesTable.stories.tsx",10057],"./lib/components/PropertiesTable/PropertiesTable.stories.tsx":["./frontend/src/lib/components/PropertiesTable/PropertiesTable.stories.tsx",10057],"./lib/components/PropertiesTimeline/PropertiesTimeline.stories":["./frontend/src/lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx",39127],"./lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx":["./frontend/src/lib/components/PropertiesTimeline/PropertiesTimeline.stories.tsx",39127],"./lib/components/PropertyFilters/PropertyFilters.stories":["./frontend/src/lib/components/PropertyFilters/PropertyFilters.stories.tsx",85205],"./lib/components/PropertyFilters/PropertyFilters.stories.tsx":["./frontend/src/lib/components/PropertyFilters/PropertyFilters.stories.tsx",85205],"./lib/components/PropertyFilters/components/OperatorValueSelect.stories":["./frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx",24792],"./lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx":["./frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.stories.tsx",24792],"./lib/components/PropertyFilters/components/PropertyFilterButton.stories":["./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx",59931],"./lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx":["./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.stories.tsx",59931],"./lib/components/PropertyIcon.stories":["./frontend/src/lib/components/PropertyIcon.stories.tsx",99387],"./lib/components/PropertyIcon.stories.tsx":["./frontend/src/lib/components/PropertyIcon.stories.tsx",99387],"./lib/components/PropertyKeyInfo.stories":["./frontend/src/lib/components/PropertyKeyInfo.stories.tsx",60665],"./lib/components/PropertyKeyInfo.stories.tsx":["./frontend/src/lib/components/PropertyKeyInfo.stories.tsx",60665],"./lib/components/PropertySelect/PropertySelect.stories":["./frontend/src/lib/components/PropertySelect/PropertySelect.stories.tsx",92176],"./lib/components/PropertySelect/PropertySelect.stories.tsx":["./frontend/src/lib/components/PropertySelect/PropertySelect.stories.tsx",92176],"./lib/components/ScrollableShadows/ScrollableShadows.stories":["./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.stories.tsx",2313],"./lib/components/ScrollableShadows/ScrollableShadows.stories.tsx":["./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.stories.tsx",2313],"./lib/components/Sharing/SharingModal.stories":["./frontend/src/lib/components/Sharing/SharingModal.stories.tsx",40722],"./lib/components/Sharing/SharingModal.stories.tsx":["./frontend/src/lib/components/Sharing/SharingModal.stories.tsx",40722],"./lib/components/Subscriptions/SubscriptionsModal.stories":["./frontend/src/lib/components/Subscriptions/SubscriptionsModal.stories.tsx",25733],"./lib/components/Subscriptions/SubscriptionsModal.stories.tsx":["./frontend/src/lib/components/Subscriptions/SubscriptionsModal.stories.tsx",25733],"./lib/components/TZLabel/TZLabel.stories":["./frontend/src/lib/components/TZLabel/TZLabel.stories.tsx",68987],"./lib/components/TZLabel/TZLabel.stories.tsx":["./frontend/src/lib/components/TZLabel/TZLabel.stories.tsx",68987],"./lib/components/TaxonomicFilter/TaxonomicFilter.stories":["./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx",47124],"./lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx":["./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.stories.tsx",47124],"./lib/components/TaxonomicPopover/TaxonomicPopover.stories":["./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx",18373],"./lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx":["./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.stories.tsx",18373],"./lib/components/UniversalFilters/UniversalFilters.stories":["./frontend/src/lib/components/UniversalFilters/UniversalFilters.stories.tsx",95858],"./lib/components/UniversalFilters/UniversalFilters.stories.tsx":["./frontend/src/lib/components/UniversalFilters/UniversalFilters.stories.tsx",95858],"./lib/components/VerticalNestedDND/VerticalNestedDND.stories":["./frontend/src/lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx",8771],"./lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx":["./frontend/src/lib/components/VerticalNestedDND/VerticalNestedDND.stories.tsx",8771],"./lib/components/hedgehogs.stories":["./frontend/src/lib/components/hedgehogs.stories.tsx",63833],"./lib/components/hedgehogs.stories.tsx":["./frontend/src/lib/components/hedgehogs.stories.tsx",63833],"./lib/lemon-ui/LemonBadge/LemonBadge.stories":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx",28308],"./lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.stories.tsx",28308],"./lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx",15545],"./lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBadge/LemonBadgeNumber.stories.tsx",15545],"./lib/lemon-ui/LemonBanner/LemonBanner.stories":["./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx",55409],"./lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx":["./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.stories.tsx",55409],"./lib/lemon-ui/LemonButton/LemonButton.stories":["./frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx",90001],"./lib/lemon-ui/LemonButton/LemonButton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx",90001],"./lib/lemon-ui/LemonCalendar/LemonCalendar.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx",33214],"./lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.stories.tsx",33214],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx",72281],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.stories.tsx",72281],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx",1094],"./lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelectInput.stories.tsx",1094],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx",86910],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.stories.tsx",86910],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx",85903],"./lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.stories.tsx",85903],"./lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories":["./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx",38597],"./lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.stories.tsx",38597],"./lib/lemon-ui/LemonCollapse/LemonCollapse.stories":["./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx",50339],"./lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx":["./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.stories.tsx",50339],"./lib/lemon-ui/LemonDialog/LemonDialog.stories":["./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx",39513],"./lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx":["./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.stories.tsx",39513],"./lib/lemon-ui/LemonDivider/LemonDivider.stories":["./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx",58168],"./lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx":["./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.stories.tsx",58168],"./lib/lemon-ui/LemonField/LemonField.stories":["./frontend/src/lib/lemon-ui/LemonField/LemonField.stories.tsx",7422],"./lib/lemon-ui/LemonField/LemonField.stories.tsx":["./frontend/src/lib/lemon-ui/LemonField/LemonField.stories.tsx",7422],"./lib/lemon-ui/LemonFileInput/LemonFileInput.stories":["./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx",53617],"./lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.stories.tsx",53617],"./lib/lemon-ui/LemonInput/LemonInput.stories":["./frontend/src/lib/lemon-ui/LemonInput/LemonInput.stories.tsx",55394],"./lib/lemon-ui/LemonInput/LemonInput.stories.tsx":["./frontend/src/lib/lemon-ui/LemonInput/LemonInput.stories.tsx",55394],"./lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories":["./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx",10223],"./lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.stories.tsx",10223],"./lib/lemon-ui/LemonLabel/LemonLabel.stories":["./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx",60518],"./lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx":["./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.stories.tsx",60518],"./lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories":["./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx",29456],"./lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx":["./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.stories.tsx",29456],"./lib/lemon-ui/LemonMenu/LemonMenu.stories":["./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx",95844],"./lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx":["./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.stories.tsx",95844],"./lib/lemon-ui/LemonModal/LemonModal.stories":["./frontend/src/lib/lemon-ui/LemonModal/LemonModal.stories.tsx",66646],"./lib/lemon-ui/LemonModal/LemonModal.stories.tsx":["./frontend/src/lib/lemon-ui/LemonModal/LemonModal.stories.tsx",66646],"./lib/lemon-ui/LemonProgress/LemonProgress.stories":["./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx",52375],"./lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx":["./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx",52375],"./lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories":["./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx",16498],"./lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx":["./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.stories.tsx",16498],"./lib/lemon-ui/LemonRadio/LemonRadio.stories":["./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx",2677],"./lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx":["./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.stories.tsx",2677],"./lib/lemon-ui/LemonRow/LemonRow.stories":["./frontend/src/lib/lemon-ui/LemonRow/LemonRow.stories.tsx",23708],"./lib/lemon-ui/LemonRow/LemonRow.stories.tsx":["./frontend/src/lib/lemon-ui/LemonRow/LemonRow.stories.tsx",23708],"./lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories":["./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx",78334],"./lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.stories.tsx",78334],"./lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories":["./frontend/src/lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx",21226],"./lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSegmentedSelect/LemonSegmentedSelect.stories.tsx",21226],"./lib/lemon-ui/LemonSelect/LemonSelect.stories":["./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx",57354],"./lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.stories.tsx",57354],"./lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories":["./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx",56428],"./lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.stories.tsx",56428],"./lib/lemon-ui/LemonSlider/LemonSlider.stories":["./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx",51554],"./lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.stories.tsx",51554],"./lib/lemon-ui/LemonSnack/LemonSnack.stories":["./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx",64014],"./lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.stories.tsx",64014],"./lib/lemon-ui/LemonSwitch/LemonSwitch.stories":["./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx",80844],"./lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx":["./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.stories.tsx",80844],"./lib/lemon-ui/LemonTable/LemonTable.stories":["./frontend/src/lib/lemon-ui/LemonTable/LemonTable.stories.tsx",12398],"./lib/lemon-ui/LemonTable/LemonTable.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTable/LemonTable.stories.tsx",12398],"./lib/lemon-ui/LemonTabs/LemonTabs.stories":["./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx",82821],"./lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.stories.tsx",82821],"./lib/lemon-ui/LemonTag/LemonTag.stories":["./frontend/src/lib/lemon-ui/LemonTag/LemonTag.stories.tsx",81809],"./lib/lemon-ui/LemonTag/LemonTag.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTag/LemonTag.stories.tsx",81809],"./lib/lemon-ui/LemonTextArea/LemonTextArea.stories":["./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx",19801],"./lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx":["./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.stories.tsx",19801],"./lib/lemon-ui/LemonToast/LemonToast.stories":["./frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx",50962],"./lib/lemon-ui/LemonToast/LemonToast.stories.tsx":["./frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx",50962],"./lib/lemon-ui/Lettermark/Lettermark.stories":["./frontend/src/lib/lemon-ui/Lettermark/Lettermark.stories.tsx",74973],"./lib/lemon-ui/Lettermark/Lettermark.stories.tsx":["./frontend/src/lib/lemon-ui/Lettermark/Lettermark.stories.tsx",74973],"./lib/lemon-ui/Link/Link.stories":["./frontend/src/lib/lemon-ui/Link/Link.stories.tsx",69106],"./lib/lemon-ui/Link/Link.stories.tsx":["./frontend/src/lib/lemon-ui/Link/Link.stories.tsx",69106],"./lib/lemon-ui/PaginationControl/PaginationControl.stories":["./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx",18587],"./lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx":["./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.stories.tsx",18587],"./lib/lemon-ui/Popover/Popover.stories":["./frontend/src/lib/lemon-ui/Popover/Popover.stories.tsx",28089],"./lib/lemon-ui/Popover/Popover.stories.tsx":["./frontend/src/lib/lemon-ui/Popover/Popover.stories.tsx",28089],"./lib/lemon-ui/ProfilePicture/ProfileBubbles.stories":["./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx",48379],"./lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx":["./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.stories.tsx",48379],"./lib/lemon-ui/Spinner/Spinner.stories":["./frontend/src/lib/lemon-ui/Spinner/Spinner.stories.tsx",92168],"./lib/lemon-ui/Spinner/Spinner.stories.tsx":["./frontend/src/lib/lemon-ui/Spinner/Spinner.stories.tsx",92168],"./lib/lemon-ui/Splotch/Splotch.stories":["./frontend/src/lib/lemon-ui/Splotch/Splotch.stories.tsx",14989],"./lib/lemon-ui/Splotch/Splotch.stories.tsx":["./frontend/src/lib/lemon-ui/Splotch/Splotch.stories.tsx",14989],"./lib/lemon-ui/UploadedLogo/UploadedLogo.stories":["./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx",24378],"./lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx":["./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.stories.tsx",24378],"./lib/lemon-ui/colors.stories":["./frontend/src/lib/lemon-ui/colors.stories.tsx",57297],"./lib/lemon-ui/colors.stories.tsx":["./frontend/src/lib/lemon-ui/colors.stories.tsx",57297],"./lib/lemon-ui/icons/icons.stories":["./frontend/src/lib/lemon-ui/icons/icons.stories.tsx",28462],"./lib/lemon-ui/icons/icons.stories.tsx":["./frontend/src/lib/lemon-ui/icons/icons.stories.tsx",28462],"./lib/lemon-ui/icons/icons3000.stories":["./frontend/src/lib/lemon-ui/icons/icons3000.stories.tsx",77309],"./lib/lemon-ui/icons/icons3000.stories.tsx":["./frontend/src/lib/lemon-ui/icons/icons3000.stories.tsx",77309],"./queries/nodes/DataNode/DataNode.stories":["./frontend/src/queries/nodes/DataNode/DataNode.stories.tsx",89290,71059],"./queries/nodes/DataNode/DataNode.stories.tsx":["./frontend/src/queries/nodes/DataNode/DataNode.stories.tsx",89290,71059],"./queries/nodes/DataTable/DataTable.stories":["./frontend/src/queries/nodes/DataTable/DataTable.stories.tsx",89290,44214],"./queries/nodes/DataTable/DataTable.stories.tsx":["./frontend/src/queries/nodes/DataTable/DataTable.stories.tsx",89290,44214],"./queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories":["./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx",48419],"./queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx":["./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.stories.tsx",48419],"./scenes/PreflightCheck/PreflightCheck.stories":["./frontend/src/scenes/PreflightCheck/PreflightCheck.stories.tsx",38396],"./scenes/PreflightCheck/PreflightCheck.stories.tsx":["./frontend/src/scenes/PreflightCheck/PreflightCheck.stories.tsx",38396],"./scenes/Unsubscribe/Unsubscribe.stories":["./frontend/src/scenes/Unsubscribe/Unsubscribe.stories.tsx",14047],"./scenes/Unsubscribe/Unsubscribe.stories.tsx":["./frontend/src/scenes/Unsubscribe/Unsubscribe.stories.tsx",14047],"./scenes/actions/Action.stories":["./frontend/src/scenes/actions/Action.stories.tsx",92412],"./scenes/actions/Action.stories.tsx":["./frontend/src/scenes/actions/Action.stories.tsx",92412],"./scenes/activity/explore/Events.stories":["./frontend/src/scenes/activity/explore/Events.stories.tsx",23046],"./scenes/activity/explore/Events.stories.tsx":["./frontend/src/scenes/activity/explore/Events.stories.tsx",23046],"./scenes/annotations/Annotations.stories":["./frontend/src/scenes/annotations/Annotations.stories.tsx",87121],"./scenes/annotations/Annotations.stories.tsx":["./frontend/src/scenes/annotations/Annotations.stories.tsx",87121],"./scenes/authentication/InviteSignup.stories":["./frontend/src/scenes/authentication/InviteSignup.stories.tsx",41694],"./scenes/authentication/InviteSignup.stories.tsx":["./frontend/src/scenes/authentication/InviteSignup.stories.tsx",41694],"./scenes/authentication/Login.stories":["./frontend/src/scenes/authentication/Login.stories.tsx",60711],"./scenes/authentication/Login.stories.tsx":["./frontend/src/scenes/authentication/Login.stories.tsx",60711],"./scenes/authentication/PasswordReset.stories":["./frontend/src/scenes/authentication/PasswordReset.stories.tsx",16680],"./scenes/authentication/PasswordReset.stories.tsx":["./frontend/src/scenes/authentication/PasswordReset.stories.tsx",16680],"./scenes/authentication/PasswordResetComplete.stories":["./frontend/src/scenes/authentication/PasswordResetComplete.stories.tsx",46925],"./scenes/authentication/PasswordResetComplete.stories.tsx":["./frontend/src/scenes/authentication/PasswordResetComplete.stories.tsx",46925],"./scenes/authentication/signup/Signup.stories":["./frontend/src/scenes/authentication/signup/Signup.stories.tsx",11854],"./scenes/authentication/signup/Signup.stories.tsx":["./frontend/src/scenes/authentication/signup/Signup.stories.tsx",11854],"./scenes/authentication/signup/verify-email/VerifyEmail.stories":["./frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx",9416],"./scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx":["./frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.stories.tsx",9416],"./scenes/billing/Billing.stories":["./frontend/src/scenes/billing/Billing.stories.tsx",32375],"./scenes/billing/Billing.stories.tsx":["./frontend/src/scenes/billing/Billing.stories.tsx",32375],"./scenes/billing/BillingProduct.stories":["./frontend/src/scenes/billing/BillingProduct.stories.tsx",22244],"./scenes/billing/BillingProduct.stories.tsx":["./frontend/src/scenes/billing/BillingProduct.stories.tsx",22244],"./scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx",31340],"./scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.stories.tsx",31340],"./scenes/cohorts/CohortFilters/CohortNumberField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx",91736],"./scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortNumberField.stories.tsx",91736],"./scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx",79799],"./scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortPersonPropertiesValuesField.stories.tsx",79799],"./scenes/cohorts/CohortFilters/CohortSelectorField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx",36795],"./scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortSelectorField.stories.tsx",36795],"./scenes/cohorts/CohortFilters/CohortTaxonomicField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx",97562],"./scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortTaxonomicField.stories.tsx",97562],"./scenes/cohorts/CohortFilters/CohortTextField.stories":["./frontend/src/scenes/cohorts/CohortFilters/CohortTextField.stories.tsx",29179],"./scenes/cohorts/CohortFilters/CohortTextField.stories.tsx":["./frontend/src/scenes/cohorts/CohortFilters/CohortTextField.stories.tsx",29179],"./scenes/dashboard/DashboardInsightCardLegend.stories":["./frontend/src/scenes/dashboard/DashboardInsightCardLegend.stories.tsx",48780],"./scenes/dashboard/DashboardInsightCardLegend.stories.tsx":["./frontend/src/scenes/dashboard/DashboardInsightCardLegend.stories.tsx",48780],"./scenes/dashboard/DashboardTemplateEditor.stories":["./frontend/src/scenes/dashboard/DashboardTemplateEditor.stories.tsx",47858],"./scenes/dashboard/DashboardTemplateEditor.stories.tsx":["./frontend/src/scenes/dashboard/DashboardTemplateEditor.stories.tsx",47858],"./scenes/dashboard/Dashboards.stories":["./frontend/src/scenes/dashboard/Dashboards.stories.tsx",29749,84851],"./scenes/dashboard/Dashboards.stories.tsx":["./frontend/src/scenes/dashboard/Dashboards.stories.tsx",29749,84851],"./scenes/data-management/DataManagementScene.stories":["./frontend/src/scenes/data-management/DataManagementScene.stories.tsx",82250],"./scenes/data-management/DataManagementScene.stories.tsx":["./frontend/src/scenes/data-management/DataManagementScene.stories.tsx",82250],"./scenes/early-access-features/EarlyAccessFeatures.stories":["./frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx",57195],"./scenes/early-access-features/EarlyAccessFeatures.stories.tsx":["./frontend/src/scenes/early-access-features/EarlyAccessFeatures.stories.tsx",57195],"./scenes/error-tracking/ErrorTracking.stories":["./frontend/src/scenes/error-tracking/ErrorTracking.stories.tsx",91480],"./scenes/error-tracking/ErrorTracking.stories.tsx":["./frontend/src/scenes/error-tracking/ErrorTracking.stories.tsx",91480],"./scenes/feature-flags/FeatureFlagCodeInstructions.stories":["./frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx",86983],"./scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx":["./frontend/src/scenes/feature-flags/FeatureFlagCodeInstructions.stories.tsx",86983],"./scenes/feature-flags/FeatureFlags.stories":["./frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx",16023],"./scenes/feature-flags/FeatureFlags.stories.tsx":["./frontend/src/scenes/feature-flags/FeatureFlags.stories.tsx",16023],"./scenes/funnels/FunnelTooltip.stories":["./frontend/src/scenes/funnels/FunnelTooltip.stories.tsx",49136],"./scenes/funnels/FunnelTooltip.stories.tsx":["./frontend/src/scenes/funnels/FunnelTooltip.stories.tsx",49136],"./scenes/heatmaps/HeatmapsBrowser.stories":["./frontend/src/scenes/heatmaps/HeatmapsBrowser.stories.tsx",86721],"./scenes/heatmaps/HeatmapsBrowser.stories.tsx":["./frontend/src/scenes/heatmaps/HeatmapsBrowser.stories.tsx",86721],"./scenes/insights/EmptyStates/EmptyStates.stories":["./frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx",17723],"./scenes/insights/EmptyStates/EmptyStates.stories.tsx":["./frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx",17723],"./scenes/insights/InsightTooltip/InsightTooltip.stories":["./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.stories.tsx",40961],"./scenes/insights/InsightTooltip/InsightTooltip.stories.tsx":["./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.stories.tsx",40961],"./scenes/insights/Insights.stories":["./frontend/src/scenes/insights/Insights.stories.tsx",18146,53342,26299,74653,15778],"./scenes/insights/Insights.stories.tsx":["./frontend/src/scenes/insights/Insights.stories.tsx",18146,53342,26299,74653,15778],"./scenes/insights/filters/ActionFilter/ActionFilter.stories":["./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx",53342,6396],"./scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx":["./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.stories.tsx",53342,6396],"./scenes/insights/views/BoldNumber/Textfit.stories":["./frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx",5180],"./scenes/insights/views/BoldNumber/Textfit.stories.tsx":["./frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx",5180],"./scenes/insights/views/Funnels/FunnelCorrelationTable.stories":["./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx",16495],"./scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx":["./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.stories.tsx",16495],"./scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories":["./frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx",38639],"./scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx":["./frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.stories.tsx",38639],"./scenes/insights/views/InsightsTable/InsightsTable.stories":["./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.stories.tsx",53342,50991],"./scenes/insights/views/InsightsTable/InsightsTable.stories.tsx":["./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.stories.tsx",53342,50991],"./scenes/max/Max.stories":["./frontend/src/scenes/max/Max.stories.tsx",73086],"./scenes/max/Max.stories.tsx":["./frontend/src/scenes/max/Max.stories.tsx",73086],"./scenes/notebooks/Notebook/Notebook.stories":["./frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx",1808],"./scenes/notebooks/Notebook/Notebook.stories.tsx":["./frontend/src/scenes/notebooks/Notebook/Notebook.stories.tsx",1808],"./scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories":["./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx",93070],"./scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx":["./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx",93070],"./scenes/onboarding/Onboarding.stories":["./frontend/src/scenes/onboarding/Onboarding.stories.tsx",6875,36501],"./scenes/onboarding/Onboarding.stories.tsx":["./frontend/src/scenes/onboarding/Onboarding.stories.tsx",6875,36501],"./scenes/persons-management/PersonsManagementScene.stories":["./frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx",68330],"./scenes/persons-management/PersonsManagementScene.stories.tsx":["./frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx",68330],"./scenes/pipeline/Pipeline.stories":["./frontend/src/scenes/pipeline/Pipeline.stories.tsx",92991],"./scenes/pipeline/Pipeline.stories.tsx":["./frontend/src/scenes/pipeline/Pipeline.stories.tsx",92991],"./scenes/products/Products.stories":["./frontend/src/scenes/products/Products.stories.tsx",16116],"./scenes/products/Products.stories.tsx":["./frontend/src/scenes/products/Products.stories.tsx",16116],"./scenes/project-homepage/ProjectHomepage.stories":["./frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx",29749,82723],"./scenes/project-homepage/ProjectHomepage.stories.tsx":["./frontend/src/scenes/project-homepage/ProjectHomepage.stories.tsx",29749,82723],"./scenes/project-homepage/WatchNextList.stories":["./frontend/src/scenes/project-homepage/WatchNextList.stories.tsx",52425],"./scenes/project-homepage/WatchNextList.stories.tsx":["./frontend/src/scenes/project-homepage/WatchNextList.stories.tsx",52425],"./scenes/saved-insights/SavedInsights.stories":["./frontend/src/scenes/saved-insights/SavedInsights.stories.tsx",26299,26657],"./scenes/saved-insights/SavedInsights.stories.tsx":["./frontend/src/scenes/saved-insights/SavedInsights.stories.tsx",26299,26657],"./scenes/session-recordings/SessionsRecordings-player-failure.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx",23237,34377],"./scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-failure.stories.tsx",23237,34377],"./scenes/session-recordings/SessionsRecordings-player-success.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx",23237,38383],"./scenes/session-recordings/SessionsRecordings-player-success.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-player-success.stories.tsx",23237,38383],"./scenes/session-recordings/SessionsRecordings-playlist-listing.stories":["./frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx",70138],"./scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx":["./frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx",70138],"./scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories":["./frontend/src/scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx",739],"./scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx":["./frontend/src/scenes/session-recordings/apm/playerInspector/ItemPerformanceEvent.stories.tsx",739],"./scenes/session-recordings/player/inspector/PlayerInspector.stories":["./frontend/src/scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx",9111],"./scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/PlayerInspector.stories.tsx",9111],"./scenes/session-recordings/player/inspector/components/ItemComment.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx",70904],"./scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemComment.stories.tsx",70904],"./scenes/session-recordings/player/inspector/components/ItemEvent.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx",69269],"./scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.stories.tsx",69269],"./scenes/session-recordings/player/inspector/components/NavigationItem.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx",98065],"./scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/NavigationItem.stories.tsx",98065],"./scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories":["./frontend/src/scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx",16115],"./scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx":["./frontend/src/scenes/session-recordings/player/inspector/components/Timing/NetworkRequestTiming.stories.tsx",16115],"./scenes/session-recordings/playlist/SessionRecordingPreview.stories":["./frontend/src/scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx",74710],"./scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx":["./frontend/src/scenes/session-recordings/playlist/SessionRecordingPreview.stories.tsx",74710],"./scenes/settings/SettingsScene.stories":["./frontend/src/scenes/settings/SettingsScene.stories.tsx",94678],"./scenes/settings/SettingsScene.stories.tsx":["./frontend/src/scenes/settings/SettingsScene.stories.tsx",94678],"./scenes/settings/environment/SlackIntegration.stories":["./frontend/src/scenes/settings/environment/SlackIntegration.stories.tsx",71251],"./scenes/settings/environment/SlackIntegration.stories.tsx":["./frontend/src/scenes/settings/environment/SlackIntegration.stories.tsx",71251],"./scenes/settings/organization/Invites.stories":["./frontend/src/scenes/settings/organization/Invites.stories.tsx",72134],"./scenes/settings/organization/Invites.stories.tsx":["./frontend/src/scenes/settings/organization/Invites.stories.tsx",72134],"./scenes/settings/organization/VerifiedDomains/SSOSelect.stories":["./frontend/src/scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx",69700],"./scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx":["./frontend/src/scenes/settings/organization/VerifiedDomains/SSOSelect.stories.tsx",69700],"./scenes/surveys/Surveys.stories":["./frontend/src/scenes/surveys/Surveys.stories.tsx",10749],"./scenes/surveys/Surveys.stories.tsx":["./frontend/src/scenes/surveys/Surveys.stories.tsx",10749],"./scenes/trends/persons-modal/PersonsModal.stories":["./frontend/src/scenes/trends/persons-modal/PersonsModal.stories.tsx",95866],"./scenes/trends/persons-modal/PersonsModal.stories.tsx":["./frontend/src/scenes/trends/persons-modal/PersonsModal.stories.tsx",95866],"./scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories":["./frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx",59001],"./scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx":["./frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx",59001],"./stories/Hello.stories.mdx":["./frontend/src/stories/Hello.stories.mdx",20527],"./stories/How to add tabs to a scene.stories.mdx":["./frontend/src/stories/How to add tabs to a scene.stories.mdx",8056],"./stories/How to build a form.stories.mdx":["./frontend/src/stories/How to build a form.stories.mdx",92029],"./stories/How to build a scene.stories.mdx":["./frontend/src/stories/How to build a scene.stories.mdx",73570],"./stories/How to create stories.stories.mdx":["./frontend/src/stories/How to create stories.stories.mdx",17549],"./stories/How to mock requests.stories.mdx":["./frontend/src/stories/How to mock requests.stories.mdx",79960],"./stories/How to use components.stories.mdx":["./frontend/src/stories/How to use components.stories.mdx",23384],"./stories/Lemon UI.stories.mdx":["./frontend/src/stories/Lemon UI.stories.mdx",32728],"./stories/Missing components.stories.mdx":["./frontend/src/stories/Missing components.stories.mdx",43342],"./stories/Missing scenes.stories.mdx":["./frontend/src/stories/Missing scenes.stories.mdx",40892],"./toolbar/Toolbar.stories":["./frontend/src/toolbar/Toolbar.stories.tsx",19651,75576,45021],"./toolbar/Toolbar.stories.tsx":["./frontend/src/toolbar/Toolbar.stories.tsx",19651,75576,45021]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then(()=>{var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e});var ids=map[req],id=ids[0];return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(()=>__webpack_require__(id))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./frontend/src lazy recursive ^\\.\\/.*$ include: (?:\\/frontend\\/src(?:\\/(?%21\\.)(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/%7C\\/%7C$)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx%7Cmdx))$",module.exports=webpackAsyncContext},"./.storybook/preview.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{decorators:()=>decorators,default:()=>_storybook_preview,parameters:()=>parameters}),__webpack_require__("./frontend/src/styles/index.tsx");var config,dist=__webpack_require__("./node_modules/.pnpm/@storybook+blocks@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/blocks/dist/index.mjs"),browser=__webpack_require__("./frontend/src/mocks/browser.tsx"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),sdk=__webpack_require__("./node_modules/.pnpm/@sentry+react@7.112.1_react@18.2.0/node_modules/@sentry/react/esm/sdk.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),features=__webpack_require__("./frontend/src/mocks/features.ts"),node_modules_history=__webpack_require__("./node_modules/.pnpm/history@5.3.0/node_modules/history/index.js"),initKea=__webpack_require__("./frontend/src/initKea.ts"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),App=__webpack_require__("./frontend/src/scenes/App.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function KeaStory(_ref){let{children}=_ref,[didReset,setDidReset]=(0,react.useState)(!1);return(0,react.useEffect)(()=>{didReset||(function(){browser.KK.resetHandlers();let history=(0,node_modules_history.PP)({});history.pushState=history.push,history.replaceState=history.replace,(0,initKea.J1)({routerLocation:history.location,routerHistory:history}),featureFlagLogic.h.mount(),teamLogic.H.mount(),projectLogic.K.mount(),userLogic.userLogic.mount(),lib.router.mount();let{store}=(0,index_esm.getContext)();store.dispatch({type:"storybook init"})}(),setDidReset(!0))},[didReset]),didReset?children||(0,jsx_runtime.jsx)(App.g,{}):null}var mockdate=__webpack_require__("./node_modules/.pnpm/mockdate@3.0.5/node_modules/mockdate/lib/mockdate.js"),mockdate_default=__webpack_require__.n(mockdate),handlers=__webpack_require__("./frontend/src/mocks/handlers.ts"),apiHost=__webpack_require__("./frontend/src/lib/utils/apiHost.ts"),api_mock=__webpack_require__("./frontend/src/lib/api.mock.ts");browser.KK.start({quiet:!0,onUnhandledRequest(request,print){["/images/"].some(path=>request.url.pathname.startsWith(path))||print.warning()}}),window.__mockServiceWorker=browser.KK,window.POSTHOG_APP_CONTEXT={anonymous:!1,current_team:api_mock.k3,current_project:api_mock.w8,current_user:void 0,default_event_name:"$pageview",persisted_feature_flags:[],commit_sha:void 0,preflight:null,switched_team:null},window.JS_POSTHOG_HOST=(0,apiHost.Y)(),window.JS_POSTHOG_API_KEY?dist_module.ZP.init(window.JS_POSTHOG_API_KEY,(config={opt_out_useragent_filter:"localhost"===window.location.hostname,api_host:window.JS_POSTHOG_HOST,ui_host:window.JS_POSTHOG_UI_HOST,rageclick:!0,persistence:"localStorage+cookie",bootstrap:window.POSTHOG_USER_IDENTITY_WITH_FLAGS?window.POSTHOG_USER_IDENTITY_WITH_FLAGS:{},opt_in_site_apps:!0,api_transport:"fetch",loaded:loadedInstance=>{loadedInstance.sessionRecording&&(loadedInstance.sessionRecording._forceAllowLocalhostNetworkCapture=!0),window.IMPERSONATED_SESSION?(loadedInstance.sessionManager?.resetSessionId(),loadedInstance.opt_out_capturing()):loadedInstance.opt_in_capturing();let Cypress=window.Cypress;Cypress&&Object.entries(Cypress.env()).forEach(_ref=>{let[key,value]=_ref;key.startsWith("POSTHOG_PROPERTY_")&&loadedInstance.register_for_session({[key.replace("POSTHOG_PROPERTY_","E2E_TESTING_").toLowerCase()]:value})});let shouldResetSessionOnLoad=loadedInstance.getFeatureFlag(constants.y8.SESSION_RESET_ON_LOAD);shouldResetSessionOnLoad&&loadedInstance.sessionManager?.resetSessionId(),window.posthog=loadedInstance},scroll_root_selector:["main","html"],autocapture:{capture_copied_text:!0},person_profiles:"always",__preview_remote_config:!0,_onCapture:window._cypress_posthog_captures?(_,event)=>window._cypress_posthog_captures.push(event):void 0},window.SENTRY_DSN&&(config.on_xhr_error=failedRequest=>{let status=failedRequest.status,statusText=failedRequest.statusText||"no status text in error";esm_exports.Tb(Error(`Failed with status ${status} while sending to PostHog. Message: ${statusText}`),{tags:{status,statusText}})}),config)):dist_module.ZP.init("fake token",{autocapture:!1,loaded:function(ph){ph.opt_out_capturing()}}),window.SENTRY_DSN&&sdk.S({dsn:window.SENTRY_DSN,environment:window.SENTRY_ENVIRONMENT,...location.host.includes("posthog.com")&&{integrations:[new dist_module.ZP.SentryIntegration(dist_module.ZP,"posthog",1899813,void 0,"*")]}});let parameters={actions:{argTypesRegex:"^on[A-Z].*",disabled:!0},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},options:{showPanel:!1,storySort:{method:"alphabetical",order:["Lemon UI",["Overview","Utilities","Icons"],"Components","Forms",["Field"],"Filters","Layout"]}},viewMode:"docs",docs:{source:{state:"closed"}},msw:{mocks:handlers.jI}},decorators=[Story=>((0,features.y)([]),(0,jsx_runtime.jsx)(KeaStory,{children:(0,jsx_runtime.jsx)(Story,{})})),(Story,_ref)=>{let{parameters}=_ref;return parameters.mockDate?mockdate_default().set(parameters.mockDate):mockdate_default().reset(),(0,jsx_runtime.jsx)(Story,{})},(Story,_ref)=>{let{parameters}=_ref;return parameters.featureFlags&&(0,browser.zt)(parameters.featureFlags),(0,jsx_runtime.jsx)(Story,{})},(Story,context)=>{let theme=context.globals.theme;return document.body.setAttribute("theme","dark"===theme?"dark":"light"),(0,jsx_runtime.jsx)(Story,{})}],_storybook_preview={parameters:{actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},docs:{page:()=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(dist.Dx,{}),(0,jsx_runtime.jsx)(dist.QE,{}),(0,jsx_runtime.jsx)(dist.dk,{}),(0,jsx_runtime.jsx)(dist.sq,{}),(0,jsx_runtime.jsx)(dist.ZX,{}),(0,jsx_runtime.jsx)(dist.fQ,{})]})}},globalTypes:{theme:{description:"",defaultValue:"light",toolbar:{title:"Theme",items:[{value:"light",icon:"sun",title:"Light"},{value:"dark",icon:"moon",title:"Dark"}],dynamicTitle:!0}}}}},"./frontend/@posthog/apps-common/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IZ:()=>scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__.I,Tk:()=>scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__.T,hi:()=>api,jk:()=>scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j,rU:()=>lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_2__.r,w4:()=>lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_3__.w}),__webpack_require__("./frontend/src/styles/index.tsx"),__webpack_require__("./frontend/src/initKea.ts");var lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),scenes_persons_PersonDisplay__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/persons/PersonDisplay.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/urls.ts"),lib_api__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/api.ts");let api=lib_api__WEBPACK_IMPORTED_MODULE_6__.ZP},"./frontend/@posthog/lemon-ui/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mo:()=>LemonBadge.M,Vp:()=>LemonBanner.V,Jp:()=>lemon_ui_LemonButton.J,$K:()=>lemon_ui_LemonButton.$,bA:()=>LemonCalendarSelect.bA,he:()=>LemonCalendarSelect.he,Mi:()=>LemonCard.M,Hw:()=>LemonCheckbox.H,JL:()=>LemonCollapse.J,dn:()=>LemonDialog.d,p2:()=>LemonDivider.p,Qw:()=>LemonDropdown.Q,mH:()=>LemonFileInput.m,DF:()=>LemonInput.D,nt:()=>LemonInputSelect.n,HQ:()=>LemonLabel.H,d6:()=>LemonMenu.d,fQ:()=>LemonModal.f,Qs:()=>LemonRow.Q,P4:()=>LemonSegmentedButton.P,Yv:()=>LemonSelect.Yv,yW:()=>LemonSkeleton.y,LV:()=>LemonSnack.L,f4:()=>LemonSwitch.f,g3:()=>LemonTable.g,TP:()=>LemonTabs.T,oe:()=>LemonTag.o,_V:()=>LemonTextArea._,X7:()=>LemonTextArea.X,_j:()=>LemonWidget._,BR:()=>Lettermark.B,rU:()=>Link.r,R9:()=>PaginationControl.R,J2:()=>lemon_ui_Popover.J2,Sn:()=>lemon_ui_Popover.Sn,rw:()=>ProfilePicture.r,YY:()=>ProfilePicture.Y,$j:()=>Spinner.$,t2:()=>Spinner.t,u:()=>Tooltip.u,UJ:()=>LemonToast.U,h0:()=>PaginationControl.h}),__webpack_require__("./frontend/src/styles/global.scss"),__webpack_require__("./frontend/src/lib/lemon-ui/hooks.ts");var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonActionableTooltip=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonActionableTooltip/LemonActionableTooltip.scss"),LemonActionableTooltip_default=__webpack_require__.n(LemonActionableTooltip),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonActionableTooltip_default(),options),LemonActionableTooltip_default().locals,__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx"),__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");var LemonBadge=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/index.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),lemon_ui_LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts");__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx");var LemonCalendarSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.tsx");__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.tsx"),__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx");var LemonCard=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCard/LemonCard.tsx"),LemonCheckbox=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),LemonCollapse=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCollapse/index.ts"),LemonDialog=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/index.ts"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonDropdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDropdown/index.ts"),LemonFileInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonFileInput/index.ts"),LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/index.ts"),LemonLabel=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),LemonRow=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRow/index.ts"),LemonSegmentedButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSegmentedButton/index.ts"),LemonSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),LemonInputSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),LemonSnack=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSnack/index.ts"),LemonSwitch=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSwitch/index.ts"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/index.ts"),LemonTextArea=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/index.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/index.ts"),LemonWidget=__webpack_require__("./frontend/src/lib/lemon-ui/LemonWidget/index.ts"),Lettermark=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),PaginationControl=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/index.ts"),lemon_ui_Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts");__webpack_require__("./frontend/src/lib/lemon-ui/Splotch/index.ts");var Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts")},"./frontend/src/exporter/exporterViewLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>getCurrentExporterData,y:()=>exporterViewLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let exporterViewLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(()=>["scenes","exporter","exporterLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({exportedData:[()=>[(_,props)=>props],props=>props]}))]),getCurrentExporterData=()=>exporterViewLogic.findMounted()?.values.exportedData},"./frontend/src/initKea.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J1:()=>initKea});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_localstorage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-localstorage@3.1.0_kea@3.1.5/node_modules/kea-localstorage/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),kea_waitfor__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/kea-waitfor@0.2.1_kea@3.1.5/node_modules/kea-waitfor/lib/index.js"),kea_window_values__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/kea-window-values@3.0.0_kea@3.1.5/node_modules/kea-window-values/lib/index.js"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/utils/router-utils.ts");let ERROR_FILTER_ALLOW_LIST=["loadPreflight","loadUser","loadFunnels","authenticate","signup","loadLatestVersion","loadBilling","loadData","loadRecordingMeta"],loggerPlugin=()=>({name:"verbose-kea-logger",events:{beforeReduxStore(options){options.middleware.push(store=>next=>action=>{let response=next(action);return console.groupCollapsed("KEA LOGGER",action),console.log(store.getState()),console.groupEnd(),response})}}});function initKea(){let{routerHistory,routerLocation,beforePlugins}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},plugins=[...beforePlugins||[],(0,kea_localstorage__WEBPACK_IMPORTED_MODULE_3__.localStoragePlugin)(),(0,kea_window_values__WEBPACK_IMPORTED_MODULE_7__.windowValuesPlugin)({window:window}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.routerPlugin)({history:routerHistory,location:routerLocation,urlPatternOptions:{segmentValueCharset:"a-zA-Z0-9-_~ %.@()!'|"},pathFromRoutesToWindow:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.Jf)(path),transformPathInActions:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.Jf)(path),pathFromWindowToRoutes:path=>(0,lib_utils_router_utils__WEBPACK_IMPORTED_MODULE_10__.sv)(path)}),kea_forms__WEBPACK_IMPORTED_MODULE_1__.formsPlugin,(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loadersPlugin)({onFailure(_ref){let{error,reducerKey,actionKey}=_ref;if(!ERROR_FILTER_ALLOW_LIST.includes(actionKey)&&error?.status!==void 0&&![200,201,204,401].includes(error.status)){let errorMessage=error.detail||error.statusText;errorMessage||404!==error.status||(errorMessage="URL not found"),errorMessage&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_8__.UJ.error(`${(0,lib_utils__WEBPACK_IMPORTED_MODULE_9__.UV)(actionKey)} failed: ${errorMessage}`)}console.error({error,reducerKey,actionKey}),window.Sentry?.captureException(error)}}),kea_subscriptions__WEBPACK_IMPORTED_MODULE_5__.nV,kea_waitfor__WEBPACK_IMPORTED_MODULE_6__.waitForPlugin];(window.JS_KEA_VERBOSE_LOGGING||"localStorage"in window&&window.localStorage.getItem("ph-kea-debug"))&&plugins.push(loggerPlugin),window.__REDUX_DEVTOOLS_EXTENSION__&&console.log("NB Redux Dev Tools are disabled on PostHog. See: https://github.com/PostHog/posthog/issues/17482"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.resetContext)({plugins:plugins,createStore:{compose:function(){for(var _len=arguments.length,funcs=Array(_len),_key=0;_key<_len;_key++)funcs[_key]=arguments[_key];return 0===funcs.length?arg=>arg:1===funcs.length?funcs[0]:funcs.reduce((a,b)=>function(){return a(b(...arguments))})}}})}},"./frontend/src/layout/ErrorBoundary/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>ErrorBoundary_ErrorBoundary_ErrorBoundary});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ErrorBoundary=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/ErrorBoundary/ErrorBoundary.scss"),ErrorBoundary_default=__webpack_require__.n(ErrorBoundary),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ErrorBoundary_default(),options),ErrorBoundary_default().locals;var hub=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/hub.js"),errorboundary=__webpack_require__("./node_modules/.pnpm/@sentry+react@7.112.1_react@18.2.0/node_modules/@sentry/react/esm/errorboundary.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ErrorBoundary_ErrorBoundary_ErrorBoundary(_ref){let{children,tags={}}=_ref,isSentryInitialized=!!(0,hub.Gd)().getClient(),{currentTeamId}=(0,index_esm.useValues)(teamLogic.H),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw);return(0,jsx_runtime.jsx)(errorboundary.SV,{beforeCapture:scope=>{void 0!==currentTeamId&&scope.setTag("team_id",currentTeamId),scope.setTags(tags)},fallback:_ref2=>{let{error,eventId}=_ref2;return(0,jsx_runtime.jsx)("div",{className:"ErrorBoundary",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h2",{children:"An error has occurred"}),(0,jsx_runtime.jsx)("pre",{children:(0,jsx_runtime.jsx)("code",{children:error.stack||(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[error.name,(0,jsx_runtime.jsx)("br",{}),error.message]})})}),isSentryInitialized&&eventId?.match(/[^0]/)?`We've registered this event for analysis (ID ${eventId}), but feel free to contact us directly too.`:"Please help us resolve the issue by sending a screenshot of this message.",(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",fullWidth:!0,center:!0,onClick:()=>openSupportForm({kind:"bug",isEmailFormOpen:!0}),targetBlank:!0,className:"mt-2",children:"Email an engineer"})]})})},children:children})}},"./frontend/src/layout/FeaturePreviews/FeaturePreviews.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>FeaturePreviews});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function FeaturePreviews(){let{earlyAccessFeatures,rawEarlyAccessFeaturesLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{loadEarlyAccessFeatures}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z);return(0,react__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>loadEarlyAccessFeatures(),[]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_6__.default)("flex flex-col relative min-h-24",0===earlyAccessFeatures.length&&"items-center justify-center"),children:[earlyAccessFeatures.map((feature,i)=>!!feature.flagKey&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[i>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.p2,{className:"my-4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(FeaturePreview,{feature:feature},feature.flagKey)]},feature.flagKey)),rawEarlyAccessFeaturesLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_2__.t,{}):0===earlyAccessFeatures.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("i",{className:"text-center",children:["No feature previews currently available.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("br",{}),"Check back later!"]}):null]})}function FeaturePreview(_ref){let{feature}=_ref,{activeFeedbackFlagKey,activeFeedbackFlagKeyLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{beginEarlyAccessFeatureFeedback,cancelEarlyAccessFeatureFeedback,updateEarlyAccessFeatureEnrollment}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{submitEarlyAccessFeatureFeedback}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useAsyncActions)(_featurePreviewsLogic__WEBPACK_IMPORTED_MODULE_4__.Z),{flagKey,enabled,name,description,documentationUrl}=feature,isFeedbackActive=activeFeedbackFlagKey===flagKey,[feedback,setFeedback]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)("");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex items-center justify-between",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h4",{className:"font-semibold mb-0",children:name}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.f4,{checked:enabled,onChange:newChecked=>updateEarlyAccessFeatureEnrollment(flagKey,newChecked)})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p",{className:"my-2",children:description||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("i",{children:"No description."})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:[isFeedbackActive?null:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{onClick:()=>beginEarlyAccessFeatureFeedback(flagKey),children:"Give feedback"}),documentationUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[" • ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:documentationUrl,target:"_blank",children:"Learn more"})]})]}),isFeedbackActive&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__._V,{autoFocus:!0,placeholder:`What's your experience with ${name} been like?`,className:"mt-2",value:feedback,onChange:value=>setFeedback(value),onKeyDown:e=>{"Enter"===e.key&&e.metaKey?updateEarlyAccessFeatureEnrollment(flagKey,enabled):"Escape"===e.key&&(cancelEarlyAccessFeatureFeedback(),setFeedback(""),e.stopPropagation())}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"secondary",onClick:()=>{cancelEarlyAccessFeatureFeedback(),setFeedback("")},children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary",onClick:()=>{submitEarlyAccessFeatureFeedback(feedback).then(()=>{setFeedback("")})},loading:activeFeedbackFlagKeyLoading,className:"flex-1",center:!0,children:"Submit feedback"})]})]})]})}},"./frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>CONSTRAINED_PREVIEWS,Z:()=>featurePreviewsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let CONSTRAINED_PREVIEWS=new Set([]),featurePreviewsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["layout","FeaturePreviews","featurePreviewsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__.userLogic,["user"]],actions:[lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__.Pw,["submitZendeskTicket"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({updateEarlyAccessFeatureEnrollment:(flagKey,enabled)=>({flagKey,enabled}),beginEarlyAccessFeatureFeedback:flagKey=>({flagKey}),cancelEarlyAccessFeatureFeedback:!0,submitEarlyAccessFeatureFeedback:message=>({message})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{rawEarlyAccessFeatures:[[],{loadEarlyAccessFeatures:async()=>await new Promise(resolve=>posthog_js__WEBPACK_IMPORTED_MODULE_4__.LJ.getEarlyAccessFeatures(features=>resolve(features),!0))}],activeFeedbackFlagKey:[null,{submitEarlyAccessFeatureFeedback:async _ref2=>{let{message}=_ref2;if(!values.user)throw Error("Cannot submit early access feature feedback without a user");if(!values.activeFeedbackFlagKey)throw Error("Cannot submit early access feature feedback without an active flag key");return await lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_2__.Pw.asyncActions.submitZendeskTicket({name:values.user.first_name,email:values.user.email,kind:"feedback",target_area:values.activeFeedbackFlagKey,severity_level:"low",message}),null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({activeFeedbackFlagKey:{beginEarlyAccessFeatureFeedback:(_,_ref3)=>{let{flagKey}=_ref3;return flagKey},cancelEarlyAccessFeatureFeedback:()=>null}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(()=>({updateEarlyAccessFeatureEnrollment:_ref4=>{let{flagKey,enabled}=_ref4;posthog_js__WEBPACK_IMPORTED_MODULE_4__.LJ.updateEarlyAccessFeatureEnrollment(flagKey,enabled)}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({earlyAccessFeatures:[s=>[s.rawEarlyAccessFeatures,s.featureFlags],(rawEarlyAccessFeatures,featureFlags)=>rawEarlyAccessFeatures.filter(feature=>!!feature.flagKey&&(!CONSTRAINED_PREVIEWS.has(feature.flagKey)||!!featureFlags[`${feature.flagKey}-preview`])).map(feature=>{if(!feature.flagKey)throw Error("Early access feature without flagKey was not filtered out");return{...feature,flagKey:feature.flagKey,enabled:!!featureFlags[feature.flagKey]}})]})])},"./frontend/src/layout/GlobalModals.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>GlobalModals,p:()=>globalModalsLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),billing_utils=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx");let confirmUpgradeModalLogic=(0,index_esm.kea)([(0,index_esm.path)(["lib","components","ConfirmUpgradeModal","confirmUpgradeModalLogic"]),(0,index_esm.actions)({showConfirmUpgradeModal:(upgradePlan,confirmCallback,cancelCallback)=>({upgradePlan,confirmCallback,cancelCallback}),hideConfirmUpgradeModal:!0,confirm:!0,cancel:!0}),(0,index_esm.reducers)({upgradePlan:[null,{showConfirmUpgradeModal:(_,_ref)=>{let{upgradePlan}=_ref;return upgradePlan},hideConfirmUpgradeModal:()=>null}],confirmCallback:[null,{showConfirmUpgradeModal:(_,_ref2)=>{let{confirmCallback}=_ref2;return confirmCallback},hideConfirmUpgradeModal:()=>null}],cancelCallback:[null,{showConfirmUpgradeModal:(_,_ref3)=>{let{cancelCallback}=_ref3;return cancelCallback},hideConfirmUpgradeModal:()=>null}]}),(0,index_esm.listeners)(_ref4=>{let{actions,values}=_ref4;return{confirm:async(_,breakpoint)=>{await breakpoint(100),values.confirmCallback&&values.confirmCallback(),actions.hideConfirmUpgradeModal()},cancel:async(_,breakpoint)=>{await breakpoint(100),values.cancelCallback&&values.cancelCallback(),actions.hideConfirmUpgradeModal()}}})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ConfirmUpgradeModal(){let{upgradePlan}=(0,index_esm.useValues)(confirmUpgradeModalLogic),{timeRemainingInSeconds,timeTotalInSeconds,billing}=(0,index_esm.useValues)(billingLogic.kr),{hideConfirmUpgradeModal,confirm,cancel}=(0,index_esm.useActions)(confirmUpgradeModalLogic),{prorationAmount,isProrated}=(0,react.useMemo)(()=>(0,billing_utils.MG)({timeRemainingInSeconds,timeTotalInSeconds,amountUsd:upgradePlan?.unit_amount_usd,hasActiveSubscription:billing?.has_active_subscription}),[billing?.has_active_subscription,upgradePlan,timeRemainingInSeconds,timeTotalInSeconds]);return(0,jsx_runtime.jsx)(src.fQ,{onClose:hideConfirmUpgradeModal,isOpen:!!upgradePlan,closable:!1,title:`Ready to subscribe to the ${upgradePlan?.name}?`,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>cancel(),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>confirm(),children:"Sign me up"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"max-w-140",children:[(0,jsx_runtime.jsxs)("p",{children:["Woo! You're gonna love the ",upgradePlan?.name,". We're just confirming that this is a $",Number(upgradePlan?.unit_amount_usd)," / ",upgradePlan?.unit," subscription."," ",isProrated?`The first payment will be prorated to ~$${prorationAmount} and it will be charged immediately.`:"The first payment will be charged immediately."]}),upgradePlan&&upgradePlan?.features?.length>1&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{className:"ml-0 mb-2 max-w-200",children:"Here are the features included:"}),(0,jsx_runtime.jsx)("div",{className:"grid grid-cols-2 gap-x-4",children:upgradePlan?.features.map((feature,index)=>jsx_runtime.jsxs("div",{className:"flex gap-x-2 items-center mb-2",children:[jsx_runtime.jsx(posthog_icons_es.IconCheckCircle,{className:"text-success"}),jsx_runtime.jsx(src.u,{title:feature.description,children:jsx_runtime.jsxs("b",{children:[feature.name,feature.note?": "+feature.note:""]})},feature.key)]},"addon-features-"+index))})]})]})})}__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.scss");var membersLogic=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),HedgehogBuddy_HedgehogBuddy=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.tsx"),hedgehogBuddyLogic=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/hedgehogBuddyLogic.ts");function HedgehogBuddyWithLogic(){let{hedgehogConfig}=(0,index_esm.useValues)(hedgehogBuddyLogic.r),{patchHedgehogConfig}=(0,index_esm.useActions)(hedgehogBuddyLogic.r),{user}=(0,index_esm.useValues)(userLogic.userLogic),{members}=(0,index_esm.useValues)(membersLogic.m),{ensureAllMembersLoaded}=(0,index_esm.useActions)(membersLogic.m);return(0,react.useEffect)(()=>ensureAllMembersLoaded(),[hedgehogConfig.enabled]),hedgehogConfig.enabled?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(HedgehogBuddy_HedgehogBuddy.Tf,{onClose:()=>patchHedgehogConfig({enabled:!1})}),hedgehogConfig.party_mode_enabled?members?.map(member=>{if(member.user.uuid!==user?.uuid&&member.user.hedgehog_config)return jsx_runtime.jsx(HedgehogBuddy_HedgehogBuddy.Iv,{member:member},member.user.uuid)}):null]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}var TimeSensitiveAuthentication=__webpack_require__("./frontend/src/lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication.tsx"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),upgradeModalLogic=__webpack_require__("./frontend/src/lib/components/UpgradeModal/upgradeModalLogic.ts");function UpgradeModal(){let{upgradeModalFeatureKey,upgradeModalFeatureUsage,upgradeModalIsGrandfathered}=(0,index_esm.useValues)(upgradeModalLogic.J),{hideUpgradeModal}=(0,index_esm.useActions)(upgradeModalLogic.J);return upgradeModalFeatureKey?(0,jsx_runtime.jsx)(src.fQ,{onClose:hideUpgradeModal,isOpen:!!upgradeModalFeatureKey,children:(0,jsx_runtime.jsx)("div",{className:"max-w-2xl",children:(0,jsx_runtime.jsx)(PayGateMini.E,{feature:upgradeModalFeatureKey,currentUsage:null!=upgradeModalFeatureUsage?upgradeModalFeatureUsage:void 0,isGrandfathered:null!=upgradeModalIsGrandfathered?upgradeModalIsGrandfathered:void 0,background:!1,children:(0,jsx_runtime.jsx)("div",{className:"pr-7",children:"You should have access to this feature already. If you are still seeing this modal, please let us know \uD83D\uDE42"})})})}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}var LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),twoFactorLogic=__webpack_require__("./frontend/src/scenes/authentication/twoFactorLogic.ts"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Setup2FA=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/authentication/Setup2FA.scss"),Setup2FA_default=__webpack_require__.n(Setup2FA),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Setup2FA_default(),options),Setup2FA_default().locals;var lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts");function TwoFactorSetup(_ref){let{onSuccess}=_ref,{startSetupLoading,generalError}=(0,index_esm.useValues)((0,twoFactorLogic.e)({onSuccess}));return startSetupLoading?null:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(lib.Form,{logic:twoFactorLogic.e,formKey:"token",enableFormOnSubmit:!0,className:"flex flex-col space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"bg-white ml-auto mr-auto mt-2",children:(0,jsx_runtime.jsx)("img",{src:"/account/two_factor/qrcode/",className:"Setup2FA__image"})}),generalError&&(0,jsx_runtime.jsx)(LemonBanner.V,{type:"error",children:generalError.detail}),(0,jsx_runtime.jsx)(LemonField.D,{name:"token",label:"Authenticator token",children:(0,jsx_runtime.jsx)(src.DF,{className:"ph-ignore-input",autoFocus:!0,"data-attr":"token",placeholder:"123456",inputMode:"numeric",autoComplete:"one-time-code"})}),(0,jsx_runtime.jsx)(src.Jp,{htmlType:"submit","data-attr":"2fa-setup",fullWidth:!0,type:"primary",center:!0,loading:!1,children:"Submit"})]})})}function TwoFactorSetupModal(){let{isTwoFactorSetupModalOpen,forceOpenTwoFactorSetupModal}=(0,index_esm.useValues)(twoFactorLogic.e),{closeTwoFactorSetupModal}=(0,index_esm.useActions)(twoFactorLogic.e);return(0,jsx_runtime.jsx)(LemonModal.f,{title:"Set up two-factor authentication",isOpen:isTwoFactorSetupModalOpen||forceOpenTwoFactorSetupModal,onClose:forceOpenTwoFactorSetupModal?void 0:()=>closeTwoFactorSetupModal(),closable:!forceOpenTwoFactorSetupModal,children:(0,jsx_runtime.jsxs)("div",{className:"max-w-md",children:[forceOpenTwoFactorSetupModal&&(0,jsx_runtime.jsx)(LemonBanner.V,{className:"mb-4",type:"warning",children:"Your organization requires you to set up 2FA."}),(0,jsx_runtime.jsx)("p",{children:"Use an authenticator app like Google Authenticator or 1Password to scan the QR code below."}),(0,jsx_runtime.jsx)(TwoFactorSetup,{onSuccess:()=>{closeTwoFactorSetupModal(),userLogic.userLogic.actions.loadUser(),membersLogic.m.actions.loadAllMembers()}})]})})}var CreateOrganizationModal=__webpack_require__("./frontend/src/scenes/organization/CreateOrganizationModal.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx");function CreateEnvironmentModal(_ref){let{isVisible,onClose,inline=!1}=_ref,{currentProject}=(0,index_esm.useValues)(projectLogic.K),{currentTeamLoading}=(0,index_esm.useValues)(teamLogic.H),{createTeam}=(0,index_esm.useActions)(teamLogic.H),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{reportProjectCreationSubmitted}=(0,index_esm.useActions)(eventUsageLogic.vx),[name,setName]=(0,react.useState)(""),closeModal=()=>{onClose&&(onClose(),name&&setName(""))},handleSubmit=()=>{createTeam({name,is_demo:!1}),reportProjectCreationSubmitted(currentOrganization?.teams?currentOrganization.teams.length:0,name.length)};return(0,react.useEffect)(()=>{closeModal()},[currentProject]),(0,jsx_runtime.jsx)(src.fQ,{width:560,title:currentProject?`Create an environment within ${currentProject.name}`:"Create a environment",description:(0,jsx_runtime.jsx)("p",{children:"Use environments to keep your data completely separate, while sharing the setup (such as dashboards or taxonomy). The common pattern is having separate production, staging, and development environments."}),footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[onClose&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:onClose,disabledReason:currentTeamLoading?"Creating environment...":void 0,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:handleSubmit,loading:currentTeamLoading,disabledReason:name?null:"Think of a name!",children:"Create environment"})]}),isOpen:isVisible,onClose:onClose,inline:inline,closable:!currentTeamLoading,children:(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Environment name",children:(0,jsx_runtime.jsx)(src.DF,{placeholder:"E.g. development",maxLength:64,autoFocus:!0,value:name,onChange:value=>setName(value),onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},disabled:currentTeamLoading})})})}var CreateProjectModal=__webpack_require__("./frontend/src/scenes/project/CreateProjectModal.tsx"),SessionRecordingPlayer=__webpack_require__("./frontend/src/scenes/session-recordings/player/SessionRecordingPlayer.tsx"),PlayerMeta=__webpack_require__("./frontend/src/scenes/session-recordings/player/PlayerMeta.tsx"),sessionRecordingPlayerLogic=__webpack_require__("./frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts"),sessionPlayerModalLogic=__webpack_require__("./frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts");function SessionPlayerModal(){let{activeSessionRecording}=(0,index_esm.useValues)((0,sessionPlayerModalLogic.A)()),{closeSessionPlayer}=(0,index_esm.useActions)((0,sessionPlayerModalLogic.A)()),eventUUIDs=activeSessionRecording?.matching_events?.filter(matchingEvents=>matchingEvents.session_id===activeSessionRecording?.id).flatMap(matchedRecording=>matchedRecording.events.map(x=>x.uuid))||[],logicProps={playerKey:"modal",sessionRecordingId:activeSessionRecording?.id||"",autoPlay:!0,matchingEventsMatchType:{matchType:"uuid",eventUUIDs:eventUUIDs}},{isFullScreen}=(0,index_esm.useValues)((0,sessionRecordingPlayerLogic.d$)(logicProps));return(0,jsx_runtime.jsxs)(src.fQ,{isOpen:!!activeSessionRecording,onClose:closeSessionPlayer,simple:!0,title:"",width:1600,fullScreen:isFullScreen,closable:!isFullScreen,zIndex:"1061",hideCloseButton:!0,children:[(0,jsx_runtime.jsx)("header",{children:activeSessionRecording?(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:sessionRecordingPlayerLogic.d$,props:logicProps,children:(0,jsx_runtime.jsx)(PlayerMeta.L,{iconsOnly:!1})}):null}),(0,jsx_runtime.jsx)(src.fQ.Content,{embedded:!0,children:activeSessionRecording?.id&&(0,jsx_runtime.jsx)(SessionRecordingPlayer.d,{...logicProps,noMeta:!0,noBorder:!0})})]})}var inviteLogic=__webpack_require__("./frontend/src/scenes/settings/organization/inviteLogic.ts"),InviteModal=__webpack_require__("./frontend/src/scenes/settings/organization/InviteModal.tsx"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts");function PreviewingCustomCssModal(){let[editingInline,setEditingInline]=(0,react.useState)(!1),{previewingCustomCss}=(0,index_esm.useValues)(themeLogic.b),{saveCustomCss,setPreviewingCustomCss}=(0,index_esm.useActions)(themeLogic.b),{location:{pathname}}=(0,index_esm.useValues)(kea_router_lib.router),isCustomCSSPage=pathname.includes(urls.j.customCss());return(0,jsx_runtime.jsxs)("dialog",{open:!isCustomCSSPage&&!!previewingCustomCss,className:"absolute bottom-0 mb-4 px-3 py-2 space-y-2 border rounded shadow min-w-[34rem] z-[var(--z-popover)]",children:[editingInline&&(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"css",value:previewingCustomCss||"",onChange:v=>setPreviewingCustomCss(null!=v?v:null),height:600,options:{minimap:{enabled:!1}}}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center space-x-2",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Custom CSS"}),(0,jsx_runtime.jsxs)("div",{className:"flex space-x-2",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setEditingInline(!editingInline),children:editingInline?"Minimize editor":"Edit"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:saveCustomCss,children:"Save and close"})]})]})]})}let globalModalsLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation","globalModalsLogic"]),(0,index_esm.actions)({showCreateOrganizationModal:!0,hideCreateOrganizationModal:!0,showCreateProjectModal:!0,hideCreateProjectModal:!0,showCreateEnvironmentModal:!0,hideCreateEnvironmentModal:!0}),(0,index_esm.reducers)({isCreateOrganizationModalShown:[!1,{showCreateOrganizationModal:()=>!0,hideCreateOrganizationModal:()=>!1}],isCreateProjectModalShown:[!1,{showCreateProjectModal:()=>!0,hideCreateProjectModal:()=>!1}],isCreateEnvironmentModalShown:[!1,{showCreateEnvironmentModal:()=>!0,hideCreateEnvironmentModal:()=>!1}]})]);function GlobalModals(){let{isCreateOrganizationModalShown,isCreateProjectModalShown,isCreateEnvironmentModalShown}=(0,index_esm.useValues)(globalModalsLogic),{hideCreateOrganizationModal,hideCreateProjectModal,hideCreateEnvironmentModal}=(0,index_esm.useActions)(globalModalsLogic),{isInviteModalShown}=(0,index_esm.useValues)(inviteLogic.n),{hideInviteModal}=(0,index_esm.useActions)(inviteLogic.n);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(InviteModal.Gx,{isOpen:isInviteModalShown,onClose:hideInviteModal}),(0,jsx_runtime.jsx)(CreateOrganizationModal.y,{isVisible:isCreateOrganizationModalShown,onClose:hideCreateOrganizationModal}),(0,jsx_runtime.jsx)(CreateProjectModal.P,{isVisible:isCreateProjectModalShown,onClose:hideCreateProjectModal}),(0,jsx_runtime.jsx)(CreateEnvironmentModal,{isVisible:isCreateEnvironmentModalShown,onClose:hideCreateEnvironmentModal}),(0,jsx_runtime.jsx)(UpgradeModal,{}),(0,jsx_runtime.jsx)(ConfirmUpgradeModal,{}),(0,jsx_runtime.jsx)(TimeSensitiveAuthentication.g,{}),(0,jsx_runtime.jsx)(SessionPlayerModal,{}),(0,jsx_runtime.jsx)(PreviewingCustomCssModal,{}),(0,jsx_runtime.jsx)(TwoFactorSetupModal,{}),(0,jsx_runtime.jsx)(HedgehogBuddyWithLogic,{})]})}},"./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>KeyboardShortcut_KeyboardShortcut});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),KeyboardShortcut=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss"),KeyboardShortcut_default=__webpack_require__.n(KeyboardShortcut),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(KeyboardShortcut_default(),options),KeyboardShortcut_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let IS_MAC=(0,utils.V5)(),KEY_TO_SYMBOL={shift:"⇧",command:IS_MAC?"⌘":"ctrl",option:IS_MAC?"⌥":"alt",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→",enter:"↵",escape:"esc",tab:"⇥",space:"␣",forwardslash:"/"},MODIFIER_PRIORITY=["shift","command","option"];function KeyboardShortcut_KeyboardShortcut(_ref){let{muted,className,...keys}=_ref,sortedKeys=Object.keys(keys).sort((a,b)=>(-MODIFIER_PRIORITY.indexOf(a)||0)-(-MODIFIER_PRIORITY.indexOf(b)||0));return(0,utils.tq)()?null:(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("KeyboardShortcut space-x-0.5",muted&&"KeyboardShortcut--muted",className),children:sortedKeys.map(key=>(0,jsx_runtime.jsx)("span",{children:KEY_TO_SYMBOL[key]||key},key))})}},"./frontend/src/layout/navigation-3000/components/Sidebar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Sidebar});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),index_module=__webpack_require__("./node_modules/.pnpm/use-debounce@9.0.3_react@18.2.0/node_modules/use-debounce/dist/index.module.js"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/navigationLogic.tsx"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),InfiniteLoader=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/InfiniteLoader/index.js"),List=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/List/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SidebarList(_ref){let{category}=_ref,{normalizedActiveListItemKey,sidebarWidth,newItemInlineCategory,savingNewItem}=(0,index_esm.useValues)(navigationLogic.f),{cancelNewItem}=(0,index_esm.useActions)(navigationLogic.f),{saveNewItem}=(0,index_esm.useAsyncActions)(navigationLogic.f),emptyStateSkeletonCount=(0,react.useMemo)(()=>4+Math.floor(4*Math.random()),[]),{items,remote}=category,addingNewItem=newItemInlineCategory===category.key,firstItem=items.find(Boolean),listProps={className:"SidebarList",width:sidebarWidth,rowHeight:firstItem&&"summary"in firstItem?46:32,rowRenderer:_ref2=>{let active,{index:rawIndex,style}=_ref2,index=addingNewItem?rawIndex-1:rawIndex;if(-1===index)return(0,jsx_runtime.jsx)(SidebarListItem,{item:{key:"__tentative__",onSave:async newName=>saveNewItem(newName),onCancel:cancelNewItem,loading:savingNewItem},validateName:category.validateName,style:style},index);let item=items[index];if(!item)return(0,jsx_runtime.jsx)(SidebarListItemSkeleton,{style:style},index);let normalizedItemKey=Array.isArray(item.key)?item.key.map(keyPart=>`${category.key}${navigationLogic.l}${keyPart}`):`${category.key}${navigationLogic.l}${item.key}`;return active=Array.isArray(normalizedItemKey)?"string"==typeof normalizedActiveListItemKey&&normalizedItemKey.includes(normalizedActiveListItemKey):normalizedItemKey===normalizedActiveListItemKey,(0,jsx_runtime.jsx)(SidebarListItem,{item:item,validateName:category.validateName,active:active,style:style},index)},overscanRowCount:20,tabIndex:null};return(0,jsx_runtime.jsx)("div",{className:"flex-1","aria-busy":category.loading,children:(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref3=>{let{height}=_ref3;return category.loading&&0===category.items.length?Array(emptyStateSkeletonCount).fill(null).map((_,index)=>(0,jsx_runtime.jsx)(SidebarListItemSkeleton,{style:{height:32}},index)):remote?(0,jsx_runtime.jsx)(InfiniteLoader.b,{isRowLoaded:_ref4=>{let{index}=_ref4;return remote.isItemLoaded(index)},loadMoreRows:_ref5=>{let{startIndex,stopIndex}=_ref5;return remote.loadMoreItems(startIndex,stopIndex)},rowCount:remote.itemCount,minimumBatchSize:remote.minimumBatchSize||100,children:_ref6=>{let{onRowsRendered,registerChild}=_ref6;return(0,jsx_runtime.jsx)(List.aV,{...listProps,ref:registerChild,height:height,rowCount:remote.itemCount+Number(addingNewItem),onRowsRendered:onRowsRendered})}}):(0,jsx_runtime.jsx)(List.aV,{...listProps,height:height,rowCount:items.length+Number(addingNewItem)})}})})}function isItemTentative(item){return"onSave"in item}function SidebarListItem(_ref7){let content,{item,validateName,active,style}=_ref7,[isMenuOpen,setIsMenuOpen]=(0,react.useState)(!1),[newName,setNewName]=(0,react.useState)(null),[newNameValidationError,setNewNameValidationError]=(0,react.useState)(null),[isSavingName,setIsSavingName]=(0,react.useState)(!1),ref=(0,react.useRef)(null);item.ref=ref;let isSaving=isItemTentative(item)?item.loading:isSavingName,menuItems=(0,react.useMemo)(()=>{if(!isItemTentative(item)){if(item.onRename){if("function"!=typeof item.menuItems)throw Error('menuItems must be a function for renamable items so that the "Rename" item is shown');return item.menuItems(()=>setNewName(item.name))}return"function"==typeof item.menuItems?item.menuItems(()=>console.error("Cannot rename item without onRename handler")):item.menuItems}},[item,setNewName]),cancel=()=>{isItemTentative(item)&&item.onCancel(),setNewName(null),setNewNameValidationError(null)},validate=name=>{if(validateName){let validation=validateName(name);return setNewNameValidationError(validation||null),!validation}return!0},save=isItemTentative(item)?async name=>{validate(name)&&await item.onSave(name)}:item.onRename?async newName=>{if(!newName||newName===item.name)return cancel();if(validate(newName)){setIsSavingName(!0);try{await item.onRename?.(newName)}catch(error){(0,esm_exports.Tb)(error),src.UJ.error("Could not rename item")}finally{setIsSavingName(!1),cancel()}}}:null;if((0,react.useEffect)(()=>{if(!isItemTentative(item)&&save&&null===newName){let onDoubleClick=()=>{setNewName(item.name)},element=ref.current;if(element)return element.addEventListener("dblclick",onDoubleClick),()=>{element.removeEventListener("dblclick",onDoubleClick)}}}),"onClick"in item)content=(0,jsx_runtime.jsxs)("li",{className:"SidebarListItem__button",onClick:item.onClick,children:[item.icon&&(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__icon",children:item.icon}),(0,jsx_runtime.jsx)("h5",{className:"SidebarListItem__name",children:item.name})]});else if(save&&(isItemTentative(item)||null!==newName))content=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__rename",ref:ref,children:(0,jsx_runtime.jsx)("input",{value:newName||"",onChange:e=>setNewName(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(navigationLogic.f.actions.focusNextItem(),e.preventDefault()):"ArrowUp"===e.key?(navigationLogic.f.actions.focusPreviousItem(),e.preventDefault()):"Enter"===e.key?(save(newName||"").then(()=>{setTimeout(()=>ref.current?.focus(),0)}),e.preventDefault()):"Escape"===e.key&&(cancel(),setTimeout(()=>ref.current?.focus(),0),e.preventDefault())},onFocus:e=>{navigationLogic.f.actions.setLastFocusedItemByKey(Array.isArray(item.key)?item.key[0]:item.key),e.target.select()},onBlur:e=>{e.relatedTarget?.ariaLabel==="Save name"?save(newName||""):cancel()},placeholder:isItemTentative(item)?"Adding something new…":`Renaming ${item.name}…`,disabled:isSaving,autoFocus:!0})}),newNameValidationError&&(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__error",children:newNameValidationError})]});else{if(isItemTentative(item))throw Error("Tentative items should not be rendered in read mode");let formattedName=item.searchMatch?.nameHighlightRanges?.length?(0,jsx_runtime.jsx)(TextWithHighlights,{ranges:item.searchMatch.nameHighlightRanges,children:item.name}):item.name;(!item.url||item.isNamePlaceholder)&&(formattedName=(0,jsx_runtime.jsx)("i",{children:formattedName})),item.tag&&(formattedName=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[formattedName,(0,jsx_runtime.jsx)(src.oe,{type:item.tag.status,size:"small",className:"ml-2",children:item.tag.text})]})),content=(0,jsx_runtime.jsx)(apps_common_src.rU,{ref:ref,to:item.url||void 0,className:"SidebarListItem__link",onKeyDown:e=>{"ArrowDown"===e.key?e.metaKey||e.ctrlKey?e.target.click():(navigationLogic.f.actions.focusNextItem(),e.preventDefault()):"ArrowUp"===e.key?(navigationLogic.f.actions.focusPreviousItem(),e.preventDefault()):save&&"Enter"===e.key&&(setNewName(item.name),e.preventDefault())},onFocus:()=>{navigationLogic.f.actions.setLastFocusedItemByKey(Array.isArray(item.key)?item.key[0]:item.key)},children:"summary"in item?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex space-between gap-1",children:[(0,jsx_runtime.jsx)("h5",{className:"flex-1",children:formattedName}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ExtraContext,{data:item.extraContextTop})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex space-between gap-1",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1 overflow-hidden text-ellipsis",children:item.searchMatch?.matchingFields?`Matching fields: ${item.searchMatch.matchingFields.map(field=>field.replace(/_/g," ")).join(", ")}`:item.summary}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ExtraContext,{data:item.extraContextBottom})})]})]}):(0,jsx_runtime.jsx)("h5",{children:formattedName})})}return(0,jsx_runtime.jsxs)("li",{id:`sidebar-${item.key}`,title:isItemTentative(item)?"New item":item.name,className:(0,clsx_m.default)("SidebarListItem","menuItems"in item&&item.menuItems?.length&&"SidebarListItem--has-menu",isMenuOpen&&"SidebarListItem--is-menu-open",(isItemTentative(item)||null!==newName)&&"SidebarListItem--is-renaming","marker"in item&&!!item.marker&&`SidebarListItem--marker-${item.marker.type}`,"marker"in item&&!!item.marker?.status&&`SidebarListItem--marker-status-${item.marker.status}`,"summary"in item&&"SidebarListItem--extended"),"aria-disabled":!isItemTentative(item)&&!item.url,"aria-current":active?"page":void 0,"aria-invalid":!!newNameValidationError,style:style,children:[content,isItemTentative(item)||null!==newName?(0,jsx_runtime.jsxs)("div",{className:"SidebarListItem__actions",children:[!isSaving&&(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Cancel ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{escape:!0})]}),"aria-label":"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}),tooltip:isSaving?null:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Save name ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{enter:!0})]}),loading:isSaving,"aria-label":"Save name"})]}):!!menuItems?.length&&(0,jsx_runtime.jsx)(LemonMenu.d,{items:menuItems,onVisibilityChange:setIsMenuOpen,children:(0,jsx_runtime.jsx)("div",{className:"SidebarListItem__actions",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{})})})})]})}function TextWithHighlights(_ref8){let{children,ranges}=_ref8,segments=[],previousBoldEnd=0,segmentIndex=0;for(let i=0;ipreviousBoldEnd&&(segments.push((0,jsx_runtime.jsx)(react.Fragment,{children:children.slice(previousBoldEnd,currentBoldStart)},segmentIndex)),segmentIndex++),segments.push((0,jsx_runtime.jsx)("b",{children:children.slice(currentBoldStart,currentBoldEnd)},segmentIndex)),segmentIndex++,previousBoldEnd=currentBoldEnd}return previousBoldEnd0?()=>toggleAccordion(key):void 0,children:[loading?(0,jsx_runtime.jsx)(Spinner.$,{}):(0,jsx_runtime.jsx)(icons.VG,{}),(0,jsx_runtime.jsxs)("h4",{children:[(0,utils.fm)(pluralizeCategory(category.noun)),!loading&&isEmpty&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[" ",(0,jsx_runtime.jsx)("i",{children:"(empty)"})]})]}),(0,jsx_runtime.jsx)(NewItemButton,{category:category})]}),isExpanded&&(0,jsx_runtime.jsx)(SidebarList,{category:category})]})}function pluralizeCategory(noun){return Array.isArray(noun)?noun[1]:`${noun}s`}function NewItemButton(_ref){var noun;let{category}=_ref,{newItemCategory}=(0,index_esm.useValues)(navigationLogic.f),{initiateNewItemInCategory}=(0,index_esm.useActions)(navigationLogic.f);return category.onAdd?(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),size:"small",noPadding:!0,to:"string"==typeof category.onAdd?category.onAdd:void 0,onClick:e=>{"function"==typeof category.onAdd&&initiateNewItemInCategory(category.key),e.stopPropagation()},active:newItemCategory===category.key,tooltip:`New ${Array.isArray(noun=category.noun)?noun[0]:noun}`,tooltipPlacement:"bottom"}):null}function Sidebar(_ref){let{navbarItem,sidebarOverlay,sidebarOverlayProps}=_ref,inputElementRef=(0,react.useRef)(null),{sidebarWidth:width,isSidebarShown:isShown,isResizeInProgress,sidebarOverslideDirection:overslideDirection,isSidebarKeyboardShortcutAcknowledged,isSearchShown}=(0,index_esm.useValues)((0,navigationLogic.f)({inputElement:inputElementRef.current})),{beginResize}=(0,index_esm.useActions)((0,navigationLogic.f)({inputElement:inputElementRef.current})),{contents}=(0,index_esm.useValues)(navbarItem.logic),onlyCategoryTitle=1===contents.length?(0,utils.fm)(pluralizeCategory(contents[0].noun)):null,title=onlyCategoryTitle&&onlyCategoryTitle.toLowerCase()!==navbarItem.label.toLowerCase()?`${navbarItem.label} — ${onlyCategoryTitle}`:navbarItem.label;return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("Sidebar3000",isResizeInProgress&&"Sidebar3000--resizing",overslideDirection&&`Sidebar3000--overslide-${overslideDirection}`),"aria-hidden":!isShown,style:{"--sidebar-width":`${isShown?width:0}px`},children:[(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__content",children:[(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__header",children:[(0,jsx_runtime.jsx)("h3",{className:"grow",children:title}),(0,jsx_runtime.jsx)(SidebarActions,{activeSidebarLogic:navbarItem.logic})]}),navbarItem?.logic&&isSearchShown&&(0,jsx_runtime.jsx)(SidebarSearchBar,{activeSidebarLogic:navbarItem.logic,inputElementRef:inputElementRef}),(0,jsx_runtime.jsx)("div",{className:"Sidebar3000__lists",children:navbarItem?.logic&&(0,jsx_runtime.jsx)(SidebarContent,{activeSidebarLogic:navbarItem.logic})}),!isSidebarKeyboardShortcutAcknowledged&&(0,jsx_runtime.jsx)(SidebarKeyboardShortcut,{}),contents.filter(_ref2=>{let{modalContent}=_ref2;return modalContent}).map(category=>(0,jsx_runtime.jsx)(react.Fragment,{children:category.modalContent},category.key))]}),(0,jsx_runtime.jsx)("div",{className:"Sidebar3000__slider",onMouseDown:e=>{0===e.button&&beginResize()}}),sidebarOverlay&&(0,jsx_runtime.jsx)(SidebarOverlay,{...sidebarOverlayProps,isOpen:isShown&&sidebarOverlayProps?.isOpen,width:width,children:sidebarOverlay})]})}function SidebarActions(_ref3){let{activeSidebarLogic}=_ref3,{isSearchShown}=(0,index_esm.useValues)(navigationLogic.f),{setIsSearchShown}=(0,index_esm.useActions)(navigationLogic.f),{contents}=(0,index_esm.useValues)(activeSidebarLogic);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[1===contents.length&&(0,jsx_runtime.jsx)(NewItemButton,{category:contents[0]}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconSearch,{}),size:"small",noPadding:!0,onClick:()=>setIsSearchShown(!isSearchShown),active:isSearchShown,tooltip:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Find ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{shift:!0,command:!0,f:!0})]}),tooltipPlacement:"bottom"})]})}function SidebarSearchBar(_ref4){let{activeSidebarLogic,inputElementRef}=_ref4,{searchTerm}=(0,index_esm.useValues)(navigationLogic.f),{setIsSearchShown,setSearchTerm,focusNextItem,setLastFocusedItemIndex}=(0,index_esm.useActions)(navigationLogic.f),{contents,debounceSearch}=(0,index_esm.useValues)(activeSidebarLogic),[localSearchTerm,setLocalSearchTerm]=(0,react.useState)(searchTerm),setSearchTermDebounced=(0,index_module.y1)(value=>setSearchTerm(value),debounceSearch?300:void 0),isLoading=contents.some(item=>item.loading);return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.DF,{inputRef:inputElementRef,type:"search",value:localSearchTerm,onChange:value=>{setLocalSearchTerm(value),setSearchTermDebounced(value)},size:"small",prefix:(localSearchTerm||searchTerm)&&(localSearchTerm!==searchTerm||isLoading)?(0,jsx_runtime.jsx)(Spinner.$,{textColored:!0}):null,placeholder:"Search...",onKeyDown:e=>{"Escape"===e.key?(setIsSearchShown(!1),e.preventDefault()):"ArrowDown"===e.key&&(focusNextItem(),e.preventDefault())},onFocus:()=>{setLastFocusedItemIndex(-1)},autoFocus:!0,suffix:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{muted:!0,arrowdown:!0,arrowup:!0})})})}function SidebarContent(_ref5){let{activeSidebarLogic}=_ref5,{contents}=(0,index_esm.useValues)(activeSidebarLogic);return 1!==contents.length?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:contents.map(accordion=>(0,jsx_runtime.jsx)(SidebarAccordion,{category:accordion},accordion.key))}):(0,jsx_runtime.jsx)(SidebarList,{category:contents[0]})}function SidebarKeyboardShortcut(){let{acknowledgeSidebarKeyboardShortcut}=(0,index_esm.useActions)(navigationLogic.f);return(0,jsx_runtime.jsxs)("div",{className:"Sidebar3000__hint",children:[(0,jsx_runtime.jsxs)("span",{className:"truncate",children:[(0,jsx_runtime.jsx)("i",{children:"Tip:"})," Press ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,b:!0})," to toggle this sidebar"]}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),size:"small",onClick:()=>acknowledgeSidebarKeyboardShortcut(),noPadding:!0})]})}function SidebarOverlay(_ref6){let{className,isOpen=!1,children,width}=_ref6;return isOpen?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("absolute top-0 left-0 h-full bg-bg-3000",className),style:{width:`${width}px`},children:children}):null}},"./frontend/src/layout/navigation-3000/navigationLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>ITEM_KEY_PART_SEPARATOR,f:()=>navigation3000Logic});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),fuse_esm=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),databaseTableListLogic=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),sceneLogic=__webpack_require__("./frontend/src/scenes/sceneLogic.ts"),sceneTypes=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),editorSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts"),multitabEditorLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dataWarehouseTablesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),posthogTablesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),savedQueriesfuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2}],threshold:.3,ignoreLocation:!0,includeMatches:!0}),editorSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["data-warehouse","editor","editorSidebarLogic"]),(0,index_esm.connect)({values:[sceneLogic.k,["activeScene","sceneParams"],dataWarehouseViewsLogic.$,["dataWarehouseSavedQueries","dataWarehouseSavedQueryMapById","initialDataWarehouseSavedQueryLoading"],databaseTableListLogic.A,["posthogTables","dataWarehouseTables","databaseLoading","views","viewsMapById"]],actions:[editorSceneLogic.h,["selectSchema"],dataWarehouseViewsLogic.$,["deleteDataWarehouseSavedQuery","runDataWarehouseSavedQuery"],viewLinkLogic.t,["selectSourceTable","toggleJoinTableModal"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantSavedQueries,s.initialDataWarehouseSavedQueryLoading,s.relevantPosthogTables,s.relevantDataWarehouseTables,s.databaseLoading],(relevantSavedQueries,initialDataWarehouseSavedQueryLoading,relevantPosthogTables,relevantDataWarehouseTables,databaseLoading)=>[{key:"data-warehouse-sources",noun:["source","external source"],loading:databaseLoading,items:relevantDataWarehouseTables.map(_ref2=>{let[table,matches]=_ref2;return{key:table.id,name:table.name,url:"",searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(table)},menuItems:[{label:"Add join",onClick:()=>{actions.selectSourceTable(table.name),actions.toggleJoinTableModal()}}]}}),onAdd:()=>{lib.router.actions.push(urls.j.pipeline(types.J9.Sources))}},{key:"data-warehouse-tables",noun:["table","tables"],loading:databaseLoading,items:relevantPosthogTables.map(_ref3=>{let[table,matches]=_ref3;return{key:table.id,name:table.name,url:"",searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(table)},menuItems:[{label:"Add join",onClick:()=>{actions.selectSourceTable(table.name),actions.toggleJoinTableModal()}}]}})},{key:"data-warehouse-views",noun:["view","views"],loading:initialDataWarehouseSavedQueryLoading,items:relevantSavedQueries.map(_ref4=>{let[savedQuery,matches]=_ref4;return{key:savedQuery.id,name:savedQuery.name,url:"",icon:savedQuery.status?(0,jsx_runtime.jsx)(src.u,{title:"Materialized view",children:(0,jsx_runtime.jsx)(icons.X8,{})}):(0,jsx_runtime.jsx)(src.u,{title:"View",children:(0,jsx_runtime.jsx)(icons.yK,{})}),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,onClick:()=>{actions.selectSchema(savedQuery)},menuItems:[{label:"Edit view definition",onClick:()=>{(0,multitabEditorLogic.tg)({key:`hogQLQueryEditor/${lib.router.values.location.pathname}`}).actions.editView(savedQuery.query.query,savedQuery)}},{label:"Add join",onClick:()=>{actions.selectSourceTable(savedQuery.name),actions.toggleJoinTableModal()}},{label:"Delete",status:"danger",onClick:()=>{actions.deleteDataWarehouseSavedQuery(savedQuery.id)}}]}})}]],nonMaterializedViews:[s=>[s.dataWarehouseSavedQueries],views=>views.filter(view=>!view.status&&!view.last_run_at)],materializedViews:[s=>[s.dataWarehouseSavedQueries],views=>views.filter(view=>view.status||view.last_run_at)],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.DataWarehouse&&sceneParams.params.id?["saved-queries",parseInt(sceneParams.params.id)]:null],relevantDataWarehouseTables:[s=>[s.dataWarehouseTables,navigation3000Logic.selectors.searchTerm],(dataWarehouseTables,searchTerm)=>searchTerm?dataWarehouseTablesfuse.search(searchTerm).map(result=>[result.item,result.matches]):dataWarehouseTables.map(table=>[table,null])],relevantPosthogTables:[s=>[s.posthogTables,navigation3000Logic.selectors.searchTerm],(posthogTables,searchTerm)=>searchTerm?posthogTablesfuse.search(searchTerm).map(result=>[result.item,result.matches]):posthogTables.map(table=>[table,null])],relevantSavedQueries:[s=>[s.dataWarehouseSavedQueries,navigation3000Logic.selectors.searchTerm],(dataWarehouseSavedQueries,searchTerm)=>searchTerm?savedQueriesfuse.search(searchTerm).map(result=>[result.item,result.matches]):dataWarehouseSavedQueries.map(savedQuery=>[savedQuery,null])]}}),(0,kea_subscriptions_lib.Vt)({dataWarehouseTables:dataWarehouseTables=>{dataWarehouseTablesfuse.setCollection(dataWarehouseTables)},posthogTables:posthogTables=>{posthogTablesfuse.setCollection(posthogTables)},dataWarehouseSavedQueries:dataWarehouseSavedQueries=>{savedQueriesfuse.setCollection(dataWarehouseSavedQueries)}})]);var teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),dashboardsModel=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation/navigationLogic.ts"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),deleteDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/deleteDashboardLogic.ts"),duplicateDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),NewDashboardModal=__webpack_require__("./frontend/src/scenes/dashboard/NewDashboardModal.tsx");let fuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2},"description","tags"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),dashboardsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","dashboardsSidebarLogic"]),(0,index_esm.connect)({values:[dashboardsModel.h,["pinSortedDashboards","dashboardsLoading"],sceneLogic.k,["activeScene","sceneParams"]],actions:[dashboardsModel.h,["pinDashboard","unpinDashboard"],duplicateDashboardLogic.T,["showDuplicateDashboardModal"],deleteDashboardLogic.r,["showDeleteDashboardModal"],newDashboardLogic.Z,["showNewDashboardModal"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantDashboards,s.dashboardsLoading],(relevantDashboards,dashboardsLoading)=>[{key:"dashboards",noun:"dashboard",loading:dashboardsLoading,onAdd:()=>actions.showNewDashboardModal(),modalContent:(0,jsx_runtime.jsx)(NewDashboardModal.O,{}),items:relevantDashboards.map(_ref2=>{let[dashboard,matches]=_ref2;return{key:dashboard.id,name:dashboard.name,url:urls.j.dashboard(dashboard.id),marker:dashboard.pinned?{type:"fold"}:void 0,searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,menuItems:initiateRename=>[{items:[{to:urls.j.dashboard(dashboard.id),onClick:()=>{(0,dashboardLogic.BM)({id:dashboard.id}).mount(),(0,dashboardLogic.BM)({id:dashboard.id}).actions.setDashboardMode(types.MN.Edit,eventUsageLogic.GU.DashboardsList)},label:"Edit"},{onClick:()=>{actions.showDuplicateDashboardModal(dashboard.id,dashboard.name)},label:"Duplicate"}]},{items:[{onClick:()=>{(dashboard.pinned?actions.unpinDashboard:actions.pinDashboard)(dashboard.id,eventUsageLogic.GU.MoreDropdown)},label:dashboard.pinned?"Unpin":"Pin"}]},{items:[{onClick:initiateRename,label:"Rename",keyboardShortcut:["enter"]},{onClick:()=>{actions.showDeleteDashboardModal(dashboard.id)},status:"danger",label:"Delete dashboard"}]}],onRename:async newName=>{await dashboardsModel.h.asyncActions.updateDashboard({id:dashboard.id,name:newName})}}})}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Dashboard&&sceneParams.params.id?["dashboards",parseInt(sceneParams.params.id)]:null],relevantDashboards:[s=>[s.pinSortedDashboards,navigation3000Logic.selectors.searchTerm],(pinSortedDashboards,searchTerm)=>searchTerm?fuse.search(searchTerm).map(result=>[result.item,result.matches]):pinSortedDashboards.map(dashboard=>[dashboard,null])]}}),(0,kea_subscriptions_lib.Vt)({pinSortedDashboards:pinSortedDashboards=>{fuse.setCollection(pinSortedDashboards)}})]);var kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),TaxonomicFilter_types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),actionsLogic=__webpack_require__("./frontend/src/scenes/actions/actionsLogic.ts");function findSearchTermInItemName(name,searchTerm){if(!searchTerm||!name)return null;let ranges=[],workingName=name.toLowerCase(),workingSearchTerm=searchTerm.toLowerCase(),index=workingName.indexOf(workingSearchTerm);for(;-1!==index;)ranges.push([index,index+searchTerm.length]),index=workingName.indexOf(workingSearchTerm,index+1);return ranges.length?{nameHighlightRanges:ranges}:null}let dataManagementSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","dataManagementSidebarLogic"]),(0,index_esm.connect)(()=>({values:[sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"],actionsLogic.M,["actions","actionsLoading"]]})),(0,index_esm.actions)({loadEventDefinitions:(startIndex,stopIndex)=>({startIndex,stopIndex}),loadPropertyDefinitions:(startIndex,stopIndex)=>({startIndex,stopIndex})}),(0,kea_loaders_lib.loaders)(_ref=>{let{values,cache}=_ref;return{infiniteEventDefinitions:[[[],0],{loadEventDefinitions:async _ref2=>{let{startIndex,stopIndex}=_ref2;startIndex||(cache.requestedEventDefinitions=[]);for(let i=startIndex;i{let{startIndex,stopIndex}=_ref3;startIndex||(cache.requestedPropertyDefinitions=[]);for(let i=startIndex;i{let{actions,values,cache}=_ref4;return{contents:[s=>[s.infiniteEventDefinitions,s.infiniteEventDefinitionsLoading,s.infinitePropertyDefinitions,s.infinitePropertyDefinitionsLoading,s.relevantActions,s.actionsLoading],(_ref5,infiniteEventDefinitionsLoading,_ref6,infinitePropertyDefinitionsLoading,relevantActions,actionsLoading)=>{let[eventDefinitions,eventDefinitionCount]=_ref5,[propertyDefinitions,propertyDefinitionCount]=_ref6;return[{key:"event-definitions",noun:"event definition",loading:infiniteEventDefinitionsLoading,items:eventDefinitions.map(eventDefinition=>eventDefinition&&{key:eventDefinition.id,name:(0,taxonomy.R6)(eventDefinition.name,TaxonomicFilter_types.t.Events),url:urls.j.eventDefinition(eventDefinition.id),searchMatch:findSearchTermInItemName((0,taxonomy.R6)(eventDefinition.name,TaxonomicFilter_types.t.Events),values.searchTerm),menuItems:[{label:"View recordings",to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:eventDefinition.name,type:"events",order:0,name:eventDefinition.name}]}]}})}]}),remote:{isItemLoaded:index=>!!(cache.requestedEventDefinitions[index]||eventDefinitions[index]),loadMoreItems:(startIndex,stopIndex)=>actions.loadEventDefinitions(startIndex,stopIndex),itemCount:eventDefinitionCount}},{key:"property-definitions",noun:"property definition",loading:infinitePropertyDefinitionsLoading,items:propertyDefinitions.map(propertyDefinition=>propertyDefinition&&{key:propertyDefinition.id,name:(0,taxonomy.R6)(propertyDefinition.name,TaxonomicFilter_types.t.EventProperties),url:urls.j.propertyDefinition(propertyDefinition.id),searchMatch:findSearchTermInItemName((0,taxonomy.R6)(propertyDefinition.name,TaxonomicFilter_types.t.EventProperties),values.searchTerm)}),remote:{isItemLoaded:index=>!!(cache.requestedPropertyDefinitions[index]||propertyDefinitions[index]),loadMoreItems:(startIndex,stopIndex)=>actions.loadPropertyDefinitions(startIndex,stopIndex),itemCount:propertyDefinitionCount}},{key:"actions",noun:"action",loading:actionsLoading,onAdd:urls.j.action("new"),items:relevantActions.map(_ref7=>{let[action,matches]=_ref7;return{key:action.id,name:action.name,url:urls.j.action(action.id),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null}})}]}],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.EventDefinition?["event-definitions",sceneParams.params.id]:activeScene===sceneTypes.x.PropertyDefinition?["property-definitions",sceneParams.params.id]:activeScene===sceneTypes.x.Action?["actions",sceneParams.params.id]:null],debounceSearch:[s=>[s.searchTerm],()=>!0],relevantActions:[s=>[s.actions,navigation3000Logic.selectors.searchTerm],(actions,searchTerm)=>searchTerm?actionsLogic.J.search(searchTerm).map(result=>[result.item,result.matches]):actions.map(action=>[action,null])]}}),(0,kea_subscriptions_lib.Vt)(_ref8=>{let{actions}=_ref8;return{searchTerm:()=>{actions.loadEventDefinitions(0,100),actions.loadPropertyDefinitions(0,100)}}}),(0,index_esm.afterMount)(_ref9=>{let{actions,cache}=_ref9;cache.requestedEventDefinitions=[],cache.requestedPropertyDefinitions=[],actions.loadEventDefinitions(0,100),actions.loadPropertyDefinitions(0,100)})]);var dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),experimentsLogic=__webpack_require__("./frontend/src/scenes/experiments/experimentsLogic.ts");let experiments_fuse=new fuse_esm.Z([],{keys:[{name:"name",weight:2},"description"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),EXPERIMENT_STATUS_TO_RIBBON_STATUS={draft:"muted",running:"success",complete:"completion"},experimentsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","experimentsSidebarLogic"]),(0,index_esm.connect)({values:[experimentsLogic.OK,["experiments","experimentsLoading"],sceneLogic.k,["activeScene","sceneParams"]],actions:[experimentsLogic.OK,["loadExperiments","deleteExperiment"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantExperiments,s.experimentsLoading],(relevantExperiments,experimentsLoading)=>[{key:"experiments",noun:"experiment",loading:experimentsLoading,items:relevantExperiments.map(_ref2=>{let[experiment,matches]=_ref2,experimentStatus=(0,experimentsLogic.Ot)(experiment);return{key:experiment.id,name:experiment.name,summary:experimentStatus===types.mN.Draft?"Draft":experimentStatus===types.mN.Complete?`Completed ${(0,dayjs.Bv)(experiment.start_date).fromNow()}`:`Running for ${(0,dayjs.Bv)(experiment.start_date).fromNow(!0)} now`,extraContextTop:(0,dayjs.Bv)(experiment.created_at),extraContextBottom:`by ${experiment.created_by?.first_name||"unknown"}`,url:urls.j.experiment(experiment.id),searchMatch:matches?{matchingFields:matches.map(match=>match.key),nameHighlightRanges:matches.find(match=>"name"===match.key)?.indices}:null,marker:{type:"ribbon",status:EXPERIMENT_STATUS_TO_RIBBON_STATUS[experimentStatus]},menuItems:[{items:[{label:"Delete experiment",onClick:()=>actions.deleteExperiment(experiment.id),status:"danger"}]}]}}),onAdd:urls.j.experiment("new")}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Experiment&&sceneParams.params.id?["experiments",parseInt(sceneParams.params.id)]:null],relevantExperiments:[s=>[s.experiments,navigation3000Logic.selectors.searchTerm],(experiments,searchTerm)=>searchTerm?experiments_fuse.search(searchTerm).map(result=>[result.item,result.matches]):experiments.map(experiment=>[experiment,null])]}}),(0,kea_subscriptions_lib.Vt)({experiments:experiments=>{experiments_fuse.setCollection(experiments)}})]);var copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),deleteWithUndo=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),feature_flags_featureFlagLogic=__webpack_require__("./frontend/src/scenes/feature-flags/featureFlagLogic.ts"),FeatureFlags=__webpack_require__("./frontend/src/scenes/feature-flags/FeatureFlags.tsx"),featureFlagsLogic=__webpack_require__("./frontend/src/scenes/feature-flags/featureFlagsLogic.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts");let featureFlags_fuse=new fuse_esm.Z([],{keys:[{name:"key",weight:2},"name","tags"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),featureFlagsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","featureFlagsSidebarLogic"]),(0,index_esm.connect)({values:[featureFlagsLogic.bP,["featureFlags","featureFlagsLoading"],projectLogic.K,["currentProjectId"],sceneLogic.k,["activeScene","sceneParams"],groupsModel.$,["aggregationLabel"]],actions:[featureFlagsLogic.bP,["updateFeatureFlag","loadFeatureFlags"]]}),(0,index_esm.selectors)(_ref=>{let{actions}=_ref;return{contents:[s=>[s.relevantFeatureFlags,s.featureFlagsLoading,s.currentProjectId,s.aggregationLabel],(relevantFeatureFlags,featureFlagsLoading,currentProjectId,aggregationLabel)=>[{key:"feature-flags",noun:"feature flag",loading:featureFlagsLoading,onAdd:urls.j.featureFlag("new"),items:relevantFeatureFlags.map(_ref2=>{let[featureFlag,matches]=_ref2;if(!featureFlag.id)throw Error("Feature flag ID should never be missing in the sidebar");let query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.TrendsQuery,series:[{event:"$pageview",name:"$pageview",kind:schema.OH.EventsNode,math:types.vN.UniqueUsers}],breakdownFilter:{breakdown:`$feature/${featureFlag.key}`,breakdown_type:"event"}}};return{key:featureFlag.id,name:featureFlag.key,url:urls.j.featureFlag(featureFlag.id),summary:featureFlag.active?(0,FeatureFlags.groupFilters)(featureFlag.filters,!0,aggregationLabel):(0,jsx_runtime.jsx)("i",{children:"Disabled"}),extraContextTop:(0,dayjs.Bv)(featureFlag.created_at),extraContextBottom:`by ${featureFlag.created_by?.first_name||"unknown"}`,marker:{type:"ribbon",status:featureFlag.active?"success":"danger"},searchMatch:matches?{matchingFields:matches.map(match=>"name"===match.key?"description":match.key),nameHighlightRanges:matches.find(match=>"key"===match.key)?.indices}:null,menuItems:[{items:[{label:"Edit",to:urls.j.featureFlag(featureFlag.id),onClick:()=>{(0,feature_flags_featureFlagLogic.hk)({id:featureFlag.id}).mount(),(0,feature_flags_featureFlagLogic.hk)({id:featureFlag.id}).actions.editFeatureFlag(!0)},disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag."}]},{items:[{label:`${featureFlag.active?"Disable":"Enable"} flag`,onClick:()=>actions.updateFeatureFlag({id:featureFlag.id,payload:{active:!featureFlag.active}}),disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag."},{label:"Copy flag key",onClick:()=>{(0,copyToClipboard.v)(featureFlag.key,"feature flag key")}},{label:"Try out in Insights",to:urls.j.insightNew(void 0,void 0,query),"data-attr":"usage"}]},{items:[{label:"Delete feature flag",onClick:()=>{(0,deleteWithUndo.S)({endpoint:`projects/${currentProjectId}/feature_flags`,object:{name:featureFlag.key,id:featureFlag.id},callback:()=>{actions.loadFeatureFlags()}})},disabledReason:featureFlag.can_edit?null:"You don't have permission to edit this feature flag.",status:"danger"}]}]}})}]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.FeatureFlag&&sceneParams.params.id?["feature-flags",parseInt(sceneParams.params.id)]:null],relevantFeatureFlags:[s=>[s.featureFlags,navigation3000Logic.selectors.searchTerm],(featureFlags,searchTerm)=>searchTerm?featureFlags_fuse.search(searchTerm).map(result=>[result.item,result.matches]):featureFlags.results.map(featureFlag=>[featureFlag,null])]}}),(0,kea_subscriptions_lib.Vt)({featureFlags:featureFlags=>{featureFlags_fuse.setCollection(featureFlags)}})]);var utils_api=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),savedInsightsLogic=__webpack_require__("./frontend/src/scenes/saved-insights/savedInsightsLogic.ts"),insightsModel=__webpack_require__("./frontend/src/models/insightsModel.tsx");let insightsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","insightsSidebarLogic"]),(0,index_esm.connect)(()=>({values:[savedInsightsLogic.w,["insights","insightsLoading","paramsFromFilters"],sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"]],actions:[savedInsightsLogic.w,["loadInsights","setSavedInsightsFilters","duplicateInsight"]]})),(0,index_esm.reducers)(()=>({infiniteInsights:[[],{[savedInsightsLogic.w.actionTypes.loadInsightsSuccess]:(state,_ref)=>{let{insights}=_ref,items=0===insights.offset?[]:state.slice();for(let i=0;i{let{actions,values,cache}=_ref2;return{contents:[s=>[s.insights,s.infiniteInsights,s.insightsLoading,projectLogic.K.selectors.currentProjectId],(insights,infiniteInsights,insightsLoading,currentProjectId)=>[{key:"insights",noun:"insight",onAdd:urls.j.insightNew(),items:infiniteInsights.map(insight=>{if(insight)return{key:insight.short_id,name:insight.name||insight.derived_name||"Untitled",isNamePlaceholder:!insight.name,url:urls.j.insightView(insight.short_id),searchMatch:findSearchTermInItemName(insight.name||insight.derived_name||"",values.searchTerm),menuItems:initiateRename=>[{items:[{to:urls.j.insightEdit(insight.short_id),label:"Edit"},{onClick:()=>{actions.duplicateInsight(insight)},label:"Duplicate"}]},{items:[{onClick:initiateRename,label:"Rename",keyboardShortcut:["enter"]},{onClick:()=>{(0,deleteWithUndo.c)({object:insight,endpoint:`projects/${currentProjectId}/insights`,callback:actions.loadInsights})},status:"danger",label:"Delete insight"}]}],onRename:async newName=>{let updatedItem=await utils_api.L.update(insight.id,{name:newName});insightsModel.U.actions.renameInsightSuccess(updatedItem)}}}),loading:insightsLoading,remote:{isItemLoaded:index=>!!(cache.requestedInsights[index]||infiniteInsights[index]),loadMoreItems:async startIndex=>{for(let i=startIndex;i[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>activeScene===sceneTypes.x.Insight&&sceneParams.params.shortId?["insights",sceneParams.params.shortId]:null],debounceSearch:[s=>[s.searchTerm],()=>!0]}}),(0,index_esm.listeners)(_ref3=>{let{values,cache}=_ref3;return{loadInsights:()=>{values.paramsFromFilters.offset||(cache.requestedInsights=[])}}}),(0,kea_subscriptions_lib.Vt)(_ref4=>{let{actions}=_ref4;return{searchTerm:searchTerm=>{actions.setSavedInsightsFilters({search:searchTerm},!1,!1)}}}),(0,index_esm.afterMount)(_ref5=>{let{cache}=_ref5;cache.requestedInsights=[]})]);var apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),groupsListLogic=__webpack_require__("./frontend/src/scenes/groups/groupsListLogic.ts"),GroupActorDisplay=__webpack_require__("./frontend/src/scenes/persons/GroupActorDisplay.tsx"),person_utils=__webpack_require__("./frontend/src/scenes/persons/person-utils.ts"),personsLogic=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx");let personsAndGroupsSidebarLogic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","sidebars","personsAndGroupsSidebarLogic"]),(0,index_esm.connect)(()=>({values:[personsLogic.T,["persons","personsLoading"],groupsModel.$,["groupTypes"],sceneLogic.k,["activeScene","sceneParams"],navigation3000Logic,["searchTerm"]],actions:[personsLogic.T,["setListFilters as setPersonsListFilters","loadPersons"]]})),(0,index_esm.reducers)(()=>({infinitePersons:[[],{[personsLogic.T.actionTypes.loadPersonsSuccess]:(state,_ref)=>{let{persons}=_ref,items=0===persons.offset?[]:state.slice();for(let i=0;i{let{values,cache}=_ref2;return{contents:[s=>[s.persons,s.infinitePersons,s.personsLoading,s.groupTypes,s.groups,s.groupsLoading],(persons,infinitePersons,personsLoading,groupTypes,groups,groupsLoading)=>[{key:"persons",noun:"person",items:infinitePersons.map(person=>{if(!person)return person;let name=(0,person_utils.y)(person),{searchTerm}=values;return{key:person.distinct_ids,name:(0,person_utils.y)(person),url:(0,person_utils.s)(person),searchMatch:findSearchTermInItemName(name,searchTerm)}}),loading:personsLoading,remote:{isItemLoaded:index=>!!(cache.requestedPersons[index]||infinitePersons[index]),loadMoreItems:async(startIndex,stopIndex)=>{let moreUrl=persons.next||persons.previous;if(!moreUrl)throw Error("No URL for loading more persons is known");for(let i=startIndex;i<=stopIndex;i++)cache.requestedPersons[i]=!0;moreUrl=(0,lib.combineUrl)(moreUrl,{offset:startIndex,limit:stopIndex-startIndex+1}).url,await personsLogic.T.asyncActions.loadPersons(moreUrl)},itemCount:persons.count,minimumBatchSize:100}},...Array.from(groupTypes.values()).map(groupType=>({key:`groups-${groupType.group_type_index}`,noun:[groupType.name_singular||`${groupType.group_type} group`,groupType.name_plural||`${groupType.group_type} groups`],items:groups[groupType.group_type_index]?.results.map(group=>{let{searchTerm}=values,displayId=GroupActorDisplay.O(group.group_key,group.group_properties);return{key:group.group_key,name:displayId,url:apps_common_src.jk.group(groupType.group_type_index,group.group_key),searchMatch:findSearchTermInItemName(displayId,searchTerm)}})||[],loading:groupsLoading[groupType.group_type_index]}))]],groups:[s=>[,,,,,].fill(null).map((_,groupTypeIndex)=>state=>{if(s.groupTypes(state)[groupTypeIndex])return(0,groupsListLogic.z)({groupTypeIndex}).mount(),(0,groupsListLogic.z)({groupTypeIndex}).selectors.groups(state)}),(groups0,groups1,groups2,groups3,groups4)=>[groups0,groups1,groups2,groups3,groups4]],groupsLoading:[s=>[,,,,,].fill(null).map((_,groupTypeIndex)=>state=>{if(s.groupTypes(state)[groupTypeIndex])return(0,groupsListLogic.z)({groupTypeIndex}).mount(),(0,groupsListLogic.z)({groupTypeIndex}).selectors.groupsLoading(state)}),(groupsLoading0,groupsLoading1,groupsLoading2,groupsLoading3,groupsLoading4)=>[groupsLoading0,groupsLoading1,groupsLoading2,groupsLoading3,groupsLoading4]],activeListItemKey:[s=>[s.activeScene,s.sceneParams],(activeScene,sceneParams)=>{if(activeScene===sceneTypes.x.Person){let{_:personDistinctId}=sceneParams.params;return personDistinctId?["persons",personDistinctId]:null}if(activeScene===sceneTypes.x.Group){let{groupKey,groupTypeIndex}=sceneParams.params;return groupKey?[`groups-${groupTypeIndex}`,decodeURIComponent(groupKey)]:null}return null}],debounceSearch:[s=>[s.searchTerm],()=>!0]}}),(0,index_esm.listeners)(_ref3=>{let{cache}=_ref3;return{loadPersons:async _ref4=>{let{url}=_ref4,offset=url?parseInt(new URL(url).searchParams.get("offset")||"0"):0;0===offset&&(cache.requestedPersons=[])}}}),(0,kea_subscriptions_lib.Vt)(_ref5=>{let{actions,values}=_ref5;return{searchTerm:searchTerm=>{for(let{group_type_index:groupTypeIndex}of(actions.setPersonsListFilters({search:searchTerm}),actions.loadPersons(),Object.values(values.groupTypes)))(0,groupsListLogic.z)({groupTypeIndex}).actions.setSearch(searchTerm,!1)}}}),(0,index_esm.afterMount)(_ref6=>{let{actions,cache}=_ref6;cache.requestedPersons=[],actions.loadPersons()})]),ITEM_KEY_PART_SEPARATOR="::",navigation3000Logic=(0,index_esm.kea)([(0,index_esm.path)(["layout","navigation-3000","navigationLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)(()=>({values:[sceneLogic.k,["sceneConfig"],navigationLogic.f,["mobileLayout"],teamLogic.H,["currentTeam","hasOnboardedAnyProduct"]],actions:[navigationLogic.f,["closeAccountPopover"]]})),(0,index_esm.actions)({hideSidebar:!0,showSidebar:newNavbarItemId=>({newNavbarItemId}),toggleNavCollapsed:override=>({override}),showNavOnMobile:!0,hideNavOnMobile:!0,toggleSidebar:!0,setSidebarWidth:width=>({width}),setSidebarOverslide:overslide=>({overslide}),syncSidebarWidthWithMouseMove:delta=>({delta}),syncSidebarWidthWithViewport:!0,beginResize:!0,endResize:!0,acknowledgeSidebarKeyboardShortcut:!0,setIsSearchShown:isSearchShown=>({isSearchShown}),setSearchTerm:searchTerm=>({searchTerm}),initiateNewItemInCategory:category=>({category}),initiateNewItemInlineInCategory:category=>({category}),cancelNewItem:!0,saveNewItem:itemName=>({itemName}),saveNewItemComplete:!0,setLastFocusedItemIndex:index=>({index}),setLastFocusedItemByKey:key=>({key}),focusNextItem:!0,focusPreviousItem:!0,toggleAccordion:key=>({key})}),(0,index_esm.reducers)({isSidebarShown:[!0,{hideSidebar:()=>!1,showSidebar:()=>!0,toggleSidebar:isSidebarShown=>!isSidebarShown}],sidebarWidth:[288,{persist:!0},{setSidebarWidth:(_,_ref)=>{let{width}=_ref;return width}}],sidebarOverslide:[0,{setSidebarOverslide:(_,_ref2)=>{let{overslide}=_ref2;return overslide}}],isResizeInProgress:[!1,{beginResize:()=>!0,endResize:()=>!1}],isNavCollapsedDesktop:[!1,{persist:!0},{toggleNavCollapsed:(state,_ref3)=>{let{override}=_ref3;return null!=override?override:!state}}],isNavShownMobile:[!1,{persist:!0},{showNavOnMobile:()=>!0,hideNavOnMobile:()=>!1,closeAccountPopover:()=>!1}],isSidebarKeyboardShortcutAcknowledged:[!1,{persist:!0},{acknowledgeSidebarKeyboardShortcut:()=>!0}],activeNavbarItemIdRaw:[sceneTypes.x.Dashboards,{persist:!0},{showSidebar:(state,_ref4)=>{let{newNavbarItemId}=_ref4;return newNavbarItemId||state}}],isSearchShown:[!1,{setIsSearchShown:(_,_ref5)=>{let{isSearchShown}=_ref5;return isSearchShown}}],internalSearchTerm:["",{setSearchTerm:(_,_ref6)=>{let{searchTerm}=_ref6;return searchTerm}}],lastFocusedItemIndex:[-1,{setLastFocusedItemIndex:(_,_ref7)=>{let{index}=_ref7;return index}}],accordionCollapseMapping:[{},{persist:!0},{toggleAccordion:(state,_ref8)=>{let{key}=_ref8;return{...state,[key]:!state[key]}}}],newItemInlineCategory:[null,{initiateNewItemInlineInCategory:(_,_ref9)=>{let{category}=_ref9;return category},saveNewItemComplete:()=>null,cancelNewItem:()=>null,toggleSidebar:()=>null,showSidebar:()=>null,hideSidebar:()=>null}],savingNewItem:[!1,{saveNewItem:()=>!0,saveNewItemComplete:()=>!1}]}),(0,index_esm.listeners)(_ref10=>{let{actions,values}=_ref10;return{initiateNewItemInCategory:_ref11=>{let{category:categoryKey}=_ref11,category=values.activeNavbarItem?.logic.values.contents?.find(item=>item.key===categoryKey);if(category){if(!category.onAdd||"function"!=typeof category.onAdd)throw Error(`Sidebar category '${categoryKey}' doesn't support onAdd`)}else throw Error(`Sidebar category '${categoryKey}' doesn't exist`);0===category.onAdd.length?category.onAdd():actions.initiateNewItemInlineInCategory(categoryKey)},saveNewItem:async _ref12=>{let{itemName}=_ref12;try{let categoryKey=values.newItemInlineCategory;if(!categoryKey)throw Error("Can't save new sidebar item without a category");let category=values.activeNavbarItem?.logic.values.contents?.find(item=>item.key===categoryKey);if(category){if(!category.onAdd||"function"!=typeof category.onAdd)throw Error(`Sidebar category '${categoryKey}' doesn't support onAdd`)}else throw Error(`Sidebar category '${categoryKey}' doesn't exist`);await category.onAdd(itemName)}catch(e){(0,esm_exports.Tb)(e),console.error(e),src.UJ.error("Something went wrong while saving the item. Please try again.")}finally{actions.saveNewItemComplete()}},syncSidebarWidthWithMouseMove:_ref13=>{let{delta}=_ref13,newWidthRaw=values.sidebarWidth+values.sidebarOverslide+delta,newWidth=newWidthRaw;newWidth<192?newWidth=192:newWidth>1024&&(newWidth=1024),newWidth>.5*window.innerWidth&&(newWidth=.5*window.innerWidth),actions.setSidebarWidth(newWidth),actions.setSidebarOverslide(newWidthRaw-newWidth),newWidthRaw<96?values.isSidebarShown&&actions.hideSidebar():values.isSidebarShown||actions.showSidebar()},syncSidebarWidthWithViewport:()=>{values.sidebarWidth>.5*window.innerWidth&&actions.setSidebarWidth(.5*window.innerWidth)},endResize:()=>{actions.setSidebarOverslide(values.isSidebarShown?0:-192)},toggleSidebar:()=>{actions.endResize()},focusNextItem:()=>{let nextIndex=values.lastFocusedItemIndex+1;nextIndex{let nextIndex=values.lastFocusedItemIndex-1;nextIndex>=-1&&actions.setLastFocusedItemIndex(nextIndex)},setLastFocusedItemByKey:_ref14=>{let{key}=_ref14,index=values.sidebarContentsFlattened.findIndex(item=>Array.isArray(item.key)?item.key.includes(key):item.key===key);-1!==index&&actions.setLastFocusedItemIndex(index)}}}),(0,index_esm.selectors)({mode:[s=>[s.sceneConfig],sceneConfig=>sceneConfig?.layout!=="plain"||sceneConfig.allowUnauthenticated?sceneConfig?.layout!=="plain"?"full":"none":"minimal"],isNavShown:[s=>[s.isNavShownMobile,s.mobileLayout],(isNavShownMobile,mobileLayout)=>!mobileLayout||isNavShownMobile],isNavCollapsed:[s=>[s.isNavCollapsedDesktop,s.mobileLayout],(isNavCollapsedDesktop,mobileLayout)=>!mobileLayout&&isNavCollapsedDesktop],navbarItems:[s=>[featureFlagLogic.h.selectors.featureFlags,dashboardsModel.h.selectors.dashboardsLoading,dashboardsModel.h.selectors.pinnedDashboards,s.currentTeam,s.hasOnboardedAnyProduct],(featureFlags,dashboardsLoading,pinnedDashboards,currentTeam,hasOnboardedAnyProduct)=>{let isUsingSidebar=featureFlags[constants.y8.POSTHOG_3000_NAV],hasOnboardedFeatureFlags=currentTeam?.has_completed_onboarding_for?.[types.Md.FEATURE_FLAGS],sectionOne=hasOnboardedAnyProduct?[{identifier:sceneTypes.x.ProjectHomepage,label:"Home",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHome,{}),to:urls.j.projectHomepage()},{identifier:sceneTypes.x.Dashboards,label:"Dashboards",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDashboard,{}),logic:isUsingSidebar?dashboardsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.dashboards(),sideAction:{identifier:"pinned-dashboards-dropdown",dropdown:{overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{title:"Pinned dashboards",items:pinnedDashboards.map(dashboard=>({label:dashboard.name,to:urls.j.dashboard(dashboard.id)})),footer:dashboardsLoading&&(0,jsx_runtime.jsxs)("div",{className:"px-2 py-1 text-text-secondary-3000",children:[(0,jsx_runtime.jsx)(src.$j,{})," Loading…"]})}]}),placement:"bottom-end"}}},{identifier:sceneTypes.x.Notebooks,label:"Notebooks",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconNotebook,{}),to:urls.j.notebooks()},{identifier:sceneTypes.x.DataManagement,label:"Data management",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),logic:isUsingSidebar?dataManagementSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.eventDefinitions()},{identifier:sceneTypes.x.PersonsManagement,label:"People and groups",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPeople,{}),logic:isUsingSidebar?personsAndGroupsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.persons()},{identifier:sceneTypes.x.Activity,label:"Activity",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconLive,{}),to:urls.j.activity()}]:[{identifier:sceneTypes.x.Products,label:"Welcome to PostHog",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconLogomark,{}),to:urls.j.products()}];return featureFlags[constants.y8.ARTIFICIAL_HOG]&§ionOne.splice(1,0,{identifier:sceneTypes.x.Max,label:"Max AI",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconSparkles,{}),to:urls.j.max(),tag:"beta"}),featureFlags[constants.y8.FEATURE_MANAGEMENT_UI]&§ionOne.splice(4,0,{identifier:sceneTypes.x.FeatureManagement,label:"Features",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFeatures,{}),logic:isUsingSidebar?featureFlagsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.featureManagement()}),[sectionOne,[{identifier:sceneTypes.x.SavedInsights,label:"Product analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{}),logic:isUsingSidebar?insightsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.savedInsights(),sideAction:{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),to:urls.j.insightNew(),tooltip:"New insight",identifier:sceneTypes.x.Insight}},{identifier:sceneTypes.x.WebAnalytics,label:"Web analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPieChart,{}),to:isUsingSidebar?void 0:urls.j.webAnalytics()},{identifier:sceneTypes.x.Replay,label:"Session replay",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRewindPlay,{}),to:urls.j.replay()},featureFlags[constants.y8.ERROR_TRACKING]?{identifier:sceneTypes.x.ErrorTracking,label:"Error tracking",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconWarning,{}),to:urls.j.errorTracking(),tag:"alpha"}:null,featureFlags[constants.y8.HEATMAPS_UI]?{identifier:sceneTypes.x.Heatmaps,label:"Heatmaps",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCursorClick,{}),to:isUsingSidebar?void 0:urls.j.heatmaps(),tag:"alpha"}:null,{identifier:sceneTypes.x.FeatureFlags,label:"Feature flags",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconToggle,{}),logic:isUsingSidebar?featureFlagsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.featureFlags()},{identifier:sceneTypes.x.Experiments,label:"Experiments",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTestTube,{}),logic:isUsingSidebar?experimentsSidebarLogic:void 0,to:isUsingSidebar?void 0:urls.j.experiments()},{identifier:sceneTypes.x.Surveys,label:"Surveys",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMessage,{}),to:urls.j.surveys()},"test"!==featureFlags[constants.y8.PRODUCT_INTRO_PAGES]||hasOnboardedFeatureFlags?{identifier:sceneTypes.x.EarlyAccessFeatures,label:"Early access features",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRocket,{}),to:urls.j.earlyAccessFeatures()}:null,featureFlags[constants.y8.SQL_EDITOR]?{identifier:sceneTypes.x.SQLEditor,label:"SQL editor",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconServer,{}),to:urls.j.sqlEditor(),logic:editorSidebarLogic}:{identifier:sceneTypes.x.DataWarehouse,label:"Data warehouse",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),to:isUsingSidebar?void 0:urls.j.dataWarehouse()},hasOnboardedAnyProduct?{identifier:sceneTypes.x.Pipeline,label:"Data pipelines",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlug,{}),to:urls.j.pipeline()}:null,featureFlags[constants.y8.MESSAGING]&&hasOnboardedAnyProduct?{identifier:sceneTypes.x.MessagingBroadcasts,label:"Messaging",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMegaphone,{}),to:urls.j.messagingBroadcasts(),tag:"alpha"}:null].filter(utils.DX)]}],navbarItemIdMapping:[s=>[s.navbarItems],navbarItems=>Object.fromEntries(navbarItems.flat().map(item=>[item.identifier,item]))],sidebarOverslideDirection:[s=>[s.sidebarOverslide],sidebarOverslide=>sidebarOverslide<0?"min":sidebarOverslide>0?"max":null],activeNavbarItem:[s=>[s.activeNavbarItemId,s.navbarItemIdMapping],(activeNavbarItemId,navbarItemIdMapping)=>{let item=activeNavbarItemId?navbarItemIdMapping[activeNavbarItemId]:null;return item&&"logic"in item?item:null}],searchTerm:[s=>[s.internalSearchTerm,s.isSearchShown],(internalSearchTerm,isSearchShown)=>isSearchShown?internalSearchTerm:""],sidebarContentsFlattened:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state)||null],sidebarContents=>sidebarContents?sidebarContents.flatMap(item=>"items"in item?item.items:item):[]],normalizedActiveListItemKey:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.activeListItemKey?.(state)||null],activeListItemKey=>activeListItemKey?Array.isArray(activeListItemKey)?activeListItemKey.join(ITEM_KEY_PART_SEPARATOR):activeListItemKey:null],activeNavbarItemId:[s=>[s.activeNavbarItemIdRaw,featureFlagLogic.h.selectors.featureFlags],(activeNavbarItemIdRaw,featureFlags)=>featureFlags[constants.y8.SQL_EDITOR]&&activeNavbarItemIdRaw===sceneTypes.x.SQLEditor?sceneTypes.x.SQLEditor:featureFlags[constants.y8.POSTHOG_3000_NAV]?activeNavbarItemIdRaw:null],newItemCategory:[s=>[state=>s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state)||null,s.newItemInlineCategory,lib.router.selectors.location],(sidebarContents,newItemInlineCategory,location1)=>sidebarContents&&(newItemInlineCategory||sidebarContents.find(category=>"string"==typeof category.onAdd&&category.onAdd===location1.pathname)?.key)||null]}),(0,kea_subscriptions_lib.Vt)(_ref15=>{let{props,cache,actions,values}=_ref15;return{isResizeInProgress:isResizeInProgress=>{if(isResizeInProgress)return cache.onMouseMove=e=>actions.syncSidebarWidthWithMouseMove(e.movementX),cache.onMouseUp=e=>{0===e.button&&actions.endResize()},document.addEventListener("mousemove",cache.onMouseMove),document.addEventListener("mouseup",cache.onMouseUp),()=>{};document.removeEventListener("mousemove",cache.onMouseMove),document.removeEventListener("mouseup",cache.onMouseUp)},sidebarContentsFlattened:sidebarContentsFlattened=>{for(let item of sidebarContentsFlattened)item.ref||(item.ref=react.createRef());actions.setLastFocusedItemIndex(-1)},lastFocusedItemIndex:lastFocusedItemIndex=>{if(lastFocusedItemIndex>=0){let item=values.sidebarContentsFlattened[lastFocusedItemIndex];item.ref?.current?.focus()}else props.inputElement?.focus()}}}),(0,index_esm.events)(_ref16=>{let{props,actions,cache}=_ref16;return{afterMount:()=>{cache.onResize=()=>actions.syncSidebarWidthWithViewport(),cache.onKeyDown=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(actions.toggleSidebar(),e.preventDefault()),"f"===e.key&&e.shiftKey&&(e.metaKey||e.ctrlKey)&&(actions.setIsSearchShown(!0),props.inputElement?.focus(),e.preventDefault())},window.addEventListener("resize",cache.onResize),window.addEventListener("keydown",cache.onKeyDown)},beforeUnmount:()=>{window.removeEventListener("resize",cache.onResize),window.removeEventListener("resize",cache.onKeyDown)}}})])},"./frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>SIDE_PANEL_TABS,W:()=>SidePanel_SidePanel});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),SidePanel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/sidepanel/SidePanel.scss"),SidePanel_default=__webpack_require__.n(SidePanel),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(SidePanel_default(),options),SidePanel_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Resizer=__webpack_require__("./frontend/src/lib/components/Resizer/Resizer.tsx"),resizerLogic=__webpack_require__("./frontend/src/lib/components/Resizer/resizerLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),NotebookPanel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/NotebookPanel/NotebookPanel.scss"),NotebookPanel_default=__webpack_require__.n(NotebookPanel),NotebookPanel_options={};NotebookPanel_options.insert="head",NotebookPanel_options.singleton=!1,injectStylesIntoStyleTag_default()(NotebookPanel_default(),NotebookPanel_options),NotebookPanel_default().locals;var useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),sidePanelStateLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SidePanelPaneHeader(_ref){let{children,title}=_ref,{modalMode}=(0,index_esm.useValues)(sidePanelStateLogic.f),{closeSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f);return(0,jsx_runtime.jsxs)("header",{className:(0,clsx_m.default)("border-b shrink-0 flex items-center justify-end gap-1",{"p-1 h-10":!modalMode,"pb-2 mt-2 mx-3":modalMode}),children:[title?(0,jsx_runtime.jsx)("h3",{className:(0,clsx_m.default)("flex-1 flex items-center gap-1 font-semibold mb-0 truncate",{"text-base px-2":!modalMode}),children:title}):null,children,(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:()=>closeSidePanel(),tooltip:modalMode?"Close":"Close this side panel",tooltipPlacement:modalMode?"top":"bottom-end"})]})}var types=__webpack_require__("./frontend/src/types.ts"),Notebook=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/Notebook.tsx"),notebooksModel=__webpack_require__("./frontend/src/models/notebooksModel.ts"),NotebookSelectButton=__webpack_require__("./frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx");function NotebookListMini(_ref){let{selectedNotebookId}=_ref,{notebooks,notebookTemplates}=(0,index_esm.useValues)(notebooksModel.L),selectedTitle="scratchpad"===selectedNotebookId?"My scratchpad":notebookTemplates.find(notebook=>notebook.short_id===selectedNotebookId)?.title||notebooks.find(notebook=>notebook.short_id===selectedNotebookId)?.title||"Untitled";return(0,jsx_runtime.jsx)(NotebookSelectButton.tI,{placement:"bottom-start",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",truncate:!0,children:selectedTitle||"Notebooks"})})}var notebookLogic=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/notebookLogic.ts"),NotebookMeta=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/NotebookMeta.tsx"),NotebookMenu=__webpack_require__("./frontend/src/scenes/notebooks/NotebookMenu.tsx"),notebookPanelLogic=__webpack_require__("./frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts");function NotebookPanelDropzone(){let[isDragActive,setIsDragActive]=(0,react.useState)(!1),{dropMode,droppedResource}=(0,index_esm.useValues)(notebookPanelLogic.F),{setDroppedResource}=(0,index_esm.useActions)(notebookPanelLogic.F);return dropMode||droppedResource?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("NotebookPanelDropzone",{"NotebookPanelDropzone--active":isDragActive,"NotebookPanelDropzone--dropped":!!droppedResource}),onDragEnter:()=>setIsDragActive(!0),onDragLeave:()=>setIsDragActive(!1),onDragOver:e=>e.preventDefault(),onDrop:event=>{if(event.preventDefault(),setIsDragActive(!1),!event.dataTransfer)return null;let text=event.dataTransfer.getData("text/plain"),node=event.dataTransfer.getData("node"),properties=event.dataTransfer.getData("properties");setDroppedResource(node?{type:node,attrs:properties?JSON.parse(properties):{}}:text)},children:droppedResource?(0,jsx_runtime.jsxs)("div",{className:"NotebookPanelDropzone__dropped",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-start justify-between",children:[(0,jsx_runtime.jsx)("h2",{children:"Add dropped resource to..."}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",onClick:()=>setDroppedResource(null),children:"Cancel"})]}),(0,jsx_runtime.jsx)(NotebookSelectButton.Ld,{onNotebookOpened:notebookLogic=>{setDroppedResource(null),droppedResource&&("string"!=typeof droppedResource?notebookLogic.actions.insertAfterLastNode(droppedResource):notebookLogic.actions.pasteAfterLastNode(droppedResource))},resource:!0})]}):(0,jsx_runtime.jsx)("div",{className:"NotebookPanelDropzone__message",children:"Drop here for a different Notebook"})}):null}var exporter=__webpack_require__("./frontend/src/lib/components/ExportButton/exporter.tsx"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),exportsLogic=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts");let sidePanelExportsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelExportsLogic"]),(0,index_esm.connect)({values:[exportsLogic.exportsLogic,["exports","freshUndownloadedExports"]],actions:[sidePanelStateLogic.f,["openSidePanel"],exportsLogic.exportsLogic,["loadExports","removeFresh"]]}),(0,index_esm.afterMount)(_ref=>{let{actions}=_ref;actions.loadExports()})]),ExportsContent=()=>{let{exports,freshUndownloadedExports}=(0,index_esm.useValues)(sidePanelExportsLogic),{loadExports,removeFresh}=(0,index_esm.useActions)(sidePanelExportsLogic);return(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 overflow-y-auto p-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex justify-end",children:(0,jsx_runtime.jsx)(src.Jp,{onClick:loadExports,type:"tertiary",size:"small",icon:(0,jsx_runtime.jsx)(icons.tr,{}),children:"Refresh"})}),exports.map(asset=>{let isNotDownloaded=freshUndownloadedExports.some(fresh=>fresh.id===asset.id);return(0,jsx_runtime.jsx)(src.Jp,{type:isNotDownloaded?"primary":"secondary",fullWidth:!0,className:"mt-2",disabledReason:asset.has_content?void 0:"Export not ready yet",onClick:()=>{removeFresh(asset),(0,exporter._)(asset)},sideIcon:asset.has_content?(0,jsx_runtime.jsx)(posthog_icons_es.IconDownload,{className:"text-link"}):void 0,children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between flex-auto p-2",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("span",{className:"text-link font-medium block",children:asset.filename}),asset.created_at&&(0,jsx_runtime.jsx)("span",{className:"text-xs mt-1",children:(0,dayjs.Bv)(asset.created_at).fromNow()}),asset.expires_after&&(0,jsx_runtime.jsxs)("span",{className:"text-xs text-muted mt-1",children:[" ","\xb7 expires ",(0,dayjs.Bv)(asset.expires_after).fromNow()]}),isNotDownloaded&&(0,jsx_runtime.jsx)("span",{className:"text-xs text-muted mt-1",children:" \xb7 not downloaded yet"})]}),(0,jsx_runtime.jsx)("div",{children:!asset.has_content&&(0,jsx_runtime.jsx)(src.$j,{})})]})},asset.id)})]})})};var themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),sidePanelContextLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelContextLogic.ts"),AccessControlObject=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),LemonProgressCircle=__webpack_require__("./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),activationLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/activation/activationLogic.ts");let ActivationTask=_ref2=>{let{id,name,description,completed,canSkip,skipped,url}=_ref2,{runTask,skipTask}=(0,index_esm.useActions)(activationLogic.z),{reportActivationSideBarTaskClicked}=(0,index_esm.useActions)(eventUsageLogic.vx),content=(0,jsx_runtime.jsxs)("div",{className:"my-4 mx-2",children:[(0,jsx_runtime.jsx)("p",{className:"m-0",children:name}),!completed&&!skipped&&(0,jsx_runtime.jsx)("p",{className:"font-normal text-xs mt-2 mb-0 mx-0",children:description})]}),params={id,fullWidth:!0,type:"secondary",icon:completed?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}):skipped?(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}):null,tooltip:name};return url?(params.to=url,params.targetBlank=!0,params.onClick=()=>{reportActivationSideBarTaskClicked(id)}):params.onClick=()=>{runTask(id),reportActivationSideBarTaskClicked(id)},(0,jsx_runtime.jsx)("li",{children:completed||skipped||!canSkip?(0,jsx_runtime.jsx)(src.Jp,{...params,children:content}):(0,jsx_runtime.jsx)(src.Jp,{...params,sideAction:{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:"Skip task",onClick:()=>skipTask(id)},children:content})})};var ActivityLog=__webpack_require__("./frontend/src/lib/components/ActivityLog/ActivityLog.tsx"),humanizeActivity=__webpack_require__("./frontend/src/lib/components/ActivityLog/humanizeActivity.tsx"),MemberSelect=__webpack_require__("./frontend/src/lib/components/MemberSelect.tsx"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),usePageVisibility=__webpack_require__("./frontend/src/lib/hooks/usePageVisibility.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),sidePanelActivityLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx"),metalyticsLogic=__webpack_require__("./frontend/src/lib/components/Metalytics/metalyticsLogic.ts"),ProfileBubbles=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx");function SidePanelActivityMetalytics(){var _viewCount$views,_viewCount$users;let{scope,instanceId,viewCount,recentUserMembers,viewCountLoading,recentUsersLoading}=(0,index_esm.useValues)(metalyticsLogic.W);if(!instanceId)return(0,jsx_runtime.jsx)("p",{className:"border-dashed ",children:"You can see internal analytics of how your Organization members are using PostHog for things such as Dashboards, Insights, Playlists etc. Open an app to see the viewership data here."});let humanizedScope=`this ${scope?(0,humanizeActivity.VI)(scope,!0):"app"}`;return(0,jsx_runtime.jsxs)("div",{className:"space-y-4 ",children:[(0,jsx_runtime.jsxs)("p",{children:['You are viewing "meta" analytics of how your organization members are interacting with'," ",(0,jsx_runtime.jsx)("b",{children:humanizedScope}),"."]}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,jsx_runtime.jsx)(src.u,{title:`The total number of times ${humanizedScope} has been viewed by members of your organization.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Views"}),(0,jsx_runtime.jsx)("div",{className:"text-2xl font-semibold",children:viewCountLoading?(0,jsx_runtime.jsx)(src.$j,{}):null!==(_viewCount$views=viewCount?.views)&&void 0!==_viewCount$views?_viewCount$views:0})]})}),(0,jsx_runtime.jsx)(src.u,{title:`The total number of unique organization members who have viewed ${humanizedScope}.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Viewers"}),(0,jsx_runtime.jsx)("div",{className:"text-2xl font-semibold",children:viewCountLoading?(0,jsx_runtime.jsx)(src.$j,{}):null!==(_viewCount$users=viewCount?.users)&&void 0!==_viewCount$users?_viewCount$users:0})]})}),(0,jsx_runtime.jsx)(src.u,{title:`The most recent 30 users who have viewed ${humanizedScope}.`,placement:"top",children:(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-4 border rounded bg-bg-light min-w-40",children:[(0,jsx_runtime.jsx)("div",{className:"text-sm text-muted",children:"Recent viewers (30 days)"}),recentUsersLoading?(0,jsx_runtime.jsx)(src.$j,{}):(0,jsx_runtime.jsx)(ProfileBubbles.r,{className:"mt-2",people:recentUserMembers.map(member=>({email:member.user.email,name:member.user.first_name,title:member.user.email})),limit:3})]})})]})]})}var LinkedHogFunctions=__webpack_require__("./frontend/src/scenes/pipeline/hogfunctions/list/LinkedHogFunctions.tsx");function SidePanelActivitySubscriptions(){return(0,jsx_runtime.jsxs)("div",{className:"space-y-4 ",children:[(0,jsx_runtime.jsx)("p",{children:"Get notified of your team's activity"}),(0,jsx_runtime.jsx)(LinkedHogFunctions.k,{type:"internal_destination",subTemplateId:"activity-log",filters:{events:[{id:"$activity_log_entry_created",type:"events"}]}})]})}var KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),commentsLogic=__webpack_require__("./frontend/src/scenes/comments/commentsLogic.ts");let CommentComposer=props=>{let{key,composedComment,commentsLoading,replyingCommentId,itemContext}=(0,index_esm.useValues)((0,commentsLogic.x)(props)),{setComposedComment,sendComposedContent,setReplyingComment,setComposerRef,clearItemContext}=(0,index_esm.useActions)((0,commentsLogic.x)(props)),placeholder=replyingCommentId?"Reply...":`Comment on ${props.item_id?"this ":""}${(0,humanizeActivity.VI)(props.scope,!!props.item_id)}`;return(0,react.useEffect)(()=>()=>clearItemContext(),[key]),(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsx)(src.X7,{"data-attr":"comment-composer",placeholder:placeholder,value:composedComment,onChange:setComposedComment,disabled:commentsLoading,onPressCmdEnter:sendComposedContent,ref:setComposerRef}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),replyingCommentId?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setReplyingComment(null),children:"Cancel reply"}):null,itemContext?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>clearItemContext(),children:"Cancel"}):null,(0,jsx_runtime.jsxs)(src.Jp,{type:"primary",onClick:sendComposedContent,disabledReason:composedComment?null:"No message",sideIcon:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0}),"data-attr":"discussions-comment",children:["Add ",replyingCommentId?"reply":"comment"]})]})]})};var apps_common_src=__webpack_require__("./frontend/@posthog/apps-common/src/index.ts"),LemonMarkdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMarkdown/index.ts");let Comment=_ref=>{var _comment$created_by$f;let{comment}=_ref,{editingComment,commentsLoading,replyingCommentId}=(0,index_esm.useValues)(commentsLogic.x),{deleteComment,setEditingComment,persistEditedComment,setReplyingComment}=(0,index_esm.useActions)(commentsLogic.x),ref=(0,react.useRef)(null),isHighlighted=replyingCommentId===comment.id||editingComment?.id===comment.id;return(0,react.useEffect)(()=>{isHighlighted&&ref.current?.scrollIntoView()},[isHighlighted]),(0,jsx_runtime.jsxs)("div",{ref:ref,className:(0,clsx_m.default)("Comment border rounded-lg bg-bg-light",isHighlighted&&"border-primary-3000"),"data-comment-id":comment.id,children:[(0,jsx_runtime.jsxs)("div",{className:"flex-1 flex justify-start p-2 gap-2",children:[(0,jsx_runtime.jsx)(src.YY,{className:"mt-1",size:"xl",user:comment.created_by}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{className:"flex-1 font-semibold ",children:null!==(_comment$created_by$f=comment.created_by?.first_name)&&void 0!==_comment$created_by$f?_comment$created_by$f:"Unknown user"}),comment.created_at?(0,jsx_runtime.jsx)("span",{className:"text-xs",children:(0,jsx_runtime.jsx)(apps_common_src.w4,{time:comment.created_at})}):null,(0,jsx_runtime.jsx)(src.d6,{items:[{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconShare,{}),label:"Reply",onClick:()=>{var _comment$source_comme;return setReplyingComment(null!==(_comment$source_comme=comment.source_comment)&&void 0!==_comment$source_comme?_comment$source_comme:comment.id)}},{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{}),label:"Edit",onClick:()=>setEditingComment(comment)},{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheck,{}),label:"Delete",onClick:()=>deleteComment(comment)}],children:(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{}),size:"xsmall"})})]}),(0,jsx_runtime.jsx)(LemonMarkdown.j,{lowKeyHeadings:!0,children:comment.content}),comment.version?(0,jsx_runtime.jsx)("span",{className:"text-xs text-muted italic",children:"(edited)"}):null]})]}),editingComment?.id===comment.id?(0,jsx_runtime.jsxs)("div",{className:"space-y-2 border-t p-2",children:[(0,jsx_runtime.jsx)(src.X7,{"data-attr":"comment-composer",placeholder:"Edit comment",value:editingComment.content,onChange:value=>setEditingComment({...editingComment,content:value}),disabled:commentsLoading,onPressCmdEnter:persistEditedComment}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setEditingComment(null),disabled:commentsLoading,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:persistEditedComment,disabledReason:editingComment.content?commentsLoading?"Saving...":null:"No message",sideIcon:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,enter:!0}),children:"Save changes"})]})]}):null]})},CommentWithReplies=_ref2=>{let{commentWithReplies}=_ref2,{comment,replies}=commentWithReplies;return(0,jsx_runtime.jsxs)("div",{className:"relative space-y-2",children:[comment?(0,jsx_runtime.jsx)(Comment,{comment:comment}):(0,jsx_runtime.jsx)("div",{className:"border rounded border-dashed p-2 font-semibold italic bg-bg-accent-3000 text-muted-alt",children:"Deleted comment"}),(0,jsx_runtime.jsx)("div",{className:"pl-8 space-y-2",children:replies?.map(x=>jsx_runtime.jsx(CommentWithReplies,{commentWithReplies:{id:x.id,comment:x,replies:[]}},x.id))})]})},CommentsList=props=>{let{key,commentsWithReplies,commentsLoading}=(0,index_esm.useValues)((0,commentsLogic.x)(props)),{loadComments}=(0,index_esm.useActions)((0,commentsLogic.x)(props));return(0,react.useEffect)(()=>{loadComments()},[key]),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:commentsLogic.x,props:props,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[!commentsWithReplies?.length&&commentsLoading?(0,jsx_runtime.jsx)("div",{className:"space-y-2",children:(0,jsx_runtime.jsx)(src.yW,{className:"h-10 w-full"})}):commentsWithReplies?.length?null:(0,jsx_runtime.jsxs)("div",{className:"mx-auto p-8 max-w-160 mt-8 space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"max-w-120 mx-auto",children:(0,jsx_runtime.jsx)(hedgehogs.PhonePairHogs,{className:"w-full h-full"})}),(0,jsx_runtime.jsx)("h2",{children:"Start the discussion!"}),(0,jsx_runtime.jsx)("p",{children:"You can add comments about this page for your team members to see. Great for sharing context or ideas without getting in the way of the thing you are commenting on"})]}),(0,jsx_runtime.jsx)("div",{className:"space-y-2",children:commentsWithReplies?.map(x=>jsx_runtime.jsx(CommentWithReplies,{commentWithReplies:x},x.id))})]})})};var lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let sidePanelDiscussionLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelDiscussionLogic"]),(0,index_esm.actions)({loadCommentCount:!0,resetCommentCount:!0}),(0,index_esm.connect)({values:[featureFlagLogic.h,["featureFlags"],sidePanelContextLogic.g,["sceneSidePanelContext"]]}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{commentCount:[0,{loadCommentCount:async(_,breakpoint)=>{if(!values.featureFlags[constants.y8.DISCUSSIONS]||!values.commentsLogicProps)return 0;await breakpoint(100);let response=await api.ZP.comments.getCount({...values.commentsLogicProps});return breakpoint(),response},resetCommentCount:()=>0}]}}),(0,index_esm.selectors)({commentsLogicProps:[s=>[s.sceneSidePanelContext],sceneSidePanelContext=>sceneSidePanelContext.activity_scope?{scope:sceneSidePanelContext.activity_scope,item_id:sceneSidePanelContext.activity_item_id}:null]}),(0,kea_subscriptions_lib.Vt)(_ref2=>{let{actions}=_ref2;return{commentsLogicProps:props=>{props?actions.loadCommentCount():actions.resetCommentCount()}}})]),DiscussionContent=_ref=>{let{logicProps}=_ref,{selectedTabOptions}=(0,index_esm.useValues)(sidePanelStateLogic.f),{setReplyingComment}=(0,index_esm.useActions)((0,commentsLogic.x)(logicProps));return(0,react.useEffect)(()=>{selectedTabOptions&&setReplyingComment(selectedTabOptions)},[selectedTabOptions]),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"flex-1 overflow-y-auto p-2",children:(0,jsx_runtime.jsx)(CommentsList,{...logicProps})}),(0,jsx_runtime.jsx)("div",{className:"border-t px-3 pb-3",children:(0,jsx_runtime.jsx)(CommentComposer,{...logicProps})})]})};var kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),sceneLogic=__webpack_require__("./frontend/src/scenes/sceneLogic.ts");let POSTHOG_WEBSITE_ORIGIN="https://posthog.com",sanitizePath=path=>"/"===path[0]?path:`/${path}`,getPathFromUrl=urlOrPath=>{try{let url=new URL(urlOrPath);return url.pathname+url.search+url.hash}catch(e){return urlOrPath}},sidePanelDocsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","navigation","sidepanel","sidePanelDocsLogic"]),(0,index_esm.props)({}),(0,index_esm.connect)({actions:[sidePanelStateLogic.f,["openSidePanel","closeSidePanel","setSidePanelOptions"]],values:[sceneLogic.k,["sceneConfig"],sidePanelStateLogic.f,["selectedTabOptions"]]}),(0,index_esm.actions)({updatePath:path=>({path}),setInitialPath:path=>({path}),unmountIframe:!0,handleExternalUrl:urlOrPath=>({urlOrPath}),setMenuOptions:menuOptions=>({menuOptions}),setIframeReady:ready=>({ready}),setActiveMenuName:activeMenuName=>({activeMenuName}),navigateToPage:path=>({path})}),(0,index_esm.reducers)(()=>({iframeReady:[!1,{setIframeReady:(_,_ref)=>{let{ready}=_ref;return ready}}],menuOptions:[null,{setMenuOptions:(_,_ref2)=>{let{menuOptions}=_ref2;return menuOptions}}],activeMenuName:[null,{setActiveMenuName:(_,_ref3)=>{let{activeMenuName}=_ref3;return activeMenuName}}],currentPath:[null,{updatePath:(_,_ref4)=>{let{path}=_ref4;return sanitizePath(path)}}],initialPath:["/docs",{persist:!0},{setInitialPath:(_,_ref5)=>{let{path}=_ref5;return sanitizePath(path)}}]})),(0,index_esm.selectors)({iframeSrc:[s=>[s.initialPath],initialPath=>`${POSTHOG_WEBSITE_ORIGIN}${null!=initialPath?initialPath:""}`],currentUrl:[s=>[s.currentPath],currentPath=>`${POSTHOG_WEBSITE_ORIGIN}${null!=currentPath?currentPath:""}`]}),(0,index_esm.listeners)(_ref6=>{let{actions,values,props}=_ref6;return{openSidePanel:_ref7=>{let{options}=_ref7;if(options){let initialPath=getPathFromUrl(options);actions.setInitialPath(initialPath),actions.navigateToPage(initialPath)}},unmountIframe:()=>{var _values$currentPath;actions.setInitialPath(null!==(_values$currentPath=values.currentPath)&&void 0!==_values$currentPath?_values$currentPath:"/docs")},handleExternalUrl:_ref8=>{let{urlOrPath}=_ref8;kea_router_lib.router.actions.push(getPathFromUrl(urlOrPath))},navigateToPage:_ref9=>{let{path}=_ref9;path&&props.iframeRef.current?.contentWindow?.postMessage({type:"navigate",url:path},"*")},updatePath:_ref10=>{let{path}=_ref10;actions.setSidePanelOptions(path)}}}),(0,index_esm.afterMount)(_ref11=>{let{actions,values,cache}=_ref11;if(values.selectedTabOptions){let initialPath=getPathFromUrl(values.selectedTabOptions);actions.setInitialPath(initialPath)}else values.sceneConfig?.defaultDocsPath&&actions.setInitialPath(values.sceneConfig?.defaultDocsPath);cache.onWindowMessage=event=>{if(event.origin===POSTHOG_WEBSITE_ORIGIN){if("internal-navigation"===event.data.type){actions.updatePath(event.data.url);return}if("docs-ready"===event.data.type){actions.setIframeReady(!0);return}if("external-navigation"===event.data.type){actions.handleExternalUrl(event.data.url);return}if("docs-menu"===event.data.type){actions.setMenuOptions(event.data.menu);return}if("docs-active-menu"===event.data.type){actions.setActiveMenuName(event.data.activeMenuName);return}console.warn("Unhandled iframe message from Docs:",event.data)}},window.addEventListener("message",cache.onWindowMessage)}),(0,index_esm.beforeUnmount)(_ref12=>{var _values$currentPath2;let{actions,values,cache}=_ref12;actions.setInitialPath(null!==(_values$currentPath2=values.currentPath)&&void 0!==_values$currentPath2?_values$currentPath2:"/docs"),window.removeEventListener("message",cache.onWindowMessage)})]);function SidePanelDocsSkeleton(){return(0,jsx_runtime.jsxs)("div",{className:"absolute inset-0 p-4 space-y-2",children:[(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-10 mb-12"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/3 h-8"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/2 h-4 mb-10"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-80"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-60"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-full h-4 opacity-40"}),(0,jsx_runtime.jsx)(src.yW,{className:"w-1/2 h-4 opacity-20"})]})}var FeaturePreviews=__webpack_require__("./frontend/src/layout/FeaturePreviews/FeaturePreviews.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),Settings=__webpack_require__("./frontend/src/scenes/settings/Settings.tsx"),settingsLogic=__webpack_require__("./frontend/src/scenes/settings/settingsLogic.ts"),sidePanelSettingsLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelSettingsLogic.tsx"),sidePanelLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx"),sidePanelStatusLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelStatusLogic.tsx"),SupportForm=__webpack_require__("./frontend/src/lib/components/Support/SupportForm.tsx"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),algoliasearch_lite_umd=__webpack_require__("./node_modules/.pnpm/algoliasearch@4.22.1/node_modules/algoliasearch/dist/algoliasearch-lite.umd.js"),algoliasearch_lite_umd_default=__webpack_require__.n(algoliasearch_lite_umd),useHits=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useHits.js"),useSearchBox=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useSearchBox.js"),useRefinementList=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/connectors/useRefinementList.js"),InstantSearch=__webpack_require__("./node_modules/.pnpm/react-instantsearch-core@7.6.0_algoliasearch@4.22.1_react@18.2.0/node_modules/react-instantsearch-core/dist/es/components/InstantSearch.js"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),List=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/List/index.js");let searchClient=algoliasearch_lite_umd_default()("7VNQB5W0TX","37f41fd37095bc85af76ed4edc85eb5a"),rowRenderer=_ref=>{let{key,index,style,hits,activeOption}=_ref,{slug,title,type,resolved}=hits[index];return(0,jsx_runtime.jsx)("li",{style:style,role:"listitem",tabIndex:-1,className:"p-1 border-b last:border-b-0",children:(0,jsx_runtime.jsx)(src.Jp,{active:activeOption===index,to:`https://posthog.com/${slug}`,className:"[&_>span>span]:flex-col [&_>span>span]:items-start [&_>span>span]:space-y-1",children:(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsxs)("span",{className:"flex space-x-2 items-center",children:[(0,jsx_runtime.jsx)("p",{className:"m-0 font-bold font-sans line-clamp-1",children:title}),"question"===type&&resolved&&(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:"text-success size-4 flex-shrink-0"})]}),(0,jsx_runtime.jsxs)("p",{className:"text-xs m-0 opacity-80 font-normal font-sans line-clamp-1",children:["/",slug]})]})})},key)},Hits=_ref2=>{let{activeOption}=_ref2,{hits}=(0,useHits.O)();return(0,jsx_runtime.jsx)("ol",{role:"listbox",className:"list-none m-0 p-0 h-[80vh]",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref3=>{let{height,width}=_ref3;return(0,jsx_runtime.jsx)(List.aV,{scrollToIndex:activeOption,width:width,height:height,rowCount:hits.length,rowHeight:50,rowRenderer:options=>rowRenderer({...options,hits,activeOption})})}})})},SearchInput=_ref4=>{let{value,setValue}=_ref4,{refine}=(0,useSearchBox.l)();return(0,jsx_runtime.jsx)(src.DF,{onChange:value=>{setValue(value),refine(value)},value:value,type:"search",fullWidth:!0,placeholder:"Search..."})},tags=[{type:"all",label:"All"},{type:"docs",label:"Docs"},{type:"question",label:"Questions"},{type:"tutorial",label:"Tutorials"}],SearchTag=_ref5=>{let{type,label,active,onClick}=_ref5,{refine,items}=(0,useRefinementList.c)({attribute:"type"}),itemCount="all"!==type&&items.find(_ref6=>{let{value}=_ref6;return value===type})?.count;return(0,react.useEffect)(()=>{refine(type)},[]),(0,jsx_runtime.jsx)("button",{className:"p-0 cursor-pointer bg-bg-light",onClick:e=>{e.stopPropagation(),onClick(type)},children:(0,jsx_runtime.jsxs)(src.oe,{size:"medium",type:active?"primary":"option",children:[(0,jsx_runtime.jsx)("span",{children:label}),"all"!==type&&(0,jsx_runtime.jsxs)("span",{children:["(",null!=itemCount?itemCount:0,")"]})]})})},Tags=_ref7=>{let{activeTag,setActiveTag}=_ref7,handleClick=type=>{setActiveTag(type)};return(0,jsx_runtime.jsx)("ul",{className:"list-none m-0 p-0 flex space-x-1 mt-1 mb-0.5 pb-1.5 border-b px-2",children:tags.map(tag=>{let{type}=tag;return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(SearchTag,{...tag,active:activeTag===type,onClick:handleClick})},type)})})},Search=()=>{let{openSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f),{hits}=(0,useHits.O)(),{items,refine}=(0,useRefinementList.c)({attribute:"type"}),ref=(0,react.useRef)(null),[searchValue,setSearchValue]=(0,react.useState)(""),[activeOption,setActiveOption]=(0,react.useState)(),[activeTag,setActiveTag]=(0,react.useState)("all"),[searchOpen,setSearchOpen]=(0,react.useState)(!1);return(0,react.useEffect)(()=>{setSearchOpen(!!searchValue),setActiveOption(0)},[searchValue]),(0,react.useEffect)(()=>{if(setActiveOption(0),"all"===activeTag){let filteredItems=items.filter(_ref10=>{let{value}=_ref10;return tags.some(_ref11=>{let{type}=_ref11;return type===value})});filteredItems.forEach(_ref12=>{let{value,isRefined}=_ref12;isRefined||refine(value)})}else items.forEach(_ref13=>{let{value,isRefined}=_ref13;isRefined&&refine(value)}),refine(activeTag)},[activeTag]),(0,react.useEffect)(()=>{let handleClick=e=>{ref?.current?.contains(e.target)||setSearchOpen(!1)};return window.addEventListener("click",handleClick),()=>{window.removeEventListener("click",handleClick)}},[]),(0,jsx_runtime.jsxs)("div",{className:"relative",ref:ref,onKeyDown:e=>{switch(e.key){case"Enter":void 0!==activeOption&&openSidePanel(types.H$.Docs,`https://posthog.com/${hits[activeOption].slug}`);break;case"Escape":setSearchOpen(!1);break;case"ArrowDown":e.preventDefault(),setActiveOption(currOption=>void 0===currOption||currOption>=hits.length-1?0:currOption+1);break;case"ArrowUp":e.preventDefault(),setActiveOption(currOption=>{if(void 0!==currOption)return currOption<=0?hits.length-1:currOption-1});break;case"Tab":case"ArrowRight":{e.preventDefault();let currTagIndex=tags.findIndex(_ref8=>{let{type}=_ref8;return type===activeTag});setActiveTag(tags[currTagIndex>=tags.length-1?0:currTagIndex+1].type);break}case"ArrowLeft":{e.preventDefault();let currTagIndex=tags.findIndex(_ref9=>{let{type}=_ref9;return type===activeTag});setActiveTag(tags[currTagIndex<=0?tags.length-1:currTagIndex-1].type)}}},children:[(0,jsx_runtime.jsx)(SearchInput,{value:searchValue,setValue:setSearchValue}),searchOpen&&(0,jsx_runtime.jsxs)("div",{className:"absolute w-full bg-bg-light z-50 border rounded-lg shadow-xl mt-0.5",children:[(0,jsx_runtime.jsx)(Tags,{activeTag:activeTag,setActiveTag:setActiveTag}),(0,jsx_runtime.jsx)(Hits,{activeOption:activeOption})]})]})};function AlgoliaSearch(){return(0,jsx_runtime.jsx)(InstantSearch.p,{searchClient:searchClient,indexName:"prod_posthog_com",children:(0,jsx_runtime.jsx)(Search,{})})}let PRODUCTS=[{name:"Product OS",slug:"product-os",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconStack,{className:"text-danger h-5 w-5"})},{name:"Product analytics",slug:"product-analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{className:"text-[#2F80FA] h-5 w-5"})},{name:"Web analytics",slug:"web-analytics",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPieChart,{className:"text-[#36C46F] h-5 w-5"})},{name:"Session replay",slug:"session-replay",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconRewindPlay,{className:"text-warning h-5 w-5"})},{name:"Feature flags",slug:"feature-flags",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconToggle,{className:"text-[#30ABC6] h-5 w-5"})},{name:"Experiments",slug:"experiments",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTestTube,{className:"text-[#B62AD9] h-5 w-5"})},{name:"Surveys",slug:"surveys",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMessage,{className:"text-danger h-5 w-5"})},{name:"Data pipelines",slug:"cdp",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlug,{className:"text-[#2EA2D3] h-5 w-5"})},{name:"Data warehouse",slug:"data-warehouse",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{className:"text-[#8567FF] h-5 w-5"})},{name:"AI engineering",slug:"ai-engineering",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconAI,{className:"text-[#681291] dark:text-[#C170E8] h-5 w-5"})}],Section=_ref=>{let{title,children}=_ref;return(0,jsx_runtime.jsxs)("section",{className:"mb-6",children:[(0,jsx_runtime.jsx)("h3",{children:title}),children]})},SupportFormBlock=_ref2=>{let{onCancel}=_ref2,{supportPlans,hasSupportAddonPlan}=(0,index_esm.useValues)(billingLogic.kr),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h);return(0,jsx_runtime.jsxs)(Section,{title:"Email an engineer",children:[(0,jsx_runtime.jsx)(SupportForm.H,{}),(0,jsx_runtime.jsx)(src.Jp,{form:"support-modal-form",htmlType:"submit",type:"primary","data-attr":"submit",fullWidth:!0,center:!0,className:"mt-4",children:"Submit"}),(0,jsx_runtime.jsx)(src.Jp,{form:"support-modal-form",type:"secondary",onClick:onCancel,fullWidth:!0,center:!0,className:"mt-2 mb-4",children:"Cancel"}),(0,jsx_runtime.jsx)("br",{}),featureFlags[constants.y8.SUPPORT_MESSAGE_OVERRIDE]?(0,jsx_runtime.jsxs)("div",{className:"border bg-bg-light p-2 rounded gap-2",children:[(0,jsx_runtime.jsx)("strong",{children:"🎄 🎅 Support during the holidays 🎁 ⛄"}),(0,jsx_runtime.jsx)("p",{className:"mt-2 mb-0",children:"We're offering reduced support while we celebrate the holidays. Responses may be slower than normal over the holiday period (23rd December to the 6th January), and between the 25th and 27th of December we'll only be responding to critical issues. Thanks for your patience!"})]}):(0,jsx_runtime.jsxs)("div",{className:"grid grid-cols-2 border rounded [&_>*]:px-2 [&_>*]:py-0.5 mb-4 bg-bg-light pt-4",children:[(0,jsx_runtime.jsxs)("div",{className:"col-span-full flex justify-between py-1",children:[(0,jsx_runtime.jsx)("strong",{children:"Avg support response times"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.rU,{to:urls.j.organizationBilling([types.Md.PLATFORM_AND_SUPPORT]),children:"Explore options"})})]}),supportPlans?.map(plan=>{let currentPlan=plan.current_plan&&(!hasSupportAddonPlan||plan.plan_key?.includes("addon"));return jsx_runtime.jsxs(react.Fragment,{children:[jsx_runtime.jsxs("div",{className:currentPlan?"font-bold":void 0,children:[plan.name,currentPlan&&jsx_runtime.jsxs(jsx_runtime.Fragment,{children:[" ",jsx_runtime.jsx("span",{className:"font-normal opacity-60 text-sm",children:"(your plan)"})]})]}),jsx_runtime.jsx("div",{className:currentPlan?"font-bold":void 0,children:plan.features.find(f=>f.key==types.P$.SUPPORT_RESPONSE_TIME)?.note})]},`support-panel-${plan.plan_key}`)})]})]})},SIDE_PANEL_TABS={[types.H$.Notebooks]:{label:"Notebooks",Icon:posthog_icons_es.IconNotebook,Content:function(){let{selectedNotebook,initialAutofocus,droppedResource,dropProperties}=(0,index_esm.useValues)(notebookPanelLogic.F),{selectNotebook,closeSidePanel}=(0,index_esm.useActions)(notebookPanelLogic.F),{notebook}=(0,index_esm.useValues)((0,notebookLogic.T)({shortId:selectedNotebook,target:types.bZ.Popover})),editable=!notebook?.is_template,{ref,size}=(0,useResizeObserver.S)({0:"small",832:"medium"}),contentWidthHasEffect=(0,react.useMemo)(()=>"medium"===size,[size]);return(0,jsx_runtime.jsxs)("div",{ref:ref,className:"NotebookPanel",...dropProperties,children:[droppedResource?null:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)(NotebookListMini,{selectedNotebookId:selectedNotebook,onSelectNotebook:notebook=>{selectNotebook(notebook.short_id)}}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),selectedNotebook&&(0,jsx_runtime.jsx)(NotebookMeta.B,{shortId:selectedNotebook}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.notebook(selectedNotebook),onClick:()=>closeSidePanel(),icon:(0,jsx_runtime.jsx)(icons.pF,{}),tooltip:"Open as main focus",tooltipPlacement:"left"}),contentWidthHasEffect&&(0,jsx_runtime.jsx)(NotebookMeta.t,{size:"small"}),(0,jsx_runtime.jsx)(NotebookMenu.z,{shortId:selectedNotebook})]}),(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-y-auto px-4 py-2",children:(0,jsx_runtime.jsx)(Notebook.a,{shortId:selectedNotebook,editable:editable,initialAutofocus:initialAutofocus},selectedNotebook)})]}),(0,jsx_runtime.jsx)(NotebookPanelDropzone,{})]})},noModalSupport:!0},[types.H$.Support]:{label:"Help",Icon:posthog_icons_es.IconSupport,Content:()=>{let{openSidePanel,closeSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f),{preflight,isCloud}=(0,index_esm.useValues)(preflightLogic.preflightLogic),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{status}=(0,index_esm.useValues)(sidePanelStatusLogic.BE),theLogic=(0,supportLogic.Pw)({onClose:()=>closeSidePanel(types.H$.Support)}),{openEmailForm,closeEmailForm}=(0,index_esm.useActions)(theLogic),{title,isEmailFormOpen}=(0,index_esm.useValues)(theLogic),region=preflight?.region;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:isEmailFormOpen?title:SIDE_PANEL_TABS[types.H$.Support].label}),(0,jsx_runtime.jsx)("div",{className:"overflow-y-auto","data-attr":"side-panel-support-container",children:(0,jsx_runtime.jsx)("div",{className:"p-3 max-w-160 w-full mx-auto",children:isEmailFormOpen?(0,jsx_runtime.jsx)(SupportFormBlock,{onCancel:()=>closeEmailForm()}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Section,{title:"Search docs & community questions",children:(0,jsx_runtime.jsx)(AlgoliaSearch,{})}),(0,jsx_runtime.jsx)(Section,{title:"Explore the docs",children:(0,jsx_runtime.jsx)("ul",{className:"border rounded divide-y bg-bg-light dark:bg-transparent font-title font-medium",children:PRODUCTS.map((product,index)=>(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsxs)(src.rU,{to:`https://posthog.com/docs/${product.slug}`,className:"group flex items-center justify-between px-2 py-1.5",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-1.5",children:[product.icon,(0,jsx_runtime.jsx)("span",{className:"text-text-3000 opacity-75 group-hover:opacity-100",children:product.name})]}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(posthog_icons_es.IconChevronDown,{className:"text-text-3000 h-6 w-6 opacity-60 -rotate-90 group-hover:opacity-90"})})]})},index))})}),"operational"!==status?(0,jsx_runtime.jsx)(Section,{title:"",children:(0,jsx_runtime.jsx)(src.Vp,{type:status.includes("outage")?"error":"warning",children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("span",{children:["We are experiencing ",status.includes("outage")?"major":""," issues."]}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",fullWidth:!0,center:!0,targetBlank:!0,onClick:()=>openSidePanel(types.H$.Status),className:"mt-2 bg-[white]",children:"View system status"})]})})}):null,isCloud?(0,jsx_runtime.jsxs)(Section,{title:"Contact us",children:[(0,jsx_runtime.jsx)("p",{children:"Can't find what you need in the docs?"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",fullWidth:!0,center:!0,onClick:()=>openEmailForm(),targetBlank:!0,className:"mt-2",children:"Email an engineer"})]}):null,(0,jsx_runtime.jsx)(Section,{title:"Ask the community",children:(0,jsx_runtime.jsxs)("p",{children:["Questions about features, how-tos, or use cases? There are thousands of discussions in our community forums."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/questions",children:"Ask a question"})]})}),(0,jsx_runtime.jsx)(Section,{title:"Share feedback",children:(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:"https://posthog.com/wip",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHelmet,{}),targetBlank:!0,children:"See what we're building"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:"https://posthog.com/roadmap",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconMap,{}),targetBlank:!0,children:"Vote on our roadmap"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"alt",to:`https://github.com/PostHog/posthog/issues/new?&labels=enhancement&template=feature_request.yml&debug-info=${encodeURIComponent((0,supportLogic.nP)(region,currentOrganization,currentTeam))}`,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFeatures,{}),targetBlank:!0,children:"Request a feature"})})]})})]})})})]})}},[types.H$.Docs]:{label:"Docs",Icon:posthog_icons_es.IconInfo,Content:()=>{let ref=(0,react.useRef)(null),logic=sidePanelDocsLogic({iframeRef:ref}),{iframeSrc,iframeReady,currentUrl,activeMenuName,menuOptions}=(0,index_esm.useValues)(logic),{navigateToPage,unmountIframe,closeSidePanel}=(0,index_esm.useActions)(logic),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b);return(0,react.useEffect)(()=>{ref.current?.contentWindow?.postMessage({type:"theme-toggle",isDarkModeOn},"*")},[isDarkModeOn,ref.current]),(0,react.useEffect)(()=>(window.addEventListener("beforeunload",unmountIframe),()=>{window.removeEventListener("beforeunload",unmountIframe),unmountIframe()}),[]),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconHome,{}),type:"secondary",onClick:()=>{ref.current?.contentWindow?.postMessage({type:"navigate",url:"/docs"},"*")}}),menuOptions&&(0,jsx_runtime.jsx)(src.Yv,{placeholder:"Navigate",dropdownMatchSelectWidth:!1,onChange:navigateToPage,size:"small",value:null!=activeMenuName?activeMenuName:"",options:menuOptions.map(_ref=>{let{name,url}=_ref;return{label:name,value:url}})}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),targetBlank:!0,onClick:()=>{window.open(currentUrl,"_blank")?.focus(),closeSidePanel()},children:"Open in new tab"})]}),(0,jsx_runtime.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("iframe",{src:iframeSrc,title:"Docs",className:(0,clsx_m.default)("w-full h-full",!iframeReady&&"hidden"),ref:ref}),!iframeReady&&(0,jsx_runtime.jsx)(SidePanelDocsSkeleton,{})]})]})},noModalSupport:!0},[types.H$.Activation]:{label:"Quick start",Icon:_ref=>{let{className}=_ref,{activeTasks,completionPercent}=(0,index_esm.useValues)(activationLogic.z);return(0,jsx_runtime.jsx)(LemonProgressCircle.L,{progress:completionPercent/100,strokePercentage:.15,size:20,className:className,children:(0,jsx_runtime.jsx)("span",{className:"text-xs font-semibold",children:activeTasks.length})})},Content:()=>{let{activeTasks,completionPercent,completedTasks}=(0,index_esm.useValues)(activationLogic.z);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Quick start"}),(0,jsx_runtime.jsxs)("div",{className:"p-4 space-y-2 overflow-y-auto",children:[(0,jsx_runtime.jsx)("p",{children:"Use our Quick Start guide to learn about everything PostHog can do for you and your product."}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-center",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center",children:[(0,jsx_runtime.jsx)(LemonProgressCircle.L,{progress:completionPercent/100,size:100,className:"text-primary",children:(0,jsx_runtime.jsx)("span",{className:"text-2xl",children:activeTasks.length})}),(0,jsx_runtime.jsx)("p",{className:"text-muted mt-2 ",children:"still to go"})]}),(0,jsx_runtime.jsx)("div",{className:"h-60",children:(0,jsx_runtime.jsx)(hedgehogs.ProfessorHog,{className:"max-h-full w-auto object-contain"})})]}),activeTasks.length>0&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h4",{children:"What's next?"}),(0,jsx_runtime.jsx)("ul",{className:"space-y-2",children:activeTasks.map(task=>(0,jsx_runtime.jsx)(ActivationTask,{...task},task.id))})]}),completedTasks.length>0&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h4",{children:"Completed"}),(0,jsx_runtime.jsx)("ul",{className:"space-y-2",children:completedTasks.map(task=>(0,jsx_runtime.jsx)(ActivationTask,{...task},task.id))})]})]})]})}},[types.H$.Settings]:{label:"Settings",Icon:posthog_icons_es.IconGear,Content:()=>{var _settings$sectionId;let{settings}=(0,index_esm.useValues)(sidePanelSettingsLogic.A),{closeSidePanel,setSettings}=(0,index_esm.useActions)(sidePanelSettingsLogic.A),settingsLogicProps={...settings,logicKey:"sidepanel"},{selectedSectionId,selectedLevel}=(0,index_esm.useValues)((0,settingsLogic.h)(settingsLogicProps));return(0,react.useEffect)(()=>{setSettings({sectionId:null!=selectedSectionId?selectedSectionId:void 0,settingLevelId:selectedLevel})},[selectedSectionId,selectedLevel]),(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsxs)("span",{className:"flex-1 px-2 font-semibold text-base truncate",children:[(0,utils.fm)(selectedLevel)," settings"]}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.settings(null!==(_settings$sectionId=settings.sectionId)&&void 0!==_settings$sectionId?_settings$sectionId:settings.settingLevelId,settings.settingId),onClick:()=>closeSidePanel(),sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),children:"All settings"})]}),(0,jsx_runtime.jsx)("div",{className:"flex-1 p-3 overflow-y-auto",children:(0,jsx_runtime.jsx)(Settings.Z,{hideSections:!0,...settingsLogicProps})})]})}},[types.H$.FeaturePreviews]:{label:"Feature previews",Icon:posthog_icons_es.IconFeatures,Content:()=>(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Feature previews"}),(0,jsx_runtime.jsxs)("div",{className:"flex-1 p-3 overflow-y-auto space-y-4",children:[(0,jsx_runtime.jsx)(src.Vp,{type:"info",children:"Get early access to these upcoming features. Let us know what you think!"}),(0,jsx_runtime.jsx)(FeaturePreviews.F,{})]})]})},[types.H$.Activity]:{label:"Team activity",Icon:props=>{let{unreadCount}=(0,index_esm.useValues)(sidePanelActivityLogic.t);return(0,jsx_runtime.jsx)(icons.Xd,{count:unreadCount,...props,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconNotification,{})})},Content:()=>{var _filters$item_id,_filters$user,_filtersForCurrentPag;let{hasNotifications,notifications,activeTab,allActivity,allActivityResponseLoading,allActivityHasNext,importantChangesLoading,hasUnread,filters,filtersForCurrentPage,showDetails}=(0,index_esm.useValues)(sidePanelActivityLogic.t),{togglePolling,setActiveTab,maybeLoadOlderActivity,markAllAsRead,loadImportantChanges,setFilters,toggleShowDetails}=(0,index_esm.useActions)(sidePanelActivityLogic.t),{user}=(0,index_esm.useValues)(userLogic.userLogic),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h);(0,usePageVisibility.d)(pageIsVisible=>{togglePolling(pageIsVisible)}),(0,react.useEffect)(()=>(loadImportantChanges(!1),()=>{markAllAsRead(),togglePolling(!1)}),[]);let lastScrollPositionRef=(0,react.useRef)(0),contentRef=(0,react.useRef)(null),scopeMenuOptions=[{value:null,label:"All activity"},...Object.values(types.jc).map(x=>({value:x,label:(0,humanizeActivity.VI)(x)}))],activeScopeMenuOption=filters?.scope?filters.scope+`${null!==(_filters$item_id=filters.item_id)&&void 0!==_filters$item_id?_filters$item_id:""}`:null;filtersForCurrentPage?.scope&&filtersForCurrentPage?.item_id&&scopeMenuOptions.unshift({value:`${filtersForCurrentPage.scope}${null!==(_filtersForCurrentPag=filtersForCurrentPage.item_id)&&void 0!==_filtersForCurrentPag?_filtersForCurrentPag:""}`,label:`This ${(0,humanizeActivity.VI)(filtersForCurrentPage.scope,!0)}`});let toggleExtendedDescription=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.f4,{bordered:!0,label:"Show details",checked:showDetails,onChange:toggleShowDetails})});return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Team activity"}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.AUDIT_LOGS,className:"flex flex-col flex-1 overflow-hidden",overrideShouldShowGate:user?.is_impersonated||!!featureFlags[constants.y8.AUDIT_LOGS_ACCESS],children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("div",{className:"mx-2 shrink-0",children:(0,jsx_runtime.jsx)(src.TP,{activeKey:activeTab,onChange:key=>setActiveTab(key),tabs:[{key:sidePanelActivityLogic.H.Unread,label:"My notifications"},{key:sidePanelActivityLogic.H.All,label:"All activity"},...featureFlags[constants.y8.METALYTICS]?[{key:sidePanelActivityLogic.H.Metalytics,label:"Analytics"}]:[],...featureFlags[constants.y8.CDP_ACTIVITY_LOG_NOTIFICATIONS]?[{key:sidePanelActivityLogic.H.Subscriptions,label:"Subscriptions"}]:[]]})}),activeTab===sidePanelActivityLogic.H.Unread?(0,jsx_runtime.jsxs)("div",{className:"px-2 pb-2 space-y-2 shrink-0",children:[(0,jsx_runtime.jsxs)(src.Vp,{type:"info",dismissKey:"notifications-introduction",children:["Notifications shows you changes others make to"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.savedInsights("history"),children:"Insights"})," and"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.featureFlags("history"),children:"Feature Flags"})," that you created. Come join"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/community",children:"our community forum"})," and tell us what else should be here!"]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[toggleExtendedDescription,hasUnread?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>markAllAsRead(),children:"Mark all as read"}):null]})]}):activeTab===sidePanelActivityLogic.H.All?(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2 pb-2 space-y-2 shrink-0",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[toggleExtendedDescription,allActivityResponseLoading?(0,jsx_runtime.jsx)(src.$j,{textColored:!0}):null]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{children:"Filter for activity on:"}),(0,jsx_runtime.jsx)(src.Yv,{size:"small",options:scopeMenuOptions,placeholder:"All activity",value:null!=activeScopeMenuOption?activeScopeMenuOption:void 0,onChange:value=>setFilters({...filters,scope:null!=value?value:void 0,item_id:void 0}),dropdownMatchSelectWidth:!1}),(0,jsx_runtime.jsx)("span",{children:"by"}),(0,jsx_runtime.jsx)(MemberSelect.a,{value:null!==(_filters$user=filters?.user)&&void 0!==_filters$user?_filters$user:null,onChange:user=>{var _user$id;return setFilters({...filters,user:null!==(_user$id=user?.id)&&void 0!==_user$id?_user$id:void 0})}})]})]}):null,(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 overflow-hidden",ref:contentRef,onScroll:e=>{if(e.currentTarget.scrollTop>lastScrollPositionRef.current){let scrollPosition=e.currentTarget.scrollTop+e.currentTarget.clientHeight;e.currentTarget.scrollHeight-scrollPosition<100&&maybeLoadOlderActivity()}lastScrollPositionRef.current=e.currentTarget.scrollTop},children:(0,jsx_runtime.jsx)(ScrollableShadows.D,{direction:"vertical",innerClassName:"p-2 space-y-px",children:activeTab===sidePanelActivityLogic.H.Unread?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:importantChangesLoading&&!hasNotifications?(0,jsx_runtime.jsx)(src.yW,{className:"h-12 my-2",repeat:10,fade:!0}):hasNotifications?notifications.map((logItem,index)=>(0,jsx_runtime.jsx)(ActivityLog.h,{logItem:logItem,showExtendedDescription:showDetails},index)):(0,jsx_runtime.jsx)("div",{className:"p-6 text-center border border-dashed rounded text-muted-alt",children:"You're all caught up!"})}):activeTab===sidePanelActivityLogic.H.All?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:allActivityResponseLoading&&!allActivity.length?(0,jsx_runtime.jsx)(src.yW,{className:"h-12 my-2",repeat:10,fade:!0}):allActivity.length?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[allActivity.map((logItem,index)=>(0,jsx_runtime.jsx)(ActivityLog.h,{logItem:logItem,showExtendedDescription:showDetails},index)),(0,jsx_runtime.jsx)("div",{className:"flex items-center justify-center h-10 gap-2 m-4 text-muted-alt",children:allActivityResponseLoading?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.$j,{textColored:!0})," Loading older activity"]}):allActivityHasNext?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",fullWidth:!0,center:!0,onClick:()=>maybeLoadOlderActivity(),children:"Load more"}):"No more results"})]}):(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center gap-2 p-6 text-center border border-dashed rounded",children:[(0,jsx_runtime.jsx)("span",{children:"No activity yet"}),filters?(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setFilters(null),children:"Clear filters"}):null]})}):activeTab===sidePanelActivityLogic.H.Metalytics?(0,jsx_runtime.jsx)(SidePanelActivityMetalytics,{}):activeTab===sidePanelActivityLogic.H.Subscriptions?(0,jsx_runtime.jsx)(SidePanelActivitySubscriptions,{}):null})})]})})]})}},[types.H$.Discussion]:{label:"Discussion",Icon:props=>{let{commentCount}=(0,index_esm.useValues)(sidePanelDiscussionLogic);return(0,jsx_runtime.jsx)(icons.Xd,{count:commentCount,...props,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconChat,{})})},Content:()=>{let{commentsLogicProps}=(0,index_esm.useValues)(sidePanelDiscussionLogic),{scope,item_id}=null!=commentsLogicProps?commentsLogicProps:{};return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden flex-1",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:(0,jsx_runtime.jsxs)("div",{className:"flex space-x-2",children:[(0,jsx_runtime.jsxs)("span",{children:["Discussion"," ",scope?(0,jsx_runtime.jsxs)("span",{className:"font-normal text-muted-alt",children:["about ",item_id?"this":""," ",(0,humanizeActivity.VI)(scope,!!item_id)]}):null]}),(0,jsx_runtime.jsx)(src.u,{title:"This is a feature we are experimenting with! We'd love to get your feedback on it and whether this is something useful for working with PostHog.",children:(0,jsx_runtime.jsx)(src.oe,{type:"completion",children:"Experimental"})})]})}),commentsLogicProps?(0,jsx_runtime.jsx)(DiscussionContent,{logicProps:commentsLogicProps}):(0,jsx_runtime.jsxs)("div",{className:"mx-auto p-8 max-w-160 mt-8 space-y-4",children:[(0,jsx_runtime.jsx)("div",{className:"max-w-80 mx-auto",children:(0,jsx_runtime.jsx)(hedgehogs.WarningHog,{className:"w-full h-full"})}),(0,jsx_runtime.jsx)("h2",{children:"Discussions aren't supported here yet..."}),(0,jsx_runtime.jsx)("p",{children:"This a beta feature that is currently only available when viewing things like an Insight, Dashboard or Notebook."})]})]})}},[types.H$.Exports]:{label:"Exports",Icon:()=>{let{freshUndownloadedExports}=(0,index_esm.useValues)(sidePanelExportsLogic);return(0,jsx_runtime.jsx)(icons.Xd,{count:freshUndownloadedExports.length,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconDownload,{})})},Content:()=>(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden flex-1",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:(0,jsx_runtime.jsx)("div",{className:"flex space-x-2",children:(0,jsx_runtime.jsx)("span",{children:"Exports"})})}),(0,jsx_runtime.jsx)("p",{className:"m-4",children:"Retrieve your exports here. Exports are generated asynchronously and may take a few seconds to complete."}),(0,jsx_runtime.jsx)(ExportsContent,{})]})},[types.H$.Status]:{label:"System status",Icon:props=>{let{status,statusPage}=(0,index_esm.useValues)(sidePanelStatusLogic.BE),title=statusPage?.status.description?(0,utils.fm)(statusPage.status.description.toLowerCase()):null;return(0,jsx_runtime.jsx)(src.u,{title:title,placement:"left",children:(0,jsx_runtime.jsx)("span",{...props,children:(0,jsx_runtime.jsx)(icons.T,{content:"operational"!==status?"!":"✓",status:status.includes("outage")?"danger":status.includes("degraded")||status.includes("monitoring")?"warning":"success",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconCloud,{})})})})},Content:()=>{let{closeSidePanel}=(0,index_esm.useActions)(sidePanelLogic.x),[ready,setReady]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(SidePanelPaneHeader,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",sideIcon:(0,jsx_runtime.jsx)(posthog_icons_es.IconExternal,{}),targetBlank:!0,onClick:()=>{window.open(sidePanelStatusLogic.UH,"_blank")?.focus(),closeSidePanel()},children:"Open in new tab"})]}),(0,jsx_runtime.jsxs)("div",{className:"relative flex-1 overflow-hidden",children:[(0,jsx_runtime.jsx)("iframe",{src:sidePanelStatusLogic.UH,title:"Status",className:(0,clsx_m.default)("w-full h-full",!ready&&"hidden"),onLoad:()=>setReady(!0)}),!ready&&(0,jsx_runtime.jsx)(SidePanelDocsSkeleton,{})]})]})},noModalSupport:!0},[types.H$.AccessControl]:{label:"Access control",Icon:posthog_icons_es.IconLock,Content:()=>{let{sceneSidePanelContext}=(0,index_esm.useValues)(sidePanelContextLogic.g);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,jsx_runtime.jsx)(SidePanelPaneHeader,{title:"Access control"}),(0,jsx_runtime.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:sceneSidePanelContext.access_control_resource&&sceneSidePanelContext.access_control_resource_id?(0,jsx_runtime.jsx)(AccessControlObject.m,{resource:sceneSidePanelContext.access_control_resource,resource_id:sceneSidePanelContext.access_control_resource_id}):(0,jsx_runtime.jsx)("p",{children:"Not supported"})})]})}}};function SidePanel_SidePanel(){var _theme$sidebarStyle;let{theme}=(0,index_esm.useValues)(themeLogic.b),{visibleTabs,extraTabs}=(0,index_esm.useValues)(sidePanelLogic.x),{selectedTab,sidePanelOpen,modalMode}=(0,index_esm.useValues)(sidePanelStateLogic.f),{openSidePanel,closeSidePanel,setSidePanelAvailable}=(0,index_esm.useActions)(sidePanelStateLogic.f),activeTab=sidePanelOpen&&selectedTab,PanelConent=activeTab?SIDE_PANEL_TABS[activeTab]?.Content:null,ref=(0,react.useRef)(null),resizerLogicProps={containerRef:ref,logicKey:"side-panel",persistent:!0,closeThreshold:200,placement:"left",onToggleClosed:shouldBeClosed=>{shouldBeClosed?closeSidePanel():selectedTab&&openSidePanel(selectedTab)}},{desiredSize,isResizeInProgress}=(0,index_esm.useValues)((0,resizerLogic.Z)(resizerLogicProps));if((0,react.useEffect)(()=>(setSidePanelAvailable(!0),()=>{setSidePanelAvailable(!1)}),[]),!visibleTabs.length)return null;let sidePanelOpenAndAvailable=selectedTab&&sidePanelOpen&&visibleTabs.includes(selectedTab),menuOptions=extraTabs?[{title:"Open in side panel",items:extraTabs.map(tab=>{let{Icon,label}=SIDE_PANEL_TABS[tab];return{label:label,icon:(0,jsx_runtime.jsx)(Icon,{}),onClick:()=>openSidePanel(tab)}})}]:void 0;if(modalMode){let supportsModal=!activeTab||!SIDE_PANEL_TABS[activeTab]?.noModalSupport;return(0,jsx_runtime.jsx)(src.fQ,{simple:!0,isOpen:!!PanelConent&&supportsModal,onClose:closeSidePanel,hideCloseButton:!0,width:"40rem",children:PanelConent?(0,jsx_runtime.jsx)(PanelConent,{}):null})}return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("SidePanel3000",sidePanelOpenAndAvailable&&"SidePanel3000--open",isResizeInProgress&&"SidePanel3000--resizing"),ref:ref,style:{width:sidePanelOpenAndAvailable?null!=desiredSize?desiredSize:512:void 0,...null!==(_theme$sidebarStyle=theme?.sidebarStyle)&&void 0!==_theme$sidebarStyle?_theme$sidebarStyle:{}},children:[(0,jsx_runtime.jsx)(Resizer.w,{...resizerLogicProps}),(0,jsx_runtime.jsxs)("div",{className:"SidePanel3000__bar",children:[(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__tabs",children:(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__tabs-content",children:visibleTabs.map(tab=>{let{Icon,label}=SIDE_PANEL_TABS[tab];return(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(Icon,{}),onClick:()=>activeTab===tab?closeSidePanel():openSidePanel(tab),"data-attr":`sidepanel-tab-${tab}`,"data-ph-capture-attribute-state-before-click":activeTab===tab?"open":"closed",active:activeTab===tab,type:"secondary",status:"alt",children:label},tab)})})}),menuOptions?(0,jsx_runtime.jsx)("div",{className:"shrink-0 flex items-center m-2",children:(0,jsx_runtime.jsx)(src.d6,{items:menuOptions,children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{})})})}):null]}),(0,jsx_runtime.jsx)(Resizer.w,{...resizerLogicProps,offset:"3rem"}),PanelConent?(0,jsx_runtime.jsx)("div",{className:"SidePanel3000__content",children:(0,jsx_runtime.jsx)(PanelConent,{})}):null]})}},"./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/AccessControlObject.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>AccessControlObject});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),upgradeModalLogic=__webpack_require__("./frontend/src/lib/components/UpgradeModal/upgradeModalLogic.ts"),UserSelectItem=__webpack_require__("./frontend/src/lib/components/UserSelectItem.tsx"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),types=__webpack_require__("./frontend/src/types.ts"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),membersLogic=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),roleBasedAccessControlLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/roleBasedAccessControlLogic.ts");let accessControlLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)(props=>`${props.resource}-${props.resource_id}`),(0,index_esm.path)(key=>["scenes","accessControl","accessControlLogic",key]),(0,index_esm.connect)({values:[membersLogic.m,["sortedMembers"],teamLogic.H,["currentTeam"],roleBasedAccessControlLogic.Q,["roles"],upgradeModalLogic.J,["guardAvailableFeature"]],actions:[membersLogic.m,["ensureAllMembersLoaded"]]}),(0,index_esm.actions)({updateAccessControl:accessControl=>({accessControl}),updateAccessControlDefault:level=>({level}),updateAccessControlRoles:accessControls=>({accessControls}),updateAccessControlMembers:accessControls=>({accessControls})}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{accessControls:[null,{loadAccessControls:async()=>{try{let response=await api.ZP.get(values.endpoint);return response}catch(error){return{access_controls:[],available_access_levels:["none","viewer","editor"],user_access_level:"none",default_access_level:"none",user_can_edit_access_levels:!1}}},updateAccessControlDefault:async _ref2=>{let{level}=_ref2;return await api.ZP.put(values.endpoint,{access_level:level}),values.accessControls},updateAccessControlRoles:async _ref3=>{let{accessControls}=_ref3;for(let{role,level}of accessControls)await api.ZP.put(values.endpoint,{role:role,access_level:level});return values.accessControls},updateAccessControlMembers:async _ref4=>{let{accessControls}=_ref4;for(let{member,level}of accessControls)await api.ZP.put(values.endpoint,{organization_member:member,access_level:level});return values.accessControls}}]}}),(0,index_esm.listeners)(_ref5=>{let{actions}=_ref5;return{updateAccessControlDefaultSuccess:()=>actions.loadAccessControls(),updateAccessControlRolesSuccess:()=>actions.loadAccessControls(),updateAccessControlMembersSuccess:()=>actions.loadAccessControls()}}),(0,index_esm.selectors)({endpoint:[()=>[(_,props)=>props],props=>"project"===props.resource?"api/projects/@current/access_controls":`api/projects/@current/${props.resource}s/${props.resource_id}/access_controls`],humanReadableResource:[()=>[(_,props)=>props],props=>props.resource.replace(/_/g," ")],availableLevelsWithNone:[s=>[s.accessControls],accessControls=>{var _accessControls$avail;return null!==(_accessControls$avail=accessControls?.available_access_levels)&&void 0!==_accessControls$avail?_accessControls$avail:[]}],availableLevels:[s=>[s.availableLevelsWithNone],availableLevelsWithNone=>availableLevelsWithNone.filter(level=>"none"!==level)],canEditAccessControls:[s=>[s.accessControls],accessControls=>{var _accessControls$user_;return null!==(_accessControls$user_=accessControls?.user_can_edit_access_levels)&&void 0!==_accessControls$user_?_accessControls$user_:null}],accessControlDefaultLevel:[s=>[s.accessControls],accessControls=>{var _accessControls$defau;return null!==(_accessControls$defau=accessControls?.default_access_level)&&void 0!==_accessControls$defau?_accessControls$defau:null}],accessControlDefaultOptions:[s=>[s.availableLevelsWithNone,(_,props)=>props.resource],availableLevelsWithNone=>{let options=availableLevelsWithNone.map(level=>({value:level,label:"none"===level?"No access":(0,utils.wR)(level)}));return options}],accessControlDefault:[s=>[s.accessControls,s.accessControlDefaultLevel],(accessControls,accessControlDefaultLevel)=>{let found=accessControls?.access_controls?.find(accessControl=>!accessControl.organization_member&&!accessControl.role);return null!=found?found:{access_level:accessControlDefaultLevel}}],accessControlMembers:[s=>[s.accessControls],accessControls=>(accessControls?.access_controls||[]).filter(accessControl=>!!accessControl.organization_member)],accessControlRoles:[s=>[s.accessControls],accessControls=>(accessControls?.access_controls||[]).filter(accessControl=>!!accessControl.role)],rolesById:[s=>[s.roles],roles=>Object.fromEntries((roles||[]).map(role=>[role.id,role]))],addableRoles:[s=>[s.roles,s.accessControlRoles],(roles,accessControlRoles)=>roles?roles.filter(role=>!accessControlRoles.find(ac=>ac.role===role.id)):[]],membersById:[s=>[s.sortedMembers],members=>Object.fromEntries((members||[]).map(member=>[member.id,member]))],addableMembers:[s=>[s.sortedMembers,s.accessControlMembers],(members,accessControlMembers)=>members?members.filter(member=>!accessControlMembers.find(ac=>ac.organization_member===member.id)):[]]}),(0,index_esm.afterMount)(_ref6=>{let{actions}=_ref6;actions.loadAccessControls(),actions.ensureAllMembersLoaded()})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function AccessControlObject(props){let{canEditAccessControls,humanReadableResource}=(0,index_esm.useValues)(accessControlLogic(props)),suffix=`this ${humanReadableResource}`;return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:accessControlLogic,props:props,children:(0,jsx_runtime.jsxs)("div",{className:"space-y-6",children:[!0===canEditAccessControls?(0,jsx_runtime.jsxs)(src.Vp,{type:"warning",children:[(0,jsx_runtime.jsx)("b",{children:"Permission required"}),(0,jsx_runtime.jsx)("br",{}),"You don't have permission to edit access controls for ",suffix,". You must be the"," ",(0,jsx_runtime.jsx)("i",{children:"creator of it"}),", a ",(0,jsx_runtime.jsx)("i",{children:"Project admin"}),", or an ",(0,jsx_runtime.jsx)("i",{children:"Organization admin"}),"."]}):null,(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("h3",{children:["Default access to ",suffix]}),(0,jsx_runtime.jsx)(AccessControlObjectDefaults,{})]}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.PROJECT_BASED_PERMISSIONING,children:(0,jsx_runtime.jsx)(AccessControlObjectUsers,{})}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.ROLE_BASED_ACCESS,children:(0,jsx_runtime.jsx)(AccessControlObjectRoles,{})})]})})}function AccessControlObjectDefaults(){var _accessControlDefault;let{accessControlDefault,accessControlDefaultOptions,accessControlsLoading,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlDefault}=(0,index_esm.useActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J);return(0,jsx_runtime.jsx)(src.Yv,{placeholder:"Loading...",value:null!==(_accessControlDefault=accessControlDefault?.access_level)&&void 0!==_accessControlDefault?_accessControlDefault:void 0,onChange:newValue=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING,()=>{updateAccessControlDefault(newValue)})},disabledReason:accessControlsLoading?"Loading…":canEditAccessControls?void 0:"You cannot edit this",dropdownMatchSelectWidth:!1,options:accessControlDefaultOptions})}function AccessControlObjectUsers(){let{user}=(0,index_esm.useValues)(userLogic.userLogic),{membersById,addableMembers,accessControlMembers,accessControlsLoading,availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlMembers}=(0,index_esm.useAsyncActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J),[modelOpen,setModelOpen]=(0,react.useState)(!1);if(!user)return null;let member=ac=>membersById[ac.organization_member],columns=[{key:"user",title:"User",render:(_,ac)=>(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(ProfilePicture.Y,{user:member(ac)?.user}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{className:"font-medium mb-0",children:member(ac)?.user.uuid==user.uuid?`${member(ac)?.user.first_name} (you)`:member(ac)?.user.first_name}),(0,jsx_runtime.jsx)("p",{className:"text-muted-alt mb-0",children:member(ac)?.user.email})]})]}),sorter:(a,b)=>member(a)?.user.first_name.localeCompare(member(b)?.user.first_name)},{key:"level",title:"Level",width:0,render:function LevelRender(_,_ref){let{access_level,organization_member}=_ref;return(0,jsx_runtime.jsx)("div",{className:"my-1",children:(0,jsx_runtime.jsx)(SimplLevelComponent,{size:"small",level:access_level,levels:availableLevels,onChange:level=>void updateAccessControlMembers([{member:organization_member,level}])})})}},{key:"remove",width:0,render:(_,_ref2)=>{let{organization_member}=_ref2;return(0,jsx_runtime.jsx)(RemoveAccessButton,{subject:"member",onConfirm:()=>void updateAccessControlMembers([{member:organization_member,level:null}])})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Members"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>setModelOpen(!0),disabledReason:canEditAccessControls?void 0:"You cannot edit this",children:"Add"})]}),(0,jsx_runtime.jsx)(src.g3,{columns:columns,dataSource:accessControlMembers,loading:accessControlsLoading})]}),(0,jsx_runtime.jsx)(AddItemsControlsModal,{modelOpen:modelOpen,setModelOpen:setModelOpen,placeholder:"Search for team members to add…",onAdd:async(newValues,level)=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING)&&(await updateAccessControlMembers(newValues.map(member=>({member,level}))),setModelOpen(!1))},options:addableMembers.map(member=>({key:member.id,label:`${member.user.first_name} ${member.user.email}`,labelComponent:(0,jsx_runtime.jsx)(UserSelectItem.l,{user:member.user})}))})]})}function AccessControlObjectRoles(){let{accessControlRoles,accessControlsLoading,addableRoles,rolesById,availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),{updateAccessControlRoles}=(0,index_esm.useAsyncActions)(accessControlLogic),{guardAvailableFeature}=(0,index_esm.useValues)(upgradeModalLogic.J),[modelOpen,setModelOpen]=(0,react.useState)(!1),columns=[{title:"Role",key:"role",width:0,render:(_,_ref3)=>{let{role}=_ref3;return(0,jsx_runtime.jsx)("span",{className:"whitespace-nowrap",children:(0,jsx_runtime.jsx)(LemonTableLink.i,{to:urls.j.settings("organization-roles")+`#role=${role}`,title:rolesById[role]?.name})})}},{title:"Members",key:"members",render:(_,_ref4)=>{var _rolesById$role$membe;let{role}=_ref4;return(0,jsx_runtime.jsx)(ProfilePicture.r,{people:null!==(_rolesById$role$membe=rolesById[role]?.members?.map(member=>({email:member.user.email,name:member.user.first_name,title:`${member.user.first_name} <${member.user.email}>`})))&&void 0!==_rolesById$role$membe?_rolesById$role$membe:[]})}},{title:"Level",key:"level",width:0,render:(_,_ref5)=>{let{access_level,role}=_ref5;return(0,jsx_runtime.jsx)("div",{className:"my-1",children:(0,jsx_runtime.jsx)(SimplLevelComponent,{size:"small",level:access_level,levels:availableLevels,onChange:level=>void updateAccessControlRoles([{role,level}])})})}},{key:"remove",width:0,render:(_,_ref6)=>{let{role}=_ref6;return(0,jsx_runtime.jsx)(RemoveAccessButton,{subject:"role",onConfirm:()=>void updateAccessControlRoles([{role,level:null}])})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center justify-between",children:[(0,jsx_runtime.jsx)("h3",{className:"mb-0",children:"Roles"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>setModelOpen(!0),disabledReason:canEditAccessControls?void 0:"You cannot edit this",children:"Add"})]}),(0,jsx_runtime.jsx)(src.g3,{columns:columns,dataSource:accessControlRoles,loading:accessControlsLoading})]}),(0,jsx_runtime.jsx)(AddItemsControlsModal,{modelOpen:modelOpen,setModelOpen:setModelOpen,placeholder:"Search for roles to add…",onAdd:async(newValues,level)=>{guardAvailableFeature(types.P$.PROJECT_BASED_PERMISSIONING)&&(await updateAccessControlRoles(newValues.map(role=>({role,level}))),setModelOpen(!1))},options:addableRoles.map(role=>({key:role.id,label:role.name}))})]})}function SimplLevelComponent(props){let{canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic);return(0,jsx_runtime.jsx)(src.Yv,{size:props.size,placeholder:"Select level...",value:props.level,onChange:newValue=>props.onChange(newValue),disabledReason:canEditAccessControls?void 0:"You cannot edit this",options:props.levels.map(level=>({value:level,label:(0,utils.fm)(null!=level?level:"")}))})}function RemoveAccessButton(_ref7){let{onConfirm,subject}=_ref7,{canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic);return(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),size:"small",disabledReason:canEditAccessControls?void 0:"You cannot edit this",onClick:()=>src.dn.open({title:"Remove access",content:`Are you sure you want to remove this ${subject}'s explicit access?`,primaryButton:{children:"Remove",status:"danger",onClick:()=>onConfirm()}})})}function AddItemsControlsModal(props){var _availableLevels$;let{availableLevels,canEditAccessControls}=(0,index_esm.useValues)(accessControlLogic),[items,setItems]=(0,react.useState)([]),[level,setLevel]=(0,react.useState)(null!==(_availableLevels$=availableLevels[0])&&void 0!==_availableLevels$?_availableLevels$:null);(0,react.useEffect)(()=>{var _availableLevels$2;setLevel(null!==(_availableLevels$2=availableLevels[0])&&void 0!==_availableLevels$2?_availableLevels$2:null)},[availableLevels]);let onSubmit=items.length&&level?()=>void props.onAdd(items,level).then(()=>{var _availableLevels$3;setItems([]),setLevel(null!==(_availableLevels$3=availableLevels[0])&&void 0!==_availableLevels$3?_availableLevels$3:null)}):void 0;return(0,jsx_runtime.jsx)(src.fQ,{isOpen:props.modelOpen||!1,onClose:()=>props.setModelOpen(!1),title:"Add access",maxWidth:"30rem",description:"Allow other users or roles to access this resource",footer:(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>props.setModelOpen(!1),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:onSubmit,disabledReason:canEditAccessControls?onSubmit?void 0:"Please choose what you want to add and at what level":"You cannot edit this",children:"Add"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center w-full",children:[(0,jsx_runtime.jsx)("div",{className:"min-w-[16rem] w-full",children:(0,jsx_runtime.jsx)(src.nt,{placeholder:props.placeholder,value:items,onChange:newValues=>setItems(newValues),mode:"multiple",options:props.options,disabled:!canEditAccessControls})}),(0,jsx_runtime.jsx)(SimplLevelComponent,{levels:availableLevels,level:level,onChange:setLevel})]})})}},"./frontend/src/layout/navigation-3000/sidepanel/panels/access_control/roleBasedAccessControlLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>roleBasedAccessControlLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");let roleBasedAccessControlLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","accessControl","roleBasedAccessControlLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__.m,["sortedMembers"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_7__.H,["currentTeam"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["hasAvailableFeature"]],actions:[scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__.m,["ensureAllMembersLoaded"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({updateRoleBasedAccessControls:accessControls=>({accessControls}),selectRoleId:roleId=>({roleId}),deleteRole:roleId=>({roleId}),removeMemberFromRole:(role,roleMemberId)=>({role,roleMemberId}),addMembersToRole:(role,members)=>({role,members}),setEditingRoleId:roleId=>({roleId})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({selectedRoleId:[null,{selectRoleId:(_,_ref)=>{let{roleId}=_ref;return roleId}}],editingRoleId:[null,{setEditingRoleId:(_,_ref2)=>{let{roleId}=_ref2;return roleId}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(_ref3=>{let{values}=_ref3;return{roleBasedAccessControls:[null,{loadRoleBasedAccessControls:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.get("api/projects/@current/global_access_controls");return response},updateRoleBasedAccessControls:async _ref4=>{let{accessControls}=_ref4;for(let control of accessControls)await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.put("api/projects/@current/global_access_controls",{...control});return values.roleBasedAccessControls}}],roles:[null,{loadRoles:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.list();return response?.results||[]},addMembersToRole:async _ref5=>{let{role,members}=_ref5;if(!values.roles)return null;let newMembers=await Promise.all(members.map(async userUuid=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.members.create(role.id,userUuid)));return role.members=[...role.members,...newMembers],[...values.roles]},removeMemberFromRole:async _ref6=>{let{role,roleMemberId}=_ref6;return values.roles?(await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.members.delete(role.id,roleMemberId),role.members=role.members.filter(roleMember=>roleMember.id!==roleMemberId),[...values.roles]):null},deleteRole:async _ref7=>{let{roleId}=_ref7,role=values.roles?.find(r=>r.id===roleId);return role?(await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.delete(role.id),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`Role "${role.name}" deleted`),values.roles?.filter(r=>r.id!==role.id)||[]):values.roles}}]}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref8=>{let{values,actions}=_ref8;return{editingRole:{defaults:{name:""},errors:_ref9=>{let{name}=_ref9;return{name:name?null:"Please choose a name for the role"}},submit:async _ref10=>{let{name}=_ref10;if(!values.editingRoleId)return;let role=null;role="new"===values.editingRoleId?await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.create(name):await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.roles.update(values.editingRoleId,{name}),actions.loadRoles(),actions.setEditingRoleId(null),actions.selectRoleId(role.id)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref11=>{let{actions,values}=_ref11;return{updateRoleBasedAccessControlsSuccess:()=>actions.loadRoleBasedAccessControls(),loadRolesSuccess:()=>{kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.hashParams.role&&actions.selectRoleId(kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.hashParams.role)},deleteRoleSuccess:()=>{actions.loadRoles(),actions.setEditingRoleId(null),actions.selectRoleId(null)},setEditingRoleId:()=>{let existingRole=values.roles?.find(role=>role.id===values.editingRoleId);actions.resetEditingRole({name:existingRole?.name||""})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({availableLevels:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr;return null!==(_roleBasedAccessContr=roleBasedAccessControls?.available_access_levels)&&void 0!==_roleBasedAccessContr?_roleBasedAccessContr:[]}],defaultAccessLevel:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr2;return null!==(_roleBasedAccessContr2=roleBasedAccessControls?.default_access_level)&&void 0!==_roleBasedAccessContr2?_roleBasedAccessContr2:null}],defaultResourceAccessControls:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr3;let accessControls=null!==(_roleBasedAccessContr3=roleBasedAccessControls?.access_controls)&&void 0!==_roleBasedAccessContr3?_roleBasedAccessContr3:[],accessControlByResource=accessControls.filter(control=>!control.role).reduce((acc,control)=>({...acc,[control.resource]:control}),{});return{accessControlByResource}}],rolesWithResourceAccessControls:[s=>[s.roles,s.roleBasedAccessControls,s.defaultResourceAccessControls],(roles,roleBasedAccessControls,defaultResourceAccessControls)=>{var _roleBasedAccessContr4;if(!roles)return[];let accessControls=null!==(_roleBasedAccessContr4=roleBasedAccessControls?.access_controls)&&void 0!==_roleBasedAccessContr4?_roleBasedAccessContr4:[];return[defaultResourceAccessControls,...roles.map(role=>{let accessControlByResource=accessControls.filter(control=>control.role===role.id).reduce((acc,control)=>({...acc,[control.resource]:control}),{});return{role,accessControlByResource}})]}],resources:[()=>[],()=>["feature_flag","dashboard","insight","notebook"]],canEditRoleBasedAccessControls:[s=>[s.roleBasedAccessControls],roleBasedAccessControls=>{var _roleBasedAccessContr5;return null!==(_roleBasedAccessContr5=roleBasedAccessControls?.user_can_edit_access_levels)&&void 0!==_roleBasedAccessContr5?_roleBasedAccessContr5:null}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref12=>{let{actions,values}=_ref12;values.hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.ROLE_BASED_ACCESS)&&(actions.loadRoles(),actions.loadRoleBasedAccessControls(),actions.ensureAllMembersLoaded())}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.actionToUrl)(_ref13=>{let{values}=_ref13;return{selectRoleId:()=>{var _values$selectedRoleI;let{currentLocation}=kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values;return[currentLocation.pathname,currentLocation.searchParams,{...currentLocation.hashParams,role:null!==(_values$selectedRoleI=values.selectedRoleId)&&void 0!==_values$selectedRoleI?_values$selectedRoleI:void 0}]}}})])},"./frontend/src/layout/navigation-3000/sidepanel/panels/activation/activationLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>activationLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),utils=__webpack_require__("./frontend/src/queries/utils.ts");let reverseProxyCheckerLogic=(0,index_esm.kea)([(0,index_esm.path)(["components","ReverseProxyChecker","reverseProxyCheckerLogic"]),(0,lib.loaders)({hasReverseProxy:[!1,{loadHasReverseProxy:async()=>{let query={kind:schema.OH.HogQLQuery,query:(0,utils.zP)`SELECT properties.$lib_custom_api_host AS lib_custom_api_host FROM events WHERE timestamp >= now() - INTERVAL 1 DAY AND timestamp <= now() @@ -45,7 +45,7 @@ Billing admin: http://go/billing/${currentOrganization.id}`:""}(organizationLogi ORDER BY latest_timestamp DESC limit 10`},res=await api.ZP.query(query,void 0,void 0,!0);return null!==(_res$results$map$filt=res.results?.map(x=>{let version=semver.Jt(x[0]);return version?{version,timestamp:x[1]}:null}).filter(utils.DX))&&void 0!==_res$results$map$filt?_res$results$map$filt:null}}]}}),(0,index_esm.reducers)({lastCheckTimestamp:[0,{persist:!0},{loadUsedVersionsSuccess:()=>Date.now()}],versionWarning:[null,{persist:!0,prefix:"2024-02-12"},{setVersionWarning:(_,_ref3)=>{let{versionWarning}=_ref3;return versionWarning}}]}),(0,index_esm.sharedListeners)(_ref4=>{let{values,actions}=_ref4;return{checkForVersionWarning:()=>{if(!values.usedVersions?.length)return;let{deprecation,sdkVersions}=values.availableVersions,latestUsedVersion=(0,semver.ej)(values.usedVersions.map(v=>v.version)),latestAvailableVersion=sdkVersions?.[0],deprecateBeforeVersion=deprecation?.deprecateBeforeVersion?(0,semver.wy)(deprecation.deprecateBeforeVersion):null,warning=null;if(deprecateBeforeVersion){let diff=(0,semver.I4)(deprecateBeforeVersion,latestUsedVersion);diff&&diff.diff>0&&(warning={latestUsedVersion:(0,semver.L$)(latestUsedVersion),latestAvailableVersion:(0,semver.L$)(latestAvailableVersion||deprecateBeforeVersion),level:"error"})}if(!warning&&sdkVersions&&latestAvailableVersion){let diff=(0,semver.I4)(latestAvailableVersion,latestUsedVersion);if(diff&&diff.diff>0){let level,numVersionsBehind=sdkVersions.findIndex(v=>(0,semver.FL)(v,latestUsedVersion));-1===numVersionsBehind&&(numVersionsBehind=sdkVersions.length-1),numVersionsBehind=40?"warning":void 0),void 0===level&&numVersionsBehind>=50&&(level="error"),level&&(0,semver.L$)(latestUsedVersion).trim().length&&(warning={latestUsedVersion:(0,semver.L$)(latestUsedVersion),latestAvailableVersion:(0,semver.L$)(latestAvailableVersion),level,numVersionsBehind})}}actions.setVersionWarning(warning)}}}),(0,index_esm.listeners)(_ref5=>{let{sharedListeners}=_ref5;return{loadAvailableVersionsSuccess:sharedListeners.checkForVersionWarning,loadUsedVersionsSuccess:sharedListeners.checkForVersionWarning}}),(0,index_esm.afterMount)(_ref6=>{let{actions,values}=_ref6;values.lastCheckTimestamp{"use strict";__webpack_require__.d(__webpack_exports__,{Ke:()=>VerticalNestedDND});var _dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@dnd-kit/core/dist/core.esm.js"),_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/@dnd-kit+sortable@7.0.2_@dnd-kit+core@6.0.8_react@18.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.js"),_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/@dnd-kit+utilities@3.2.1_react@18.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js"),_posthog_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lodash_debounce__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/lodash.debounce@4.0.8/node_modules/lodash.debounce/index.js"),lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_6__),lodash_isequal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js"),lodash_isequal__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(lodash_isequal__WEBPACK_IMPORTED_MODULE_7__),react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_dom__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NOOP=()=>{};function VerticalNestedDND(_ref){let{initialItems,renderContainerItem,renderChildItem,createNewChildItem,createNewContainerItem,renderAddChildItem,renderAddContainerItem,renderAdditionalControls,onChange}=_ref,[items,setItems]=(0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(()=>{let items={};return initialItems.forEach(item=>{items[item.id]=item}),items}),[clonedItems,setClonedItems]=(0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(null),[containers,setContainers]=(0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(Object.keys(items)),[activeId,setActiveId]=(0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(null),lastOverId=(0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(null),recentlyMovedToNewContainer=(0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(!1),sensors=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.Dy)((0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.VT)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.MA),(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.VT)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.LO)),isSortingContainer=!!activeId&&containers.includes(activeId),debouncedOnChanged=(0,react__WEBPACK_IMPORTED_MODULE_8__.useMemo)(()=>onChange?lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default()(onChange,200,{trailing:!0}):void 0,[onChange]),savedChanges=(0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(initialItems);(0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(()=>{let newItemsArray=containers.map(containerId=>items[containerId]);lodash_isequal__WEBPACK_IMPORTED_MODULE_7___default()(newItemsArray,savedChanges.current)||(savedChanges.current=newItemsArray,debouncedOnChanged?.(newItemsArray))},[containers,items,debouncedOnChanged]);let collisionDetectionStrategy=(0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(args=>{if(activeId&&activeId in items)return(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.pE)({...args,droppableContainers:args.droppableContainers.filter(container=>container.id in items)});let pointerIntersections=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.j2)(args),intersections=pointerIntersections.length>0?pointerIntersections:(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.Xo)(args),overId=(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__._8)(intersections,"id");if(null!=overId){if(overId in items){let containerItems=items[overId].items;containerItems&&containerItems.length>0&&(overId=_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.pE({...args,droppableContainers:args.droppableContainers.filter(container=>container.id!==overId&&containerItems.some(ChildItem=>ChildItem.id===container.id))})[0]?.id)}return lastOverId.current=overId,[{id:overId}]}return recentlyMovedToNewContainer.current&&(lastOverId.current=activeId),lastOverId.current?[{id:lastOverId.current}]:[]},[activeId,items]),findContainer=id=>id in items?id:Object.keys(items).find(key=>items[key].items?.some(item=>item.id===id)),findChildItem=id=>{for(let containerId in items){let item=items[containerId].items?.find(item=>item.id===id);if(item)return item}},getIndex=id=>{let container=findContainer(id);if(!container)return -1;let childItems=items[container].items;return childItems?childItems.findIndex(ChildItem=>ChildItem.id===id):-1};return(0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(()=>{requestAnimationFrame(()=>{recentlyMovedToNewContainer.current=!1})},[items]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.LB,{sensors:sensors,collisionDetection:collisionDetectionStrategy,measuring:{droppable:{strategy:_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.uN.Always}},onDragStart:_ref2=>{let{active}=_ref2;setActiveId(active.id),setClonedItems(items)},onDragOver:_ref3=>{let{active,over}=_ref3,overId=over?.id,activeIsContainer=active.id in items;if(null!=overId){if(activeIsContainer){let overContainerId=findContainer(overId);if(!overContainerId)return;activeId!==overContainerId&&setContainers(containers=>{let activeIndex=containers.indexOf(active.id),overIndex=containers.indexOf(overContainerId);return(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Rp)(containers,activeIndex,overIndex)})}else{let overContainerId=findContainer(overId),activeContainerId=findContainer(active.id);if(!overContainerId||!activeContainerId)return;let activeContainer=items[activeContainerId],overContainer=items[overContainerId];activeContainerId!==overContainerId?setItems(items=>{let newIndex;let activeItems=items[activeContainerId].items||[],overItems=items[overContainerId].items||[],overIndex=overItems.findIndex(ChildItem=>ChildItem.id===overId),activeIndex=activeItems.findIndex(ChildItem=>ChildItem.id===active.id);if(overId in items)newIndex=overItems.length+1;else{let isBelowOverItem=over&&active.rect.current.translated&&active.rect.current.translated.top>over.rect.top+over.rect.height;newIndex=overIndex>=0?overIndex+(isBelowOverItem?1:0):overItems.length+1}recentlyMovedToNewContainer.current=!0;let newActiveContainer={...activeContainer,items:activeItems.filter(item=>item.id!==active.id)},newOverContainer={...overContainer,items:[...overItems.slice(0,newIndex),activeItems[activeIndex],...overItems.slice(newIndex,overItems.length)]};return{...items,[activeContainerId]:newActiveContainer,[overContainerId]:newOverContainer}}):overId!==active.id&&setItems(items=>{let overItems=items[overContainerId].items||[],overIndex=overItems.findIndex(ChildItem=>ChildItem.id===overId),activeIndex=overItems.findIndex(ChildItem=>ChildItem.id===active.id),isBelowOverItem=over&&active.rect.current.translated&&active.rect.current.translated.top>over.rect.top+over.rect.height,newItems=(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Rp)(overItems,activeIndex,overIndex+(isBelowOverItem?1:0)),newOverContainer={...overContainer,items:newItems};return{...items,[overContainerId]:newOverContainer}})}}},onDragEnd:_ref4=>{let{active,over}=_ref4;active.id in items&&over?.id&&setContainers(containers=>{let activeIndex=containers.indexOf(active.id),overIndex=containers.indexOf(over.id);return(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Rp)(containers,activeIndex,overIndex)});let activeContainerId=findContainer(active.id);if(!activeContainerId){setActiveId(null);return}let overId=over?.id;if(null==overId){setActiveId(null);return}let overContainerId=findContainer(overId);if(overContainerId){let overItems=items[overContainerId].items||[],activeItems=items[activeContainerId].items||[],activeIndex=activeItems.findIndex(ChildItem=>ChildItem.id===active.id),overIndex=overItems.findIndex(ChildItem=>ChildItem.id===overId);activeIndex!==overIndex&&setItems(items=>{let overItems=items[overContainerId].items||[],newOverContainer={...items[overContainerId],items:(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Rp)(overItems,activeIndex,overIndex)};return{...items,[overContainerId]:newOverContainer}})}setActiveId(null)},onDragCancel:()=>{clonedItems&&setItems(clonedItems),setActiveId(null),setClonedItems(null)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"space-y-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Fo,{items:containers,strategy:_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.qw,children:containers.map(containerId=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(DroppableContainer,{items:items[containerId].items||[],onRemove:()=>{setContainers(containers=>containers.filter(id=>id!==containerId))},renderContainerItem:renderContainerItem,containerItemId:containerId,item:items[containerId],onAddChild:handleAddChildItem,updateContainerItem:updateContainerItem,renderAddChildItem:renderAddChildItem,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.Fo,{items:items[containerId].items||[],strategy:_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.qw,children:(items[containerId].items||[]).map((value,index)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(SortableItem,{disabled:isSortingContainer,id:value.id,index:index,handle:!0,containerId:containerId,getIndex:getIndex,renderChildItem:renderChildItem,updateChildItem:updateChildItem,onRemove:handleRemoveChild,item:value},value.id))})},containerId))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"px-[calc(1.5rem+1px)] flex flex-row justify-end space-x-2",children:[renderAddContainerItem?renderAddContainerItem({onAddContainer:handleAddContainerItem}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{onClick:handleAddContainerItem,fullWidth:!1,type:"primary",children:"Add container"}),renderAdditionalControls?renderAdditionalControls():null]})]}),(0,react_dom__WEBPACK_IMPORTED_MODULE_9__.createPortal)((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.y9,{dropAnimation:dropAnimation,children:activeId?containers.includes(activeId)?function(containerId){let item=items[containerId];return item?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Container,{containerItemId:containerId,renderContainerItem:renderContainerItem,item:item,onAddChild:NOOP,updateContainerItem:NOOP,children:(items[containerId].items||[]).map(item=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(ChildItem,{childItemId:item.id,renderChildItem:renderChildItem,item:item,updateChildItem:NOOP,onRemove:NOOP},item.id))}):null}(activeId):function(id){let item=findChildItem(id);return item?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(ChildItem,{childItemId:id,dragOverlay:!0,renderChildItem:renderChildItem,item:item,updateChildItem:NOOP,onRemove:NOOP}):null}(activeId):null}),document.body)]});function handleRemoveChild(childId){setItems(items=>{let containerId=findContainer(childId);if(!containerId)return items;let container=items[containerId];return{...items,[containerId]:{...container,items:container.items?.filter(item=>item.id!==childId)}}})}function handleAddContainerItem(){let newItem=createNewContainerItem();(0,react_dom__WEBPACK_IMPORTED_MODULE_9__.unstable_batchedUpdates)(()=>{setContainers(containers=>[...containers,newItem.id]),setItems(items=>({...items,[newItem.id]:newItem}))})}function handleAddChildItem(containerId){let newChild=createNewChildItem();setItems(items=>{let container=items[containerId];return{...items,[containerId]:{...container,items:[...container.items||[],newChild]}}})}function updateContainerItem(item){setItems(items=>({...items,[item.id]:item}))}function updateChildItem(item){let containerId=findContainer(item.id);containerId&&setItems(items=>{let container=items[containerId];return{...items,[containerId]:{...container,items:(container.items||[]).map(childItem=>childItem.id===item.id?item:childItem)}}})}}let dropAnimation={sideEffects:(0,_dnd_kit_core__WEBPACK_IMPORTED_MODULE_0__.Ai)({styles:{active:{opacity:"0.4"}}})},animateLayoutChanges=args=>(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.cP)({...args,wasDragging:!0});function SortableItem(_ref5){let{disabled,id,index,handle,renderChildItem,updateChildItem,onRemove,item}=_ref5,{setNodeRef,setActivatorNodeRef,listeners,isDragging,isSorting,transform,transition}=(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.nB)({id}),mounted=function(){let[isMounted,setIsMounted]=(0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(()=>{let timeout=setTimeout(()=>setIsMounted(!0),500);return()=>clearTimeout(timeout)},[]),isMounted}();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(ChildItem,{ref:disabled?void 0:setNodeRef,childItemId:id,isDragging:isDragging,sorting:isSorting,handleProps:handle?{ref:setActivatorNodeRef}:void 0,index:index,transition:transition,transform:transform,fadeIn:isDragging&&!mounted,listeners:listeners,renderChildItem:renderChildItem,updateChildItem:updateChildItem,onRemove:onRemove,item:item})}function DroppableContainer(_ref6){let{children,disabled,items,style,containerItemId,...props}=_ref6,{attributes,isDragging,listeners,setNodeRef,transition,transform}=(0,_dnd_kit_sortable__WEBPACK_IMPORTED_MODULE_1__.nB)({id:containerItemId,data:{type:"container",children:items},animateLayoutChanges});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Container,{ref:disabled?void 0:setNodeRef,isDragging:isDragging,transform:_dnd_kit_utilities__WEBPACK_IMPORTED_MODULE_2__.ux.Translate.toString(transform),transition:transition,handleProps:{...attributes,...listeners},containerItemId:containerItemId,...props,children:children})}let Container=(0,react__WEBPACK_IMPORTED_MODULE_8__.forwardRef)(function Container_(_ref7,ref){let{children,handleProps,onClick,onRemove,onAddChild,containerItemId,placeholder,style,isDragging,transform,transition,renderContainerItem,updateContainerItem,item,renderAddChildItem,...props}=_ref7;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(onClick?"button":"div",{...props,className:`flex flex-col p-4 bg-bg-light border rounded overflow-hidden space-y-2 ${isDragging?"opacity-40":""}`,style:{transform,transition},ref:ref,onClick:onClick,tabIndex:onClick?0:void 0,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-row justify-between px-2 space-x-2 items-start",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Handle,{...handleProps}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{className:"flex-1 self-stretch",children:renderContainerItem?renderContainerItem(item,{updateContainerItem}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{className:"h-full flex flex-row items-center",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{children:["Container ",containerItemId]})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Remove,{onClick:onRemove})]}),placeholder?children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("ul",{className:"space-y-2",children:children}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{className:"flex flex-row justify-end px-2 mb-2 space-x-2",children:renderAddChildItem?renderAddChildItem(item,{onAddChild}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{onClick:onRemove?()=>onAddChild(item.id):void 0,fullWidth:!1,type:"secondary",children:"Add child"})})]})}),ChildItem=react__WEBPACK_IMPORTED_MODULE_8__.memo(react__WEBPACK_IMPORTED_MODULE_8__.forwardRef(function ChildItem_(_ref8,ref){let{color,dragOverlay,isDragging,disabled,fadeIn,handleProps,height,index,listeners,onRemove,sorting,style,transition,transform,childItemId,wrapperStyle,renderChildItem,updateChildItem,item,...props}=_ref8;return(0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(()=>{if(dragOverlay)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[dragOverlay]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("li",{ref:ref,className:`flex p-[calc(0.5rem-1px)] bg-bg-light border rounded overflow-hidden ${isDragging?"opacity-40":""}`,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{"data-cypress":"draggable-item",...props,tabIndex:void 0,className:"flex flex-row justify-between w-full space-x-2 items-start",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Handle,{...handleProps,...listeners}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{className:"flex-1 self-stretch",children:renderChildItem?renderChildItem(item,{updateChildItem}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{className:"h-full flex flex-row items-center",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{children:["Item ",childItemId]})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Remove,{onClick:()=>onRemove(item.id)})]})})}));function Remove(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"secondary",fullWidth:!1,status:"danger",size:"small",...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_3__.IconTrash,{})})}let Handle=(0,react__WEBPACK_IMPORTED_MODULE_8__.forwardRef)(function Handle_(props,ref){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"tertiary",fullWidth:!1,ref:ref,size:"small",...props,className:"self-start",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_4__.rU,{})})})})},"./frontend/src/lib/components/ViewRecordingButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>ViewRecordingButton,k:()=>mightHaveRecording});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),scenes_session_recordings_player_modal_sessionPlayerModalLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ViewRecordingButton(_ref){let{sessionId,timestamp,inModal=!1,...props}=_ref,{openSessionPlayer}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_session_recordings_player_modal_sessionPlayerModalLogic__WEBPACK_IMPORTED_MODULE_4__.A);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{to:inModal?void 0:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.replaySingle(sessionId),onClick:inModal?()=>{let fiveSecondsBeforeEvent=timestamp?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(timestamp).valueOf()-5e3:0;openSessionPlayer({id:sessionId},Math.max(fiveSecondsBeforeEvent,0))}:void 0,sideIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.Ud,{}),...props,children:"View recording"})}let mightHaveRecording=properties=>!!properties.$session_id&&(!properties.$recording_status||"active"===properties.$recording_status)},"./frontend/src/lib/components/VisibilitySensor/VisibilitySensor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>VisibilitySensor});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_visibilitySensorLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/VisibilitySensor/visibilitySensorLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function VisibilitySensor(_ref){let{id,offset,children}=_ref,{scrolling}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)((0,_visibilitySensorLogic__WEBPACK_IMPORTED_MODULE_2__.l)({id,offset})),ref=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{let element=ref.current;return document.addEventListener("scroll",()=>element&&scrolling(element)),()=>document.removeEventListener("scroll",()=>element&&scrolling(element))},[ref.current]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{ref:ref,children:children})}},"./frontend/src/lib/components/VisibilitySensor/visibilitySensorLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>visibilitySensorLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_window_values__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-window-values@3.0.0_kea@3.1.5/node_modules/kea-window-values/lib/index.js");let visibilitySensorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.id||"undefined"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["lib","components","VisibilitySensor","visibilitySensorLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({setVisible:visible=>({visible}),scrolling:element=>({element})})),(0,kea_window_values__WEBPACK_IMPORTED_MODULE_1__.windowValues)({innerHeight:window1=>window1.innerHeight}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({visible:[!1,{setVisible:(_,_ref)=>{let{visible}=_ref;return visible}}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({checkIsVisible:[selectors=>[selectors.innerHeight,(_,props)=>props.offset||0],(windowHeight,offset)=>element=>{if(!element)return!1;let{top,bottom,left,right}=element.getBoundingClientRect();return(0!==top||0!==bottom||0!==left||0!==right)&&top+offset>=0&&top+offset<=windowHeight}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{actions,values}=_ref2;return{scrolling:async(_ref3,breakpoint)=>{let{element}=_ref3;await breakpoint(500),values.checkIsVisible(element)&&!values.visible?actions.setVisible(!0):!values.checkIsVisible(element)&&values.visible&&actions.setVisible(!1)}}})])},"./frontend/src/lib/components/hedgehogs.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BlushingHog:()=>BlushingHog,BuilderHog1:()=>BuilderHog1,BuilderHog2:()=>BuilderHog2,BuilderHog3:()=>BuilderHog3,BurningMoneyHog:()=>BurningMoneyHog,DetectiveHog:()=>DetectiveHog,ExperimentsHog:()=>ExperimentsHog,ExplorerHog:()=>ExplorerHog,FeatureFlagHog:()=>FeatureFlagHog,HeartHog:()=>HeartHog,HospitalHog:()=>HospitalHog,LaptopHog1:()=>LaptopHog1,LaptopHog2:()=>LaptopHog2,LaptopHog3:()=>LaptopHog3,LaptopHog4:()=>LaptopHog4,LaptopHogEU:()=>LaptopHogEU,ListHog:()=>ListHog,MailHog:()=>MailHog,MicrophoneHog:()=>MicrophoneHog,PhonePairHogs:()=>PhonePairHogs,PoliceHog:()=>PoliceHog,ProfessorHog:()=>ProfessorHog,ReadingHog:()=>ReadingHog,RunningHog:()=>RunningHog,SleepingHog:()=>SleepingHog,SpaceHog:()=>SpaceHog,StarHog:()=>StarHog,SupportHeroHog:()=>SupportHeroHog,SurprisedHog:()=>SurprisedHog,TronHog:()=>TronHog,WarningHog:()=>WarningHog,WavingHog:()=>WavingHog,XRayHog:()=>XRayHog,XRayHog2:()=>XRayHog2});let blushing_hog=__webpack_require__.p+"images/blushing-hog.0876cb98f41ca33573dd2e49442c1c49.png",builder_hog_01=__webpack_require__.p+"images/builder-hog-01.766c7b6e8d5a92b69cc0056148925ac0.png",builder_hog_02=__webpack_require__.p+"images/builder-hog-02.a16905a9833be2cfd5afbeae9b544d6e.png",builder_hog_03=__webpack_require__.p+"images/builder-hog-03.522c8e5c040475919d5560d1f03362c3.png",burning_money_hog=__webpack_require__.p+"images/burning-money-hog.10d0813fc8b15518845330b3fd2c57ed.png",detective_hog=__webpack_require__.p+"images/detective-hog.7a946d75173eef634281325df22643a0.png",experiments_hog=__webpack_require__.p+"images/experiments-hog.5fa9e682d08f33d21d13baf420923e63.png",explorer_hog=__webpack_require__.p+"images/explorer-hog.036c3eb47eea1d96745344aa2018ea9d.png",feature_flag_hog=__webpack_require__.p+"images/feature-flag-hog.e241fc87b7978f1e5289e3155c11f9ea.png",heart_hog=__webpack_require__.p+"images/heart-hog.15dfb372a35e97c2402dc16f393cf4f3.png",hospital_hog=__webpack_require__.p+"images/hospital-hog.13209c660b6efa571a1cf574c9d393bc.png",laptop_hog_01=__webpack_require__.p+"images/laptop-hog-01.a9a3ac91cf34b3e68d9f0e3899daa1a5.png",laptop_hog_02=__webpack_require__.p+"images/laptop-hog-02.2b5bb68b8b12ed70127d393bf6d0c1af.png",laptop_hog_03=__webpack_require__.p+"images/laptop-hog-03.d33906e8d13c20f570ebde346e1c984c.png",laptop_hog_04=__webpack_require__.p+"images/laptop-hog-04.d8925f980d186e2e2c7530ae86bb020e.png",laptop_hog_eu=__webpack_require__.p+"images/laptop-hog-eu.079158dc66a96b76903dd9fc0468537d.png",list_hog=__webpack_require__.p+"images/list-hog.477e527ac4278f7a748394917ee10e9d.png",mail_hog=__webpack_require__.p+"images/mail-hog.5ffaf8c00539659f0c29d11b1c780da8.png",microphone_hog=__webpack_require__.p+"images/microphone-hog.57079f3eef91e6d8ce887f7be2423a47.png",phone_pair_hogs=__webpack_require__.p+"images/phone-pair-hogs.463e262739388bdd7813fecd77f799e2.png",police_hog=__webpack_require__.p+"images/police-hog.233cc2a1d6acb3d2ba829c979e6bb336.png",professor_hog=__webpack_require__.p+"images/professor-hog.ef0ed7f579b539f48365298b4675877b.png",reading_hog=__webpack_require__.p+"images/reading-hog.2a876ff7fffcb6bd1575e71719790e34.png";var running_hog=__webpack_require__("./frontend/public/hedgehog/running-hog.png");let sleeping_hog=__webpack_require__.p+"images/sleeping-hog.0ba63f3297128593e106e1d4fc51571c.png",space_hog=__webpack_require__.p+"images/space-hog.cb78f4892cdfeab1b9018a354ab9fa54.png",star_hog=__webpack_require__.p+"images/star-hog.006a14fa5871d90cba88ecd05be8b1a4.png",support_hero_hog=__webpack_require__.p+"images/support-hero-hog.63f0366bb835e5fd76a4edcf57848cac.png",surprised_hog=__webpack_require__.p+"images/surprised-hog.a169f5d9ad9478ecd544fbfeaf09c846.png",tron_hog=__webpack_require__.p+"images/tron-hog.a9223b75cb2e660342d8f4377a447443.png",warning_hog=__webpack_require__.p+"images/warning-hog.959a62005b13ede3d1cc3cdd9c17c380.png",waving_hog=__webpack_require__.p+"images/waving-hog.f6d2c4fdb7481c4ed0d7c77780f4c825.png",x_ray_hog=__webpack_require__.p+"images/x-ray-hog.61c0457f02f3d5de9b380c27931184bb.png",x_ray_hogs_02=__webpack_require__.p+"images/x-ray-hogs-02.fab07a8a71885b663f5ab7b150c5399e.png";var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let SquaredHedgehog=props=>(0,jsx_runtime.jsx)("img",{src:props.src,width:400,height:400,...props}),RectangularHedgehog=props=>(0,jsx_runtime.jsx)("img",{src:props.src,height:400,...props}),SurprisedHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:surprised_hog,...props}),XRayHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:x_ray_hog,...props}),XRayHog2=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:x_ray_hogs_02,...props}),HospitalHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:hospital_hog,...props}),BlushingHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:blushing_hog,...props}),LaptopHog1=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:laptop_hog_01,...props}),LaptopHog2=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:laptop_hog_02,...props}),LaptopHog3=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:laptop_hog_03,...props}),LaptopHog4=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:laptop_hog_04,...props}),LaptopHogEU=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:laptop_hog_eu,...props}),ExplorerHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:explorer_hog,...props}),RunningHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:running_hog.Z,...props}),SpaceHog=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:space_hog,...props}),TronHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:tron_hog,...props}),HeartHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:heart_hog,...props}),StarHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:star_hog,...props}),PoliceHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:police_hog,...props}),SleepingHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:sleeping_hog,...props}),BuilderHog1=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:builder_hog_01,...props}),BuilderHog2=props=>(0,jsx_runtime.jsx)(RectangularHedgehog,{src:builder_hog_02,...props}),BuilderHog3=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:builder_hog_03,...props}),ProfessorHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:professor_hog,...props}),SupportHeroHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:support_hero_hog,...props}),DetectiveHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:detective_hog,...props}),MailHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:mail_hog,...props}),FeatureFlagHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:feature_flag_hog,...props}),ExperimentsHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:experiments_hog,...props}),ListHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:list_hog,...props}),WarningHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:warning_hog,...props}),WavingHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:waving_hog,...props}),ReadingHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:reading_hog,...props}),MicrophoneHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:microphone_hog,...props}),PhonePairHogs=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:phone_pair_hogs,...props}),BurningMoneyHog=props=>(0,jsx_runtime.jsx)(SquaredHedgehog,{src:burning_money_hog,...props})},"./frontend/src/lib/constants.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A4:()=>DISPLAY_TYPES_TO_CATEGORIES,Cd:()=>ENTITY_MATCH_TYPE,Dk:()=>OrganizationMembershipLevel,E1:()=>UNSUBSCRIBE_SURVEY_ID,F2:()=>LOGS_PORTION_LIMIT,H$:()=>EVENT_DEFINITIONS_PER_PAGE,KN:()=>privilegeLevelToName,Lm:()=>GENERATED_DASHBOARD_PREFIX,MD:()=>NON_BREAKDOWN_DISPLAY_TYPES,Mo:()=>STALE_EVENT_SECONDS,N6:()=>PROPERTY_DEFINITIONS_PER_EVENT,PO:()=>INSTANTLY_AVAILABLE_PROPERTIES,Rp:()=>MAX_EXPERIMENT_VARIANTS,TH:()=>MOCK_NODE_PROCESS,V7:()=>DashboardRestrictionLevel,Xx:()=>DOMAIN_REGEX,Yr:()=>CLOUD_HOSTNAMES,Z1:()=>PERSON_DEFAULT_DISPLAY_NAME_PROPERTIES,ZN:()=>TeamMembershipLevel,cN:()=>SECURE_URL_REGEX,dA:()=>WEBHOOK_SERVICES,hB:()=>BIN_COUNT_AUTO,kH:()=>DashboardPrivilegeLevel,ld:()=>EVENT_PROPERTY_DEFINITIONS_PER_PAGE,mi:()=>SSO_PROVIDER_NAMES,oA:()=>PERCENT_STACK_VIEW_DISPLAY_TYPE,oY:()=>SESSION_RECORDINGS_PLAYLIST_FREE_COUNT,ow:()=>CohortTypeEnum,pX:()=>NON_VALUES_ON_SERIES_DISPLAY_TYPES,pt:()=>PROPERTY_MATCH_TYPE,qL:()=>RETENTION_FIRST_TIME,r1:()=>ShownAsValue,si:()=>NON_TIME_SERIES_DISPLAY_TYPES,uA:()=>ACTIVITY_PAGE_SIZE,uq:()=>EXPERIMENT_DEFAULT_DURATION,vT:()=>RETENTION_RECURRING,wG:()=>SINGLE_SERIES_DISPLAY_TYPES,xp:()=>FunnelLayout,y8:()=>FEATURE_FLAGS,yh:()=>SESSION_REPLAY_MINIMUM_DURATION_OPTIONS,zB:()=>PluginsAccessLevel,zy:()=>TAILWIND_BREAKPOINTS});var _types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/types.ts");let DISPLAY_TYPES_TO_CATEGORIES={[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsLineGraph]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TimeSeries,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsBar]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TimeSeries,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsStackedBar]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TimeSeries,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsAreaGraph]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TimeSeries,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsLineGraphCumulative]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.CumulativeTimeSeries,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.BoldNumber]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsPie]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsBarValue]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsTable]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue,[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.WorldMap]:_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue},NON_TIME_SERIES_DISPLAY_TYPES=Object.entries(DISPLAY_TYPES_TO_CATEGORIES).filter(_ref=>{let[,category]=_ref;return category===_types__WEBPACK_IMPORTED_MODULE_0__.Iz.TotalValue}).map(_ref2=>{let[displayType]=_ref2;return displayType}),NON_BREAKDOWN_DISPLAY_TYPES=[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.BoldNumber],SINGLE_SERIES_DISPLAY_TYPES=[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.WorldMap,_types__WEBPACK_IMPORTED_MODULE_0__.Qb.BoldNumber],NON_VALUES_ON_SERIES_DISPLAY_TYPES=[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsTable,_types__WEBPACK_IMPORTED_MODULE_0__.Qb.WorldMap,_types__WEBPACK_IMPORTED_MODULE_0__.Qb.BoldNumber],PERCENT_STACK_VIEW_DISPLAY_TYPE=[_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsBar,_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsAreaGraph,_types__WEBPACK_IMPORTED_MODULE_0__.Qb.ActionsPie],OrganizationMembershipLevel=function(OrganizationMembershipLevel){return OrganizationMembershipLevel[OrganizationMembershipLevel.Member=1]="Member",OrganizationMembershipLevel[OrganizationMembershipLevel.Admin=8]="Admin",OrganizationMembershipLevel[OrganizationMembershipLevel.Owner=15]="Owner",OrganizationMembershipLevel}({}),TeamMembershipLevel=function(TeamMembershipLevel){return TeamMembershipLevel[TeamMembershipLevel.Member=1]="Member",TeamMembershipLevel[TeamMembershipLevel.Admin=8]="Admin",TeamMembershipLevel}({}),PluginsAccessLevel=function(PluginsAccessLevel){return PluginsAccessLevel[PluginsAccessLevel.None=0]="None",PluginsAccessLevel[PluginsAccessLevel.Config=3]="Config",PluginsAccessLevel[PluginsAccessLevel.Install=6]="Install",PluginsAccessLevel[PluginsAccessLevel.Root=9]="Root",PluginsAccessLevel}({}),DashboardRestrictionLevel=function(DashboardRestrictionLevel){return DashboardRestrictionLevel[DashboardRestrictionLevel.EveryoneInProjectCanEdit=21]="EveryoneInProjectCanEdit",DashboardRestrictionLevel[DashboardRestrictionLevel.OnlyCollaboratorsCanEdit=37]="OnlyCollaboratorsCanEdit",DashboardRestrictionLevel}({}),DashboardPrivilegeLevel=function(DashboardPrivilegeLevel){return DashboardPrivilegeLevel[DashboardPrivilegeLevel.CanView=21]="CanView",DashboardPrivilegeLevel[DashboardPrivilegeLevel.CanEdit=37]="CanEdit",DashboardPrivilegeLevel[DashboardPrivilegeLevel._ProjectAdmin=888]="_ProjectAdmin",DashboardPrivilegeLevel[DashboardPrivilegeLevel._Owner=999]="_Owner",DashboardPrivilegeLevel}({}),privilegeLevelToName={[DashboardPrivilegeLevel.CanView]:"can view",[DashboardPrivilegeLevel.CanEdit]:"can edit",[DashboardPrivilegeLevel._Owner]:"owner",[DashboardPrivilegeLevel._ProjectAdmin]:"can edit"},PERSON_DEFAULT_DISPLAY_NAME_PROPERTIES=["email","Email","name","Name","username","Username","UserName"],INSTANTLY_AVAILABLE_PROPERTIES=["$geoip_city_name","$geoip_country_name","$geoip_country_code","$geoip_continent_name","$geoip_continent_code","$geoip_postal_code","$geoip_time_zone","$group_key","distinct_id"],MAX_EXPERIMENT_VARIANTS=10,EXPERIMENT_DEFAULT_DURATION=14,STALE_EVENT_SECONDS=2592e3,ShownAsValue=function(ShownAsValue){return ShownAsValue.VOLUME="Volume",ShownAsValue.STICKINESS="Stickiness",ShownAsValue.LIFECYCLE="Lifecycle",ShownAsValue}({}),RETENTION_RECURRING="retention_recurring",RETENTION_FIRST_TIME="retention_first_time",WEBHOOK_SERVICES={Slack:"slack.com",Discord:"discord.com",Teams:"office.com"},FEATURE_FLAGS={FUNNELS_CUE_OPT_OUT:"funnels-cue-opt-out-7301",HISTORICAL_EXPORTS_V2:"historical-exports-v2",INGESTION_WARNINGS_ENABLED:"ingestion-warnings-enabled",SESSION_RESET_ON_LOAD:"session-reset-on-load",DEBUG_REACT_RENDERS:"debug-react-renders",AUTO_ROLLBACK_FEATURE_FLAGS:"auto-rollback-feature-flags",ONBOARDING_V2_DEMO:"onboarding-v2-demo",QUERY_RUNNING_TIME:"query_running_time",QUERY_TIMINGS:"query-timings",QUERY_ASYNC:"query-async",POSTHOG_3000_NAV:"posthog-3000-nav",HEDGEHOG_MODE:"hedgehog-mode",HEDGEHOG_MODE_DEBUG:"hedgehog-mode-debug",HIGH_FREQUENCY_BATCH_EXPORTS:"high-frequency-batch-exports",PERSON_BATCH_EXPORTS:"person-batch-exports",FF_DASHBOARD_TEMPLATES:"ff-dashboard-templates",ARTIFICIAL_HOG:"artificial-hog",CS_DASHBOARDS:"cs-dashboards",PRODUCT_SPECIFIC_ONBOARDING:"product-specific-onboarding",REDIRECT_SIGNUPS_TO_INSTANCE:"redirect-signups-to-instance",APPS_AND_EXPORTS_UI:"apps-and-exports-ui",HOGQL_DASHBOARD_ASYNC:"hogql-dashboard-async",WEBHOOKS_DENYLIST:"webhooks-denylist",PIPELINE_UI:"pipeline-ui",PERSON_FEED_CANVAS:"person-feed-canvas",FEATURE_FLAG_COHORT_CREATION:"feature-flag-cohort-creation",INSIGHT_HORIZONTAL_CONTROLS:"insight-horizontal-controls",SURVEYS_ADAPTIVE_LIMITS:"surveys-adaptive-limits",SURVEYS_WIDGETS:"surveys-widgets",SURVEYS_EVENTS:"surveys-events",SURVEYS_ACTIONS:"surveys-actions",SURVEYS_RECURRING:"surveys-recurring",SURVEYS_ADAPTIVE_COLLECTION:"surveys-recurring",YEAR_IN_HOG:"year-in-hog",SESSION_REPLAY_EXPORT_MOBILE_DATA:"session-replay-export-mobile-data",DISCUSSIONS:"discussions",REDIRECT_INSIGHT_CREATION_PRODUCT_ANALYTICS_ONBOARDING:"redirect-insight-creation-product-analytics-onboarding",AI_SESSION_SUMMARY:"ai-session-summary",AI_SESSION_PERMISSIONS:"ai-session-permissions",PRODUCT_INTRO_PAGES:"product-intro-pages",SQL_EDITOR:"sql-editor",SESSION_REPLAY_DOCTOR:"session-replay-doctor",SAVED_NOT_PINNED:"saved-not-pinned",AUDIT_LOGS_ACCESS:"audit-logs-access",SUBSCRIBE_FROM_PAYGATE:"subscribe-from-paygate",HEATMAPS_UI:"heatmaps-ui",THEME:"theme",PROXY_AS_A_SERVICE:"proxy-as-a-service",SETTINGS_PERSONS_JOIN_MODE:"settings-persons-join-mode",SETTINGS_PERSONS_ON_EVENTS_HIDDEN:"settings-persons-on-events-hidden",HOG:"hog",HOG_FUNCTIONS_LINKED:"hog-functions-linked",PERSONLESS_EVENTS_NOT_SUPPORTED:"personless-events-not-supported",ALERTS:"alerts",ERROR_TRACKING:"error-tracking",ERROR_TRACKING_GROUP_ACTIONS:"error-tracking-group-actions",SETTINGS_BOUNCE_RATE_PAGE_VIEW_MODE:"settings-bounce-rate-page-view-mode",ONBOARDING_DASHBOARD_TEMPLATES:"onboarding-dashboard-templates",MULTIPLE_BREAKDOWNS:"multiple-breakdowns",SETTINGS_SESSION_TABLE_VERSION:"settings-session-table-version",INSIGHT_FUNNELS_USE_UDF:"insight-funnels-use-udf",INSIGHT_FUNNELS_USE_UDF_TRENDS:"insight-funnels-use-udf-trends",FIRST_TIME_FOR_USER_MATH:"first-time-for-user-math",MULTITAB_EDITOR:"multitab-editor",BATCH_EXPORTS_POSTHOG_HTTP:"posthog-http-batch-exports",EXPERIMENT_MAKE_DECISION:"experiment-make-decision",DATA_MODELING:"data-modeling",HEDGEHOG_SKIN_SPIDERHOG:"hedgehog-skin-spiderhog",INSIGHT_VARIABLES:"insight_variables",WEB_EXPERIMENTS:"web-experiments",BIGQUERY_DWH:"bigquery-dwh",ENVIRONMENTS:"environments",BILLING_PAYMENT_ENTRY_IN_APP:"billing-payment-entry-in-app",LEGACY_ACTION_WEBHOOKS:"legacy-action-webhooks",REPLAY_TEMPLATES:"replay-templates",EXPERIMENTS_HOGQL:"experiments-hogql",ROLE_BASED_ACCESS_CONTROL:"role-based-access-control",MESSAGING:"messaging",BILLING_TRIAL_FLOW:"billing-trial-flow",EDIT_DWH_SOURCE_CONFIG:"edit_dwh_source_config",AI_SURVEY_RESPONSE_SUMMARY:"ai-survey-response-summary",SELF_SERVE_CREDIT_OVERRIDE:"self-serve-credit-override",FEATURE_MANAGEMENT_UI:"feature-management-ui",CUSTOM_CSS_THEMES:"custom-css-themes",METALYTICS:"metalytics",EXPERIMENTS_MULTIPLE_METRICS:"experiments-multiple-metrics",REMOTE_CONFIG:"remote-config",SITE_DESTINATIONS:"site-destinations",SITE_APP_FUNCTIONS:"site-app-functions",HOG_TRANSFORMATIONS:"hog-transformations",REPLAY_HOGQL_FILTERS:"replay-hogql-filters",REPLAY_LIST_RECORDINGS_AS_QUERY:"replay-list-recordings-as-query",SUPPORT_MESSAGE_OVERRIDE:"support-message-override",BILLING_SKIP_FORECASTING:"billing-skip-forecasting",EXPERIMENT_STATS_V2:"experiment-stats-v2",WEB_ANALYTICS_PERIOD_COMPARISON:"web-analytics-period-comparison",WEB_ANALYTICS_CONVERSION_GOAL_FILTERS:"web-analytics-conversion-goal-filters",CDP_ACTIVITY_LOG_NOTIFICATIONS:"cdp-activity-log-notifications",COOKIELESS_SERVER_HASH_MODE_SETTING:"cookieless-server-hash-mode-setting",INSIGHT_COLORS:"insight-colors"},ENTITY_MATCH_TYPE="entities",PROPERTY_MATCH_TYPE="properties",FunnelLayout=function(FunnelLayout){return FunnelLayout.horizontal="horizontal",FunnelLayout.vertical="vertical",FunnelLayout}({}),BIN_COUNT_AUTO="auto",CohortTypeEnum=function(CohortTypeEnum){return CohortTypeEnum.Static="static",CohortTypeEnum.Dynamic="dynamic",CohortTypeEnum}({}),MOCK_NODE_PROCESS={cwd:()=>"",env:{}},SSO_PROVIDER_NAMES={"google-oauth2":"Google",github:"GitHub",gitlab:"GitLab",saml:"Single sign-on (SAML)"},DOMAIN_REGEX=/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/,SECURE_URL_REGEX=/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/gi,CLOUD_HOSTNAMES={[_types__WEBPACK_IMPORTED_MODULE_0__.yp.US]:"us.posthog.com",[_types__WEBPACK_IMPORTED_MODULE_0__.yp.EU]:"eu.posthog.com"},SESSION_RECORDINGS_PLAYLIST_FREE_COUNT=5,GENERATED_DASHBOARD_PREFIX="Generated Dashboard",ACTIVITY_PAGE_SIZE=20,EVENT_DEFINITIONS_PER_PAGE=50,PROPERTY_DEFINITIONS_PER_EVENT=5,EVENT_PROPERTY_DEFINITIONS_PER_PAGE=50,LOGS_PORTION_LIMIT=50,SESSION_REPLAY_MINIMUM_DURATION_OPTIONS=[{label:"no minimum",value:null},{label:"1",value:1e3},{label:"2",value:2e3},{label:"5",value:5e3},{label:"10",value:1e4},{label:"15",value:15e3}],UNSUBSCRIBE_SURVEY_ID="018b6e13-590c-0000-decb-c727a2b3f462",TAILWIND_BREAKPOINTS={sm:526,md:768,lg:992,xl:1200,"2xl":1600}},"./frontend/src/lib/dayjs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$$:()=>dayjsLocalToTimezone,Bv:()=>dayjs__WEBPACK_IMPORTED_MODULE_0___default.a,fp:()=>dayjsUtcToTimezone,qE:()=>dayjs__WEBPACK_IMPORTED_MODULE_0__.isDayjs,zO:()=>now});var dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__),dayjs_plugin_duration__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/duration.js"),dayjs_plugin_duration__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(dayjs_plugin_duration__WEBPACK_IMPORTED_MODULE_1__),dayjs_plugin_isSameOrAfter__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/isSameOrAfter.js"),dayjs_plugin_isSameOrAfter__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(dayjs_plugin_isSameOrAfter__WEBPACK_IMPORTED_MODULE_2__),dayjs_plugin_isSameOrBefore__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/isSameOrBefore.js"),dayjs_plugin_isSameOrBefore__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(dayjs_plugin_isSameOrBefore__WEBPACK_IMPORTED_MODULE_3__),dayjs_plugin_localizedFormat__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/localizedFormat.js"),dayjs_plugin_localizedFormat__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(dayjs_plugin_localizedFormat__WEBPACK_IMPORTED_MODULE_4__),dayjs_plugin_quarterOfYear__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/quarterOfYear.js"),dayjs_plugin_quarterOfYear__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(dayjs_plugin_quarterOfYear__WEBPACK_IMPORTED_MODULE_5__),dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/relativeTime.js"),dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_6__),dayjs_plugin_timezone__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/timezone.js"),dayjs_plugin_timezone__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(dayjs_plugin_timezone__WEBPACK_IMPORTED_MODULE_7__),dayjs_plugin_utc__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/dayjs@1.11.11_patch_hash=lbfir4woetqmvzqg7l4q5mjtfq/node_modules/dayjs/plugin/utc.js"),dayjs_plugin_utc__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(dayjs_plugin_utc__WEBPACK_IMPORTED_MODULE_8__);dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_localizedFormat__WEBPACK_IMPORTED_MODULE_4___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_6___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_isSameOrAfter__WEBPACK_IMPORTED_MODULE_2___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_isSameOrBefore__WEBPACK_IMPORTED_MODULE_3___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_utc__WEBPACK_IMPORTED_MODULE_8___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_timezone__WEBPACK_IMPORTED_MODULE_7___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_duration__WEBPACK_IMPORTED_MODULE_1___default()),dayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(dayjs_plugin_quarterOfYear__WEBPACK_IMPORTED_MODULE_5___default());let now=()=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()();function dayjsUtcToTimezone(isoString,timezone){let explicitOffset=!(arguments.length>2)||void 0===arguments[2]||arguments[2],format=arguments.length>3?arguments[3]:void 0,strict=arguments.length>4?arguments[4]:void 0,datetime=dayjs__WEBPACK_IMPORTED_MODULE_0___default()(isoString,format,strict).utc(!explicitOffset);return["GMT","UTC"].includes(timezone)||(datetime=datetime.tz(timezone)),datetime}function dayjsLocalToTimezone(isoString,timezone,format,strict){let datetime=dayjs__WEBPACK_IMPORTED_MODULE_0___default()(isoString,format,strict);return["GMT","UTC"].includes(timezone)?datetime.utc(!0):datetime.tz(timezone,!0)}},"./frontend/src/lib/hog.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>execHogAsync,z:()=>execHog});var _posthog_hogvm__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+hogvm@1.0.66_luxon@3.5.0/node_modules/@posthog/hogvm/dist/module.js"),crypto__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("?cafa"),re2js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js"),_queries_query__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/schema.ts");let external={crypto:crypto__WEBPACK_IMPORTED_MODULE_1__,regex:{match:(regex,value)=>{let{regex:newRegex,insensitive,multiline,dotall}=function(regex,initialModifiers){let insensitive=!1,multiline=!1,dotall=!0;function setModifier(modifier,negative){switch(modifier){case"i":insensitive=!negative;break;case"m":multiline=!negative;break;case"s":dotall=!negative}}for(let modifier of"s".split(""))setModifier(modifier,!1);return{regex:regex=regex.replaceAll(/\(\?(-?)([ims]+)\)/g,(_,negative,modifiers)=>{for(let modifier of modifiers.split(""))setModifier(modifier,"-"===negative);return""}),insensitive,multiline,dotall}}(regex,0),flags=(insensitive?re2js__WEBPACK_IMPORTED_MODULE_2__.n_.CASE_INSENSITIVE:0)|(multiline?re2js__WEBPACK_IMPORTED_MODULE_2__.n_.MULTILINE:0)|(dotall?re2js__WEBPACK_IMPORTED_MODULE_2__.n_.DOTALL:0);return re2js__WEBPACK_IMPORTED_MODULE_2__.n_.compile(newRegex,flags).matcher(value).find()}}};function execHog(code,options){return(0,_posthog_hogvm__WEBPACK_IMPORTED_MODULE_0__.GL)(code,{external,...null!=options?options:{}})}function execHogAsync(code,options){var _options$asyncFunctio;return(0,_posthog_hogvm__WEBPACK_IMPORTED_MODULE_0__.Ng)(code,{external,...null!=options?options:{},asyncFunctions:{sleep:seconds=>new Promise(resolve=>setTimeout(resolve,1e3*seconds)),run:async queryString=>{let hogQLQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.HogQLQuery,query:queryString},response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_3__.jr)(hogQLQuery);return{results:response.results,columns:response.columns}},fetch:()=>{throw Error("fetch is disabled in the browser")},posthogCapture:()=>{throw Error("posthogCapture is not yet supported here")},...null!==(_options$asyncFunctio=options?.asyncFunctions)&&void 0!==_options$asyncFunctio?_options$asyncFunctio:{}}})}},"./frontend/src/lib/hooks/useEventListener.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>useEventListener});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function useEventListener(eventName,handler){let element=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,deps=arguments.length>3?arguments[3]:void 0,savedHandler=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(()=>{});(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{savedHandler.current=handler},[handler]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(!element?.addEventListener){var _localName;console.warn(`Could not start listening to ${eventName} on ${element?null!==(_localName=element?.localName)&&void 0!==_localName?_localName:"window":element}!`);return}let eventListener=event=>savedHandler.current(event);return element.addEventListener(eventName,eventListener),()=>{element?.removeEventListener(eventName,eventListener)}},[eventName,element,...deps||[]])}},"./frontend/src/lib/hooks/useFeatureFlag.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>useFeatureFlag});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts");let useFeatureFlag=(flag,match)=>{let{featureFlags}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h);return match?featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_1__.y8[flag]]===match:!!featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_1__.y8[flag]]}},"./frontend/src/lib/hooks/useFloatingContainerContext.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useFloatingContainer,E:()=>FloatingContainerContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");let FloatingContainerContext=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(void 0),useFloatingContainer=()=>{let ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FloatingContainerContext),[el,setEl]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(void 0);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{setEl(ref?.current)},[ref]),el}},"./frontend/src/lib/hooks/useIsHovering.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");let __WEBPACK_DEFAULT_EXPORT__=ref=>{("object"!=typeof ref||void 0===ref.current)&&console.error("useHoverDirty expects a single ref argument.");let[value,setValue]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let onMouseOver=()=>setValue(!0),onMouseOut=()=>setValue(!1);ref&&ref.current&&(ref.current.addEventListener("mouseover",onMouseOver),ref.current.addEventListener("mouseout",onMouseOut));let{current}=ref;return()=>{current&&(current.removeEventListener("mouseover",onMouseOver),current.removeEventListener("mouseout",onMouseOut))}},[ref]),value}},"./frontend/src/lib/hooks/useKeyHeld.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>useKeyHeld});var lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/hooks/useEventListener.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function useKeyHeld(key,deps){let keysHeldRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(new Set),[keyHeld,setKeyHeld]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),checkKeysHeld=()=>{setKeyHeld(keysHeldRef.current.has(key))};return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{checkKeysHeld()},[key,...deps||[]]),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("keydown",event=>{let key=event.key,keysHeldCopy=new Set(keysHeldRef.current);keysHeldCopy.add(key),keysHeldRef.current=keysHeldCopy,checkKeysHeld()},void 0,[...deps||[]]),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("keyup",event=>{let key=event.key,keysHeldCopy=new Set(keysHeldRef.current);keysHeldCopy.delete(key),keysHeldRef.current=keysHeldCopy,checkKeysHeld()},void 0,[...deps||[]]),keyHeld}},"./frontend/src/lib/hooks/useKeyboardHotkeys.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>useKeyboardHotkeys});var lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/hooks/useEventListener.ts");let isToolbarInput=(event,ignorableElements)=>{let path=event.composedPath()||event.path;if(!path)return!1;let sourceElement=path[0],tagName=sourceElement.tagName||"not an html element";return ignorableElements.includes(tagName.toLowerCase())},exceptions=[".hotkey-block",".hotkey-block *"];function useKeyboardHotkeys(hotkeys,deps){let IGNORE_INPUTS=["input","textarea"];(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("keydown",event=>{let key=event.key;if(exceptions.some(exception=>event.target?.matches(exception)))return;let isDOMInput=IGNORE_INPUTS.includes(event.target.tagName.toLowerCase())||event.target.isContentEditable;if(!("Escape"!==key&&(isDOMInput||isToolbarInput(event,IGNORE_INPUTS))))for(let relevantKey of Object.keys(hotkeys)){let hotkey=hotkeys[relevantKey];if(!hotkey||hotkey.disabled||!hotkey.willHandleEvent&&(event.metaKey||event.ctrlKey||event.altKey))continue;let normalizedKey=" "===key?"space":key.toLowerCase();if(normalizedKey===relevantKey){hotkey.willHandleEvent||event.preventDefault(),hotkey.action(event);break}}},void 0,[hotkeys,...deps||[]])}},"./frontend/src/lib/hooks/useOutsideClickHandler.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>useOutsideClickHandler,r:()=>CLICK_OUTSIDE_BLOCK_CLASS});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");let CLICK_OUTSIDE_BLOCK_CLASS="click-outside-block",exceptions=[`.${CLICK_OUTSIDE_BLOCK_CLASS}`,`.${CLICK_OUTSIDE_BLOCK_CLASS} *`];function useOutsideClickHandler(refs,handleClickOutside){let extraDeps=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],exceptTagNames=arguments.length>3?arguments[3]:void 0;(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{function handleClick(event){if(exceptions.some(exception=>event.target?.matches(exception))||refs.some(maybeRef=>{if("string"==typeof maybeRef)return event.composedPath?.()?.find(e=>e?.matches?.(maybeRef));let ref=maybeRef.current;if(!event.target||!ref)return!1;let hasShadowRoot=!!event.target.shadowRoot;return hasShadowRoot?event.composedPath?.()?.find(el=>el===ref):"contains"in ref&&ref.contains(event.target)}))return;let target=event.composedPath?.()?.[0]||event.target;exceptTagNames&&exceptTagNames.includes(target.tagName)||handleClickOutside?.(event)}if(refs.length>0)return document.addEventListener("mouseup",handleClick),document.addEventListener("touchend",handleClick),()=>{document.removeEventListener("mouseup",handleClick),document.removeEventListener("touchend",handleClick)}},[...refs,...extraDeps])}},"./frontend/src/lib/hooks/usePageVisibility.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>usePageVisibility});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function usePageVisibility(callback){(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let hidden="hidden",visibilityChange="visibilitychange";void 0!==document.msHidden?(hidden="msHidden",visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(hidden="webkitHidden",visibilityChange="webkitvisibilitychange");let onVisibilityChange=()=>{callback(!document[hidden])};return document.addEventListener(visibilityChange,onVisibilityChange),function cleanUp(){document.removeEventListener(visibilityChange,onVisibilityChange)}},[])}},"./frontend/src/lib/hooks/useResizeObserver.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>useResizeBreakpoints,y:()=>useResizeObserver});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"),use_resize_observer__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/use-resize-observer@8.0.0_react-dom@18.2.0_react@18.2.0/node_modules/use-resize-observer/dist/bundle.esm.js");window.ResizeObserver||(window.ResizeObserver=resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_1__.Z);let useResizeObserver=use_resize_observer__WEBPACK_IMPORTED_MODULE_2__.Z;function useResizeBreakpoints(breakpoints,options){var _options$initialSize;let sortedKeys=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>Object.keys(breakpoints).map(x=>parseInt(x,10)).sort((a,b)=>a-b),[breakpoints]),[size,setSize]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null!==(_options$initialSize=options?.initialSize)&&void 0!==_options$initialSize?_options$initialSize:breakpoints[sortedKeys[0]]),{ref:refCb}=useResizeObserver({ref:options?.ref,onResize:_ref=>{let{width=1}=_ref,newSize=breakpoints[sortedKeys[0]];for(let key of sortedKeys)width>key&&(newSize=breakpoints[key]);newSize!=size&&setSize(newSize)},box:"border-box"});return{ref:options?.ref||refCb,size}}},"./frontend/src/lib/hooks/useThemedHtml.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>useThemedHtml});var _sentry_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_sceneLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/sceneLogic.ts"),_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts");function useThemedHtml(){let overflowHidden=!(arguments.length>0)||void 0===arguments[0]||arguments[0],{isDarkModeOn,customCss}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_3__.b),{sceneConfig}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_sceneLogic__WEBPACK_IMPORTED_MODULE_2__.k),CUSTOM_THEME_STYLES_ID="ph-custom-theme-styles";(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{let oldStyle=document.getElementById(CUSTOM_THEME_STYLES_ID);if(oldStyle&&document.head.removeChild(oldStyle),document.body.setAttribute("theme",isDarkModeOn?"dark":"light"),customCss){let newStyle=document.createElement("style");newStyle.id=CUSTOM_THEME_STYLES_ID,newStyle.appendChild(document.createTextNode(customCss)),document.head.appendChild(newStyle)}},[isDarkModeOn,customCss]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{overflowHidden&&document.body.classList.add("overflow-hidden")},[overflowHidden]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{try{let root=document.documentElement,style=getComputedStyle(root),backgroundColor=sceneConfig?.projectBased?style.getPropertyValue(isDarkModeOn?"--accent-3000-dark":"--accent-3000-light"):style.getPropertyValue("--bg-bridge");document.head.querySelector('meta[name="theme-color"]')?.remove(),document.head.insertAdjacentHTML("beforeend",``)}catch(e){console.warn("Failed to set theme-color meta tag. This could indicate the variables no longer exist",e),(0,_sentry_react__WEBPACK_IMPORTED_MODULE_4__.Tb)(Error("Failed to set theme-color meta tag"),{extra:{error:e}})}},[isDarkModeOn,sceneConfig?.projectBased])}},"./frontend/src/lib/hooks/useUploadFiles.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cT:()=>uploadFile,nc:()=>useUploadFiles});var lib_api__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/api.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");let lazyImageBlobReducer=async blob=>{let blobReducer=(await __webpack_require__.e(78170).then(__webpack_require__.bind(__webpack_require__,"./node_modules/.pnpm/image-blob-reduce@4.1.0/node_modules/image-blob-reduce/dist/image-blob-reduce.esm.mjs"))).default();return blobReducer.toBlob(blob,{max:2e3})};async function uploadFile(file){if(!file.type.startsWith("image/"))throw Error("File is not an image");let fileToUpload=file;if(["image/png","image/jpeg","image/webp"].includes(file.type)){let compressedBlob=await lazyImageBlobReducer(file);fileToUpload=new File([compressedBlob],file.name,{type:compressedBlob.type})}let formData=new FormData;return formData.append("image",fileToUpload),await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.media.upload(formData)}function useUploadFiles(_ref){let{onUpload,onError}=_ref,[uploading,setUploading]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),[filesToUpload,setFilesToUpload]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]),uploadInProgressRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{let uploadFiles=async()=>{if(0===filesToUpload.length||uploadInProgressRef.current){setUploading(!1);return}try{uploadInProgressRef.current=!0,setUploading(!0);let file=filesToUpload[0],media=await uploadFile(file);onUpload?.(media.image_location,media.name,media.id)}catch(error){let errorDetail=error.detail||"unknown error";onError(errorDetail)}finally{uploadInProgressRef.current=!1,setUploading(!1),setFilesToUpload([])}};uploadFiles().catch(console.error)},[filesToUpload,onUpload,onError]),{setFilesToUpload,filesToUpload,uploading}}},"./frontend/src/lib/hooks/useWindowSize.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>useWindowSize});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function useWindowSize(){let isClient="object"==typeof window;function getSize(){return{width:isClient?window.innerWidth:void 0,height:isClient?window.innerHeight:void 0}}let[windowSize,setWindowSize]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(getSize);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(!isClient)return!1;function handleResize(){setWindowSize(getSize())}return window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)},[]),windowSize}},"./frontend/src/lib/integrations/IntegrationView.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>IntegrationView});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),api=__webpack_require__("./frontend/src/lib/api.ts"),UserActivityIndicator=__webpack_require__("./frontend/src/lib/components/UserActivityIndicator/UserActivityIndicator.tsx"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function IntegrationScopesWarning(_ref){let{integration,schema}=_ref,getScopes=(0,react.useMemo)(()=>{let scopes=[],possibleScopeLocation=[integration.config.scope,integration.config.scopes];return possibleScopeLocation.map(scope=>{"string"==typeof scope&&(scopes.push(scope.split(" ")),scopes.push(scope.split(","))),"object"==typeof scope&&scopes.push(scope)}),scopes.filter(scope=>"object"==typeof scope).reduce((a,b)=>a.length>b.length?a:b,[])},[integration.config]),requiredScopes=schema?.requiredScopes?.split(" ")||[],missingScopes=requiredScopes.filter(scope=>!getScopes.includes(scope));return 0===missingScopes.length||0===getScopes.length?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}):(0,jsx_runtime.jsx)("div",{className:"p-2",children:(0,jsx_runtime.jsxs)(LemonBanner.V,{type:"error",action:{children:"Reconnect",disableClientSideRouting:!0,to:api.ZP.integrations.authorizeUrl({kind:integration.kind,next:window.location.pathname})},children:[(0,jsx_runtime.jsxs)("span",{children:["Required scopes are missing: [",missingScopes.join(", "),"]."]}),"hubspot"===integration.kind?(0,jsx_runtime.jsxs)("span",{children:["Note that some features may not be available on your current HubSpot plan. Check out"," ",(0,jsx_runtime.jsx)(Link.r,{to:"https://developers.hubspot.com/beta-docs/guides/apps/authentication/scopes",children:"this page"})," ","for more details."]}):null]})})}function IntegrationView(_ref){let{integration,suffix,schema}=_ref,errors=integration.errors&&integration.errors?.split(",")||[];return(0,jsx_runtime.jsxs)("div",{className:"rounded border bg-bg-light",children:[(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center p-2",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-4 ml-2",children:[(0,jsx_runtime.jsx)("img",{src:integration.icon_url,className:"h-10 w-10 rounded"}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{children:["Connected to ",(0,jsx_runtime.jsx)("strong",{children:integration.display_name})]}),integration.created_by?(0,jsx_runtime.jsx)(UserActivityIndicator.F,{at:integration.created_at,by:integration.created_by,prefix:"Updated",className:"text-muted"}):null]})]}),suffix]}),errors.length>0?(0,jsx_runtime.jsx)("div",{className:"p-2",children:(0,jsx_runtime.jsx)(src.Vp,{type:"error",action:{children:"Reconnect",disableClientSideRouting:!0,to:api.ZP.integrations.authorizeUrl({kind:integration.kind,next:window.location.pathname})},children:"TOKEN_REFRESH_FAILED"===errors[0]?"Authentication token could not be refreshed. Please reconnect.":`There was an error with this integration: ${errors[0]}`})}):(0,jsx_runtime.jsx)(IntegrationScopesWarning,{integration:integration,schema:schema})]})}},"./frontend/src/lib/integrations/SlackIntegrationHelpers.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>SlackChannelPicker});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx");let slackIntegrationLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)(props=>props.id),(0,index_esm.path)(key=>["lib","integrations","slackIntegrationLogic",key]),(0,index_esm.connect)({values:[preflightLogic.preflightLogic,["siteUrlMisconfigured","preflight"]]}),(0,index_esm.actions)({loadSlackChannels:!0}),(0,lib.loaders)(_ref=>{let{props}=_ref;return{slackChannels:[null,{loadSlackChannels:async()=>{let res=await api.ZP.integrations.slackChannels(props.id);return res.channels}}]}}),(0,index_esm.selectors)({isMemberOfSlackChannel:[s=>[s.slackChannels],slackChannels=>channel=>{var _slackChannels$find$i;if(!slackChannels)return null;let[channelId]=channel.split("|");return null!==(_slackChannels$find$i=slackChannels.find(x=>x.id===channelId)?.is_member)&&void 0!==_slackChannels$find$i&&_slackChannels$find$i}]})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let getSlackChannelOptions=slackChannels=>slackChannels?slackChannels.map(x=>({key:`${x.id}|#${x.name}`,labelComponent:(0,jsx_runtime.jsxs)("span",{className:"flex items-center",children:[x.is_private?`🔒${x.name}`:`#${x.name}`,x.is_ext_shared?(0,jsx_runtime.jsx)(icons.Zf,{className:"ml-2"}):null]}),label:`${x.id} #${x.name}`})):null;function SlackChannelPicker(_ref){var _modifiedValue$split$;let{onChange,value,integration,disabled}=_ref,{slackChannels,slackChannelsLoading,isMemberOfSlackChannel}=(0,index_esm.useValues)(slackIntegrationLogic({id:integration.id})),{loadSlackChannels}=(0,index_esm.useActions)(slackIntegrationLogic({id:integration.id})),slackChannelOptions=(0,react.useMemo)(()=>getSlackChannelOptions(slackChannels),[slackChannels]),showSlackMembershipWarning=value&&!1===isMemberOfSlackChannel(value),modifiedValue=(0,react.useMemo)(()=>{if(value?.split("|").length===1){let channel=slackChannels?.find(x=>x.id===value);if(channel)return`${channel.id}|#${channel.name}`}return value},[value,slackChannels]);return(0,react.useEffect)(()=>{disabled||loadSlackChannels()},[loadSlackChannels,disabled]),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.nt,{onChange:val=>{var _val$;return onChange?.(null!==(_val$=val[0])&&void 0!==_val$?_val$:null)},value:modifiedValue?[modifiedValue]:[],onFocus:()=>!slackChannels&&!slackChannelsLoading&&loadSlackChannels(),disabled:disabled,mode:"single","data-attr":"select-slack-channel",placeholder:"Select a channel...",options:null!=slackChannelOptions?slackChannelOptions:modifiedValue?[{key:modifiedValue,label:null!==(_modifiedValue$split$=modifiedValue?.split("|")[1])&&void 0!==_modifiedValue$split$?_modifiedValue$split$:modifiedValue}]:[],loading:slackChannelsLoading}),showSlackMembershipWarning?(0,jsx_runtime.jsx)(src.Vp,{type:"info",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,jsx_runtime.jsxs)("span",{children:["The PostHog Slack App is not in this channel. Please add it to the channel otherwise Subscriptions will fail to be delivered."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/webhooks/slack",target:"_blank",children:"See the Docs for more information"})]}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:loadSlackChannels,loading:slackChannelsLoading,children:"Check again"})]})}):null]})}},"./frontend/src/lib/integrations/integrationsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>integrationsLogic});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx");let google_ads=__webpack_require__.p+"images/google-ads.0479b2825d815d5fff6c244c6e02d50d.png",google_cloud=__webpack_require__.p+"images/google-cloud.c0768efd93b25c7063dab8f7cf1e7d09.png";var google_cloud_storage=__webpack_require__("./frontend/public/services/google-cloud-storage.png"),hubspot=__webpack_require__("./frontend/public/services/hubspot.png"),salesforce=__webpack_require__("./frontend/public/services/salesforce.png");let slack=__webpack_require__.p+"images/slack.6180755eb69044a8ec0c6248eabaed56.png",snapchat=__webpack_require__.p+"images/snapchat.61fc27bc74040431b64b1208826a1d6d.png";var preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts");let ICONS={slack:slack,salesforce:salesforce.Z,hubspot:hubspot.Z,"google-pubsub":google_cloud,"google-cloud-storage":google_cloud_storage.Z,"google-ads":google_ads,snapchat:snapchat},integrationsLogic=(0,index_esm.kea)([(0,index_esm.path)(["lib","integrations","integrationsLogic"]),(0,index_esm.connect)({values:[preflightLogic.preflightLogic,["siteUrlMisconfigured","preflight"]]}),(0,index_esm.actions)({handleOauthCallback:(kind,searchParams)=>({kind,searchParams}),newGoogleCloudKey:(kind,key,callback)=>({kind,key,callback}),deleteIntegration:id=>({id})}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{integrations:[null,{loadIntegrations:async()=>{let res=await api.ZP.integrations.list();return res.results.map(integration=>({...integration,icon_url:ICONS[integration.kind]}))},newGoogleCloudKey:async _ref2=>{let{kind,key,callback}=_ref2;try{var _ICONS$kind,_values$integrations;let formData=new FormData;formData.append("kind",kind),formData.append("key",key);let response=await api.ZP.integrations.create(formData),responseWithIcon={...response,icon_url:null!==(_ICONS$kind=ICONS[kind])&&void 0!==_ICONS$kind?_ICONS$kind:ICONS["google-pubsub"]};if(window.setTimeout(()=>callback?.(responseWithIcon),0),values.integrations?.find(x=>x.kind===kind&&x.display_name===response.display_name))return src.UJ.success("Google Cloud key updated."),values.integrations.map(x=>x.kind===kind&&x.display_name===response.display_name?responseWithIcon:x);return src.UJ.success("Google Cloud key created."),[...null!==(_values$integrations=values.integrations)&&void 0!==_values$integrations?_values$integrations:[],responseWithIcon]}catch(e){throw src.UJ.error("Failed to upload Google Cloud key."),e}}}]}}),(0,index_esm.listeners)(_ref3=>{let{actions}=_ref3;return{handleOauthCallback:async _ref4=>{let{kind,searchParams}=_ref4,{state,code,error}=searchParams,{next}=(0,utils.BN)(state),replaceUrl=next||urls.j.settings("project-integrations");if(error){src.UJ.error(`Failed due to "${error}"`),kea_router_lib.router.actions.replace(replaceUrl);return}try{let integration=await api.ZP.integrations.create({kind,config:{state,code}});replaceUrl+=`${replaceUrl.includes("?")?"&":"?"}integration_id=${integration.id}`,actions.loadIntegrations(),src.UJ.success("Integration successful.")}catch(e){src.UJ.error("Something went wrong. Please try again.")}finally{kea_router_lib.router.actions.replace(replaceUrl)}},deleteIntegration:async _ref5=>{let{id}=_ref5;await api.ZP.integrations.delete(id),actions.loadIntegrations()}}}),(0,index_esm.afterMount)(_ref6=>{let{actions}=_ref6;actions.loadIntegrations()}),(0,kea_router_lib.urlToAction)(_ref7=>{let{actions}=_ref7;return{"/integrations/:kind/callback":(_ref8,searchParams)=>{let{kind=""}=_ref8;actions.handleOauthCallback(kind,searchParams)}}}),(0,index_esm.selectors)({slackIntegrations:[s=>[s.integrations],integrations=>integrations?.filter(x=>"slack"==x.kind)],slackAvailable:[s=>[s.preflight],preflight=>preflight?.slack_service?.available]})])},"./frontend/src/lib/internalMetrics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Gt:()=>captureTimeToSeeData,U8:()=>currentSessionId,hn:()=>apiGetWithTimeToSeeDataTracking});var _sentry_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),lib_api__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_insights_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/insights/utils.tsx"),_exporter_exporterViewLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/exporter/exporterViewLogic.ts");function currentSessionId(){let sessionDetails=posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.sessionManager?.checkAndGetSessionAndWindowId?.(!0);return sessionDetails?.sessionId}async function captureTimeToSeeData(teamId,payload){if(window.JS_CAPTURE_TIME_TO_SEE_DATA&&teamId&&!(0,_exporter_exporterViewLogic__WEBPACK_IMPORTED_MODULE_3__.k)())try{await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.create(`api/projects/${teamId}/insights/timing`,{session_id:currentSessionId(),current_url:window.location.href,...payload})}catch(e){console.warn("Failed to capture time to see data",e),(0,_sentry_react__WEBPACK_IMPORTED_MODULE_4__.Tb)(e)}}async function apiGetWithTimeToSeeDataTracking(url,teamId,timeToSeeDataPayload){let response,responseData,error;let requestStartMs=performance.now();try{response=await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.getResponse(url),responseData=await (0,lib_api__WEBPACK_IMPORTED_MODULE_0__.$6)(response)}catch(e){error=e}let requestDurationMs=performance.now()-requestStartMs;if(captureTimeToSeeData(teamId,{...timeToSeeDataPayload,api_url:url,status:error?"failure":"success",api_response_bytes:response&&(0,scenes_insights_utils__WEBPACK_IMPORTED_MODULE_2__.Rl)(response),time_to_see_data_ms:requestDurationMs}),!responseData)throw error;return responseData}},"./frontend/src/lib/introductions/groupsAccessLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>GroupsAccessStatus,e:()=>groupsAccessLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts");let GroupsAccessStatus=function(GroupsAccessStatus){return GroupsAccessStatus[GroupsAccessStatus.AlreadyUsing=0]="AlreadyUsing",GroupsAccessStatus[GroupsAccessStatus.HasAccess=1]="HasAccess",GroupsAccessStatus[GroupsAccessStatus.HasGroupTypes=2]="HasGroupTypes",GroupsAccessStatus[GroupsAccessStatus.NoAccess=3]="NoAccess",GroupsAccessStatus[GroupsAccessStatus.Hidden=4]="Hidden",GroupsAccessStatus}({}),groupsAccessLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","introductions","groupsAccessLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_2__.H,["currentTeam"],scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_1__.preflightLogic,["preflight"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_3__.userLogic,["hasAvailableFeature"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({groupsEnabled:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_4__.P$.GROUP_ANALYTICS)],groupsAccessStatus:[s=>[s.groupsEnabled,s.currentTeam,s.preflight],(groupsEnabled,currentTeam,preflight)=>{let hasGroups=currentTeam?.has_group_types;return preflight?.instance_preferences?.disable_paid_fs?GroupsAccessStatus.Hidden:groupsEnabled&&hasGroups?GroupsAccessStatus.AlreadyUsing:groupsEnabled?GroupsAccessStatus.HasAccess:hasGroups?GroupsAccessStatus.HasGroupTypes:GroupsAccessStatus.NoAccess}],needsUpgradeForGroups:[s=>[s.groupsAccessStatus],groupsAccessStatus=>[GroupsAccessStatus.NoAccess,GroupsAccessStatus.HasGroupTypes].includes(groupsAccessStatus)],canStartUsingGroups:[s=>[s.groupsAccessStatus],groupsAccessStatus=>groupsAccessStatus===GroupsAccessStatus.HasAccess]})])},"./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>LemonBadge_LemonBadge_LemonBadge});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonBadge=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.scss"),LemonBadge_default=__webpack_require__.n(LemonBadge),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonBadge_default(),options),LemonBadge_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),CSSTransition=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/CSSTransition.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonBadgeComponent=(0,react.forwardRef)(function LemonBadgeComponent(_ref,ref){let{content,visible=!0,size="medium",position="none",className,status="primary",active=!1,...spanProps}=_ref;return(0,jsx_runtime.jsx)(CSSTransition.Z,{in:visible,timeout:150,classNames:"LemonBadge-",mountOnEnter:!0,unmountOnExit:!0,children:(0,jsx_runtime.jsx)("span",{ref:ref,className:(0,clsx_m.default)("LemonBadge",!content&&"LemonBadge--dot",`LemonBadge--${size}`,`LemonBadge--${status}`,`LemonBadge--position-${position}`,active&&"LemonBadge--active",className),...spanProps,children:content})})}),LemonBadgeNumber=(0,react.forwardRef)(function LemonBadgeNumber(_ref2,ref){let{count,maxDigits=1,showZero=!1,...badgeProps}=_ref2;if(maxDigits<1)throw Error("maxDigits must be at least 1");let text="object"==typeof count?count:"number"==typeof count&&0!==count?count{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>_LemonBadge__WEBPACK_IMPORTED_MODULE_0__.M});var _LemonBadge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.tsx")},"./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V:()=>LemonBanner_LemonBanner_LemonBanner});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonBanner=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.scss"),LemonBanner_default=__webpack_require__.n(LemonBanner),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonBanner_default(),options),LemonBanner_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lemonBannerLogic=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/lemonBannerLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonBanner_LemonBanner_LemonBanner(_ref){let{type,onClose,children,action,className,dismissKey="",hideIcon=!1,square=!1}=_ref,logic=(0,lemonBannerLogic.A)({dismissKey}),{isDismissed}=(0,index_esm.useValues)(logic),{dismiss}=(0,index_esm.useActions)(logic),showCloseButton=dismissKey||onClose;return isDismissed?null:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("LemonBanner @container",`LemonBanner--${type}`,className,square&&"LemonBanner--square"),children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 grow @md:px-1",children:[!hideIcon&&("warning"===type||"error"===type?(0,jsx_runtime.jsx)(posthog_icons_es.IconWarning,{className:"LemonBanner__icon hidden @md:block"}):(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"LemonBanner__icon hidden @md:block"})),(0,jsx_runtime.jsx)("div",{className:"grow overflow-hidden",children:children}),action&&(0,jsx_runtime.jsx)(LemonButton.J,{className:"hidden @md:flex",type:"secondary",...action}),showCloseButton&&(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:()=>{dismissKey&&dismiss(),onClose?.()},"aria-label":"close"})]}),action&&(0,jsx_runtime.jsx)(LemonButton.J,{className:"@md:hidden",type:"secondary",fullWidth:!0,...action})]})}},"./frontend/src/lib/lemon-ui/LemonBanner/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V:()=>_LemonBanner__WEBPACK_IMPORTED_MODULE_0__.V});var _LemonBanner__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.tsx")},"./frontend/src/lib/lemon-ui/LemonBanner/lemonBannerLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>lemonBannerLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let lemonBannerLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["components","lemon-banner","lemonBannerLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(_ref=>{let{dismissKey}=_ref;return dismissKey}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({dismiss:!0,resetDismissKey:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({isDismissed:[!1,{persist:!0},{dismiss:()=>!0,resetDismissKey:()=>!1}]})])},"./frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Jp:()=>LemonButton_LemonButton_LemonButton,$K:()=>LemonButtonWithDropdown,DC:()=>WithinPageHeaderContext});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonButton=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss"),LemonButton_default=__webpack_require__.n(LemonButton),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonButton_default(),options),LemonButton_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),LemonDropdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDropdown/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonButton_LemonButton_LemonButton=react.forwardRef((_ref,ref)=>{var _sideAction$divider;let tooltipContent;let{children,active=!1,className,disabled,disabledReason,loading,type="tertiary",status="default",icon,sideIcon,sideAction,fullWidth,center,size,tooltip,tooltipPlacement,htmlType="button",noPadding,to,targetBlank,disableClientSideRouting,onClick,truncate=!1,...buttonProps}=_ref,[popoverVisibility,popoverPlacement]=(0,react.useContext)(Popover.Sn)||[!1,null],[,parentPopoverLevel]=(0,react.useContext)(Popover.Mp),within3000PageHeader=(0,react.useContext)(WithinPageHeaderContext);!active&&popoverVisibility&&(active=!0);let usingSideActionDivider=sideAction&&(null!==(_sideAction$divider=sideAction.divider)&&void 0!==_sideAction$divider?_sideAction$divider:!fullWidth);sideAction?sideIcon=(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("LemonButtonWithSideAction__spacer",usingSideActionDivider&&"LemonButtonWithSideAction__spacer--divider")}):popoverPlacement&&(children?void 0===sideIcon&&(sideIcon=popoverPlacement.startsWith("right")?(0,jsx_runtime.jsx)(icons.VG,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconChevronDown,{})):void 0===icon&&(icon=popoverPlacement.startsWith("right")?(0,jsx_runtime.jsx)(icons.VG,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconChevronDown,{}))),loading&&(icon=(0,jsx_runtime.jsx)(Spinner.$,{textColored:!0}),disabled=!0),within3000PageHeader&&-1===parentPopoverLevel&&(size="small"),disabledReason?(disabled=!0,tooltipContent=tooltipContent?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[tooltip,(0,jsx_runtime.jsx)("div",{className:"mt-1 italic",children:disabledReason})]}):(0,jsx_runtime.jsx)("span",{className:"italic",children:disabledReason})):tooltipContent=tooltip;let ButtonComponent=to?Link.r:"button",linkDependentProps=to?{disableClientSideRouting,target:targetBlank?"_blank":void 0,to:disabled?void 0:to}:{type:htmlType};"button"!==ButtonComponent||buttonProps["aria-label"]||"string"!=typeof tooltip||(buttonProps["aria-label"]=tooltip);let workingButton=(0,jsx_runtime.jsx)(ButtonComponent,{ref:ref,className:(0,clsx_m.default)(`LemonButton LemonButton--${type} LemonButton--status-${status}`,loading&&"LemonButton--loading",noPadding&&"LemonButton--no-padding",size&&`LemonButton--${size}`,active&&"LemonButton--active",fullWidth&&"LemonButton--full-width",center&&"LemonButton--centered",!children&&"LemonButton--no-content",!!icon&&"LemonButton--has-icon",!!sideIcon&&"LemonButton--has-side-icon",truncate&&"LemonButton--truncate",className),onClick:disabled?void 0:onClick,"aria-disabled":disabled,...linkDependentProps,...buttonProps,children:(0,jsx_runtime.jsxs)("span",{className:"LemonButton__chrome",children:[icon?(0,jsx_runtime.jsx)("span",{className:"LemonButton__icon",children:icon}):null,children?(0,jsx_runtime.jsx)("span",{className:"LemonButton__content",children:children}):null,sideIcon?(0,jsx_runtime.jsx)("span",{className:"LemonButton__icon",children:sideIcon}):null]})});if(tooltipContent&&(workingButton=(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltipContent,placement:tooltipPlacement,children:workingButton})),sideAction){let{dropdown:sideDropdown,divider:_,...sideActionRest}=sideAction,SideComponent=sideDropdown?LemonButtonWithDropdown:LemonButton_LemonButton_LemonButton;workingButton=(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)(`LemonButtonWithSideAction LemonButtonWithSideAction--${type}`,fullWidth&&"LemonButtonWithSideAction--full-width"),children:[workingButton,(0,jsx_runtime.jsx)("div",{className:"LemonButtonWithSideAction__side-button",children:(0,jsx_runtime.jsx)(SideComponent,{type:type,size:size,status:status,dropdown:sideDropdown,noPadding:!0,active:active,...sideActionRest})})]})}return workingButton});LemonButton_LemonButton_LemonButton.displayName="LemonButton";let WithinPageHeaderContext=react.createContext(!1),LemonButtonWithDropdown=react.forwardRef((_ref2,ref)=>{let{dropdown:dropdownProps,...buttonProps}=_ref2;return(0,jsx_runtime.jsx)(LemonDropdown.Q,{...dropdownProps,children:(0,jsx_runtime.jsx)(LemonButton_LemonButton_LemonButton,{ref:ref,...buttonProps})})});LemonButtonWithDropdown.displayName="LemonButtonWithDropdown"},"./frontend/src/lib/lemon-ui/LemonButton/More.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>More});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function More(_ref){let{overlay,dropdown,"data-attr":dataAttr,placement="bottom-end",...buttonProps}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(___WEBPACK_IMPORTED_MODULE_1__.$,{"aria-label":"more","data-attr":null!=dataAttr?dataAttr:"more-button",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconEllipsis,{}),dropdown:{placement:placement,actionable:!0,...dropdown,overlay},size:"small",...buttonProps,disabled:!overlay})}},"./frontend/src/lib/lemon-ui/LemonButton/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>_LemonButton__WEBPACK_IMPORTED_MODULE_0__.$K,J:()=>_LemonButton__WEBPACK_IMPORTED_MODULE_0__.Jp});var _LemonButton__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx")},"./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>LemonCalendar_LemonCalendar_LemonCalendar});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonCalendar=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.scss"),LemonCalendar_default=__webpack_require__.n(LemonCalendar),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonCalendar_default(),options),LemonCalendar_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dayLabels=["su","mo","tu","we","th","fr","sa"],LemonCalendar_LemonCalendar_LemonCalendar=(0,react.forwardRef)(function LemonCalendar(_ref,ref){var _props$months,_props$weekStartDay,_props$leftmostMonth;let{granularity="day",...props}=_ref,{weekStartDay:teamWeekStartDay}=(0,index_esm.useValues)(teamLogic.H),months=Math.max(null!==(_props$months=props.months)&&void 0!==_props$months?_props$months:1,1),weekStartDay=null!==(_props$weekStartDay=props.weekStartDay)&&void 0!==_props$weekStartDay?_props$weekStartDay:teamWeekStartDay,today=(0,dayjs.Bv)().startOf("day"),[leftmostMonth,setLeftmostMonth]=(0,react.useState)((null!==(_props$leftmostMonth=props.leftmostMonth)&&void 0!==_props$leftmostMonth?_props$leftmostMonth:today).startOf("month"));return(0,react.useEffect)(()=>{props.leftmostMonth&&props.leftmostMonth.isSame(leftmostMonth,"d")&&setLeftmostMonth(props.leftmostMonth)},[props.leftmostMonth]),(0,jsx_runtime.jsxs)("div",{ref:ref,className:(0,clsx_m.default)("LemonCalendar relative flex items-start gap-4 tabular-nums",`LemonCalendar--${granularity}`),"data-attr":"lemon-calendar",children:[(0,utils.w6)(0,months).map(month=>{let startOfMonth=leftmostMonth.add(month,"month").startOf("month"),endOfMonth=startOfMonth.add(1,"day").endOf("month"),firstDay=startOfMonth.subtract((startOfMonth.day()-weekStartDay+7)%7,"days"),lastDay=endOfMonth.add(((weekStartDay+6)%7-endOfMonth.day()+7)%7,"days"),weeks=lastDay.diff(firstDay,"week")+1,showLeftMonth=0===month,showRightMonth=month+1===months;return(0,jsx_runtime.jsxs)("table",{className:"LemonCalendar__month","data-attr":"lemon-calendar-month",children:[(0,jsx_runtime.jsxs)("thead",{children:[(0,jsx_runtime.jsxs)("tr",{className:"LemonCalendar__month-header",children:[(0,jsx_runtime.jsx)("th",{className:"relative",children:showLeftMonth&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"lemon-calendar-month-previous",className:"absolute-left",onClick:()=>{let newDate=leftmostMonth.subtract(1,"month");setLeftmostMonth(newDate),props.onLeftmostMonthChanged?.(newDate)},icon:(0,jsx_runtime.jsx)(icons.ed,{})})}),(0,jsx_runtime.jsxs)("th",{className:"relative font-title font-semibold text-muted-alt uppercase cursor-default text-center","data-attr":`lemon-calendar-month-title-${month}`,colSpan:5,children:[startOfMonth.format("MMMM")," ",startOfMonth.year()]}),(0,jsx_runtime.jsx)("th",{className:"relative",children:showRightMonth&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"lemon-calendar-month-next",className:"absolute-right",onClick:()=>{let newDate=leftmostMonth.add(1,"month");setLeftmostMonth(newDate),props.onLeftmostMonthChanged?.(newDate)},icon:(0,jsx_runtime.jsx)(icons.VG,{})})})]}),(0,jsx_runtime.jsx)("tr",{children:(0,utils.w6)(0,7).map(day=>(0,jsx_runtime.jsx)("th",{className:"py-2 text-xs font-bold text-muted-alt uppercase",children:dayLabels[firstDay.add(day,"day").day()]},day))})]}),(0,jsx_runtime.jsx)("tbody",{children:(0,utils.w6)(0,weeks).map(week=>(0,jsx_runtime.jsx)("tr",{"data-attr":"lemon-calendar-week",children:(0,utils.w6)(0,7).map(day=>{var _props$getLemonButton;let date=firstDay.add(7*week+day,"day"),defaultProps={className:(0,clsx_m.default)("flex-col",{"opacity-25":date.isBefore(startOfMonth)||date.isAfter(endOfMonth),LemonCalendar__today:date.isSame(today,"d")})},buttonProps=null!==(_props$getLemonButton=props.getLemonButtonProps?.({dayIndex:day,weekIndex:week,date,props:defaultProps}))&&void 0!==_props$getLemonButton?_props$getLemonButton:defaultProps;return(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,center:!0,"data-attr":"lemon-calendar-day",onClick:()=>props.onDateClick?.(date),...buttonProps,children:date.date()})},day)})},week))})]},month)}),"day"!=granularity&&(0,jsx_runtime.jsxs)("div",{className:"LemonCalendar__time absolute top-0 bottom-0 right-0 flex divide-x border-l",children:[(0,jsx_runtime.jsxs)(ScrollableShadows.D,{direction:"vertical",children:[[12,1,2,3,4,5,6,7,8,9,10,11].map(hour=>{let buttonProps=props.getLemonButtonTimeProps?.({unit:"h",value:hour});return(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,...buttonProps,children:(0,jsx_runtime.jsx)("span",{className:"w-full text-center px-2",children:String(hour).padStart(2,"0")})},hour)}),(0,jsx_runtime.jsx)("div",{className:"LemonCalendar__time--scroll-spacer"})]}),"minute"===granularity&&(0,jsx_runtime.jsxs)(ScrollableShadows.D,{direction:"vertical",children:[(0,utils.w6)(0,60).map(minute=>{let buttonProps=props.getLemonButtonTimeProps?.({unit:"m",value:minute});return(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,...buttonProps,children:(0,jsx_runtime.jsx)("span",{className:"w-full text-center px-2",children:String(minute).padStart(2,"0")})},minute)}),(0,jsx_runtime.jsx)("div",{className:"LemonCalendar__time--scroll-spacer"})]}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,...props.getLemonButtonTimeProps?.({unit:"a",value:"am"}),children:(0,jsx_runtime.jsx)("span",{className:"w-full text-center",children:"AM"})}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,...props.getLemonButtonTimeProps?.({unit:"a",value:"pm"}),children:(0,jsx_runtime.jsx)("span",{className:"w-full text-center",children:"PM"})})]})]})]})})},"./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendarSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{bA:()=>LemonCalendarSelect,he:()=>LemonCalendarSelectInput});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_dayjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonCalendar_LemonCalendar__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx"),react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_LemonSwitch__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSwitch/index.ts"),_Popover__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function timeDataAttr(_ref){let{unit,value}=_ref;return`${value}-${unit}`}function scrollToTimeElement(calendarEl,props,skipAnimation){calendarEl?.querySelector(`[data-attr="${timeDataAttr(props)}"]`)?.scrollIntoView({block:"start",inline:"nearest",behavior:skipAnimation?"instant":"smooth"})}function proposedDate(target,_ref2){let{value,unit}=_ref2,date=target||(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_1__.Bv)().startOf("day");return value!=date.format(unit)&&("h"===unit?date=date.hour("am"===date.format("a")||12===value?Number(value):Number(value)+12):"m"===unit?date=date.minute(Number(value)):"a"===unit&&(date="am"===value?date.subtract(12,"hour"):date.add(12,"hour"))),date}function LemonCalendarSelect(_ref3){let{value,onChange,months,onClose,granularity="day",selectionPeriod,showTimeToggle,onToggleTime}=_ref3,calendarRef=(0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null),[selectValue,setSelectValue]=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(value?value.startOf(granularity):null),now=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_1__.Bv)(),today=now.startOf("day"),isAM=(0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(()=>selectValue?.format("a")==="am",[selectValue]),scrollToTime=(date,skipAnimation)=>{let calendarEl=calendarRef.current;if(calendarEl&&date){let hour=isAM?date.hour():date.hour()-12;scrollToTimeElement(calendarEl,{unit:"h",value:hour},skipAnimation),scrollToTimeElement(calendarEl,{unit:"m",value:date.minute()},skipAnimation)}};(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(()=>{selectValue&&scrollToTime(selectValue,!0)},[]);let onTimeClick=props=>{let date=proposedDate(selectValue,props);scrollToTime(date,!1),setSelectValue(date)};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:"LemonCalendarSelect","data-attr":"lemon-calendar-select",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:"flex justify-between border-b p-2 pb-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("h3",{className:"text-base mb-0",children:"Select a date"}),onClose&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),size:"small",onClick:onClose,"aria-label":"close",noPadding:!0})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonCalendar_LemonCalendar__WEBPACK_IMPORTED_MODULE_3__.I,{ref:calendarRef,onDateClick:date=>{date&&(date="minute"===granularity?date.minute(null===selectValue?now.minute():selectValue.minute()):date.startOf("minute"),scrollToTime(date=["hour","minute"].includes(granularity)?date.hour(null===selectValue?now.hour():selectValue.hour()):date.startOf("hour"),!0)),setSelectValue(date)},leftmostMonth:selectValue?.startOf("month"),months:months,getLemonButtonProps:_ref4=>{let{date,props}=_ref4,modifiedProps={...props};if(selectionPeriod){let isToday=date.isSame(today,"date");if("upcoming"===selectionPeriod&&date.isBefore(today))modifiedProps.disabledReason="Cannot select dates in the past";else if("past"===selectionPeriod&&date.isAfter(today))modifiedProps.disabledReason="Cannot select dates in the future";else if(selectValue&&isToday){let selectedTimeOnDate=date.clone().hour(selectValue.hour()).minute(selectValue.minute());"upcoming"===selectionPeriod&&selectedTimeOnDate.isBefore(now)?modifiedProps.disabledReason="Pick a time in the future first":"past"===selectionPeriod&&selectedTimeOnDate.isAfter(now)&&(modifiedProps.disabledReason="Pick a time in the past first")}}return date.isSame(selectValue,"d")?{...modifiedProps,status:"default",type:"primary"}:modifiedProps},getLemonButtonTimeProps:props=>{let selected=selectValue?selectValue.format(props.unit):null,newDate=proposedDate(selectValue,props),periodValidityDisabledReason="upcoming"===selectionPeriod&&newDate.isBefore(now)?"Cannot choose a time in the past":"past"===selectionPeriod&&newDate.isAfter(now)?"Cannot choose a time in the future":void 0,disabledReason=selectValue?periodValidityDisabledReason:"Choose a date first";return{active:selected===String(props.value),className:"rounded-none","data-attr":timeDataAttr(props),disabledReason:disabledReason,onClick:()=>{selected!=props.value&&onTimeClick(props)}}},granularity:granularity}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_8__.default)("flex space-x-2 items-center border-t p-2 pt-4",showTimeToggle?"justify-between":"justify-end"),children:[showTimeToggle&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_LemonSwitch__WEBPACK_IMPORTED_MODULE_5__.f,{label:"Include time?",checked:"day"!=granularity,onChange:onToggleTime,bordered:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:"flex space-x-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{type:"secondary",onClick:onClose,"data-attr":"lemon-calendar-select-cancel",children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{type:"primary",disabled:!selectValue,onClick:()=>selectValue&&onChange&&onChange(selectValue),"data-attr":"lemon-calendar-select-apply",children:"Apply"})]})]})]})}function LemonCalendarSelectInput(props){var _ref5,_props$value$format,_props$format;let{buttonProps,placeholder,clearable,visible:controlledVisible,...calendarProps}=props,[uncontrolledVisible,setUncontrolledVisible]=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),showClear=props.value&&clearable;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Popover__WEBPACK_IMPORTED_MODULE_6__.J2,{actionable:!0,onClickOutside:()=>{setUncontrolledVisible(!1),props.onClickOutside?.()},visible:null!=controlledVisible?controlledVisible:uncontrolledVisible,overlay:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(LemonCalendarSelect,{...calendarProps,onChange:value=>{props.onChange?.(value),setUncontrolledVisible(!1)},onClose:()=>{setUncontrolledVisible(!1),props.onClose?.()}}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{onClick:()=>setUncontrolledVisible(!0),type:"secondary",fullWidth:!0,sideAction:showClear?{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),onClick:()=>props.onChange?.(null)}:void 0,...props.buttonProps,children:null!==(_ref5=null!==(_props$value$format=props.value?.format(null!==(_props$format=props.format)&&void 0!==_props$format?_props$format:`MMMM D, YYYY${"minute"===props.granularity?" h:mm A":"hour"===props.granularity?" h A":""}`))&&void 0!==_props$value$format?_props$value$format:placeholder)&&void 0!==_ref5?_ref5:"Select date"})})}},"./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRange.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>LemonCalendarRange});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/utils.tsx"),react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_LemonCalendarRangeInline__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonCalendarRange(_ref){let{value,onChange,onClose,months}=_ref,[[rangeStart,rangeEnd],setRange]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)([value?.[0]?value[0].startOf("day"):null,value?.[1]?value[1].endOf("day"):null]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"LemonCalendarRange","data-attr":"lemon-calendar-range",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex justify-between border-b p-2 pb-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h3",{className:"text-base mb-0",children:"Select a date range"}),onClose&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),size:"small",noPadding:!0,onClick:onClose,"aria-label":"close"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div",{className:"p-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_LemonCalendarRangeInline__WEBPACK_IMPORTED_MODULE_4__.S,{value:value,onChange:setRange,months:months})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex space-x-2 justify-end items-center border-t p-2 pt-4",children:[rangeStart&&rangeEnd&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{className:"flex-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span",{className:"text-muted",children:"Selected period:"})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span",{children:rangeStart.isSame(rangeEnd,"d")?(0,lib_utils__WEBPACK_IMPORTED_MODULE_2__.p6)(rangeStart):(0,lib_utils__WEBPACK_IMPORTED_MODULE_2__._Q)(rangeStart,rangeEnd)})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{type:"secondary",onClick:onClose,"data-attr":"lemon-calendar-range-cancel",children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{type:"primary",disabled:!rangeStart||!rangeEnd,onClick:rangeStart&&rangeEnd?()=>onChange([rangeStart,rangeEnd]):void 0,"data-attr":"lemon-calendar-range-apply",children:"Apply"})]})]})]})}},"./frontend/src/lib/lemon-ui/LemonCalendarRange/LemonCalendarRangeInline.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>LemonCalendarRangeInline});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_lemon_ui_LemonCalendar_LemonCalendar__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonCalendarRangeInline(_ref){var _value$,_value$2,_ref3;let{value,onChange,months}=_ref,[[rangeStart,rangeEnd,lastChanged],_setRange]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)([null!==(_value$=value?.[0])&&void 0!==_value$?_value$:null,null!==(_value$2=value?.[1])&&void 0!==_value$2?_value$2:null,"end"]);function setRange(_ref2){let[rangeStart,rangeEnd,lastChanged]=_ref2;_setRange([rangeStart,rangeEnd?rangeEnd.endOf("day"):null,lastChanged]),rangeStart&&rangeEnd&&onChange([rangeStart,rangeEnd.endOf("day")])}function getMonthCount(){let width="undefined"==typeof window?600:window.innerWidth;return Math.min(Math.max(1,Math.floor(width/300)),2)}let[autoMonthCount,setAutoMonthCount]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(getMonthCount());(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{let listener=()=>{autoMonthCount!==getMonthCount()&&setAutoMonthCount(getMonthCount())};return window.addEventListener("resize",listener),()=>window.removeEventListener("resize",listener)},[autoMonthCount]);let shownMonths=null!=months?months:autoMonthCount,rangeMonthDiff=rangeStart&&rangeEnd?rangeEnd.startOf("month").diff(rangeStart.startOf("month"),"month"):0,leftmostMonthForRange=(null!==(_ref3=null!=rangeStart?rangeStart:rangeEnd)&&void 0!==_ref3?_ref3:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_0__.Bv)()).subtract(Math.max(0,shownMonths-1-rangeMonthDiff),"month").startOf("month"),[leftmostMonth,setLeftmostMonth]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(leftmostMonthForRange);return(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{let lastMonthForRange=leftmostMonthForRange.add(shownMonths-1,"month").endOf("month");rangeStart&&rangeEnd&&(rangeStart.isAfter(lastMonthForRange)||rangeEnd.isBefore(leftmostMonthForRange))&&setLeftmostMonth(leftmostMonthForRange)},[rangeStart,rangeEnd]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_lemon_ui_LemonCalendar_LemonCalendar__WEBPACK_IMPORTED_MODULE_1__.I,{onDateClick:date=>{rangeStart||rangeEnd?rangeStart&&!rangeEnd?setRange(daterangeEnd?setRange([rangeStart,date,"end"]):"start"===lastChanged?setRange([rangeStart,date,"end"]):setRange([date,rangeEnd,"start"])):setRange([date,date,"start"])},leftmostMonth:leftmostMonth,onLeftmostMonthChanged:setLeftmostMonth,months:shownMonths,getLemonButtonProps:_ref4=>{let{date,props,dayIndex}=_ref4;return date.isSame(rangeStart,"d")||date.isSame(rangeEnd,"d")?{...props,className:date.isSame(rangeStart,"d")&&date.isSame(rangeEnd,"d")?props.className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)(props.className,{"rounded-r-none":date.isSame(rangeStart,"d")&&dayIndex<6,"rounded-l-none":date.isSame(rangeEnd,"d")&&dayIndex>0},"LemonCalendar__range--boundary"),type:"primary"}:rangeStart&&rangeEnd&&date>rangeStart&&date{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>LemonCard_LemonCard_LemonCard});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonCard=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCard/LemonCard.scss"),LemonCard_default=__webpack_require__.n(LemonCard),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonCard_default(),options),LemonCard_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonCard_LemonCard_LemonCard(_ref){let{hoverEffect=!0,className,children,onClick,focused,closeable,onClose,...props}=_ref;return(0,jsx_runtime.jsxs)("div",{className:`LemonCard ${hoverEffect&&"LemonCard--hoverEffect"} border ${focused?"border-2 border-primary":"border-border"} rounded p-6 bg-bg-light ${onClick&&!focused?"cursor-pointer":""} ${className}`,onClick:onClick,...props,children:[closeable?(0,jsx_runtime.jsx)("div",{className:"absolute top-2 right-2",children:(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:e=>{e.stopPropagation(),onClose?.()},type:"tertiary",size:"xsmall"})}):null,children]})}},"./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>LemonCheckbox_LemonCheckbox_LemonCheckbox});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonCheckbox=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss"),LemonCheckbox_default=__webpack_require__.n(LemonCheckbox),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonCheckbox_default(),options),LemonCheckbox_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let checkboxCounter=0;function LemonCheckbox_LemonCheckbox_LemonCheckbox(_ref){var _ref2;let{checked,defaultChecked,disabled,disabledReason,onChange,label,id:rawId,className,labelClassName,fullWidth,bordered,color,size,dataAttr}=_ref,indeterminate="indeterminate"===checked;disabled=disabled||!!disabledReason;let id=(0,react.useMemo)(()=>rawId||`lemon-checkbox-${checkboxCounter++}`,[rawId]),[localChecked,setLocalChecked]=(0,react.useState)(indeterminate||null!==(_ref2=null!=checked?checked:defaultChecked)&&void 0!==_ref2&&_ref2),[wasIndeterminateLast,setWasIndeterminateLast]=(0,react.useState)(!1);return(0,react.useEffect)(()=>{void 0!==checked&&setLocalChecked(!!checked)},[checked]),(0,react.useEffect)(()=>{checked&&setWasIndeterminateLast(indeterminate)},[checked,indeterminate]),(0,jsx_runtime.jsx)(Tooltip.u,{title:disabledReason?(0,jsx_runtime.jsx)("i",{children:disabledReason}):null,placement:"top-start",children:(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("LemonCheckbox",localChecked&&"LemonCheckbox--checked",wasIndeterminateLast&&"LemonCheckbox--indeterminate",bordered&&"LemonCheckbox--bordered",disabled&&"LemonCheckbox--disabled",fullWidth&&"LemonCheckbox--full-width",size&&`LemonCheckbox--${size}`,className),"data-attr":dataAttr,children:[(0,jsx_runtime.jsx)("input",{className:"LemonCheckbox__input",type:"checkbox",checked:localChecked,defaultChecked:defaultChecked,onChange:e=>{void 0===checked&&setLocalChecked(e.target.checked),onChange?.(e.target.checked)},id:id,disabled:disabled}),(0,jsx_runtime.jsxs)("label",{htmlFor:id,style:color?{"--box-color":color}:{},className:labelClassName,children:[(0,jsx_runtime.jsx)("svg",{className:"LemonCheckbox__box",fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)("path",{d:wasIndeterminateLast?"m3.5 8h9":"m3.5 8 3 3 6-6",strokeWidth:"2"})}),label&&(0,jsx_runtime.jsx)("span",{className:"LemonCheckbox__label",children:label})]})]})})}},"./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>_LemonCheckbox__WEBPACK_IMPORTED_MODULE_0__.H});var _LemonCheckbox__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.tsx")},"./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J:()=>LemonCollapse_LemonCollapse_LemonCollapse});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonCollapse=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.scss"),LemonCollapse_default=__webpack_require__.n(LemonCollapse),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonCollapse_default(),options),LemonCollapse_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Transition=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/Transition.js"),bundle_esm=__webpack_require__("./node_modules/.pnpm/use-resize-observer@8.0.0_react-dom@18.2.0_react@18.2.0/node_modules/use-resize-observer/dist/bundle.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonCollapse_LemonCollapse_LemonCollapse(_ref){var _props$defaultActiveK,_props$defaultActiveK2,_props$activeKey;let isPanelExpanded,onPanelChange,{panels,className,size,embedded,...props}=_ref;if(props.multiple){let[localActiveKeys,setLocalActiveKeys]=(0,react.useState)(new Set(null!==(_props$defaultActiveK=props.defaultActiveKeys)&&void 0!==_props$defaultActiveK?_props$defaultActiveK:[])),effectiveActiveKeys=props.activeKeys?new Set(props.activeKeys):localActiveKeys;isPanelExpanded=key=>effectiveActiveKeys.has(key),onPanelChange=(key,isExpanded)=>{let newActiveKeys=new Set(effectiveActiveKeys);isExpanded?newActiveKeys.add(key):newActiveKeys.delete(key),props.onChange?.(Array.from(newActiveKeys)),setLocalActiveKeys(newActiveKeys)}}else{let[localActiveKey,setLocalActiveKey]=(0,react.useState)(null!==(_props$defaultActiveK2=props.defaultActiveKey)&&void 0!==_props$defaultActiveK2?_props$defaultActiveK2:null),effectiveActiveKey=null!==(_props$activeKey=props.activeKey)&&void 0!==_props$activeKey?_props$activeKey:localActiveKey;isPanelExpanded=key=>key===effectiveActiveKey,onPanelChange=(key,isExpanded)=>{props.onChange?.(isExpanded?key:null),setLocalActiveKey(isExpanded?key:null)}}let displayPanels=panels.filter(Boolean),hasExpandablePanels=displayPanels.some(p=>!!p.content);return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonCollapse",embedded&&"LemonCollapse--embedded",className),children:displayPanels.map(_ref2=>{let{key,...panel}=_ref2;return(0,jsx_runtime.jsx)(LemonCollapsePanel,{...panel,size:size,isExpanded:isPanelExpanded(key),indexUnexpanableHeader:hasExpandablePanels,onChange:isExanded=>onPanelChange(key,isExanded)},key)})})}function LemonCollapsePanel(_ref3){let{header,content,isExpanded,size,className,dataAttr,indexUnexpanableHeader,onChange,onHeaderClick}=_ref3,{height:contentHeight,ref:contentRef}=(0,bundle_esm.Z)({box:"border-box"});return(0,jsx_runtime.jsxs)("div",{className:"LemonCollapsePanel","aria-expanded":isExpanded,children:[content?(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{onHeaderClick&&onHeaderClick(),onChange(!isExpanded)},icon:isExpanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),className:"LemonCollapsePanel__header",...dataAttr?{"data-attr":dataAttr}:{},size:size,children:header}):(0,jsx_runtime.jsx)(LemonButton.J,{className:"LemonCollapsePanel__header LemonCollapsePanel__header--disabled",...dataAttr?{"data-attr":dataAttr}:{},size:size,icon:indexUnexpanableHeader?(0,jsx_runtime.jsx)("div",{className:"w-[1em] h-[1em]"}):null,children:header}),(0,jsx_runtime.jsx)(Transition.ZP,{in:isExpanded,timeout:200,mountOnEnter:!0,unmountOnExit:!0,children:status=>(0,jsx_runtime.jsx)("div",{className:"LemonCollapsePanel__body",style:status===Transition.d0||status===Transition.cn?{height:contentHeight}:void 0,"aria-busy":status.endsWith("ing"),children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonCollapsePanel__content",className),ref:contentRef,children:content})})})]})}LemonCollapse_LemonCollapse_LemonCollapse.Panel=LemonCollapsePanel},"./frontend/src/lib/lemon-ui/LemonCollapse/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J:()=>_LemonCollapse__WEBPACK_IMPORTED_MODULE_0__.J});var _LemonCollapse__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx")},"./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>LemonDialog,k:()=>LemonFormDialog});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),client=__webpack_require__("./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js");let lemonDialogLogic=(0,index_esm.kea)([(0,index_esm.path)(["components","lemon-dialog","lemonDialogLogic"]),(0,index_esm.props)({}),(0,lib.forms)(_ref=>{let{props}=_ref;return{form:{defaults:{},errors:values=>{let entries=Object.entries(props.errors||[]).map(_ref2=>{let[key,valueOf]=_ref2,result=valueOf(values[key]);return[key,result]});return Object.fromEntries(entries)}}}})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonDialog(_ref){let{onAfterClose,onClose,primaryButton,tertiaryButton,secondaryButton,content,initialFormValues,closeOnNavigate=!0,shouldAwaitSubmit=!1,footer,...props}=_ref,[isOpen,setIsOpen]=(0,react.useState)(!0),{currentLocation}=(0,index_esm.useValues)(kea_router_lib.router),lastLocation=(0,react.useRef)(currentLocation.pathname),[isLoading,setIsLoading]=(0,react.useState)(!1);(primaryButton=primaryButton||(null===primaryButton?null:{children:"Okay"}))&&(primaryButton.type=primaryButton.type||"primary");let renderButton=button=>button?(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",...button,loading:button===primaryButton&&shouldAwaitSubmit?isLoading:void 0,onClick:async e=>{if(button===primaryButton&&shouldAwaitSubmit){setIsLoading(!0);try{await button.onClick?.(e)}finally{setIsLoading(!1)}}else button.onClick?.(e);setIsOpen(!1)}}):null;return(0,react.useEffect)(()=>{lastLocation.current!==currentLocation.pathname&&closeOnNavigate&&setIsOpen(!1),lastLocation.current=currentLocation.pathname},[currentLocation]),(0,jsx_runtime.jsx)(LemonModal.f,{...props,isOpen:isOpen,onClose:()=>setIsOpen(!1),onAfterClose:()=>onAfterClose?.(),footer:footer||(primaryButton||secondaryButton||tertiaryButton?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:renderButton(tertiaryButton)}),renderButton(secondaryButton),renderButton(primaryButton)]}):null),children:content})}let LemonFormDialog=_ref2=>{let{initialValues={},onSubmit,errors,...props}=_ref2,logic=lemonDialogLogic({errors}),{form,isFormValid,formValidationErrors}=(0,index_esm.useValues)(logic),{setFormValues}=(0,index_esm.useActions)(logic),firstError=(0,react.useMemo)(()=>Object.values(formValidationErrors)[0],[formValidationErrors]),primaryButton={type:"primary",children:"Submit",htmlType:"submit",onClick:props.shouldAwaitSubmit?async()=>await onSubmit(form):()=>void onSubmit(form),disabledReason:isFormValid?void 0:firstError};return(0,react.useEffect)(()=>{setFormValues(initialValues)},[]),(0,jsx_runtime.jsx)(lib.Form,{logic:lemonDialogLogic,formKey:"form",onKeyDown:e=>{"Enter"===e.key&&primaryButton?.htmlType==="submit"&&isFormValid&&onSubmit(form)},children:(0,jsx_runtime.jsx)(LemonDialog,{...props,primaryButton:primaryButton,secondaryButton:{type:"secondary",children:"Cancel"}})})};function createAndInsertRoot(){let div=document.createElement("div"),root=(0,client.createRoot)(div);return document.body.appendChild(div),{root,onDestroy:function(){root.unmount(),div.parentNode&&div.parentNode.removeChild(div)}}}LemonDialog.open=props=>{let{root,onDestroy}=createAndInsertRoot();root.render((0,jsx_runtime.jsx)(LemonDialog,{...props,onAfterClose:onDestroy}))},LemonDialog.openForm=props=>{let{root,onDestroy}=createAndInsertRoot();root.render((0,jsx_runtime.jsx)(LemonFormDialog,{...props,onAfterClose:onDestroy}))}},"./frontend/src/lib/lemon-ui/LemonDialog/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>_LemonDialog__WEBPACK_IMPORTED_MODULE_0__.d});var _LemonDialog__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx")},"./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>LemonDivider_LemonDivider_LemonDivider});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonDivider=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.scss"),LemonDivider_default=__webpack_require__.n(LemonDivider),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonDivider_default(),options),LemonDivider_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonDivider_LemonDivider_LemonDivider(_ref){let{vertical=!1,dashed=!1,thick=!1,label,className}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonDivider",vertical&&"LemonDivider--vertical",thick&&"LemonDivider--thick",dashed&&"LemonDivider--dashed",!!label&&"LemonDivider--with-label",!className&&(vertical?"m-2":"my-2"),className),role:"separator",children:label&&(0,jsx_runtime.jsx)("div",{className:"px-3 text-xs whitespace-nowrap font-semibold",children:label})})}},"./frontend/src/lib/lemon-ui/LemonDivider/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>_LemonDivider__WEBPACK_IMPORTED_MODULE_0__.p});var _LemonDivider__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.tsx")},"./frontend/src/lib/lemon-ui/LemonDropdown/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>LemonDropdown});var react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonDropdown=react.forwardRef((_ref,ref)=>{let{visible,onVisibilityChange,onClickOutside,onClickInside,onMouseLeaveInside,closeOnClickInside=!0,trigger="click",children,...popoverProps}=_ref,isControlled=void 0!==visible,[,parentPopoverLevel]=(0,react.useContext)(Popover.Mp),[localVisible,setLocalVisible]=(0,react.useState)(null!=visible&&visible),floatingRef=(0,react.useRef)(null),referenceRef=(0,react.useRef)(null),effectiveVisible=null!=visible?visible:localVisible,setVisible=value=>{isControlled||setLocalVisible(value),onVisibilityChange?.(value)};return(0,jsx_runtime.jsx)(Popover.J2,{ref:ref,floatingRef:floatingRef,referenceRef:referenceRef,onClickOutside:e=>{"click"===trigger&&setVisible(!1),onClickOutside?.(e)},onClickInside:e=>{e.stopPropagation(),closeOnClickInside&&setVisible(!1),onClickInside?.(e)},onMouseLeaveInside:e=>{"hover"!==trigger||referenceRef.current?.contains(e.relatedTarget)||setVisible(!1),onMouseLeaveInside?.(e)},visible:effectiveVisible,...popoverProps,children:react.cloneElement(children,{onClick:e=>{setVisible(!effectiveVisible),children.props.onClick?.(e),parentPopoverLevel>-1&&e.stopPropagation()},onMouseEnter:()=>{"hover"===trigger&&setVisible(!0)},onMouseLeave:e=>{"hover"!==trigger||floatingRef.current?.contains(e.relatedTarget)||setVisible(!1)},"aria-haspopup":"true"})})});LemonDropdown.displayName="Dropdown"},"./frontend/src/lib/lemon-ui/LemonField/LemonField.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>LemonField});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea_forms_lib_components__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/components.js"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonLabel_LemonLabel__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonPureField=_ref=>{let{label,info,error,help,htmlFor,showOptional,onExplanationClick,className,children,inline,onClick,renderError}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{onClick:onClick,className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)("Field flex",{"gap-2":!className||-1===className.indexOf("gap-")},className,error&&"Field--error",inline?"flex-row":"flex-col"),children:[label?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_lemon_ui_LemonLabel_LemonLabel__WEBPACK_IMPORTED_MODULE_2__.H,{info:info,showOptional:showOptional,onExplanationClick:onExplanationClick,className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)({"cursor-pointer":!!onClick}),htmlFor:htmlFor,children:label}):null,children,help?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"text-muted text-xs",children:help}):null,"string"==typeof error?renderError?renderError(error):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:"text-danger flex items-center gap-1 text-sm",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_1__.b8,{className:"text-xl shrink-0"})," ",error]}):null]})},LemonField=_ref2=>{let{name,help,className,showOptional,inline,info,renderError,...keaFieldProps}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(kea_forms_lib_components__WEBPACK_IMPORTED_MODULE_0__.Field,{...keaFieldProps,name:name,template:_ref3=>{let{label,kids,error}=_ref3;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(LemonPureField,{label:label,error:error,help:help,className:className,showOptional:showOptional,inline:inline,info:info,renderError:renderError,children:kids})},noStyle:!0})};LemonField.Pure=LemonPureField},"./frontend/src/lib/lemon-ui/LemonField/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>_LemonField__WEBPACK_IMPORTED_MODULE_0__.D});var _LemonField__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/LemonField.tsx")},"./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>LemonFileInput_LemonFileInput_LemonFileInput});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonFileInput=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.scss"),LemonFileInput_default=__webpack_require__.n(LemonFileInput),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonFileInput_default(),options),LemonFileInput_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonFileInput_LemonFileInput_LemonFileInput=_ref=>{let{value,onChange,multiple,loading,accept,alternativeDropTargetRef,callToAction,showUploadedFiles=!0}=_ref,[files,setFiles]=(0,react.useState)(value||value||[]),dragCounter=0,[drag,setDrag]=(0,react.useState)(!1),dropRef=(0,react.createRef)();(0,react.useEffect)(()=>{value&&value!==files&&setFiles(value)},[value]);let handleDrag=e=>{e.preventDefault(),e.stopPropagation()},handleDragIn=e=>{e.preventDefault(),e.stopPropagation(),dragCounter++,e.dataTransfer?.items&&e.dataTransfer.items.length>0&&setDrag(!0)},handleDragOut=e=>{e.preventDefault(),e.stopPropagation(),0==--dragCounter&&setDrag(!1)},handleDrop=e=>{if(e.preventDefault(),e.stopPropagation(),setDrag(!1),e.dataTransfer?.files&&e.dataTransfer.files.length>0){let filesArr=Array.prototype.slice.call(e.dataTransfer?.files),localFiles=multiple?[...files,...filesArr]:[filesArr[0]];setFiles(localFiles),onChange?.(localFiles),dragCounter=0}};return(0,react.useEffect)(()=>{let div=(alternativeDropTargetRef||dropRef)?.current;if(div)return div.addEventListener("dragenter",handleDragIn),div.addEventListener("dragleave",handleDragOut),div.addEventListener("dragover",handleDrag),div.addEventListener("drop",handleDrop),()=>{div?.removeEventListener("dragenter",handleDragIn),div?.removeEventListener("dragleave",handleDragOut),div?.removeEventListener("dragover",handleDrag),div?.removeEventListener("drop",handleDrop)}},[value]),(0,react.useEffect)(()=>{let extraDragTarget=alternativeDropTargetRef?.current;extraDragTarget&&(extraDragTarget.classList.add("FileDropTarget"),drag?extraDragTarget.classList.add("FileDropTarget--active"):extraDragTarget.classList.remove("FileDropTarget--active"))},[drag,alternativeDropTargetRef]),(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{ref:dropRef,className:(0,clsx_m.default)("FileDropTarget flex flex-col gap-1",!alternativeDropTargetRef?.current&&drag&&"FileDropTarget--active"),children:[(0,jsx_runtime.jsxs)("label",{className:"text-muted inline-flex flow-row items-center gap-1 cursor-pointer",children:[(0,jsx_runtime.jsx)("input",{className:"hidden",type:"file",multiple:multiple,accept:accept,onChange:e=>{e.preventDefault(),e.stopPropagation();let eventFiles=e.target.files,filesArr=Array.prototype.slice.call(eventFiles);if(filesArr.length>0){let localFiles=multiple?[...files,...filesArr]:filesArr.slice(0,1);setFiles(localFiles),onChange?.(localFiles)}}}),callToAction||(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(icons.bn,{className:"text-2xl"})," Click or drag and drop to upload",accept?` ${function(accept){let match=accept.match(/(\w+)\/\*/);return match?`${match[1]}s`:accept.startsWith(".")?`${accept.slice(1).toUpperCase()} files`:"files"}(accept)}`:""]})]}),files.length>0&&showUploadedFiles&&(0,jsx_runtime.jsx)("div",{className:"flex flex-row gap-2",children:files.map((x,i)=>(0,jsx_runtime.jsx)(LemonTag.o,{icon:loading?(0,jsx_runtime.jsx)(Spinner.$,{}):void 0,children:x.name},i))})]})})}},"./frontend/src/lib/lemon-ui/LemonFileInput/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>_LemonFileInput__WEBPACK_IMPORTED_MODULE_0__.m});var _LemonFileInput__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.tsx")},"./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>LemonInput_LemonInput_LemonInput});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonInput=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss"),LemonInput_default=__webpack_require__.n(LemonInput),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonInput_default(),options),LemonInput_default().locals;var floating_ui_react=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),RawInputAutosize=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/RawInputAutosize.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonInput_LemonInput_LemonInput=react.forwardRef(function _LemonInput(_ref,ref){var _allowClear,_prefix,_suffix;let{className,onChange,onFocus,onBlur,onPressEnter,status="default",allowClear,fullWidth,autoWidth,prefix,suffix,type,value,transparentBackground=!1,size="medium",stopPropagation=!1,inputRef,...props}=_ref,internalInputRef=(0,react.useRef)(null),mergedInputRef=(0,floating_ui_react.qq)([inputRef,internalInputRef]),[focused,setFocused]=(0,react.useState)(!!props.autoFocus),[passwordVisible,setPasswordVisible]=(0,react.useState)(!1);if(autoWidth&&fullWidth)throw Error("Cannot use `autoWidth` and `fullWidth` props together");let focus=()=>{internalInputRef.current?.focus(),setFocused(!0)};"search"===type?(allowClear=null===(_allowClear=allowClear)||void 0===_allowClear||_allowClear,prefix=null!==(_prefix=prefix)&&void 0!==_prefix?_prefix:(0,jsx_runtime.jsx)(posthog_icons_es.IconSearch,{})):"password"===type&&(suffix=null!==(_suffix=suffix)&&void 0!==_suffix?_suffix:(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",noPadding:!0,icon:passwordVisible?(0,jsx_runtime.jsx)(icons.$L,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconEye,{}),tooltip:passwordVisible?"Hide password":"Show password",onClick:e=>{e.stopPropagation(),focus(),setPasswordVisible(!passwordVisible)}})),allowClear&&value&&(suffix=(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:"Clear input",onClick:e=>{e.stopPropagation(),"number"===type?onChange?.(0):onChange?.(""),focus()}}));let InputComponent=autoWidth?RawInputAutosize.S:"input";return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("LemonInput","default"!==status&&`LemonInput--status-${status}`,type&&`LemonInput--type-${type}`,size&&`LemonInput--${size}`,fullWidth&&"LemonInput--full-width",value&&"LemonInput--has-content",!props.disabled&&focused&&"LemonInput--focused",transparentBackground&&"LemonInput--transparent-background",className),"aria-disabled":props.disabled,onClick:()=>focus(),ref:ref,children:[prefix,(0,jsx_runtime.jsx)(InputComponent,{className:"LemonInput__input",ref:mergedInputRef,type:("password"===type&&passwordVisible?"text":type)||"text",value:value,onChange:event=>{if(stopPropagation&&event.stopPropagation(),"number"===type)onChange?.(event.currentTarget.valueAsNumber);else{var _event$currentTarget$;onChange?.(null!==(_event$currentTarget$=event.currentTarget.value)&&void 0!==_event$currentTarget$?_event$currentTarget$:"")}},onFocus:event=>{stopPropagation&&event.stopPropagation(),setFocused(!0),onFocus?.(event)},onBlur:event=>{stopPropagation&&event.stopPropagation(),setFocused(!1),onBlur?.(event)},onKeyDown:event=>{stopPropagation&&event.stopPropagation(),onPressEnter&&"Enter"===event.key&&onPressEnter(event)},...props}),suffix]})})},"./frontend/src/lib/lemon-ui/LemonInput/RawInputAutosize.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>RawInputAutosize});var _floating_ui_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let RawInputAutosize=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function RawInputAutosize(_ref,ref){let{wrapperClassName,...inputProps}=_ref,[inputWidth,setInputWidth]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1),[inputStyles,setInputStyles]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),sizerRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),placeHolderSizerRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),inputRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),mergedRefs=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_2__.qq)([ref,inputRef]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(()=>{inputRef.current&&setInputStyles(getComputedStyle(inputRef.current))},[inputRef.current]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(()=>{inputStyles&&(sizerRef.current&©Styles(inputStyles,sizerRef.current),placeHolderSizerRef.current&©Styles(inputStyles,placeHolderSizerRef.current))},[inputStyles]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(()=>{let newInputWidth;sizerRef.current&&placeHolderSizerRef.current&&(newInputWidth=inputProps.placeholder&&!inputProps.value?Math.max(sizerRef.current.scrollWidth,placeHolderSizerRef.current.scrollWidth)+2:sizerRef.current.scrollWidth+2)!==inputWidth&&setInputWidth(newInputWidth)},[sizerRef.current,placeHolderSizerRef.current,inputProps.placeholder,inputProps.value,inputWidth]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.default)("relative min-w-0",wrapperClassName),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input",{ref:mergedRefs,style:{boxSizing:"content-box",width:inputWidth,maxWidth:"100%"},...inputProps}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{ref:sizerRef,className:"absolute top-0 left-0 h-0 overflow-scroll whitespace-pre invisible",children:inputProps.value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{ref:placeHolderSizerRef,className:"absolute top-0 left-0 h-0 overflow-scroll whitespace-pre invisible",children:inputProps.placeholder})]})});function copyStyles(styles,node){node.style.fontSize=styles.fontSize,node.style.fontFamily=styles.fontFamily,node.style.fontWeight=styles.fontWeight,node.style.fontStyle=styles.fontStyle,node.style.letterSpacing=styles.letterSpacing,node.style.textTransform=styles.textTransform}},"./frontend/src/lib/lemon-ui/LemonInput/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>_LemonInput__WEBPACK_IMPORTED_MODULE_0__.D});var _LemonInput__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx")},"./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>LemonInputSelect});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),fuse_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),lib_lemon_ui_LemonSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),lib_lemon_ui_LemonSnack_LemonSnack__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils.tsx"),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_layout_navigation_3000_components_KeyboardShortcut__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),_LemonButton__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),_LemonDropdown__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDropdown/index.ts"),_LemonInput__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/index.ts"),_Popover__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NON_ESCAPED_COMMA_REGEX=/(?"labelComponent"===key?value?.name:value),valuesKey=JSON.stringify(values),allOptionsMap=(0,react__WEBPACK_IMPORTED_MODULE_5__.useMemo)(()=>{let customValues=values.filter(value=>!options.some(option=>option.key===value)),allOptionsMap=new Map;for(let customValue of customValues)allOptionsMap.set(customValue,{key:customValue,label:customValue});for(let option of options)allOptionsMap.set(option.key,option);return fuseRef.current.setCollection(Array.from(allOptionsMap.values())),allOptionsMap},[optionsKey,valuesKey]),visibleOptions=(0,react__WEBPACK_IMPORTED_MODULE_5__.useMemo)(()=>{let relevantOptions;let ret=[];if(inputValue&&!values.includes(inputValue)){if(allowCustomValues){let unescapedInputValue=inputValue.replaceAll("\\,",",");ret.push({key:unescapedInputValue,label:unescapedInputValue,__isInput:!0})}}else if("single"===mode&&values.length>0){var _allOptionsMap$get;ret.push(null!==(_allOptionsMap$get=allOptionsMap.get(values[0]))&&void 0!==_allOptionsMap$get?_allOptionsMap$get:{key:values[0],label:values[0]})}if(!disableFiltering&&inputValue){let results=fuseRef.current.search(inputValue);relevantOptions=results.map(result=>result.item)}else relevantOptions=Array.from(allOptionsMap.values());for(let option of relevantOptions)if(option.key!==inputValue&&("single"!==mode||!(values.length>0)||option.key!==values[0])&&(ret.push(option),ret.length>=100))break;return ret},[allOptionsMap,allowCustomValues,inputValue,mode]);(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>{setSelectedIndex(0)},[visibleOptions.map(option=>option.key).join(":::")]);let setInputValue=newValue=>{if(separateOnComma&&newValue.match(NON_ESCAPED_COMMA_REGEX)){let newValues=[...values];newValue.split(NON_ESCAPED_COMMA_REGEX).forEach(value=>{let trimmedValue=value.replaceAll("\\,",",").trim();trimmedValue&&!values.includes(trimmedValue)&&newValues.push(trimmedValue)}),onChange?.(newValues),newValue=""}newValue&&setShowPopover(!0),_setInputValue(newValue),onInputChange?.(newValue)},_removeItem=function(item){let currentValues=arguments.length>1&&void 0!==arguments[1]?arguments[1]:values;if("single"===mode){onChange?.([]);return}let newValues=currentValues.slice();newValues.splice(newValues.indexOf(item),1),onChange?.(newValues)},_addItem=function(item,atIndex){let currentValues=arguments.length>2&&void 0!==arguments[2]?arguments[2]:values;if(setInputValue(""),"single"===mode){onChange?.([item]);return}let newValues=currentValues.slice();newValues.includes(item)||(void 0!=atIndex?newValues.splice(atIndex,0,item):newValues.push(item)),onChange?.(newValues)},_onActionItem=(item,popoverOptionClickEvent,shouldInitiateEdit)=>{if(shouldInitiateEdit&&allowCustomValues){let indexOfValue=values.indexOf(item);indexOfValue>-1&&(null!==itemBeingEditedIndex&&itemBeingEditedIndex{onFocus?.(),setShowPopover(!0),popoverFocusRef.current=!0},valuesPrefix=(0,react__WEBPACK_IMPORTED_MODULE_5__.useMemo)(()=>{if("multiple"!==mode||0===values.length)return null;let preInputValues=null!==itemBeingEditedIndex?values.slice(0,itemBeingEditedIndex):values;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_Popover__WEBPACK_IMPORTED_MODULE_10__.Sn.Provider,{value:null,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(ValueSnacks,{values:preInputValues,options:options,onClose:value=>_onActionItem(value,null),onInitiateEdit:allowCustomValues?value=>_onActionItem(value,null,!0):null})})},[allOptionsMap,allowCustomValues,itemBeingEditedIndex]),valuesAndEditButtonSuffix=(0,react__WEBPACK_IMPORTED_MODULE_5__.useMemo)(()=>{let isEditButtonVisible="multiple"!==mode&&allowCustomValues&&values.length&&!inputValue,postInputValues=null!==itemBeingEditedIndex?values.slice(itemBeingEditedIndex):[];return isEditButtonVisible||0!==postInputValues.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_Popover__WEBPACK_IMPORTED_MODULE_10__.Sn.Provider,{value:null,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(ValueSnacks,{values:postInputValues,options:options,onClose:value=>_onActionItem(value,null),onInitiateEdit:allowCustomValues?value=>_onActionItem(value,null,!0):null}),isEditButtonVisible&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div",{className:"grow flex flex-col items-end",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_7__.J,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconPencil,{}),onClick:()=>{setInputValue(values[0]),inputRef.current?.focus(),_onFocus()},tooltip:"Edit current value",noPadding:!0})})]}):null},[mode,values,allowCustomValues,itemBeingEditedIndex,inputValue]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_LemonDropdown__WEBPACK_IMPORTED_MODULE_8__.Q,{matchWidth:!0,closeOnClickInside:!1,actionable:!0,visible:showPopover,onClickOutside:()=>{popoverFocusRef.current=!1,setShowPopover(!1)},onClickInside:e=>{popoverFocusRef.current=!0,e.stopPropagation()},className:popoverClassName,placement:"bottom-start",fallbackPlacements:["bottom-end","top-start","top-end"],loadingBar:loading&&visibleOptions.length>0,overlay:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{className:"space-y-px overflow-y-auto",children:[title&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("h5",{className:"mx-2 my-1",children:title}),visibleOptions.length>0?visibleOptions.map((option,index)=>{var _option$labelComponen;let isFocused=index===selectedIndex,isSelected=values.includes(option.key);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_7__.J,{type:"tertiary",size:"small",fullWidth:!0,active:isFocused,onClick:e=>_onActionItem(option.key,e),onMouseEnter:()=>setSelectedIndex(index),icon:"multiple"!==mode||option.__isInput?void 0:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Hw,{checked:isSelected,className:"pointer-events-none"}),sideAction:option.__isInput?void 0:{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconPencil,{className:isFocused?void 0:"invisible"}),tooltip:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:["Edit this value ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_layout_navigation_3000_components_KeyboardShortcut__WEBPACK_IMPORTED_MODULE_6__.e,{option:!0,enter:!0})]}),onClick:()=>{setInputValue(option.key),inputRef.current?.focus(),_onFocus()}},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span",{className:"whitespace-nowrap ph-no-capture truncate",children:option.__isInput?"multiple"===mode?`Add "${option.key}"`:option.key:null!==(_option$labelComponen=option.labelComponent)&&void 0!==_option$labelComponen?_option$labelComponen:option.label})},option.key)}):loading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:(0,lib_utils__WEBPACK_IMPORTED_MODULE_4__.w6)(5).map(x=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{className:"flex gap-2 items-center h-[33px] px-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonSkeleton__WEBPACK_IMPORTED_MODULE_2__.y.Circle,{className:"size-[18px]"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonSkeleton__WEBPACK_IMPORTED_MODULE_2__.y,{className:"h-3.5 w-full"})]},x))}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"text-muted italic p-1",children:allowCustomValues?"Start typing and press Enter to add options":`No options matching "${inputValue}"`})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_LemonInput__WEBPACK_IMPORTED_MODULE_9__.D,{inputRef:inputRef,placeholder:0===values.length?placeholder:"single"===mode?null!==(_allOptionsMap$get$la=allOptionsMap.get(values[0])?.label)&&void 0!==_allOptionsMap$get$la?_allOptionsMap$get$la:values[0]:allowCustomValues?"Add value":"Pick value",autoWidth:!0,prefix:valuesPrefix,suffix:valuesAndEditButtonSuffix,onFocus:_onFocus,onBlur:()=>{let hasCustomValue=!(selectedIndex>0)&&allowCustomValues&&inputValue.trim()&&!values.includes(inputValue);if(popoverFocusRef.current){popoverFocusRef.current=!1,inputRef.current?.focus(),_onFocus(),hasCustomValue&&_onActionItem(inputValue.trim(),null);return}hasCustomValue?_onActionItem(inputValue.trim(),null):setInputValue(""),setShowPopover(!1),onBlur?.()},value:inputValue,onChange:setInputValue,onKeyDown:e=>{if("Enter"===e.key){e.preventDefault();let itemToAdd=visibleOptions[selectedIndex]?.key;itemToAdd&&_onActionItem(visibleOptions[selectedIndex]?.key,null),e.currentTarget.blur()}else if("Backspace"===e.key){if(!inputValue){e.preventDefault();let newValues=[...values];newValues.pop(),onChange?.(newValues)}}else"ArrowDown"===e.key?(e.preventDefault(),setSelectedIndex(Math.min(selectedIndex+1,visibleOptions.length-1))):"ArrowUp"===e.key&&(e.preventDefault(),setSelectedIndex(Math.max(selectedIndex-1,0)))},disabled:disabled,autoFocus:autoFocus,transparentBackground:transparentBackground,className:(0,clsx__WEBPACK_IMPORTED_MODULE_13__.default)("h-auto leading-7","multiple"===mode&&"flex-wrap","single"===mode&&values.length>0&&"*:*:font-medium placeholder:*:*:font-medium","single"===mode&&values.length>0&&!showPopover&&"placeholder:*:*:text-default",className),"data-attr":dataAttr,size:size})})}function ValueSnacks(_ref2){let{values,options,onClose,onInitiateEdit}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:values.map(value=>{var _options$find,_option$labelComponen2;let option=null!==(_options$find=options.find(option=>option.key===value))&&void 0!==_options$find?_options$find:{label:value,labelComponent:null};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.u,{title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:["Click on the text to edit.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("br",{}),"Click on the X to remove."]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonSnack_LemonSnack__WEBPACK_IMPORTED_MODULE_3__.L,{title:option?.label,onClose:()=>onClose(value),onClick:onInitiateEdit?()=>onInitiateEdit(value):void 0,className:"cursor-text",children:null!==(_option$labelComponen2=option?.labelComponent)&&void 0!==_option$labelComponen2?_option$labelComponen2:option?.label})},value)})})}},"./frontend/src/lib/lemon-ui/LemonInputSelect/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>_LemonInputSelect__WEBPACK_IMPORTED_MODULE_0__.n});var _LemonInputSelect__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx")},"./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>LemonLabel_LemonLabel_LemonLabel});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonLabel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.scss"),LemonLabel_default=__webpack_require__.n(LemonLabel),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonLabel_default(),options),LemonLabel_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonLabel_LemonLabel_LemonLabel(_ref){let{children,info,className,showOptional,onExplanationClick,infoLink,htmlFor,...props}=_ref;return(0,jsx_runtime.jsxs)("label",{className:(0,clsx_m.default)("LemonLabel",className),htmlFor:htmlFor,...props,children:[children,showOptional?(0,jsx_runtime.jsx)("span",{className:"LemonLabel__extra",children:"(optional)"}):null,onExplanationClick?(0,jsx_runtime.jsx)(Link.r,{onClick:onExplanationClick,children:(0,jsx_runtime.jsx)("span",{className:"LemonLabel__extra",children:"(what is this?)"})}):null,info?(0,jsx_runtime.jsx)(Tooltip.u,{title:info,children:infoLink?(0,jsx_runtime.jsx)(Link.r,{to:infoLink,target:"_blank",className:"inline-flex",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-xl text-muted-alt shrink-0"})}):(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-xl text-muted-alt shrink-0"})}):null]})}},"./frontend/src/lib/lemon-ui/LemonLabel/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>_LemonLabel__WEBPACK_IMPORTED_MODULE_0__.H});var _LemonLabel__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.tsx")},"./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>LemonMarkdown_LemonMarkdown_LemonMarkdown});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonMarkdown=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.scss"),LemonMarkdown_default=__webpack_require__.n(LemonMarkdown),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonMarkdown_default(),options),LemonMarkdown_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),CodeSnippet=__webpack_require__("./frontend/src/lib/components/CodeSnippet/index.ts"),react_markdown=__webpack_require__("./node_modules/.pnpm/react-markdown@5.0.3_@types+react@17.0.52_react@18.2.0/node_modules/react-markdown/lib/react-markdown.js"),react_markdown_default=__webpack_require__.n(react_markdown),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonMarkdown_LemonMarkdown_LemonMarkdown(_ref){let{children,lowKeyHeadings=!1,className}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonMarkdown",className),children:(0,jsx_runtime.jsx)(react_markdown_default(),{renderers:{link:_ref2=>{let{href,children}=_ref2;return(0,jsx_runtime.jsx)(Link.r,{to:href,target:"_blank",targetBlankIcon:!0,children:children})},code:_ref3=>{let{language,value}=_ref3;return(0,jsx_runtime.jsx)(CodeSnippet.O,{language:language||CodeSnippet.S.Text,compact:!0,children:value})},...lowKeyHeadings?{heading:"strong"}:{}},disallowedTypes:["html"],children:children})})}},"./frontend/src/lib/lemon-ui/LemonMarkdown/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>_LemonMarkdown__WEBPACK_IMPORTED_MODULE_0__.j});var _LemonMarkdown__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.tsx")},"./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d6:()=>LemonMenu,iy:()=>LemonMenuOverlay,QN:()=>isLemonMenuSection});var react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonDropdown=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDropdown/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonMenu(_ref){let{items,activeItemIndex,tooltipPlacement,onVisibilityChange,...dropdownProps}=_ref,{referenceRef,itemsRef}=function(itemCount){let activeItemIndex=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,[focusedItemIndex,setFocusedItemIndex]=(0,react.useState)(activeItemIndex),referenceRef=(0,react.useRef)(null),itemsRef=(0,react.useRef)(Array.from({length:itemCount},()=>(0,react.createRef)()));function focus(itemIndex){itemIndex>-1?itemsRef.current[itemIndex].current?.focus():referenceRef.current?.focus()}return(0,react.useEffect)(()=>{setFocusedItemIndex(activeItemIndex)},[activeItemIndex]),(0,react.useEffect)(()=>{let handleKeyDown=e=>{"ArrowDown"===e.key?focusedItemIndex=0&&(focus(focusedItemIndex-1),setFocusedItemIndex(focusedItemIndex-1),e.preventDefault())};for(let item of(referenceRef.current?.addEventListener("keydown",handleKeyDown),itemsRef.current))item?.current?.addEventListener("keydown",handleKeyDown);return()=>{for(let item of(referenceRef.current?.removeEventListener("keydown",handleKeyDown),itemsRef.current))item?.current?.removeEventListener("keydown",handleKeyDown)}},[focusedItemIndex,itemCount]),{referenceRef,itemsRef}}(items.flatMap(item=>item&&isLemonMenuSection(item)?item.items:item).length,activeItemIndex),_onVisibilityChange=(0,react.useCallback)(visible=>{onVisibilityChange?.(visible),visible&&activeItemIndex&&activeItemIndex>-1&&setTimeout(()=>itemsRef?.current?.[activeItemIndex]?.current?.scrollIntoView({block:"center"}),0)},[onVisibilityChange,activeItemIndex]);return(0,jsx_runtime.jsx)(LemonDropdown.Q,{overlay:(0,jsx_runtime.jsx)(LemonMenuOverlay,{buttonSize:dropdownProps.buttonSize||"small",items:items,tooltipPlacement:tooltipPlacement,itemsRef:itemsRef}),closeOnClickInside:!0,referenceRef:referenceRef,onVisibilityChange:_onVisibilityChange,...dropdownProps})}function LemonMenuOverlay(_ref2){let{items,tooltipPlacement="right",itemsRef,buttonSize="small"}=_ref2,sectionsOrItems=(0,react.useMemo)(()=>(function(sectionsAndItems){let sections=[],implicitSection={items:[]};for(let sectionOrItem of sectionsAndItems)sectionOrItem&&(isLemonMenuSection(sectionOrItem)?(implicitSection.items.length>0&&(sections.push(implicitSection),implicitSection={items:[]}),sections.push(sectionOrItem)):implicitSection.items.push(sectionOrItem));return(implicitSection.items.length>0&§ions.push(implicitSection),1!==sections.length||sections[0].title||sections[0].footer)?sections:sections[0].items.filter(Boolean)})(items),[items]);return sectionsOrItems.length>0&&isLemonMenuSection(sectionsOrItems[0])?(0,jsx_runtime.jsx)(LemonMenuSectionList,{sections:sectionsOrItems,buttonSize:buttonSize,tooltipPlacement:tooltipPlacement,itemsRef:itemsRef}):(0,jsx_runtime.jsx)(LemonMenuItemList,{items:sectionsOrItems,buttonSize:buttonSize,tooltipPlacement:tooltipPlacement,itemsRef:itemsRef,itemIndexOffset:0})}function LemonMenuSectionList(_ref3){let{sections,buttonSize,tooltipPlacement,itemsRef}=_ref3,rollingItemIndex=0;return(0,jsx_runtime.jsx)("ul",{children:sections.map((section,i)=>{let sectionElement=(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsxs)("section",{className:"space-y-px",children:[section.title?"string"==typeof section.title?(0,jsx_runtime.jsx)("h5",{className:"mx-2 my-1",children:section.title}):section.title:null,(0,jsx_runtime.jsx)(LemonMenuItemList,{items:section.items.filter(Boolean),buttonSize:buttonSize,tooltipPlacement:tooltipPlacement,itemsRef:itemsRef,itemIndexOffset:rollingItemIndex}),section.footer?(0,jsx_runtime.jsx)("div",{children:section.footer}):null]}),i(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(LemonMenuItemButton,{item:item,size:buttonSize,tooltipPlacement:tooltipPlacement,ref:itemsRef?.current?.[itemIndexOffset+rollingItemIndex++]})},item.key||index))})}let LemonMenuItemButton=react.forwardRef((_ref5,ref)=>{let{item:{label,items,placement,keyboardShortcut,custom,...buttonProps},size,tooltipPlacement}=_ref5,Label="function"==typeof label?label:null,button=Label?(0,jsx_runtime.jsx)(Label,{},"x"):(0,jsx_runtime.jsxs)(LemonButton.J,{ref:ref,tooltipPlacement:tooltipPlacement,fullWidth:!0,role:"menuitem",size:size,...buttonProps,children:[label,keyboardShortcut&&(0,jsx_runtime.jsx)("div",{className:"-mr-0.5 inline-flex grow justify-end",children:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{...Object.fromEntries(keyboardShortcut.map(key=>[key,!0]))})})]});return items?(0,jsx_runtime.jsx)(LemonMenu,{items:items,tooltipPlacement:tooltipPlacement,placement:placement||"right-start",closeOnClickInside:!custom,closeParentPopoverOnClickInside:!custom,children:button}):button});function isLemonMenuSection(candidate){return candidate&&"items"in candidate&&!("label"in candidate)}LemonMenuItemButton.displayName="LemonMenuItemButton"},"./frontend/src/lib/lemon-ui/LemonMenu/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>_LemonMenu__WEBPACK_IMPORTED_MODULE_0__.d6});var _LemonMenu__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx")},"./frontend/src/lib/lemon-ui/LemonModal/LemonModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{fQ:()=>LemonModal_LemonModal_LemonModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss"),LemonModal_default=__webpack_require__.n(LemonModal),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonModal_default(),options),LemonModal_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),useFloatingContainerContext=__webpack_require__("./frontend/src/lib/hooks/useFloatingContainerContext.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),lib=__webpack_require__("./node_modules/.pnpm/react-modal@3.16.1_react-dom@18.2.0_react@18.2.0/node_modules/react-modal/lib/index.js"),lib_default=__webpack_require__.n(lib),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonModalHeader=_ref=>{let{children,className}=_ref;return(0,jsx_runtime.jsx)("header",{className:(0,clsx_m.default)("LemonModal__header",className),children:children})},LemonModalFooter=_ref2=>{let{children,className}=_ref2;return(0,jsx_runtime.jsx)("footer",{className:(0,clsx_m.default)("LemonModal__footer",className),children:children})},LemonModalContent=_ref3=>{let{children,className,embedded=!1}=_ref3;return(0,jsx_runtime.jsx)("section",{className:(0,clsx_m.default)("LemonModal__content",embedded&&"LemonModal__content--embedded",className),children:children})};function LemonModal_LemonModal_LemonModal(_ref4){let{width,maxWidth,children,isOpen=!0,onClose,onAfterClose,title,description,footer,inline,simple,closable=!0,hasUnsavedInput,fullScreen=!1,forceAbovePopovers=!1,contentRef,overlayRef,hideCloseButton=!1,"data-attr":dataAttr,zIndex}=_ref4,nodeRef=(0,react.useRef)(null),[ignoredOverlayClickCount,setIgnoredOverlayClickCount]=(0,react.useState)(0);(0,react.useEffect)(()=>setIgnoredOverlayClickCount(0),[hasUnsavedInput]);let modalContent=(0,jsx_runtime.jsxs)("div",{ref:nodeRef,className:"LemonModal__container","data-attr":dataAttr,children:[closable&&!hideCloseButton&&(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonModal__close",ignoredOverlayClickCount>0&&"LemonModal__close--highlighted"),children:(0,jsx_runtime.jsx)(Tooltip.u,{visible:!!ignoredOverlayClickCount||void 0,title:ignoredOverlayClickCount?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["You have unsaved input that will be discarded.",(0,jsx_runtime.jsx)("br",{}),"Use the ",(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})," button to close explicitly."]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Close ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{escape:!0})]}),children:(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),size:"small",onClick:onClose,"aria-label":"close",onMouseEnter:()=>setIgnoredOverlayClickCount(0)})})},ignoredOverlayClickCount),(0,jsx_runtime.jsx)("div",{className:"LemonModal__layout",children:simple?children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[title?(0,jsx_runtime.jsxs)(LemonModalHeader,{children:[(0,jsx_runtime.jsx)("h3",{children:title}),description?"string"==typeof description?(0,jsx_runtime.jsx)("p",{children:description}):description:null]}):null,children?(0,jsx_runtime.jsx)(LemonModalContent,{children:children}):null,footer?(0,jsx_runtime.jsx)(LemonModalFooter,{children:footer}):null]})})]});width=fullScreen?void 0:width,maxWidth=fullScreen?void 0:maxWidth;let floatingContainer=(0,useFloatingContainerContext.A)();return inline?(0,jsx_runtime.jsx)("div",{className:"LemonModal ReactModal__Content--after-open",style:{width,maxWidth},children:modalContent}):(0,jsx_runtime.jsx)(lib_default(),{isOpen:isOpen,onRequestClose:e=>{hasUnsavedInput&&"click"===e.type?setIgnoredOverlayClickCount(ignoredOverlayClickCount+1):onClose?.()},shouldCloseOnOverlayClick:closable,shouldCloseOnEsc:closable,onAfterClose:onAfterClose,closeTimeoutMS:250,className:(0,clsx_m.default)("LemonModal",fullScreen&&"LemonModal--fullscreen"),overlayClassName:(0,clsx_m.default)("LemonModal__overlay",zIndex&&`LemonModal__overlay--z-${zIndex}`,forceAbovePopovers&&"LemonModal__overlay--force-modal-above-popovers"),style:{content:{width:width,maxWidth}},appElement:document.getElementById("root"),contentRef:contentRef,overlayRef:overlayRef,parentSelector:floatingContainer?()=>floatingContainer:void 0,children:modalContent})}LemonModal_LemonModal_LemonModal.Header=LemonModalHeader,LemonModal_LemonModal_LemonModal.Footer=LemonModalFooter,LemonModal_LemonModal_LemonModal.Content=LemonModalContent},"./frontend/src/lib/lemon-ui/LemonModal/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>_LemonModal__WEBPACK_IMPORTED_MODULE_0__.fQ});var _LemonModal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/LemonModal.tsx")},"./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>LemonProgress});var clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonProgress=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function LemonProgress(_ref,ref){let{size="medium",percent,bgColor="var(--bg-3000)",strokeColor="var(--brand-blue)",children,className}=_ref,width=isNaN(percent)?0:Math.max(Math.min(percent,100),0);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{ref:ref,className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)("LemonProgress rounded-full w-full inline-block","large"===size?"h-5":"h-1.5",className),style:{backgroundColor:bgColor},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)("LemonProgress__track block h-full rounded-full transition-all",width>0?"large"===size?"min-w-5":"min-w-1.5":null),style:{width:`${width}%`,backgroundColor:strokeColor},children:children})})})},"./frontend/src/lib/lemon-ui/LemonProgress/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>_LemonProgress__WEBPACK_IMPORTED_MODULE_0__.b});var _LemonProgress__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.tsx")},"./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>LemonProgressCircle_LemonProgressCircle_LemonProgressCircle});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonProgressCircle=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.scss"),LemonProgressCircle_default=__webpack_require__.n(LemonProgressCircle),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonProgressCircle_default(),options),LemonProgressCircle_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonProgressCircle_LemonProgressCircle_LemonProgressCircle=_ref=>{let{strokePercentage=.2,backgroundStrokeOpacity=.2,size=16,progress,children,className}=_ref,radius=size/2,stroke=radius*strokePercentage,circumference=size*Math.PI;return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("LemonProgressCircle",className),style:{height:size,width:size},children:[(0,jsx_runtime.jsxs)("svg",{height:size,width:size,children:[(0,jsx_runtime.jsx)("circle",{stroke:"currentColor",strokeOpacity:backgroundStrokeOpacity,fill:"transparent",strokeWidth:stroke,r:radius-stroke/2,cx:radius,cy:radius}),(0,jsx_runtime.jsx)("circle",{stroke:"currentColor",fill:"transparent",strokeWidth:stroke,strokeDasharray:circumference+" "+circumference,style:{strokeDashoffset:circumference-progress*circumference},r:radius-stroke/2,cx:radius,cy:radius})]}),children?(0,jsx_runtime.jsx)("span",{className:"LemonProgressCircle__content",children:children}):null]})}},"./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_:()=>LemonRadio});var clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonRadio(_ref){let{value:selectedValue,onChange,options,className,radioPosition}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)("flex flex-col gap-2 font-medium",className),children:options.map(_ref2=>{let{value,label,disabledReason,description,...optionProps}=_ref2,content=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("label",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)("grid items-center gap-x-2 grid-cols-[min-content_auto] text-sm",disabledReason?"text-muted cursor-not-allowed":"cursor-pointer",{"items-baseline":"top"===radioPosition,"items-center":"center"===radioPosition||!radioPosition}),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input",{type:"radio",className:"cursor-pointer",checked:value===selectedValue,value:value,onChange:()=>{disabledReason||onChange(value)},disabled:!!disabledReason,...optionProps}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{children:label}),description&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"text-muted row-start-2 col-start-2 text-pretty",children:description})]},value);return disabledReason?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__.u,{title:disabledReason,children:content},value):content})})}},"./frontend/src/lib/lemon-ui/LemonRadio/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_:()=>_LemonRadio__WEBPACK_IMPORTED_MODULE_0__._});var _LemonRadio__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRadio/LemonRadio.tsx")},"./frontend/src/lib/lemon-ui/LemonRow/LemonRow.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>LemonRow_LemonRow_LemonRow});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonRow=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonRow/LemonRow.scss"),LemonRow_default=__webpack_require__.n(LemonRow),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonRow_default(),options),LemonRow_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonRow_LemonRow_LemonRow=react.forwardRef(function LemonRowInternal(_ref,ref){let{children,icon,className,tag,status="default",extendedContent,tooltip,sideIcon,size="medium",loading=!1,fullWidth=!1,center=!1,outlined=!1,disabled=!1,...props}=_ref,symbolic=null==children||!1===children;loading&&(icon=(0,jsx_runtime.jsx)(Spinner.$,{}));let element=react.createElement(tag||"div",{className:(0,clsx_m.default)("LemonRow",className,status&&"default"!==status?`LemonRow--status-${status}`:void 0,symbolic&&"LemonRow--symbolic",fullWidth&&"LemonRow--full-width",disabled&&"LemonRow--disabled",outlined&&"LemonRow--outlined",center&&"LemonRow--center","large"===size&&"LemonRow--large","tall"===size&&"LemonRow--tall","small"===size&&"LemonRow--small"),disabled,...props,ref},(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"LemonRow__main-area",children:[icon&&(0,jsx_runtime.jsx)("span",{className:"LemonRow__icon",children:icon}),!symbolic&&(0,jsx_runtime.jsx)("div",{className:"LemonRow__content",children:children}),sideIcon&&(0,jsx_runtime.jsx)("span",{className:"LemonRow__icon",children:sideIcon})]}),extendedContent&&(0,jsx_runtime.jsx)("div",{className:"LemonRow__extended-area",children:extendedContent})]}));return tooltip?(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltip,children:element}):element})},"./frontend/src/lib/lemon-ui/LemonRow/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>_LemonRow__WEBPACK_IMPORTED_MODULE_0__.Q});var _LemonRow__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRow/LemonRow.tsx")},"./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>LemonSegmentedButton_LemonSegmentedButton_LemonSegmentedButton});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonSegmentedButton=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss"),LemonSegmentedButton_default=__webpack_require__.n(LemonSegmentedButton),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonSegmentedButton_default(),options),LemonSegmentedButton_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js");__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");var hooks=__webpack_require__("./frontend/src/lib/lemon-ui/hooks.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonSegmentedButton_LemonSegmentedButton_LemonSegmentedButton(_ref){let{value,onChange,options,size,fullWidth,className}=_ref,{containerRef,selectionRef,sliderWidth,sliderOffset,transitioning}=(0,hooks.g)(value,200);return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("LemonSegmentedButton",fullWidth&&"LemonSegmentedButton--full-width",transitioning&&"LemonSegmentedButton--transitioning",className),style:{"--lemon-segmented-button-slider-width":`${sliderWidth}px`,"--lemon-segmented-button-slider-offset":`${sliderOffset}px`},ref:containerRef,children:[sliderWidth>0&&(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonSegmentedButton__slider",value===options[0].value?"LemonSegmentedButton__slider--first":value===options[options.length-1].value?"LemonSegmentedButton__slider--last":null)}),(0,jsx_runtime.jsx)("ul",{children:options.map(option=>(0,jsx_runtime.jsx)("li",{className:(0,clsx_m.default)("LemonSegmentedButton__option",option.disabledReason&&"LemonSegmentedButton__option--disabled",option.value===value&&"LemonSegmentedButton__option--selected"),ref:option.value===value?selectionRef:void 0,children:(0,jsx_runtime.jsx)(LemonButton.J,{type:option.value===value?"primary":"secondary",size:size,fullWidth:!0,disabledReason:option.disabledReason,onClick:()=>{option.disabledReason||onChange?.(option.value)},icon:option.icon,"data-attr":option["data-attr"],tooltip:option.tooltip,center:!0,children:option.label})},option.value))})]})}},"./frontend/src/lib/lemon-ui/LemonSegmentedButton/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>_LemonSegmentedButton__WEBPACK_IMPORTED_MODULE_0__.P});var _LemonSegmentedButton__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.tsx")},"./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Yv:()=>LemonSelect,u7:()=>isLemonSelectSection});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),_LemonMenu_LemonMenu__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonSelect(_ref){let{value=null,onChange,onSelect,options,placeholder="Select a value",optionTooltipPlacement,dropdownMatchSelectWidth=!0,dropdownMaxContentWidth=!1,dropdownPlacement,allowClear=!1,className,menu,renderButtonContent,...buttonProps}=_ref,[items,allLeafOptions]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>(function(options,activeValue,onSelect){let leafOptionsAccumulator=[],items=options.map(option=>(function convertToMenuSingle(option,activeValue,onSelect,acc){let CustomControl;if(isLemonSelectSection(option)){let{options:childOptions,...section}=option,items=option.options.map(o=>convertToMenuSingle(o,activeValue,onSelect,acc)).filter(Boolean);return items.length?{...section,items}:null}if(option&&"options"in option&&"label"in option){let{options:childOptions,...node}=option,items=childOptions.map(o=>convertToMenuSingle(o,activeValue,onSelect,acc)).filter(Boolean);return option.hidden?null:{...node,active:function doOptionsContainActiveValue(options,activeValue){for(let option of options)if("options"in option){if(doOptionsContainActiveValue(option.options,activeValue))return!0}else if(option.value===activeValue)return!0;return!1}(childOptions,activeValue),items,custom:function doOptionsContainCustomControl(options){for(let option of options)if("options"in option){if(doOptionsContainCustomControl(option.options))return!0}else if("function"==typeof option.labelInMenu)return!0;return!1}(childOptions)}}if(acc.push(option),option.hidden)return null;let{value,label,labelInMenu,...leaf}=option;return"function"==typeof labelInMenu&&(CustomControl=labelInMenu),{...leaf,label:CustomControl?function LabelWrapped(){if(!CustomControl)throw Error("CustomControl became undefined");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CustomControl,{onSelect:onSelect})}:labelInMenu||label,active:value===activeValue,onClick:()=>onSelect(value)}})(option,activeValue,onSelect,leafOptionsAccumulator)).filter(Boolean);return[items,leafOptionsAccumulator]})(options,value,newValue=>{newValue!==value&&onChange?.(newValue),onSelect?.(newValue)}),[options,value,onChange,onSelect]),activeLeaf=allLeafOptions.find(o=>o.value===value),isClearButtonShown=allowClear&&!!value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_LemonMenu_LemonMenu__WEBPACK_IMPORTED_MODULE_3__.d6,{items:items,tooltipPlacement:optionTooltipPlacement,matchWidth:dropdownMatchSelectWidth,placement:dropdownPlacement,className:menu?.className,maxContentWidth:dropdownMaxContentWidth,activeItemIndex:items.flatMap(i=>(0,_LemonMenu_LemonMenu__WEBPACK_IMPORTED_MODULE_3__.QN)(i)?i.items.filter(Boolean):i).findIndex(i=>i.active),closeParentPopoverOnClickInside:menu?.closeParentPopoverOnClickInside,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.default)(className,"LemonSelect"),icon:activeLeaf?.icon,type:"secondary",sideAction:isClearButtonShown?{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),divider:!1,onClick:()=>{onChange?.(null)}}:null,sideIcon:isClearButtonShown?void 0:activeLeaf?.sideIcon,tooltip:activeLeaf?.tooltip,...buttonProps,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span",{className:"flex flex-1",children:renderButtonContent?renderButtonContent(activeLeaf):activeLeaf?activeLeaf.label:null!=value?value:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span",{className:"text-muted",children:placeholder})})})})}function isLemonSelectSection(candidate){return candidate&&"options"in candidate&&!("label"in candidate)}},"./frontend/src/lib/lemon-ui/LemonSelect/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Yv:()=>_LemonSelect__WEBPACK_IMPORTED_MODULE_0__.Yv,u7:()=>_LemonSelect__WEBPACK_IMPORTED_MODULE_0__.u7});var _LemonSelect__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/LemonSelect.tsx")},"./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>LemonSkeleton_LemonSkeleton_LemonSkeleton});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonSkeleton=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.scss"),LemonSkeleton_default=__webpack_require__.n(LemonSkeleton),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonSkeleton_default(),options),LemonSkeleton_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonSkeleton_LemonSkeleton_LemonSkeleton(_ref){let{className,repeat,active=!0,fade=!1}=_ref,content=(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonSkeleton rounded",!active&&"LemonSkeleton--static",className||"h-4 w-full"),children:(0,jsx_runtime.jsx)("span",{children:"Loading…"})});return repeat?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,utils.w6)(repeat).map(i=>(0,jsx_runtime.jsx)("div",{style:fade?{opacity:1-i/repeat}:void 0,children:content},i))}):content}LemonSkeleton_LemonSkeleton_LemonSkeleton.Text=function LemonSkeletonText(_ref2){let{className,...props}=_ref2;return(0,jsx_runtime.jsx)(LemonSkeleton_LemonSkeleton_LemonSkeleton,{className:(0,clsx_m.default)("rounded h-6 w-full",className),...props})},LemonSkeleton_LemonSkeleton_LemonSkeleton.Row=function LemonSkeletonRow(_ref3){let{className,...props}=_ref3;return(0,jsx_runtime.jsx)(LemonSkeleton_LemonSkeleton_LemonSkeleton,{className:(0,clsx_m.default)("rounded h-10 w-full",className),...props})},LemonSkeleton_LemonSkeleton_LemonSkeleton.Circle=function LemonSkeletonCircle(_ref4){let{className,...props}=_ref4;return(0,jsx_runtime.jsx)(LemonSkeleton_LemonSkeleton_LemonSkeleton,{className:(0,clsx_m.default)("rounded-full shrink-0",className||"h-10 w-10"),...props})},LemonSkeleton_LemonSkeleton_LemonSkeleton.Button=function LemonSkeletonButton(_ref5){let{className,size,...props}=_ref5;return(0,jsx_runtime.jsx)(LemonSkeleton_LemonSkeleton_LemonSkeleton,{className:(0,clsx_m.default)("rounded px-3","small"===size&&"h-10",(!size||"medium"===size)&&"h-10",className||"w-20"),...props})}},"./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>_LemonSkeleton__WEBPACK_IMPORTED_MODULE_0__.y});var _LemonSkeleton__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.tsx")},"./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>LemonSlider});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/hooks/useEventListener.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonSlider(_ref){let{value=0,onChange,min,max,step=1,className}=_ref,trackRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),movementStartValueWithX=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),[dragging,setDragging]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),handleMove=clientX=>{if(trackRef.current&&null!==movementStartValueWithX.current){let[movementStartValue,movementStartX]=movementStartValueWithX.current,rect=trackRef.current.getBoundingClientRect(),adjustedWidth=rect.width-16,newValue=movementStartValue+(max-min)*((clientX-movementStartX)/adjustedWidth);newValue=Math.max(min,Math.min(max,newValue)),void 0!==step&&(newValue=Math.round(newValue/step)*step),onChange?.(newValue)}};(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("mousemove",e=>{handleMove(e.clientX)}),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("touchmove",e=>{1===e.touches.length&&handleMove(e.touches[0].clientX)}),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("mouseup",e=>{0===e.button&&(movementStartValueWithX.current=null,setDragging(!1))}),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("touchend",()=>{movementStartValueWithX.current=null,setDragging(!1)}),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_0__.O)("touchcancel",()=>{movementStartValueWithX.current=null,setDragging(!1)});let constrainedValue=Math.max(min,Math.min(value,max)),proportion=isNaN(value)?0:Math.round((constrainedValue-min)/(max-min)*100)/100;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.default)("flex items-center relative my-2.5 min-w-16 select-none",className),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"w-full h-3 flex items-center cursor-pointer",ref:trackRef,onMouseDown:e=>{let rect=e.currentTarget.getBoundingClientRect(),x=e.clientX-(rect.left+8),adjustedWidth=rect.width-16,newValue=x/adjustedWidth*(max-min)+min;newValue=Math.max(min,Math.min(max,newValue)),void 0!==step&&(newValue=Math.round(newValue/step)*step),onChange?.(newValue),movementStartValueWithX.current=[newValue,e.clientX],setDragging(!0)},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"w-full bg-border rounded-full h-1"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"absolute h-1 bg-primary rounded-full pointer-events-none",style:{width:`${100*proportion}%`}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.default)("absolute size-3 box-content border-2 border-bg-light rounded-full cursor-pointer bg-primary transition-shadow duration-75",dragging?"ring-2 scale-90":"ring-0 hover:ring-2"),style:{left:`calc(${100*proportion}% - ${proportion}rem)`},onMouseDown:e=>{movementStartValueWithX.current=[constrainedValue,e.clientX],setDragging(!0)},onTouchStart:e=>{movementStartValueWithX.current=[constrainedValue,e.touches[0].clientX],setDragging(!0)}})]})}},"./frontend/src/lib/lemon-ui/LemonSlider/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>_LemonSlider__WEBPACK_IMPORTED_MODULE_0__.j});var _LemonSlider__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSlider/LemonSlider.tsx")},"./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>LemonSnack});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),tailwind_merge__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/tailwind-merge@2.2.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonSnack=(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function LemonSnack(_ref,ref){let{type="regular",children,wrap,onClick,onClose,title,className}=_ref,isRegular="regular"===type;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("span",{ref:ref,className:(0,tailwind_merge__WEBPACK_IMPORTED_MODULE_4__.m6)("inline-flex text-primary-alt max-w-full overflow-hidden break-all items-center py-1 leading-5",!wrap&&"whitespace-nowrap",isRegular?"bg-primary-highlight px-1.5 rounded":"bg-primary-alt-highlight px-4 rounded-full h-8",!!onClick&&"cursor-pointer",className),onClick:onClick,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span",{className:"overflow-hidden text-ellipsis",title:null!=title?title:"string"==typeof children?children:void 0,children:children}),onClose&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.default)("LemonSnack__close shrink-0 ml-1",isRegular||"-mr-1"),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{size:"small",noPadding:!0,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),onClick:e=>{e.stopPropagation(),onClose(e)}})})]})})},"./frontend/src/lib/lemon-ui/LemonSnack/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>_LemonSnack__WEBPACK_IMPORTED_MODULE_0__.L});var _LemonSnack__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSnack/LemonSnack.tsx")},"./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>LemonSwitch_LemonSwitch_LemonSwitch});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonSwitch=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.scss"),LemonSwitch_default=__webpack_require__.n(LemonSwitch),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonSwitch_default(),options),LemonSwitch_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let switchCounter=0,LemonSwitch_LemonSwitch_LemonSwitch=(0,react.forwardRef)(function LemonSwitch(_ref,ref){let{className,id:rawId,onChange,checked,fullWidth,bordered,size="medium",disabled,disabledReason,label,labelClassName,tooltip,"data-attr":dataAttr,"aria-label":ariaLabel,handleContent,sliderColorOverrideChecked,sliderColorOverrideUnchecked}=_ref,id=(0,react.useMemo)(()=>rawId||`lemon-switch-${switchCounter++}`,[rawId]),[isActive,setIsActive]=(0,react.useState)(!1),conditionalProps={};ariaLabel&&(conditionalProps["aria-label"]=ariaLabel);let tooltipContent=null;disabledReason?(disabled=!0,tooltipContent=(0,jsx_runtime.jsx)("span",{className:"italic",children:disabledReason})):tooltip&&(tooltipContent=(0,jsx_runtime.jsx)("span",{children:tooltip}));let buttonComponent=(0,jsx_runtime.jsxs)("button",{id:id,className:"LemonSwitch__button",type:"button",role:"switch",onClick:()=>{onChange&&onChange(!checked)},onMouseDown:()=>setIsActive(!0),onMouseUp:()=>setIsActive(!1),onMouseOut:()=>setIsActive(!1),"data-attr":dataAttr,disabled:disabled,...conditionalProps,children:[(0,jsx_runtime.jsx)("div",{className:`LemonSwitch__slider ${sliderColorOverrideChecked||sliderColorOverrideUnchecked?`bg-${checked?sliderColorOverrideChecked:sliderColorOverrideUnchecked}`:""}`}),(0,jsx_runtime.jsx)("div",{className:"LemonSwitch__handle",children:handleContent})]});return tooltipContent&&(buttonComponent=(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltipContent,children:(0,jsx_runtime.jsx)("div",{className:"flex items-center",children:buttonComponent})})),(0,jsx_runtime.jsxs)("div",{ref:ref,className:(0,clsx_m.default)("LemonSwitch",className,`LemonSwitch--${size}`,{"LemonSwitch--checked":checked,"LemonSwitch--active":isActive,"LemonSwitch--bordered":bordered,"LemonSwitch--disabled":disabled,"LemonSwitch--full-width":fullWidth}),children:[label&&(0,jsx_runtime.jsx)("label",{htmlFor:id,className:labelClassName,children:label}),buttonComponent]})})},"./frontend/src/lib/lemon-ui/LemonSwitch/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>_LemonSwitch__WEBPACK_IMPORTED_MODULE_0__.f});var _LemonSwitch__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.tsx")},"./frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>LemonTable_LemonTable_LemonTable});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTable/LemonTable.scss"),LemonTable_default=__webpack_require__.n(LemonTable),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonTable_default(),options),LemonTable_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),PaginationControl=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),LemonTableLoader=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.tsx"),LemonTable_sorting=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/sorting.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let TableRow=react.memo(function(_ref){let{record,recordIndex,rowKeyDetermined,rowClassNameDetermined,rowRibbonColorDetermined,rowStatusDetermined,columnGroups,onRow,expandable,firstColumnSticky}=_ref,[isRowExpandedLocal,setIsRowExpanded]=(0,react.useState)(!1),rowExpandable=Number(!!expandable&&(!expandable.rowExpandable||expandable.rowExpandable(record,recordIndex))),isRowExpansionToggleShown=!!expandable&&rowExpandable>=0,isRowExpanded=expandable?.isRowExpanded&&expandable?.isRowExpanded?.(record,recordIndex)!==-1?!!expandable?.isRowExpanded?.(record,recordIndex):isRowExpandedLocal,expandedRowClassNameDetermined=expandable&&isRowExpanded&&expandable.expandedRowClassName&&("function"==typeof expandable.expandedRowClassName?expandable.expandedRowClassName(record,recordIndex):expandable.expandedRowClassName),{className,style,...extraProps}=onRow?.(record)||{};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("tr",{"data-row-key":rowKeyDetermined,className:(0,clsx_m.default)(rowClassNameDetermined,rowStatusDetermined&&`LemonTable__row--status-${rowStatusDetermined}`,extraProps?.onClick?"hover:underline cursor-pointer hover:bg-primary-highlight":void 0,className),style:{"--row-ribbon-color":rowRibbonColorDetermined||void 0,...style},...extraProps,children:[isRowExpansionToggleShown&&(0,jsx_runtime.jsx)("td",{className:"LemonTable__toggle",children:!!rowExpandable&&(0,jsx_runtime.jsx)(LemonButton.J,{noPadding:!0,active:isRowExpanded,onClick:()=>{setIsRowExpanded(!isRowExpanded),isRowExpanded?expandable?.onRowCollapse?.(record,recordIndex):expandable?.onRowExpand?.(record,recordIndex)},icon:isRowExpanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),title:isRowExpanded?"Show less":"Show more"})}),columnGroups.flatMap((columnGroup,columnGroupIndex)=>columnGroup.children.map((column,columnIndex)=>{let columnKeyRaw=column.key||column.dataIndex,columnKeyOrIndex=columnKeyRaw?String(columnKeyRaw):columnIndex,value=null!=column.dataIndex?record[column.dataIndex]:void 0,contents=column.render?column.render(value,record,recordIndex):value,isSticky=firstColumnSticky&&0===columnGroupIndex&&0===columnIndex,extraCellProps=isTableCellRepresentation(contents)&&contents.props?contents.props:{};return(0,jsx_runtime.jsx)("td",{className:(0,clsx_m.default)(0===columnIndex&&"LemonTable__boundary",isSticky&&"LemonTable__cell--sticky",column.align&&`text-${column.align}`,"function"==typeof column.className?column.className(value,record,recordIndex):column.className),style:"function"==typeof column.style?column.style(value,record,recordIndex):column.style,...extraCellProps,children:isTableCellRepresentation(contents)?contents.children:contents},`col-${columnGroupIndex}-${columnKeyOrIndex}`)}))]}),expandable&&!!rowExpandable&&isRowExpanded&&(0,jsx_runtime.jsxs)("tr",{className:(0,clsx_m.default)("LemonTable__expansion",expandedRowClassNameDetermined),children:[!expandable.noIndent&&(0,jsx_runtime.jsx)("td",{}),(0,jsx_runtime.jsx)("td",{colSpan:columnGroups.reduce((acc,columnGroup)=>acc+columnGroup.children.length,0)+Number(!!expandable.noIndent),children:expandable.expandedRowRender(record,recordIndex)})]})]})});function isTableCellRepresentation(contents){return!!contents&&"object"==typeof contents&&!react.isValidElement(contents)}function determineColumnKey(column,obligationReason){let columnKey=column.key||column.dataIndex;if(obligationReason&&null==columnKey)throw Error(`Column \`key\` or \`dataIndex\` must be defined for ${obligationReason}`);return columnKey}function LemonTable_LemonTable_LemonTable(_ref){let{id,columns:rawColumns,dataSource=[],rowKey,rowClassName,rowRibbonColor,rowStatus,onRow,size,inset=!1,embedded=!1,stealth=!1,loading,disableTableWhileLoading=!0,pagination,expandable,showHeader=!0,uppercaseHeader=!0,noSortingCancellation:disableSortingCancellation=!1,defaultSorting=null,sorting,onSort,useURLForSorting=!0,loadingSkeletonRows=1,emptyState,nouns=["entry","entries"],className,style,"data-attr":dataAttr,footer,firstColumnSticky,maxHeaderWidth,hideScrollbar}=_ref,currentSortingParam=id?`${id}_order`:"order",{location:location1,searchParams,hashParams}=(0,index_esm.useValues)(lib.router),{push}=(0,index_esm.useActions)(lib.router),[internalSorting,setInternalSorting]=(0,react.useState)(sorting||null),setLocalSorting=(0,react.useCallback)(newSorting=>{if(setInternalSorting(newSorting),onSort?.(newSorting),useURLForSorting)return push(location1.pathname,{...searchParams,[currentSortingParam]:newSorting?`${-1===newSorting.order?"-":""}${newSorting.columnKey}`:void 0},hashParams)},[location1,searchParams,hashParams,push]),columnGroups=rawColumns.length>0&&"children"in rawColumns[0]?rawColumns:[{children:rawColumns}],columns=columnGroups.flatMap(group=>group.children),scrollRef=(0,react.useRef)(null),currentSorting=sorting||internalSorting||(searchParams[currentSortingParam]?searchParams[currentSortingParam].startsWith("-")?{columnKey:searchParams[currentSortingParam].substr(1),order:-1}:{columnKey:searchParams[currentSortingParam],order:1}:defaultSorting),sortedDataSource=(0,react.useMemo)(()=>{if(currentSorting){let{columnKey:sortColumnKey,order:sortOrder}=currentSorting,sorter=columns.find(searchColumn=>searchColumn.sorter&&determineColumnKey(searchColumn,"sorting")===sortColumnKey)?.sorter;if("function"==typeof sorter)return dataSource.slice().sort((a,b)=>sortOrder*sorter(a,b))}return dataSource},[dataSource,currentSorting]),paginationState=(0,PaginationControl.h)(sortedDataSource,pagination,id);if((0,react.useEffect)(()=>{if(scrollRef.current){let realTableOffsetTop=scrollRef.current.getBoundingClientRect().top-320;realTableOffsetTop<0&&window.scrollTo(window.scrollX,window.scrollY+realTableOffsetTop)}},[paginationState.currentPage,scrollRef.current]),firstColumnSticky&&expandable)throw Error("LemonTable `firstColumnSticky` prop cannot be used with `expandable`");return(0,jsx_runtime.jsx)("div",{id:id,className:(0,clsx_m.default)("LemonTable",size&&"middle"!==size&&`LemonTable--${size}`,inset&&"LemonTable--inset",loading&&disableTableWhileLoading&&"LemonTable--loading",embedded&&"LemonTable--embedded",void 0!==rowRibbonColor&&"LemonTable--with-ribbon",stealth&&"LemonTable--stealth",!uppercaseHeader&&"LemonTable--lowercase-header",className),style:style,"data-attr":dataAttr,children:(0,jsx_runtime.jsx)(ScrollableShadows.D,{innerClassName:hideScrollbar?"hide-scrollbar":void 0,direction:"horizontal",scrollRef:scrollRef,children:(0,jsx_runtime.jsxs)("div",{className:"LemonTable__content",children:[(0,jsx_runtime.jsxs)("table",{children:[(0,jsx_runtime.jsxs)("colgroup",{children:[!!expandable&&(0,jsx_runtime.jsx)("col",{className:"w-0"}),columns.map((column,index)=>(0,jsx_runtime.jsx)("col",{style:{width:column.width}},`LemonTable-col-${index}`))]}),showHeader&&(0,jsx_runtime.jsxs)("thead",{children:[columnGroups.some(group=>group.title)&&(0,jsx_runtime.jsxs)("tr",{className:"LemonTable__row--grouping",children:[!!expandable&&(0,jsx_runtime.jsx)("th",{className:"LemonTable__toggle"}),columnGroups.map((columnGroup,columnGroupIndex)=>0===columnGroupIndex&&firstColumnSticky?(0,jsx_runtime.jsxs)(react.Fragment,{children:[(0,jsx_runtime.jsx)("th",{colSpan:1,className:"LemonTable__boundary LemonTable__header--sticky",children:columnGroup.title}),(0,jsx_runtime.jsx)("th",{colSpan:columnGroup.children.length-1})]},`LemonTable-th-group-${columnGroupIndex}`):(0,jsx_runtime.jsx)("th",{colSpan:columnGroup.children.length,className:"LemonTable__boundary",children:columnGroup.title},`LemonTable-th-group-${columnGroupIndex}`))]}),(0,jsx_runtime.jsxs)("tr",{children:[!!expandable&&(0,jsx_runtime.jsx)("th",{className:"LemonTable__toggle"}),columnGroups.flatMap((columnGroup,columnGroupIndex)=>columnGroup.children.map((column,columnIndex)=>{var _determineColumnKey;return(0,jsx_runtime.jsx)("th",{className:(0,clsx_m.default)("LemonTable__header",column.sorter&&"LemonTable__header--actionable",0===columnIndex&&"LemonTable__boundary",firstColumnSticky&&0===columnGroupIndex&&0===columnIndex&&"LemonTable__header--sticky",column.className),style:{textAlign:column.align},onClick:column.sorter&&!column.more?event=>{let target=event.target;if(target.classList.contains("LemonCheckbox__box")||"label"===target.tagName.toLowerCase()||"input"===target.tagName.toLowerCase())return;let nextSorting=(0,LemonTable_sorting.u)(currentSorting,determineColumnKey(column,"sorting"),disableSortingCancellation);setLocalSorting(nextSorting)}:void 0,children:(0,jsx_runtime.jsxs)("div",{className:"LemonTable__header-content",style:{justifyContent:column.align},children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center",style:maxHeaderWidth?{maxWidth:maxHeaderWidth}:void 0,children:[column.tooltip?(0,jsx_runtime.jsx)(Tooltip.u,{title:column.tooltip,children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:[column.title,(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"ml-1 text-base"})]})}):column.title,column.sorter&&(0,jsx_runtime.jsx)(Tooltip.u,{title:()=>{let nextSorting=(0,LemonTable_sorting.u)(currentSorting,determineColumnKey(column,"sorting"),disableSortingCancellation);return`Click to ${nextSorting?1===nextSorting.order?"sort ascending":"sort descending":"cancel sorting"}`},children:(0,jsx_runtime.jsx)(LemonTable_sorting.a,{order:currentSorting?.columnKey===determineColumnKey(column,"sorting")?currentSorting.order:null})})]}),column.more&&(0,jsx_runtime.jsx)(More.T,{overlay:column.more,className:"ml-1","data-attr":"table-header-more"})]})},`LemonTable-th-${columnGroupIndex}-${null!==(_determineColumnKey=determineColumnKey(column))&&void 0!==_determineColumnKey?_determineColumnKey:columnIndex}`)})),(0,jsx_runtime.jsx)(LemonTableLoader.v,{loading:loading,tag:"th"})]})]}),(0,jsx_runtime.jsx)("tbody",{children:paginationState.dataSourcePage.length?paginationState.dataSourcePage.map((record,rowIndex)=>{var _record$rowKey;let rowKeyDetermined=rowKey?"function"==typeof rowKey?rowKey(record,rowIndex):null!==(_record$rowKey=record[rowKey])&&void 0!==_record$rowKey?_record$rowKey:rowIndex:paginationState.currentStartIndex+rowIndex,rowClassNameDetermined="function"==typeof rowClassName?rowClassName(record,rowIndex):rowClassName,rowRibbonColorDetermined="function"==typeof rowRibbonColor?rowRibbonColor(record,rowIndex)||"var(--border-light)":rowRibbonColor,rowStatusDetermined="function"==typeof rowStatus?rowStatus(record,rowIndex):rowStatus;return(0,jsx_runtime.jsx)(TableRow,{record:record,recordIndex:paginationState.currentStartIndex+rowIndex,rowKeyDetermined:rowKeyDetermined,rowClassNameDetermined:rowClassNameDetermined,rowRibbonColorDetermined:rowRibbonColorDetermined,rowStatusDetermined:rowStatusDetermined,columnGroups:columnGroups,onRow:onRow,expandable:expandable,firstColumnSticky:firstColumnSticky},`LemonTable-tr-${rowKeyDetermined}`)}):loading?Array(loadingSkeletonRows).fill(null).map((_,rowIndex)=>(0,jsx_runtime.jsx)("tr",{children:columnGroups.flatMap((columnGroup,columnGroupIndex)=>columnGroup.children.map((column,columnIndex)=>(0,jsx_runtime.jsx)("td",{className:(0,clsx_m.default)(columnIndex===columnGroup.children.length-1&&"LemonTable__boundary",firstColumnSticky&&0===columnIndex&&"LemonTable__cell--sticky",column.className),children:(0,jsx_runtime.jsx)(LemonSkeleton.y,{})},`LemonTable-td-${columnGroupIndex}-${columnIndex}`)))},`LemonTable-tr-${rowIndex} ph-no-capture`)):(0,jsx_runtime.jsx)("tr",{className:"LemonTable__empty-state",children:(0,jsx_runtime.jsx)("td",{colSpan:columns.length+Number(!!expandable),children:emptyState||`No ${nouns[1]}`})})})]}),footer&&(0,jsx_runtime.jsx)("div",{className:"LemonTable__footer",children:footer}),(0,jsx_runtime.jsx)(PaginationControl.R,{...paginationState,nouns:nouns}),(0,jsx_runtime.jsx)("div",{className:"LemonTable__overlay"})]})})})}},"./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>LemonTableLink});var _LemonMarkdown__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMarkdown/index.ts"),_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonTableLink(_ref){let{title,description,...props}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__.r,{subtle:!0,...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:"flex flex-col py-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"flex flex-row items-center font-semibold text-sm gap-1",children:title}),description?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"text-text-3000 text-xs text-text-secondary-3000 mt-1",children:"string"==typeof description?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_LemonMarkdown__WEBPACK_IMPORTED_MODULE_0__.j,{className:"max-w-[30rem]",lowKeyHeadings:!0,children:description}):description}):null]})})}},"./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>LemonTableLoader_LemonTableLoader});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonTableLoader=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.scss"),LemonTableLoader_default=__webpack_require__.n(LemonTableLoader),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonTableLoader_default(),options),LemonTableLoader_default().locals;var react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),CSSTransition=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/CSSTransition.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonTableLoader_LemonTableLoader(_ref){let{loading=!1,tag="div",placement="bottom"}=_ref;return(0,jsx_runtime.jsx)(CSSTransition.Z,{in:loading,timeout:200,classNames:"LemonTableLoader-",appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:react.createElement(tag,{className:`LemonTableLoader ${"top"===placement?"top-0":"-bottom-px"}`})})}},"./frontend/src/lib/lemon-ui/LemonTable/columnUtils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JB:()=>createdByColumn,T1:()=>statusColumn,pD:()=>atColumn,rw:()=>createdAtColumn,yI:()=>updatedAtColumn});var lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/dayjs.ts"),_LemonTag__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/index.ts"),_ProfilePicture__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function atColumn(key,title){return{title:title,dataIndex:key,render:function RenderAt(created_at){return created_at?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",{className:"whitespace-nowrap text-right",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_components_TZLabel__WEBPACK_IMPORTED_MODULE_0__.w,{time:created_at})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span",{className:"text-muted",children:"—"})},align:"right",sorter:(a,b)=>(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_1__.Bv)(a[key]||0).diff(b[key]||0)}}function createdAtColumn(){return atColumn("created_at","Created")}function updatedAtColumn(){return atColumn("updated_at","Updated")}function createdByColumn(){return{title:"Created\xa0by",dataIndex:"created_by",render:function Render(_,item){let{created_by}=item;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",{className:"flex flex-row items-center flex-nowrap",children:created_by&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_ProfilePicture__WEBPACK_IMPORTED_MODULE_3__.Y,{user:created_by,size:"md",showName:!0})})},sorter:(a,b)=>(a.created_by?.first_name||a.created_by?.email||"").localeCompare(b.created_by?.first_name||b.created_by?.email||"")}}function statusColumn(){return{title:"Status",dataIndex:"enabled",render:function Status(enabled){return enabled?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_LemonTag__WEBPACK_IMPORTED_MODULE_2__.o,{type:"success",className:"uppercase",children:"Enabled"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_LemonTag__WEBPACK_IMPORTED_MODULE_2__.o,{type:"default",className:"uppercase",children:"Disabled"})},align:"center",sorter:(a,b)=>Number(b.enabled)-Number(a.enabled)}}},"./frontend/src/lib/lemon-ui/LemonTable/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>_LemonTable__WEBPACK_IMPORTED_MODULE_0__.g});var _LemonTable__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTable.tsx")},"./frontend/src/lib/lemon-ui/LemonTable/sorting.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>SortingIndicator,u:()=>getNextSorting});var lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function getNextSorting(currentSorting,selectedColumnKey,disableSortingCancellation){return!currentSorting||currentSorting.columnKey!==selectedColumnKey||-1===currentSorting.order&&disableSortingCancellation?{columnKey:selectedColumnKey,order:1}:1===currentSorting.order?{columnKey:selectedColumnKey,order:-1}:null}let SortingIndicator=(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function SortingIndicator(_ref,ref){let{order}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{ref:ref,className:"flex items-center text-base ml-2 whitespace-nowrap",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_0__.B4,{}),-1===order?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_0__.BD,{}):1===order?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_0__.Cz,{}):null]})})},"./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>LemonTabs_LemonTabs_LemonTabs});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonTabs=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.scss"),LemonTabs_default=__webpack_require__.n(LemonTabs),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonTabs_default(),options),LemonTabs_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),hooks=__webpack_require__("./frontend/src/lib/lemon-ui/hooks.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonTabs_LemonTabs_LemonTabs(_ref){let{activeKey,onChange,tabs,barClassName,size="medium","data-attr":dataAttr}=_ref,{containerRef,selectionRef,sliderWidth,sliderOffset,transitioning}=(0,hooks.g)(activeKey,200),realTabs=tabs.filter(Boolean),activeTab=realTabs.find(tab=>tab.key===activeKey);return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("LemonTabs",transitioning&&"LemonTabs--transitioning",`LemonTabs--${size}`),style:{"--lemon-tabs-slider-width":`${sliderWidth}px`,"--lemon-tabs-slider-offset":`${sliderOffset}px`},"data-attr":dataAttr,children:[(0,jsx_runtime.jsx)("ul",{className:(0,clsx_m.default)("LemonTabs__bar",barClassName),role:"tablist",ref:containerRef,children:realTabs.map(tab=>{let content=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[tab.label,tab.tooltip&&(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"ml-1 text-base shrink-0"})]});return(0,jsx_runtime.jsx)(Tooltip.u,{title:tab.tooltip,placement:"top",offset:0,children:(0,jsx_runtime.jsx)("li",{className:(0,clsx_m.default)("LemonTabs__tab",tab.key===activeKey&&"LemonTabs__tab--active"),onClick:onChange?()=>onChange(tab.key):void 0,role:"tab","aria-selected":tab.key===activeKey,tabIndex:0,onKeyDown:onChange?e=>{"Enter"===e.key&&onChange(tab.key)}:void 0,ref:tab.key===activeKey?selectionRef:void 0,children:tab.link?(0,jsx_runtime.jsx)(Link.r,{className:"LemonTabs__tab-content",to:tab.link,children:content}):(0,jsx_runtime.jsx)("div",{className:"LemonTabs__tab-content",children:content})})},tab.key)})}),activeTab&&"content"in activeTab&&(0,jsx_runtime.jsx)("div",{className:"LemonTabs__content",children:activeTab.content},activeKey)]})}},"./frontend/src/lib/lemon-ui/LemonTabs/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>_LemonTabs__WEBPACK_IMPORTED_MODULE_0__.T});var _LemonTabs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.tsx")},"./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>LemonTag_LemonTag_LemonTag});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonTag=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTag/LemonTag.scss"),LemonTag_default=__webpack_require__.n(LemonTag),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonTag_default(),options),LemonTag_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonTag_LemonTag_LemonTag=(0,react.forwardRef)(function LemonTag(_ref,ref){let{type="default",children,className,size="medium",weight,icon,closable,onClose,popover,disabledReason,...props}=_ref;return(0,jsx_runtime.jsxs)("div",{ref:ref,className:(0,clsx_m.default)("LemonTag",`LemonTag--size-${size}`,disabledReason?"cursor-not-allowed":props.onClick?"cursor-pointer":void 0,`LemonTag--${type}`,weight&&`LemonTag--${weight}`,className),role:props.onClick?"button":void 0,title:disabledReason||void 0,"aria-disabled":!!disabledReason||void 0,...props,children:[icon&&(0,jsx_runtime.jsx)("span",{className:"LemonTag__icon",children:icon}),children,popover?.overlay&&(0,jsx_runtime.jsx)(LemonButton.$,{dropdown:popover,size:"small",className:"LemonTag__right-button",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{}),onClick:e=>{e.stopPropagation()}}),closable&&(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{className:"h-3.5 w-3.5"}),onClick:onClose,size:"xsmall",className:"LemonTag__right-button"})]})})},"./frontend/src/lib/lemon-ui/LemonTag/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>_LemonTag__WEBPACK_IMPORTED_MODULE_0__.o});var _LemonTag__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx")},"./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_:()=>LemonTextArea_LemonTextArea_LemonTextArea});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonTextArea=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.scss"),LemonTextArea_default=__webpack_require__.n(LemonTextArea),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonTextArea_default(),options),LemonTextArea_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_textarea_autosize_browser_esm=__webpack_require__("./node_modules/.pnpm/react-textarea-autosize@8.3.4_@types+react@17.0.52_react@18.2.0/node_modules/react-textarea-autosize/dist/react-textarea-autosize.browser.esm.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonTextArea_LemonTextArea_LemonTextArea=react.forwardRef(function _LemonTextArea(_ref2,ref){let{className,onChange,onPressEnter,onPressCmdEnter,minRows=3,onKeyDown,stopPropagation,...textProps}=_ref2,_ref=(0,react.useRef)(null);return(0,jsx_runtime.jsx)(react_textarea_autosize_browser_esm.Z,{minRows:minRows,ref:ref||_ref,className:(0,clsx_m.default)("LemonTextArea",className),onKeyDown:e=>{if(stopPropagation&&e.stopPropagation(),"Enter"===e.key){let target=e.currentTarget;if(e.metaKey||e.ctrlKey){if(onPressEnter){let selectionStartBeforeChange=target.selectionStart,selectionEndBeforeChange=target.selectionEnd;target.value=target.value.substring(0,selectionStartBeforeChange)+"\n"+target.value.substring(selectionEndBeforeChange),target.selectionStart=target.selectionEnd=selectionStartBeforeChange+1,onChange?.(target.value)}else onPressCmdEnter&&(onPressCmdEnter(target.value),e.preventDefault())}else onPressEnter&&(onPressEnter?.(target.value),e.preventDefault())}onKeyDown?.(e)},onChange:event=>{var _event$currentTarget$;return stopPropagation&&event.stopPropagation(),onChange?.(null!==(_event$currentTarget$=event.currentTarget.value)&&void 0!==_event$currentTarget$?_event$currentTarget$:"")},...textProps})})},"./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>LemonTextAreaMarkdown});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_Cards_TextCard_TextCard__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/Cards/TextCard/TextCard.tsx"),lib_hooks_useUploadFiles__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/hooks/useUploadFiles.ts"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonFileInput__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonFileInput/index.ts"),lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),lib_lemon_ui_LemonTextArea_LemonTextArea__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.tsx"),lib_lemon_ui_LemonToast__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/index.ts"),lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),react__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LemonTextAreaMarkdown=react__WEBPACK_IMPORTED_MODULE_11__.forwardRef(function _LemonTextAreaMarkdown(_ref,ref){let{value,onChange,...editAreaProps}=_ref,{objectStorageAvailable}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_12__.preflightLogic),[isPreviewShown,setIsPreviewShown]=(0,react__WEBPACK_IMPORTED_MODULE_11__.useState)(!1),dropRef=(0,react__WEBPACK_IMPORTED_MODULE_11__.useRef)(null),{setFilesToUpload,filesToUpload,uploading}=(0,lib_hooks_useUploadFiles__WEBPACK_IMPORTED_MODULE_2__.nc)({onUpload:(url,fileName)=>{onChange?.(value+` -![${fileName}](${url})`),posthog_js__WEBPACK_IMPORTED_MODULE_10__.ZP.capture("markdown image uploaded",{name:fileName})},onError:detail=>{posthog_js__WEBPACK_IMPORTED_MODULE_10__.ZP.capture("markdown image upload failed",{error:detail}),lib_lemon_ui_LemonToast__WEBPACK_IMPORTED_MODULE_7__.U.error(`Error uploading image: ${detail}`)}});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_5__.T,{activeKey:isPreviewShown?"preview":"write",onChange:key=>setIsPreviewShown("preview"===key),tabs:[{key:"write",label:"Write",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{ref:dropRef,className:"LemonTextMarkdown flex flex-col space-y-1 rounded",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTextArea_LemonTextArea__WEBPACK_IMPORTED_MODULE_6__._,{ref:ref,...editAreaProps,autoFocus:!0,value:value,onChange:onChange}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{className:"text-muted inline-flex items-center space-x-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.kh,{className:"text-2xl"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span",{children:"Markdown formatting support"})]}),objectStorageAvailable?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonFileInput__WEBPACK_IMPORTED_MODULE_4__.m,{accept:"image/*",multiple:!1,alternativeDropTargetRef:dropRef,onChange:setFilesToUpload,loading:uploading,value:filesToUpload}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{className:"text-muted inline-flex items-center space-x-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_9__.u,{title:"Enable object storage to add images by dragging and dropping.",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.sH,{className:"text-xl mr-1"})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("span",{children:["Add external images using"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_8__.r,{to:"https://www.markdownguide.org/basic-syntax/#images-1",children:[" ","Markdown image links"]}),"."]})]})]})},{key:"preview",label:"Preview",content:value?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_components_Cards_TextCard_TextCard__WEBPACK_IMPORTED_MODULE_1__.D7,{text:value,className:"LemonTextArea--preview"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("i",{children:"Nothing to preview"})}]})})},"./frontend/src/lib/lemon-ui/LemonTextArea/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>lib_lemon_ui_LemonTextArea_LemonTextAreaMarkdown__WEBPACK_IMPORTED_MODULE_1__.X,_:()=>_LemonTextArea__WEBPACK_IMPORTED_MODULE_0__._});var _LemonTextArea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.tsx"),lib_lemon_ui_LemonTextArea_LemonTextAreaMarkdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx")},"./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{UJ:()=>lemonToast,fI:()=>ToastContent,ty:()=>ToastCloseButton});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),posthog_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),react_toastify__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react-toastify@8.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-toastify/dist/react-toastify.esm.js"),_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),_LemonButton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),_Spinner__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ToastCloseButton(_ref){let{closeToast}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_4__.J,{type:"tertiary",size:"small",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),onClick:closeToast,"data-attr":"toast-close-button"})}let GET_HELP_BUTTON={label:"Get help",action:()=>{window.open("https://posthog.com/support?utm_medium=in-product&utm_campaign=error-toast","_blank")}};function ToastContent(_ref2){let{type,message,button,id}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div",{className:"flex items-center","data-attr":`${type}-toast`,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{className:"grow overflow-hidden text-ellipsis",children:message}),button&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_4__.J,{onClick:()=>{button.action(),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.dismiss(id)},type:"secondary",size:"small","data-attr":button.dataAttr,children:button.label})]})}function ensureToastId(toastOptions){return toastOptions.toastId?toastOptions:{...toastOptions,toastId:`lemon-${Math.round(1e7*Math.random())}`}}let lemonToast={info(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.info((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"info",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconInfo,{}),...toastOptions})},success(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"success",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{}),...toastOptions})},warning(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture("toast warning",{message:String(message),button:button?.label,toastId:toastOptions.toastId}),toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.warning((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"warning",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconWarning,{}),...toastOptions})},error(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture&&posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture("toast error",{message:String(message),button:button?.label,toastId:toastOptions.toastId}),toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.error((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"error",message:message,button:button||GET_HELP_BUTTON,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.b8,{}),...toastOptions})},promise(promise,messages){var _icons$pending,_icons$success,_icons$error;let icons=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{button,...toastOptions}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.promise(promise,{pending:{render:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"info",message:messages.pending}),icon:null!==(_icons$pending=icons.pending)&&void 0!==_icons$pending?_icons$pending:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_Spinner__WEBPACK_IMPORTED_MODULE_5__.$,{})},success:{render(_ref3){let{data}=_ref3;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"success",message:data||messages.success})},icon:null!==(_icons$success=icons.success)&&void 0!==_icons$success?_icons$success:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{})},error:{render(_ref4){let{data}=_ref4;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"error",message:data?.message||messages.error})},icon:null!==(_icons$error=icons.error)&&void 0!==_icons$error?_icons$error:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.b8,{})}},toastOptions)},dismiss(id){react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.dismiss(id)}}},"./frontend/src/lib/lemon-ui/LemonToast/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>_LemonToast__WEBPACK_IMPORTED_MODULE_0__.UJ});var _LemonToast__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx")},"./frontend/src/lib/lemon-ui/LemonWidget/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_:()=>LemonWidget_LemonWidget_LemonWidget});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonWidget=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonWidget/LemonWidget.scss"),LemonWidget_default=__webpack_require__.n(LemonWidget),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonWidget_default(),options),LemonWidget_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonWidget_LemonWidget_LemonWidget(_ref){let{title,onClose,actions,children,className}=_ref;return(0,jsx_runtime.jsxs)(Widget,{className:className,children:[(0,jsx_runtime.jsxs)(Header,{children:[(0,jsx_runtime.jsx)("span",{className:"flex-1 text-primary-alt px-2 truncate",children:title}),actions,onClose&&(0,jsx_runtime.jsx)(LemonButton.J,{status:"danger",onClick:onClose,size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})})]}),(0,jsx_runtime.jsx)(Content,{children:children})]})}let Widget=_ref2=>{let{children,className}=_ref2;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonWidget",className),children:children})},Header=_ref3=>{let{children,className}=_ref3;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonWidget__header",className),children:children})},Content=_ref4=>{let{children}=_ref4;return(0,jsx_runtime.jsx)("div",{className:"LemonWidget__content border-t border-border",children:children})}},"./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>Lettermark_Lettermark_Lettermark,w:()=>LettermarkColor});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Lettermark=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Lettermark/Lettermark.scss"),Lettermark_default=__webpack_require__.n(Lettermark),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Lettermark_default(),options),Lettermark_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LettermarkColor=function(LettermarkColor){return LettermarkColor.Gray="gray",LettermarkColor}({}),Lettermark_Lettermark_Lettermark=react.forwardRef(function Lettermark(_ref,ref){let{name,index,color,outlined=!1,rounded=!1,size="medium"}=_ref,representation=name?"number"==typeof name?String(Math.floor(name)):String.fromCodePoint(name.codePointAt(0)).toLocaleUpperCase():"?",colorIndex=color||("number"==typeof index?index%8+1:void 0);return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)(`Lettermark Lettermark--${size}`,colorIndex&&`Lettermark--variant-${colorIndex}`,outlined&&"Lettermark--outlined",rounded&&"Lettermark--rounded","?"===representation&&"Lettermark--unknown"),ref:ref,children:representation})})},"./frontend/src/lib/lemon-ui/Lettermark/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>_Lettermark__WEBPACK_IMPORTED_MODULE_0__.B,w:()=>_Lettermark__WEBPACK_IMPORTED_MODULE_0__.w});var _Lettermark__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx")},"./frontend/src/lib/lemon-ui/Link/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>Link_Link_Link});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Link=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Link/Link.scss"),Link_default=__webpack_require__.n(Link),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Link_default(),options),Link_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),getAppContext=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),router_utils=__webpack_require__("./frontend/src/lib/utils/router-utils.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),DraggableToNotebook=__webpack_require__("./frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx"),sidePanelStateLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),types=__webpack_require__("./frontend/src/types.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let shouldForcePageLoad=input=>{if(!input||"string"!=typeof input)return!1;let matches=input.match(/\/project\/(\d+)/);return!!matches&&matches[1]!==`${(0,getAppContext.ev)()}`},isPostHogDomain=url=>/^https:\/\/((www|app|eu)\.)?posthog\.com/.test(url),isDirectLink=url=>/^(mailto:|https?:\/\/|:\/\/)/.test(url),isPostHogComDocs=url=>/^https:\/\/(www\.)?posthog\.com\/docs/.test(url),Link_Link_Link=react.forwardRef((_ref,ref)=>{let{to,target,subtle,disableClientSideRouting,preventClick=!1,onClick:onClickRaw,className,children,disabled,disabledReason,targetBlankIcon="string"==typeof children,...props}=_ref,{elementProps:draggableProps}=(0,DraggableToNotebook.V)({href:"string"==typeof to?to:void 0}),onClick=event=>{if(event.metaKey||event.ctrlKey){event.stopPropagation();return}if(onClickRaw?.(event),event.isDefaultPrevented()){event.preventDefault();return}let mountedSidePanelLogic=sidePanelStateLogic.f.findMounted();if("string"==typeof to&&isPostHogComDocs(to)&&mountedSidePanelLogic){let{sidePanelOpen}=mountedSidePanelLogic.values,{openSidePanel}=mountedSidePanelLogic.actions;event.preventDefault();let target=event.currentTarget,container=document.getElementsByTagName("main")[0],topBar=document.getElementsByClassName("TopBar3000")[0];!sidePanelOpen&&container.contains(target)&&setTimeout(()=>{let y=container.scrollTop+target.getBoundingClientRect().top-topBar.clientHeight;container.scrollTo({top:y})},50),openSidePanel(types.H$.Docs,to);return}target||!to||(0,utils.Bm)(to)||disableClientSideRouting||shouldForcePageLoad(to)||(event.preventDefault(),to&&"#"!==to&&!preventClick&&(Array.isArray(to)?lib.router.actions.push(...to):lib.router.actions.push(to)))},rel="string"==typeof to&&isPostHogDomain(to)?"noopener":"noopener noreferrer",href=to?"string"==typeof to?isDirectLink(to)||disableClientSideRouting?to:(0,router_utils.Jf)(to):"#":void 0;return to?(0,jsx_runtime.jsxs)("a",{ref:ref,className:(0,clsx_m.default)("Link",subtle&&"Link--subtle",className),onClick:onClick,href:href,target:target,rel:"_blank"===target?rel:void 0,...props,...draggableProps,children:[children,targetBlankIcon&&"_blank"===target?(0,jsx_runtime.jsx)(icons.pF,{}):null]}):(0,jsx_runtime.jsx)(Tooltip.u,{title:disabledReason?(0,jsx_runtime.jsx)("span",{className:"italic",children:disabledReason}):void 0,children:(0,jsx_runtime.jsx)("span",{children:(0,jsx_runtime.jsx)("button",{ref:ref,className:(0,clsx_m.default)("Link",subtle&&"Link--subtle",className),onClick:onClick,type:"button",disabled:disabled||!!disabledReason,...props,children:children})})})});Link_Link_Link.displayName="Link"},"./frontend/src/lib/lemon-ui/Link/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>_Link__WEBPACK_IMPORTED_MODULE_0__.r});var _Link__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/Link.tsx")},"./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>PaginationControl_PaginationControl_PaginationControl});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PaginationControl=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.scss"),PaginationControl_default=__webpack_require__.n(PaginationControl),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PaginationControl_default(),options),PaginationControl_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function PaginationControl_PaginationControl_PaginationControl(_ref){let{pagination,currentPage,setCurrentPage,pageCount,dataSourcePage,entryCount,currentStartIndex,currentEndIndex,nouns=["entry","entries"],bordered=!1}=_ref,isPreviousAvailable=null!==currentPage?currentPage>1:!!(pagination?.controlled&&pagination.onBackward),isNextAvailable=null!==currentPage&&null!==pageCount?currentPage{pagination?.controlled&&pagination.onBackward?.(),(pagination?.controlled&¤tPage||!pagination?.controlled)&&setCurrentPage(Math.max(1,Math.min(pageCount,currentPage)-1))}}),(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(icons.VG,{}),disabledReason:isNextAvailable?void 0:"No next page",size:"small",onClick:()=>{pagination?.controlled&&pagination.onForward?.(),(pagination?.controlled&¤tPage||!pagination?.controlled)&&setCurrentPage(Math.min(pageCount,currentPage+1))}})]}):null}},"./frontend/src/lib/lemon-ui/PaginationControl/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>_PaginationControl__WEBPACK_IMPORTED_MODULE_0__.R,h:()=>_usePagination__WEBPACK_IMPORTED_MODULE_1__.h});var _PaginationControl__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.tsx"),_usePagination__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts")},"./frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>usePagination});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function usePagination(dataSource,pagination,id){let currentPageParam=id?`${id}_page`:"page",{location:location1,searchParams,hashParams}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(kea_router__WEBPACK_IMPORTED_MODULE_1__.router),{push}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(kea_router__WEBPACK_IMPORTED_MODULE_1__.router),setCurrentPage=(0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(newPage=>push(location1.pathname,{...searchParams,[currentPageParam]:newPage},hashParams),[location1,searchParams,hashParams,push]),entryCount=pagination?.controlled?pagination.entryCount||null:dataSource.length,pageCount=entryCount&&(pagination?pagination.pageSize?Math.ceil(entryCount/pagination.pageSize):1:null),currentPage=pagination?.controlled?pagination.currentPage||null:Math.min(parseInt(searchParams[currentPageParam])||1,pageCount),{dataSourcePage,currentStartIndex,currentEndIndex}=(0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(()=>{let calculatedStartIndex=pagination&¤tPage&&pagination.pageSize?(currentPage-1)*pagination.pageSize:0,processedDataSource=pagination&&!pagination.controlled?dataSource.slice(calculatedStartIndex,calculatedStartIndex+pagination.pageSize):dataSource,calculatedEndIndex=calculatedStartIndex+processedDataSource.length;return{dataSourcePage:processedDataSource,currentStartIndex:calculatedStartIndex,currentEndIndex:calculatedEndIndex}},[currentPage,pageCount,pagination,dataSource]);return{pagination,dataSourcePage,currentPage,pageCount,currentStartIndex,currentEndIndex,entryCount,setCurrentPage}}},"./frontend/src/lib/lemon-ui/Popover/Popover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J2:()=>Popover,Mp:()=>PopoverOverlayContext,Sn:()=>PopoverReferenceContext}),__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.scss");var _floating_ui_react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/@floating-ui+dom@1.6.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/@floating-ui+react-dom@2.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),clsx__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_components_ScrollableShadows_ScrollableShadows__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/hooks/useEventListener.ts"),lib_hooks_useFloatingContainerContext__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/hooks/useFloatingContainerContext.ts"),lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/hooks/useOutsideClickHandler.ts"),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_transition_group__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/CSSTransition.js"),_LemonTable_LemonTableLoader__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let PopoverOverlayContext=react__WEBPACK_IMPORTED_MODULE_5__.createContext([!0,-1]),PopoverReferenceContext=react__WEBPACK_IMPORTED_MODULE_5__.createContext(null),nestedPopoverReceivedClick=!1,Popover=react__WEBPACK_IMPORTED_MODULE_5__.forwardRef(function PopoverInternal(_ref,contentRef){let{children,referenceElement,overlay,loadingBar,visible,onClickOutside,onClickInside,onMouseEnterInside,onMouseLeaveInside,placement="bottom-start",fallbackPlacements=["bottom-start","bottom-end","top-start","top-end"],className,padded=!0,middleware,matchWidth=!1,maxContentWidth=!1,additionalRefs=[],closeParentPopoverOnClickInside=!1,referenceRef:extraReferenceRef,floatingRef:extraFloatingRef,style,showArrow=!1,overflowHidden=!1}=_ref,[parentPopoverVisible,parentPopoverLevel]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(PopoverOverlayContext),currentPopoverLevel=parentPopoverLevel+1;parentPopoverVisible||(visible=!1);let arrowRef=(0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null),{x,y,refs:{reference:referenceRef,floating:floatingRef,setReference},strategy,placement:effectivePlacement,update,middlewareData}=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.YF)({open:visible,placement,strategy:"fixed",middleware:[...fallbackPlacements?[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.RR)({fallbackPlacements,fallbackStrategy:"initialPlacement"})]:[],(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.uY)({padding:8,boundary:document.body}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.dp)({padding:4,apply(_ref2){let{availableWidth,availableHeight,rects,elements:{floating}}=_ref2;floating.style.maxHeight=`${availableHeight}px`,floating.style.maxWidth=`${Math.min(availableWidth,window.innerWidth-16)}px`,floating.style.width="initial",matchWidth&&(floating.style.minWidth=`${rects.reference.width}px`)}}),...showArrow?[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_10__.x7)({element:arrowRef,padding:8})]:[],...null!=middleware?middleware:[]]}),[floatingElement,setFloatingElement]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(null),mergedReferenceRef=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.qq)([referenceRef,extraReferenceRef||null,children?.ref]),arrowStyle=middlewareData.arrow?{left:`${middlewareData.arrow.x}px`,top:`${middlewareData.arrow.y}px`}:{};(0,react__WEBPACK_IMPORTED_MODULE_5__.useLayoutEffect)(()=>{referenceElement&&setReference(referenceElement)},[referenceElement]),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_2__.O)("keydown",event=>{"Escape"===event.key&&onClickOutside?.(event)},referenceElement),(0,lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__.e)([floatingRef,referenceRef,...additionalRefs],event=>{setTimeout(()=>{visible&&!nestedPopoverReceivedClick&&onClickOutside?.(event)},1)},[visible]),(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>{if(visible&&referenceRef?.current&&floatingElement)return(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.Me)(referenceRef.current,floatingElement,update)},[visible,placement,referenceRef?.current,floatingElement,...additionalRefs]);let floatingContainer=(0,lib_hooks_useFloatingContainerContext__WEBPACK_IMPORTED_MODULE_3__.A)(),clonedChildren=children?react__WEBPACK_IMPORTED_MODULE_5__.cloneElement(children,{ref:mergedReferenceRef}):null,isAttached=clonedChildren||referenceElement,top=isAttached?null!=y?y:0:void 0,left=isAttached?null!=x?x:0:void 0;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[clonedChildren&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverReferenceContext.Provider,{value:[visible,effectivePlacement],children:clonedChildren}),visible?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.ll,{root:floatingContainer,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_transition_group__WEBPACK_IMPORTED_MODULE_11__.Z,{in:visible,timeout:50,classNames:"Popover-",appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverReferenceContext.Provider,{value:null,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverOverlayContext.Provider,{value:[visible,currentPopoverLevel],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_12__.default)("Popover",padded&&"Popover--padded",maxContentWidth&&"Popover--max-content-width",!isAttached&&"Popover--top-centered",showArrow&&"Popover--with-arrow",className),"data-placement":effectivePlacement,ref:el=>{setFloatingElement(el),floatingRef.current=el,extraFloatingRef&&(extraFloatingRef.current=el)},style:{display:middlewareData.hide?.referenceHidden?"none":void 0,position:strategy,top,left,...style},onClick:e=>{e.target instanceof HTMLElement&&e.target.closest(`.${lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__.r}`)||(onClickInside?.(e),parentPopoverLevel>-1&&!closeParentPopoverOnClickInside&&(nestedPopoverReceivedClick=!0,setTimeout(()=>{nestedPopoverReceivedClick=!1},1)))},onMouseEnter:onMouseEnterInside,onMouseLeave:onMouseLeaveInside,"aria-level":currentPopoverLevel,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:"Popover__box",children:[showArrow&&isAttached&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{ref:arrowRef,className:"Popover__arrow",style:arrowStyle}),null!=loadingBar&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_LemonTable_LemonTableLoader__WEBPACK_IMPORTED_MODULE_6__.v,{loading:loadingBar,placement:"top"}),overflowHidden?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{className:"Popover__content flex flex-col overflow-hidden",ref:contentRef,children:overlay}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_components_ScrollableShadows_ScrollableShadows__WEBPACK_IMPORTED_MODULE_1__.D,{className:"Popover__content",ref:contentRef,direction:"vertical",children:overlay})]})})})})})}):null]})})},"./frontend/src/lib/lemon-ui/Popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J2:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.J2,Mp:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.Mp,Sn:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.Sn});var _Popover__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx")},"./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ProfileBubbles});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),_Tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ProfileBubbles(_ref){let restTitle,{people,tooltip,limit=6,...divProps}=_ref,overflowing=people.length>limit,shownPeople=people,stashedPeople=[];return overflowing&&(shownPeople=people.slice(0,limit-1),restTitle=(stashedPeople=people.slice(limit-1)).map(_ref2=>{let{email,name,title}=_ref2;return title||name||email}).join(", ")),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tooltip__WEBPACK_IMPORTED_MODULE_0__.u,{title:tooltip,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.default)("ProfileBubbles",!!divProps.onClick&&"cursor-pointer"),...divProps,children:[shownPeople.map((_ref3,index)=>{let{email,name,title}=_ref3;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(___WEBPACK_IMPORTED_MODULE_1__.Y,{user:{email,first_name:name},title:title||name||email,size:"md",index:index},email)}),overflowing&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:"ProfileBubbles__more",title:restTitle,children:["+",stashedPeople.length]})]})})}},"./frontend/src/lib/lemon-ui/ProfilePicture/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ProfileBubbles.r,Y:()=>ProfilePicture_ProfilePicture_ProfilePicture});var ProfileBubbles=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ProfilePicture=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.scss"),ProfilePicture_default=__webpack_require__.n(ProfilePicture),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ProfilePicture_default(),options),ProfilePicture_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),HedgehogBuddyRender=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddyRender.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),md5=__webpack_require__("./node_modules/.pnpm/md5@2.3.0/node_modules/md5/md5.js"),md5_default=__webpack_require__.n(md5),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),Lettermark=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ProfilePicture_ProfilePicture_ProfilePicture=react.forwardRef(function ProfilePicture(_ref,ref){let{user,name,size="lg",showName,className,index,title,type="person"}=_ref,{user:currentUser}=(0,index_esm.useValues)(userLogic.userLogic),[gravatarLoaded,setGravatarLoaded]=(0,react.useState)(),email=user?.email;user&&(name=(0,utils.v2)(user),email=user.email);let combinedNameAndEmail=name&&email?`${name} <${email}>`:name||email,hedgehogProfile=!!user?.hedgehog_config?.use_as_profile,gravatarUrl=(0,react.useMemo)(()=>{if(hedgehogProfile||(0,utils.es)())return;let emailOrNameWithEmail=email||(name?.includes("@")?name:void 0);if(emailOrNameWithEmail){let emailHash=md5_default()(emailOrNameWithEmail.trim().toLowerCase());return`https://www.gravatar.com/avatar/${emailHash}?s=96&d=404`}},[email,hedgehogProfile]),pictureComponent=(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("ProfilePicture",size,className),ref:ref,children:[hedgehogProfile?(0,jsx_runtime.jsx)(HedgehogBuddyRender.C,{...user.hedgehog_config,size:"100%"}):!0!==gravatarLoaded&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"bot"===type?(0,jsx_runtime.jsx)(icons.Ye,{className:"p-0.5"}):hedgehogProfile?(0,jsx_runtime.jsx)(HedgehogBuddyRender.C,{...user.hedgehog_config,size:"100%"}):(0,jsx_runtime.jsx)(Lettermark.B,{name:combinedNameAndEmail,index:index,rounded:!0,color:"system"===type?Lettermark.w.Gray:void 0})}),gravatarUrl&&!1!==gravatarLoaded?(0,jsx_runtime.jsx)("img",{className:"absolute top-0 left-0 w-full h-full rounded-full",src:gravatarUrl,title:title||`This is the Gravatar for ${combinedNameAndEmail}`,alt:"",onError:()=>setGravatarLoaded(!1),onLoad:()=>setGravatarLoaded(!0)}):null]});return showName?(0,jsx_runtime.jsxs)("div",{className:"profile-package",title:combinedNameAndEmail,children:[pictureComponent,(0,jsx_runtime.jsx)("span",{className:"profile-name",children:currentUser?.email===email?"you":name||email||"an unknown user"})]}):pictureComponent})},"./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Spinner_Spinner_Spinner,t:()=>SpinnerOverlay});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Spinner=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Spinner/Spinner.scss"),Spinner_default=__webpack_require__.n(Spinner),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Spinner_default(),options),Spinner_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),bundle_mjs=__webpack_require__("./node_modules/.pnpm/tailwind-merge@2.2.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Spinner_Spinner_Spinner(_ref){let{textColored=!1,className}=_ref;return(0,jsx_runtime.jsxs)("svg",{className:(0,bundle_mjs.m6)("LemonIcon Spinner",textColored&&"Spinner--textColored",className),viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,jsx_runtime.jsx)("g",{className:"Spinner__layer",children:(0,jsx_runtime.jsx)("circle",{cx:"24",cy:"24",r:"16"})}),(0,jsx_runtime.jsx)("g",{className:"Spinner__layer",children:(0,jsx_runtime.jsx)("circle",{cx:"24",cy:"24",r:"16"})})]})}function SpinnerOverlay(_ref2){let{sceneLevel,visible=!0,className,mode="spinning",...spinnerProps}=_ref2;return(0,jsx_runtime.jsx)("div",{className:(0,bundle_mjs.dV)("SpinnerOverlay",sceneLevel&&"SpinnerOverlay--scene-level"),"aria-hidden":!visible,children:"editing"===mode?(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{className:"text-5xl text-primary z-10 drop-shadow-xl"}):(0,jsx_runtime.jsx)(Spinner_Spinner_Spinner,{className:(0,bundle_mjs.m6)("text-5xl",className),...spinnerProps})})}},"./frontend/src/lib/lemon-ui/Spinner/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>_Spinner__WEBPACK_IMPORTED_MODULE_0__.$,t:()=>_Spinner__WEBPACK_IMPORTED_MODULE_0__.t});var _Spinner__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx")},"./frontend/src/lib/lemon-ui/Splotch/Splotch.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>Splotch_Splotch_Splotch,N:()=>SplotchColor});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Splotch=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Splotch/Splotch.scss"),Splotch_default=__webpack_require__.n(Splotch),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Splotch_default(),options),Splotch_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let SplotchColor=function(SplotchColor){return SplotchColor.Purple="purple",SplotchColor.Blue="blue",SplotchColor.Green="green",SplotchColor.Black="black",SplotchColor.White="white",SplotchColor}({});function Splotch_Splotch_Splotch(_ref){let{color}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("Splotch",`Splotch--${color}`),children:(0,jsx_runtime.jsx)("div",{className:"Splotch__paint"})})}},"./frontend/src/lib/lemon-ui/Splotch/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>_Splotch__WEBPACK_IMPORTED_MODULE_0__.N,k:()=>_Splotch__WEBPACK_IMPORTED_MODULE_0__.k});var _Splotch__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Splotch/Splotch.tsx")},"./frontend/src/lib/lemon-ui/Tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip_Tooltip_Tooltip});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Tooltip=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Tooltip/Tooltip.scss"),Tooltip_default=__webpack_require__.n(Tooltip),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Tooltip_default(),options),Tooltip_default().locals;var floating_ui_react=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),floating_ui_dom=__webpack_require__("./node_modules/.pnpm/@floating-ui+dom@1.6.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),floating_ui_react_dom=__webpack_require__("./node_modules/.pnpm/@floating-ui+react-dom@2.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),useFloatingContainerContext=__webpack_require__("./frontend/src/lib/hooks/useFloatingContainerContext.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Tooltip_Tooltip_Tooltip(_ref){let{children,title,className="",placement="top",offset=8,arrowOffset,delayMs=500,closeDelayMs=100,interactive=!1,visible:controlledOpen}=_ref,[uncontrolledOpen,setUncontrolledOpen]=(0,react.useState)(!1),[isHoveringTooltip,setIsHoveringTooltip]=(0,react.useState)(!1),caretRef=(0,react.useRef)(null),floatingContainer=(0,useFloatingContainerContext.A)(),open1=null!=controlledOpen?controlledOpen:uncontrolledOpen||isHoveringTooltip,{context,refs}=(0,floating_ui_react.YF)({placement,open:open1,onOpenChange:setUncontrolledOpen,whileElementsMounted:floating_ui_dom.Me,middleware:[(0,floating_ui_core.cv)(offset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.uY)(),(0,floating_ui_react_dom.x7)({element:caretRef})]}),hover=(0,floating_ui_react.XI)(context,{move:!1,delay:{open:delayMs,close:closeDelayMs}}),focus=(0,floating_ui_react.KK)(context),dismiss=(0,floating_ui_react.bQ)(context),role=(0,floating_ui_react.qs)(context,{role:"tooltip"}),{getFloatingProps,getReferenceProps}=(0,floating_ui_react.NI)([hover,focus,dismiss,role]),{styles:transitionStyles}=(0,floating_ui_react.Y_)(context,{duration:{open:150,close:0},initial:_ref2=>{let{side}=_ref2;return{opacity:0,transform:({top:"translateY(3px)",bottom:"translateY(-3px)",left:"translateX(3px)",right:"translateX(-3px)"})[side]}}}),childrenRef=children.ref,triggerRef=(0,floating_ui_react.qq)([refs.setReference,childrenRef]),child=react.isValidElement(children)?children:(0,jsx_runtime.jsx)("span",{children:children}),clonedChild=react.cloneElement(child,getReferenceProps({ref:triggerRef,...child.props}));return title?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[clonedChild,open1&&(0,jsx_runtime.jsx)(floating_ui_react.ll,{root:floatingContainer,children:(0,jsx_runtime.jsx)("div",{ref:refs.setFloating,className:"Tooltip max-w-sm",style:{...context.floatingStyles},...getFloatingProps({onMouseEnter:()=>interactive&&setIsHoveringTooltip(!0),onMouseLeave:()=>interactive&&setIsHoveringTooltip(!1)}),children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("bg-[var(--tooltip-bg)] py-1.5 px-2 break-words rounded text-start text-white",className),style:{...transitionStyles},children:["function"==typeof title?title():title,(0,jsx_runtime.jsx)(floating_ui_react.Y$,{ref:caretRef,context:context,width:8,height:4,staticOffset:arrowOffset,fill:"var(--tooltip-bg)"})]})})})]}):children}},"./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>UploadedLogo});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_LemonSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),_Lettermark__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let UploadedLogo=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function UploadedLogo(_ref,ref){let{name,mediaId,entityId,size="medium",outlinedLettermark}=_ref,[isLoadingImage,setIsLoadingImage]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!0);return mediaId?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)("relative flex overflow-hidden select-none","xlarge"===size?"size-16 rounded before:absolute before:inset-0 before:border before:rounded":"medium"===size?"size-6 rounded-sm":"size-4 rounded-sm"),ref:ref,children:[isLoadingImage&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_LemonSkeleton__WEBPACK_IMPORTED_MODULE_1__.y,{className:"absolute inset-0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img",{className:"size-full object-cover",src:mediaId.startsWith("data:")?mediaId:`/uploaded_media/${mediaId}`,onError:()=>setIsLoadingImage(!1),onLoad:()=>setIsLoadingImage(!1)})]}):("string"==typeof entityId&&(entityId=parseInt(entityId.split("-").at(-1),16)),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Lettermark__WEBPACK_IMPORTED_MODULE_2__.B,{index:entityId,name:name,size:size,outlined:outlinedLettermark}))})},"./frontend/src/lib/lemon-ui/UploadedLogo/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>_UploadedLogo__WEBPACK_IMPORTED_MODULE_0__.U});var _UploadedLogo__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.tsx")},"./frontend/src/lib/lemon-ui/hooks.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>useSliderPositioning});var lib_hooks_useResizeObserver__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function useSliderPositioning(currentValue,transitionMs){let hasRenderedInitiallyRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1),containerRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),selectionRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),[[selectionWidth,selectionOffset],setSelectionWidthAndOffset]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([0,0]),[transitioning,setTransitioning]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),{width:containerWidth=0}=(0,lib_hooks_useResizeObserver__WEBPACK_IMPORTED_MODULE_0__.y)({ref:containerRef});return(0,react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(()=>{if(selectionRef.current){if(setSelectionWidthAndOffset([selectionRef.current.offsetWidth,selectionRef.current.offsetLeft]),hasRenderedInitiallyRef.current){setTransitioning(!0);let transitioningTimeout=setTimeout(()=>setTransitioning(!1),transitionMs);return()=>clearTimeout(transitioningTimeout)}hasRenderedInitiallyRef.current=!0}},[currentValue,containerWidth]),{containerRef,selectionRef,sliderWidth:selectionWidth,sliderOffset:selectionOffset,transitioning}}},"./frontend/src/lib/lemon-ui/icons/icons.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Icon123:()=>Icon123,IconAction:()=>IconAction,IconAdsClick:()=>IconAdsClick,IconAndroidOS:()=>IconAndroidOS,IconAppleIOS:()=>IconAppleIOS,IconAreaChart:()=>IconAreaChart,IconArrowDown:()=>IconArrowDown,IconArrowUp:()=>IconArrowUp,IconBold:()=>IconBold,IconBookmarkBorder:()=>IconBookmarkBorder,IconBranch:()=>IconBranch,IconCalculate:()=>IconCalculate,IconCancel:()=>IconCancel,IconChevronLeft:()=>IconChevronLeft,IconChevronRight:()=>IconChevronRight,IconChrome:()=>IconChrome,IconClipboardEdit:()=>IconClipboardEdit,IconCohort:()=>IconCohort,IconComment:()=>IconComment,IconCumulativeChart:()=>IconCumulativeChart,IconDevices:()=>IconDevices,IconDocumentExpand:()=>IconDocumentExpand,IconDragHandle:()=>IconDragHandle,IconErrorOutline:()=>IconErrorOutline,IconEvent:()=>IconEvent,IconExclamation:()=>IconExclamation,IconEyeHidden:()=>IconEyeHidden,IconFeedback:()=>IconFeedback,IconFirefox:()=>IconFirefox,IconFlare:()=>IconFlare,IconFlutter:()=>IconFlutter,IconFullScreen:()=>IconFullScreen,IconFunnelHorizontal:()=>IconFunnelHorizontal,IconFunnelVertical:()=>IconFunnelVertical,IconGithub:()=>IconGithub,IconGitlab:()=>IconGitlab,IconGolang:()=>IconGolang,IconGoogle:()=>IconGoogle,IconGridView:()=>IconGridView,IconGroupedEvents:()=>IconGroupedEvents,IconHandClick:()=>IconHandClick,IconHeatmap:()=>IconHeatmap,IconInfinity:()=>IconInfinity,IconInternetExplorer:()=>IconInternetExplorer,IconItalic:()=>IconItalic,IconJavascript:()=>IconJavascript,IconKey:()=>IconKey,IconLegend:()=>IconLegend,IconLink:()=>IconLink,IconLinux:()=>IconLinux,IconListView:()=>IconListView,IconMacOS:()=>IconMacOS,IconMarkdown:()=>IconMarkdown,IconMenu:()=>IconMenu,IconMicrosoftEdge:()=>IconMicrosoftEdge,IconMonitor:()=>IconMonitor,IconNodeJS:()=>IconNodeJS,IconOffline:()=>IconOffline,IconOpenInApp:()=>IconOpenInApp,IconOpenInNew:()=>IconOpenInNew,IconOpera:()=>IconOpera,IconPHP:()=>IconPHP,IconPhone:()=>IconPhone,IconPlayCircle:()=>IconPlayCircle,IconPremium:()=>IconPremium,IconPreview:()=>IconPreview,IconPython:()=>IconPython,IconQueryEditor:()=>IconQueryEditor,IconQuestionAnswer:()=>IconQuestionAnswer,IconRadioButtonUnchecked:()=>IconRadioButtonUnchecked,IconReact:()=>IconReact,IconRecording:()=>IconRecording,IconRefresh:()=>IconRefresh,IconReplay:()=>IconReplay,IconRobot:()=>IconRobot,IconRuby:()=>IconRuby,IconSad:()=>IconSad,IconSafari:()=>IconSafari,IconSelectAll:()=>IconSelectAll,IconSelectEvents:()=>IconSelectEvents,IconSelectProperties:()=>IconSelectProperties,IconSkipBackward:()=>IconSkipBackward,IconSlack:()=>IconSlack,IconSlackExternal:()=>IconSlackExternal,IconSort:()=>IconSort,IconSquare:()=>IconSquare,IconSubArrowRight:()=>IconSubArrowRight,IconSubdirectoryArrowRight:()=>IconSubdirectoryArrowRight,IconSubtitles:()=>IconSubtitles,IconSubtitlesOff:()=>IconSubtitlesOff,IconSurveys:()=>IconSurveys,IconSwapHoriz:()=>IconSwapHoriz,IconSync:()=>IconSync,IconTableChart:()=>IconTableChart,IconTablet:()=>IconTablet,IconTextSize:()=>IconTextSize,IconTools:()=>IconTools,IconTrendingDown:()=>IconTrendingDown,IconTrendingFlat:()=>IconTrendingFlat,IconTrendingFlatDown:()=>IconTrendingFlatDown,IconTuning:()=>IconTuning,IconUnverifiedEvent:()=>IconUnverifiedEvent,IconUploadFile:()=>IconUploadFile,IconVerifiedEvent:()=>IconVerifiedEvent,IconWeb:()=>IconWeb,IconWindows:()=>IconWindows,IconWithBadge:()=>IconWithBadge,IconWithCount:()=>IconWithCount,IconXmasTree:()=>IconXmasTree,SortableDragIcon:()=>SortableDragIcon});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),icons=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/icons/icons.scss"),icons_default=__webpack_require__.n(icons),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(icons_default(),options),icons_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),LemonBadge=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function IconWithCount(_ref){let{count,children,showZero,status="primary",className}=_ref;return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("relative inline-flex",className),children:[children,(0,jsx_runtime.jsx)(LemonBadge.M.Number,{count:count,size:"small",position:"top-right",showZero:showZero,status:status})]})}function IconWithBadge(_ref2){let{content,children,status="primary",className}=_ref2;return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("relative inline-flex",className),children:[children,(0,jsx_runtime.jsx)(LemonBadge.M,{visible:!!content,content:content,size:"small",position:"top-right",status:status})]})}let LemonIconBase=_ref3=>{let{className,...props}=_ref3;return(0,jsx_runtime.jsx)("svg",{className:(0,clsx_m.default)("LemonIcon",className),width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",focusable:"false","aria-hidden":"true",...props})};function IconTextSize(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M2 4V7H7V19H10V7H15V4H2M21 9H12V12H15V19H18V12H21V9Z"})})}function IconBranch(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M13,14C9.64,14 8.54,15.35 8.18,16.24C9.25,16.7 10,17.76 10,19A3,3 0 0,1 7,22A3,3 0 0,1 4,19C4,17.69 4.83,16.58 6,16.17V7.83C4.83,7.42 4,6.31 4,5A3,3 0 0,1 7,2A3,3 0 0,1 10,5C10,6.31 9.17,7.42 8,7.83V13.12C8.88,12.47 10.16,12 12,12C14.67,12 15.56,10.66 15.85,9.77C14.77,9.32 14,8.25 14,7A3,3 0 0,1 17,4A3,3 0 0,1 20,7C20,8.34 19.12,9.5 17.91,9.86C17.65,11.29 16.68,14 13,14M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M7,4A1,1 0 0,0 6,5A1,1 0 0,0 7,6A1,1 0 0,0 8,5A1,1 0 0,0 7,4M17,6A1,1 0 0,0 16,7A1,1 0 0,0 17,8A1,1 0 0,0 18,7A1,1 0 0,0 17,6Z"})})}function IconClipboardEdit(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M21.04 12.13C21.18 12.13 21.31 12.19 21.42 12.3L22.7 13.58C22.92 13.79 22.92 14.14 22.7 14.35L21.7 15.35L19.65 13.3L20.65 12.3C20.76 12.19 20.9 12.13 21.04 12.13M19.07 13.88L21.12 15.93L15.06 22H13V19.94L19.07 13.88M11 19L9 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3H19C20.1 3 21 3.9 21 5V9L19 11V5H17V7H7V5H5V19H11M12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4C13 3.45 12.55 3 12 3Z"})})}function IconJavascript(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 32 32",fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H32V32H0V0ZM23.8479 14.5396C22.6981 14.6309 21.7338 15.0446 21.0159 15.7564C20.2768 16.4894 19.9239 17.3837 19.9239 18.5183C19.9239 20.2157 20.6205 21.402 22.1749 22.3419C22.5703 22.5792 23.1087 22.8377 24.0395 23.2392C25.308 23.7837 25.7794 24.0423 26.0806 24.3647C26.4517 24.7632 26.5551 25.3989 26.3209 25.8856C26.2752 25.9799 26.1566 26.1381 26.0502 26.2446C25.6912 26.6065 25.1254 26.7982 24.4228 26.7982C23.2365 26.7982 22.3513 26.3115 21.6395 25.259C21.5422 25.1191 21.454 25.0035 21.4418 25.0035C21.4144 25.0035 19.0996 26.3389 19.0509 26.3845C19.0205 26.4119 19.0449 26.4757 19.1635 26.6704C20.0882 28.2278 21.5331 29.1404 23.4859 29.402C23.9969 29.4719 24.9551 29.4689 25.4448 29.402C26.6737 29.2286 27.5954 28.821 28.3102 28.1275C29.0707 27.3944 29.4448 26.4453 29.4448 25.256C29.4448 24.4955 29.3201 23.9024 29.0372 23.3153C28.8425 22.9138 28.6479 22.643 28.3133 22.3024C27.6714 21.6514 26.841 21.1586 25.1832 20.4468C23.93 19.9084 23.5102 19.6773 23.2334 19.3822C22.9688 19.0993 22.8562 18.7678 22.8806 18.3541C22.9019 18.0256 22.9931 17.8035 23.1939 17.5875C23.4829 17.2742 23.8175 17.1434 24.3346 17.1465C24.9216 17.1465 25.3019 17.2986 25.6882 17.6879C25.8251 17.8217 26.0015 18.0377 26.0836 18.1685C26.1779 18.3176 26.2479 18.3997 26.2722 18.3906C26.3513 18.3571 28.5627 16.9275 28.5627 16.9062C28.5627 16.894 28.4501 16.7176 28.3133 16.5107C28.0212 16.0727 27.495 15.5252 27.133 15.2849C26.4638 14.8408 25.749 14.6126 24.8061 14.5427C24.3437 14.5062 24.2829 14.5062 23.8479 14.5396ZM14.3695 25.4449L14.3787 20.0669L14.3908 14.692H15.8783H17.3688V20.0852C17.3688 23.6623 17.3566 25.5635 17.3384 25.7338C17.1285 27.416 16.3346 28.5475 14.981 29.095C13.8524 29.5483 12.3133 29.5848 11.1148 29.1863C9.9802 28.8091 9.03723 27.9878 8.49274 26.9019L8.40149 26.7194L9.60301 25.9893C10.2631 25.5909 10.8137 25.2593 10.8258 25.2532C10.8349 25.2502 10.914 25.3688 11.0022 25.5148C11.5467 26.4456 12.0152 26.7772 12.7969 26.7741C13.3445 26.7711 13.673 26.6646 13.9285 26.4091C14.111 26.2266 14.2144 26.0289 14.3026 25.6973L14.3695 25.4449Z",fill:"currentColor"})})}function IconNodeJS(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 256 282",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M116.504 3.58c6.962-3.985 16.03-4.003 22.986 0 34.995 19.774 70.001 39.517 104.99 59.303 6.581 3.707 10.983 11.031 10.916 18.614v118.968c.049 7.897-4.788 15.396-11.731 19.019-34.88 19.665-69.742 39.354-104.616 59.019-7.106 4.063-16.356 3.75-23.24-.646-10.457-6.062-20.932-12.094-31.39-18.15-2.137-1.274-4.546-2.288-6.055-4.36 1.334-1.798 3.719-2.022 5.657-2.807 4.365-1.388 8.374-3.616 12.384-5.778 1.014-.694 2.252-.428 3.224.193 8.942 5.127 17.805 10.403 26.777 15.481 1.914 1.105 3.852-.362 5.488-1.274 34.228-19.345 68.498-38.617 102.72-57.968 1.268-.61 1.969-1.956 1.866-3.345.024-39.245.006-78.497.012-117.742.145-1.576-.767-3.025-2.192-3.67-34.759-19.575-69.5-39.18-104.253-58.76a3.621 3.621 0 0 0-4.094-.006C91.2 39.257 56.465 58.88 21.712 78.454c-1.42.646-2.373 2.071-2.204 3.653.006 39.245 0 78.497 0 117.748a3.329 3.329 0 0 0 1.89 3.303c9.274 5.259 18.56 10.481 27.84 15.722 5.228 2.814 11.647 4.486 17.407 2.33 5.083-1.823 8.646-7.01 8.549-12.407.048-39.016-.024-78.038.036-117.048-.127-1.732 1.516-3.163 3.2-3 4.456-.03 8.918-.06 13.374.012 1.86-.042 3.14 1.823 2.91 3.568-.018 39.263.048 78.527-.03 117.79.012 10.464-4.287 21.85-13.966 26.97-11.924 6.177-26.662 4.867-38.442-1.056-10.198-5.09-19.93-11.097-29.947-16.55C5.368 215.886.555 208.357.604 200.466V81.497c-.073-7.74 4.504-15.197 11.29-18.85C46.768 42.966 81.636 23.27 116.504 3.58z"}),(0,jsx_runtime.jsx)("path",{d:"M146.928 85.99c15.21-.979 31.493-.58 45.18 6.913 10.597 5.742 16.472 17.793 16.659 29.566-.296 1.588-1.956 2.464-3.472 2.355-4.413-.006-8.827.06-13.24-.03-1.872.072-2.96-1.654-3.195-3.309-1.268-5.633-4.34-11.212-9.642-13.929-8.139-4.075-17.576-3.87-26.451-3.785-6.479.344-13.446.905-18.935 4.715-4.214 2.886-5.494 8.712-3.99 13.404 1.418 3.369 5.307 4.456 8.489 5.458 18.33 4.794 37.754 4.317 55.734 10.626 7.444 2.572 14.726 7.572 17.274 15.366 3.333 10.446 1.872 22.932-5.56 31.318-6.027 6.901-14.805 10.657-23.56 12.697-11.647 2.597-23.734 2.663-35.562 1.51-11.122-1.268-22.696-4.19-31.282-11.768-7.342-6.375-10.928-16.308-10.572-25.895.085-1.619 1.697-2.748 3.248-2.615 4.444-.036 8.888-.048 13.332.006 1.775-.127 3.091 1.407 3.182 3.08.82 5.367 2.837 11 7.517 14.182 9.032 5.827 20.365 5.428 30.707 5.591 8.568-.38 18.186-.495 25.178-6.158 3.689-3.23 4.782-8.634 3.785-13.283-1.08-3.925-5.186-5.754-8.712-6.95-18.095-5.724-37.736-3.647-55.656-10.12-7.275-2.571-14.31-7.432-17.105-14.906-3.9-10.578-2.113-23.662 6.098-31.765 8.006-8.06 19.563-11.164 30.551-12.275z"})]})}function IconPHP(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 -1 100 50",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"m7.579 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"}),(0,jsx_runtime.jsx)("path",{d:"m41.093 0 7.314 0-2.067 10.123 6.572 0c3.604 0.071 6.289 0.813 8.056 2.226 1.802 1.413 2.332 4.099 1.59 8.056l-3.551 17.649-7.42 0 3.392-16.854c0.353-1.767 0.247-3.021-0.318-3.763-0.565-0.742-1.784-1.113-3.657-1.113l-5.883-0.053-4.346 21.783-7.314 0 7.632-38.054 0 0"}),(0,jsx_runtime.jsx)("path",{d:"m70.412 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"})]})}function IconRuby(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 728.000000 728.000000",...props,children:(0,jsx_runtime.jsxs)("g",{transform:"translate(0.000000,728.000000) scale(0.100000,-0.100000)",fill:"currentColor",stroke:"none",children:[(0,jsx_runtime.jsx)("path",{d:"M4090 6986 c0 -3 57 -44 128 -93 70 -48 147 -102 172 -120 25 -17 122 -84 215 -149 94 -65 187 -130 207 -146 l36 -28 114 63 c62 35 169 95 238 134 69 38 161 89 205 113 91 49 398 221 404 226 2 2 -383 4 -857 4 -474 0 -862 -2 -862 -4z"}),(0,jsx_runtime.jsx)("path",{d:"M3610 6843 c-52 -20 -205 -76 -340 -126 -297 -108 -472 -173 -605 -222 -65 -24 -114 -50 -140 -73 -42 -37 -523 -484 -655 -608 -41 -39 -149 -139 -240 -224 -437 -406 -431 -400 -492 -506 -64 -112 -129 -225 -210 -364 -215 -367 -452 -779 -461 -797 -8 -18 -1 -43 36 -130 41 -97 100 -239 367 -873 45 -107 85 -198 88 -202 4 -4 66 7 137 23 72 16 200 45 285 64 85 19 306 68 490 110 184 42 378 85 430 96 52 11 106 28 120 37 25 16 49 37 305 277 72 66 162 150 200 185 39 36 75 69 81 75 6 5 64 60 130 121 65 61 196 182 290 270 94 87 308 287 476 443 265 246 307 289 318 325 6 22 34 113 62 201 113 358 170 541 236 750 177 559 166 518 146 533 -11 7 -84 59 -164 114 -80 56 -285 200 -457 320 -171 120 -318 218 -325 217 -7 -1 -56 -17 -108 -36z"}),(0,jsx_runtime.jsx)("path",{d:"M6110 6821 c-246 -138 -434 -243 -702 -391 -277 -154 -296 -166 -280 -182 9 -9 85 -64 167 -124 83 -59 177 -127 210 -151 33 -24 107 -78 165 -120 58 -42 137 -100 175 -128 71 -53 240 -176 376 -273 41 -30 207 -150 369 -268 267 -194 310 -223 310 -210 0 2 11 61 25 131 24 125 48 289 60 415 10 95 -12 349 -39 471 -86 380 -305 659 -653 833 -50 26 -92 46 -94 45 -2 0 -42 -22 -89 -48z"}),(0,jsx_runtime.jsx)("path",{d:"M4927 6023 c-2 -5 -21 -62 -41 -128 -21 -66 -69 -219 -107 -340 -83 -259 -111 -348 -174 -550 -25 -82 -53 -169 -60 -192 l-14 -43 142 0 c78 0 311 4 517 10 206 5 523 12 704 16 181 4 415 9 520 13 l191 6 -420 304 c-231 168 -451 328 -490 356 -38 28 -98 71 -131 95 -34 25 -111 81 -170 124 -60 44 -150 109 -199 145 -50 36 -104 76 -120 88 -102 75 -144 102 -148 96z"}),(0,jsx_runtime.jsx)("path",{d:"M6715 4523 c-22 -1 -283 -7 -580 -13 -297 -6 -722 -15 -945 -20 -223 -5 -460 -10 -527 -11 -80 -1 -123 -5 -123 -12 0 -6 65 -209 144 -451 80 -243 215 -657 301 -921 250 -766 280 -855 286 -855 6 0 201 215 320 355 371 434 683 889 905 1320 131 254 273 580 262 603 -2 4 -21 6 -43 5z"}),(0,jsx_runtime.jsx)("path",{d:"M4230 4327 c-122 -114 -564 -526 -600 -557 -48 -42 -860 -802 -860 -805 0 -2 37 -18 83 -35 45 -17 120 -47 167 -65 47 -19 162 -63 255 -99 94 -36 274 -105 400 -154 127 -49 298 -115 380 -147 83 -31 202 -77 265 -102 63 -24 167 -64 230 -89 63 -24 189 -73 280 -108 91 -35 167 -62 168 -61 4 4 -10 49 -249 780 -83 253 -223 681 -310 950 -88 270 -163 498 -167 508 -6 15 -11 14 -42 -16z"}),(0,jsx_runtime.jsx)("path",{d:"M6806 3883 c-300 -606 -755 -1239 -1329 -1852 -43 -46 -77 -86 -75 -90 2 -4 48 -47 103 -97 55 -49 116 -103 135 -120 19 -17 241 -215 493 -439 252 -223 466 -420 476 -436 l18 -30 12 158 c7 87 16 201 21 253 5 52 12 142 15 200 3 58 8 121 10 140 3 19 9 100 15 180 5 80 14 204 20 275 5 72 21 276 35 455 14 179 45 590 70 914 25 324 44 593 43 598 -2 5 -29 -44 -62 -109z"}),(0,jsx_runtime.jsx)("path",{d:"M290 2692 c0 -469 2 -852 4 -852 2 0 34 53 72 118 37 64 82 142 100 172 18 30 70 120 117 200 46 80 94 161 106 181 l22 37 -107 253 c-58 140 -151 362 -206 494 -55 132 -102 242 -104 244 -2 2 -4 -379 -4 -847z"}),(0,jsx_runtime.jsx)("path",{d:"M2145 2680 c-194 -44 -894 -201 -965 -216 -36 -8 -77 -17 -91 -22 l-26 -7 159 -455 c277 -797 346 -992 393 -1125 25 -71 62 -177 81 -235 19 -58 38 -108 43 -113 4 -4 51 167 104 380 54 214 178 709 277 1101 99 392 180 715 180 718 0 7 -34 2 -155 -26z"}),(0,jsx_runtime.jsx)("path",{d:"M2594 2683 c-3 -16 -44 -179 -91 -363 -394 -1563 -493 -1959 -493 -1968 0 -17 340 52 556 113 398 114 786 286 1179 522 154 93 243 152 418 279 174 125 296 222 496 393 200 172 220 191 191 191 -6 0 -83 29 -173 64 -89 35 -310 121 -492 191 -181 69 -399 153 -483 186 -84 33 -192 75 -240 93 -155 59 -766 294 -804 310 -50 22 -57 20 -64 -11z"}),(0,jsx_runtime.jsx)("path",{d:"M817 2158 c-8 -13 -32 -54 -54 -93 -100 -173 -159 -276 -287 -494 l-137 -234 21 -81 c50 -184 115 -322 220 -461 163 -216 376 -349 678 -425 120 -30 232 -48 232 -37 0 4 -7 24 -15 44 -8 21 -64 180 -124 353 -60 173 -133 380 -161 460 -28 80 -75 215 -104 300 -30 85 -61 175 -70 200 -22 59 -111 314 -144 413 -14 42 -30 77 -34 77 -4 0 -14 -10 -21 -22z"}),(0,jsx_runtime.jsx)("path",{d:"M5125 1684 c-435 -398 -775 -661 -1195 -926 -153 -97 -392 -224 -574 -308 -38 -17 -67 -33 -65 -35 3 -2 54 0 114 5 61 5 187 14 280 20 94 6 229 15 300 20 72 5 171 12 220 15 50 3 115 8 145 10 30 3 224 16 430 30 206 14 445 30 530 35 85 6 216 15 290 20 74 5 272 19 440 30 404 27 455 32 413 41 -40 8 -27 -2 -254 199 -102 91 -239 212 -304 270 -66 58 -203 179 -305 270 -102 91 -201 179 -220 196 -19 17 -66 59 -104 93 -37 33 -73 61 -80 61 -6 -1 -33 -21 -61 -46z"})]})})}function IconGolang(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 254.5 225",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M40.2,101.1c-0.4,0-0.5-0.2-0.3-0.5l2.1-2.7c0.2-0.3,0.7-0.5,1.1-0.5l35.7,0c0.4,0,0.5,0.3,0.3,0.6l-1.7,2.6 c-0.2,0.3-0.7,0.6-1,0.6L40.2,101.1z"}),(0,jsx_runtime.jsx)("path",{d:"M25.1,110.3c-0.4,0-0.5-0.2-0.3-0.5l2.1-2.7c0.2-0.3,0.7-0.5,1.1-0.5l45.6,0c0.4,0,0.6,0.3,0.5,0.6l-0.8,2.4 c-0.1,0.4-0.5,0.6-0.9,0.6L25.1,110.3z"}),(0,jsx_runtime.jsx)("path",{d:"M49.3,119.5c-0.4,0-0.5-0.3-0.3-0.6l1.4-2.5c0.2-0.3,0.6-0.6,1-0.6l20,0c0.4,0,0.6,0.3,0.6,0.7l-0.2,2.4 c0,0.4-0.4,0.7-0.7,0.7L49.3,119.5z"}),(0,jsx_runtime.jsx)("path",{d:"M153.1,99.3c-6.3,1.6-10.6,2.8-16.8,4.4c-1.5,0.4-1.6,0.5-2.9-1c-1.5-1.7-2.6-2.8-4.7-3.8c-6.3-3.1-12.4-2.2-18.1,1.5 c-6.8,4.4-10.3,10.9-10.2,19c0.1,8,5.6,14.6,13.5,15.7c6.8,0.9,12.5-1.5,17-6.6c0.9-1.1,1.7-2.3,2.7-3.7c-3.6,0-8.1,0-19.3,0 c-2.1,0-2.6-1.3-1.9-3c1.3-3.1,3.7-8.3,5.1-10.9c0.3-0.6,1-1.6,2.5-1.6c5.1,0,23.9,0,36.4,0c-0.2,2.7-0.2,5.4-0.6,8.1 c-1.1,7.2-3.8,13.8-8.2,19.6c-7.2,9.5-16.6,15.4-28.5,17c-9.8,1.3-18.9-0.6-26.9-6.6c-7.4-5.6-11.6-13-12.7-22.2 c-1.3-10.9,1.9-20.7,8.5-29.3c7.1-9.3,16.5-15.2,28-17.3c9.4-1.7,18.4-0.6,26.5,4.9c5.3,3.5,9.1,8.3,11.6,14.1 C154.7,98.5,154.3,99,153.1,99.3z"}),(0,jsx_runtime.jsx)("path",{d:"M186.2,154.6c-9.1-0.2-17.4-2.8-24.4-8.8c-5.9-5.1-9.6-11.6-10.8-19.3c-1.8-11.3,1.3-21.3,8.1-30.2 c7.3-9.6,16.1-14.6,28-16.7c10.2-1.8,19.8-0.8,28.5,5.1c7.9,5.4,12.8,12.7,14.1,22.3c1.7,13.5-2.2,24.5-11.5,33.9 c-6.6,6.7-14.7,10.9-24,12.8C191.5,154.2,188.8,154.3,186.2,154.6z M210,114.2c-0.1-1.3-0.1-2.3-0.3-3.3 c-1.8-9.9-10.9-15.5-20.4-13.3c-9.3,2.1-15.3,8-17.5,17.4c-1.8,7.8,2,15.7,9.2,18.9c5.5,2.4,11,2.1,16.3-0.6 C205.2,129.2,209.5,122.8,210,114.2z"})]})}function IconPython(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 32 32",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M15.8846 0C7.76106 5.79599e-07 8.26835 3.52288 8.26835 3.52288L8.2774 7.17254H16.0295V8.26835H5.19828C5.19828 8.26835 0 7.67882 0 15.8756C-5.79599e-07 24.0724 4.53718 23.7817 4.53718 23.7817H7.24499V19.9781C7.24499 19.9781 7.09903 15.4409 11.7097 15.4409C16.3204 15.4409 19.3985 15.4409 19.3985 15.4409C19.3985 15.4409 23.7183 15.5107 23.7183 11.266C23.7183 7.02121 23.7183 4.24738 23.7183 4.24738C23.7183 4.24738 24.3742 0 15.8846 0ZM11.6101 2.45424C12.3814 2.45424 13.0048 3.07762 13.0048 3.8489C13.0048 4.62018 12.3814 5.24356 11.6101 5.24356C10.8388 5.24356 10.2154 4.62018 10.2154 3.8489C10.2154 3.07762 10.8388 2.45424 11.6101 2.45424Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M16.1154 31.8333C24.2389 31.8333 23.7317 28.3104 23.7317 28.3104L23.7226 24.6607H15.9705V23.5649H26.8017C26.8017 23.5649 32 24.1544 32 15.9577C32 7.76089 27.4628 8.05157 27.4628 8.05157H24.755V11.8552C24.755 11.8552 24.901 16.3924 20.2903 16.3924C15.6796 16.3924 12.6015 16.3924 12.6015 16.3924C12.6015 16.3924 8.28171 16.3225 8.28171 20.5673C8.28171 24.812 8.28171 27.5859 8.28171 27.5859C8.28171 27.5859 7.62584 31.8333 16.1154 31.8333ZM20.3899 29.379C19.6186 29.379 18.9952 28.7556 18.9952 27.9844C18.9952 27.2131 19.6186 26.5897 20.3899 26.5897C21.1612 26.5897 21.7846 27.2131 21.7846 27.9844C21.7846 28.7556 21.1612 29.379 20.3899 29.379Z",fill:"currentColor"})]})}function IconHandClick(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 18 18",...props,children:(0,jsx_runtime.jsx)("path",{d:"M14.9942 7.90164C14.9942 7.82992 14.9583 7.46993 14.6342 7.10993C14.2925 6.71407 13.7524 6.49822 13.05 6.44407C12.9783 6.33579 12.8883 6.22822 12.7442 6.11993C12.3483 5.81407 11.7359 5.65164 10.9442 5.63407C10.8724 5.54407 10.7459 5.43578 10.6024 5.32822C10.2425 5.0765 9.79245 4.93236 9.23416 4.87822V3.41993C9.23416 3.27579 9.25244 2.66407 8.83831 2.23164C8.65831 2.03335 8.31659 1.79993 7.74002 1.79993C7.14587 1.79993 6.80416 2.03407 6.60587 2.23164C6.22759 2.64578 6.22759 3.18578 6.22759 3.31164V8.46C5.88587 8.1 5.50759 7.70414 5.29173 7.56C4.84173 7.21829 3.99587 7.39828 3.51002 7.75829C3.04173 8.1 2.88002 8.62243 3.06002 9.12658C3.38416 10.0266 4.19416 10.9266 4.39173 11.1424C4.57173 11.4841 5.38173 12.9782 6.10173 13.5182C6.48002 13.8065 6.76759 14.9941 6.84002 15.7499L6.87588 16.1457H13.6801V14.364C13.7701 14.1123 13.9859 13.5723 14.2201 13.3199C14.7783 12.7616 14.9583 11.3582 14.9583 10.9257V7.91986L14.9942 7.90164ZM14.1117 10.89C14.1117 11.4117 13.8959 12.4017 13.6259 12.6717C13.1576 13.14 12.87 14.04 12.8517 14.13L12.8335 14.1841V15.2283H7.68583C7.64997 15.03 7.61411 14.7783 7.54169 14.5083C7.32583 13.6441 7.03754 13.0866 6.65998 12.7983C6.13826 12.4024 5.39998 11.1241 5.16583 10.6566L5.09411 10.5484C5.09411 10.5301 4.2124 9.63008 3.90582 8.80251C3.86996 8.69423 3.86996 8.60422 3.99582 8.47836C4.22997 8.26251 4.67997 8.20836 4.78754 8.24422C5.05754 8.46008 5.88582 9.34251 6.35339 9.86422L7.12754 10.7284L7.12824 3.29418V3.25762C7.12824 3.1859 7.14652 2.95176 7.27238 2.82591C7.36238 2.71763 7.52409 2.66419 7.75824 2.66419C7.95652 2.66419 8.09995 2.71833 8.20824 2.80833C8.35238 2.97005 8.36996 3.25833 8.36996 3.36662V8.02826H9.25167V5.7599C10.0617 5.8499 10.2958 6.19161 10.3317 6.24575L10.3675 6.33575V8.02747H11.2492V6.53332C12.0051 6.60504 12.2934 6.83918 12.3651 6.94747V8.65747H13.2468V7.34332C14.021 7.4516 14.1468 7.86504 14.1651 7.95504L14.1658 10.8899L14.1117 10.89Z",fill:"currentColor"})})}function SortableDragIcon(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 16 16",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M2 6C2 6.13132 2.02587 6.26136 2.07612 6.38268C2.12638 6.50401 2.20003 6.61425 2.29289 6.70711C2.38575 6.79997 2.49599 6.87362 2.61732 6.92388C2.73864 6.97413 2.86868 7 3 7C3.13132 7 3.26136 6.97413 3.38268 6.92388C3.50401 6.87362 3.61425 6.79997 3.70711 6.70711C3.79997 6.61425 3.87362 6.50401 3.92388 6.38268C3.97413 6.26136 4 6.13132 4 6C4 5.86868 3.97413 5.73864 3.92388 5.61732C3.87362 5.49599 3.79997 5.38575 3.70711 5.29289C3.61425 5.20003 3.50401 5.12638 3.38268 5.07612C3.26136 5.02587 3.13132 5 3 5C2.86868 5 2.73864 5.02587 2.61732 5.07612C2.49599 5.12638 2.38575 5.20003 2.29289 5.29289C2.20003 5.38575 2.12638 5.49599 2.07612 5.61732C2.02587 5.73864 2 5.86868 2 6ZM7 6C7 6.26522 7.10536 6.51957 7.29289 6.70711C7.48043 6.89464 7.73478 7 8 7C8.26522 7 8.51957 6.89464 8.70711 6.70711C8.89464 6.51957 9 6.26522 9 6C9 5.73478 8.89464 5.48043 8.70711 5.29289C8.51957 5.10536 8.26522 5 8 5C7.73478 5 7.48043 5.10536 7.29289 5.29289C7.10536 5.48043 7 5.73478 7 6ZM12 6C12 6.26522 12.1054 6.51957 12.2929 6.70711C12.4804 6.89464 12.7348 7 13 7C13.2652 7 13.5196 6.89464 13.7071 6.70711C13.8946 6.51957 14 6.26522 14 6C14 5.73478 13.8946 5.48043 13.7071 5.29289C13.5196 5.10536 13.2652 5 13 5C12.7348 5 12.4804 5.10536 12.2929 5.29289C12.1054 5.48043 12 5.73478 12 6Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M2 10C2 10.1313 2.02587 10.2614 2.07612 10.3827C2.12638 10.504 2.20003 10.6142 2.29289 10.7071C2.38575 10.8 2.49599 10.8736 2.61732 10.9239C2.73864 10.9741 2.86868 11 3 11C3.13132 11 3.26136 10.9741 3.38268 10.9239C3.50401 10.8736 3.61425 10.8 3.70711 10.7071C3.79997 10.6142 3.87362 10.504 3.92388 10.3827C3.97413 10.2614 4 10.1313 4 10C4 9.86868 3.97413 9.73864 3.92388 9.61732C3.87362 9.49599 3.79997 9.38575 3.70711 9.29289C3.61425 9.20003 3.50401 9.12638 3.38268 9.07612C3.26136 9.02587 3.13132 9 3 9C2.86868 9 2.73864 9.02587 2.61732 9.07612C2.49599 9.12638 2.38575 9.20003 2.29289 9.29289C2.20003 9.38575 2.12638 9.49599 2.07612 9.61732C2.02587 9.73864 2 9.86868 2 10ZM7 10C7 10.2652 7.10536 10.5196 7.29289 10.7071C7.48043 10.8946 7.73478 11 8 11C8.26522 11 8.51957 10.8946 8.70711 10.7071C8.89464 10.5196 9 10.2652 9 10C9 9.73478 8.89464 9.48043 8.70711 9.29289C8.51957 9.10536 8.26522 9 8 9C7.73478 9 7.48043 9.10536 7.29289 9.29289C7.10536 9.48043 7 9.73478 7 10ZM12 10C12 10.2652 12.1054 10.5196 12.2929 10.7071C12.4804 10.8946 12.7348 11 13 11C13.2652 11 13.5196 10.8946 13.7071 10.7071C13.8946 10.5196 14 10.2652 14 10C14 9.73478 13.8946 9.48043 13.7071 9.29289C13.5196 9.10536 13.2652 9 13 9C12.7348 9 12.4804 9.10536 12.2929 9.29289C12.1054 9.48043 12 9.73478 12 10Z",fill:"currentColor"})]})}function IconInfinity(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 14 6",fill:"none",...props,children:(0,jsx_runtime.jsx)("path",{d:"M10.6817 0C9.87877 0 9.12041 0.312268 8.57952 0.85316L4.65944 4.33271C4.30256 4.68959 3.82859 4.88476 3.32115 4.88476C2.2784 4.88476 1.43082 4.04275 1.43082 3C1.43082 1.95725 2.2784 1.11524 3.32115 1.11524C3.82859 1.11524 4.30256 1.31041 4.68175 1.68959L5.31186 2.24721L6.15386 1.5L5.45126 0.881041C4.88249 0.312268 4.12412 0 3.32115 0C1.65944 0 0.309998 1.34944 0.309998 3C0.309998 4.65056 1.65944 6 3.32115 6C4.12412 6 4.88249 5.68773 5.42338 5.14684L9.34346 1.66729C9.70033 1.31041 10.1743 1.11524 10.6817 1.11524C11.7245 1.11524 12.5721 1.95725 12.5721 3C12.5721 4.04275 11.7245 4.88476 10.6817 4.88476C10.1799 4.88476 9.70033 4.68959 9.32115 4.31041L8.68546 3.74721L7.84346 4.49442L8.55163 5.11896C9.12041 5.68216 9.8732 5.99442 10.6817 5.99442C12.3435 5.99442 13.6929 4.65056 13.6929 2.99442C13.6929 1.33829 12.3435 0 10.6817 0Z",fill:"currentColor"})})}function IconFeedback(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 32 32",...props,children:(0,jsx_runtime.jsx)("path",{d:"M26.6667 2.66663H5.33341C3.86675 2.66663 2.68008 3.86663 2.68008 5.33329L2.66675 29.3333L8.00008 24H26.6667C28.1334 24 29.3334 22.8 29.3334 21.3333V5.33329C29.3334 3.86663 28.1334 2.66663 26.6667 2.66663ZM26.6667 21.3333H6.89341L6.10675 22.12L5.33341 22.8933V5.33329H26.6667V21.3333ZM14.6667 16H17.3334V18.6666H14.6667V16ZM14.6667 7.99996H17.3334V13.3333H14.6667V7.99996Z",fill:"currentColor"})})}function IconSelectEvents(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M16.23 14.26L20 13L10 10L13 20L14.26 16.23L18.53 20.5L20.51 18.52L16.23 14.26Z",fill:"currentColor"})]})}function IconSelectAll(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z",fill:"currentColor"})})}function IconSurveys(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z",fill:"currentColor"})})}function IconKey(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M21,10h-8.35C11.83,7.67,9.61,6,7,6c-3.31,0-6,2.69-6,6s2.69,6,6,6c2.61,0,4.83-1.67,5.65-4H13l2,2l2-2l2,2l4-4.04L21,10z M7,15c-1.65,0-3-1.35-3-3c0-1.65,1.35-3,3-3s3,1.35,3,3C10,13.65,8.65,15,7,15z",fill:"currentColor"})})}function IconOpenInApp(props){return(0,jsx_runtime.jsx)(LemonIconBase,{"aria-hidden":"true",role:"img",preserveAspectRatio:"xMidYMid meet",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"m12 10l-4 4h3v6h2v-6h3m3-10H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H5V8h14v10h-4v2h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Z"})})}function IconSelectProperties(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.73368 17.7247H2.26243C2.10826 17.7247 1.98761 17.5981 2.00102 17.4449C2.0458 16.5963 2.29659 15.7711 2.73195 15.0397C3.16732 14.3084 3.77433 13.6926 4.50115 13.245C3.89455 12.5788 3.5259 11.6995 3.5259 10.7303C3.5259 8.66865 5.19823 7 7.25933 7C9.32043 7 10.9928 8.66865 10.9928 10.7303C10.995 11.6602 10.6471 12.5572 10.0175 13.245C11.4452 14.1243 12.4238 15.6697 12.5176 17.4449C12.5195 17.481 12.5139 17.5171 12.5012 17.551C12.4886 17.5849 12.4691 17.6158 12.444 17.642C12.4189 17.6682 12.3888 17.689 12.3553 17.7032C12.3219 17.7174 12.2859 17.7247 12.2495 17.7247H10.7783C10.6375 17.7247 10.5236 17.6148 10.5135 17.4749C10.3862 15.7929 8.97189 14.4607 7.25598 14.4607C5.54007 14.4607 4.12579 15.7929 3.99844 17.4749C3.98839 17.6148 3.87444 17.7247 3.73368 17.7247ZM8.9884 10.73C8.9884 9.77414 8.21088 8.9981 7.25574 8.9981C6.3006 8.9981 5.52308 9.77414 5.52308 10.73C5.52308 11.6859 6.3006 12.462 7.25574 12.462C8.21088 12.462 8.9884 11.6859 8.9884 10.73ZM14.8829 9.9675H21.7379C21.8819 9.9675 22 10.0436 22 10.1365V11.1508C22 11.2437 21.8819 11.3198 21.7379 11.3198H14.8829C14.7389 11.3198 14.6208 11.2437 14.6208 11.1508V10.1365C14.6208 10.0436 14.7389 9.9675 14.8829 9.9675ZM14.7057 13.0102H19.261C19.309 13.0102 19.3459 13.0863 19.3459 13.1792V14.1935C19.3459 14.2864 19.309 14.3625 19.261 14.3625H14.7057C14.6577 14.3625 14.6208 14.2864 14.6208 14.1935V13.1792C14.6208 13.0863 14.6577 13.0102 14.7057 13.0102Z",fill:"currentColor"})})}function IconSwapHoriz(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m6.99 11-3.99 4 3.99 4v-3h7.01v-2h-7.01zm14.01-2-3.99-4v3h-7.01v2h7.01v3z",fill:"currentColor"})})}function IconChevronLeft(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M13.9999 6L15.4099 7.41L10.8299 12L15.4099 16.59L13.9999 18L7.99991 12L13.9999 6Z",fill:"currentColor"})})}function IconChevronRight(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M10.0001 6L8.59009 7.41L13.1701 12L8.59009 16.59L10.0001 18L16.0001 12L10.0001 6Z",fill:"currentColor"})})}function IconRadioButtonUnchecked(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,jsx_runtime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})]})}function IconOffline(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12 2.02c-5.51 0-9.98 4.47-9.98 9.98s4.47 9.98 9.98 9.98 9.98-4.47 9.98-9.98-4.47-9.98-9.98-9.98zm0 17.96c-4.4 0-7.98-3.58-7.98-7.98s3.58-7.98 7.98-7.98 7.98 3.58 7.98 7.98-3.58 7.98-7.98 7.98zm.75-14.98-4.5 8.5h3.14v5.5l4.36-8.5h-3z",fill:"currentColor"})})}function IconMenu(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m3 18h18v-2h-18zm0-5h18v-2h-18zm0-7v2h18v-2z",fill:"currentColor"})})}function IconSync(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12.5 4v-3l-4 4 4 4v-3c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46c.78-1.23 1.24-2.69 1.24-4.26 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8l-1.46-1.46c-.78 1.23-1.24 2.69-1.24 4.26 0 4.42 3.58 8 8 8v3l4-4-4-4z",fill:"currentColor"})})}function IconSubtitles(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 4h-16c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-16v-12h16zm-14-8h2v2h-2zm0 4h8v2h-8zm10 0h2v2h-2zm-6-4h8v2h-8z",fill:"currentColor"})})}function IconSubtitlesOff(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m20.0001 4h-13.17002l2 2h11.17002v11.17l1.76 1.76c.15-.28.24-.59.24-.93v-12c0-1.1-.9-2-2-2z"}),(0,jsx_runtime.jsx)("path",{d:"m18.0001 10h-5.17l2 2h3.17z"}),(0,jsx_runtime.jsx)("path",{d:"m1.04004 3.86922 1.2 1.2c-.15.28-.24.59-.24.93v11.99998c0 1.1.9 2 2 2h13.16996l2.96 2.96 1.41-1.41-19.08996-19.09998zm2.96 2.96 3.17 3.17h-1.17v1.99998h2v-1.17l3.16996 3.17h-5.16996v2h7.16996l2 2h-11.16996z"})]})})}function IconCalculate(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m19 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z"}),(0,jsx_runtime.jsx)("path",{d:"m11.25 7.7207h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m18 15.75h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m18 13.25h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m8 18h1.5v-2h2v-1.5h-2v-2h-1.5v2h-2v1.5h2z"}),(0,jsx_runtime.jsx)("path",{d:"m14.09 10.95 1.41-1.41 1.41 1.41 1.06-1.06-1.41-1.42 1.41-1.41-1.06-1.06-1.41 1.41-1.41-1.41-1.06 1.06 1.41 1.41-1.41 1.42z"})]})})}function IconSubdirectoryArrowRight(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"m19 15-6 6-1.42-1.42 3.59-3.58h-11.17v-12h2v10h9.17l-3.59-3.58 1.42-1.42z",fill:"currentColor"})," "]})}function IconSubArrowRight(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z",fill:"currentColor"})," "]})}function IconGroupedEvents(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{clipRule:"evenodd",d:"m2 6h2v14h14v2h-14c-1.1 0-2-.9-2-2zm6-4h12c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2h-12c-1.1 0-2-.9-2-2v-12c0-1.1.9-2 2-2zm0 14h12v-12h-12zm4.6851-3.6586-.5398 1.6584h-1.6477l2.5106-7.27275h1.9815l2.5071 7.27275h-1.6477l-.5398-1.6584zm1.2855-3.95242-.8949 2.75212h1.8466l-.8949-2.75212z",fill:"currentColor",fillRule:"evenodd"})})}function IconCumulativeChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20.8805 7.97408C15.0614 18.7809 6.51281 19.5979 2.71265 18.4578L3.28734 16.5422C6.15384 17.4021 13.7386 17.0191 19.1195 7.02588L20.8805 7.97408Z",fill:"currentColor"})})}function IconAreaChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z",fill:"currentColor"})})}function IconTableChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z",fill:"currentColor"})})}function Icon123(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M7,15H5.5v-4.5H4V9h3V15z M13.5,13.5h-3v-1h2c0.55,0,1-0.45,1-1V10c0-0.55-0.45-1-1-1H9v1.5h3v1h-2c-0.55,0-1,0.45-1,1V15 h4.5V13.5z M19.5,14v-4c0-0.55-0.45-1-1-1H15v1.5h3v1h-2v1h2v1h-3V15h3.5C19.05,15,19.5,14.55,19.5,14z",fill:"currentColor"})})}function IconCohort(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58-.74.32-1.22 1.04-1.22 1.85v1.57h4.5v-1.61c0-.83.23-1.61.63-2.29zm14.87-1.1c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29v1.61h4.5zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9s-3.07.39-4.24.9c-1.08.48-1.76 1.56-1.76 2.74v1.61h12v-1.61c0-1.18-.68-2.26-1.76-2.74zm-8.17 2.35c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zm3.93-8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"currentColor"})})}function IconTools(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m21.67 18.17-5.3-5.3h-.99l-2.54 2.54v.99l5.3 5.3c.39.39 1.02.39 1.41 0l2.12-2.12c.39-.38.39-1.02 0-1.41zm-2.83 1.42-4.24-4.24.71-.71 4.24 4.24z"}),(0,jsx_runtime.jsx)("path",{d:"m17.34 10.19 1.41-1.41 2.12 2.12c1.17-1.17 1.17-3.07 0-4.24l-3.54-3.54-1.41 1.41v-2.82l-.7-.71-3.54 3.54.71.71h2.83l-1.41 1.41 1.06 1.06-2.89 2.89-4.13-4.13v-1.42l-3.02-3.02-2.83 2.83 3.03 3.03h1.41l4.13 4.13-.85.85h-2.12l-5.3 5.3c-.39.39-.39 1.02 0 1.41l2.12 2.12c.39.39 1.02.39 1.41 0l5.3-5.3v-2.12l5.15-5.15zm-7.98 5.15-4.24 4.24-.71-.71 4.24-4.24z"})]})})}function IconExclamation(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z"}),(0,jsx_runtime.jsx)("path",{d:"m10 3h4v12h-4z"})]})})}function IconErrorOutline(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m11 15h2v2h-2zm0-8h2v6h-2zm.99-5c-5.52 0-9.99 4.48-9.99 10s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10s-4.48-10-10.01-10zm.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",fill:"currentColor"})})}function IconComment(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 4v13.17l-1.17-1.17h-14.83v-12zm0-2h-16c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4v-18c0-1.1-.9-2-2-2zm-2 10h-12v2h12zm0-3h-12v2h12zm0-3h-12v2h12z",fill:"currentColor"})})}function IconRecording(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m10 8v8l5-4zm9-5h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z",fill:"currentColor"})})}function IconQuestionAnswer(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m15 4v7h-9.83l-1.17 1.17v-8.17zm1-2h-13c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1zm5 4h-2v9h-13v2c0 .55.45 1 1 1h11l4 4v-15c0-.55-.45-1-1-1z",fill:"currentColor"})})}function IconGithub(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{clipRule:"evenodd",d:"m12 2c-5.525 0-10 4.475-10 10 0 4.425 2.8625 8.1625 6.8375 9.4875.5.0875.6875-.2125.6875-.475 0-.2375-.0125-1.025-.0125-1.8625-2.5125.4625-3.1625-.6125-3.3625-1.175-.1125-.2875-.6-1.175-1.025-1.4125-.35-.1875-.85-.65-.0125-.6625.7875-.0125 1.35.725 1.5375 1.025.9 1.5125 2.3375 1.0875 2.9125.825.0875-.65.35-1.0875.6375-1.3375-2.225-.25-4.55-1.1125-4.55-4.9375 0-1.0875.3875-1.9875 1.025-2.6875-.1-.25-.45-1.275.1-2.65 0 0 .8375-.2625 2.75 1.025.8-.225 1.65-.3375 2.5-.3375s1.7.1125 2.5.3375c1.9125-1.3 2.75-1.025 2.75-1.025.55 1.375.2 2.4.1 2.65.6375.7 1.025 1.5875 1.025 2.6875 0 3.8375-2.3375 4.6875-4.5625 4.9375.3625.3125.675.9125.675 1.85 0 1.3375-.0125 2.4125-.0125 2.75 0 .2625.1875.575.6875.475 1.9852-.6702 3.7102-1.946 4.9323-3.648 1.2221-1.7019 1.8797-3.7442 1.8802-5.8395 0-5.525-4.475-10-10-10z",fill:"currentColor",fillRule:"evenodd"})})}function IconGitlab(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M23.4841 9.51355L23.4507 9.42452L20.2169 0.621934C20.1511 0.449408 20.0346 0.303054 19.8841 0.20387C19.7336 0.106371 19.5579 0.0594128 19.3809 0.0693348C19.204 0.0792569 19.0342 0.145582 18.8945 0.259354C18.7563 0.376393 18.6561 0.534985 18.6074 0.713547L16.4239 7.68129H7.58229L5.39878 0.713547C5.35143 0.534012 5.251 0.374625 5.11178 0.258063C4.97208 0.144291 4.80228 0.0779663 4.62529 0.0680442C4.44831 0.0581222 4.27267 0.105081 4.12208 0.20258C3.97193 0.302164 3.85553 0.44839 3.7893 0.620644L0.5493 9.41935L0.517135 9.50839C0.0516127 10.777 -0.00584844 12.1692 0.353415 13.4748C0.712679 14.7805 1.46919 15.929 2.50889 16.7471L2.52002 16.7561L2.54971 16.7781L7.4759 20.6258L9.91301 22.5497L11.3975 23.7187C11.5712 23.8562 11.7832 23.9307 12.0013 23.9307C12.2193 23.9307 12.4313 23.8562 12.605 23.7187L14.0895 22.5497L16.5266 20.6258L21.4825 16.7548L21.4949 16.7445C22.5322 15.9263 23.287 14.779 23.6457 13.4751C24.0044 12.1711 23.9477 10.781 23.4841 9.51355V9.51355Z",fill:"#E24329"}),(0,jsx_runtime.jsx)("path",{d:"M23.4841 9.51355L23.4507 9.42451C21.875 9.76186 20.3902 10.458 19.1023 11.4632L12 17.0645C14.4186 18.9729 16.5241 20.631 16.5241 20.631L21.48 16.76L21.4924 16.7497C22.5312 15.9315 23.2871 14.7834 23.6464 13.4784C24.0056 12.1734 23.9486 10.7819 23.4841 9.51355Z",fill:"#FC6D26"}),(0,jsx_runtime.jsx)("path",{d:"M7.47589 20.631L9.91301 22.5548L11.3975 23.7239C11.5712 23.8614 11.7832 23.9358 12.0013 23.9358C12.2193 23.9358 12.4313 23.8614 12.605 23.7239L14.0895 22.5548L16.5266 20.631C16.5266 20.631 14.4186 18.9677 12 17.0645C9.58146 18.9677 7.47589 20.631 7.47589 20.631Z",fill:"#FCA326"}),(0,jsx_runtime.jsx)("path",{d:"M4.89652 11.4632C3.60966 10.4559 2.12514 9.75798 0.5493 9.41936L0.517135 9.50839C0.0516127 10.777 -0.00584844 12.1692 0.353415 13.4748C0.712679 14.7805 1.46919 15.929 2.50889 16.7471L2.52002 16.7561L2.54971 16.7781L7.4759 20.6258C7.4759 20.6258 9.57899 18.9677 12 17.0594L4.89652 11.4632Z",fill:"#FC6D26"})]})}function IconGoogle(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M23.52 12.2727C23.52 11.4218 23.4436 10.6036 23.3018 9.81818H12V14.4654H18.4582C18.1745 15.96 17.3236 17.2254 16.0473 18.0764V21.0982H19.9418C22.2109 19.0036 23.52 15.9273 23.52 12.2727V12.2727Z",fill:"#4285F4"}),(0,jsx_runtime.jsx)("path",{d:"M12 24C15.24 24 17.9564 22.9309 19.9418 21.0982L16.0473 18.0764C14.9782 18.7964 13.6145 19.2327 12 19.2327C8.87999 19.2327 6.22908 17.1273 5.27999 14.2909H1.28726V17.3891C3.26181 21.3055 7.30908 24 12 24Z",fill:"#34A853"}),(0,jsx_runtime.jsx)("path",{d:"M5.28 14.28C5.04 13.56 4.89818 12.7964 4.89818 12C4.89818 11.2036 5.04 10.44 5.28 9.72001V6.62183H1.28727C0.469091 8.23637 0 10.0582 0 12C0 13.9418 0.469091 15.7636 1.28727 17.3782L4.39636 14.9564L5.28 14.28Z",fill:"#FBBC05"}),(0,jsx_runtime.jsx)("path",{d:"M12 4.77818C13.7673 4.77818 15.3382 5.38909 16.5927 6.56727L20.0291 3.13091C17.9454 1.18909 15.24 0 12 0C7.30908 0 3.26181 2.69455 1.28726 6.62182L5.27999 9.72C6.22908 6.88364 8.87999 4.77818 12 4.77818Z",fill:"#EA4335"})]})}function IconOpenInNew(props){return(0,jsx_runtime.jsx)(LemonIconBase,{width:"1em",height:"1em",viewBox:"0 0 24 24",...props,children:(0,jsx_runtime.jsx)("path",{d:"m19 19h-14v-14h7v-2h-7c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-5-16v2h3.59l-9.83 9.83 1.41 1.41 9.83-9.83v3.59h2v-7z",fill:"currentColor"})})}function IconTrendingFlat(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 12-4-4v3h-12v2h12v3z",fill:"currentColor"})})}function IconTrendingFlatDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m17.6567 17.6558v-5.6568l-2.1214 2.1213-8.48523-8.48531-1.41422 1.41422 8.48525 8.48529-2.1213 2.1213z",fill:"currentColor"})})}function IconTrendingDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4-7.41-7.42 1.41-1.41 6 6 4-4 6.3 6.29 2.29-2.29v6z",fill:"currentColor"})})}function IconFlare(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m7 11h-6v2h6zm2.17-3.24-2.12-2.12-1.41 1.41 2.12 2.12zm3.83-6.76h-2v6h2zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41zm-1.36 3.95v2h6v-2zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41zm5.36 6.05h2v-6h-2z",fill:"currentColor"})})}function IconQueryEditor(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M4,14V17C4,19 7.05,20.72 11,21V18.11L11.13,18C7.12,17.76 4,16.06 4,14M12,13C7.58,13 4,11.21 4,9V12C4,14.21 7.58,16 12,16C12.39,16 12.77,16 13.16,16L17,12.12C15.4,12.72 13.71,13 12,13M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M21,11.13C20.85,11.13 20.71,11.19 20.61,11.3L19.61,12.3L21.66,14.3L22.66,13.3C22.87,13.1 22.88,12.76 22.66,12.53L21.42,11.3C21.32,11.19 21.18,11.13 21.04,11.13M19.04,12.88L13,18.94V21H15.06L21.12,14.93L19.04,12.88Z"})})}function IconAction(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 20 20",...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 4H2V18H16V20H2C0.9 20 0 19.1 0 18V4ZM6 0H18C19.1 0 20 0.9 20 2V14C20 15.1 19.1 16 18 16H6C4.9 16 4 15.1 4 14V2C4 0.9 4.9 0 6 0ZM6 14H18V2H6V14ZM10.6851 10.3414L10.1453 11.9998H8.49756L11.0082 4.72705H12.9897L15.4968 11.9998H13.8491L13.3093 10.3414H10.6851ZM11.9706 6.38898L11.0757 9.14111H12.9223L12.0274 6.38898H11.9706Z",fill:"currentColor"})})}function IconEvent(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 20 10",...props,children:(0,jsx_runtime.jsx)("path",{d:"M7.4 10.6L2.8 6L7.4 1.4L6 0L0 6L6 12L7.4 10.6ZM12.6 10.6L17.2 6L12.6 1.4L14 0L20 6L14 12L12.6 10.6Z",fill:"currentColor"})})}function IconCancel(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13-3.59 3.59-3.59-3.59-1.41 1.41 3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59z",fill:"currentColor"})})}function IconPremium(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m9.68 13.69 2.32-1.76 2.31 1.76-.88-2.85 2.32-1.84h-2.84l-.91-2.81-.91 2.81h-2.84l2.31 1.84zm10.32-3.69c0-4.42-3.58-8-8-8s-8 3.58-8 8c0 2.03.76 3.87 2 5.28v7.72l6-2 6 2v-7.72c1.24-1.41 2-3.25 2-5.28zm-8-6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zm0 15-4 1.02v-3.1c1.18.68 2.54 1.08 4 1.08s2.82-.4 4-1.08v3.1z",fill:"currentColor"})})}function IconRefresh(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m17.65 6.35c-1.45-1.45-3.44-2.35-5.65-2.35-4.41999 0-7.98999 3.58-7.98999 8s3.57 8 7.98999 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.30999 0-5.99999-2.69-5.99999-6s2.69-6 5.99999-6c1.66 0 3.14.69 4.22 1.78l-3.22 3.22h7v-7z",fill:"currentColor"})})}function IconReplay(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"m12 5v-4l-5 5 5 5v-4c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",fill:"currentColor"})," "]})}function IconLegend(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-3 -3 24 24",fill:"none",...props,children:(0,jsx_runtime.jsx)("path",{d:"M8 4H14V6H8V4ZM8 8H14V10H8V8ZM8 12H14V14H8V12ZM4 4H6V6H4V4ZM4 8H6V10H4V8ZM4 12H6V14H4V12ZM17.1 0H0.9C0.4 0 0 0.4 0 0.9V17.1C0 17.5 0.4 18 0.9 18H17.1C17.5 18 18 17.5 18 17.1V0.9C18 0.4 17.5 0 17.1 0ZM16 16H2V2H16V16Z",fill:"currentColor"})})}function IconHeatmap(props){return(0,jsx_runtime.jsx)(LemonIconBase,{width:"1em",height:"1em",viewBox:"0 0 32 32",...props,children:(0,jsx_runtime.jsx)("path",{d:"M17.5 1.49056C17.5 0.00305736 15.5844 -0.557568 14.7406 0.675557C7 11.9899 18 12.4993 18 17.9993C18 20.2262 16.1806 22.0281 13.9469 21.9987C11.7487 21.9706 10 20.1381 10 17.9399V12.5956C10 11.2393 8.34562 10.5812 7.41062 11.5643C5.7375 13.3218 4 16.3324 4 19.9993C4 26.6162 9.38312 31.9993 16 31.9993C22.6169 31.9993 28 26.6162 28 19.9993C28 9.35618 17.5 7.93681 17.5 1.49056V1.49056Z",fill:"currentColor"})})}function IconUnverifiedEvent(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M4.8 17.4H19.2V15.6H4.8V17.4ZM6.6 21H17.4V19.2H6.6V21ZM19.2 13.8H4.8C3.81 13.8 3 12.99 3 12V4.8C3 3.81 3.81 3 4.8 3H19.2C20.19 3 21 3.81 21 4.8V12C21 12.99 20.19 13.8 19.2 13.8ZM19.2 4.8H4.8V12H19.2V4.8Z",fill:"currentColor"})})}function IconVerifiedEvent(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 3H4.8C3.81 3 3 3.81 3 4.8V12C3 12.99 3.81 13.8 4.8 13.8H19.2C20.19 13.8 21 12.99 21 12V10H19.2V12H4.8V4.8H14V3ZM19.2 17.4H4.8V15.6H19.2V17.4ZM17.4 21H6.6V19.2H17.4V21Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M17.7289 6.04489L16.0628 4.37164L15 5.44166L17.7289 8.17774L23 2.89228L21.9372 1.82227L17.7289 6.04489Z",fill:"currentColor"})]})}function IconTuning(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"})})}function IconBookmarkBorder(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-4 -3 24 24",...props,children:(0,jsx_runtime.jsx)("path",{d:"M12.5 0H2.5C1.4 0 0.5 0.9 0.5 2V18L7.5 15L14.5 18V2C14.5 0.9 13.6 0 12.5 0ZM12.5 15L7.5 12.82L2.5 15V2H12.5V15Z",fill:"currentColor"})})}function IconUploadFile(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z"})})}function IconSlack(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 2447.6 2452.5",...props,children:(0,jsx_runtime.jsxs)("g",{clipRule:"evenodd",fillRule:"evenodd",children:[(0,jsx_runtime.jsx)("path",{d:"m897.4 0c-135.3.1-244.8 109.9-244.7 245.2-.1 135.3 109.5 245.1 244.8 245.2h244.8v-245.1c.1-135.3-109.5-245.1-244.9-245.3.1 0 .1 0 0 0m0 654h-652.6c-135.3.1-244.9 109.9-244.8 245.2-.2 135.3 109.4 245.1 244.7 245.3h652.7c135.3-.1 244.9-109.9 244.8-245.2.1-135.4-109.5-245.2-244.8-245.3z",fill:"#36c5f0"}),(0,jsx_runtime.jsx)("path",{d:"m2447.6 899.2c.1-135.3-109.5-245.1-244.8-245.2-135.3.1-244.9 109.9-244.8 245.2v245.3h244.8c135.3-.1 244.9-109.9 244.8-245.3zm-652.7 0v-654c.1-135.2-109.4-245-244.7-245.2-135.3.1-244.9 109.9-244.8 245.2v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.3z",fill:"#2eb67d"}),(0,jsx_runtime.jsx)("path",{d:"m1550.1 2452.5c135.3-.1 244.9-109.9 244.8-245.2.1-135.3-109.5-245.1-244.8-245.2h-244.8v245.2c-.1 135.2 109.5 245 244.8 245.2zm0-654.1h652.7c135.3-.1 244.9-109.9 244.8-245.2.2-135.3-109.4-245.1-244.7-245.3h-652.7c-135.3.1-244.9 109.9-244.8 245.2-.1 135.4 109.4 245.2 244.7 245.3z",fill:"#ecb22e"}),(0,jsx_runtime.jsx)("path",{d:"m0 1553.2c-.1 135.3 109.5 245.1 244.8 245.2 135.3-.1 244.9-109.9 244.8-245.2v-245.2h-244.8c-135.3.1-244.9 109.9-244.8 245.2zm652.7 0v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.2v-653.9c.2-135.3-109.4-245.1-244.7-245.3-135.4 0-244.9 109.8-244.8 245.1 0 0 0 .1 0 0",fill:"#e01e5a"})]})})}function IconSlackExternal(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-2 -2 24 24",...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",children:[(0,jsx_runtime.jsx)("path",{d:"M13 4.75 18.25 10 13 15.25 7.75 10 13 4.75Z"}),(0,jsx_runtime.jsx)("path",{d:"M8.01 5.76 7 4.75 1.75 10 7 15.25l1.01-1.01-2.872-3.037a1.75 1.75 0 0 1 0-2.406L8.01 5.76Z"})]})})}function IconChrome(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})})}function IconFirefox(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M9.27 7.94C9.27 7.94 9.27 7.94 9.27 7.94M6.85 6.74C6.86 6.74 6.86 6.74 6.85 6.74M21.28 8.6C20.85 7.55 19.96 6.42 19.27 6.06C19.83 7.17 20.16 8.28 20.29 9.1L20.29 9.12C19.16 6.3 17.24 5.16 15.67 2.68C15.59 2.56 15.5 2.43 15.43 2.3C15.39 2.23 15.36 2.16 15.32 2.09C15.26 1.96 15.2 1.83 15.17 1.69C15.17 1.68 15.16 1.67 15.15 1.67H15.13L15.12 1.67L15.12 1.67L15.12 1.67C12.9 2.97 11.97 5.26 11.74 6.71C11.05 6.75 10.37 6.92 9.75 7.22C9.63 7.27 9.58 7.41 9.62 7.53C9.67 7.67 9.83 7.74 9.96 7.68C10.5 7.42 11.1 7.27 11.7 7.23L11.75 7.23C11.83 7.22 11.92 7.22 12 7.22C12.5 7.21 12.97 7.28 13.44 7.42L13.5 7.44C13.6 7.46 13.67 7.5 13.75 7.5C13.8 7.54 13.86 7.56 13.91 7.58L14.05 7.64C14.12 7.67 14.19 7.7 14.25 7.73C14.28 7.75 14.31 7.76 14.34 7.78C14.41 7.82 14.5 7.85 14.54 7.89C14.58 7.91 14.62 7.94 14.66 7.96C15.39 8.41 16 9.03 16.41 9.77C15.88 9.4 14.92 9.03 14 9.19C17.6 11 16.63 17.19 11.64 16.95C11.2 16.94 10.76 16.85 10.34 16.7C10.24 16.67 10.14 16.63 10.05 16.58C10 16.56 9.93 16.53 9.88 16.5C8.65 15.87 7.64 14.68 7.5 13.23C7.5 13.23 8 11.5 10.83 11.5C11.14 11.5 12 10.64 12.03 10.4C12.03 10.31 10.29 9.62 9.61 8.95C9.24 8.59 9.07 8.42 8.92 8.29C8.84 8.22 8.75 8.16 8.66 8.1C8.43 7.3 8.42 6.45 8.63 5.65C7.6 6.12 6.8 6.86 6.22 7.5H6.22C5.82 7 5.85 5.35 5.87 5C5.86 5 5.57 5.16 5.54 5.18C5.19 5.43 4.86 5.71 4.56 6C4.21 6.37 3.9 6.74 3.62 7.14C3 8.05 2.5 9.09 2.28 10.18C2.28 10.19 2.18 10.59 2.11 11.1L2.08 11.33C2.06 11.5 2.04 11.65 2 11.91L2 11.94L2 12.27L2 12.32C2 17.85 6.5 22.33 12 22.33C16.97 22.33 21.08 18.74 21.88 14C21.9 13.89 21.91 13.76 21.93 13.63C22.13 11.91 21.91 10.11 21.28 8.6Z"})})}function IconMicrosoftEdge(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M10.86 15.37C10.17 14.6 9.7 13.68 9.55 12.65C9.25 13.11 9 13.61 8.82 14.15C7.9 16.9 9.5 20.33 12.22 21.33C14.56 22.11 17.19 20.72 18.92 19.2C19.18 18.85 21.23 17.04 20.21 16.84C17.19 18.39 13.19 17.95 10.86 15.37M11.46 9.56C12.5 9.55 11.5 9.13 11.07 8.81C10.03 8.24 8.81 7.96 7.63 7.96C3.78 8 .995 10.41 2.3 14.4C3.24 18.28 6.61 21.4 10.59 21.9C8.54 20.61 7.3 18.19 7.3 15.78C7.38 13.25 8.94 10.28 11.46 9.56M2.78 8.24C5.82 6 10.66 6.18 13.28 9C14.3 10.11 15 12 14.07 13.37C12.33 15.25 17.15 15.5 18.18 15.22C21.92 14.5 22.91 10.15 21.13 7.15C19.43 3.75 15.66 1.97 11.96 2C7.9 1.93 4.25 4.5 2.78 8.24Z"})})}function IconSafari(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z"})})}function IconOpera(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M9.04,17.07C8.04,15.9 7.4,14.16 7.35,12.21V11.79C7.4,9.84 8.04,8.1 9.04,6.93C9.86,5.95 10.93,5.37 12.1,5.37C14.72,5.37 16.84,8.34 16.84,12C16.84,15.66 14.72,18.63 12.1,18.63C10.93,18.63 10.33,18.5 9.04,17.07M12.03,3H12A9,9 0 0,0 3,12C3,16.83 6.8,20.77 11.57,21H12C14.3,21 16.4,20.13 18,18.71C19.84,17.06 21,14.67 21,12C21,9.33 19.84,6.94 18,5.29C16.41,3.87 14.32,3 12.03,3Z"})})}function IconInternetExplorer(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M13,3L14,3.06C16.8,1.79 19.23,1.64 20.5,2.92C21.5,3.93 21.58,5.67 20.92,7.72C21.61,9 22,10.45 22,12L21.95,13H9.08C9.45,15.28 11.06,17 13,17C14.31,17 15.47,16.21 16.2,15H21.5C20.25,18.5 16.92,21 13,21C11.72,21 10.5,20.73 9.41,20.25C6.5,21.68 3.89,21.9 2.57,20.56C1,18.96 1.68,15.57 4,12C4.93,10.54 6.14,9.06 7.57,7.65L8.38,6.88C7.21,7.57 5.71,8.62 4.19,10.17C5.03,6.08 8.66,3 13,3M13,7C11.21,7 9.69,8.47 9.18,10.5H16.82C16.31,8.47 14.79,7 13,7M20.06,4.06C19.4,3.39 18.22,3.35 16.74,3.81C18.22,4.5 19.5,5.56 20.41,6.89C20.73,5.65 20.64,4.65 20.06,4.06M3.89,20C4.72,20.84 6.4,20.69 8.44,19.76C6.59,18.67 5.17,16.94 4.47,14.88C3.27,17.15 3,19.07 3.89,20Z"})})}function IconWeb(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})})}function IconListView(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z",fill:"currentColor"})})}function IconGridView(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3,3v8h8V3H3z M9,9H5V5h4V9z M3,13v8h8v-8H3z M9,19H5v-4h4V19z M13,3v8h8V3H13z M19,9h-4V5h4V9z M13,13v8h8v-8H13z M19,19h-4v-4h4V19z",fill:"currentColor"})})}function IconMonitor(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z"})})}function IconBold(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M6.8 19V5H12.325C13.4083 5 14.4083 5.33333 15.325 6C16.2417 6.66667 16.7 7.59167 16.7 8.775C16.7 9.625 16.5083 10.2792 16.125 10.7375C15.7417 11.1958 15.3833 11.525 15.05 11.725C15.4667 11.9083 15.9292 12.25 16.4375 12.75C16.9458 13.25 17.2 14 17.2 15C17.2 16.4833 16.6583 17.5208 15.575 18.1125C14.4917 18.7042 13.475 19 12.525 19H6.8ZM9.825 16.2H12.425C13.225 16.2 13.7125 15.9958 13.8875 15.5875C14.0625 15.1792 14.15 14.8833 14.15 14.7C14.15 14.5167 14.0625 14.2208 13.8875 13.8125C13.7125 13.4042 13.2 13.2 12.35 13.2H9.825V16.2ZM9.825 10.5H12.15C12.7 10.5 13.1 10.3583 13.35 10.075C13.6 9.79167 13.725 9.475 13.725 9.125C13.725 8.725 13.5833 8.4 13.3 8.15C13.0167 7.9 12.65 7.775 12.2 7.775H9.825V10.5Z"})})}function IconItalic(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M5 19V16.5H9L12 7.5H8V5H18V7.5H14.5L11.5 16.5H15V19H5Z"})})}function IconPhone(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z"})})}function IconTablet(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z"})})}function IconDevices(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z"})})}function IconMacOS(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M18.71,19.5C17.88,20.74 17,21.95 15.66,21.97C14.32,22 13.89,21.18 12.37,21.18C10.84,21.18 10.37,21.95 9.1,22C7.79,22.05 6.8,20.68 5.96,19.47C4.25,17 2.94,12.45 4.7,9.39C5.57,7.87 7.13,6.91 8.82,6.88C10.1,6.86 11.32,7.75 12.11,7.75C12.89,7.75 14.37,6.68 15.92,6.84C16.57,6.87 18.39,7.1 19.56,8.82C19.47,8.88 17.39,10.1 17.41,12.63C17.44,15.65 20.06,16.66 20.09,16.67C20.06,16.74 19.67,18.11 18.71,19.5M13,3.5C13.73,2.67 14.94,2.04 15.94,2C16.07,3.17 15.6,4.35 14.9,5.19C14.21,6.04 13.07,6.7 11.95,6.61C11.8,5.46 12.36,4.26 13,3.5Z"})})}function IconAppleIOS(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M2.09 16.8H3.75V9.76H2.09M2.92 8.84C3.44 8.84 3.84 8.44 3.84 7.94C3.84 7.44 3.44 7.04 2.92 7.04C2.4 7.04 2 7.44 2 7.94C2 8.44 2.4 8.84 2.92 8.84M9.25 7.06C6.46 7.06 4.7 8.96 4.7 12C4.7 15.06 6.46 16.96 9.25 16.96C12.04 16.96 13.8 15.06 13.8 12C13.8 8.96 12.04 7.06 9.25 7.06M9.25 8.5C10.96 8.5 12.05 9.87 12.05 12C12.05 14.15 10.96 15.5 9.25 15.5C7.54 15.5 6.46 14.15 6.46 12C6.46 9.87 7.54 8.5 9.25 8.5M14.5 14.11C14.57 15.87 16 16.96 18.22 16.96C20.54 16.96 22 15.82 22 14C22 12.57 21.18 11.77 19.23 11.32L18.13 11.07C16.95 10.79 16.47 10.42 16.47 9.78C16.47 9 17.2 8.45 18.28 8.45C19.38 8.45 20.13 9 20.21 9.89H21.84C21.8 8.2 20.41 7.06 18.29 7.06C16.21 7.06 14.73 8.21 14.73 9.91C14.73 11.28 15.56 12.13 17.33 12.53L18.57 12.82C19.78 13.11 20.27 13.5 20.27 14.2C20.27 15 19.47 15.57 18.31 15.57C17.15 15.57 16.26 15 16.16 14.11H14.5Z"})," "]})}function IconWindows(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3,12V6.75L9,5.43V11.91L3,12M20,3V11.75L10,11.9V5.21L20,3M3,13L9,13.09V19.9L3,18.75V13M20,13.25V22L10,20.09V13.1L20,13.25Z"})," "]})}function IconLinux(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M14.62,8.35C14.2,8.63 12.87,9.39 12.67,9.54C12.28,9.85 11.92,9.83 11.53,9.53C11.33,9.37 10,8.61 9.58,8.34C9.1,8.03 9.13,7.64 9.66,7.42C11.3,6.73 12.94,6.78 14.57,7.45C15.06,7.66 15.08,8.05 14.62,8.35M21.84,15.63C20.91,13.54 19.64,11.64 18,9.97C17.47,9.42 17.14,8.8 16.94,8.09C16.84,7.76 16.77,7.42 16.7,7.08C16.5,6.2 16.41,5.3 16,4.47C15.27,2.89 14,2.07 12.16,2C10.35,2.05 9,2.81 8.21,4.4C8,4.83 7.85,5.28 7.75,5.74C7.58,6.5 7.43,7.29 7.25,8.06C7.1,8.71 6.8,9.27 6.29,9.77C4.68,11.34 3.39,13.14 2.41,15.12C2.27,15.41 2.13,15.7 2.04,16C1.85,16.66 2.33,17.12 3.03,16.96C3.47,16.87 3.91,16.78 4.33,16.65C4.74,16.5 4.9,16.6 5,17C5.65,19.15 7.07,20.66 9.24,21.5C13.36,23.06 18.17,20.84 19.21,16.92C19.28,16.65 19.38,16.55 19.68,16.65C20.14,16.79 20.61,16.89 21.08,17C21.57,17.09 21.93,16.84 22,16.36C22.03,16.1 21.94,15.87 21.84,15.63"})," "]})}function IconAndroidOS(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z"})})}function IconLink(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M7.90326 16.7536C6.93594 15.7863 6.93594 14.2137 7.90326 13.2464L10.166 10.9836L9.0912 9.90883L6.82846 12.1716C5.26717 13.7329 5.26717 16.2671 6.82846 17.8284C8.38975 19.3897 10.924 19.3897 12.4853 17.8284L14.7481 15.5657L13.6733 14.4909L11.4105 16.7536C10.4432 17.7209 8.87058 17.7209 7.90326 16.7536ZM10.7883 15L15.3137 10.4745L14.1824 9.34315L9.65688 13.8686L10.7883 15ZM12.4853 6.51472L10.2226 8.77746L11.2974 9.85226L13.5601 7.58952C14.5274 6.6222 16.1 6.6222 17.0674 7.58952C18.0347 8.55684 18.0347 10.1294 17.0674 11.0968L14.8046 13.3595L15.8794 14.4343L18.1422 12.1716C19.7035 10.6103 19.7035 8.07601 18.1422 6.51472C16.5809 4.95343 14.0466 4.95343 12.4853 6.51472Z",fill:"currentColor"})})}function IconPreview(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.11,3,19,3z M19,19H5V7h14V19z M12,10.5 c1.84,0,3.48,0.96,4.34,2.5c-0.86,1.54-2.5,2.5-4.34,2.5S8.52,14.54,7.66,13C8.52,11.46,10.16,10.5,12,10.5 M12,9 c-2.73,0-5.06,1.66-6,4c0.94,2.34,3.27,4,6,4s5.06-1.66,6-4C17.06,10.66,14.73,9,12,9L12,9z M12,14.5c-0.83,0-1.5-0.67-1.5-1.5 s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S12.83,14.5,12,14.5z"})})}function IconEyeHidden(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M12 6.90455C15.1009 6.90455 17.8664 8.64727 19.2164 11.4045C18.7336 12.4027 18.0545 13.2618 17.2445 13.9573L18.3982 15.1109C19.5355 14.1045 20.4355 12.8445 21 11.4045C19.5845 7.81273 16.0909 5.26818 12 5.26818C10.9609 5.26818 9.96273 5.43182 9.02182 5.73455L10.3718 7.08454C10.9036 6.97818 11.4436 6.90455 12 6.90455ZM11.1245 7.83727L12.8182 9.53091C13.2845 9.73545 13.6609 10.1118 13.8655 10.5782L15.5591 12.2718C15.6245 11.9936 15.6736 11.6991 15.6736 11.3964C15.6818 9.36727 14.0291 7.72273 12 7.72273C11.6973 7.72273 11.4109 7.76364 11.1245 7.83727ZM3.82636 5.16182L6.01909 7.35455C4.68545 8.40182 3.63 9.79273 3 11.4045C4.41545 14.9964 7.90909 17.5409 12 17.5409C13.2436 17.5409 14.4382 17.3036 15.5345 16.87L18.3327 19.6682L19.4864 18.5145L4.98 4L3.82636 5.16182ZM9.96273 11.2982L12.0982 13.4336C12.0655 13.4418 12.0327 13.45 12 13.45C10.8709 13.45 9.95455 12.5336 9.95455 11.4045C9.95455 11.3636 9.96273 11.3391 9.96273 11.2982ZM7.18091 8.51636L8.61273 9.94818C8.42455 10.3982 8.31818 10.8891 8.31818 11.4045C8.31818 13.4336 9.97091 15.0864 12 15.0864C12.5155 15.0864 13.0064 14.98 13.4482 14.7918L14.25 15.5936C13.53 15.79 12.7773 15.9045 12 15.9045C8.89909 15.9045 6.13364 14.1618 4.78364 11.4045C5.35636 10.2345 6.19091 9.26909 7.18091 8.51636Z",fill:"currentColor"})})}function IconFunnelHorizontal(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M19 5L19 8L5 8L5 5L19 5ZM15 10.6L15 13.4L5 13.4L5 10.6L15 10.6ZM11 16.2L11 19L5 19L5 16.2L11 16.2Z",fill:"currentColor"})})}function IconArrowUp(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",fill:"currentColor"})})}function IconArrowDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",fill:"currentColor"})})}function IconSort(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z",fill:"currentColor"})})}function IconFunnelVertical(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M5 5H8V19H5V5ZM10.6 9H13.4V19H10.6V9ZM16.2 13H19V19H16.2V13Z",fill:"currentColor"})})}function IconMarkdown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6H20.56C21.35 6 22 6.63 22 7.41V16.59C22 17.37 21.35 18 20.56 18M6.81 15.19V11.53L8.73 13.88L10.65 11.53V15.19H12.58V8.81H10.65L8.73 11.16L6.81 8.81H4.89V15.19H6.81M19.69 12H17.77V8.81H15.85V12H13.92L16.81 15.28L19.69 12Z"})})}function IconFullScreen(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M5 14H3V20H10V18H5V14Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M10 6L10 4L3 4L3 10L5 10L5 6L10 6Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M19 14H21V20H14V18H19V14Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M14 6L14 4L21 4L21 10L19 10L19 6L14 6Z",fill:"currentColor"})]})}function IconPlayCircle(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM9.5 16.5L16.5 12L9.5 7.5V16.5Z",fill:"currentColor"})})}function IconSkipBackward(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M21.8636 13.6486C22.7745 8.20179 18.9753 3.03539 13.3613 2.08842C10.1083 1.5397 6.96075 2.53504 4.71122 4.52864L3.64727 3.39843C3.52963 3.27464 3.31814 3.33531 3.29323 3.49844L2.61914 7.61871C2.59751 7.7469 2.70624 7.86158 2.83872 7.85097L7.12768 7.57298C7.16635 7.57046 7.20339 7.55738 7.23454 7.53524C7.26569 7.5131 7.28969 7.48281 7.30378 7.44784C7.31787 7.41288 7.32148 7.37466 7.31418 7.33758C7.30689 7.3005 7.289 7.26607 7.26256 7.23825L6.10772 6.01158C6.35345 5.79443 6.6153 5.59014 6.89033 5.40074C7.75239 4.80488 8.72707 4.3786 9.7602 4.14561C10.831 3.90282 11.9307 3.87537 13.0286 4.06056C14.1265 4.24575 15.1564 4.63245 16.0883 5.21303C16.9896 5.77326 17.7628 6.48932 18.3877 7.34012C19.0126 8.19091 19.4575 9.13303 19.7082 10.1413C19.9684 11.1866 20.0076 12.2555 19.828 13.3205C19.6483 14.3854 19.2606 15.3823 18.6724 16.282C18.1048 17.1522 17.3755 17.8963 16.5061 18.495C15.6366 19.0938 14.6714 19.5166 13.6362 19.7502C12.5654 19.993 11.4657 20.0204 10.3678 19.8352C9.26987 19.65 8.23995 19.2633 7.30808 18.6827C6.40854 18.1237 5.62762 17.4013 5.00872 16.5557C4.8493 16.3386 4.70383 16.1163 4.56724 15.8879C4.54048 15.8423 4.49636 15.8085 4.44446 15.7941C4.39256 15.7796 4.3371 15.7856 4.29013 15.8108L2.84288 16.5656C2.74229 16.6196 2.70583 16.7427 2.76244 16.841C4.25318 19.3768 6.85284 21.2731 10.0347 21.8098C15.6538 22.7576 20.9514 19.1029 21.8636 13.6486Z",fill:"currentColor"})})}function IconXmasTree(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M10,21V18H3L8,13H5L10,8H7L12,3L17,8H14L19,13H16L21,18H14V21H10Z"})})}function IconRobot(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,fill:"currentColor",children:(0,jsx_runtime.jsx)("path",{d:"M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z"})})}function IconSad(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z"})})}function IconDragHandle(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",fill:"currentColor"})})}function IconDocumentExpand(_ref4){let{mode,...props}=_ref4;return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M3 2.58828C3 2.26328 3.26328 2 3.58828 2C3.91328 2 4.17656 2.26328 4.17656 2.58828V21.4117C4.17656 21.7367 3.91328 22 3.58828 22C3.26328 22 3 21.7367 3 21.4117V2.58828ZM19.4704 2.58828C19.4704 2.26328 19.7337 2 20.0587 2C20.3837 2 20.6469 2.26328 20.6469 2.58828V21.4117C20.6469 21.7367 20.3837 22 20.0587 22C19.7337 22 19.4704 21.7367 19.4704 21.4117V2.58828ZM7.1172 13.1765C6.79298 13.1765 6.5297 12.9132 6.5297 12.5882C6.5297 12.2632 6.79298 11.9999 7.1172 11.9999H16.5296C16.8538 11.9999 17.1171 12.2632 17.1171 12.5882C17.1171 12.9132 16.8538 13.1765 16.5296 13.1765H7.1172ZM7.1172 16.1179C6.79298 16.1179 6.5297 15.8538 6.5297 15.5296C6.5297 15.2046 6.79298 14.9413 7.1172 14.9413H16.5296C16.8538 14.9413 17.1171 15.2046 17.1171 15.5296C17.1171 15.8538 16.8538 16.1179 16.5296 16.1179H7.1172ZM7.1172 19.0585C6.79298 19.0585 6.5297 18.7952 6.5297 18.4702C6.5297 18.146 6.79298 17.8819 7.1172 17.8819H16.5296C16.8538 17.8819 17.1171 18.146 17.1171 18.4702C17.1171 18.7952 16.8538 19.0585 16.5296 19.0585H7.1172Z",fill:"currentColor"}),"collapse"===mode?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("path",{d:"M6.47654 6.12116L8.44086 4.15683C8.65013 3.94756 8.98943 3.94756 9.19838 4.15683C9.40765 4.3661 9.40765 4.70539 9.19838 4.91435L8.14871 5.96401L11.9942 5.96429C12.29 5.96429 12.5332 6.20426 12.5332 6.50002C12.5332 6.79578 12.29 7.03575 11.9942 7.03575H8.14871L9.19867 8.08541C9.40794 8.29468 9.40794 8.63397 9.19867 8.84293C8.9894 9.0522 8.6501 9.0522 8.44115 8.84293L6.47682 6.8786C6.26755 6.66961 6.26755 6.33039 6.47654 6.12116Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M17.0947 6.12116L15.1304 4.15683C14.9211 3.94756 14.5818 3.94756 14.3729 4.15683C14.1636 4.3661 14.1636 4.70539 14.3729 4.91435L15.4225 5.96401L11.6771 5.96429C11.3813 5.96429 11.0371 6.20426 11.0371 6.50002C11.0371 6.79578 11.3813 7.03575 11.6771 7.03575H15.4225L14.3726 8.08541C14.1633 8.29468 14.1633 8.63397 14.3726 8.84293C14.5818 9.0522 14.9211 9.0522 15.1301 8.84293L17.0944 6.8786C17.3037 6.66961 17.3037 6.33039 17.0947 6.12116Z",fill:"currentColor"})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("path",{d:"M12.4765 6.12116L14.4408 4.15683C14.6501 3.94756 14.9894 3.94756 15.1984 4.15683C15.4076 4.3661 15.4076 4.70539 15.1984 4.91435L14.1487 5.96401L16.9942 5.96429C17.29 5.96429 17.5332 6.20426 17.5332 6.50002C17.5332 6.79578 17.29 7.03575 16.9942 7.03575H14.1487L15.1986 8.08541C15.4079 8.29468 15.4079 8.63397 15.1986 8.84293C14.9894 9.0522 14.6501 9.0522 14.4411 8.84293L12.4768 6.8786C12.2675 6.66961 12.2675 6.33039 12.4765 6.12116Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M11.3818 6.12116L9.4175 4.15683C9.20823 3.94756 8.86894 3.94756 8.65998 4.15683C8.45071 4.3661 8.45071 4.70539 8.65998 4.91435L9.70965 5.96401L6.96422 5.96429C6.66846 5.96429 6.32422 6.20426 6.32422 6.50002C6.32422 6.79578 6.66846 7.03575 6.96422 7.03575H9.70965L8.6597 8.08541C8.45043 8.29468 8.45043 8.63397 8.6597 8.84293C8.86896 9.0522 9.20826 9.0522 9.41721 8.84293L11.3815 6.8786C11.5908 6.66961 11.5908 6.33039 11.3818 6.12116Z",fill:"currentColor"})]})]})}function IconAdsClick(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M11.71,17.99C8.53,17.84,6,15.22,6,12c0-3.31,2.69-6,6-6c3.22,0,5.84,2.53,5.99,5.71l-2.1-0.63C15.48,9.31,13.89,8,12,8 c-2.21,0-4,1.79-4,4c0,1.89,1.31,3.48,3.08,3.89L11.71,17.99z M22,12c0,0.3-0.01,0.6-0.04,0.9l-1.97-0.59C20,12.21,20,12.1,20,12 c0-4.42-3.58-8-8-8s-8,3.58-8,8s3.58,8,8,8c0.1,0,0.21,0,0.31-0.01l0.59,1.97C12.6,21.99,12.3,22,12,22C6.48,22,2,17.52,2,12 C2,6.48,6.48,2,12,2S22,6.48,22,12z M18.23,16.26L22,15l-10-3l3,10l1.26-3.77l4.27,4.27l1.98-1.98L18.23,16.26z",fill:"currentColor"})})}function IconSquare(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 256 256",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",stroke:"currentColor",strokeWidth:6,d:"M208,220H48a12.01367,12.01367,0,0,1-12-12V48A12.01359,12.01359,0,0,1,48,36H208a12.01359,12.01359,0,0,1,12,12V208A12.01367,12.01367,0,0,1,208,220ZM48,44a4.00458,4.00458,0,0,0-4,4V208a4.00458,4.00458,0,0,0,4,4H208a4.00458,4.00458,0,0,0,4-4V48a4.00458,4.00458,0,0,0-4-4Z"})})}function IconReact(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 23 21",...props,children:[(0,jsx_runtime.jsxs)("g",{clipPath:"url(#clip0)",children:[(0,jsx_runtime.jsx)("path",{d:"M11.5 12.282a2.05 2.05 0 100-4.1 2.05 2.05 0 000 4.1z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M11.5 14.432c6.075 0 11-1.88 11-4.2 0-2.32-4.925-4.2-11-4.2s-11 1.88-11 4.2c0 2.32 4.925 4.2 11 4.2z",stroke:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M7.863 12.332c3.038 5.261 7.129 8.586 9.137 7.426 2.01-1.16 1.175-6.365-1.862-11.626C12.1 2.87 8.009-.454 6 .705c-2.008 1.16-1.174 6.366 1.863 11.627z",stroke:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M7.863 8.132C4.826 13.392 3.992 18.598 6 19.758c2.01 1.16 6.1-2.165 9.138-7.426C18.175 7.07 19.009 1.865 17 .705c-2.008-1.16-6.1 2.165-9.137 7.427z",stroke:"currentColor"})]}),(0,jsx_runtime.jsx)("defs",{children:(0,jsx_runtime.jsx)("clipPath",{id:"clip0",children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M0 0h23v20.463H0z"})})})]})}function IconFlutter(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 24 24",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3.5 12.5L6.5 15.5 19 3 13 3zM19 12L13 12 8 17 13 22 19 22 14 17z"})})}},"./frontend/src/lib/lemon-ui/icons/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$L:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconEyeHidden,$M:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBranch,$b:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectProperties,B4:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSort,BD:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconArrowDown,Bm:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPython,C9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconItalic,CO:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconUnverifiedEvent,Cc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectEvents,Cz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconArrowUp,D9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGroupedEvents,DB:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconLinux,DM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDocumentExpand,D_:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFlutter,EF:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconInfinity,Eo:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRecording,Et:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGitlab,GH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGolang,G_:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSkipBackward,IN:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconHandClick,Ii:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAreaChart,Io:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconXmasTree,JH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconLink,JK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSync,K6:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingFlatDown,Kp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAndroidOS,MN:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubtitles,Mr:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFunnelHorizontal,OG:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpera,Ol:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconKey,PV:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChrome,Qp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAction,RQ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconJavascript,Rz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFeedback,S9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPhone,SE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFunnelVertical,Sc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWeb,T:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWithBadge,U0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAdsClick,UE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenInApp,Ud:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPlayCircle,VG:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChevronRight,VI:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFirefox,VM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPreview,VZ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubArrowRight,W7:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPHP,WB:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconVerifiedEvent,X:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconHeatmap,X8:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCalculate,Xd:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWithCount,Xq:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSafari,YX:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDevices,Ye:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRobot,Z0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCohort,Zf:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSlackExternal,_S:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSwapHoriz,_b:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconQueryEditor,_x:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTuning,ar:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.SortableDragIcon,b8:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconErrorOutline,bK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectAll,bn:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconUploadFile,cs:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingFlat,dX:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconListView,dc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMenu,ed:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChevronLeft,ee:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTextSize,fS:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconNodeJS,ge:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconComment,gx:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSlack,gz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRuby,hQ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.Icon123,ig:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOffline,in:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAppleIOS,ix:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTablet,j4:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingDown,jP:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconInternetExplorer,jo:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWindows,kh:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMarkdown,ku:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPremium,lE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMacOS,lM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBold,p$:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTableChart,pF:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenInNew,q3:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSurveys,qV:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconExclamation,qw:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubtitlesOff,r3:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMicrosoftEdge,rU:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDragHandle,re:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMonitor,rp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCumulativeChart,s5:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFullScreen,sH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTools,sL:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBookmarkBorder,tr:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRefresh,uR:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCancel,v$:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconReact,vY:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGoogle,yK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconClipboardEdit,yf:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFlare,ys:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconReplay,z0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGridView});var _icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/icons.tsx")},"./frontend/src/lib/logic/apiStatusLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>apiStatusLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let apiStatusLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","apiStatusLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({onApiResponse:(response,error)=>({response,error}),setInternetConnectionIssue:issue=>({issue}),setTimeSensitiveAuthenticationRequired:required=>({required})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({internetConnectionIssue:[!1,{setInternetConnectionIssue:(_,_ref)=>{let{issue}=_ref;return issue}}],timeSensitiveAuthenticationRequired:[!1,{setTimeSensitiveAuthenticationRequired:(_,_ref2)=>{let{required}=_ref2;return required}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref3=>{let{cache,actions,values}=_ref3;return{onApiResponse:async(_ref4,breakpoint)=>{let{response,error}=_ref4;(error||!response?.status)&&(await breakpoint(50),error?.message==="Failed to fetch"&&actions.setInternetConnectionIssue(!0)),response?.ok&&values.internetConnectionIssue&&actions.setInternetConnectionIssue(!1);try{if(response?.status===403){let data=await response?.json();"This action requires you to be recently authenticated."===data.detail&&actions.setTimeSensitiveAuthenticationRequired(!0)}}catch(e){}if(response?.status===401){var _cache$lastUnauthoriz;if(!scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__.userLogic.findMounted()?.values.user)return;let now=Date.now();now-1e4>(null!==(_cache$lastUnauthoriz=cache.lastUnauthorizedCheck)&&void 0!==_cache$lastUnauthoriz?_cache$lastUnauthoriz:0)&&(cache.lastUnauthorizedCheck=Date.now(),await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.get("api/users/@me/").catch(error=>{401===error.status&&scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__.userLogic.findMounted()?.actions.logout()}))}}}})])},"./frontend/src/lib/logic/featureFlagLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>featureFlagLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js");let eventsNotified={};function notifyFlagIfNeeded(flag,flagState){eventsNotified[flag]||(posthog_js__WEBPACK_IMPORTED_MODULE_2__.ZP.capture("$feature_flag_called",{$feature_flag:flag,$feature_flag_response:void 0!==flagState&&flagState}),eventsNotified[flag]=!0)}function getPersistedFeatureFlags(){let appContext=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__.Fj)(),persistedFeatureFlags=appContext?.persisted_feature_flags||[],flags=Object.fromEntries(persistedFeatureFlags.map(f=>[f,!0]));return flags}let featureFlagLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","logic","featureFlagLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setFeatureFlags:(flags,variants)=>({flags,variants})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({featureFlags:[getPersistedFeatureFlags(),{persist:!0},{setFeatureFlags:(_,_ref)=>{let{variants}=_ref;return function(featureFlags){let appContext=(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__.Fj)(),persistedFlags=getPersistedFeatureFlags(appContext),availableFlags=appContext?.preflight?.cloud||appContext?.preflight?.is_debug?{...persistedFlags,...featureFlags}:persistedFlags;if(void 0!==window.Proxy)return new Proxy({},{get(_,flag){if("toJSON"===flag)return()=>availableFlags;let flagString=flag.toString(),flagState=availableFlags[flagString];return notifyFlagIfNeeded(flagString,flagState),flagState}});let flags={};for(let flag of Object.keys(availableFlags))Object.defineProperty(flags,flag,{get:function(){return"toJSON"===flag?()=>availableFlags:(notifyFlagIfNeeded(flag,!0),!0)}});return flags}(variants)}}],receivedFeatureFlags:[!1,{setFeatureFlags:()=>!0}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;posthog_js__WEBPACK_IMPORTED_MODULE_2__.ZP.onFeatureFlags(actions.setFeatureFlags)})])},"./frontend/src/lib/logic/userPreferencesLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>userPreferencesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let userPreferencesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","logic","userPreferencesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setHidePostHogPropertiesInTable:enabled=>({enabled}),setHideNullValues:enabled=>({enabled})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({hidePostHogPropertiesInTable:[!1,{persist:!0},{setHidePostHogPropertiesInTable:(_,_ref)=>{let{enabled}=_ref;return enabled}}],hideNullValues:[!0,{persist:!0},{setHideNullValues:(_,_ref2)=>{let{enabled}=_ref2;return enabled}}]}))])},"./frontend/src/lib/monaco/CodeEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>CodeEditor_CodeEditor,Z:()=>initModel});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CodeEditor=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/monaco/CodeEditor.scss"),CodeEditor_default=__webpack_require__.n(CodeEditor),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CodeEditor_default(),options),CodeEditor_default().locals;var dist=__webpack_require__("./node_modules/.pnpm/@monaco-editor+react@4.6.0_monaco-editor@0.49.0_react-dom@18.2.0_react@18.2.0/node_modules/@monaco-editor/react/dist/index.mjs"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),codeEditorLogic=__webpack_require__("./frontend/src/lib/monaco/codeEditorLogic.tsx");function isFocusable(element){if("DIV"===element.tagName||"SECTION"===element.tagName)return!1;let hasTabIndex=element.hasAttribute("tabindex"),tabIndex=hasTabIndex?parseInt(element.getAttribute("tabindex")||"0",10):-1,isFocusableInherently=/^(input|select|textarea|button|object)$/.test(element.tagName.toLowerCase())||"a"===element.tagName.toLowerCase()&&element.hasAttribute("href"),isDisabledOrHidden=element.hasAttribute("disabled")||"true"===element.getAttribute("aria-hidden")||"none"===element.style.display||"hidden"===element.style.visibility;return!isDisabledOrHidden&&(isFocusableInherently||tabIndex>=0)}var hog=__webpack_require__("./frontend/src/lib/monaco/languages/hog.ts"),hogQLAutocompleteProvider=__webpack_require__("./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts"),hogQLMetadataProvider=__webpack_require__("./frontend/src/lib/monaco/hogQLMetadataProvider.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts");let conf=()=>({...(0,hog.aK)()}),language=()=>({...(0,hog.dK)(),jsonKeywords:["true","false","null","undefined"],tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"json"}],json:[{include:"@whitespace"},[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[\w@]+/,{cases:{"@jsonKeywords":"keyword"}}],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_format_json"]],hog:[{include:"@whitespace"},[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format_json:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"hog"}]}}),hogQL_conf=()=>({comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),hogQL_language=()=>({defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","ANTI","ANY","ARRAY","AS","ASCENDING","ASOF","BOTH","BY","CASE","CAST","COHORT","COLLATE","CROSS","CUBE","CURRENT","DATE","DAY","DESC","DESCENDING","DISTINCT","ELSE","END","EXTRACT","FINAL","FIRST","FN","FOLLOWING","FOR","FROM","FULL","GROUP","HAVING","HOUR","ID","IF","INF","INTERVAL","KEY","LAST","LEADING","LET","LIMIT","MINUTE","MONTH","NAN_SQL","NULL_SQL","NULLS","OFFSET","ON","ORDER","OVER","PARTITION","PRECEDING","PREWHERE","QUARTER","RANGE","RETURN","ROLLUP","ROW","ROWS","SAMPLE","SECOND","SELECT","SEMI","SETTINGS","SUBSTRING","THEN","TIES","TO","TOP","TOTALS","TRAILING","TRIM","TRUNCATE","UNBOUNDED","USING","WEEK","WHEN","WHERE","WHILE","WINDOW","WITH","YEAR"],operators:["AND","BETWEEN","IN","LIKE","ILIKE","NOT","OR","IS","NULL","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["plus","minus","multiply","divide","intDiv","intDivOrZero","modulo","moduloOrZero","positiveModulo","negate","abs","gcd","lcm","max2","min2","multiplyDecimal","divideDecimal","empty","notEmpty","length","reverse","array","range","arrayConcat","arrayElement","has","hasAll","hasAny","hasSubstr","indexOf","arrayCount","countEqual","arrayEnumerate","arrayEnumerateUniq","arrayPopBack","arrayPopFront","arrayPushBack","arrayPushFront","arrayResize","arraySlice","arraySort","arrayReverseSort","arrayUniq","arrayJoin","arrayDifference","arrayDistinct","arrayEnumerateDense","arrayIntersect","arrayReverse","arrayFilter","arrayFlatten","arrayCompact","arrayZip","arrayAUC","arrayMap","arrayFill","arraySplit","arrayReverseFill","arrayReverseSplit","arrayExists","arrayAll","arrayFirst","arrayLast","arrayFirstIndex","arrayLastIndex","arrayMin","arrayMax","arraySum","arrayAvg","arrayCumSum","arrayCumSumNonNegative","arrayProduct","equals","notEquals","less","greater","lessOrEquals","greaterOrEquals","and","or","xor","not","hex","unhex","reinterpretAsUInt8","reinterpretAsUInt16","reinterpretAsUInt32","reinterpretAsUInt64","reinterpretAsUInt128","reinterpretAsUInt256","reinterpretAsInt8","reinterpretAsInt16","reinterpretAsInt32","reinterpretAsInt64","reinterpretAsInt128","reinterpretAsInt256","reinterpretAsFloat32","reinterpretAsFloat64","toInt","_toInt64","toFloat","toDecimal","toDate","toDateTime","toUUID","toString","toJSONString","parseDateTime","parseDateTimeBestEffort","toTypeName","toTimeZone","timeZoneOf","timeZoneOffset","toYear","toQuarter","toMonth","toDayOfYear","toDayOfMonth","toDayOfWeek","toHour","toMinute","toSecond","toUnixTimestamp","toUnixTimestamp64Milli","toStartOfYear","toStartOfISOYear","toStartOfQuarter","toStartOfMonth","toLastDayOfMonth","toMonday","toStartOfWeek","toStartOfDay","toLastDayOfWeek","toStartOfHour","toStartOfMinute","toStartOfSecond","toStartOfFiveMinutes","toStartOfTenMinutes","toStartOfFifteenMinutes","toTime","toISOYear","toISOWeek","toWeek","toYearWeek","age","dateDiff","dateTrunc","dateAdd","dateSub","timeStampAdd","timeStampSub","now","nowInBlock","rowNumberInAllBlocks","today","yesterday","timeSlot","toYYYYMM","toYYYYMMDD","toYYYYMMDDhhmmss","addYears","addMonths","addWeeks","addDays","addHours","addMinutes","addSeconds","addQuarters","subtractYears","subtractMonths","subtractWeeks","subtractDays","subtractHours","subtractMinutes","subtractSeconds","subtractQuarters","timeSlots","formatDateTime","dateName","monthName","fromUnixTimestamp","toModifiedJulianDay","fromModifiedJulianDay","toIntervalSecond","toIntervalMinute","toIntervalHour","toIntervalDay","toIntervalWeek","toIntervalMonth","toIntervalQuarter","toIntervalYear","left","right","lengthUTF8","leftPad","rightPad","leftPadUTF8","rightPadUTF8","lower","upper","lowerUTF8","upperUTF8","isValidUTF8","toValidUTF8","repeat","format","reverseUTF8","concat","substring","substringUTF8","appendTrailingCharIfAbsent","convertCharset","base58Encode","base58Decode","tryBase58Decode","base64Encode","base64Decode","tryBase64Decode","endsWith","startsWith","trim","trimLeft","trimRight","encodeXMLComponent","decodeXMLComponent","extractTextFromHTML","ascii","concatWithSeparator","position","positionCaseInsensitive","positionUTF8","positionCaseInsensitiveUTF8","multiSearchAllPositions","multiSearchAllPositionsUTF8","multiSearchFirstPosition","multiSearchFirstIndex","multiSearchAny","match","multiMatchAny","multiMatchAnyIndex","multiMatchAllIndices","multiFuzzyMatchAny","multiFuzzyMatchAnyIndex","multiFuzzyMatchAllIndices","extract","extractAll","extractAllGroupsHorizontal","extractAllGroupsVertical","like","ilike","notLike","notILike","ngramDistance","ngramSearch","countSubstrings","countSubstringsCaseInsensitive","countSubstringsCaseInsensitiveUTF8","countMatches","regexpExtract","replace","replaceAll","replaceOne","replaceRegexpAll","replaceRegexpOne","regexpQuoteMeta","translate","translateUTF8","if","multiIf","e","pi","exp","log","ln","exp2","log2","exp10","log10","sqrt","cbrt","erf","erfc","lgamma","tgamma","sin","cos","tan","asin","acos","atan","pow","power","intExp2","intExp10","cosh","acosh","sinh","asinh","atanh","atan2","hypot","log1p","sign","degrees","radians","factorial","width_bucket","floor","ceil","trunc","round","roundBankers","roundToExp2","roundDuration","roundAge","roundDown","map","mapFromArrays","mapAdd","mapSubtract","mapPopulateSeries","mapContains","mapKeys","mapValues","mapContainsKeyLike","mapExtractKeyLike","mapApply","mapFilter","mapUpdate","splitByChar","splitByString","splitByRegexp","splitByWhitespace","splitByNonAlpha","arrayStringConcat","alphaTokens","extractAllGroups","ngrams","tokens","bitAnd","bitOr","bitXor","bitNot","bitShiftLeft","bitShiftRight","bitRotateLeft","bitRotateRight","bitSlice","bitTest","bitTestAll","bitTestAny","bitCount","bitHammingDistance","bitmapBuild","bitmapToArray","bitmapSubsetInRange","bitmapSubsetLimit","subBitmap","bitmapContains","bitmapHasAny","bitmapHasAll","bitmapCardinality","bitmapMin","bitmapMax","bitmapTransform","bitmapAnd","bitmapOr","bitmapXor","bitmapAndnot","bitmapAndCardinality","bitmapOrCardinality","bitmapXorCardinality","bitmapAndnotCardinality","protocol","domain","domainWithoutWWW","topLevelDomain","firstSignificantSubdomain","cutToFirstSignificantSubdomain","cutToFirstSignificantSubdomainWithWWW","port","path","pathFull","queryString","fragment","queryStringAndFragment","extractURLParameter","extractURLParameters","extractURLParameterNames","URLHierarchy","URLPathHierarchy","encodeURLComponent","decodeURLComponent","encodeURLFormComponent","decodeURLFormComponent","netloc","cutWWW","cutQueryString","cutFragment","cutQueryStringAndFragment","cutURLParameter","isValidJSON","JSONHas","JSONLength","JSONArrayLength","JSONType","JSONExtractUInt","JSONExtractInt","JSONExtractFloat","JSONExtractBool","JSONExtractString","JSONExtractKey","JSONExtractKeys","JSONExtractRaw","JSONExtractArrayRaw","JSONExtractKeysAndValues","JSONExtractKeysAndValuesRaw","JSON_VALUE","in","notIn","greatCircleDistance","geoDistance","greatCircleAngle","pointInEllipses","pointInPolygon","geohashEncode","geohashDecode","geohashesInBox","isnull","isNotNull","coalesce","ifnull","nullif","assumeNotNull","toNullable","tuple","tupleElement","untuple","tupleHammingDistance","tupleToNameValuePairs","tuplePlus","tupleMinus","tupleMultiply","tupleDivide","tupleNegate","tupleMultiplyByNumber","tupleDivideByNumber","dotProduct","isFinite","isInfinite","ifNotFinite","isNaN","bar","transform","formatReadableDecimalSize","formatReadableSize","formatReadableQuantity","formatReadableTimeDelta","least","greatest","tumble","hop","tumbleStart","tumbleEnd","hopStart","hopEnd","L1Norm","L2Norm","LinfNorm","LpNorm","L1Distance","L2Distance","LinfDistance","LpDistance","L1Normalize","L2Normalize","LinfNormalize","LpNormalize","cosineDistance","rank","dense_rank","row_number","first_value","last_value","nth_value","lagInFrame","leadInFrame","equals","notEquals","less","greater","lessOrEquals","greaterOrEquals","like","ilike","notLike","notILike","in","notIn","count","countIf","countDistinctIf","min","minIf","max","maxIf","sum","sumIf","avg","avgIf","any","anyIf","stddevPop","stddevPopIf","stddevSamp","stddevSampIf","varPop","varPopIf","varSamp","varSampIf","covarPop","covarPopIf","covarSamp","covarSampIf","corr","anyHeavy","anyHeavyIf","anyLast","anyLastIf","argMin","argMinIf","argMax","argMaxIf","argMinMerge","argMaxMerge","avgState","avgMerge","avgWeighted","avgWeightedIf","avgArray","groupArray","groupUniqArray","groupUniqArrayIf","groupArrayInsertAt","groupArrayInsertAtIf","groupArrayMovingAvg","groupArrayMovingAvgIf","groupArrayMovingSum","groupArrayMovingSumIf","groupBitAnd","groupBitAndIf","groupBitOr","groupBitOrIf","groupBitXor","groupBitXorIf","groupBitmap","groupBitmapIf","groupBitmapAnd","groupBitmapAndIf","groupBitmapOr","groupBitmapOrIf","groupBitmapXor","groupBitmapXorIf","sumWithOverflow","sumWithOverflowIf","deltaSum","deltaSumIf","deltaSumTimestamp","deltaSumTimestampIf","sumMap","sumMapIf","sumMapMerge","minMap","minMapIf","maxMap","maxMapIf","medianArray","skewSamp","skewSampIf","skewPop","skewPopIf","kurtSamp","kurtSampIf","kurtPop","kurtPopIf","uniq","uniqIf","uniqExact","uniqExactIf","uniqHLL12","uniqHLL12If","uniqTheta","uniqThetaIf","median","medianIf","medianExact","medianExactIf","medianExactLow","medianExactLowIf","medianExactHigh","medianExactHighIf","medianExactWeighted","medianExactWeightedIf","medianTiming","medianTimingIf","medianTimingWeighted","medianTimingWeightedIf","medianDeterministic","medianDeterministicIf","medianTDigest","medianTDigestIf","medianTDigestWeighted","medianTDigestWeightedIf","medianBFloat16","medianBFloat16If","quantile","quantileIf","quantiles","quantilesIf","simpleLinearRegression","simpleLinearRegressionIf","contingency","contingencyIf","cramersV","cramersVIf","cramersVBiasCorrected","cramersVBiasCorrectedIf","theilsU","theilsUIf","maxIntersections","maxIntersectionsIf","maxIntersectionsPosition","maxIntersectionsPositionIf"],builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/#+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/\\'/,"string"],[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],complexIdentifiers:[[/`/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^`]+/,"identifier"],[/``/,"identifier"],[/`/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}),hogTemplate_conf=()=>({...(0,hog.aK)()}),hogTemplate_language=()=>({...(0,hog.dK)(),tokenizer:{root:[{include:"template_string"}],template_string:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^{]+/,"text"],[/@escapes/,"text.escape"],[/\\./,"text.escape.invalid"]],hog:[{include:"@whitespace"},[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"hog"}]}});var utils=__webpack_require__("./frontend/src/lib/utils.tsx"),editor_main=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");dist._m&&dist._m.config({monaco:editor_main});let codeEditorIndex=0;function initModel(model,builtCodeEditorLogic){model.codeEditorLogic=builtCodeEditorLogic}function CodeEditor_CodeEditor(_ref){var _editorProps$language;let{queryKey,options,onMount,value,onPressCmdEnter,autoFocus,globals,sourceQuery,schema:schema1,onError,onMetadata,...editorProps}=_ref,{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),scrollbarRendering=(0,utils.es)()?"hidden":"auto",[monacoAndEditor,setMonacoAndEditor]=(0,react.useState)(null),[monaco,editor]=null!=monacoAndEditor?monacoAndEditor:[],[realKey]=(0,react.useState)(()=>codeEditorIndex++),builtCodeEditorLogic=(0,codeEditorLogic.Pc)({key:null!=queryKey?queryKey:`new/${realKey}`,query:null!=value?value:"",language:null!==(_editorProps$language=editorProps.language)&&void 0!==_editorProps$language?_editorProps$language:"text",globals,sourceQuery,monaco:monaco,editor:editor,onError,onMetadata});(0,index_esm.useMountedLogic)(builtCodeEditorLogic);let monacoRoot=(0,react.useMemo)(()=>{let body="undefined"!=typeof document&&document.getElementsByTagName("body")[0]||null,monacoRoot=document.createElement("div");return monacoRoot.classList.add("monaco-editor"),monacoRoot.style.zIndex="var(--z-tooltip)",body?.appendChild(monacoRoot),monacoRoot},[]);(0,react.useEffect)(()=>()=>{monacoRoot?.remove()},[]),(0,react.useEffect)(()=>{monaco&&monaco.languages.typescript.typescriptDefaults.setCompilerOptions({jsx:editorProps?.path?.endsWith(".tsx")?monaco.languages.typescript.JsxEmit.React:monaco.languages.typescript.JsxEmit.Preserve,esModuleInterop:!0})},[monaco,editorProps.path]),(0,react.useEffect)(()=>{monaco&&monaco.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:schema1?[{uri:"http://internal/node-schema.json",fileMatch:["*"],schema:schema1}]:[]})},[monaco,schema1]);let monacoDisposables=(0,react.useRef)([]);return(0,react.useEffect)(()=>()=>{monacoDisposables.current.forEach(d=>d?.dispose())},[]),(0,jsx_runtime.jsx)(dist.ZP,{theme:isDarkModeOn?"vs-dark":"vs-light",loading:(0,jsx_runtime.jsx)(Spinner.$,{}),options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,glyphMargin:!1,folding:!0,wordWrap:"off",lineNumbers:"on",tabFocusMode:!1,overviewRulerBorder:!0,hideCursorInOverviewRuler:!1,overviewRulerLanes:3,overflowWidgetsDomNode:monacoRoot,...options,padding:{bottom:8,top:8},scrollbar:{vertical:scrollbarRendering,horizontal:scrollbarRendering,...options?.scrollbar}},value:value,onMount:(editor,monaco)=>{if(setMonacoAndEditor([monaco,editor]),function(monaco,editor,editorProps,options,builtCodeEditorLogic){let model=editor.getModel();model&&initModel(model,builtCodeEditorLogic),editorProps?.language==="hog"&&(0,hog.CW)(monaco),(editorProps?.language==="hogQL"||editorProps?.language==="hogQLExpr")&&function(monaco){let lang=arguments.length>1&&void 0!==arguments[1]?arguments[1]:schema.oU.hogQL;monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return id===lang})||(monaco.languages.register("hogQL"===lang?{id:lang,extensions:[".sql",".hogql"],mimetypes:["application/hogql"]}:{id:lang,mimetypes:["application/hogql+expr"]}),monaco.languages.setLanguageConfiguration(lang,hogQL_conf()),monaco.languages.setMonarchTokensProvider(lang,hogQL_language()),monaco.languages.registerCompletionItemProvider(lang,(0,hogQLAutocompleteProvider.B)(lang)),monaco.languages.registerCodeActionProvider(lang,(0,hogQLMetadataProvider.G)()))}(monaco,editorProps.language),editorProps?.language==="hogTemplate"&&(monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hogTemplate"===id})||(monaco.languages.register({id:"hogTemplate",mimetypes:["application/hog+template"]}),monaco.languages.setLanguageConfiguration("hogTemplate",hogTemplate_conf()),monaco.languages.setMonarchTokensProvider("hogTemplate",hogTemplate_language()),monaco.languages.registerCompletionItemProvider("hogTemplate",(0,hogQLAutocompleteProvider.B)(schema.oU.hogTemplate)),monaco.languages.registerCodeActionProvider("hogTemplate",(0,hogQLMetadataProvider.G)()))),editorProps?.language==="hogJson"&&(monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hogJson"===id})||(monaco.languages.register({id:"hogJson",mimetypes:["application/hog+json"]}),monaco.languages.setLanguageConfiguration("hogJson",conf()),monaco.languages.setMonarchTokensProvider("hogJson",language()),monaco.languages.registerCompletionItemProvider("hogJson",(0,hogQLAutocompleteProvider.B)(schema.oU.hogJson)),monaco.languages.registerCodeActionProvider("hogJson",(0,hogQLMetadataProvider.G)()))),(options.tabFocusMode||editorProps.onPressUpNoValue)&&editor.onKeyDown(evt=>{if(options.tabFocusMode&&evt.keyCode===monaco.KeyCode.Tab&&!evt.metaKey&&!evt.ctrlKey){var _evt$target$parentEle;let selection=editor.getSelection();if(selection&&(selection.startColumn!==selection.endColumn||selection.startLineNumber!==selection.endLineNumber))return;evt.preventDefault(),evt.stopPropagation();let element=null!==(_evt$target$parentEle=evt.target?.parentElement?.parentElement?.parentElement)&&void 0!==_evt$target$parentEle?_evt$target$parentEle:null;if(!element)return;let nextElement=evt.shiftKey?function(startElement){let prevSearchable=startElement.previousElementSibling,parentElement=startElement.parentElement;for(;parentElement;){for(;prevSearchable;){let focusable=function searchFocusable(currentElement){if(isFocusable(currentElement)&¤tElement!==startElement)return currentElement;let child=currentElement.lastElementChild;for(;child;){let focusable=searchFocusable(child);if(focusable)return focusable;child=child.previousElementSibling}return null}(prevSearchable);if(focusable)return focusable;prevSearchable=prevSearchable.previousElementSibling}if(isFocusable(parentElement)&&parentElement!==startElement)return parentElement;prevSearchable=parentElement.previousElementSibling,parentElement=parentElement.parentElement}return null}(element):function(startElement){let nextSearchable=startElement.nextElementSibling,parentElement=startElement.parentElement;for(;parentElement;){for(;nextSearchable;){let focusable=function searchFocusable(currentElement){if(isFocusable(currentElement)&¤tElement!==startElement)return currentElement;let child=currentElement.firstElementChild;for(;child;){let focusable=searchFocusable(child);if(focusable)return focusable;child=child.nextElementSibling}return null}(nextSearchable);if(focusable)return focusable;nextSearchable=nextSearchable.nextElementSibling}nextSearchable=parentElement.nextElementSibling,parentElement=parentElement.parentElement}return null}(element);nextElement&&"focus"in nextElement&&nextElement.focus()}!editorProps.onPressUpNoValue||evt.keyCode!==monaco.KeyCode.UpArrow||evt.metaKey||evt.ctrlKey||""!==editor.getValue()||(evt.preventDefault(),evt.stopPropagation(),editorProps.onPressUpNoValue())})}(monaco,editor,editorProps,null!=options?options:{},builtCodeEditorLogic),onPressCmdEnter&&monacoDisposables.current.push(editor.addAction({id:"saveAndRunPostHog",label:"Save and run query",keybindings:[monaco.KeyMod.CtrlCmd|monaco.KeyCode.Enter],run:()=>{let selection=editor.getSelection(),model=editor.getModel();if(selection&&model){let highlightedText=model.getValueInRange(selection);onPressCmdEnter(highlightedText,"selection");return}onPressCmdEnter(editor.getValue(),"full")}})),autoFocus){editor.focus();let model=editor.getModel();model&&editor.setPosition({column:model.getLineContent(model.getLineCount()).length+1,lineNumber:model.getLineCount()})}onMount?.(editor,monaco)},...editorProps},queryKey)}},"./frontend/src/lib/monaco/CodeEditorInline.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{s:()=>CodeEditorInline});var clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_monaco_CodeEditorResizable__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/CodeEditorResizable.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CodeEditorInline(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lib_monaco_CodeEditorResizable__WEBPACK_IMPORTED_MODULE_0__.Y,{minHeight:"29px",...props,className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)(".CodeEditorInline",props.className),options:{lineNumbers:"off",minimap:{enabled:!1},folding:!1,wordWrap:"on",renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"hidden"},overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,overviewRulerLanes:0,tabFocusMode:!0,...props.options}})}},"./frontend/src/lib/monaco/CodeEditorResizable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>CodeEditorResizeable});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_virtualized_dist_es_AutoSizer__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CodeEditorResizeable(_ref){let{height:defaultHeight,minHeight="5rem",maxHeight="90vh",className,editorClassName,embedded=!1,...props}=_ref,[height,setHeight]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultHeight),[manualHeight,setManualHeight]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultHeight),ref=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{var _value$split$length;let value="string"!=typeof props.value?JSON.stringify(props.value,null,2):props.value,lineCount=(null!==(_value$split$length=value?.split("\n").length)&&void 0!==_value$split$length?_value$split$length:1)+1;setHeight(18*lineCount)},[props.value]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{ref:ref,className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)("CodeEditorResizeable relative",embedded?"":"border rounded w-full",className),style:{minHeight,maxHeight,height:null!=manualHeight?manualHeight:height},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_virtualized_dist_es_AutoSizer__WEBPACK_IMPORTED_MODULE_2__.Z,{disableWidth:!0,children:_ref2=>{let{height}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_0__.p,{...props,className:editorClassName,height:height-2})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"absolute bottom-0 right-0 z-10 resize-y h-5 w-5 cursor-s-resize overflow-hidden",onMouseDown:e=>{var _ref$current$clientHe;let startY=e.clientY,startHeight=null!==(_ref$current$clientHe=ref.current?.clientHeight)&&void 0!==_ref$current$clientHe?_ref$current$clientHe:0,onMouseMove=event=>{setManualHeight(startHeight+event.clientY-startY)},onMouseUp=()=>{window.removeEventListener("mousemove",onMouseMove),window.removeEventListener("mouseup",onMouseUp)};window.addEventListener("mousemove",onMouseMove),window.addEventListener("mouseup",onMouseUp)}})]})}},"./frontend/src/lib/monaco/codeEditorLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Pc:()=>codeEditorLogic,nx:()=>activeModelStateKey,nz:()=>editorModelsStateKey});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_queries_examples__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/examples.ts"),_queries_query__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/schema.ts");let editorModelsStateKey=key=>`${key}/editorModelQueries`,activeModelStateKey=key=>`${key}/activeModelUri`,METADATA_LANGUAGES=[_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hog,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogQL,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogQLExpr,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogTemplate],codeEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","monaco","hogQLMetadataProvider"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({reloadMetadata:!0,createModel:!0,addModel:modelName=>({modelName}),setModel:modelName=>({modelName}),deleteModel:modelName=>({modelName}),removeModel:modelName=>({modelName}),setModels:models=>({models}),updateState:!0,setLocalState:(key,value)=>({key,value})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{props}=_ref;return{metadata:[null,{reloadMetadata:async(_,breakpoint)=>{var _props$sourceQuery$va;let model=props.editor?.getModel();if(!model||!props.monaco||!METADATA_LANGUAGES.includes(props.language))return null;await breakpoint(300);let query=props.query;if(""===query)return null;let variables=props.sourceQuery?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLQuery&&null!==(_props$sourceQuery$va=props.sourceQuery.variables)&&void 0!==_props$sourceQuery$va?_props$sourceQuery$va:void 0,response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_6__.jr)({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLMetadata,language:props.language,query:query,filters:props.metadataFilters,globals:props.globals,sourceQuery:props.sourceQuery,variables});return breakpoint(),props.onMetadata?.(response),[query,response]}}],modelMarkers:[[],{reloadMetadataSuccess:_ref2=>{var _metadataResponse$err,_metadataResponse$war,_metadataResponse$not;let{metadata}=_ref2,model=props.editor?.getModel();if(!model||!metadata)return[];let markers=[],[query,metadataResponse]=metadata;function noticeToMarker(error,severity){var _error$start,_error$end,_error$start2,_error$end2,_error$message;let start=model.getPositionAt(null!==(_error$start=error.start)&&void 0!==_error$start?_error$start:0),end=model.getPositionAt(null!==(_error$end=error.end)&&void 0!==_error$end?_error$end:query.length);return{start:null!==(_error$start2=error.start)&&void 0!==_error$start2?_error$start2:0,startLineNumber:start.lineNumber,startColumn:start.column,end:null!==(_error$end2=error.end)&&void 0!==_error$end2?_error$end2:query.length,endLineNumber:end.lineNumber,endColumn:end.column,message:null!==(_error$message=error.message)&&void 0!==_error$message?_error$message:"Unknown error",severity:severity,hogQLFix:error.fix}}for(let notice of null!==(_metadataResponse$err=metadataResponse?.errors)&&void 0!==_metadataResponse$err?_metadataResponse$err:[])markers.push(noticeToMarker(notice,8));for(let notice of null!==(_metadataResponse$war=metadataResponse?.warnings)&&void 0!==_metadataResponse$war?_metadataResponse$war:[])markers.push(noticeToMarker(notice,4));for(let notice of null!==(_metadataResponse$not=metadataResponse?.notices)&&void 0!==_metadataResponse$not?_metadataResponse$not:[])markers.push(noticeToMarker(notice,1));return props.monaco?.editor.setModelMarkers(model,"hogql",markers),markers}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({activeModelUri:[null,{setModel:(_,_ref3)=>{let{modelName}=_ref3;return modelName}}],allModels:[[],{addModel:(state,_ref4)=>{let{modelName}=_ref4,newModels=[...state,modelName];return newModels},removeModel:(state,_ref5)=>{let{modelName}=_ref5,newModels=state.filter(model=>model.toString()!==modelName.toString());return newModels},setModels:(_,_ref6)=>{let{models}=_ref6;return models}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{props,values,actions}=_ref7;return{addModel:()=>{if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},removeModel:()=>{if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},setModel:_ref8=>{let{modelName}=_ref8;if(props.monaco){let model=props.monaco.editor.getModel(modelName);props.editor?.setModel(model)}if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let path=modelName.path.split("/").pop();path&&props.multitab&&actions.setLocalState(activeModelStateKey(props.key),path)}},deleteModel:_ref9=>{let{modelName}=_ref9;if(props.monaco){let model=props.monaco.editor.getModel(modelName);if(modelName==values.activeModelUri){let indexOfModel=values.allModels.findIndex(model=>model.toString()===modelName.toString()),nextModel=values.allModels[indexOfModel+1]||values.allModels[indexOfModel-1]||values.allModels[0];actions.setModel(nextModel)}model?.dispose(),actions.removeModel(modelName)}},setLocalState:_ref10=>{let{key,value}=_ref10;localStorage.setItem(key,value)},updateState:async(_,breakpoint)=>{if(await breakpoint(100),values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&localStorage.setItem(editorModelsStateKey(props.key),JSON.stringify(queries))}},createModel:()=>{let currentModelCount=1,allNumbers=values.allModels.map(model=>parseInt(model.path.split("/").pop()||"0"));for(;allNumbers.includes(currentModelCount);)currentModelCount++;if(props.monaco){let uri=props.monaco.Uri.parse(currentModelCount.toString()),model=props.monaco.editor.createModel("SELECT event FROM events LIMIT 100",props.language,uri);props.editor?.setModel(model),actions.setModel(uri),actions.addModel(uri)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({isValidView:[s=>[s.metadata],metadata=>!!(metadata&&metadata[1]?.isValidView)],hasErrors:[s=>[s.modelMarkers],modelMarkers=>!!(null!=modelMarkers?modelMarkers:[]).filter(e=>8===e.severity).length],error:[s=>[s.hasErrors,s.modelMarkers],(hasErrors,modelMarkers)=>{let firstError=modelMarkers.find(e=>8===e.severity);return hasErrors&&firstError?`Error on line ${firstError.startLineNumber}, column ${firstError.startColumn}`:null}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref11=>{let{props,values}=_ref11;return{isValidView:isValidView=>{props.onError?.(values.error,isValidView)},error:error=>{props.onError?.(error,values.isValidView)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref12,oldProps)=>{let{actions,props}=_ref12;(props.query!==oldProps.query||props.language!==oldProps.language||props.editor!==oldProps.editor)&&actions.reloadMetadata()})])},"./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>hogQLAutocompleteProvider});var monaco_editor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),_queries_query__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/schema.ts");let convertCompletionItemKind=kind=>{switch(kind){case"Method":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Method;case"Function":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Function;case"Constructor":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Constructor;case"Field":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Field;case"Variable":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Variable;case"Class":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Class;case"Struct":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Struct;case"Interface":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Interface;case"Module":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Module;case"Property":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Property;case"Event":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Event;case"Operator":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Operator;case"Unit":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Unit;case"Value":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Value;case"Constant":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Constant;case"Enum":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Enum;case"EnumMember":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.EnumMember;case"Keyword":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Keyword;case"Text":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Text;case"Color":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Color;case"File":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.File;case"Reference":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Reference;case"Customcolor":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Customcolor;case"Folder":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Folder;case"TypeParameter":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.TypeParameter;case"User":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.User;case"Issue":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Issue;case"Snippet":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Snippet;default:throw Error(`Unknown CompletionItemKind: ${kind}`)}},kindToSortText=(kind,label)=>"Variable"===kind?`1-${label}`:"Method"===kind||"Function"===kind?`2-${label}`:`3-${label}`,hogQLAutocompleteProvider=type=>({triggerCharacters:[" ",",",".","{"],provideCompletionItems:async(model,position)=>{let logic=model.codeEditorLogic;if(!logic||!logic.isMounted())return{suggestions:[],incomplete:!1};let word=model.getWordUntilPosition(position),startOffset=model.getOffsetAt({lineNumber:position.lineNumber,column:word.startColumn}),endOffset=model.getOffsetAt({lineNumber:position.lineNumber,column:word.endColumn}),query={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_2__.OH.HogQLAutocomplete,language:type,query:model.getValue(),filters:logic.isMounted()?logic.props.metadataFilters:void 0,globals:logic.isMounted()?logic.props.globals:void 0,sourceQuery:logic.isMounted()?logic.props.sourceQuery:void 0,startPosition:startOffset,endPosition:endOffset},response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_1__.jr)(query),completionItems=response.suggestions,suggestions=completionItems.map(item=>{let kind=convertCompletionItemKind(item.kind),sortText=kindToSortText(item.kind,item.label);return{label:{label:item.label,detail:item.detail},documentation:item.documentation,insertText:item.insertText,range:{startLineNumber:position.lineNumber,endLineNumber:position.lineNumber,startColumn:word.startColumn,endColumn:word.endColumn},kind,sortText,command:kind===monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Function?{id:"cursorLeft",title:"Move cursor left"}:void 0}});return{suggestions,incomplete:response.incomplete_list}}})},"./frontend/src/lib/monaco/hogQLMetadataProvider.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>hogQLMetadataProvider});let hogQLMetadataProvider=()=>({provideCodeActions:(model,_range,context)=>{let logic=model.codeEditorLogic;if(logic?.isMounted()){let markersFromMonaco=context.markers,markersFromMetadata=logic.values.modelMarkers,quickFixes=[];for(let activeMarker of markersFromMonaco){let start=model.getOffsetAt({column:activeMarker.startColumn,lineNumber:activeMarker.startLineNumber}),end=model.getOffsetAt({column:activeMarker.endColumn,lineNumber:activeMarker.endLineNumber});for(let rawMarker of markersFromMetadata)rawMarker.hogQLFix&&rawMarker.start<=end&&rawMarker.end>=start&&quickFixes.push({title:`Replace with: ${rawMarker.hogQLFix}`,diagnostics:[rawMarker],kind:"quickfix",edit:{edits:[{resource:model.uri,textEdit:{range:rawMarker,text:rawMarker.hogQLFix},versionId:void 0}]},isPreferred:!0})}return{actions:quickFixes,dispose:()=>{}}}}})},"./frontend/src/lib/monaco/languages/hog.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{CW:()=>initHogLanguage,aK:()=>conf,dK:()=>language});var lib_monaco_hogQLAutocompleteProvider__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts"),lib_monaco_hogQLMetadataProvider__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/monaco/hogQLMetadataProvider.tsx"),monaco_editor__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),_queries_schema__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/schema.ts");let conf=()=>({wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:RegExp("^\\s*//\\s*#?region\\b"),end:RegExp("^\\s*//\\s*#?endregion\\b")}}}),language=()=>({defaultToken:"invalid",tokenPostfix:".hog",keywords:["fn","let","if","else","return","true","false","null","for","while","like","ilike","not","and","or","in"],operators:["<=",">=","==","!=","=>","+","-","**","*","/","%","<<",">",">>>","&","|","^","!","~","||","??","?",":","=",":=","+=","-=","*=","*=~","!=","!=~"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}});function initHogLanguage(monaco){monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hog"===id})||(monaco.languages.register({id:"hog",extensions:[".hog"],mimetypes:["application/hog"]}),monaco.languages.setLanguageConfiguration("hog",conf()),monaco.languages.setMonarchTokensProvider("hog",language()),monaco.languages.registerCompletionItemProvider("hog",(0,lib_monaco_hogQLAutocompleteProvider__WEBPACK_IMPORTED_MODULE_0__.B)(_queries_schema__WEBPACK_IMPORTED_MODULE_2__.oU.hog)),monaco.languages.registerCodeActionProvider("hog",(0,lib_monaco_hogQLMetadataProvider__WEBPACK_IMPORTED_MODULE_3__.G)()))}},"./frontend/src/lib/taxonomy.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IR:()=>CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS,NV:()=>getCoreFilterDefinition,Q3:()=>POSTHOG_EVENT_PROMOTED_PROPERTIES,R6:()=>getFilterLabel,dA:()=>CORE_FILTER_DEFINITIONS_BY_GROUP,jA:()=>isCoreFilter,t_:()=>PROPERTY_KEYS});var _components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let PERSON_PROPERTIES_ADAPTED_FROM_EVENT=new Set(["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_version","$referring_domain","$referrer","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"]),SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS=new Set(["$referring_domain","utm_source","utm_campaign","utm_medium","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"]),CORE_FILTER_DEFINITIONS_BY_GROUP={events:{"":{label:"All events",description:"This is a wildcard that matches all events."},$pageview:{label:"Pageview",description:"When a user loads (or reloads) a page."},$pageleave:{label:"Pageleave",description:"When a user leaves a page."},$autocapture:{label:"Autocapture",description:"User interactions that were automatically captured.",examples:["clicked button"]},$$heatmap:{label:"Heatmap",description:"Heatmap events carry heatmap data to the backend, they do not contribute to event counts."},$copy_autocapture:{label:"Clipboard autocapture",description:"Selected text automatically captured when a user copies or cuts."},$screen:{label:"Screen",description:"When a user loads a screen in a mobile app."},$set:{label:"Set",description:"Setting person properties."},$opt_in:{label:"Opt In",description:"When a user opts into analytics."},$feature_flag_called:{label:"Feature Flag Called",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["The feature flag that was called.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),'Warning! This only works in combination with the $feature_flag event. If you want to filter other events, try "Active Feature Flags".']}),examples:["beta-feature"]},$feature_view:{label:"Feature View",description:"When a user views a feature."},$feature_interaction:{label:"Feature Interaction",description:"When a user interacts with a feature."},$feature_enrollment_update:{label:"Feature Enrollment",description:"When a user enrolls with a feature."},$capture_metrics:{label:"Capture Metrics",description:"Metrics captured with values pertaining to your systems at a specific point in time"},$identify:{label:"Identify",description:"A user has been identified with properties"},$create_alias:{label:"Alias",description:"An alias ID has been added to a user"},$merge_dangerously:{label:"Merge",description:"An alias ID has been added to a user"},$groupidentify:{label:"Group Identify",description:"A group has been identified with properties"},$rageclick:{label:"Rageclick",description:"A user has rapidly and repeatedly clicked in a single place"},$dead_click:{label:"Dead click",description:"A user has clicked on something that is probably not clickable"},$exception:{label:"Exception",description:"Exceptions - an error or unexpected event in your application"},$web_vitals:{label:"Web Vitals",description:"Automatically captured web vitals data"},"Application Opened":{label:"Application Opened",description:"When a user opens the mobile app either for the first time or from the foreground."},"Application Backgrounded":{label:"Application Backgrounded",description:"When a user puts the mobile app in the background."},"Application Updated":{label:"Application Updated",description:"When a user upgrades mobile the app."},"Application Installed":{label:"Application Installed",description:"When a user installs mobile the app."},"Application Became Active":{label:"Application Became Active",description:"When a user puts the mobile app in the foreground."},"Deep Link Opened":{label:"Deep Link Opened",description:"When a user opens the mobile app via a deep link."}},elements:{tag_name:{label:"Tag Name",description:"HTML tag name of the element which you want to filter.",examples:["a","button","input"]},selector:{label:"CSS Selector",description:"Select any element by CSS selector.",examples:["div > a","table td:nth-child(2)",".my-class"]},text:{label:"Text",description:"Filter on the inner text of the HTML element."},href:{label:"Target (href)",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["Filter on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"href"})," attribute of the element."]}),examples:["https://posthog.com/about"]}},metadata:{distinct_id:{label:"Distinct ID",description:"The current distinct ID of the user.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"]},timestamp:{label:"Timestamp",description:"Time the event happened.",examples:["2023-05-20T15:30:00Z"],system:!0},event:{label:"Event",description:"The name of the event.",examples:["$pageview"],system:!0}},event_properties:{distinct_id:{},$session_duration:{},$copy_type:{label:"Copy Type",description:"Type of copy event.",examples:["copy","cut"]},$selected_content:{label:"Copied content",description:"The content that was selected when the user copied or cut."},$set:{label:"Set",description:"Person properties to be set"},$set_once:{label:"Set Once",description:"Person properties to be set if not set already (i.e. first-touch)"},$pageview_id:{label:"Pageview ID",description:"PostHog's internal ID for matching events to a pageview.",system:!0},$autocapture_disabled_server_side:{label:"Autocapture Disabled Server-Side",description:"If autocapture has been disabled server-side.",system:!0},$feature_flag_payloads:{label:"Feature Flag Payloads",description:"Feature flag payloads active in the environment."},$capture_failed_request:{label:"Capture Failed Request",description:""},$lib_rate_limit_remaining_tokens:{label:"Clientside rate limit remaining tokens",description:"Remaining rate limit tokens for the posthog-js library client-side rate limiting implementation.",examples:["100"]},token:{label:"Token",description:"Token used for authentication.",examples:["ph_abcdefg"]},$ce_version:{label:"$ce_version",description:"",system:!0},$anon_distinct_id:{label:"Anon Distinct ID",description:"If the user was previously anonymous, their anonymous ID will be set here.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],system:!0},$event_type:{label:"Event Type",description:"When the event is an $autocapture event, this specifies what the action was against the element.",examples:["click","submit","change"]},$insert_id:{label:"Insert ID",description:"Unique insert ID for the event.",system:!0},$time:{label:"$time (deprecated)",description:"Use the HogQL field `timestamp` instead. This field was previously set on some client side events.",system:!0,examples:["1681211521.345"]},$device_id:{label:"Device ID",description:"Unique ID for that device, consistent even if users are logging in/out.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],system:!0},$browser_type:{label:"Browser Type",description:"This is only added when posthog-js config.opt_out_useragent_filter is true.",examples:["browser","bot"]},$replay_minimum_duration:{label:"Replay config - minimum duration",description:"Config for minimum duration before emitting a session recording.",examples:["1000"]},$replay_sample_rate:{label:"Replay config - sample rate",description:"Config for sampling rate of session recordings.",examples:["0.1"]},$console_log_recording_enabled_server_side:{label:"Console Log Recording Enabled Server-Side",description:"If console log recording has been enabled server-side.",system:!0},$session_recording_recorder_version_server_side:{label:"Session Recording Recorder Version Server-Side",description:"The version of the session recording recorder that is enabled server-side.",examples:["v2"],system:!0},$session_recording_start_reason:{label:"Session recording start reason",description:"Reason for starting the session recording. Useful for e.g. if you have sampling enabled and want to see on batch exported events which sessions have recordings available.",examples:["sampling_override","recording_initialized","linked_flag_match"]},$session_recording_canvas_recording:{label:"Session recording canvas recording",description:"Session recording canvas capture config.",examples:['{"enabled": false}']},$session_recording_network_payload_capture:{label:"Session recording network payload capture",description:"Session recording network payload capture config.",examples:['{"recordHeaders": false}']},$configured_session_timeout_ms:{label:"Configured session timeout",description:"Configured session timeout in milliseconds.",examples:["1800000"]},$replay_script_config:{label:"Replay script config",description:"Sets an alternative recorder script for the web sdk.",examples:['{"script": "recorder-next""}']},$session_recording_url_trigger_activated_session:{label:"Session recording URL trigger activated session",description:"Session recording URL trigger activated session config. Used by posthog-js to track URL activation of session replay."},$session_recording_url_trigger_status:{label:"Session recording URL trigger status",description:"Session recording URL trigger status. Used by posthog-js to track URL activation of session replay."},$recording_status:{label:"Session recording status",description:"The status of session recording at the time the event was captured"},$cymbal_errors:{label:"Exception processing errors",description:"Errors encountered while trying to process exceptions",system:!0},$exception_list:{label:"Exception list",description:"List of one or more associated exceptions"},$sentry_exception:{label:"Sentry exception",description:"Raw Sentry exception data",system:!0},$sentry_exception_message:{label:"Sentry exception message"},$sentry_exception_type:{label:"Sentry exception type",description:"Class name of the exception object"},$sentry_tags:{label:"Sentry tags",description:"Tags sent to Sentry along with the exception"},$exception_type:{label:"Exception type",description:'Exception categorized into types. E.g. "Error"'},$exception_message:{label:"Exception Message",description:"The message detected on the error."},$exception_source:{label:"Exception source",description:"The source of the exception. E.g. JS file."},$exception_lineno:{label:"Exception source line number",description:"Which line in the exception source that caused the exception."},$exception_colno:{label:"Exception source column number",description:"Which column of the line in the exception source that caused the exception."},$exception_DOMException_code:{label:"DOMException code",description:"If a DOMException was thrown, it also has a DOMException code."},$exception_is_synthetic:{label:"Exception is synthetic",description:"Whether this was detected as a synthetic exception"},$exception_stack_trace_raw:{label:"Exception raw stack trace",description:"The exception's stack trace, as a string."},$exception_handled:{label:"Exception was handled",description:"Whether this was a handled or unhandled exception"},$exception_personURL:{label:"Exception person URL",description:"The PostHog person that experienced the exception"},$exception_capture_endpoint:{label:"Exception capture endpoint",description:"Endpoint used by posthog-js exception autocapture.",examples:["/e/"]},$exception_capture_endpoint_suffix:{label:"Exception capture endpoint",description:"Endpoint used by posthog-js exception autocapture.",examples:["/e/"]},$exception_capture_enabled_server_side:{label:"Exception capture enabled server side",description:"Whether exception autocapture was enabled in remote config."},$geoip_city_name:{label:"City Name",description:"Name of the city matched to this event's IP address.",examples:["Sydney","Chennai","Brooklyn"]},$geoip_country_name:{label:"Country Name",description:"Name of the country matched to this event's IP address.",examples:["Australia","India","United States"]},$geoip_country_code:{label:"Country Code",description:"Code of the country matched to this event's IP address.",examples:["AU","IN","US"]},$geoip_continent_name:{label:"Continent Name",description:"Name of the continent matched to this event's IP address.",examples:["Oceania","Asia","North America"]},$geoip_continent_code:{label:"Continent Code",description:"Code of the continent matched to this event's IP address.",examples:["OC","AS"," NA"]},$geoip_postal_code:{label:"Postal Code",description:"Approximated postal code matched to this event's IP address.",examples:["2000","600004","11211"]},$geoip_latitude:{label:"Latitude",description:"Approximated latitude matched to this event's IP address.",examples:["-33.8591","13.1337","40.7"]},$geoip_longitude:{label:"Longitude",description:"Approximated longitude matched to this event's IP address.",examples:["151.2","80.8008","-73.9"]},$geoip_time_zone:{label:"Timezone",description:"Timezone matched to this event's IP address.",examples:["Australia/Sydney","Asia/Kolkata","America/New_York"]},$geoip_subdivision_1_name:{label:"Subdivision 1 Name",description:"Name of the subdivision matched to this event's IP address.",examples:["New South Wales","Tamil Nadu","New York"]},$geoip_subdivision_1_code:{label:"Subdivision 1 Code",description:"Code of the subdivision matched to this event's IP address.",examples:["NSW","TN","NY"]},$geoip_subdivision_2_name:{label:"Subdivision 2 Name",description:"Name of the second subdivision matched to this event's IP address."},$geoip_subdivision_2_code:{label:"Subdivision 2 Code",description:"Code of the second subdivision matched to this event's IP address."},$geoip_subdivision_3_name:{label:"Subdivision 3 Name",description:"Name of the third subdivision matched to this event's IP address."},$geoip_subdivision_3_code:{label:"Subdivision 3 Code",description:"Code of the third subdivision matched to this event's IP address."},$geoip_disable:{label:"GeoIP Disabled",description:"Whether to skip GeoIP processing for the event."},$geoip_city_confidence:{label:"GeoIP detection city confidence",description:"Confidence level of the city matched to this event's IP address.",examples:["0.5"]},$geoip_country_confidence:{label:"GeoIP detection country confidence",description:"Confidence level of the country matched to this event's IP address.",examples:["0.5"]},$geoip_accuracy_radius:{label:"GeoIP detection accuracy radius",description:"Accuracy radius of the location matched to this event's IP address.",examples:["50"]},$geoip_subdivision_1_confidence:{label:"GeoIP detection subdivision 1 confidence",description:"Confidence level of the first subdivision matched to this event's IP address.",examples:["0.5"]},$el_text:{label:"Element Text",description:"The text of the element that was clicked. Only sent with Autocapture events.",examples:["Click here!"]},$app_build:{label:"App Build",description:"The build number for the app."},$app_name:{label:"App Name",description:"The name of the app."},$app_namespace:{label:"App Namespace",description:"The namespace of the app as identified in the app store.",examples:["com.posthog.app"]},$app_version:{label:"App Version",description:"The version of the app."},$device_manufacturer:{label:"Device Manufacturer",description:"The manufacturer of the device",examples:["Apple","Samsung"]},$is_emulator:{label:"Is Emulator",description:"Indicates whether the app is running on an emulator or a physical device",examples:["true","false"]},$device_name:{label:"Device Name",description:"Name of the device",examples:["iPhone 12 Pro","Samsung Galaxy 10"]},$locale:{label:"Locale",description:"The locale of the device",examples:["en-US","de-DE"]},$os_name:{label:"OS Name",description:"The Operating System name",examples:["iOS","Android"]},$os_version:{label:"OS Version",description:"The Operating System version.",examples:["15.5"]},$timezone:{label:"Timezone",description:"The timezone as reported by the device"},$touch_x:{label:"Touch X",description:"The location of a Touch event on the X axis"},$touch_y:{label:"Touch Y",description:"The location of a Touch event on the Y axis"},$plugins_succeeded:{label:"Plugins Succeeded",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins that successfully processed the event, e.g. edited properties (plugin method"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"processEvent"}),")."]})},$groups:{label:"Groups",description:"Relevant groups"},$group_0:{label:"Group 1",system:!0},$group_1:{label:"Group 2",system:!0},$group_2:{label:"Group 3",system:!0},$group_3:{label:"Group 4",system:!0},$group_4:{label:"Group 5",system:!0},$group_set:{label:"Group Set",description:"Group properties to be set"},$group_key:{label:"Group Key",description:"Specified group key"},$group_type:{label:"Group Type",description:"Specified group type"},$window_id:{label:"Window ID",description:"Unique window ID for session recording disambiguation",system:!0},$session_id:{label:"Session ID",description:"Unique session ID for session recording disambiguation",system:!0},$plugins_failed:{label:"Plugins Failed",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins that failed to process the event (plugin method ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"processEvent"}),")."]})},$plugins_deferred:{label:"Plugins Deferred",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins to which the event was handed off post-ingestion, e.g. for export (plugin method"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"onEvent"}),")."]})},$$plugin_metrics:{label:"Plugin Metric",description:"Performance metrics for a given plugin."},$creator_event_uuid:{label:"Creator Event ID",description:"Unique ID for the event, which created this person.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"]},utm_source:{label:"UTM Source",description:"UTM source tag.",examples:["Google","Bing","Twitter","Facebook"]},$initial_utm_source:{label:"Initial UTM Source",description:"UTM source tag.",examples:["Google","Bing","Twitter","Facebook"]},utm_medium:{label:"UTM Medium",description:"UTM medium tag.",examples:["Social","Organic","Paid","Email"]},utm_campaign:{label:"UTM Campaign",description:"UTM campaign tag.",examples:["feature launch","discount"]},utm_name:{label:"UTM Name",description:"UTM campaign tag, sent via Segment.",examples:["feature launch","discount"]},utm_content:{label:"UTM Content",description:"UTM content tag.",examples:["bottom link","second button"]},utm_term:{label:"UTM Term",description:"UTM term tag.",examples:["free goodies"]},$performance_page_loaded:{label:"Page Loaded",description:"The time taken until the browser's page load event in milliseconds."},$performance_raw:{label:"Browser Performance",description:"The browser performance entries for navigation (the page), paint, and resources. That were available when the page view event fired",system:!0},$had_persisted_distinct_id:{label:"$had_persisted_distinct_id",description:"",system:!0},$sentry_event_id:{label:"Sentry Event ID",description:"This is the Sentry key for an event.",examples:["byroc2ar9ee4ijqp"],system:!0},$timestamp:{label:"Timestamp (deprecated)",description:"Use the HogQL field `timestamp` instead. This field was previously set on some client side events.",examples:["2023-05-20T15:30:00Z"],system:!0},$sent_at:{label:"Sent At",description:"Time the event was sent to PostHog. Used for correcting the event timestamp when the device clock is off.",examples:[new Date().toISOString()]},$browser:{label:"Browser",description:"Name of the browser the user has used.",examples:["Chrome","Firefox"]},$os:{label:"OS",description:"The operating system of the user.",examples:["Windows","Mac OS X"]},$browser_language:{label:"Browser Language",description:"Language.",examples:["en","en-US","cn","pl-PL"]},$current_url:{label:"Current URL",description:"The URL visited at the time of the event.",examples:["https://example.com/interesting-article?parameter=true"]},$browser_version:{label:"Browser Version",description:"The version of the browser that was used. Used in combination with Browser.",examples:["70","79"]},$raw_user_agent:{label:"Raw User Agent",description:"PostHog process information like browser, OS, and device type from the user agent string. This is the raw user agent string.",examples:["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"]},$user_agent:{label:"Raw User Agent",description:"Some SDKs (like Android) send the raw user agent as $user_agent.",examples:["Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"]},$screen_height:{label:"Screen Height",description:"The height of the user's entire screen (in pixels).",examples:["2160","1050"]},$screen_width:{label:"Screen Width",description:"The width of the user's entire screen (in pixels).",examples:["1440","1920"]},$screen_name:{label:"Screen Name",description:"The name of the active screen."},$viewport_height:{label:"Viewport Height",description:"The height of the user's actual browser window (in pixels).",examples:["2094","1031"]},$viewport_width:{label:"Viewport Width",description:"The width of the user's actual browser window (in pixels).",examples:["1439","1915"]},$lib:{label:"Library",description:"What library was used to send the event.",examples:["web","posthog-ios"]},$lib_custom_api_host:{label:"Library Custom API Host",description:"The custom API host used to send the event.",examples:["https://ph.example.com"]},$lib_version:{label:"Library Version",description:"Version of the library used to send the event. Used in combination with Library.",examples:["1.0.3"]},$lib_version__major:{label:"Library Version (Major)",description:"Major version of the library used to send the event.",examples:[1]},$lib_version__minor:{label:"Library Version (Minor)",description:"Minor version of the library used to send the event.",examples:[0]},$lib_version__patch:{label:"Library Version (Patch)",description:"Patch version of the library used to send the event.",examples:[3]},$referrer:{label:"Referrer URL",description:"URL of where the user came from.",examples:["https://google.com/search?q=posthog&rlz=1C..."]},$referring_domain:{label:"Referring Domain",description:"Domain of where the user came from.",examples:["google.com","facebook.com"]},$user_id:{label:"User ID",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["This variable will be set to the distinct ID if you've called"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("pre",{className:"inline",children:"posthog.identify('distinct id')"}),". If the user is anonymous, it'll be empty."]})},$ip:{label:"IP Address",description:"IP address for this user when the event was sent.",examples:["203.0.113.0"]},$host:{label:"Host",description:"The hostname of the Current URL.",examples:["example.com","localhost:8000"]},$pathname:{label:"Path Name",description:"The path of the Current URL, which means everything in the url after the domain.",examples:["/pricing","/about-us/team"]},$search_engine:{label:"Search Engine",description:"The search engine the user came in from (if any).",examples:["Google","DuckDuckGo"]},$active_feature_flags:{label:"Active Feature Flags",description:"Keys of the feature flags that were active while this event was sent.",examples:["['beta-feature']"]},$enabled_feature_flags:{label:"Enabled Feature Flags",description:"Keys and multivariate values of the feature flags that were active while this event was sent.",examples:['{"flag": "value"}']},$feature_flag_response:{label:"Feature Flag Response",description:"What the call to feature flag responded with.",examples:["true","false"]},$feature_flag_payload:{label:"Feature Flag Response Payload",description:"The JSON payload that the call to feature flag responded with (if any)",examples:['{"variant": "test"}']},$feature_flag:{label:"Feature Flag",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["The feature flag that was called.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),'Warning! This only works in combination with the $feature_flag_called event. If you want to filter other events, try "Active Feature Flags".']}),examples:["beta-feature"]},$survey_response:{label:"Survey Response",description:"The response value for the first question in the survey.",examples:["I love it!",5,"['choice 1', 'choice 3']"]},$survey_name:{label:"Survey Name",description:"The name of the survey.",examples:["Product Feedback for New Product","Home page NPS"]},$survey_questions:{label:"Survey Questions",description:"The questions asked in the survey."},$survey_id:{label:"Survey ID",description:"The unique identifier for the survey."},$survey_iteration:{label:"Survey Iteration Number",description:"The iteration number for the survey."},$survey_iteration_start_date:{label:"Survey Iteration Start Date",description:"The start date for the current iteration of the survey."},$device:{label:"Device",description:"The mobile device that was used.",examples:["iPad","iPhone","Android"]},$sentry_url:{label:"Sentry URL",description:"Direct link to the exception in Sentry",examples:["https://sentry.io/..."]},$device_type:{label:"Device Type",description:"The type of device that was used.",examples:["Mobile","Tablet","Desktop"]},$screen_density:{label:"Screen density",description:'The logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen), providing the baseline of the system\'s display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc.',examples:[2.75]},$device_model:{label:"Device Model",description:"The model of the device that was used.",examples:["iPhone9,3","SM-G965W"]},$network_wifi:{label:"Network WiFi",description:"Whether the user was on WiFi when the event was sent.",examples:["true","false"]},$network_bluetooth:{label:"Network Bluetooth",description:"Whether the user was on Bluetooth when the event was sent.",examples:["true","false"]},$network_cellular:{label:"Network Cellular",description:"Whether the user was on cellular when the event was sent.",examples:["true","false"]},$client_session_initial_referring_host:{label:"Referrer Host",description:"Host that the user came from. (First-touch, session-scoped)",examples:["google.com","facebook.com"]},$client_session_initial_pathname:{label:"Initial Path",description:"Path that the user started their session on. (First-touch, session-scoped)",examples:["/register","/some/landing/page"]},$client_session_initial_utm_source:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["Google","Bing","Twitter","Facebook"]},$client_session_initial_utm_campaign:{label:"Initial UTM Campaign",description:"UTM Campaign. (First-touch, session-scoped)",examples:["feature launch","discount"]},$client_session_initial_utm_medium:{label:"Initial UTM Medium",description:"UTM Medium. (First-touch, session-scoped)",examples:["Social","Organic","Paid","Email"]},$client_session_initial_utm_content:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["bottom link","second button"]},$client_session_initial_utm_term:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["free goodies"]},$network_carrier:{label:"Network Carrier",description:"The network carrier that the user is on.",examples:["cricket","telecom"]},from_background:{label:"From Background",description:"Whether the app was opened for the first time or from the background.",examples:["true","false"]},url:{label:"URL",description:"The deep link URL that the app was opened from.",examples:["https://open.my.app"]},referring_application:{label:"Referrer Application",description:"The namespace of the app that made the request.",examples:["com.posthog.app"]},version:{label:"App Version",description:"The version of the app",examples:["1.0.0"]},previous_version:{label:"App Previous Version",description:"The previous version of the app",examples:["1.0.0"]},build:{label:"App Build",description:"The build number for the app",examples:["1"]},previous_build:{label:"App Previous Build",description:"The previous build number for the app",examples:["1"]},gclid:{label:"gclid",description:"Google Click ID"},rdt_cid:{label:"rdt_cid",description:"Reddit Click ID"},gad_source:{label:"gad_source",description:"Google Ads Source"},gclsrc:{label:"gclsrc",description:"Google Click Source"},dclid:{label:"dclid",description:"DoubleClick ID"},gbraid:{label:"gbraid",description:"Google Ads, web to app"},wbraid:{label:"wbraid",description:"Google Ads, app to web"},fbclid:{label:"fbclid",description:"Facebook Click ID"},msclkid:{label:"msclkid",description:"Microsoft Click ID"},twclid:{label:"twclid",description:"Twitter Click ID"},li_fat_id:{label:"li_fat_id",description:"LinkedIn First-Party Ad Tracking ID"},mc_cid:{label:"mc_cid",description:"Mailchimp Campaign ID"},igshid:{label:"igshid",description:"Instagram Share ID"},ttclid:{label:"ttclid",description:"TikTok Click ID"},$is_identified:{label:"Is Identified",description:"When the person was identified"},$initial_person_info:{label:"Initial Person Info",description:"posthog-js initial person information. used in the $set_once flow"},$web_vitals_enabled_server_side:{label:"Web vitals enabled server side",description:"Whether web vitals was enabled in remote config"},$web_vitals_FCP_event:{label:"Web vitals FCP measure event details"},$web_vitals_FCP_value:{label:"Web vitals FCP value"},$web_vitals_LCP_event:{label:"Web vitals LCP measure event details"},$web_vitals_LCP_value:{label:"Web vitals LCP value"},$web_vitals_INP_event:{label:"Web vitals INP measure event details"},$web_vitals_INP_value:{label:"Web vitals INP value"},$web_vitals_CLS_event:{label:"Web vitals CLS measure event details"},$web_vitals_CLS_value:{label:"Web vitals CLS value"},$web_vitals_allowed_metrics:{label:"Web vitals allowed metrics",description:"Allowed web vitals metrics config.",examples:['["LCP", "CLS"]']},$prev_pageview_last_scroll:{label:"Previous pageview last scroll",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",examples:[0]},$prev_pageview_last_scroll_percentage:{label:"Previous pageview last scroll percentage",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",examples:[0]},$prev_pageview_max_scroll:{examples:[0],label:"Previous pageview max scroll",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_max_scroll_percentage:{examples:[0],label:"Previous pageview max scroll percentage",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_last_content:{examples:[0],label:"Previous pageview last content",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_last_content_percentage:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview last content percentage"},$prev_pageview_max_content:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview max content"},$prev_pageview_max_content_percentage:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview max content percentage"},$prev_pageview_pathname:{examples:["/pricing","/about-us/team"],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview pathname"},$prev_pageview_duration:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview duration"},$surveys_activated:{label:"Surveys Activated",description:"The surveys that were activated for this event."},$process_person_profile:{label:"Person Profile processing flag",description:"The setting from an SDK to control whether an event has person processing enabled"},$dead_clicks_enabled_server_side:{label:"Dead clicks enabled server side",description:"Whether dead clicks were enabled in remote config"},$dead_click_scroll_delay_ms:{label:"Dead click scroll delay in milliseconds",description:"The delay between a click and the next scroll event"},$dead_click_mutation_delay_ms:{label:"Dead click mutation delay in milliseconds",description:"The delay between a click and the next mutation event"},$dead_click_absolute_delay_ms:{label:"Dead click absolute delay in milliseconds",description:"The delay between a click and having seen no activity at all"},$dead_click_selection_changed_delay_ms:{label:"Dead click selection changed delay in milliseconds",description:"The delay between a click and the next text selection change event"},$dead_click_last_mutation_timestamp:{label:"Dead click last mutation timestamp",description:"debug signal time of the last mutation seen by dead click autocapture"},$dead_click_event_timestamp:{label:"Dead click event timestamp",description:"debug signal time of the event that triggered dead click autocapture"},$dead_click_scroll_timeout:{label:"Dead click scroll timeout",description:"whether the dead click autocapture passed the threshold for waiting for a scroll event"},$dead_click_mutation_timeout:{label:"Dead click mutation timeout",description:"whether the dead click autocapture passed the threshold for waiting for a mutation event"},$dead_click_absolute_timeout:{label:"Dead click absolute timeout",description:"whether the dead click autocapture passed the threshold for waiting for any activity"},$dead_click_selection_changed_timeout:{label:"Dead click selection changed timeout",description:"whether the dead click autocapture passed the threshold for waiting for a text selection change event"}},numerical_event_properties:{},person_properties:{},session_properties:{$session_duration:{label:"Session duration",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["The duration of the session being tracked. Learn more about how PostHog tracks sessions in"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_1__.r,{to:"https://posthog.com/docs/user-guides/sessions",children:"our documentation."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),"Note, if the duration is formatted as a single number (not 'HH:MM:SS'), it's in seconds."]}),examples:["01:04:12"]},$start_timestamp:{label:"Start timestamp",description:"The timestamp of the first event from this session.",examples:[new Date().toISOString()]},$end_timestamp:{label:"End timestamp",description:"The timestamp of the last event from this session",examples:[new Date().toISOString()]},$entry_current_url:{label:"Entry URL",description:"The first URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$entry_pathname:{label:"Entry pathname",description:"The first pathname visited in this session.",examples:["/interesting-article?parameter=true"]},$end_current_url:{label:"Entry URL",description:"The first URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$end_pathname:{label:"Entry pathname",description:"The first pathname visited in this session.",examples:["/interesting-article?parameter=true"]},$exit_current_url:{label:"Exit URL",description:"The last URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$exit_pathname:{label:"Exit pathname",description:"The last pathname visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$pageview_count:{label:"Pageview count",description:"The number of page view events in this session.",examples:["123"]},$autocapture_count:{label:"Autocapture count",description:"The number of autocapture events in this session.",examples:["123"]},$screen_count:{label:"Screen count",description:"The number of screen events in this session.",examples:["123"]},$channel_type:{label:"Channel type",description:"What type of acquisition channel this traffic came from.",examples:["Paid Search","Organic Video","Direct"]},$is_bounce:{label:"Is bounce",description:"Whether the session was a bounce.",examples:["true","false"]},$last_external_click_url:{label:"Last external click URL",description:"The last external URL clicked in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$vitals_lcp:{label:"Web vitals LCP",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span",{children:"The time it took for the Largest Contentful Paint on the page. This captures the perceived load time of the page, and measure how long it took for the main content of the page to be visible to users."}),examples:["2.2"]}},groups:{$group_key:{label:"Group Key",description:"Specified group key"}},replay:{snapshot_source:{label:"Platform",description:"Platform the session was recorded on",examples:["web","mobile"]},console_log_level:{label:"Log level",description:"Level of console logs captured",examples:["info","warn","error"]},console_log_query:{label:"Console log",description:"Text of console logs captured"},visited_page:{label:"Visited page",description:"URL a user visited during their session"},click_count:{label:"Clicks",description:"Number of clicks during the session"},keypress_count:{label:"Key presses",description:"Number of key presses during the session"},console_error_count:{label:"Errors",description:"Number of console errors during the session"}},log_entries:{level:{label:"Console log level",description:"Level of the ",examples:["info","warn","error"]},message:{label:"Console log message",description:"The contents of the log message"}}};for(let[key,value]of(CORE_FILTER_DEFINITIONS_BY_GROUP.numerical_event_properties=CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties,CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties.distinct_id=CORE_FILTER_DEFINITIONS_BY_GROUP.metadata.distinct_id,Object.entries(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties)))PERSON_PROPERTIES_ADAPTED_FROM_EVENT.has(key)||key.startsWith("$geoip_")?(CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[key]={...value,label:`Latest ${value.label}`,description:"description"in value?`${value.description} Data from the last time this user was seen.`:"Data from the last time this user was seen."},CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[`$initial_${key.replace(/^\$/,"")}`]={...value,label:`Initial ${value.label}`,description:"description"in value?`${value.description} Data from the first time this user was seen.`:"Data from the first time this user was seen."}):CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[key]=value,SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS.has(key)&&(CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties[`$entry_${key.replace(/^\$/,"")}`]={...value,label:`Entry ${value.label}`,description:"description"in value?`${value.description} Data from the first event in this session.`:"Data from the first event in this session."});CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties.$session_duration=CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties.$session_duration;let PROPERTY_KEYS=Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties),CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS=["billing_period_end","billing_period_start","current_amount_usd.data_warehouse","current_amount_usd.feature_flags","current_amount_usd.integrations","current_amount_usd.platform_and_support","current_amount_usd.product_analytics","current_amount_usd.session_replay","current_amount_usd.surveys","current_total_amount_usd","current_usage.data_warehouse","current_usage.feature_flags","current_usage.integrations","current_usage.platform_and_support","current_usage.product_analytics","current_usage.session_replay","current_usage.surveys","customer_deactivated","custom_limits.data_warehouse","custom_limits.feature_flags","custom_limits.integrations","custom_limits.platform_and_support","custom_limits.product_analytics","custom_limits.session_replay","custom_limits.surveys","custom_limits_usd.data_warehouse","custom_limits_usd.feature_flags","custom_limits_usd.integrations","custom_limits_usd.platform_and_support","custom_limits_usd.product_analytics","custom_limits_usd.session_replay","custom_limits_usd.surveys","free_allocation.data_warehouse","free_allocation.feature_flags","free_allocation.integrations","free_allocation.platform_and_support","free_allocation.product_analytics","free_allocation.session_replay","free_allocation.surveys","has_billing_plan","percentage_usage.data_warehouse","percentage_usage.feature_flags","percentage_usage.integrations","percentage_usage.platform_and_support","percentage_usage.product_analytics","percentage_usage.session_replay","percentage_usage.surveys","projected_usage.data_warehouse","projected_usage.feature_flags","projected_usage.integrations","projected_usage.platform_and_support","projected_usage.product_analytics","projected_usage.session_replay","projected_usage.surveys","unit_amount_usd.data_warehouse","unit_amount_usd.feature_flags","unit_amount_usd.integrations","unit_amount_usd.platform_and_support","unit_amount_usd.product_analytics","unit_amount_usd.session_replay","unit_amount_usd.surveys","usage_limit.data_warehouse","usage_limit.feature_flags","usage_limit.integrations","usage_limit.platform_and_support","usage_limit.product_analytics","usage_limit.session_replay","usage_limit.surveys","is_demo_project","realm","email_service_available","slack_service_available","commit_sha"],POSTHOG_EVENT_PROMOTED_PROPERTIES={$pageview:["$current_url","title","$referrer"],$pageleave:["$current_url","title","$referrer"],$groupidentify:["$group_type","$group_key","$group_set"],$screen:["$screen_name"],$web_vitals:["$web_vitals_FCP_value","$web_vitals_CLS_value","$web_vitals_INP_value","$web_vitals_LCP_value","$web_vitals_FCP_event","$web_vitals_CLS_event","$web_vitals_INP_event","$web_vitals_LCP_event"],$set:["$set","$set_once"]};function isCoreFilter(key){return Object.values(CORE_FILTER_DEFINITIONS_BY_GROUP).some(mapping=>Object.keys(mapping).includes(key))}function getCoreFilterDefinition(value,type){if(void 0==value)return null;value=value.toString();let isGroupTaxonomicFilterType=type.startsWith("groups_");if(type in CORE_FILTER_DEFINITIONS_BY_GROUP&&value in CORE_FILTER_DEFINITIONS_BY_GROUP[type])return{...CORE_FILTER_DEFINITIONS_BY_GROUP[type][value]};if(isGroupTaxonomicFilterType&&value in CORE_FILTER_DEFINITIONS_BY_GROUP[_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.GroupsPrefix])return{...CORE_FILTER_DEFINITIONS_BY_GROUP[_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.GroupsPrefix][value]};if(value.startsWith("$survey_responded/")){let surveyId=value.replace(/^\$survey_responded\//,"");if(surveyId)return{label:`Survey Responded: ${surveyId}`,description:`Whether the user responded to survey with ID: "${surveyId}".`}}else if(value.startsWith("$survey_dismissed/")){let surveyId=value.replace(/^\$survey_dismissed\//,"");if(surveyId)return{label:`Survey Dismissed: ${surveyId}`,description:`Whether the user dismissed survey with ID: "${surveyId}".`}}else if(value.startsWith("$survey_response_")){let surveyIndex=value.replace(/^\$survey_response_/,"");if(surveyIndex){let index=Number(surveyIndex)+1;return{label:`Survey Response Question ID: ${surveyIndex}`,description:`The response value for the ${index}${1===index?"st":2===index?"nd":3===index?"rd":"th"} question in the survey.`}}}else if(value.startsWith("$feature/")){let featureFlagKey=value.replace(/^\$feature\//,"");if(featureFlagKey)return{label:`Feature: ${featureFlagKey}`,description:`Value for the feature flag "${featureFlagKey}" when this event was sent.`,examples:["true","variant-1a"]}}else if(value.startsWith("$feature_enrollment/")){let featureFlagKey=value.replace(/^\$feature_enrollment\//,"");if(featureFlagKey)return{label:`Feature Enrollment: ${featureFlagKey}`,description:`Whether the user has opted into the "${featureFlagKey}" beta program.`,examples:["true","false"]}}else if(value.startsWith("$feature_interaction/")){let featureFlagKey=value.replace(/^\$feature_interaction\//,"");if(featureFlagKey)return{label:`Feature Interaction: ${featureFlagKey}`,description:`Whether the user has interacted with "${featureFlagKey}".`,examples:["true","false"]}}return null}function getFilterLabel(key,type){var _trim;let data=getCoreFilterDefinition(key,type);return null!==(_trim=(data?data.label:key)?.trim())&&void 0!==_trim?_trim:"(empty string)"}},"./frontend/src/lib/utils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$G:()=>truncate,$W:()=>hexToRGB,Ae:()=>areObjectValuesEmpty,Ao:()=>sampleOne,BB:()=>toString,BN:()=>fromParamsGivenUrl,BW:()=>gradateColor,Bm:()=>isExternalLink,C2:()=>median,C7:()=>function humanFriendlyDuration(d){let{maxUnits,secondsPrecision,secondsFixed}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(""===d||null==d||0===maxUnits)return"";if((d=Number(d))<0)return`-${humanFriendlyDuration(-d)}`;if(0===d)return"0s";if(d<1)return`${Math.round(1e3*d)}ms`;if(d<60)return null!=secondsPrecision?`${parseFloat(d.toPrecision(secondsPrecision))}s`:`${parseFloat(d.toFixed(null!=secondsFixed?secondsFixed:0))}s`;let days=Math.floor(d/86400),h=Math.floor(d%86400/3600),m=Math.floor(d%3600/60),s=Math.round(d%3600%60),hDisplay=h>0?h+"h":"",mDisplay=m>0?m+"m":"";return(days>0?[days>0?days+"d":"",hDisplay].filter(Boolean):[hDisplay,mDisplay,s>0?s+"s":hDisplay||mDisplay?"":"0s"].filter(Boolean)).slice(0,null!=maxUnits?maxUnits:void 0).join("\xa0")},CW:()=>dateFromToText,Cp:()=>humanFriendlyCurrency,Cy:()=>tryJsonParse,DX:()=>isNotNil,Dh:()=>colonDelimitedDuration,Ds:()=>debounce,E9:()=>hexToRGBA,FZ:()=>dateStringToDayJs,Fw:()=>RGBToRGBA,HD:()=>isString,IP:()=>isNonEmptyObject,JP:()=>compactNumber,J_:()=>isDate,Je:()=>isOperatorRange,Jh:()=>isEmail,Kl:()=>dateFilterToText,Kn:()=>isObject,Kx:()=>allOperatorsMapping,Lc:()=>humanFriendlyNumber,MD:()=>inStorybook,N:()=>isAbortedRequest,Nc:()=>getEventNamesForAction,O3:()=>clearDOMTextSelection,PX:()=>isURL,Pc:()=>isUserLoggedIn,Qr:()=>isEmptyObject,Rx:()=>getDefaultInterval,S8:()=>isOperatorRegex,Sh:()=>autoCaptureEventToDescription,Sm:()=>sum,Sv:()=>downloadFile,Tl:()=>idToKey,UV:()=>identifierToHuman,V5:()=>isMac,VV:()=>stripHTTP,Vj:()=>uuid,WU:()=>chooseOperatorMap,Wd:()=>PURPLE,XH:()=>ceilMsToClosestSecond,Y8:()=>average,ZH:()=>eventToDescription,Zi:()=>pluralize,_$:()=>lightenDarkenColor,_6:()=>is12HoursOrLess,_Q:()=>formatDateRange,ab:()=>isOperatorMulti,bE:()=>dateMapping,bH:()=>alphabet,bn:()=>isOperatorCohort,bo:()=>humanFriendlyDetailedTime,bv:()=>hasFormErrors,d$:()=>humanFriendlyLargeNumber,dD:()=>isDomain,dm:()=>isMultiSeriesFormula,e9:()=>percentage,es:()=>inStorybookTestRunner,eu:()=>colorForString,f2:()=>ensureStringIsNotBlank,fZ:()=>isLessThan2Days,fc:()=>RGBToHex,fm:()=>capitalizeFirstLetter,gw:()=>delay,h$:()=>base64Encode,h0:()=>objectsEqual,hO:()=>objectClean,ig:()=>shortTimeZone,iw:()=>parseGithubRepoURL,jU:()=>objectCleanWithEmpty,jb:()=>roundToDecimal,kE:()=>isNumeric,kK:()=>humanizeBytes,kS:()=>sortedKeys,ke:()=>BRAND_BLUE_HSL,lV:()=>slugify,lz:()=>isOperatorFlag,mG:()=>genericOperatorMap,mo:()=>hashCodeForString,mq:()=>midEllipsis,nj:()=>objectDiffShallow,o0:()=>formatDateTime,oZ:()=>toParams,ow:()=>calculateDays,p6:()=>formatDate,pQ:()=>updateDatesWithInterval,pg:()=>humanFriendlyMilliseconds,pt:()=>dateStringToComponents,q0:()=>UnexpectedNeverError,q7:()=>shouldIgnoreInput,q_:()=>base64ArrayBuffer,qr:()=>findLastIndex,rt:()=>resolveWebhookService,sd:()=>shouldCancelQuery,t2:()=>reverseColonDelimitedDuration,tB:()=>cohortOperatorMap,tK:()=>isGroupType,tV:()=>base64Decode,tc:()=>isOperatorDate,tq:()=>isMobile,uZ:()=>clamp,uw:()=>uniqueBy,uy:()=>promiseResolveReject,v2:()=>fullName,vM:()=>groupBy,w6:()=>range,wR:()=>toSentenceCase,x1:()=>humanList,z9:()=>DEFAULT_DECIMAL_PLACES});var _sentry_react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__),lib_colors__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/colors.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/types.ts"),_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/DateFilter/types.ts"),_utils_getAppContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts");function uuid(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,c=>(parseInt(c)^(void 0!==window?.crypto?window.crypto.getRandomValues(new Uint8Array(1))[0]:Math.floor(256*Math.random()))&15>>parseInt(c)/4).toString(16))}function areObjectValuesEmpty(obj){return!!obj&&"object"==typeof obj&&!Object.values(obj).some(x=>null!==x&&""!==x&&void 0!==x)}let humanizeBytes=fileSizeInBytes=>{if(null===fileSizeInBytes)return"";let i=-1,convertedBytes=fileSizeInBytes;do convertedBytes/=1024,i++;while(convertedBytes>1024)return convertedBytes<.1?fileSizeInBytes+" bytes":convertedBytes.toFixed(2)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][i]};function toSentenceCase(str){return str.replace(/\b\w/g,c=>c.toUpperCase())}function toParams(obj){let explodeArrays=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return obj?Object.entries(obj).filter(item=>void 0!=item[1]&&null!=item[1]).reduce((acc,_ref)=>{let[key,val]=_ref;return explodeArrays&&Array.isArray(val)?val.forEach(v=>acc.push([key,v])):acc.push([key,val]),acc},[]).map(_ref2=>{var val;let[key,val1]=_ref2;return`${key}=${val=val1,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(val)?encodeURIComponent(val.format("YYYY-MM-DD")):encodeURIComponent(val="object"==typeof val?JSON.stringify(val):val)}`}).join("&"):""}function fromParamsGivenUrl(url){return url?url.replace(/^\?/,"").split("&").reduce((paramsObject,paramString)=>{let[key,value]=paramString.split("=");return paramsObject[key]=decodeURIComponent(value),paramsObject},{}):{}}function percentage(division){let maximumFractionDigits=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,fixedPrecision=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return division===1/0?"∞%":division.toLocaleString("en-US",{style:"percent",maximumFractionDigits,minimumFractionDigits:fixedPrecision?maximumFractionDigits:void 0})}function capitalizeFirstLetter(string){return string.charAt(0).toUpperCase()+string.slice(1)}function fullName(props){return`${props.first_name||""} ${props.last_name||""}`.trim()}let genericOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",icontains:"∋ contains",not_icontains:"∌ doesn't contain",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",gt:"> greater than",lt:"< less than",is_set:"✓ is set",is_not_set:"✕ is not set"},stringOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",icontains:"∋ contains",not_icontains:"∌ doesn't contain",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",is_set:"✓ is set",is_not_set:"✕ is not set"},numericOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",gt:"> greater than",lt:"< less than",is_set:"✓ is set",is_not_set:"✕ is not set"},dateTimeOperatorMap={is_date_exact:"= equals",is_date_before:"< before",is_date_after:"> after",is_set:"✓ is set",is_not_set:"✕ is not set"},booleanOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",is_set:"✓ is set",is_not_set:"✕ is not set"},durationOperatorMap={gt:"> greater than",lt:"< less than"},selectorOperatorMap={exact:"= equals",is_not:"≠ doesn't equal"},cohortOperatorMap={in:"user in",not_in:"user not in"},allOperatorsMapping={exact:"Exactly",gte:"At least",lte:"At most (but at least once)",...dateTimeOperatorMap,...stringOperatorMap,...numericOperatorMap,...genericOperatorMap,...booleanOperatorMap,...durationOperatorMap,...selectorOperatorMap,...cohortOperatorMap},operatorMappingChoice={DateTime:dateTimeOperatorMap,String:stringOperatorMap,Numeric:numericOperatorMap,Boolean:booleanOperatorMap,Duration:durationOperatorMap,Selector:selectorOperatorMap,Cohort:cohortOperatorMap};function chooseOperatorMap(propertyType){let choice=genericOperatorMap;return propertyType&&(choice=operatorMappingChoice[propertyType]||genericOperatorMap),choice}function isOperatorMulti(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.Exact,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsNot].includes(operator)}function isOperatorFlag(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsNotSet,_types__WEBPACK_IMPORTED_MODULE_3__.WV.In,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotIn].includes(operator)}function isOperatorCohort(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.In,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotIn].includes(operator)}function isOperatorRegex(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.Regex,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotRegex].includes(operator)}function isOperatorRange(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.GreaterThan,_types__WEBPACK_IMPORTED_MODULE_3__.WV.GreaterThanOrEqual,_types__WEBPACK_IMPORTED_MODULE_3__.WV.LessThan,_types__WEBPACK_IMPORTED_MODULE_3__.WV.LessThanOrEqual,_types__WEBPACK_IMPORTED_MODULE_3__.WV.Between,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotBetween].includes(operator)}function isOperatorDate(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateBefore,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateAfter,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateExact].includes(operator)}function objectsEqual(obj1,obj2){return fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default()(obj1,obj2)}function isString(candidate){return"string"==typeof candidate}function isObject(candidate){return"object"==typeof candidate&&null!==candidate}function isEmptyObject(candidate){return isObject(candidate)&&0===Object.keys(candidate).length}function isNonEmptyObject(candidate){return isObject(candidate)&&!isEmptyObject(candidate)}function objectClean(obj){let response={...obj};return Object.keys(response).forEach(key=>{void 0===response[key]&&delete response[key]}),response}function objectCleanWithEmpty(obj){let ignoredKeys=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],response={...obj};return Object.keys(response).filter(key=>!ignoredKeys.includes(key)).forEach(key=>{void 0===response[key]&&delete response[key],"object"==typeof response[key]&&Array.isArray(response[key])&&0===response[key].length&&delete response[key],"object"!=typeof response[key]||Array.isArray(response[key])||null===response[key]||0!==Object.keys(response[key]).length||delete response[key]}),response}function objectDiffShallow(obj1,obj2){let response={...obj2};for(let key of Object.keys(obj1))key in response?obj1[key]===response[key]&&delete response[key]:response[key]=void 0;return response}function idToKey(array){let keyField=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",object={};for(let element of array)object[element[keyField]]=element;return object}function delay(ms,signal){return new Promise((resolve,reject)=>{let timeoutId=setTimeout(resolve,ms);signal&&signal.addEventListener("abort",()=>{clearTimeout(timeoutId),reject(new DOMException("Aborted","AbortError"))})})}function clearDOMTextSelection(){window.getSelection?window.getSelection()?.empty?window.getSelection()?.empty():window.getSelection()?.removeAllRanges&&window.getSelection()?.removeAllRanges():document.selection&&document.selection.empty()}function slugify(text){return text.toString().toLowerCase().normalize("NFD").trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}let DEFAULT_DECIMAL_PLACES=2;function humanFriendlyNumber(d){let precision=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DEFAULT_DECIMAL_PLACES;return(isNaN(precision)||precision<0)&&(precision=DEFAULT_DECIMAL_PLACES),d.toLocaleString("en-US",{maximumFractionDigits:precision})}function humanFriendlyCurrency(d){let number,precision=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return d||(d="0.00"),number="string"==typeof d?parseFloat(d):d,`$${number.toLocaleString("en-US",{maximumFractionDigits:precision,minimumFractionDigits:precision})}`}function humanFriendlyLargeNumber(d){if(isNaN(d))return"NaN";if(!isFinite(d))return d>0?"inf":"-inf";let prefix=d>=0?"":"-";return(d=parseFloat((d=Math.abs(d)).toPrecision(3)))>=1e12?`${prefix}${(d/1e12).toString()}T`:d>=1e9?`${prefix}${(d/1e9).toString()}B`:d>=1e6?`${prefix}${(d/1e6).toString()}M`:d>=1e3?`${prefix}${(d/1e3).toString()}K`:`${prefix}${d}`}let humanFriendlyMilliseconds=timestamp=>"number"!=typeof timestamp?void 0:timestamp<1e3?`${Math.ceil(timestamp)}ms`:`${(timestamp/1e3).toFixed(2)}s`;function humanFriendlyDetailedTime(date){let formatString,formatDate=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM\xa0DD,\xa0YYYY",formatTime=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss\xa0A";if(!date)return"Never";let parsedDate=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(date),today=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().startOf("day"),yesterday=today.clone().subtract(1,"days").startOf("day");return parsedDate.isSame((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(),"m")?"Just now":(formatString=parsedDate.isSame(today,"d")?`[Today]\xa0${formatTime}`:parsedDate.isSame(yesterday,"d")?`[Yesterday]\xa0${formatTime}`:`${formatDate} ${formatTime}`,parsedDate.format(formatString))}let zeroPad=(num,places)=>String(num).padStart(places,"0");function colonDelimitedDuration(d){let fixedUnits=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(""===d||null==d)return"";let s=d=Number(d),weeks=0,days=0,h=0,m=0;weeks=!fixedUnits||fixedUnits>4?Math.floor(s/604800):0,s-=604800*weeks,days=!fixedUnits||fixedUnits>3?Math.floor(s/86400):0,s-=86400*days,h=!fixedUnits||fixedUnits>2?Math.floor(s/3600):0,s-=3600*h,m=!fixedUnits||fixedUnits>1?Math.floor(s/60):0,s-=60*m,s=Math.floor(s);let stopTrimming=!1,units=[];return([weeks,days,h,m,s].forEach((unit,i)=>{(fixedUnits||unit||stopTrimming||!(i<3))&&(units.push(zeroPad(unit,2)),stopTrimming=!0)}),fixedUnits)?units.slice(-fixedUnits).join(":"):units.join(":")}function reverseColonDelimitedDuration(duration){if(!duration||!/^(\d\d?:)*(\d\d?)$/.test(duration))return null;let seconds=0,units=duration.split(":").map(unit=>Number(unit)).reverse();return[1,60,3600,86400,604800].forEach((unit,index)=>{units[index]&&(seconds+=units[index]*unit)}),seconds}function stripHTTP(url){return url=(url=url.replace(/(^[0-9]+_)/,"")).replace(/(^\w+:|^)\/\//,"")}function isDomain(url){try{let parsedUrl="string"==typeof url?new URL(url):url;if(parsedUrl.protocol.includes("http")&&(!parsedUrl.pathname||"/"===parsedUrl.pathname)||!parsedUrl.pathname.replace(/^\/\//,"").includes("/"))return!0}catch{}return!1}function isURL(input){return!!input&&"string"==typeof input&&!!input.trim().match(/^(http|capacitor|https):\/\/[\w*.-]+[\w*.-]+[\w\-._~:/?#[\]@%!$&'()*+,;=]+$/)}function isExternalLink(input){return!!input&&"string"==typeof input&&!!input.trim().match(/^(https?:|mailto:)/)}function isEmail(string){return!!string&&!!string.match?.(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)}function truncate(str,maxLength){return str.length>maxLength?str.slice(0,maxLength-1)+"...":str}function eventToDescription(event){let shortForm=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(["$pageview","$pageleave"].includes(event.event)){var _ref3,_event$properties$$pa;return null!==(_ref3=null!==(_event$properties$$pa=event.properties.$pathname)&&void 0!==_event$properties$$pa?_event$properties$$pa:event.properties.$current_url)&&void 0!==_ref3?_ref3:""}return"$autocapture"===event.event?autoCaptureEventToDescription(event,shortForm):event.event}let eventTypeToVerb={click:"clicked",change:"typed something into",submit:"submitted",touch:"touched a",value_changed:"changed value in",toggle:"toggled",menu_action:"pressed menu",swipe:"swiped",pinch:"pinched",pan:"panned",rotation:"rotated",long_press:"long pressed",scroll:"scrolled in"};function autoCaptureEventToDescription(event){let shortForm=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("$autocapture"!==event.event)return event.event;let getVerb=()=>eventTypeToVerb[event.properties.$event_type]||"interacted with",getTag=()=>{var _event$elements$0$tag;return event.elements?.[0]?.tag_name==="a"?"link":event.elements?.[0]?.tag_name==="img"?"image":null!==(_event$elements$0$tag=event.elements?.[0]?.tag_name)&&void 0!==_event$elements$0$tag?_event$elements$0$tag:"element"},getValue=()=>event.elements?.[0]?.text?`${shortForm?"":"with text "}"${event.elements[0].text}"`:event.elements?.[0]?.attributes?.["attr__aria-label"]?`${shortForm?"":"with aria label "}"${event.elements[0].attributes["attr__aria-label"]}"`:null;if(shortForm){var _getValue;return[getVerb(),null!==(_getValue=getValue())&&void 0!==_getValue?_getValue:getTag()].filter(x=>x).join(" ")}let value=getValue();return[getVerb(),getTag(),value].filter(x=>x).join(" ")}let DATE_FORMAT="MMMM D, YYYY",formatDate=(date,format)=>date.format(null!=format?format:DATE_FORMAT),formatDateTime=(date,format)=>date.format(null!=format?format:"MMMM D, YYYY HH:mm:ss"),formatDateRange=(dateFrom,dateTo,format)=>{let formatFrom=null!=format?format:DATE_FORMAT,formatTo=null!=format?format:DATE_FORMAT;return format&&format!==DATE_FORMAT||dateFrom.year()!==dateTo.year()||(formatFrom="MMMM D"),`${dateFrom.format(formatFrom)} - ${dateTo.format(formatTo)}`},dateMapping=[{key:_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__.Q2,values:[]},{key:"Today",values:["dStart"],getFormattedDate:date=>date.startOf("d").format(DATE_FORMAT),defaultInterval:"hour"},{key:"Yesterday",values:["-1dStart","-1dEnd"],getFormattedDate:date=>date.subtract(1,"d").format(DATE_FORMAT),defaultInterval:"hour"},{key:"Last 24 hours",values:["-24h"],getFormattedDate:date=>formatDateRange(date.subtract(24,"h"),date.endOf("d")),defaultInterval:"hour"},{key:"Last 48 hours",values:["-48h"],getFormattedDate:date=>formatDateRange(date.subtract(48,"h"),date.endOf("d")),inactive:!0,defaultInterval:"hour"},{key:"Last 7 days",values:["-7d"],getFormattedDate:date=>formatDateRange(date.subtract(7,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 14 days",values:["-14d"],getFormattedDate:date=>formatDateRange(date.subtract(14,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 30 days",values:["-30d"],getFormattedDate:date=>formatDateRange(date.subtract(30,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 90 days",values:["-90d"],getFormattedDate:date=>formatDateRange(date.subtract(90,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 180 days",values:["-180d"],getFormattedDate:date=>formatDateRange(date.subtract(180,"d"),date.endOf("d")),defaultInterval:"month"},{key:"This month",values:["mStart"],getFormattedDate:date=>formatDateRange(date.startOf("month"),date.endOf("month")),defaultInterval:"day"},{key:"Previous month",values:["-1mStart","-1mEnd"],getFormattedDate:date=>formatDateRange(date.subtract(1,"month").startOf("month"),date.subtract(1,"month").endOf("month")),inactive:!0,defaultInterval:"day"},{key:"Year to date",values:["yStart"],getFormattedDate:date=>formatDateRange(date.startOf("y"),date.endOf("d")),defaultInterval:"month"},{key:"All time",values:["all"],defaultInterval:"month"}],isDate=/([0-9]{4}-[0-9]{2}-[0-9]{2})/,dateOptionsMap={y:"year",q:"quarter",m:"month",w:"week",d:"day",h:"hour"};function dateFilterToText(dateFrom,dateTo,defaultValue){let dateOptions=arguments.length>3&&void 0!==arguments[3]?arguments[3]:dateMapping,isDateFormatted=arguments.length>4&&void 0!==arguments[4]&&arguments[4],dateFormat=arguments.length>5&&void 0!==arguments[5]?arguments[5]:DATE_FORMAT,startOfRange=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(dateFrom)&&lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(dateTo))return formatDateRange(dateFrom,dateTo,dateFormat);if(dateFrom=dateFrom||void 0,dateTo=dateTo||void 0,isDate.test(dateFrom||"")&&isDate.test(dateTo||""))return isDateFormatted?formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom,"YYYY-MM-DD"),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateTo,"YYYY-MM-DD")):`${dateFrom} - ${dateTo}`;if(isDate.test(dateFrom||"")&&!isDate.test(dateTo||"")){let days=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().diff((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),"days");return days>366?isDateFormatted?`${dateFrom} - today`:formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)()):days>0?isDateFormatted?formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)()):`Last ${days} days`:0===days?isDateFormatted?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom).format(dateFormat):"Today":isDateFormatted?`${(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom).format(dateFormat)} - `:`Starting from ${dateFrom}`}for(let{key,values,getFormattedDate}of dateOptions)if(values[0]===dateFrom&&values[1]===dateTo&&key!==_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__.Q2)return isDateFormatted&&getFormattedDate?getFormattedDate((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(),dateFormat):key;if(dateFrom){let dateOption=dateOptionsMap[dateFrom.slice(-1)],counter=parseInt(dateFrom.slice(1,-1));if(dateOption&&counter){let date=null;switch(dateOption){case"year":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"y");break;case"hour":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"h");break;case"quarter":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(3*counter,"M");break;case"month":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"M");break;case"week":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(7*counter,"d");break;default:date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"d")}return isDateFormatted?formatDateRange(date,(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().endOf("d")):startOfRange?formatDate(date,dateFormat):`Last ${counter} ${dateOption}${counter>1?"s":""}`}}return defaultValue}function dateFromToText(dateFrom){let dateOption=dateOptionsMap[dateFrom.slice(-1)],counter=parseInt(dateFrom.slice(1,-1));if(dateOption&&counter)return`${counter} ${dateOption}${counter>1?"s":""}`}function dateStringToComponents(date){if(!date)return null;let matches=date.match(/^([-+]?)([0-9]*)([hdwmqy])(|Start|End)$/);if(!matches)return null;let[,sign,rawAmount,rawUnit,clip]=matches,amount=rawAmount?parseInt(sign+rawAmount):0,unit=dateOptionsMap[rawUnit]||"day";return{amount,unit,clip:clip}}function dateStringToDayJs(date){let response;if(isDate.test(date||""))return(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(date);let dateComponents=dateStringToComponents(date);if(!dateComponents)return null;let{unit,amount,clip}=dateComponents;switch(unit){case"year":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"year");break;case"quarter":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(3*amount,"month");break;case"month":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"month");break;case"week":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(7*amount,"day");break;case"day":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"day");break;case"hour":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"hour");break;default:throw new UnexpectedNeverError(unit)}return"Start"===clip?response.startOf(unit):"End"===clip?response.endOf(unit):response.startOf("day")}let getDefaultInterval=(dateFrom,dateTo)=>{for(let mapping of dateMapping){var _mapping$values$,_mapping$values$2;let mappingFrom=null!==(_mapping$values$=mapping.values[0])&&void 0!==_mapping$values$?_mapping$values$:null,mappingTo=null!==(_mapping$values$2=mapping.values[1])&&void 0!==_mapping$values$2?_mapping$values$2:null;if(mappingFrom===dateFrom&&mappingTo===dateTo&&mapping.defaultInterval)return mapping.defaultInterval}let parsedDateFrom=dateStringToComponents(dateFrom),parsedDateTo=dateStringToComponents(dateTo);if(parsedDateFrom?.unit==="hour"||parsedDateTo?.unit==="hour")return"hour";if(parsedDateFrom?.unit==="day"||parsedDateTo?.unit==="day"||"mStart"===dateFrom)return"day";if(parsedDateFrom?.unit==="month"||parsedDateTo?.unit==="month"||parsedDateFrom?.unit==="quarter"||parsedDateTo?.unit==="quarter"||parsedDateFrom?.unit==="year"||parsedDateTo?.unit==="year"||"all"===dateFrom)return"month";let dateFromDayJs=dateStringToDayJs(dateFrom),dateToDayJs=dateStringToDayJs(dateTo),intervalMonths=dateFromDayJs?.diff(dateToDayJs,"month");if(null!=intervalMonths&&Math.abs(intervalMonths)>=2)return"month";let intervalDays=dateFromDayJs?.diff(dateToDayJs,"day");if(null!=intervalDays&&Math.abs(intervalDays)>=14)return"week";if(null!=intervalDays&&Math.abs(intervalDays)>=2)return"day";let intervalHours=dateFromDayJs?.diff(dateToDayJs,"hour");return null!=intervalHours&&Math.abs(intervalHours)>=1?"hour":"day"},areDatesValidForInterval=(interval,oldDateFrom,oldDateTo)=>{let parsedOldDateFrom=dateStringToDayJs(oldDateFrom),parsedOldDateTo=dateStringToDayJs(oldDateTo)||(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)();if("all"===oldDateFrom||!parsedOldDateFrom)return"month"===interval;if("month"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"month")>=2;if("week"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"week")>=2;if("day"===interval){let diff=parsedOldDateTo.diff(parsedOldDateFrom,"day");return diff>=2}if("hour"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"hour")>=2&&336>parsedOldDateTo.diff(parsedOldDateFrom,"hour");if("minute"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"minute")>=2&&720>parsedOldDateTo.diff(parsedOldDateFrom,"minute");throw new UnexpectedNeverError(interval)},defaultDatesForInterval={minute:{dateFrom:"-1h",dateTo:null},hour:{dateFrom:"-24h",dateTo:null},day:{dateFrom:"-7d",dateTo:null},week:{dateFrom:"-28d",dateTo:null},month:{dateFrom:"-6m",dateTo:null}},updateDatesWithInterval=(interval,oldDateFrom,oldDateTo)=>areDatesValidForInterval(interval,oldDateFrom,oldDateTo)?{dateFrom:oldDateFrom,dateTo:oldDateTo}:defaultDatesForInterval[interval];function is12HoursOrLess(dateFrom){return!!dateFrom&&-1!=dateFrom.search(/^-([0-9]|1[0-2])h$/)}function isLessThan2Days(dateFrom){return!!dateFrom&&-1!=dateFrom.search(/^-(4[0-7]|[0-3]?[0-9])h|[1-2]d$/)}function clamp(value,min,max){return value>max?max:value1&&void 0!==arguments[1]?arguments[1]:"sentence",words=[],currentWord="";return String(identifier).trim().split("").forEach(character=>{"_"===character||"-"===character?(currentWord&&words.push(currentWord),currentWord=""):character===character.toLowerCase()&&(!"0123456789".includes(character)||currentWord&&"0123456789".includes(currentWord[currentWord.length-1]))?currentWord+=character:(currentWord&&words.push(currentWord),currentWord=character.toLowerCase())}),currentWord&&words.push(currentWord),capitalizeFirstLetter(words.map(word=>"sentence"===caseType?word:capitalizeFirstLetter(word)).join(" "))}function parseGithubRepoURL(url){let match=url.match(/^https?:\/\/(?:www\.)?github\.com\/([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)(\/(commit|tree|releases\/tag)\/([A-Za-z0-9_.\-/]+))?/);if(!match)throw Error(`${url} is not a valid GitHub URL`);let[,user,repo,,type,path]=match;return{user,repo,type,path}}function hashCodeForString(s){let hash=0;if(0===s.trim().length)return hash;for(let i=0;i3)||void 0===arguments[3]||arguments[3];plural||(plural=singular+"s");let form=1===count?singular:plural;return includeNumber?`${humanFriendlyNumber(count)}\xa0${form}`:form}let COMPACT_NUMBER_MAGNITUDES=["","K","M","B","T","P","E","Z","Y"];function compactNumber(value){if(null===value)return"-";value=parseFloat(value.toPrecision(3));let magnitude=0;for(;Math.abs(value)>=1e3;)magnitude++,value/=1e3;return magnitude>0?`${value}\xa0${COMPACT_NUMBER_MAGNITUDES[magnitude]}`:value.toString()}function roundToDecimal(value){let places=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return null===value?"-":(Math.round(100*value)/100).toFixed(places)}function sortedKeys(object){let newObject={};for(let key of Object.keys(object).sort())newObject[key]=object[key];return newObject}let alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");function shortTimeZone(timeZone,atDate){let date=atDate?new Date(atDate):new Date;try{let localeTimeStringParts=date.toLocaleTimeString("en-us",{timeZoneName:"short",timeZone:timeZone||void 0}).replace("GMT","UTC").split(" ");return localeTimeStringParts[localeTimeStringParts.length-1]}catch(e){return _sentry_react__WEBPACK_IMPORTED_MODULE_7__.Tb(e),null}}function humanList(arr){return arr.length>2?arr.slice(0,-1).join(", ")+", and "+arr.at(-1):arr.join(" and ")}function resolveWebhookService(webhookUrl){for(let[service,domain]of Object.entries(lib_constants__WEBPACK_IMPORTED_MODULE_1__.dA))if(webhookUrl.includes(domain+"/"))return service;return"your webhook service"}function hexToRGB(hex){let originalString=hex.trim(),hasPoundSign="#"===originalString[0],originalColor=hasPoundSign?originalString.slice(1):originalString;if(3===originalColor.length&&(originalColor=originalColor.split("").map(c=>c+c).join("")),6!==originalColor.length)return console.warn(`Incorrectly formatted color string: ${hex}.`),{r:0,g:0,b:0};let originalBase16=parseInt(originalColor,16);return{r:originalBase16>>16,g:originalBase16>>8&255,b:255&originalBase16}}function hexToRGBA(hex){let alpha=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{r,g,b}=hexToRGB(hex);return`rgba(${[r,g,b,alpha].join(",")})`}function RGBToHex(rgb){let rgbValues=rgb.replace("rgb(","").replace(")","").split(",").map(Number);return`#${rgbValues.map(val=>val.toString(16).padStart(2,"0")).join("")}`}function RGBToRGBA(rgb,a){let[r,g,b]=rgb.slice(4,rgb.length-1).split(",");return`rgba(${[r,g,b,a].join(",")})`}function lightenDarkenColor(hex,pct){function output(val){return Math.max(0,Math.min(255,val))}let amt=Math.round(2.55*pct),{r,g,b}=hexToRGB(hex);return r=output(r+amt),g=output(g+amt),b=output(b+amt),`rgb(${[r,g,b].join(",")})`}let BRAND_BLUE_HSL=[228,100,56],PURPLE=[260,88,71];function gradateColor(hsl,strength){let floor=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return`hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, ${(floor+(1-floor)*strength).toPrecision(3)})`}function toString(input){return input?.toString()||""}function average(input){return Math.round(input.reduce((acc,val)=>acc+val,0)/input.length*10)/10}function median(input){let sorted=[...input].sort((a,b)=>a-b),half=Math.floor(sorted.length/2);return sorted.length%2?sorted[half]:average([sorted[half-1],sorted[half]])}function sum(input){return input.reduce((a,b)=>a+b,0)}function tryJsonParse(value,fallback){try{return JSON.parse(value)}catch(error){return fallback}}function ensureStringIsNotBlank(s){return"string"==typeof s&&""!==s.trim()?s:null}function isMultiSeriesFormula(formula){if(!formula)return!1;let count=(formula.match(/[a-zA-Z]/g)||[]).length;return count>1}function ceilMsToClosestSecond(ms){return 1e3*Math.ceil(ms/1e3)}function findLastIndex(array,predicate){let l=array.length;for(;l--;)if(predicate(array[l],l,array))return l;return -1}function isGroupType(actor){return"group"===actor.type}function getEventNamesForAction(actionId,allActions){let id=parseInt(String(actionId));return allActions.filter(a=>a.id===id).flatMap(a=>a.steps?.filter(step=>step.event).map(step=>String(step.event)))}let isUserLoggedIn=()=>!_utils_getAppContext__WEBPACK_IMPORTED_MODULE_5__.Fj()?.anonymous;function isNumeric(x){return"number"==typeof x||"string"==typeof x&&!isNaN(Number(x))&&!isNaN(parseFloat(x))}function isNotNil(arg){return null!=arg}class UnexpectedNeverError extends Error{constructor(x,message){super(message=null!=message?message:"Unexpected never: "+String(x));let actualProto=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,actualProto)}}function promiseResolveReject(){let resolve,reject;let promise=new Promise((innerResolve,innerReject)=>{resolve=innerResolve,reject=innerReject});return{resolve:resolve,reject:reject,promise}}function calculateDays(timeValue,timeUnit){return timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Year?365*timeValue:timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Month?30*timeValue:timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Week?7*timeValue:timeValue}function range(startOrEnd,end){let length=startOrEnd,start=0;return"number"==typeof end&&(length=end-(start=startOrEnd)),Array.from({length},(_,i)=>i+start)}function downloadFile(file){let link=document.createElement("a");link.style.display="none",link.href=URL.createObjectURL(file),link.download=file.name,document.body.appendChild(link),link.click(),setTimeout(()=>{URL.revokeObjectURL(link.href),link?.parentNode?.removeChild(link)},0)}function inStorybookTestRunner(){return navigator.userAgent.includes("StorybookTestRunner")}function inStorybook(){return"__STORYBOOK_CLIENT_API__"in window}function shouldCancelQuery(error){return isAbortedRequest(error)||504===error.status}function isAbortedRequest(error){return"AbortError"===error.name||error.message?.name==="AbortError"}let shouldIgnoreInput=e=>["input","textarea"].includes(e.target.tagName.toLowerCase())||e.target.isContentEditable||e.target.parentElement?.isContentEditable||!1,base64Encode=str=>{let data=new TextEncoder().encode(str),binString=Array.from(data,byte=>String.fromCharCode(byte)).join("");return btoa(binString)},base64Decode=encodedString=>{let data=base64ToUint8Array(encodedString);return new TextDecoder().decode(data)},base64ArrayBuffer=encodedString=>{let data=base64ToUint8Array(encodedString);return data.buffer},base64ToUint8Array=encodedString=>{let binString=atob(encodedString),data=new Uint8Array(binString.length);for(let i=0;ifunc(...args),waitFor)}}},"./frontend/src/lib/utils/apiHost.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function apiHostOrigin(){let appOrigin=window.location.origin;return"https://us.posthog.com"===appOrigin?"https://us.i.posthog.com":"https://eu.posthog.com"===appOrigin?"https://eu.i.posthog.com":appOrigin}function liveEventsHostOrigin(){let appOrigin=window.location.origin;return"https://us.posthog.com"===appOrigin?"https://live.us.posthog.com":"https://eu.posthog.com"===appOrigin?"https://live.eu.posthog.com":"https://app.dev.posthog.dev"===appOrigin?"https://live.dev.posthog.dev":"http://localhost:8666"}__webpack_require__.d(__webpack_exports__,{K:()=>liveEventsHostOrigin,Y:()=>apiHostOrigin})},"./frontend/src/lib/utils/copyToClipboard.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>copyToClipboard});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");async function copyToClipboard(value){let description=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";if(!navigator.clipboard)return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.warning("Oops! Clipboard capabilities are only available over HTTPS or on localhost"),!1;try{return await navigator.clipboard.writeText(value),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.info(`Copied ${description} to clipboard`,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCopy,{})}),!0}catch(e){try{let textArea=document.createElement("textarea");return textArea.value=value,document.body.appendChild(textArea),textArea.select(),document.execCommand("copy"),document.body.removeChild(textArea),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.info(`Copied ${description} to clipboard`,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCopy,{})}),!0}catch(err){return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.error(`Could not copy ${description} to clipboard: ${err}`),!1}}}},"./frontend/src/lib/utils/cssEscape.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */function cssEscape(string){let codeUnit;let length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);for(;++index=1&&codeUnit<=31||127==codeUnit||0==index&&codeUnit>=48&&codeUnit<=57||1==index&&codeUnit>=48&&codeUnit<=57&&45==firstCodeUnit){result+="\\"+codeUnit.toString(16)+" ";continue}if(0==index&&1==length&&45==codeUnit){result+="\\"+string.charAt(index);continue}if(codeUnit>=128||45==codeUnit||95==codeUnit||codeUnit>=48&&codeUnit<=57||codeUnit>=65&&codeUnit<=90||codeUnit>=97&&codeUnit<=122){result+=string.charAt(index);continue}result+="\\"+string.charAt(index)}return result}__webpack_require__.d(__webpack_exports__,{Q:()=>cssEscape})},"./frontend/src/lib/utils/deleteWithUndo.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>deleteWithUndo,c:()=>deleteInsightWithUndo});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");async function deleteWithUndo(_ref){let{undo=!1,...props}=_ref;await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.update(`api/${props.endpoint}/${props.object[props.idField||"id"]}`,{...props.object,deleted:!undo}),props.callback?.(undo,props.object),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ[undo?"success":"info"]((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b",{children:props.object.name||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i",{children:props.object.derived_name||"Unnamed"})})," has been"," ",undo?"restored":"deleted"]}),{toastId:`delete-item-${props.object.id}-${undo}`,button:undo?void 0:{label:"Undo",action:()=>deleteWithUndo({undo:!0,...props})}})}async function deleteInsightWithUndo(_ref2){let{undo=!1,...props}=_ref2;await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.update(`api/${props.endpoint}/${props.object[props.idField||"id"]}`,{...props.object,deleted:!undo}),props.callback?.(undo,props.object),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ[undo?"success":"info"]((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b",{children:props.object.name||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i",{children:props.object.derived_name||"Unnamed"})})," has been"," ",undo?"restored":"deleted"]}),{toastId:`delete-item-${props.object.id}-${undo}`,button:undo?void 0:{label:"Undo",action:()=>deleteInsightWithUndo({undo:!0,...props})}})}},"./frontend/src/lib/utils/event-property-utls.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BM:()=>AutocapturePreviewImage,R3:()=>AutocaptureImageTab,Uq:()=>autocaptureToImage});var lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function autocaptureToImage(elements){let find=elements.find(el=>"img"===el.tag_name),image={src:find?.attributes?.attr__src,width:find?.attributes?.attr__width,height:find?.attributes?.attr__height};return image.src?image:null}function AutocaptureImage(_ref){let{img}=_ref;return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"flex bg-bg-3000 items-center justify-center relative border-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"ImagePreview__background absolute h-full w-full"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img",{className:"relative z-10 max-h-100 object-contain",src:img.src,alt:"Autocapture image src",height:img.height||"auto",width:img.width||"auto"})]}):null}function AutocaptureImageTab(_ref2){let{elements}=_ref2,img=autocaptureToImage(elements);return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"flex bg-bg-3000 items-center justify-center relative border-2 w-full",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(AutocaptureImage,{img:img})}):null}function AutocapturePreviewImage(_ref3){let{elements,imgPreviewHeight="40"}=_ref3,img=autocaptureToImage(elements);return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__.u,{title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(AutocaptureImage,{img:img}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img",{className:"max-h-10",src:img.src,alt:"Autocapture image src",height:imgPreviewHeight,width:"auto"})}):null}},"./frontend/src/lib/utils/eventUsageLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{GU:()=>DashboardEventSource,Tu:()=>GraphSeriesAddedSource,sR:()=>InsightEventSource,vx:()=>eventUsageLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),utils=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts"),UniversalFilters_utils=__webpack_require__("./frontend/src/lib/components/UniversalFilters/utils.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),lib_utils=__webpack_require__("./frontend/src/lib/utils.tsx"),dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),sharedUtils=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),defineProperty=__webpack_require__("./node_modules/.pnpm/@babel+runtime@7.24.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");class EventIndex{constructor(events){(0,defineProperty.Z)(this,"events",void 0),(0,defineProperty.Z)(this,"baseTime",void 0),(0,defineProperty.Z)(this,"_filterByCaches",void 0),(0,defineProperty.Z)(this,"getDuration",()=>this.events.length>0?this.events[this.events.length-1].timestamp-this.events[0].timestamp:0),(0,defineProperty.Z)(this,"getRecordingScreenMetadata",playerTime=>findCurrent(playerTime,this.recordingScreenMetadata())),(0,defineProperty.Z)(this,"pageChangeEvents",()=>this._filterBy("href",event=>{let eventData=event.data;return eventData?.href?{href:event.data.href,playerTime:event.timestamp-this.baseTime}:5===event.type&&"$pageview"===event.data.tag?{href:event.data.payload.href,playerTime:event.timestamp-this.baseTime}:null})),(0,defineProperty.Z)(this,"recordingScreenMetadata",()=>this._filterBy("resolution",event=>{let eventData=event.data;if(eventData?.width&&eventData?.height){let{width,height}=eventData;return{resolution:`${width} x ${height}`,height:height,width:width,playerTime:event.timestamp-this.baseTime}}return null})),(0,defineProperty.Z)(this,"_filterBy",(dataKey,transformer)=>{if(!this._filterByCaches[dataKey]){let lastValueKey;this._filterByCaches[dataKey]=this.events.map(transformer).filter(value=>!!value&&value[dataKey]!==lastValueKey&&(lastValueKey=value[dataKey],!0))}return this._filterByCaches[dataKey]}),this.events=events,this.baseTime=events.length>0?events[0].timestamp:0,this._filterByCaches={}}}let findCurrent=(playerTime,events)=>{let index=events.findIndex(event=>event.playerTime>playerTime);return 0===index?[events[0],0]:-1===index?(index=events.length-1,[events[index],index]):[events[index-1],index-1]};var session_recordings_utils=__webpack_require__("./frontend/src/scenes/session-recordings/utils.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let DashboardEventSource=function(DashboardEventSource){return DashboardEventSource.LongPress="long_press",DashboardEventSource.MoreDropdown="more_dropdown",DashboardEventSource.DashboardHeaderSaveDashboard="dashboard_header_save_dashboard",DashboardEventSource.DashboardHeaderDiscardChanges="dashboard_header_discard_changes",DashboardEventSource.DashboardHeaderExitFullscreen="dashboard_header_exit_fullscreen",DashboardEventSource.Hotkey="hotkey",DashboardEventSource.InputEnter="input_enter",DashboardEventSource.Toast="toast",DashboardEventSource.Browser="browser",DashboardEventSource.AddDescription="add_dashboard_description",DashboardEventSource.MainNavigation="main_nav",DashboardEventSource.DashboardsList="dashboards_list",DashboardEventSource}({}),InsightEventSource=function(InsightEventSource){return InsightEventSource.LongPress="long_press",InsightEventSource.MoreDropdown="more_dropdown",InsightEventSource.InsightHeader="insight_header",InsightEventSource.Hotkey="hotkey",InsightEventSource.InputEnter="input_enter",InsightEventSource.Toast="toast",InsightEventSource.Browser="browser",InsightEventSource.AddDescription="add_insight_description",InsightEventSource}({}),GraphSeriesAddedSource=function(GraphSeriesAddedSource){return GraphSeriesAddedSource.Default="default",GraphSeriesAddedSource.Duplicate="duplicate",GraphSeriesAddedSource}({});function flattenProperties(properties){let output=[];for(let prop of properties||[])prop.key&&(0,taxonomy.jA)(prop.key)?output.push(prop.key):output.push("redacted");return output}function hasGroupProperties(properties){let flattenedProperties=(0,utils.Y4)(properties);return!!flattenedProperties&&flattenedProperties.some(property=>(0,utils.lv)(property)&&void 0!==property.group_type_index)}function sanitizeFilterParams(filters){let{interval,date_from,date_to,filter_test_accounts,insight}=filters,properties_local=[],properties=Array.isArray(filters.properties)?filters.properties:[],events=Array.isArray(filters.events)?filters.events:[],actions=Array.isArray(filters.actions)?filters.actions:[],entities=events.concat(actions),aggregating_by_groups=void 0!=filters.aggregation_group_type_index,breakdown_by_groups=void 0!=filters.breakdown_group_type_index,using_groups=hasGroupProperties(filters.properties),used_cohort_filter_ids=function(properties){let flattenedProperties=(0,utils.Y4)(properties)||[],cohortIds=flattenedProperties.filter(p=>"cohort"===p.type).map(p=>p.value).filter(a=>!!a);return cohortIds||[]}(filters.properties);for(let entity of entities){let entityProperties=Array.isArray(entity.properties)?entity.properties:[];properties_local=properties_local.concat(flattenProperties(entityProperties)),using_groups=using_groups||hasGroupProperties(entityProperties),void 0!=entity.math_group_type_index&&(aggregating_by_groups=!0)}let properties_global=flattenProperties(properties);return{display:(0,sharedUtils.dn)(filters)?filters.display:void 0,interval,date_from,date_to,filter_test_accounts,formula:(0,sharedUtils.pM)(filters)?filters.formula:void 0,filters_count:properties?.length||0,events_count:events?.length||0,actions_count:actions?.length||0,funnel_viz_type:(0,sharedUtils.e1)(filters)?filters.funnel_viz_type:void 0,funnel_from_step:(0,sharedUtils.e1)(filters)?filters.funnel_from_step:void 0,funnel_to_step:(0,sharedUtils.e1)(filters)?filters.funnel_to_step:void 0,properties_global,properties_global_custom_count:properties_global.filter(item=>"custom"===item).length,properties_local,properties_local_custom_count:properties_local.filter(item=>"custom"===item).length,properties_all:properties_global.concat(properties_local),aggregating_by_groups,breakdown_by_groups,using_groups:using_groups||aggregating_by_groups||breakdown_by_groups,used_cohort_filter_ids,insight}}function sanitizeQuery(query){let payload={query_kind:query?.kind,query_source_kind:(0,queries_utils.gV)(query)?query.source.kind:void 0};if((0,queries_utils.KN)(query)||(0,queries_utils.Yg)(query)){let querySource=(0,queries_utils.KN)(query)?query.source:query,{dateRange,filterTestAccounts,samplingFactor,properties}=querySource;payload.date_from=dateRange?.date_from||void 0,payload.date_to=dateRange?.date_to||void 0,payload.interval=(0,queries_utils.ZS)(querySource),payload.samplingFactor=samplingFactor||void 0,payload.series_length=queries_utils.gU(querySource)?.length,payload.event_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.cT(e)).length,payload.action_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.VU(e)).length,payload.data_warehouse_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.oX(e)).length,payload.has_data_warehouse_series=!!queries_utils.gU(querySource)?.find(e=>queries_utils.oX(e)),payload.has_properties=!!properties,payload.filter_test_accounts=filterTestAccounts,payload.breakdown_type=queries_utils.Km(querySource)?.breakdown_type||void 0,payload.breakdown_limit=queries_utils.Km(querySource)?.breakdown_limit||void 0,payload.breakdown_hide_other_aggregation=queries_utils.Km(querySource)?.breakdown_hide_other_aggregation||void 0,payload.has_formula=!!(0,queries_utils.pT)(querySource),payload.display=(0,queries_utils.nI)(querySource),payload.compare=queries_utils.lC(querySource)?.compare,payload.compare_to=queries_utils.lC(querySource)?.compare_to,payload.funnel_viz_type=(0,queries_utils.Wl)(querySource)?querySource.funnelsFilter?.funnelVizType:void 0,payload.funnel_order_type=(0,queries_utils.Wl)(querySource)?querySource.funnelsFilter?.funnelOrderType:void 0}return(0,lib_utils.hO)(payload)}let eventUsageLogic=(0,index_esm.kea)([(0,index_esm.path)(["lib","utils","eventUsageLogic"]),(0,index_esm.connect)(()=>({values:[preflightLogic.preflightLogic,["realm"],userLogic.userLogic,["user"]]})),(0,index_esm.actions)({reportPersonDetailViewed:person=>({person}),reportPersonsModalViewed:params=>({params}),reportTimeToSeeData:payload=>({payload}),reportInsightCreated:query=>({query}),reportInsightSaved:(query,isNewInsight)=>({query,isNewInsight}),reportInsightViewed:(insightModel,query,isFirstLoad,delay)=>({insightModel,query,isFirstLoad,delay}),reportFunnelCalculated:(eventCount,actionCount,interval,funnelVizType,success,error)=>({eventCount,actionCount,interval,funnelVizType,success,error}),reportFunnelStepReordered:!0,reportInsightFilterRemoved:index=>({index}),reportInsightFilterAdded:(newLength,source)=>({newLength,source}),reportInsightFilterSet:filters=>({filters}),reportEntityFilterVisibilitySet:(index,visible)=>({index,visible}),reportInsightsTableCalcToggled:mode=>({mode}),reportPropertyGroupFilterAdded:!0,reportChangeOuterPropertyGroupFiltersType:(type,groupsLength)=>({type,groupsLength}),reportChangeInnerPropertyGroupFiltersType:(type,filtersLength)=>({type,filtersLength}),reportCorrelationViewed:(query,delay,propertiesTable)=>({query,delay,propertiesTable}),reportCorrelationInteraction:(correlationType,action,props)=>({correlationType,action,props}),reportCorrelationAnalysisFeedback:rating=>({rating}),reportCorrelationAnalysisDetailedFeedback:(rating,comments)=>({rating,comments}),reportBookmarkletDragged:!0,reportProjectCreationSubmitted:(projectCount,nameLength)=>({projectCount,nameLength}),reportProjectNoticeDismissed:key=>({key}),reportPersonPropertyUpdated:(action,totalProperties,oldPropertyType,newPropertyType)=>({action,totalProperties,oldPropertyType,newPropertyType}),reportDashboardViewed:(dashboard,lastRefreshed,delay)=>({dashboard,delay,lastRefreshed}),reportDashboardModeToggled:(mode,source)=>({mode,source}),reportDashboardRefreshed:(dashboardId,lastRefreshed)=>({dashboardId,lastRefreshed}),reportDashboardDateRangeChanged:(dateFrom,dateTo)=>({dateFrom,dateTo}),reportDashboardPropertiesChanged:!0,reportDashboardPinToggled:(pinned,source)=>({pinned,source}),reportDashboardFrontEndUpdate:(attribute,originalLength,newLength)=>({attribute,originalLength,newLength}),reportDashboardShareToggled:isShared=>({isShared}),reportUpgradeModalShown:featureName=>({featureName}),reportTimezoneComponentViewed:(component,project_timezone,device_timezone)=>({component,project_timezone,device_timezone}),reportTestAccountFiltersUpdated:filters=>({filters}),reportPoEModeUpdated:mode=>({mode}),reportPersonsJoinModeUpdated:mode=>({mode}),reportBounceRatePageViewModeUpdated:mode=>({mode}),reportSessionTableVersionUpdated:version=>({version}),reportCustomChannelTypeRulesUpdated:numRules=>({numRules}),reportPropertySelectOpened:!0,reportCreatedDashboardFromModal:!0,reportSavedInsightToDashboard:!0,reportRemovedInsightFromDashboard:!0,reportSavedInsightTabChanged:tab=>({tab}),reportSavedInsightFilterUsed:filterKeys=>({filterKeys}),reportSavedInsightLayoutChanged:layout=>({layout}),reportSavedInsightNewInsightClicked:insightType=>({insightType}),reportPersonSplit:merge_count=>({merge_count}),reportRecording:(playerData,durations,type,metadata,delay)=>({playerData,durations,type,delay,metadata}),reportHelpButtonViewed:!0,reportHelpButtonUsed:help_type=>({help_type}),reportRecordingsListFetched:(loadTime,filters,defaultDurationFilter)=>({loadTime,filters,defaultDurationFilter}),reportRecordingsListPropertiesFetched:loadTime=>({loadTime}),reportRecordingsListFilterAdded:filterType=>({filterType}),reportRecordingPlayerSeekbarEventHovered:!0,reportRecordingInspectorItemExpanded:(tab,index)=>({tab,index}),reportRecordingInspectorMiniFilterViewed:(minifilterKey,enabled)=>({minifilterKey,enabled}),reportNextRecordingTriggered:automatic=>({automatic}),reportRecordingExportedToFile:!0,reportRecordingLoadedFromFile:data=>data,reportRecordingListVisibilityToggled:(type,visible)=>({type,visible}),reportRecordingPinnedToList:pinned=>({pinned}),reportRecordingPlaylistCreated:source=>({source}),reportExperimentArchived:experiment=>({experiment}),reportExperimentReset:experiment=>({experiment}),reportExperimentCreated:experiment=>({experiment}),reportExperimentViewed:experiment=>({experiment}),reportExperimentLaunched:(experiment,launchDate)=>({experiment,launchDate}),reportExperimentStartDateChange:(experiment,newStartDate)=>({experiment,newStartDate}),reportExperimentCompleted:(experiment,endDate,duration,significant)=>({experiment,endDate,duration,significant}),reportExperimentExposureCohortCreated:(experiment,cohort)=>({experiment,cohort}),reportExperimentExposureCohortEdited:(existingCohort,newCohort)=>({existingCohort,newCohort}),reportExperimentInsightLoadFailed:!0,reportExperimentVariantShipped:experiment=>({experiment}),reportExperimentVariantScreenshotUploaded:experimentId=>({experimentId}),reportExperimentResultsLoadingTimeout:experimentId=>({experimentId}),reportExperimentReleaseConditionsViewed:experimentId=>({experimentId}),reportExperimentReleaseConditionsUpdated:experimentId=>({experimentId}),reportExperimentHoldoutCreated:holdout=>({holdout}),reportExperimentHoldoutAssigned:_ref=>{let{experimentId,holdoutId}=_ref;return{experimentId,holdoutId}},reportDataManagementDefinitionHovered:type=>({type}),reportDataManagementDefinitionClickView:type=>({type}),reportDataManagementDefinitionClickEdit:type=>({type}),reportDataManagementDefinitionSaveSucceeded:(type,loadTime)=>({type,loadTime}),reportDataManagementDefinitionSaveFailed:(type,loadTime,error)=>({type,loadTime,error}),reportDataManagementDefinitionCancel:type=>({type}),reportDataManagementEventDefinitionsPageLoadSucceeded:(loadTime,resultsLength)=>({loadTime,resultsLength}),reportDataManagementEventDefinitionsPageLoadFailed:(loadTime,error)=>({loadTime,error}),reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded:loadTime=>({loadTime}),reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed:(loadTime,error)=>({loadTime,error}),reportDataManagementEventPropertyDefinitionsPageLoadSucceeded:(loadTime,resultsLength)=>({loadTime,resultsLength}),reportDataManagementEventPropertyDefinitionsPageLoadFailed:(loadTime,error)=>({loadTime,error}),reportInsightRefreshTime:(loadingMilliseconds,insightShortId)=>({loadingMilliseconds,insightShortId}),reportInsightOpenedFromRecentInsightList:!0,reportRecordingOpenedFromRecentRecordingList:!0,reportPersonOpenedFromNewlySeenPersonsList:!0,reportIngestionContinueWithoutVerifying:!0,reportAutocaptureToggled:autocapture_opt_out=>({autocapture_opt_out}),reportAutocaptureExceptionsToggled:autocapture_opt_in=>({autocapture_opt_in}),reportHeatmapsToggled:heatmaps_opt_in=>({heatmaps_opt_in}),reportFailedToCreateFeatureFlagWithCohort:(code,detail)=>({code,detail}),reportFeatureFlagCopySuccess:!0,reportFeatureFlagCopyFailure:error=>({error}),reportFeatureFlagScheduleSuccess:!0,reportFeatureFlagScheduleFailure:error=>({error}),reportInviteMembersButtonClicked:!0,reportDashboardLoadingTime:(loadingMilliseconds,dashboardId)=>({loadingMilliseconds,dashboardId}),reportInstanceSettingChange:(name,value)=>({name,value}),reportAxisUnitsChanged:properties=>({...properties}),reportTeamSettingChange:(name,value)=>({name,value}),reportProjectSettingChange:(name,value)=>({name,value}),reportActivationSideBarTaskClicked:key=>({key}),reportBillingUpgradeClicked:plan=>({plan}),reportBillingDowngradeClicked:plan=>({plan}),reportRoleCreated:role=>({role}),reportResourceAccessLevelUpdated:(resourceType,roleName,accessLevel)=>({resourceType,roleName,accessLevel}),reportRoleCustomAddedToAResource:(resourceType,rolesLength)=>({resourceType,rolesLength}),reportFlagsCodeExampleInteraction:optionType=>({optionType}),reportFlagsCodeExampleLanguage:language=>({language}),reportSurveyViewed:survey=>({survey}),reportSurveyCreated:(survey,isDuplicate)=>({survey,isDuplicate}),reportSurveyEdited:survey=>({survey}),reportSurveyArchived:survey=>({survey}),reportSurveyTemplateClicked:template=>({template}),reportSurveyCycleDetected:survey=>({survey}),reportProductUnsubscribed:product=>({product}),reportSubscribedDuringOnboarding:productKey=>({productKey}),reportCommandBarStatusChanged:status=>({status}),reportCommandBarSearch:queryLength=>({queryLength}),reportCommandBarSearchResultOpened:type=>({type}),reportCommandBarActionSearch:query=>({query}),reportCommandBarActionResultExecuted:resultDisplay=>({resultDisplay}),reportBillingCTAShown:!0}),(0,index_esm.listeners)(_ref2=>{let{values}=_ref2;return{reportBillingCTAShown:()=>{dist_module.ZP.capture("billing CTA shown")},reportAxisUnitsChanged:properties=>{dist_module.ZP.capture("axis units changed",properties)},reportInstanceSettingChange:_ref3=>{let{name,value}=_ref3;dist_module.ZP.capture("instance setting change",{name,value})},reportDashboardLoadingTime:async _ref4=>{let{loadingMilliseconds,dashboardId}=_ref4;dist_module.ZP.capture("dashboard loading time",{loadingMilliseconds,dashboardId})},reportInsightRefreshTime:async _ref5=>{let{loadingMilliseconds,insightShortId}=_ref5;dist_module.ZP.capture("insight refresh time",{loadingMilliseconds,insightShortId})},reportPersonDetailViewed:async(_ref6,breakpoint)=>{let{person}=_ref6;await breakpoint(500);let custom_properties_count=0,posthog_properties_count=0;for(let prop of Object.keys(person.properties))taxonomy.t_.includes(prop)?posthog_properties_count+=1:custom_properties_count+=1;let properties={properties_count:Object.keys(person.properties).length,has_email:!!person.properties.email,has_name:!!person.properties.name,custom_properties_count,posthog_properties_count};dist_module.ZP.capture("person viewed",properties)},reportTimeToSeeData:async _ref7=>{let{payload}=_ref7;dist_module.ZP.capture("time to see data",payload)},reportInsightCreated:async(_ref8,breakpoint)=>{let{query}=_ref8;await breakpoint(500),dist_module.ZP.capture("insight created",{query_kind:query?.kind,query_source_kind:(0,queries_utils.gV)(query)?query.source.kind:void 0})},reportInsightSaved:async _ref9=>{let{query,isNewInsight}=_ref9;dist_module.ZP.capture("insight saved",{...sanitizeQuery(query),is_new_insight:isNewInsight})},reportInsightViewed:_ref10=>{var _insightModel$descrip,_insightModel$tags$le;let{insightModel,query,isFirstLoad,delay}=_ref10,payload={report_delay:delay,is_first_component_load:isFirstLoad,viewer_is_creator:insightModel.created_by?.uuid&&values.user?.uuid?insightModel.created_by?.uuid===values.user?.uuid:void 0,is_saved:insightModel.saved,description_length:null!==(_insightModel$descrip=insightModel.description?.length)&&void 0!==_insightModel$descrip?_insightModel$descrip:0,tags_count:null!==(_insightModel$tags$le=insightModel.tags?.length)&&void 0!==_insightModel$tags$le?_insightModel$tags$le:0,...sanitizeQuery(query)},eventName=delay?"insight analyzed":"insight viewed";dist_module.ZP.capture(eventName,(0,lib_utils.hO)(payload))},reportPersonsModalViewed:async _ref11=>{let{params}=_ref11;dist_module.ZP.capture("insight person modal viewed",params)},reportDashboardViewed:async(_ref12,breakpoint)=>{let{dashboard,lastRefreshed,delay}=_ref12;delay||await breakpoint(500);let{created_at,is_shared,pinned,creation_mode,id}=dashboard,properties={created_at,is_shared,pinned,creation_mode,sample_items_count:0,item_count:dashboard.tiles?.length||0,created_by_system:!dashboard.created_by,dashboard_id:id,lastRefreshed:lastRefreshed?.toISOString(),refreshAge:lastRefreshed?(0,dayjs.zO)().diff(lastRefreshed,"seconds"):void 0};for(let item of dashboard.tiles||[])if(item.insight){let query=(0,queries_utils.gV)(item.insight.query)?item.insight.query.source:item.insight.query,key=`${query?.kind||item.text?"text":"empty"}_count`;properties[key]?properties[key]+=1:properties[key]=1,properties.sample_items_count+=item.insight.is_sample?1:0}else properties.text_tiles_count?properties.text_tiles_count+=1:properties.text_tiles_count=1;dist_module.ZP.capture(delay?"dashboard analyzed":"viewed dashboard",properties)},reportBookmarkletDragged:async(_,breakpoint)=>{await breakpoint(500),dist_module.ZP.capture("bookmarklet drag start")},reportProjectCreationSubmitted:async _ref13=>{let{projectCount,nameLength}=_ref13;dist_module.ZP.capture("project create submitted",{current_project_count:projectCount,name_length:nameLength})},reportProjectNoticeDismissed:async _ref14=>{let{key}=_ref14;dist_module.ZP.capture("demo warning dismissed",{warning_key:key})},reportFunnelCalculated:async _ref15=>{let{eventCount,actionCount,interval,funnelVizType,success,error}=_ref15;dist_module.ZP.capture("funnel result calculated",{event_count:eventCount,action_count:actionCount,total_count_actions_events:eventCount+actionCount,interval:interval,funnel_viz_type:funnelVizType,success:success,error:error})},reportFunnelStepReordered:async()=>{dist_module.ZP.capture("funnel step reordered")},reportPersonPropertyUpdated:async _ref16=>{let{action,totalProperties,oldPropertyType,newPropertyType}=_ref16;dist_module.ZP.capture(`person property ${action}`,{old_property_type:"undefined"!==oldPropertyType?oldPropertyType:void 0,new_property_type:"undefined"!==newPropertyType?newPropertyType:void 0,total_properties:totalProperties})},reportDashboardModeToggled:async _ref17=>{let{mode,source}=_ref17;dist_module.ZP.capture("dashboard mode toggled",{mode,source})},reportDashboardRefreshed:async _ref18=>{let{dashboardId,lastRefreshed}=_ref18;dist_module.ZP.capture("dashboard refreshed",{dashboard_id:dashboardId,last_refreshed:lastRefreshed?.toString(),refreshAge:lastRefreshed?(0,dayjs.zO)().diff(lastRefreshed,"seconds"):void 0})},reportDashboardDateRangeChanged:async _ref19=>{let{dateFrom,dateTo}=_ref19;dist_module.ZP.capture("dashboard date range changed",{date_from:dateFrom?.toString()||"Custom",date_to:dateTo?.toString()})},reportDashboardPropertiesChanged:async()=>{dist_module.ZP.capture("dashboard properties changed")},reportDashboardPinToggled:async payload=>{dist_module.ZP.capture("dashboard pin toggled",payload)},reportDashboardFrontEndUpdate:async _ref20=>{let{attribute,originalLength,newLength}=_ref20;dist_module.ZP.capture("dashboard frontend updated",{attribute,original_length:originalLength,new_length:newLength})},reportDashboardShareToggled:async _ref21=>{let{isShared}=_ref21;dist_module.ZP.capture("dashboard share toggled",{is_shared:isShared})},reportUpgradeModalShown:async payload=>{dist_module.ZP.capture("upgrade modal shown",payload)},reportTimezoneComponentViewed:async payload=>{dist_module.ZP.capture("timezone component viewed",payload)},reportTestAccountFiltersUpdated:async _ref22=>{let{filters}=_ref22,payload={filters_count:filters.length,filters:filters.map(filter=>({key:filter.key,operator:filter.operator,value_length:filter.value.length}))};dist_module.ZP.capture("test account filters updated",payload)},reportPoEModeUpdated:async _ref23=>{let{mode}=_ref23;dist_module.ZP.capture("persons on events mode updated",{mode})},reportPersonJoinModeUpdated:async _ref24=>{let{mode}=_ref24;dist_module.ZP.capture("persons join mode updated",{mode})},reportBounceRatePageViewModeUpdated:async _ref25=>{let{mode}=_ref25;dist_module.ZP.capture("bounce rate page view mode updated",{mode})},reportSessionTableVersionUpdated:async _ref26=>{let{version}=_ref26;dist_module.ZP.capture("session table version updated",{version})},reportCustomChannelTypeRulesUpdated:async _ref27=>{let{numRules}=_ref27;dist_module.ZP.capture("custom channel type rules updated",{numRules})},reportInsightFilterRemoved:async _ref28=>{let{index}=_ref28;dist_module.ZP.capture("local filter removed",{index})},reportInsightFilterAdded:async _ref29=>{let{newLength}=_ref29;dist_module.ZP.capture("filter added",{newLength})},reportInsightFilterSet:async _ref30=>{let{filters}=_ref30;dist_module.ZP.capture("filters set",{filters})},reportEntityFilterVisibilitySet:async _ref31=>{let{index,visible}=_ref31;dist_module.ZP.capture("entity filter visbility set",{index,visible})},reportPropertySelectOpened:async()=>{dist_module.ZP.capture("property select toggle opened")},reportCreatedDashboardFromModal:async()=>{dist_module.ZP.capture("created new dashboard from modal")},reportSavedInsightToDashboard:async()=>{dist_module.ZP.capture("saved insight to dashboard")},reportRemovedInsightFromDashboard:async()=>{dist_module.ZP.capture("removed insight from dashboard")},reportInsightsTableCalcToggled:async payload=>{dist_module.ZP.capture("insights table calc toggled",payload)},reportSavedInsightFilterUsed:_ref32=>{let{filterKeys}=_ref32;dist_module.ZP.capture("saved insights list page filter used",{filter_keys:filterKeys})},reportSavedInsightTabChanged:_ref33=>{let{tab}=_ref33;dist_module.ZP.capture("saved insights list page tab changed",{tab})},reportSavedInsightLayoutChanged:_ref34=>{let{layout}=_ref34;dist_module.ZP.capture("saved insights list page layout changed",{layout})},reportSavedInsightNewInsightClicked:_ref35=>{let{insightType}=_ref35;dist_module.ZP.capture("saved insights new insight clicked",{insight_type:insightType})},reportRecording:_ref36=>{var _playerData$start$val,_playerData$end$value,_durations$firstPaint;let{playerData,durations,type,metadata}=_ref36,eventIndex=new EventIndex(playerData?.snapshots||[]),payload={snapshots_load_time:durations.snapshots,metadata_load_time:durations.metadata,events_load_time:durations.events,first_paint_load_time:durations.firstPaint,duration:eventIndex.getDuration(),recording_id:playerData.sessionRecordingId,start_time:null!==(_playerData$start$val=playerData.start?.valueOf())&&void 0!==_playerData$start$val?_playerData$start$val:0,end_time:null!==(_playerData$end$value=playerData.end?.valueOf())&&void 0!==_playerData$end$value?_playerData$end$value:0,page_change_events_length:eventIndex.pageChangeEvents().length,recording_width:eventIndex.getRecordingScreenMetadata(0)[0]?.width,load_time:null!==(_durations$firstPaint=durations.firstPaint)&&void 0!==_durations$firstPaint?_durations$firstPaint:0,snapshot_source:metadata?.snapshot_source||"unknown"};dist_module.ZP.capture(`recording ${type}`,payload)},reportPersonSplit:props=>{dist_module.ZP.capture("split person started",props)},reportHelpButtonViewed:()=>{dist_module.ZP.capture("help button viewed")},reportHelpButtonUsed:props=>{dist_module.ZP.capture("help button used",props)},reportCorrelationAnalysisFeedback:props=>{dist_module.ZP.capture("correlation analysis feedback",props)},reportCorrelationAnalysisDetailedFeedback:props=>{dist_module.ZP.capture("correlation analysis detailed feedback",props)},reportCorrelationInteraction:_ref37=>{let{correlationType,action,props}=_ref37;dist_module.ZP.capture("correlation interaction",{correlation_type:correlationType,action,...props})},reportCorrelationViewed:_ref38=>{let{delay,query,propertiesTable}=_ref38,payload=sanitizeQuery(query);0===delay?dist_module.ZP.capture(`correlation${propertiesTable?" properties":""} viewed`,payload):dist_module.ZP.capture(`correlation${propertiesTable?" properties":""} analyzed`,{...payload,delay})},reportRecordingsListFilterAdded:_ref39=>{let{filterType}=_ref39;dist_module.ZP.capture("recording list filter added",{filter_type:filterType})},reportRecordingsListFetched:_ref40=>{let{loadTime,filters,defaultDurationFilter}=_ref40,filterValues=(0,session_recordings_utils.Ri)(filters),eventFilters=filterValues.filter(UniversalFilters_utils.Lu),actionFilters=filterValues.filter(UniversalFilters_utils.$e),propertyFilters=filterValues.filter(utils.RG),consoleLogFilters=propertyFilters.filter(utils.B9),filterBreakdown=filters&&defaultDurationFilter?{hasEventsFilters:!!eventFilters.length,hasActionsFilters:!!actionFilters.length,hasPropertiesFilters:!!propertyFilters.length,hasCohortFilter:propertyFilters.some(p=>p.type===types.FT.Cohort),hasPersonFilter:propertyFilters.some(p=>p.type===types.FT.Person),hasDurationFilters:(filters.duration[0].value||-1)>defaultDurationFilter.value,hasConsoleLogsFilters:!!consoleLogFilters.length}:{};dist_module.ZP.capture("recording list fetched",{load_time:loadTime,listing_version:"3",filters,...filterBreakdown})},reportRecordingsListPropertiesFetched:_ref41=>{let{loadTime}=_ref41;dist_module.ZP.capture("recording list properties fetched",{load_time:loadTime})},reportRecordingPlayerSeekbarEventHovered:()=>{dist_module.ZP.capture("recording player seekbar event hovered")},reportRecordingInspectorItemExpanded:_ref42=>{let{tab,index}=_ref42;dist_module.ZP.capture("recording inspector item expanded",{tab:"replay-4000",type:tab,index})},reportRecordingInspectorMiniFilterViewed:_ref43=>{let{minifilterKey,enabled}=_ref43;dist_module.ZP.capture("recording inspector minifilter selected",{tab:"replay-4000",enabled,minifilterKey})},reportNextRecordingTriggered:_ref44=>{let{automatic}=_ref44;dist_module.ZP.capture("recording next recording triggered",{automatic})},reportRecordingExportedToFile:()=>{dist_module.ZP.capture("recording exported to file")},reportRecordingLoadedFromFile:properties=>{dist_module.ZP.capture("recording loaded from file",properties)},reportRecordingListVisibilityToggled:properties=>{dist_module.ZP.capture("recording list visibility toggled",properties)},reportRecordingPinnedToList:properties=>{dist_module.ZP.capture("recording pinned to list",properties)},reportRecordingPlaylistCreated:properties=>{dist_module.ZP.capture("recording playlist created",properties)},reportExperimentArchived:_ref45=>{let{experiment}=_ref45;dist_module.ZP.capture("experiment archived",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters})},reportExperimentReset:_ref46=>{let{experiment}=_ref46;dist_module.ZP.capture("experiment reset",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters})},reportExperimentCreated:_ref47=>{let{experiment}=_ref47;dist_module.ZP.capture("experiment created",{name:experiment.name,id:experiment.id,type:experiment.type,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentViewed:_ref48=>{let{experiment}=_ref48;dist_module.ZP.capture("experiment viewed",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentLaunched:_ref49=>{let{experiment,launchDate}=_ref49;dist_module.ZP.capture("experiment launched",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length,launch_date:launchDate.toISOString()})},reportExperimentStartDateChange:_ref50=>{let{experiment,newStartDate}=_ref50;dist_module.ZP.capture("experiment start date changed",{name:experiment.name,id:experiment.id,old_start_date:experiment.start_date,new_start_date:newStartDate})},reportExperimentCompleted:_ref51=>{let{experiment,endDate,duration,significant}=_ref51;dist_module.ZP.capture("experiment completed",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length,end_date:endDate.toISOString(),duration,significant})},reportExperimentExposureCohortCreated:_ref52=>{let{experiment,cohort}=_ref52;dist_module.ZP.capture("experiment exposure cohort created",{experiment_id:experiment.id,cohort_filters:cohort.filters})},reportExperimentExposureCohortEdited:_ref53=>{let{existingCohort,newCohort}=_ref53;dist_module.ZP.capture("experiment exposure cohort edited",{existing_filters:existingCohort.filters,new_filters:newCohort.filters,id:newCohort.id})},reportExperimentInsightLoadFailed:()=>{dist_module.ZP.capture("experiment load insight failed")},reportExperimentVariantShipped:_ref54=>{let{experiment}=_ref54;dist_module.ZP.capture("experiment variant shipped",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentVariantScreenshotUploaded:_ref55=>{let{experimentId}=_ref55;dist_module.ZP.capture("experiment variant screenshot uploaded",{experiment_id:experimentId})},reportExperimentResultsLoadingTimeout:_ref56=>{let{experimentId}=_ref56;dist_module.ZP.capture("experiment results loading timeout",{experiment_id:experimentId})},reportExperimentReleaseConditionsViewed:_ref57=>{let{experimentId}=_ref57;dist_module.ZP.capture("experiment release conditions viewed",{experiment_id:experimentId})},reportExperimentReleaseConditionsUpdated:_ref58=>{let{experimentId}=_ref58;dist_module.ZP.capture("experiment release conditions updated",{experiment_id:experimentId})},reportExperimentHoldoutCreated:_ref59=>{let{holdout}=_ref59;dist_module.ZP.capture("experiment holdout created",{name:holdout.name,holdout_id:holdout.id,filters:holdout.filters})},reportExperimentHoldoutAssigned:_ref60=>{let{experimentId,holdoutId}=_ref60;dist_module.ZP.capture("experiment holdout assigned",{experiment_id:experimentId,holdout_id:holdoutId})},reportPropertyGroupFilterAdded:()=>{dist_module.ZP.capture("property group filter added")},reportChangeOuterPropertyGroupFiltersType:_ref61=>{let{type,groupsLength}=_ref61;dist_module.ZP.capture("outer match property groups type changed",{type,groupsLength})},reportChangeInnerPropertyGroupFiltersType:_ref62=>{let{type,filtersLength}=_ref62;dist_module.ZP.capture("inner match property group filters type changed",{type,filtersLength})},reportDataManagementDefinitionHovered:_ref63=>{let{type}=_ref63;dist_module.ZP.capture("definition hovered",{type})},reportDataManagementDefinitionClickView:_ref64=>{let{type}=_ref64;dist_module.ZP.capture("definition click view",{type})},reportDataManagementDefinitionClickEdit:_ref65=>{let{type}=_ref65;dist_module.ZP.capture("definition click edit",{type})},reportDataManagementDefinitionSaveSucceeded:_ref66=>{let{type,loadTime}=_ref66;dist_module.ZP.capture("definition save succeeded",{type,load_time:loadTime})},reportDataManagementDefinitionSaveFailed:_ref67=>{let{type,loadTime,error}=_ref67;dist_module.ZP.capture("definition save failed",{type,load_time:loadTime,error})},reportDataManagementDefinitionCancel:_ref68=>{let{type}=_ref68;dist_module.ZP.capture("definition cancelled",{type})},reportDataManagementEventDefinitionsPageLoadSucceeded:_ref69=>{let{loadTime,resultsLength}=_ref69;dist_module.ZP.capture("event definitions page load succeeded",{load_time:loadTime,num_results:resultsLength})},reportDataManagementEventDefinitionsPageLoadFailed:_ref70=>{let{loadTime,error}=_ref70;dist_module.ZP.capture("event definitions page load failed",{load_time:loadTime,error})},reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded:_ref71=>{let{loadTime}=_ref71;dist_module.ZP.capture("event definitions page event nested properties load succeeded",{load_time:loadTime})},reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed:_ref72=>{let{loadTime,error}=_ref72;dist_module.ZP.capture("event definitions page event nested properties load failed",{load_time:loadTime,error})},reportDataManagementEventPropertyDefinitionsPageLoadSucceeded:_ref73=>{let{loadTime,resultsLength}=_ref73;dist_module.ZP.capture("event property definitions page load succeeded",{load_time:loadTime,num_results:resultsLength})},reportDataManagementEventPropertyDefinitionsPageLoadFailed:_ref74=>{let{loadTime,error}=_ref74;dist_module.ZP.capture("event property definitions page load failed",{load_time:loadTime,error})},reportInsightOpenedFromRecentInsightList:()=>{dist_module.ZP.capture("insight opened from recent insight list")},reportRecordingOpenedFromRecentRecordingList:()=>{dist_module.ZP.capture("recording opened from recent recording list")},reportPersonOpenedFromNewlySeenPersonsList:()=>{dist_module.ZP.capture("person opened from newly seen persons list")},reportIngestionContinueWithoutVerifying:()=>{dist_module.ZP.capture("ingestion continue without verifying")},reportAutocaptureToggled:_ref75=>{let{autocapture_opt_out}=_ref75;dist_module.ZP.capture("autocapture toggled",{autocapture_opt_out})},reportAutocaptureExceptionsToggled:_ref76=>{let{autocapture_opt_in}=_ref76;dist_module.ZP.capture("autocapture exceptions toggled",{autocapture_opt_in})},reportHeatmapsToggled:_ref77=>{let{heatmaps_opt_in}=_ref77;dist_module.ZP.capture("heatmaps toggled",{heatmaps_opt_in})},reportFailedToCreateFeatureFlagWithCohort:_ref78=>{let{detail,code}=_ref78;dist_module.ZP.capture("failed to create feature flag with cohort",{detail,code})},reportFeatureFlagCopySuccess:()=>{dist_module.ZP.capture("feature flag copied")},reportFeatureFlagCopyFailure:_ref79=>{let{error}=_ref79;dist_module.ZP.capture("feature flag copy failure",{error})},reportFeatureFlagScheduleSuccess:()=>{dist_module.ZP.capture("feature flag scheduled")},reportFeatureFlagScheduleFailure:_ref80=>{let{error}=_ref80;dist_module.ZP.capture("feature flag schedule failure",{error})},reportInviteMembersButtonClicked:()=>{dist_module.ZP.capture("invite members button clicked")},reportTeamSettingChange:_ref81=>{let{name,value}=_ref81;dist_module.ZP.capture(`${name} team setting updated`,{setting:name,value})},reportProjectSettingChange:_ref82=>{let{name,value}=_ref82;dist_module.ZP.capture(`${name} project setting updated`,{setting:name,value})},reportActivationSideBarTaskClicked:_ref83=>{let{key}=_ref83;dist_module.ZP.capture("activation sidebar task clicked",{key})},reportBillingUpgradeClicked:_ref84=>{let{plan}=_ref84;dist_module.ZP.capture("billing upgrade button clicked",{plan})},reportBillingDowngradeClicked:_ref85=>{let{plan}=_ref85;dist_module.ZP.capture("billing downgrade button clicked",{plan})},reportRoleCreated:_ref86=>{let{role}=_ref86;dist_module.ZP.capture("new role created",{role})},reportResourceAccessLevelUpdated:_ref87=>{let{resourceType,roleName,accessLevel}=_ref87;dist_module.ZP.capture("resource access level updated",{resource_type:resourceType,role_name:roleName,access_level:accessLevel})},reportRoleCustomAddedToAResource:_ref88=>{let{resourceType,rolesLength}=_ref88;dist_module.ZP.capture("role custom added to a resource",{resource_type:resourceType,roles_length:rolesLength})},reportFlagsCodeExampleInteraction:_ref89=>{let{optionType}=_ref89;dist_module.ZP.capture("flags code example option selected",{option_type:optionType})},reportFlagsCodeExampleLanguage:_ref90=>{let{language}=_ref90;dist_module.ZP.capture("flags code example language selected",{language})},reportSurveyCreated:_ref91=>{let{survey,isDuplicate}=_ref91,questionsWithShuffledOptions=survey.questions.filter(question=>question.hasOwnProperty("shuffleOptions")&&question.shuffleOptions);dist_module.ZP.capture("survey created",{name:survey.name,id:survey.id,survey_type:survey.type,questions_length:survey.questions.length,question_types:survey.questions.map(question=>question.type),is_duplicate:null!=isDuplicate&&isDuplicate,events_count:survey.conditions?.events?.values.length,recurring_survey_iteration_count:void 0==survey.iteration_count?0:survey.iteration_count,recurring_survey_iteration_interval:void 0==survey.iteration_frequency_days?0:survey.iteration_frequency_days,shuffle_questions_enabled:!!survey.appearance?.shuffleQuestions,shuffle_question_options_enabled_count:questionsWithShuffledOptions.length,has_branching_logic:survey.questions.some(question=>question.branching&&Object.keys(question.branching).length>0)})},reportSurveyViewed:_ref92=>{let{survey}=_ref92;dist_module.ZP.capture("survey viewed",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,end_date:survey.end_date})},reportSurveyArchived:_ref93=>{let{survey}=_ref93;dist_module.ZP.capture("survey archived",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,end_date:survey.end_date})},reportSurveyEdited:_ref94=>{let{survey}=_ref94,questionsWithShuffledOptions=survey.questions.filter(question=>question.hasOwnProperty("shuffleOptions")&&question.shuffleOptions);dist_module.ZP.capture("survey edited",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,events_count:survey.conditions?.events?.values.length,recurring_survey_iteration_count:void 0==survey.iteration_count?0:survey.iteration_count,recurring_survey_iteration_interval:void 0==survey.iteration_frequency_days?0:survey.iteration_frequency_days,shuffle_questions_enabled:!!survey.appearance?.shuffleQuestions,shuffle_question_options_enabled_count:questionsWithShuffledOptions.length,has_branching_logic:survey.questions.some(question=>question.branching&&Object.keys(question.branching).length>0)})},reportSurveyTemplateClicked:_ref95=>{let{template}=_ref95;dist_module.ZP.capture("survey template clicked",{template})},reportSurveyCycleDetected:_ref96=>{let{survey}=_ref96;dist_module.ZP.capture("survey cycle detected",{name:survey.name,id:survey.id,start_date:survey.start_date,end_date:survey.end_date})},reportProductUnsubscribed:_ref97=>{let{product}=_ref97,property_key=`unsubscribed_from_${product}`;dist_module.ZP.capture("product unsubscribed",{product,$set:{[property_key]:!0}})},reportSubscribedDuringOnboarding:_ref98=>{let{productKey}=_ref98;dist_module.ZP.capture("subscribed during onboarding",{product_key:productKey})},reportCommandBarStatusChanged:_ref99=>{let{status}=_ref99;dist_module.ZP.capture("command bar status changed",{status})},reportCommandBarSearch:_ref100=>{let{queryLength}=_ref100;dist_module.ZP.capture("command bar search",{queryLength})},reportCommandBarSearchResultOpened:_ref101=>{let{type}=_ref101;dist_module.ZP.capture("command bar search result opened",{type})},reportCommandBarActionSearch:_ref102=>{let{query}=_ref102;dist_module.ZP.capture("command bar action search",{query})},reportCommandBarActionResultExecuted:_ref103=>{let{resultDisplay}=_ref103;dist_module.ZP.capture("command bar search result executed",{resultDisplay})}}})])},"./frontend/src/lib/utils/file-utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function selectFiles(options){return new Promise((resolve,reject)=>{let input=document.createElement("input");input.type="file",input.multiple=options.multiple,input.accept=options.contentType,input.onchange=()=>{if(!input.files)return resolve([]);let files=Array.from(input.files);resolve(files)},input.oncancel=()=>{resolve([])},input.onerror=()=>{reject(Error("Error selecting file"))},input.click()})}function getTextFromFile(file){return new Promise((resolve,reject)=>{let filereader=new FileReader;filereader.onload=e=>{resolve(e.target?.result)},filereader.onerror=e=>{reject(e)},filereader.readAsText(file)})}__webpack_require__.d(__webpack_exports__,{l:()=>selectFiles,m:()=>getTextFromFile})},"./frontend/src/lib/utils/getAppContext.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fj:()=>getAppContext,XO:()=>getDefaultEventName,Zy:()=>getDefaultEventLabel,ev:()=>getCurrentTeamId});var _types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/types.ts");function getAppContext(){return window.POSTHOG_APP_CONTEXT||void 0}function getDefaultEventName(){return getAppContext()?.default_event_name||_types__WEBPACK_IMPORTED_MODULE_0__.cB.PageView}function getDefaultEventLabel(){let name=getDefaultEventName();return name===_types__WEBPACK_IMPORTED_MODULE_0__.cB.PageView?"Pageview":name===_types__WEBPACK_IMPORTED_MODULE_0__.cB.Screen?"Screen":name}function getCurrentTeamId(){let maybeTeamId=getAppContext()?.current_team?.id;if(!maybeTeamId)throw Error(`Project ID is not known.${getAppContext()?.anonymous?" User is anonymous.":""}`);return maybeTeamId}},"./frontend/src/lib/utils/kea-logic-builders.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>permanentlyMount});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");function permanentlyMount(){return logic=>{(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(()=>{logic.cache._permanentMount||(logic.cache._permanentMount=!0,logic.wrapper.mount())})(logic)}}},"./frontend/src/lib/utils/permissioning.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F9:()=>getReasonForAccessLevelChangeProhibition,WS:()=>membershipLevelToName,YR:()=>teamMembershipLevelIntegers,mr:()=>organizationMembershipLevelIntegers});var _constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/constants.tsx");function getReasonForAccessLevelChangeProhibition(currentMembershipLevel,currentUser,memberToBeUpdated,newLevelOrAllowedLevels){let effectiveLevelToBeUpdated;if(memberToBeUpdated.user.uuid===currentUser.uuid)return"You can't change your own access level.";if(!currentMembershipLevel)return"Your membership level is unknown.";if(effectiveLevelToBeUpdated="effectiveLevel"in memberToBeUpdated?memberToBeUpdated.effective_level:memberToBeUpdated.level,Array.isArray(newLevelOrAllowedLevels)){if(currentMembershipLevel===_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Owner)return null;if(!newLevelOrAllowedLevels.length)return"You don't have permission to change this member's access level."}else{if(newLevelOrAllowedLevels===effectiveLevelToBeUpdated)return"It doesn't make sense to set the same level as before.";if(currentMembershipLevel===_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Owner)return null;if(newLevelOrAllowedLevels>currentMembershipLevel)return"You can only change access level of others to lower or equal to your current one."}return currentMembershipLevel<_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Admin?"You don't have permission to change access levels.":currentMembershipLevel"number"==typeof value),teamMembershipLevelIntegers=Object.values(_constants__WEBPACK_IMPORTED_MODULE_0__.ZN).filter(value=>"number"==typeof value)},"./frontend/src/lib/utils/router-utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Jf:()=>addProjectIdIfMissing,YZ:()=>removeFlagIdIfPresent,sv:()=>removeProjectIdIfPresent});var _getAppContext__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts");let pathsWithoutProjectId=["api","me","instance","organization","preflight","login","signup","create-organization","account"];function removeProjectIdIfPresent(path){return path.match(/^\/project\/\d+/)?"/"+path.split("/").splice(3).join("/"):path}function removeFlagIdIfPresent(path){return path.match(/^\/feature_flags\/\d+/)?path.replace(/(feature_flags).*$/,"$1/"):path}function addProjectIdIfMissing(path,teamId){return!function(path){let firstPart=path.split("/")[1];return pathsWithoutProjectId.includes(firstPart)}(removeProjectIdIfPresent(path))?function(path,teamId){if(path.match(/^\/project\/\d+/))return path;let prefix="";try{if(prefix=`/project/${null!=teamId?teamId:(0,_getAppContext__WEBPACK_IMPORTED_MODULE_0__.ev)()}`,"/"==path)return prefix}catch(e){}return path===prefix||path.startsWith(prefix+"/")?path:`${prefix}/${path.startsWith("/")?path.slice(1):path}`}(path,teamId):removeProjectIdIfPresent(path)}},"./frontend/src/lib/utils/semver.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function parseVersion(version){let split=version.split("-",2);version=split[0];let extra=split[1],match=version.match(/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?$/);if(!match)throw Error(`Invalid semver string: ${version}`);let[,major,minor,patch]=match,majorInt=parseInt(major,10),minorInt=null!=minor?parseInt(minor,10):void 0,patchInt=null!=patch?parseInt(patch,10):void 0;if(isNaN(majorInt)||null!=minorInt&&isNaN(minorInt)||null!=patchInt&&isNaN(patchInt))throw Error(`Invalid semver string: ${version}`);return{major:majorInt,minor:minorInt,patch:patchInt,extra}}function tryParseVersion(version){try{return parseVersion(version)}catch{return null}}function diffVersions(a,b){var _pa$minor,_pb$minor,_pa$patch,_pb$patch;let pa="string"==typeof a?parseVersion(a):a,pb="string"==typeof b?parseVersion(b):b;if(pa.major!==pb.major)return{kind:"major",diff:pa.major-pb.major};if(pa.minor!==pb.minor)return{kind:"minor",diff:(null!==(_pa$minor=pa.minor)&&void 0!==_pa$minor?_pa$minor:0)-(null!==(_pb$minor=pb.minor)&&void 0!==_pb$minor?_pb$minor:0)};if(pa.patch!==pb.patch)return{kind:"patch",diff:(null!==(_pa$patch=pa.patch)&&void 0!==_pa$patch?_pa$patch:0)-(null!==(_pb$patch=pb.patch)&&void 0!==_pb$patch?_pb$patch:0)};if(pa.extra!==pb.extra){if(pa.extra)return pb.extra?{kind:"extra",diff:pa.extra.localeCompare(pb.extra)}:{kind:"extra",diff:-1};if(pb.extra)return{kind:"extra",diff:1}}return null}function compareVersion(a,b){let diff=diffVersions(a,b);return diff?diff.diff:0}function highestVersion(versions){let parsed=versions.map(v=>"string"==typeof v?parseVersion(v):v);return parsed.sort(compareVersion),parsed[parsed.length-1]}function isEqualVersion(a,b){return null===diffVersions(a,b)}function versionToString(version){let versionPart=`${version.major}${null!=version.minor?`.${version.minor}${null!=version.patch?`.${version.patch}`:""}`:""}`;return version.extra?`${versionPart}-${version.extra}`:versionPart}function createVersionChecker(requiredVersion){return version=>{let diff=diffVersions(version,requiredVersion);return!diff||diff.diff>0}}__webpack_require__.d(__webpack_exports__,{FL:()=>isEqualVersion,Ff:()=>createVersionChecker,I4:()=>diffVersions,Jt:()=>tryParseVersion,L$:()=>versionToString,ej:()=>highestVersion,wy:()=>parseVersion})},"./frontend/src/lib/utils/stringWithWBR.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>stringWithWBR});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function stringWithWBR(text){let splitAt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,addWBRAfter=[",",".","/","\\"],naturalSplit=[" ","-"],returnArray=[],final="",sinceSplit=0,i=0;return""===text?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("i",{children:"(empty string)"}):(text.split("").forEach(letter=>{addWBRAfter.indexOf(letter)>=0||sinceSplit>=splitAt?(sinceSplit=0,final+=letter,returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:final},i++)),returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("wbr",{},i++)),final=""):(naturalSplit.indexOf(letter)>=0?sinceSplit=0:sinceSplit+=1,final+=letter)}),final&&returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:final},i++)),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:returnArray}))}},"./frontend/src/mocks/browser.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{KK:()=>worker,ok:()=>useStorybookMocks,x8:()=>mswDecorator,zt:()=>setFeatureFlags});var msw__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/msw@0.49.0_typescript@4.9.5/node_modules/msw/lib/index.js"),_mocks_handlers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/mocks/handlers.ts"),_mocks_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/mocks/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let worker=(0,msw__WEBPACK_IMPORTED_MODULE_2__.setupWorker)(..._mocks_handlers__WEBPACK_IMPORTED_MODULE_0__.qi),useStorybookMocks=mocks=>worker.use(...(0,_mocks_utils__WEBPACK_IMPORTED_MODULE_3__.D)(mocks)),mswDecorator=mocks=>function StoryMock(Story,_ref){let{parameters}=_ref,mergedMocks={};for(let restMethod of Object.keys(msw__WEBPACK_IMPORTED_MODULE_2__.rest)){for(let[path,handler]of(mergedMocks[restMethod]={},Object.entries(parameters.msw?.mocks?.[restMethod]||{}))){let cleanedPath=path.replace(/\/?$/,"/");mergedMocks[restMethod][cleanedPath]=handler}for(let[path,handler]of Object.entries(mocks?.[restMethod]||{})){let cleanedPath=path.replace(/\/?$/,"/");mergedMocks[restMethod][cleanedPath]=handler}}return useStorybookMocks(mergedMocks),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Story,{})},setFeatureFlags=featureFlags=>{window.POSTHOG_APP_CONTEXT.persisted_feature_flags=featureFlags}},"./frontend/src/mocks/features.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>getAvailableProductFeatures,y:()=>useAvailableFeatures});let features=[],useAvailableFeatures=f=>{features=f},getAvailableProductFeatures=()=>features.map(feature=>({key:feature,name:feature}))},"./frontend/src/mocks/fixtures/_billing.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>billingJson});var lib_dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/dayjs.ts");let billingJson={customer_id:"cus_Pg7PIL8MsKi6bx",deactivated:!1,has_active_subscription:!0,billing_period:{current_period_start:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_0__.Bv)("2024-03-07T22:54:32Z"),current_period_end:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_0__.Bv)("2024-04-07T22:54:32Z"),interval:"month"},current_total_amount_usd:"403.07",current_total_amount_usd_after_discount:"403.07",products:[{name:"Product analytics",headline:"Product analytics with autocapture",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",price_description:null,usage_key:"events",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",screenshot_url:"https://posthog.com/images/products/product-analytics/screenshot-product-analytics.png",icon_key:"IconGraph",docs_url:"https://posthog.com/docs/product-analytics",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"product_analytics",name:"Free",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",docs_url:"https://posthog.com/docs/product-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:1e6,features:[{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",unit:null,limit:null,note:null},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",unit:null,limit:null,note:null},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",unit:null,limit:null,note:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",unit:null,limit:null,note:"Limited"},{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20240111",product_key:"product_analytics",name:"Paid",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",docs_url:"https://posthog.com/docs/product-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",unit:null,limit:null,note:null},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",unit:null,limit:null,note:null},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",unit:null,limit:null,note:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",unit:null,limit:null,note:null},{key:"subscriptions",name:"Insight & dashboard subscriptions",description:"Create a subscription for any insight or dashboard in PostHog to receive regular reports with their updates.",unit:null,limit:null,note:null},{key:"paths_advanced",name:"Advanced paths",description:"Customize your path insights by setting the maximum number of paths, number of people on each path, and how path names should appear.",unit:null,limit:null,note:null},{key:"correlation_analysis",name:"Correlation analysis",description:"Automatically highlight significant factors that affect the conversion rate of users within a funnel.",unit:null,limit:null,note:null},{key:"behavioral_cohort_filtering",name:"Lifecycle",description:"Discover how your active users break down, highlighting those who have recently stopped being active or those who have just become active for the first time.",unit:null,limit:null,note:null},{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00031",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00013",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000819",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000455",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000234",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000052",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null}],type:"product_analytics",free_allocation:0,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:882128,projected_usage:1e6,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.00031",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1e6,projected_amount_usd:"310.00"},{flat_amount_usd:"0",unit_amount_usd:"0.00013",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:5e6,projected_amount_usd:"650.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0000819",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000455",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000234",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000052",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:"0.00",current_amount_usd:"0.00",current_usage:882128,usage_limit:882128,has_exceeded_limit:!1,percentage_usage:.4423939206,projected_usage:7e6,projected_amount_usd:"960.00",unit:"event",addons:[{name:"Group analytics",inclusion_only:!1,features:[{key:"group_analytics",name:"Group analytics",description:"Associate events with a group - such as a company, community, or project - and analyze them in that context.",unit:null,limit:null,note:null}],description:"Associate events with a group or entity - such as a company, community, or project. Analyze these events as if they were sent by that entity itself. Great for B2B, marketplaces, and more.",price_description:null,image_url:"https://posthog.com/images/product/product-icons/group-analytics.svg",icon_key:"IconPeople",docs_url:"https://posthog.com/docs/product-analytics/group-analytics",type:"group_analytics",tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:882128,projected_usage:1e6,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0000708",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1e6,projected_amount_usd:"70.8"},{flat_amount_usd:"0",unit_amount_usd:"0.00003",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1910636,projected_amount_usd:"57.32"},{flat_amount_usd:"0",unit_amount_usd:"0.0000189",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000105",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000054",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000012",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,included_with_main_product:!1,subscribed:!0,unit:"event",unit_amount_usd:null,current_amount_usd:null,current_usage:882128,projected_usage:3910636,projected_amount_usd:"128.12",plans:[{plan_key:"addon-20230509",product_key:"group_analytics",name:"Addon",description:"Associate events with a group or entity - such as a company, community, or project. Analyze these events as if they were sent by that entity itself. Great for B2B, marketplaces, and more.",image_url:"https://posthog.com/images/product/product-icons/group-analytics.svg",docs_url:"https://posthog.com/docs/product-analytics/group-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"group_analytics",name:"Group analytics",description:"Associate events with a group - such as a company, community, or project - and analyze them in that context.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000708",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00003",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000189",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000105",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000054",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000012",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],contact_support:!1},{name:"Data pipelines",inclusion_only:!1,features:[{key:"data_pipelines",name:"Data pipelines",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",unit:null,limit:null,note:null}],description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",price_description:null,image_url:"None",icon_key:"IconDecisionTree",docs_url:"https://posthog.com/docs/cdp/batch-exports",type:"data_pipelines",tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000248",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000104",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000655",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000364",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000187",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000042",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,included_with_main_product:!1,subscribed:!1,unit:"event",unit_amount_usd:null,current_amount_usd:null,current_usage:0,projected_usage:0,projected_amount_usd:"0.00",plans:[{plan_key:"addon-20240111",product_key:"data_pipelines",name:"Addon",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",image_url:null,docs_url:"https://posthog.com/docs/cdp/batch-exports",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"data_pipelines",name:"Data pipelines",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000248",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000104",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000655",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000364",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000187",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000042",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],contact_support:!1}],contact_support:!1,inclusion_only:!1,features:[{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-dashboards.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-dashboards-dark.png"},icon_key:null,type:"primary"},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-funnels.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-funnels-dark.png"},icon_key:null,type:"primary"},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",images:null,icon_key:null,type:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",images:null,icon_key:null,type:null},{key:"insights",name:"Unlimited Insights",description:"Trends, funnels, retention, user paths, stickiness, and lifecycle insights to visualize your data.",images:null,icon_key:null,type:null},{key:"subscriptions",name:"Insight & dashboard subscriptions",description:"Create a subscription for any insight or dashboard in PostHog to receive regular reports with their updates.",images:null,icon_key:"IconNotification",type:"secondary"},{key:"paths_advanced",name:"Advanced paths",description:"Customize your path insights by setting the maximum number of paths, number of people on each path, and how path names should appear.",images:null,icon_key:null,type:null},{key:"correlation_analysis",name:"Correlation analysis",description:"Automatically highlight significant factors that affect the conversion rate of users within a funnel.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-correlation-analysis.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-correlation-analysis-dark.png"},icon_key:null,type:"primary"},{key:"behavioral_cohort_filtering",name:"Lifecycle",description:"Discover how your active users break down, highlighting those who have recently stopped being active or those who have just become active for the first time.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-lifecycle.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-lifecycle-dark.png"},icon_key:null,type:"primary"},{key:"product_analytics_retention",name:"Retention",description:"See how many users return on subsequent days after performing an event the first time, or recurrently.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-retention.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-retention-dark.png"},icon_key:null,type:"primary"},{key:"product_analytics_stickiness",name:"Stickiness",description:"Learn how many times users perform a specific event in a period of time.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-stickiness.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-stickiness-dark.png"},icon_key:null,type:"primary"},{key:"autocapture",name:"Autocapture",description:"Add PostHog.js to your website or web app to track all event data and retroactively define events.",images:null,icon_key:"IconBolt",type:"secondary"},{key:"data_visualization",name:"Data visualization",description:"Filter data by user property, group data, and use formulas in queries.",images:null,icon_key:"IconPieChart",type:"secondary"},{key:"product_analytics_sql_queries",name:"Query with SQL",description:"Use PostHog’s filtering interface or switch into SQL mode for more powerful querying.",images:null,icon_key:"IconTerminal",type:"secondary"}]},{name:"Session replay",headline:"Watch how users experience your app",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",price_description:null,usage_key:"recordings",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",screenshot_url:"https://posthog.com/images/products/session-replay/screenshot-session-replay.png",icon_key:"IconRewindPlay",docs_url:"https://posthog.com/docs/session-replay",subscribed:!0,plans:[{plan_key:"free-20231218",product_key:"session_replay",name:"Free",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",docs_url:"https://posthog.com/docs/session-replay",note:null,unit:"recording",flat_rate:!1,free_allocation:5e3,features:[{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",unit:null,limit:null,note:null},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",unit:null,limit:null,note:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",unit:null,limit:null,note:null},{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",unit:"playlists",limit:5,note:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"month",limit:1,note:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",unit:null,limit:null,note:null},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",unit:null,limit:null,note:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",unit:null,limit:null,note:null},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",unit:null,limit:null,note:null},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",unit:null,limit:null,note:null},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",unit:null,limit:null,note:null},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20231218",product_key:"session_replay",name:"Paid",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",docs_url:"https://posthog.com/docs/session-replay",note:null,unit:"recording",flat_rate:!1,free_allocation:null,features:[{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",unit:null,limit:null,note:null},{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",unit:null,limit:null,note:null},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",unit:null,limit:null,note:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",unit:null,limit:null,note:null},{key:"recordings_file_export",name:"Download recordings",description:"Retain recordings beyond data retention limits.",unit:null,limit:null,note:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"months",limit:3,note:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",unit:null,limit:null,note:null},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",unit:null,limit:null,note:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",unit:null,limit:null,note:null},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",unit:null,limit:null,note:null},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",unit:null,limit:null,note:null},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",unit:null,limit:null,note:null},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:5e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.04",up_to:15e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.003",up_to:5e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0027",up_to:15e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0025",up_to:5e5,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.002",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null}],type:"session_replay",free_allocation:5e3,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:5e3,current_amount_usd:"0.00",current_usage:5e3,projected_usage:5e3,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.04",up_to:15e3,current_amount_usd:"0.00",current_usage:1e4,projected_usage:1e4,projected_amount_usd:"400.00"},{flat_amount_usd:"0",unit_amount_usd:"0.003",up_to:5e4,current_amount_usd:"0.00",current_usage:1022,projected_usage:35e3,projected_amount_usd:"105"},{flat_amount_usd:"0",unit_amount_usd:"0.0027",up_to:15e4,current_amount_usd:"0.00",current_usage:0,projected_usage:1e4,projected_amount_usd:"270.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0025",up_to:5e5,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.002",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:"0.00",current_amount_usd:"403.07",current_usage:16022,usage_limit:1e5,has_exceeded_limit:!1,percentage_usage:.16022,projected_usage:5e4,projected_amount_usd:"775.00",unit:"recording",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",images:null,icon_key:null,type:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",images:{light:"https://posthog.com/images/products/session-replay/console.png",dark:"https://posthog.com/images/products/session-replay/console-dark.png"},icon_key:null,type:"primary"},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",images:null,icon_key:null,type:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",images:{light:"https://posthog.com/images/products/session-replay/network.png",dark:"https://posthog.com/images/products/session-replay/network-dark.png"},icon_key:null,type:"primary"},{key:"recordings_file_export",name:"Download recordings",description:"Retain recordings beyond data retention limits.",images:null,icon_key:"IconDownload",type:"secondary"},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",images:null,icon_key:"IconSampling",type:"secondary"},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",images:null,icon_key:"IconClock",type:"secondary"},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",images:null,icon_key:null,type:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",images:null,icon_key:"IconPassword",type:"secondary"},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",images:null,icon_key:null,type:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",images:{light:"https://posthog.com/images/products/session-replay/timeline.png",dark:"https://posthog.com/images/products/session-replay/timeline-dark.png"},icon_key:null,type:"primary"},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",images:null,icon_key:null,type:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",images:null,icon_key:null,type:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",images:null,icon_key:null,type:null},{key:"works_with_posthog_js",name:"Capture sessions without extra code",description:"Works with PostHog.js",images:null,icon_key:"IconBolt",type:"secondary"},{key:"replay_automatic_playlists",name:"Automatic playlists",description:"Filter by user behavior, user properties, or time.",images:null,icon_key:"IconPlaylist",type:"secondary"}]},{name:"Feature flags & experiments",headline:"Safely roll out features and experiments to specific users or groups",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",price_description:null,usage_key:"feature_flag_requests",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",screenshot_url:"https://posthog.com/images/products/feature-flags/screenshot-feature-flags.png",icon_key:"IconToggle",docs_url:"https://posthog.com/docs/feature-flags",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"feature_flags",name:"Free",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",docs_url:"https://posthog.com/docs/feature-flags",note:null,unit:"request",flat_rate:!1,free_allocation:1e6,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",unit:null,limit:null,note:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",unit:null,limit:null,note:null},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",unit:null,limit:null,note:null},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",unit:null,limit:null,note:null},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",unit:null,limit:null,note:null},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",unit:null,limit:null,note:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",unit:null,limit:null,note:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",unit:null,limit:null,note:null},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",unit:null,limit:null,note:null},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",unit:null,limit:null,note:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",unit:null,limit:null,note:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",unit:null,limit:null,note:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",unit:null,limit:null,note:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230623",product_key:"feature_flags",name:"Paid",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",docs_url:"https://posthog.com/docs/feature-flags",note:null,flat_rate:!1,unit:"request",free_allocation:null,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",unit:null,limit:null,note:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",unit:null,limit:null,note:null},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",unit:null,limit:null,note:null},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",unit:null,limit:null,note:null},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",unit:null,limit:null,note:null},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",unit:null,limit:null,note:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",unit:null,limit:null,note:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",unit:null,limit:null,note:null},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",unit:null,limit:null,note:null},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",unit:null,limit:null,note:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",unit:null,limit:null,note:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",unit:null,limit:null,note:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",unit:null,limit:null,note:null},{key:"group_experiments",name:"Group experiments",description:"Target experiments to specific groups of users so everyone in the same group gets the same variant.",unit:null,limit:null,note:null},{key:"multiple_environments",name:"Multi-environment support",description:"Test flags in local development or staging by using the same flag key across PostHog projects.",unit:null,limit:null,note:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0001",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000045",up_to:1e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000025",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00001",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],type:"feature_flags",free_allocation:1e6,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:1e6,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:"request",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",images:null,icon_key:null,type:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",images:{light:"https://posthog.com/images/products/feature-flags/multivariate.png",dark:"https://posthog.com/images/products/feature-flags/multivariate-dark.png"},icon_key:null,type:"primary"},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",images:null,icon_key:"IconUnlock",type:"secondary"},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",images:{light:"https://posthog.com/images/products/feature-flags/payloads.png",dark:"https://posthog.com/images/products/feature-flags/payloads-dark.png"},icon_key:null,type:"primary"},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",images:{light:"https://posthog.com/images/products/feature-flags/release-conditions.png",dark:"https://posthog.com/images/products/feature-flags/release-conditions-dark.png"},icon_key:null,type:"primary"},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",images:null,icon_key:null,type:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",images:null,icon_key:null,type:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",images:null,icon_key:"IconDecisionTree",type:"secondary"},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",images:{light:"https://posthog.com/images/products/feature-flags/reports.png",dark:"https://posthog.com/images/products/feature-flags/reports-dark.png"},icon_key:null,type:"primary"},{key:"multiple_environments",name:"Multi-environment support",description:"Test flags in local development or staging by using the same flag key across PostHog projects.",images:null,icon_key:"IconStack",type:"secondary"},{key:"user_opt_in",name:"Early access feature opt-in widget",description:"Allow users to opt in to (or out of) specified features. Or use the API to build your own UI.",images:{light:"https://posthog.com/images/products/feature-flags/early-access.png",dark:"https://posthog.com/images/products/feature-flags/early-access-dark.png"},icon_key:null,type:"primary"},{key:"instant_rollbacks",name:"Instant rollbacks",description:"Disable a feature without touching your codebase.",images:null,icon_key:"IconRevert",type:"secondary"},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",images:null,icon_key:null,type:null},{key:"group_experiments",name:"Group experiments",description:"Target experiments to specific groups of users so everyone in the same group gets the same variant.",images:null,icon_key:null,type:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",images:null,icon_key:null,type:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",images:null,icon_key:null,type:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",images:null,icon_key:null,type:null}]},{name:"Surveys",headline:"Ask anything with no-code surveys",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",price_description:null,usage_key:"survey_responses",image_url:"https://posthog.com/images/products/surveys/surveys.png",screenshot_url:"https://posthog.com/images/products/surveys/screenshot-surveys.png",icon_key:"IconMessage",docs_url:"https://posthog.com/docs/surveys",subscribed:!0,plans:[{plan_key:"free-20230928",product_key:"surveys",name:"Free",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",image_url:"https://posthog.com/images/products/surveys/surveys.png",docs_url:"https://posthog.com/docs/surveys",note:null,flat_rate:!1,unit:"survey response",free_allocation:250,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",unit:null,limit:null,note:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",unit:null,limit:null,note:null},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",unit:null,limit:null,note:null},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",unit:null,limit:null,note:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",unit:null,limit:null,note:null},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",unit:null,limit:null,note:null},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",unit:null,limit:null,note:null},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230928",product_key:"surveys",name:"Paid",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",image_url:"https://posthog.com/images/products/surveys/surveys.png",docs_url:"https://posthog.com/docs/surveys",note:null,flat_rate:!1,unit:"survey response",free_allocation:null,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",unit:null,limit:null,note:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",unit:null,limit:null,note:null},{key:"surveys_multiple_questions",name:"Multiple questions",description:"Ask up to 10 questions in a single survey.",unit:null,limit:null,note:null},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",unit:null,limit:null,note:null},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",unit:null,limit:null,note:null},{key:"surveys_styling",name:"Custom colors & positioning",description:"Customize the colors of your surveys to match your brand and set survey position.",unit:null,limit:null,note:null},{key:"surveys_text_html",name:"Custom HTML text",description:"Add custom HTML to your survey text.",unit:null,limit:null,note:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",unit:null,limit:null,note:null},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",unit:null,limit:null,note:null},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",unit:null,limit:null,note:null},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:250,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.2",up_to:500,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.1",up_to:1e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.035",up_to:1e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.015",up_to:2e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.01",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],type:"surveys",free_allocation:250,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:250,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:"survey response",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",images:null,icon_key:null,type:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",images:{light:"https://posthog.com/images/products/surveys/question-types.png",dark:"https://posthog.com/images/products/surveys/question-types-dark.png"},icon_key:null,type:"primary"},{key:"surveys_multiple_questions",name:"Multiple questions",description:"Ask up to 10 questions in a single survey.",images:{light:"https://posthog.com/images/products/surveys/steps.png",dark:"https://posthog.com/images/products/surveys/steps-dark.png"},icon_key:null,type:"primary"},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",images:{light:"https://posthog.com/images/products/surveys/targeting.png",dark:"https://posthog.com/images/products/surveys/targeting-dark.png"},icon_key:null,type:"primary"},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",images:null,icon_key:null,type:null},{key:"surveys_styling",name:"Custom colors & positioning",description:"Customize the colors of your surveys to match your brand and set survey position.",images:null,icon_key:null,type:null},{key:"surveys_text_html",name:"Custom HTML text",description:"Add custom HTML to your survey text.",images:null,icon_key:null,type:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",images:{light:"https://posthog.com/images/products/surveys/api.png",dark:"https://posthog.com/images/products/surveys/api-dark.png"},icon_key:null,type:"primary"},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",images:null,icon_key:"IconPieChart",type:"secondary"},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",images:{light:"https://posthog.com/images/products/surveys/templates.png",dark:"https://posthog.com/images/products/surveys/templates-dark.png"},icon_key:null,type:"primary"},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"surveys_link_question_type",name:"Link somewhere",description:"Send users to a webpage or invite them to book a meeting with a calendar invite.",images:{light:"https://posthog.com/images/products/surveys/link-scheduler.png",dark:"https://posthog.com/images/products/surveys/link-scheduler-dark.png"},icon_key:null,type:"primary"},{key:"surveys_slack_notifications",name:"Slack notifications",description:"Send realtime survey responses to a Slack channel.",images:null,icon_key:"IconNotification",type:"secondary"},{key:"surveys_wait_periods",name:"Customizable wait periods",description:"Set a delay before a survey opens.",images:null,icon_key:"IconClock",type:"secondary"}]},{name:"Integrations",headline:null,description:"Connect PostHog to your favorite tools.",price_description:null,usage_key:null,image_url:"https://posthog.com/images/product/product-icons/integrations.svg",screenshot_url:null,icon_key:"IconBolt",docs_url:"https://posthog.com/docs/cdp",subscribed:null,plans:[{plan_key:"free-20230117",product_key:"integrations",name:"Free",description:"Connect PostHog to your favorite tools.",image_url:"https://posthog.com/images/product/product-icons/integrations.svg",docs_url:"https://posthog.com/docs/cdp",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",unit:null,limit:null,note:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",unit:null,limit:null,note:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",unit:null,limit:null,note:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",unit:null,limit:null,note:null},{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:"no_active_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230117",product_key:"integrations",name:"Paid",description:"Connect PostHog to your favorite tools.",image_url:"https://posthog.com/images/product/product-icons/integrations.svg",docs_url:"https://posthog.com/docs/cdp",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",unit:null,limit:null,note:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",unit:null,limit:null,note:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",unit:null,limit:null,note:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",unit:null,limit:null,note:null},{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",unit:null,limit:null,note:null},{key:"app_metrics",name:"Transformation & destination metrics",description:"Get metrics on your transformation and destination metrics to see their usage, reliability, and more.",unit:null,limit:null,note:null}],tiers:null,current_plan:!0,included_if:"has_subscription",contact_support:null,unit_amount_usd:null}],type:"integrations",free_allocation:0,tiers:null,tiered:!1,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:0,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:null,addons:[],contact_support:!1,inclusion_only:!0,features:[{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",images:null,icon_key:null,type:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",images:null,icon_key:null,type:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",images:null,icon_key:null,type:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",images:null,icon_key:null,type:null},{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",images:null,icon_key:null,type:null},{key:"app_metrics",name:"Transformation & destination metrics",description:"Get metrics on your transformation and destination metrics to see their usage, reliability, and more.",images:null,icon_key:null,type:null}]},{name:"Platform and support",headline:null,description:"SSO, permission management, and support.",price_description:null,usage_key:null,image_url:"https://posthog.com/images/product/product-icons/platform.svg",screenshot_url:null,icon_key:"IconStack",docs_url:"https://posthog.com/docs",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"platform_and_support",name:"Totally free",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:"project",limit:1,note:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:"no_active_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"paid-20240208",product_key:"platform_and_support",name:"With Pay-per-use",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:"projects",limit:2,note:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",unit:null,limit:null,note:"$2k+/month spend"},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null}],tiers:null,current_plan:!0,included_if:"has_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"enterprise-20240208",product_key:"platform_and_support",name:"Enterprise",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:null,limit:null,note:"Unlimited"},{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",unit:null,limit:null,note:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",unit:null,limit:null,note:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",unit:null,limit:null,note:null},{key:"saml",name:"SAML SSO",description:"Allow your organization's users to log in with SAML.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",unit:null,limit:null,note:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",unit:null,limit:null,note:null},{key:"role_based_access",name:"Role-based access",description:"Control access to features like experiments, session recordings, and feature flags with custom roles.",unit:null,limit:null,note:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",unit:null,limit:null,note:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",unit:null,limit:null,note:"Advanced"},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",unit:null,limit:null,note:null},{key:"custom_msa",name:"Custom MSA",description:"Get a custom Master Services Agreement (MSA) to use PostHog in a way that fits your company's needs.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",unit:null,limit:null,note:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",unit:null,limit:null,note:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",unit:null,limit:null,note:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",unit:null,limit:null,note:null},{key:"training",name:"Ongoing training",description:"Get training from our team to help you quickly get up and running with PostHog.",unit:null,limit:null,note:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:!0,unit_amount_usd:null}],type:"platform_and_support",free_allocation:0,tiers:null,tiered:!1,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:0,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:null,addons:[{name:"Teams",description:"Priority support, unlimited projects, white labelling, SSO enforcement, and features for collaboration with team members",price_description:null,image_url:"None",icon_key:"IconBuilding",docs_url:"https://posthog.com/pricing",type:"teams",tiers:[],tiered:!1,included_with_main_product:!1,subscribed:!1,unit:null,unit_amount_usd:null,current_amount_usd:null,current_usage:0,projected_usage:0,projected_amount_usd:null,plans:[{plan_key:"addon-20240411",product_key:"teams",name:"Teams addon",description:"Priority support, unlimited projects, white labelling, SSO enforcement, and features for collaboration with team members",image_url:null,docs_url:"https://posthog.com/pricing",note:null,unit:"month",flat_rate:!0,free_allocation:null,features:[{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:null,limit:null,note:"Unlimited"},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",unit:null,limit:null,note:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",unit:null,limit:null,note:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",unit:null,limit:null,note:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",unit:null,limit:null,note:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",unit:null,limit:null,note:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",unit:null,limit:null,note:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",unit:null,limit:null,note:"Project-based only"},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",unit:null,limit:null,note:"Basic"},{key:"security_assessment",name:"Security assessment",description:"Security assessment",unit:null,limit:null,note:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",unit:null,limit:null,note:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",unit:null,limit:null,note:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",unit:null,limit:null,note:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",unit:null,limit:null,note:"12 hours"},{key:"automatic_provisioning",name:"Automatic provisioning",description:"Verify your domains to enforce SSO and automatically add users with matching email addresses to your organization.",unit:null,limit:null,note:null},{key:"managed_reverse_proxy",name:"Managed reverse proxy",description:"Send events through your own domain to capture more usage data without having to self-host PostHog.",images:null,icon_key:null,type:null}],tiers:[],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:"450.00"}],contact_support:null,inclusion_only:!1,included_if:null,features:[{key:"automatic_provisioning",name:"Automatic provisioning",description:"Verify your domains to enforce SSO and automatically add users with matching email addresses to your organization.",images:null,icon_key:null,type:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",images:null,icon_key:null,type:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",images:null,icon_key:null,type:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",images:null,icon_key:null,type:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",images:null,icon_key:null,type:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",images:null,icon_key:null,type:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",images:null,icon_key:null,type:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",images:null,icon_key:null,type:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",images:null,icon_key:null,type:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",images:null,icon_key:null,type:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",images:null,icon_key:null,type:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",images:null,icon_key:null,type:null},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",images:null,icon_key:null,type:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",images:null,icon_key:null,type:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",images:null,icon_key:null,type:null},{key:"managed_reverse_proxy",name:"Managed reverse proxy",description:"Send events through your own domain to capture more usage data without having to self-host PostHog.",images:null,icon_key:null,type:null}],usage_key:void 0,usage_limit:null}],contact_support:!1,inclusion_only:!0,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",images:null,icon_key:null,type:null},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",images:null,icon_key:null,type:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",images:null,icon_key:null,type:null},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",images:null,icon_key:null,type:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",images:null,icon_key:null,type:null},{key:"role_based_access",name:"Role-based access",description:"Control access to features like experiments, session recordings, and feature flags with custom roles.",images:null,icon_key:null,type:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",images:null,icon_key:null,type:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",images:null,icon_key:null,type:null},{key:"saml",name:"SAML SSO",description:"Allow your organization's users to log in with SAML.",images:null,icon_key:null,type:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",images:null,icon_key:null,type:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",images:null,icon_key:null,type:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",images:null,icon_key:null,type:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",images:null,icon_key:null,type:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",images:null,icon_key:null,type:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",images:null,icon_key:null,type:null},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",images:null,icon_key:null,type:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",images:null,icon_key:null,type:null},{key:"training",name:"Ongoing training",description:"Get training from our team to help you quickly get up and running with PostHog.",images:null,icon_key:null,type:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",images:null,icon_key:null,type:null},{key:"terms_and_conditions",name:"Terms and conditions",description:"Terms and conditions",images:null,icon_key:null,type:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",images:null,icon_key:null,type:null},{key:"bespoke_pricing",name:"Bespoke pricing",description:"Custom pricing to fit your company's needs.",images:null,icon_key:null,type:null},{key:"invoice_payments",name:"Payment via invoicing",description:"Pay for your PostHog subscription via invoice.",images:null,icon_key:null,type:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",images:null,icon_key:null,type:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",images:null,icon_key:null,type:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",images:null,icon_key:null,type:null},{key:"custom_msa",name:"Custom MSA",description:"Get a custom Master Services Agreement (MSA) to use PostHog in a way that fits your company's needs.",images:null,icon_key:null,type:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",images:null,icon_key:null,type:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",images:null,icon_key:null,type:null}]}],custom_limits_usd:{},stripe_portal_url:"https://billing.stripe.com/p/session/test_YWNjdF8xSElNRERFdUlhdFJYU2R6LF9QaEVJR3VyemlvMDZzRzdiQXZrc1AxSjNXZk1BellP0100ZsforDQG",subscription_level:"paid"}},"./frontend/src/mocks/handlers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{vv:()=>EMPTY_PAGINATED_RESPONSE,jI:()=>defaultMocks,qi:()=>handlers,Pb:()=>toPaginatedResponse});var api_mock=__webpack_require__("./frontend/src/lib/api.mock.ts"),features=__webpack_require__("./frontend/src/mocks/features.ts"),_billing=__webpack_require__("./frontend/src/mocks/fixtures/_billing.tsx");let _hogFunctionTemplates_namespaceObject=JSON.parse('{"count":26,"next":null,"previous":null,"results":[{"sub_templates":[{"id":"early-access-feature-enrollment","name":"Post to Slack on feature enrollment","description":"Posts a message to Slack when a user enrolls or un-enrolls in an early access feature","filters":{"events":[{"id":"$feature_enrollment_update","type":"events"}]},"masking":null,"inputs":{"text":"*{person.name}* {event.properties.$feature_enrollment ? \'enrolled in\' : \'un-enrolled from\'} the early access feature for \'{event.properties.$feature_flag}\'","blocks":[{"text":{"text":"*{person.name}* {event.properties.$feature_enrollment ? \'enrolled in\' : \'un-enrolled from\'} the early access feature for \'{event.properties.$feature_flag}\'","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{person.url}","text":{"text":"View Person in PostHog","type":"plain_text"},"type":"button"}]}]}},{"id":"survey-response","name":"Post to Slack on survey response","description":"Posts a message to Slack when a user responds to a survey","filters":{"events":[{"id":"survey sent","type":"events","properties":[{"key":"$survey_response","type":"event","value":"is_set","operator":"is_set"}]}]},"masking":null,"inputs":{"text":"*{person.name}* responded to survey *{event.properties.$survey_name}*","blocks":[{"text":{"text":"*{person.name}* responded to survey *{event.properties.$survey_name}*","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{project.url}/surveys/{event.properties.$survey_id}","text":{"text":"View Survey","type":"plain_text"},"type":"button"},{"url":"{person.url}","text":{"text":"View Person","type":"plain_text"},"type":"button"}]}]}}],"status":"free","id":"template-slack","name":"Slack","description":"Sends a message to a slack channel","hog":"let res := fetch(\'https://slack.com/api/chat.postMessage\', {\\n \'body\': {\\n \'channel\': inputs.channel,\\n \'icon_emoji\': inputs.icon_emoji,\\n \'username\': inputs.username,\\n \'blocks\': inputs.blocks,\\n \'text\': inputs.text\\n },\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.slack_workspace.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status != 200 or not res.body.ok) {\\n throw Error(f\'Failed to post message to Slack: {res.status}: {res.body}\');\\n}","inputs_schema":[{"key":"slack_workspace","type":"integration","integration":"slack","label":"Slack workspace","secret":false,"required":true},{"key":"channel","type":"integration_field","integration_key":"slack_workspace","integration_field":"slack_channel","label":"Channel to post to","description":"Select the channel to post to (e.g. #general). The PostHog app must be installed in the workspace.","secret":false,"required":true},{"key":"icon_emoji","type":"string","label":"Emoji icon","default":":hedgehog:","required":false,"secret":false},{"key":"username","type":"string","label":"Bot name","default":"PostHog","required":false,"secret":false},{"key":"blocks","type":"json","label":"Blocks","description":"(see https://api.slack.com/block-kit/building)","default":[{"text":{"text":"*{person.name}* triggered event: \'{event.event}\'","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{person.url}","text":{"text":"View Person in PostHog","type":"plain_text"},"type":"button"},{"url":"{source.url}","text":{"text":"Message source","type":"plain_text"},"type":"button"}]}],"secret":false,"required":false},{"key":"text","type":"string","label":"Plain text message","description":"Optional fallback message if blocks are not provided or supported","default":"*{person.name}* triggered event: \'{event.event}\'","secret":false,"required":false}],"category":["Customer Success"],"filters":null,"masking":null,"icon_url":"/static/services/slack.png"},{"sub_templates":[{"id":"early-access-feature-enrollment","name":"HTTP Webhook on feature enrollment","description":null,"filters":{"events":[{"id":"$feature_enrollment_update","type":"events"}]},"masking":null,"inputs":null},{"id":"survey-response","name":"HTTP Webhook on survey response","description":null,"filters":{"events":[{"id":"survey sent","type":"events","properties":[{"key":"$survey_response","type":"event","value":"is_set","operator":"is_set"}]}]},"masking":null,"inputs":null}],"status":"beta","id":"template-webhook","name":"HTTP Webhook","description":"Sends a webhook templated by the incoming event data","hog":"let res := fetch(inputs.url, {\\n \'headers\': inputs.headers,\\n \'body\': inputs.body,\\n \'method\': inputs.method\\n});\\n\\nif (inputs.debug) {\\n print(\'Response\', res.status, res.body);\\n}","inputs_schema":[{"key":"url","type":"string","label":"Webhook URL","secret":false,"required":true},{"key":"method","type":"choice","label":"Method","secret":false,"choices":[{"label":"POST","value":"POST"},{"label":"PUT","value":"PUT"},{"label":"PATCH","value":"PATCH"},{"label":"GET","value":"GET"},{"label":"DELETE","value":"DELETE"}],"default":"POST","required":false},{"key":"body","type":"json","label":"JSON Body","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false},{"key":"headers","type":"dictionary","label":"Headers","secret":false,"required":false},{"key":"debug","type":"boolean","label":"Log responses","description":"Logs the response of http calls for debugging.","secret":false,"required":false,"default":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/posthog-icon.svg"},{"sub_templates":null,"status":"beta","id":"template-activecampaign","name":"ActiveCampaign","description":"Creates a new contact in ActiveCampaign whenever an event is triggered.","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet contact := {\\n \'email\': inputs.email,\\n \'fieldValues\': [],\\n}\\n\\nif (not empty(inputs.firstName)) contact.firstName := inputs.firstName\\nif (not empty(inputs.lastName)) contact.lastName := inputs.lastName\\nif (not empty(inputs.phone)) contact.phone := inputs.phone\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n contact.fieldValues := arrayPushBack(contact.fieldValues, {\'field\': key, \'value\': value})\\n }\\n}\\n\\nlet res := fetch(f\'https://{inputs.accountName}.api-us1.com/api/3/contact/sync\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'content-type\': \'application/json\',\\n \'Api-Token\': inputs.apiKey\\n },\\n \'body\': {\\n \'contact\': contact\\n }\\n})\\n\\nif (res.status >= 400) {\\n print(f\'Error from {inputs.accountName}.api-us1.com api:\', res.status, res.body)\\n} else {\\n print(\'Contact has been created or updated successfully!\')\\n}","inputs_schema":[{"key":"accountName","type":"string","label":"Account name","description":"Usually in the form of .activehosted.com. You can use this page to figure our your account name: https://www.activecampaign.com/login/lookup.php","default":"","secret":false,"required":true},{"key":"apiKey","type":"string","label":"Your ActiveCampaign API Key","description":"See the docs here: https://help.activecampaign.com/hc/en-us/articles/207317590-Getting-started-with-the-API#h_01HJ6REM2YQW19KYPB189726ST","default":"","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true},{"key":"firstName","type":"string","label":"First name of the user","description":"Where to find the first name for the contact to be created.","default":"{person.properties.firstName}","secret":false,"required":true},{"key":"lastName","type":"string","label":"Last name of the user","description":"Where to find the last name for the contact to be created.","default":"{person.properties.lastName}","secret":false,"required":true},{"key":"phone","type":"string","label":"Phone number of the user","description":"Where to find the phone number for the contact to be created.","default":"{person.properties.phone}","secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Additional person fields","description":"Map any values to ActiveCampaign person fields. (fieldId:value)","default":{"1":"{person.properties.company}","2":"{person.properties.website}"},"secret":false,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/activecampaign.png"},{"sub_templates":null,"status":"beta","id":"template-avo","name":"Avo","description":"Send events to Avo","hog":"if (empty(inputs.apiKey) or empty(inputs.environment)) {\\n print(\'API Key and environment has to be set. Skipping...\')\\n return\\n}\\n\\nlet avoEvent := {\\n \'apiKey\': inputs.apiKey,\\n \'env\': inputs.environment,\\n \'appName\': inputs.appName,\\n \'sessionId\': event.properties.$session_id ?? generateUUIDv4(),\\n \'createdAt\': toString(toDateTime(toUnixTimestamp(now()))),\\n \'avoFunction\': false,\\n \'eventId\': null,\\n \'eventHash\': null,\\n \'appVersion\': \'1.0.0\',\\n \'libVersion\': \'1.0.0\',\\n \'libPlatform\': \'node\',\\n \'trackingId\': \'\',\\n \'samplingRate\': 1,\\n \'type\': \'event\',\\n \'eventName\': event.event,\\n \'messageId\': event.uuid,\\n \'eventProperties\': []\\n}\\n\\nfun getPropValueType(propValue) {\\n let propType := typeof(propValue)\\n if (propValue == null) {\\n return \'null\'\\n } else if (propType == \'string\') {\\n return \'string\'\\n } else if (propType == \'integer\') {\\n return \'int\'\\n } else if (propType == \'float\') {\\n return \'float\'\\n } else if (propType == \'boolean\') {\\n return \'boolean\'\\n } else if (propType == \'object\') {\\n return \'object\'\\n } else if (propType == \'array\') {\\n return \'list\'\\n } else {\\n return propType\\n }\\n}\\n\\nfor (let key, value in event.properties) {\\n let excludeProperties := arrayMap(x -> trim(x), splitByString(\',\', inputs.excludeProperties))\\n let includeProperties := arrayMap(x -> trim(x), splitByString(\',\', inputs.includeProperties))\\n let isExcluded := has(excludeProperties, key)\\n let isIncluded := includeProperties[1] == \'\' or has(includeProperties, key)\\n\\n if (not (key like \'$%\' or isExcluded or not isIncluded)) {\\n avoEvent.eventProperties := arrayPushBack(avoEvent.eventProperties, { \'propertyName\': key, \'propertyType\': getPropValueType(value) })\\n }\\n}\\n\\nfetch(\'https://api.avo.app/inspector/posthog/v1/track\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'env\': inputs.environment,\\n \'api-key\': inputs.apiKey,\\n \'content-type\': \'application/json\',\\n \'accept\': \'application/json\',\\n },\\n \'body\': [avoEvent]\\n})","inputs_schema":[{"key":"apiKey","type":"string","label":"Avo API Key","description":"Avo source API key","default":"","secret":true,"required":true},{"key":"environment","type":"string","label":"Environment","description":"Environment name","default":"dev","secret":false,"required":false},{"key":"appName","type":"string","label":"App name","description":"App name","default":"PostHog","secret":false,"required":false},{"key":"excludeProperties","type":"string","label":"Properties to exclude","description":"Comma-separated list of event properties that will not be sent to Avo.","default":"","secret":false,"required":false},{"key":"includeProperties","type":"string","label":"Properties to include","description":"Comma separated list of event properties to send to Avo (will send all if left empty).","default":"","secret":false,"required":false}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/avo.png"},{"sub_templates":null,"status":"beta","id":"template-aws-kinesis","name":"AWS Kinesis","description":"Put data to an AWS Kinesis stream","hog":"fun getPayload() {\\n let region := inputs.aws_region\\n let service := \'kinesis\'\\n let amzDate := formatDateTime(now(), \'%Y%m%dT%H%i%sZ\')\\n let date := formatDateTime(now(), \'%Y%m%d\')\\n\\n let payload := jsonStringify({\\n \'StreamName\': inputs.aws_kinesis_stream_arn,\\n \'PartitionKey\': inputs.aws_kinesis_partition_key ?? generateUUIDv4(),\\n \'Data\': base64Encode(jsonStringify(inputs.payload)),\\n })\\n\\n let requestHeaders := {\\n \'Content-Type\': \'application/x-amz-json-1.1\',\\n \'X-Amz-Target\': \'Kinesis_20131202.PutRecord\',\\n \'X-Amz-Date\': amzDate,\\n \'Host\': f\'kinesis.{region}.amazonaws.com\',\\n }\\n\\n let canonicalHeaderParts := []\\n for (let key, value in requestHeaders) {\\n let val := replaceAll(trim(value), \'\\\\\\\\s+\', \' \')\\n canonicalHeaderParts := arrayPushBack(canonicalHeaderParts, f\'{lower(key)}:{val}\')\\n }\\n let canonicalHeaders := arrayStringConcat(arraySort(canonicalHeaderParts), \'\\\\n\') || \'\\\\n\'\\n\\n let signedHeaderParts := []\\n for (let key, value in requestHeaders) {\\n signedHeaderParts := arrayPushBack(signedHeaderParts, lower(key))\\n }\\n let signedHeaders := arrayStringConcat(arraySort(signedHeaderParts), \';\')\\n\\n let canonicalRequest := arrayStringConcat([\\n \'POST\',\\n \'/\',\\n \'\',\\n canonicalHeaders,\\n signedHeaders,\\n sha256Hex(payload),\\n ], \'\\\\n\')\\n\\n let credentialScope := f\'{date}/{region}/{service}/aws4_request\'\\n let stringToSign := arrayStringConcat([\\n \'AWS4-HMAC-SHA256\',\\n amzDate,\\n credentialScope,\\n sha256Hex(canonicalRequest),\\n ], \'\\\\n\')\\n\\n let signature := sha256HmacChainHex([\\n f\'AWS4{inputs.aws_secret_access_key}\', date, region, service, \'aws4_request\', stringToSign\\n ])\\n\\n let authorizationHeader :=\\n f\'AWS4-HMAC-SHA256 Credential={inputs.aws_access_key_id}/{credentialScope}, \' ||\\n f\'SignedHeaders={signedHeaders}, \' ||\\n f\'Signature={signature}\'\\n\\n requestHeaders[\'Authorization\'] := authorizationHeader\\n\\n return {\\n \'headers\': requestHeaders,\\n \'body\': payload,\\n \'method\': \'POST\'\\n }\\n}\\n\\nlet res := fetch(f\'https://kinesis.{inputs.aws_region}.amazonaws.com\', getPayload())\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n print(\'Error sending event:\', res.status, res.body)\\n}","inputs_schema":[{"key":"aws_access_key_id","type":"string","label":"AWS Access Key ID","secret":true,"required":true},{"key":"aws_secret_access_key","type":"string","label":"AWS Secret Access Key","secret":true,"required":true},{"key":"aws_region","type":"string","label":"AWS Region","secret":false,"required":true,"default":"us-east-1"},{"key":"aws_kinesis_stream_arn","type":"string","label":"Kinesis Stream ARN","secret":false,"required":true},{"key":"aws_kinesis_partition_key","type":"string","label":"Kinesis Partition Key","description":"If not provided, a random UUID will be generated.","default":"{event.uuid}","secret":false,"required":false},{"key":"payload","type":"json","label":"Message Payload","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/aws-kinesis.png"},{"sub_templates":null,"status":"beta","id":"template-braze","name":"Braze","description":"Send events to Braze","hog":"let getPayload := () -> [{\\n \'attributes\': inputs.attributes,\\n \'events\': [inputs.event]\\n}]\\n\\nlet res := fetch(f\'{inputs.brazeEndpoint}/users/track\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.apiKey}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': getPayload()\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(f\'Error sending event: {res.status} {res.body}\')\\n}","inputs_schema":[{"key":"brazeEndpoint","type":"choice","label":"Braze REST Endpoint","description":"The endpoint identifier where your Braze instance is located, see the docs here: https://www.braze.com/docs/api/basics","choices":[{"label":"US-01","value":"https://rest.iad-01.braze.com"},{"label":"US-02","value":"https://rest.iad-02.braze.com"},{"label":"US-03","value":"https://rest.iad-03.braze.com"},{"label":"US-04","value":"https://rest.iad-04.braze.com"},{"label":"US-05","value":"https://rest.iad-05.braze.com"},{"label":"US-06","value":"https://rest.iad-06.braze.com"},{"label":"US-08","value":"https://rest.iad-08.braze.com"},{"label":"EU-01","value":"https://rest.fra-01.braze.eu"},{"label":"EU-02","value":"https://rest.fra-02.braze.eu"}],"default":"","secret":false,"required":true},{"key":"apiKey","type":"string","label":"Your Braze API Key","description":"See the docs here: https://www.braze.com/docs/api/api_key/","default":"","secret":true,"required":true},{"key":"attributes","type":"json","label":"Attributes to set","default":{"email":"{person.properties.email}"},"secret":false,"required":true},{"key":"event","type":"json","label":"Event payload","default":{"properties":"{event.properties}","external_id":"{event.distinct_id}","name":"{event.event}","time":"{event.timestamp}"},"secret":false,"required":true}],"category":["Customer Success"],"filters":null,"masking":null,"icon_url":"/static/services/braze.png"},{"sub_templates":null,"status":"alpha","id":"template-clearbit","name":"Clearbit","description":"Loads data from the Clearbit API and tracks an additional event with the enriched data if found. Once enriched, the person will not be enriched again.","hog":"let api_key := inputs.api_key\\nlet email := inputs.email\\n\\nif (empty(email) or event.event == \'$set\' or person.properties.clearbit_enriched) {\\n return false\\n}\\n\\nlet response := fetch(f\'https://person-stream.clearbit.com/v2/combined/find?email={email}\', {\\n \'method\': \'GET\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {api_key}\'\\n }\\n})\\nif (response.status == 200 and not empty(response.body.person)) {\\n print(\'Clearbit data found - sending event to PostHog\')\\n postHogCapture({\\n \'event\': \'$set\',\\n \'distinct_id\': event.distinct_id,\\n \'properties\': {\\n \'$lib\': \'hog_function\',\\n \'$hog_function_source\': source.url,\\n \'$set_once\': {\\n \'person\': response.body.person,\\n \'company\': response.body.company,\\n \'clearbit_enriched\': true\\n }\\n }\\n })\\n} else {\\n print(\'No Clearbit data found\')\\n}","inputs_schema":[{"key":"api_key","type":"string","label":"Clearbit API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Clearbit","default":"{person.properties.email}","secret":false,"required":true}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/clearbit.png"},{"sub_templates":null,"status":"beta","id":"template-customerio","name":"Customer.io","description":"Identify or track events against customers in Customer.io","hog":"let action := inputs.action\\nlet name := event.event\\n\\nlet hasIdentifier := false\\n\\nfor (let key, value in inputs.identifiers) {\\n if (not empty(value)) {\\n hasIdentifier := true\\n }\\n}\\n\\nif (not hasIdentifier) {\\n print(\'No identifier set. Skipping as at least 1 identifier is needed.\')\\n return\\n}\\n\\nif (action == \'automatic\') {\\n if (event.event in (\'$identify\', \'$set\')) {\\n action := \'identify\'\\n name := null\\n } else if (event.event == \'$pageview\') {\\n action := \'page\'\\n name := event.properties.$current_url\\n } else if (event.event == \'$screen\') {\\n action := \'screen\'\\n name := event.properties.$screen_name\\n } else {\\n action := \'event\'\\n }\\n}\\n\\nlet attributes := inputs.include_all_properties ? action == \'identify\' ? person.properties : event.properties : {}\\nif (inputs.include_all_properties and action != \'identify\' and not empty(event.elements_chain)) {\\n attributes[\'$elements_chain\'] := event.elements_chain\\n}\\nlet timestamp := toInt(toUnixTimestamp(toDateTime(event.timestamp)))\\n\\nfor (let key, value in inputs.attributes) {\\n attributes[key] := value\\n}\\n\\nlet res := fetch(f\'https://{inputs.host}/api/v2/entity\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'User-Agent\': \'PostHog Customer.io App\',\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.site_id}:{inputs.token}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'type\': \'person\',\\n \'action\': action,\\n \'name\': name,\\n \'identifiers\': inputs.identifiers,\\n \'attributes\': attributes,\\n \'timestamp\': timestamp\\n }\\n})\\n\\nif (res.status >= 400) {\\n throw Error(f\'Error from customer.io api: {res.status}: {res.body}\');\\n}","inputs_schema":[{"key":"site_id","type":"string","label":"Customer.io site ID","secret":false,"required":true},{"key":"token","type":"string","label":"Customer.io API Key","description":"You can find your API key in your Customer.io account settings (https://fly.customer.io/settings/api_credentials)","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (track.customer.io)","value":"track.customer.io"},{"label":"EU (track-eu.customer.io)","value":"track-eu.customer.io"}],"label":"Customer.io region","description":"Use the EU variant if your Customer.io account is based in the EU region","default":"track.customer.io","secret":false,"required":true},{"key":"identifiers","type":"dictionary","label":"Identifiers","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://customer.io/docs/api/track/#operation/entity","default":{"email":"{person.properties.email}"},"secret":false,"required":true},{"key":"action","type":"choice","label":"Action","description":"Choose the action to be tracked. Automatic will convert $identify, $pageview and $screen to identify, page and screen automatically - otherwise defaulting to event","default":"automatic","choices":[{"label":"Automatic","value":"automatic"},{"label":"Identify","value":"identify"},{"label":"Event","value":"event"},{"label":"Page","value":"page"},{"label":"Screen","value":"screen"},{"label":"Delete","value":"delete"}],"secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below. For identify events the Person properties will be used.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Customer.io attributes and their values. You can use the filters section to filter out unwanted events.","default":{"email":"{person.properties.email}","lastname":"{person.properties.lastname}","firstname":"{person.properties.firstname}"},"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$pageview","name":"$pageview","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/customerio.png"},{"sub_templates":null,"status":"beta","id":"template-engage-so","name":"Engage.so","description":"Send events to Engage.so","hog":"fetch(\'https://api.engage.so/posthog\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.public_key}:{inputs.private_key}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': event\\n})","inputs_schema":[{"key":"public_key","type":"string","label":"Public key","description":"Get your public key from your Engage dashboard (Settings -> Account)","secret":true,"required":true},{"key":"private_key","type":"string","label":"Private key","description":"Get your private key from your Engage dashboard (Settings -> Account)","secret":true,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1},{"id":"$groupidentify","name":"$groupidentify","type":"events","order":2},{"id":"$unset","name":"$unset","type":"events","order":3},{"id":"$create_alias","name":"$create_alias","type":"events","order":4}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/engage.png"},{"sub_templates":null,"status":"beta","id":"template-gleap","name":"Gleap","description":"Updates a contact in Gleap","hog":"let action := inputs.action\\nlet name := event.event\\n\\nif (empty(inputs.userId)) {\\n print(\'No User ID set. Skipping...\')\\n return\\n}\\n\\nlet attributes := inputs.include_all_properties ? person.properties : {}\\n\\nattributes[\'userId\'] := inputs.userId\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n attributes[key] := value\\n }\\n}\\n\\nlet res := fetch(f\'https://api.gleap.io/admin/identify\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'User-Agent\': \'PostHog Gleap.io App\',\\n \'Api-Token\': inputs.apiKey,\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': attributes\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from gleap.io api:\', res.status, res.body)\\n}","inputs_schema":[{"key":"apiKey","type":"string","label":"Gleap.io API Key","secret":true,"required":true},{"key":"userId","type":"string","label":"User ID","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://docs.gleap.io/server/rest-api","default":"{person.id}","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Gleap.io attributes and their values. You can use the filters section to filter out unwanted events.","default":{"email":"{person.properties.email}","name":"{person.properties.name}","phone":"{person.properties.phone}"},"secret":false,"required":false}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/gleap.png"},{"sub_templates":null,"status":"beta","id":"template-google-cloud-storage","name":"Google Cloud Storage","description":"Send data to GCS. This creates a file per event.","hog":"let res := fetch(f\'https://storage.googleapis.com/upload/storage/v1/b/{encodeURLComponent(inputs.bucketName)}/o?uploadType=media&name={encodeURLComponent(inputs.filename)}\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.auth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': inputs.payload\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(\'Error sending event\', res)\\n}","inputs_schema":[{"key":"auth","type":"integration","integration":"google-cloud-storage","label":"Google Cloud service account","secret":false,"required":true},{"key":"bucketName","type":"string","label":"Bucket name","secret":false,"required":true},{"key":"filename","type":"string","label":"Filename","default":"{toDate(event.timestamp)}/{event.timestamp}-{event.uuid}.json","secret":false,"required":true},{"key":"payload","type":"string","label":"File contents","default":"{jsonStringify({ \'event\': event, \'person\': person })}","secret":false,"required":true}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/google-cloud-storage.png"},{"sub_templates":null,"status":"beta","id":"template-google-pubsub","name":"Google Pub/Sub","description":"Send data to a Google Pub/Sub topic","hog":"let headers := () -> {\\n \'Authorization\': f\'Bearer {inputs.auth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n}\\nlet message := () -> {\\n \'messageId\': event.uuid,\\n \'data\': base64Encode(jsonStringify(inputs.payload)),\\n \'attributes\': inputs.attributes\\n}\\nlet res := fetch(f\'https://pubsub.googleapis.com/v1/{inputs.topicId}:publish\', {\\n \'method\': \'POST\',\\n \'headers\': headers(),\\n \'body\': jsonStringify({ \'messages\': [message()] })\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(\'Error sending event\', res)\\n}","inputs_schema":[{"key":"auth","type":"integration","integration":"google-pubsub","label":"Google Cloud service account","secret":false,"required":true},{"key":"topicId","type":"string","label":"Topic name","secret":false,"required":true},{"key":"payload","type":"json","label":"Message Payload","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false},{"key":"attributes","type":"json","label":"Attributes","default":{},"secret":false,"required":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/google-cloud.png"},{"sub_templates":null,"status":"beta","id":"template-hubspot","name":"Hubspot","description":"Creates a new contact in Hubspot whenever an event is triggered.","hog":"let properties := inputs.properties\\nproperties.email := inputs.email\\n\\nif (empty(properties.email)) {\\n print(\'`email` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet headers := {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n}\\n\\nlet res := fetch(\'https://api.hubapi.com/crm/v3/objects/contacts\', {\\n \'method\': \'POST\',\\n \'headers\': headers,\\n \'body\': {\\n \'properties\': properties\\n }\\n})\\n\\nif (res.status == 409) {\\n let existingId := replaceOne(res.body.message, \'Contact already exists. Existing ID: \', \'\')\\n let updateRes := fetch(f\'https://api.hubapi.com/crm/v3/objects/contacts/{existingId}\', {\\n \'method\': \'PATCH\',\\n \'headers\': headers,\\n \'body\': {\\n \'properties\': properties\\n }\\n })\\n\\n if (updateRes.status != 200 or updateRes.body.status == \'error\') {\\n print(\'Error updating contact:\', updateRes.body)\\n return\\n }\\n print(\'Contact updated successfully!\')\\n return\\n} else if (res.status >= 300 or res.body.status == \'error\') {\\n print(\'Error creating contact:\', res.body)\\n return\\n} else {\\n print(\'Contact created successfully!\')\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"hubspot","label":"Hubspot connection","secret":false,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Property mapping","description":"Map any event properties to Hubspot properties.","default":{"firstname":"{person.properties.firstname}","lastname":"{person.properties.lastname}","company":"{person.properties.company}","phone":"{person.properties.phone}","website":"{person.properties.website}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/hubspot.png"},{"sub_templates":null,"status":"beta","id":"template-Intercom","name":"Intercom","description":"Send events and contact information to Intercom","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Skipping.\')\\n return\\n}\\n\\nlet res := fetch(f\'https://{inputs.host}/events\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.access_token}\',\\n \'Content-Type\': \'application/json\',\\n \'Accept\': \'application/json\'\\n },\\n \'body\': {\\n \'event_name\': event.event,\\n \'created_at\': toInt(toUnixTimestamp(toDateTime(event.timestamp))),\\n \'email\': inputs.email,\\n \'id\': event.distinct_id,\\n }\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n return\\n}\\n\\nif (res.status == 404) {\\n print(\'No existing contact found for email\')\\n return\\n}\\n\\nprint(\'Error sending event:\', res.status, res.body)","inputs_schema":[{"key":"access_token","type":"string","label":"Intercom access token","description":"Create an Intercom app (https://developers.intercom.com/docs/build-an-integration/learn-more/authentication), then go to Configure > Authentication to find your token.","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (api.intercom.io)","value":"api.intercom.io"},{"label":"EU (api.eu.intercom.com)","value":"api.eu.intercom.com"}],"label":"Data region","description":"Use the EU variant if your Intercom account is based in the EU region","default":"api.intercom.io","secret":false,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/intercom.png"},{"sub_templates":null,"status":"beta","id":"template-knock","name":"Knock","description":"Send events to Knock","hog":"if (empty(inputs.userId)) {\\n print(\'No User ID set. Skipping...\')\\n return\\n}\\n\\nlet body := {\\n \'type\': \'track\',\\n \'event\': event.event,\\n \'userId\': inputs.userId,\\n \'properties\': inputs.include_all_properties ? event.properties : {},\\n \'messageId\': event.uuid,\\n \'timestamp\': event.timestamp\\n}\\nif (inputs.include_all_properties and not empty(event.elements_chain)) {\\n body[\'properties\'][\'$elements_chain\'] := event.elements_chain\\n}\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n body[\'properties\'][key] := value\\n }\\n}\\n\\nlet res := fetch(inputs.webhookUrl, {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': body\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from knock.app api:\', res.status, res.body)\\n}","inputs_schema":[{"key":"webhookUrl","type":"string","label":"Knock.app webhook destination URL","secret":false,"required":true},{"key":"userId","type":"string","label":"User ID","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://docs.gleap.io/server/rest-api","default":"{person.id}","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Knock.app attributes and their values. You can use the filters section to filter out unwanted events.","default":{"price":"{event.properties.price}"},"secret":false,"required":false}],"category":["SMS & Push Notifications"],"filters":null,"masking":null,"icon_url":"/static/services/knock.png"},{"sub_templates":null,"status":"beta","id":"template-loops","name":"Loops","description":"Send events to Loops","hog":"let apiKey := inputs.apiKey\\n\\nlet payload := {\\n \'userId\': event.distinct_id,\\n \'eventName\': event.event == \'$set\' ? \'$identify\' : event.event,\\n \'email\': person.properties.email\\n}\\nfor (let key, value in person.properties) {\\n payload[key] := value\\n}\\nfetch(\'https://app.loops.so/api/v1/events/send\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\',\\n \'Authorization\': f\'Bearer {apiKey}\',\\n },\\n \'body\': payload\\n})","inputs_schema":[{"key":"apiKey","type":"string","label":"Loops API Key","description":"Loops API Key","default":"","secret":true,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/loops.png"},{"sub_templates":null,"status":"alpha","id":"template-mailgun-send-email","name":"Mailgun","description":"Send emails using the Mailgun HTTP API","hog":"if (empty(inputs.template.to)) {\\n return false\\n}\\n\\nfun multiPartFormEncode(data) {\\n let boundary := f\'---011000010111000001101001\'\\n let bodyBoundary := f\'--{boundary}\\\\r\\\\n\'\\n let body := bodyBoundary\\n\\n for (let key, value in data) {\\n if (not empty(value)) {\\n body := f\'{body}Content-Disposition: form-data; name=\\"{key}\\"\\\\r\\\\n\\\\r\\\\n{value}\\\\r\\\\n{bodyBoundary}\'\\n }\\n }\\n\\n return {\\n \'body\': body,\\n \'contentType\': f\'multipart/form-data; boundary={boundary}\'\\n }\\n}\\n\\nlet form := multiPartFormEncode({\\n \'from\': inputs.template.from,\\n \'to\': inputs.template.to,\\n \'subject\': inputs.template.subject,\\n \'text\': inputs.template.text,\\n \'html\': inputs.template.html\\n})\\n\\nlet res := fetch(f\'https://{inputs.host}/v3/{inputs.domain_name}/messages\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'api:{inputs.api_key}\')}\',\\n \'Content-Type\': form.contentType\\n },\\n \'body\': form.body\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from Mailgun API:\', res.status, res.body)\\n}","inputs_schema":[{"key":"domain_name","type":"string","label":"Mailgun Domain Name","description":"The domain name of the Mailgun account","secret":false,"required":true},{"key":"api_key","type":"string","label":"Mailgun API Key","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (api.mailgun.net)","value":"api.mailgun.net"},{"label":"EU (api.eu.mailgun.net)","value":"api.eu.mailgun.net"}],"label":"Region","default":"api.eu.mailgun.net","secret":false,"required":true},{"key":"template","type":"email","label":"Email template","default":{"to":"{person.properties.email}"},"secret":false,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"","name":"","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailgun.png"},{"sub_templates":null,"status":"beta","id":"template-mailjet-create-contact","name":"Mailjet","description":"Add contacts to Mailjet","hog":"if (empty(inputs.email)) {\\n return false\\n}\\n\\nfetch(f\'https://api.mailjet.com/v3/REST/contact/\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'Email\': inputs.email,\\n \'Name\': inputs.name,\\n \'IsExcludedFromCampaigns\': inputs.is_excluded_from_campaigns\\n }\\n})","inputs_schema":[{"key":"api_key","type":"string","label":"Mailjet API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Mailjet","default":"{person.properties.email}","secret":false,"required":true},{"key":"name","type":"string","label":"Name","description":"Name of the contact","default":"{person.properties.first_name} {person.properties.last_name}","secret":false,"required":false},{"key":"is_excluded_from_campaigns","type":"boolean","label":"Is excluded from campaigns","description":"Whether the contact should be excluded from campaigns","default":false,"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailjet.png"},{"sub_templates":null,"status":"beta","id":"template-mailjet-update-contact-list","name":"Mailjet","description":"Update a Mailjet contact list","hog":"if (empty(inputs.email)) {\\n return false\\n}\\n\\nfetch(f\'https://api.mailjet.com/v3/REST/contact/{inputs.email}/managecontactlists\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'ContactsLists\':[\\n {\\n \'Action\': inputs.action,\\n \'ListID\': inputs.contact_list_id\\n },\\n ]\\n }\\n})","inputs_schema":[{"key":"api_key","type":"string","label":"Mailjet API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Mailjet","default":"{person.properties.email}","secret":false,"required":true},{"key":"contact_list_id","type":"string","label":"Contact list ID","description":"ID of the contact list","secret":false,"required":true},{"key":"action","type":"choice","label":"Action","secret":false,"default":"addnoforce","required":true,"choices":[{"label":"Add","value":"addnoforce"},{"label":"Add (force)","value":"addforce"},{"label":"Remove","value":"remove"},{"label":"Unsubscribe","value":"unsub"}]}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailjet.png"},{"sub_templates":null,"status":"beta","id":"template-posthog-replicator","name":"PostHog","description":"Send a copy of the incoming data in realtime to another PostHog instance","hog":"let host := inputs.host\\nlet token := inputs.token\\nlet include_all_properties := inputs.include_all_properties\\nlet propertyOverrides := inputs.properties\\nlet properties := include_all_properties ? event.properties : {}\\n\\nfor (let key, value in propertyOverrides) {\\n properties[key] := value\\n}\\n\\nfetch(f\'{host}/e\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'token\': token,\\n \'event\': event.event,\\n \'timestamp\': event.timestamp,\\n \'distinct_id\': event.distinct_id,\\n \'elements_chain\': event.elements_chain,\\n \'properties\': properties\\n }\\n})","inputs_schema":[{"key":"host","type":"string","label":"PostHog host","description":"For cloud accounts this is either https://us.i.posthog.com or https://eu.i.posthog.com","default":"https://us.i.posthog.com","secret":false,"required":true},{"key":"token","type":"string","label":"PostHog API key","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties by default","description":"If set, all event properties will be included in the payload. Individual properties can be overridden below.","default":true,"secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Property overrides","description":"Provided values will override the event properties.","default":{},"secret":false,"required":false}],"category":["Custom","Analytics"],"filters":null,"masking":null,"icon_url":"/static/posthog-icon.svg"},{"sub_templates":null,"status":"alpha","id":"template-rudderstack","name":"RudderStack","description":"Send data to RudderStack","hog":"fun getPayload() {\\n let rudderPayload := {\\n \'context\': {\\n \'app\': {\\n \'name\': \'PostHogPlugin\',\\n },\\n \'os\': {},\\n \'page\': {},\\n \'screen\': {},\\n \'library\': {},\\n },\\n \'channel\': \'s2s\',\\n \'type\': \'track\',\\n \'properties\': {},\\n }\\n\\n if (not empty(event.properties.$os)) rudderPayload.context.os.name := event.properties.$os\\n if (not empty(event.properties.$browser)) rudderPayload.context.browser := event.properties.$browser\\n if (not empty(event.properties.$browser_version)) rudderPayload.context.browser_version := event.properties.$browser_version\\n if (not empty(event.properties.$host)) rudderPayload.context.page.host := event.properties.$host\\n if (not empty(event.properties.$current_url)) rudderPayload.context.page.url := event.properties.$current_url\\n if (not empty(event.properties.$path)) rudderPayload.context.page.path := event.properties.$path\\n if (not empty(event.properties.$referrer)) rudderPayload.context.page.referrer := event.properties.$referrer\\n if (not empty(event.properties.$initial_referrer)) rudderPayload.context.page.initial_referrer := event.properties.$initial_referrer\\n if (not empty(event.properties.$referring_domain)) rudderPayload.context.page.referring_domain := event.properties.$referring_domain\\n if (not empty(event.properties.$initial_referring_domain)) rudderPayload.context.page.initial_referring_domain := event.properties.$initial_referring_domain\\n if (not empty(event.properties.$screen_height)) rudderPayload.context.screen.height := event.properties.$screen_height\\n if (not empty(event.properties.$screen_width)) rudderPayload.context.screen.width := event.properties.$screen_width\\n if (not empty(event.properties.$lib)) rudderPayload.context.library.name := event.properties.$lib\\n if (not empty(event.properties.$lib_version)) rudderPayload.context.library.version := event.properties.$lib_version\\n if (not empty(event.$ip)) rudderPayload.context.ip := event.$ip\\n if (not empty(event.properties.$active_feature_flags)) rudderPayload.context.active_feature_flags := event.properties.$active_feature_flags\\n if (not empty(event.properties.token)) rudderPayload.context.token := event.properties.token\\n if (not empty(event.uuid)) rudderPayload.messageId := event.uuid\\n if (not empty(event.timestamp)) rudderPayload.originalTimestamp := event.timestamp\\n if (not empty(inputs.identifier)) rudderPayload.userId := inputs.identifier\\n if (not empty(event.properties.$anon_distinct_id ?? event.properties.$device_id ?? event.properties.distinct_id)) rudderPayload.anonymousId := event.properties.$anon_distinct_id ?? event.properties.$device_id ?? event.properties.distinct_id\\n\\n if (event.event in (\'$identify\', \'$set\')) {\\n rudderPayload.type := \'identify\'\\n if (not empty(event.properties.$set)) rudderPayload.context.trait := event.properties.$set\\n if (not empty(event.properties.$set)) rudderPayload.traits := event.properties.$set\\n } else if (event.event == \'$create_alias\') {\\n rudderPayload.type := \'alias\'\\n if (not empty(event.properties.alias)) rudderPayload.userId := event.properties.alias\\n if (not empty(event.distinct_id)) rudderPayload.previousId := event.distinct_id\\n } else if (event.event == \'$pageview\') {\\n rudderPayload.type := \'page\'\\n if (not empty(event.properties.name)) rudderPayload.name := event.properties.name\\n if (not empty(event.properties.$host)) rudderPayload.properties.host := event.properties.$host\\n if (not empty(event.properties.$current_url)) rudderPayload.properties.url := event.properties.$current_url\\n if (not empty(event.properties.$pathname)) rudderPayload.properties.path := event.properties.$pathname\\n if (not empty(event.properties.$referrer)) rudderPayload.properties.referrer := event.properties.$referrer\\n if (not empty(event.properties.$initial_referrer)) rudderPayload.properties.initial_referrer := event.properties.$initial_referrer\\n if (not empty(event.properties.$referring_domain)) rudderPayload.properties.referring_domain := event.properties.$referring_domain\\n if (not empty(event.properties.$initial_referring_domain)) rudderPayload.properties.initial_referring_domain := event.properties.$initial_referring_domain\\n } else if (event.event == \'$autocapture\') {\\n rudderPayload.type := \'track\'\\n if (not empty(event.properties.$event_type)) rudderPayload.event := event.properties.$event_type\\n } else {\\n rudderPayload.type := \'track\'\\n if (not empty(event.event)) rudderPayload.event := event.event\\n }\\n\\n for (let key, value in event.properties) {\\n if (value != null and not key like \'$%\') {\\n rudderPayload.properties[key] := value\\n }\\n }\\n\\n return {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\',\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.token}:\')}\',\\n },\\n \'body\': {\\n \'batch\': [rudderPayload],\\n \'sentAt\': now()\\n }\\n }\\n}\\n\\nfetch(f\'{inputs.host}/v1/batch\', getPayload())","inputs_schema":[{"key":"host","type":"string","label":"Rudderstack host","description":"The Rudderstack destination instance","default":"https://hosted.rudderlabs.com","secret":false,"required":true},{"key":"token","type":"string","label":"Write API key","description":"RudderStack Source Writekey","secret":true,"required":true},{"key":"identifier","type":"string","label":"Identifier","default":"{person.id}","secret":false,"required":true}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/rudderstack.png"},{"sub_templates":null,"status":"alpha","id":"template-salesforce-create","name":"Salesforce","description":"Create objects in Salesforce","hog":"let getPayload := () -> {\\n let properties := {}\\n if (inputs.include_all_event_properties) {\\n if (not empty(event.elements_chain)) {\\n properties[\'$elements_chain\'] := event.elements_chain\\n }\\n for (let key, value in event.properties) {\\n properties[key] := value\\n }\\n }\\n if (inputs.include_all_person_properties) {\\n for (let key, value in person.properties) {\\n properties[key] := value\\n }\\n }\\n for (let key, value in inputs.properties) {\\n properties[key] := value\\n }\\n return properties\\n}\\n\\nlet res := fetch(f\'{inputs.oauth.instance_url}/services/data/v61.0/sobjects/{inputs.path}\', {\\n \'body\': getPayload(),\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status >= 400) {\\n print(\'Bad response:\', res.status, res.body)\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"salesforce","label":"Salesforce account","secret":false,"required":true},{"key":"path","type":"string","label":"Object path","description":"The path to the object you want to create.","default":"Contact","secret":false,"required":true},{"key":"include_all_event_properties","type":"boolean","label":"Include all event properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"include_all_person_properties","type":"boolean","label":"Include all person properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"properties","type":"json","label":"Additional properties","description":"Additional properties for the Salesforce Object.","default":{"email":"{person.properties.email}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/salesforce.png"},{"sub_templates":null,"status":"alpha","id":"template-salesforce-update","name":"Salesforce","description":"Update objects in Salesforce","hog":"let getPayload := () -> {\\n let properties := {}\\n if (inputs.include_all_event_properties) {\\n for (let key, value in event.properties) {\\n properties[key] := value\\n }\\n }\\n if (inputs.include_all_person_properties) {\\n for (let key, value in person.properties) {\\n properties[key] := value\\n }\\n }\\n for (let key, value in inputs.properties) {\\n properties[key] := value\\n }\\n return properties\\n}\\n\\nlet res := fetch(f\'{inputs.oauth.instance_url}/services/data/v61.0/sobjects/{inputs.path}\', {\\n \'body\': getPayload(),\\n \'method\': \'PATCH\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status >= 400) {\\n print(\'Bad response:\', res.status, res.body)\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"salesforce","label":"Salesforce account","secret":false,"required":true},{"key":"path","type":"string","label":"Object path","description":"The path to the object you want to create or update. This can be a standard object like \'Contact\' for creating records or `Lead/Email/{person.properties.email}` for updating a lead by email. See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm for more information.","default":"Leads/Email/{person.properties.email}","secret":false,"required":true},{"key":"include_all_event_properties","type":"boolean","label":"Include all event properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"include_all_person_properties","type":"boolean","label":"Include all person properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"properties","type":"json","label":"Additional properties","description":"Additional properties for the Salesforce Object.","default":{"email":"{person.properties.email}","browser":"{event.properties.$browser}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/salesforce.png"},{"sub_templates":null,"status":"beta","id":"template-sendgrid","name":"Sendgrid","description":"Update marketing contacts in Sendgrid","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Not updating contacts.\')\\n return\\n}\\n\\nlet contact := {\\n \'email\': inputs.email,\\n}\\n\\nfor (let key, value in inputs.properties) {\\n if (not empty(value)) {\\n contact[key] := value\\n }\\n}\\n\\nlet headers := {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n}\\n\\nif (not empty(inputs.custom_fields)) {\\n let response := fetch(\'https://api.sendgrid.com/v3/marketing/field_definitions\', {\\n \'method\': \'GET\',\\n \'headers\': headers\\n })\\n if (response.status != 200) {\\n throw Error(f\'Could not fetch custom fields. Status: {response.status}\')\\n }\\n contact[\'custom_fields\'] := {}\\n for (let obj in response.body?.custom_fields ?? {}) {\\n let inputValue := inputs.custom_fields[obj.name]\\n if (not empty(inputValue)) {\\n contact[\'custom_fields\'][obj.id] := inputValue\\n }\\n }\\n}\\n\\nlet res := fetch(\'https://api.sendgrid.com/v3/marketing/contacts\', {\\n \'method\': \'PUT\',\\n \'headers\': headers,\\n \'body\': { \'contacts\': [contact] }\\n})\\n\\nif (res.status > 300) {\\n print(\'Error updating contact:\', res.status, res.body)\\n}","inputs_schema":[{"key":"api_key","type":"string","label":"Sendgrid API Key","description":"See https://app.sendgrid.com/settings/api_keys","secret":true,"required":true},{"key":"email","type":"string","label":"The email of the user","default":"{person.properties.email}","secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Reserved fields","description":"The following field names are allowed: address_line_1, address_line_2, alternate_emails, anonymous_id, city, country, email, external_id, facebook, first_name, last_name, phone_number_id, postal_code, state_province_region, unique_name, whatsapp.","default":{"first_name":"{person.properties.first_name}","last_name":"{person.properties.last_name}","city":"{person.properties.city}","country":"{person.properties.country}","postal_code":"{person.properties.postal_code}"},"secret":false,"required":true},{"key":"custom_fields","type":"dictionary","label":"Custom fields","description":"Configure custom fields in SendGrid before using them here: https://mc.sendgrid.com/custom-fields","default":{},"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/sendgrid.png"},{"sub_templates":null,"status":"free","id":"template-zapier","name":"Zapier","description":"Sends a webhook templated by the incoming event data","hog":"let res := fetch(f\'https://hooks.zapier.com/{inputs.hook}\', {\\n \'method\': \'POST\',\\n \'body\': inputs.body\\n});\\n\\nif (inputs.debug) {\\n print(\'Response\', res.status, res.body);\\n}","inputs_schema":[{"key":"hook","type":"string","label":"Zapier hook path","description":"The path of the Zapier webhook. You can create your own or use our native Zapier integration https://zapier.com/apps/posthog/integrations","secret":false,"required":true},{"key":"body","type":"json","label":"JSON Body","default":{"hook":{"id":"{source.url}","event":"{event}","target":"https://hooks.zapier.com/{inputs.hook}"},"data":{"eventUuid":"{event.uuid}","event":"{event.event}","teamId":"{project.id}","distinctId":"{event.distinct_id}","properties":"{event.properties}","elementsChain":"{event.elementsChain}","timestamp":"{event.timestamp}","person":{"uuid":"{person.id}","properties":"{person.properties}"}}},"secret":false,"required":false},{"key":"debug","type":"boolean","label":"Log responses","description":"Logs the response of http calls for debugging.","secret":false,"required":false,"default":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/zapier.png"},{"sub_templates":null,"status":"beta","id":"template-zendesk","name":"Zendesk","description":"Update contacts in Zendesk","hog":"if (empty(inputs.email) or empty(inputs.name)) {\\n print(\'`email` or `name` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet body := {\\n \'user\': {\\n \'email\': inputs.email,\\n \'name\': inputs.name,\\n \'skip_verify_email\': true,\\n \'user_fields\': {}\\n }\\n}\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value) and key != \'email\' and key != \'name\') {\\n body.user.user_fields[key] := value\\n }\\n}\\n\\nfetch(f\'https://{inputs.subdomain}.zendesk.com/api/v2/users/create_or_update\', {\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.admin_email}/token:{inputs.token}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': body,\\n \'method\': \'POST\'\\n});","inputs_schema":[{"key":"subdomain","type":"string","label":"Zendesk subdomain","description":"Generally, Your Zendesk URL has two parts: a subdomain name you chose when you set up your account, followed by zendesk.com (for example: mycompany.zendesk.com). Please share the subdomain name with us so we can set up your account.","secret":false,"required":true},{"key":"admin_email","type":"string","label":"API user email","secret":true,"required":true,"description":"Enter the email of an admin in Zendesk. Activity using the API key will be attributed to this user."},{"key":"token","type":"string","label":"API token","secret":true,"required":true,"hint":"Enter your Zendesk API Token"},{"key":"email","type":"string","label":"User email","default":"{person.properties.email}","secret":false,"required":true,"hint":"The email of the user you want to create or update."},{"key":"name","type":"string","label":"User name","default":"{person.properties.name}","secret":false,"required":true,"hint":"The name of the user you want to create or update."},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Zendesk user fields and their values. You\'ll need to create User fields in Zendesk for these to work.","default":{"phone":"{person.properties.phone}","plan":"{person.properties.plan}"},"secret":false,"required":false}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/zendesk.png"}]}'),_status_page_all_ok_namespaceObject=JSON.parse('{"page":{"id":"1ll2gn427qjl","name":"PostHog","url":"https://status.posthog.com","time_zone":"Etc/UTC","updated_at":"2024-06-29T05:42:34.351Z"},"components":[{"id":"6v7xydh2714r","name":"App","status":"operational","created_at":"2020-08-03T22:28:14.454Z","updated_at":"2024-05-28T10:24:00.192Z","position":1,"description":"Frontend application and API servers","showcase":true,"start_date":null,"group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"xtkq4whlbry9","name":"Update Service","status":"operational","created_at":"2022-11-21T21:30:16.813Z","updated_at":"2022-11-21T21:40:45.215Z","position":1,"description":null,"showcase":true,"start_date":"2022-08-01","group_id":"0cn1jr2pwdwm","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"j6bgzv8dh942","name":"PostHog.com","status":"operational","created_at":"2022-11-21T21:31:36.659Z","updated_at":"2023-04-28T19:15:51.255Z","position":1,"description":"Homepage, Docs, and Handbook","showcase":true,"start_date":"2022-07-01","group_id":null,"page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"y4bsf3hcl974","name":"AWS ec2-us-east-1","status":"operational","created_at":"2022-11-21T21:37:14.434Z","updated_at":"2024-03-26T22:17:17.790Z","position":1,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"fm3yyllyxhgj","name":"AWS elb-eu-central-1","status":"operational","created_at":"2022-11-21T21:38:24.779Z","updated_at":"2022-11-21T21:46:47.748Z","position":1,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"gl055wcw583j","name":"App","status":"operational","created_at":"2022-11-21T21:39:13.887Z","updated_at":"2024-05-08T15:33:56.331Z","position":1,"description":"Frontend application and API servers","showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"ylm2gzb49rr7","name":"License Server","status":"operational","created_at":"2022-11-21T21:34:54.421Z","updated_at":"2022-11-21T21:40:55.589Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"0cn1jr2pwdwm","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"cjgb5s1jqy56","name":"Event and Data Ingestion","status":"operational","created_at":"2022-11-21T21:35:18.114Z","updated_at":"2024-04-30T19:32:00.323Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"ps354j1bvl04","name":"AWS elasticache-eu-central-1","status":"operational","created_at":"2022-11-21T21:38:04.615Z","updated_at":"2022-11-21T21:47:06.804Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"t053nl3g63sw","name":"AWS elb-us-east-1","status":"operational","created_at":"2022-11-21T21:38:15.462Z","updated_at":"2024-06-26T03:49:53.357Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"41df083ftqt6","name":"US Cloud 🇺🇸","status":"operational","created_at":"2022-11-21T21:43:17.594Z","updated_at":"2022-11-22T01:55:51.439Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["6v7xydh2714r","cjgb5s1jqy56","1t4b8gf5psbc"]},{"id":"4tw78vnj4045","name":"Event and Data Ingestion","status":"operational","created_at":"2022-11-21T21:48:51.909Z","updated_at":"2024-05-27T23:47:54.117Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"1t4b8gf5psbc","name":"Feature Flags and Experiments","status":"operational","created_at":"2022-11-21T21:35:49.794Z","updated_at":"2024-05-22T17:36:43.895Z","position":3,"description":"Decide endpoint","showcase":true,"start_date":"2022-07-01","group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"tkzg024s2zsc","name":"AWS rds-us-east-1","status":"operational","created_at":"2022-11-21T21:37:21.722Z","updated_at":"2023-06-13T21:28:10.603Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"9t36hjkpdffk","name":"AWS rds-eu-central-1","status":"operational","created_at":"2022-11-21T21:37:32.316Z","updated_at":"2022-11-21T21:47:25.843Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"c4d9jd1jcx3f","name":"EU Cloud 🇪🇺","status":"operational","created_at":"2022-11-21T21:44:27.968Z","updated_at":"2022-11-21T21:45:39.939Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["gl055wcw583j","4tw78vnj4045","1mcb5g8sznnz"]},{"id":"1mcb5g8sznnz","name":"Feature Flags and Experiments","status":"operational","created_at":"2022-11-21T21:49:13.429Z","updated_at":"2024-05-22T17:36:43.909Z","position":3,"description":"Decide endpoint","showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"7zz5gc65m794","name":"AWS ec2-eu-central-1","status":"operational","created_at":"2022-11-21T21:37:41.686Z","updated_at":"2022-11-21T21:47:44.353Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"833w3100npw3","name":"AWS elasticache-us-east-1","status":"operational","created_at":"2022-11-21T21:37:50.482Z","updated_at":"2023-09-18T23:53:20.416Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"0cn1jr2pwdwm","name":"Support APIs","status":"operational","created_at":"2022-11-21T21:40:45.187Z","updated_at":"2022-11-22T01:55:51.456Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["xtkq4whlbry9","ylm2gzb49rr7"]},{"id":"z0y6m9kyvy3j","name":"AWS US 🇺🇸","status":"operational","created_at":"2022-11-21T21:46:33.358Z","updated_at":"2022-11-22T01:55:51.473Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["y4bsf3hcl974","t053nl3g63sw","tkzg024s2zsc","833w3100npw3","rgyd1tg1jhcv"]},{"id":"rgyd1tg1jhcv","name":"AWS kafka-us-east-1","status":"operational","created_at":"2022-11-22T02:03:23.870Z","updated_at":"2023-09-29T04:43:36.890Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"20jjhvqn3xcq","name":"AWS kafka-eu-central-1","status":"operational","created_at":"2022-11-22T02:03:26.507Z","updated_at":"2022-11-22T02:04:08.037Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"nfknrn2bf3yz","name":"AWS EU 🇪🇺","status":"operational","created_at":"2022-11-21T21:46:47.736Z","updated_at":"2022-11-22T01:55:51.491Z","position":6,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["fm3yyllyxhgj","ps354j1bvl04","9t36hjkpdffk","7zz5gc65m794","20jjhvqn3xcq"]}],"incidents":[],"scheduled_maintenances":[],"status":{"indicator":"none","description":"All Systems Operational"}}');var fixtures_status_page_all_ok_namespaceObject=__webpack_require__.t(_status_page_all_ok_namespaceObject,2),utils=__webpack_require__("./frontend/src/mocks/utils.ts");let EMPTY_PAGINATED_RESPONSE={count:0,results:[],next:null,previous:null},toPaginatedResponse=results=>({count:results.length,results,next:null,previous:null});function posthogCORSResponse(req,res,ctx){return res(ctx.status(200),ctx.json("ok"),ctx.set("Access-Control-Allow-Origin",req.referrer.length?req.referrer:"http://localhost"),ctx.set("Access-Control-Allow-Credentials","true"),ctx.set("Access-Control-Allow-Headers","*"))}let defaultMocks={get:{"/api/projects/:team_id/activity_log/important_changes/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/actions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/annotations/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/event_definitions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/cohorts/":toPaginatedResponse([api_mock.IN]),"/api/environments/:team_id/dashboards/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/alerts/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/dashboard_templates":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/dashboard_templates/repository/":[],"/api/projects/:team_id/external_data_sources/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/notebooks":()=>[200,{count:0,results:[]}],"api/projects/:team/notebooks/recording_comments":{results:[]},"/api/projects/:team_id/groups/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/groups_types/":[],"/api/environments/:team_id/insights/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/insights/:insight_id/sharing/":{enabled:!1,access_token:"foo",created_at:"2020-11-11T00:00:00Z"},"/api/projects/:team_id/property_definitions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/feature_flags/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/feature_flags/:feature_flag_id/role_access":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/experiments/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/explicit_members/":[],"/api/projects/:team_id/warehouse_view_link/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/warehouse_saved_queries/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/warehouse_tables/":EMPTY_PAGINATED_RESPONSE,"/api/organizations/@current/":()=>[200,{...api_mock.On,available_product_features:(0,features.I)()}],"/api/organizations/@current/roles/":EMPTY_PAGINATED_RESPONSE,"/api/organizations/@current/members/":toPaginatedResponse([api_mock.hH,api_mock.RC]),"/api/organizations/@current/invites/":toPaginatedResponse([api_mock.aM]),"/api/organizations/@current/plugins/":toPaginatedResponse([api_mock.ZZ]),"/api/organizations/@current/plugins/repository/":[],"/api/organizations/@current/plugins/unused/":[],"/api/plugin_config/":toPaginatedResponse([api_mock.i6]),[`/api/environments/:team_id/plugin_configs/${api_mock.i6.id}/`]:api_mock.i6,"/api/environments/:team_id/persons":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/persons/properties/":toPaginatedResponse(api_mock.R2),"/api/personal_api_keys/":[],"/api/users/@me/":()=>[200,{...api_mock.T6,organization:{...api_mock.On,available_product_features:(0,features.I)()}}],"/api/users/@me/two_factor_status/":()=>[200,{is_enabled:!0,backup_codes:[],method:"TOTP"}],"/api/environments/@current/":api_mock.k3,"/api/projects/@current/":api_mock.k3,"/api/projects/:team_id/comments/count":{count:0},"/api/projects/:team_id/comments":{results:[]},"/_preflight":__webpack_require__("./frontend/src/mocks/fixtures/_preflight.json"),"/_system_status":__webpack_require__("./frontend/src/mocks/fixtures/_system_status.json"),"/api/instance_status":__webpack_require__("./frontend/src/mocks/fixtures/_instance_status.json"),"/api/sentry_stats/":{error:"Error fetching stats from sentry",exception:"[ErrorDetail(string='Sentry integration not configured', code='invalid')]"},"https://api.github.com/repos/posthog/posthog-js/tags":()=>[200,[]],"https://www.gravatar.com/avatar/:gravatar_id":()=>[404,""],"https://us.i.posthog.com/api/early_access_features":{earlyAccessFeatures:[]},"/api/billing/":{..._billing.t},"/api/billing/get_invoices":{link:null,count:0},"/api/billing/credits/overview":{status:"None",eligible:!1},"https://status.posthog.com/api/v2/summary.json":fixtures_status_page_all_ok_namespaceObject,"/api/projects/:team_id/hog_function_templates":_hogFunctionTemplates_namespaceObject,"/api/projects/:team_id/hog_function_templates/:id":(req,res,ctx)=>{let hogFunctionTemplate=_hogFunctionTemplates_namespaceObject.results.find(conf=>conf.id===req.params.id);return res(_hogFunctionTemplates_namespaceObject?ctx.json({...hogFunctionTemplate}):ctx.status(404))},"/api/projects/:team_id/hog_functions":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/data_color_themes":api_mock.J7},post:{"https://us.i.posthog.com/e/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/e/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"https://us.i.posthog.com/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"https://us.i.posthog.com/engage/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/api/environments/:team_id/insights/:insight_id/viewed/":()=>[201,null],"api/environments/:team_id/query":[200,{results:[]}]},patch:{"/api/projects/:team_id/session_recording_playlists/:playlist_id/":{}},options:{"https://us.i.posthog.com/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx)}},handlers=(0,utils.D)(defaultMocks)},"./frontend/src/mocks/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>mocksToHandlers});var msw__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/msw@0.49.0_typescript@4.9.5/node_modules/msw/lib/index.js");let mocksToHandlers=mocks=>{let response=[];return Object.entries(mocks).map(_ref=>{let[method,mockHandlers]=_ref;Object.entries(mockHandlers).map(_ref2=>{let[path,handler]=_ref2,pathWithoutTrailingSlash=path.replace(/\/$/,"");response.push(msw__WEBPACK_IMPORTED_MODULE_0__.rest[method](pathWithoutTrailingSlash,async(req,res,ctx)=>{if("function"==typeof handler){let response=await handler(req,res,ctx);if(Array.isArray(response)){if(2===response.length&&"number"==typeof response[0]){var _responseArray$;return res(ctx.status(response[0]),ctx.json(null!==(_responseArray$=response[1])&&void 0!==_responseArray$?_responseArray$:null))}return res(...response)}return response||res()}return res(ctx.json(null!=handler?handler:null))}))})}),response}},"./frontend/src/models/actionsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>actionsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx");let actionsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","actionsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__.H,["currentTeam"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{props,values,actions}=_ref;return{actions:{__default:[],loadActions:async()=>{var _response$results;let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.list(props.params);return null!==(_response$results=response.results)&&void 0!==_response$results?_response$results:[]},updateAction:action=>(values.actions||[]).map(a=>action.id===a.id?action:a)},pin:{pinAction:async action=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.update(action.id,{name:action.name,pinned_at:new Date().toISOString()});actions.updateAction(response)},unpinAction:async action=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.update(action.id,{name:action.name,pinned_at:null});actions.updateAction(response)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref2=>{let{selectors}=_ref2;return{actionsGrouped:[()=>[selectors.actions],actions=>[{label:"Select an action",options:actions.map(action=>({label:action.name,value:action.id}))}]],actionsById:[s=>[s.actions],actions=>Object.fromEntries(actions.map(action=>[action.id,action]))],actionsSorted:[s=>[s.actions],actions=>actions.sort((a,b)=>(b.pinned_at?1:0)-(a.pinned_at?1:0))]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.events)(_ref3=>{let{values,actions}=_ref3;return{afterMount:()=>{(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__.R)(values.currentTeam)&&actions.loadActions()}}}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_3__.Y)()])},"./frontend/src/models/annotationsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AT:()=>annotationsModel,vH:()=>deserializeAnnotation});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_dayjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx");function deserializeAnnotation(annotation,projectTimezone){return{...annotation,date_marker:annotation.date_marker?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.fp)(annotation.date_marker,projectTimezone):null,created_at:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.fp)(annotation.created_at,projectTimezone)}}let annotationsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","annotationsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["currentTeam","timezone"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteAnnotation:annotation=>({annotation}),loadAnnotationsNext:()=>!0,setNext:next=>({next}),appendAnnotations:annotations=>({annotations}),replaceAnnotation:annotation=>({annotation})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values,actions}=_ref;return{rawAnnotations:{__default:[],loadAnnotations:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.list();return actions.setNext(response.next||null),response.results},createAnnotationGenerically:async annotationData=>{let createdAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.create(annotationData);actions.appendAnnotations([createdAnnotation])},updateAnnotation:async _ref2=>{let{annotationId,annotationData}=_ref2,updatedAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.update(annotationId,annotationData);actions.replaceAnnotation(updatedAnnotation)},deleteAnnotation:async _ref3=>{let{annotation}=_ref3;return await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.determineDeleteEndpoint(),object:{name:`${annotation.date_marker} annotation`,...annotation},callback:(undo,annotation)=>{undo&&actions.appendAnnotations([function(annotation){return{...annotation,date_marker:annotation.date_marker?annotation.date_marker.toISOString():null,created_at:annotation.created_at.toISOString()}}(annotation)])}}),values.annotations.filter(a=>a.id!==annotation.id)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({rawAnnotations:[[],{appendAnnotations:(state,_ref4)=>{let{annotations}=_ref4;return[...state,...annotations]},replaceAnnotation:(state,_ref5)=>{let{annotation}=_ref5,copy=state.slice(),index=copy.findIndex(iterationAnnotation=>iterationAnnotation.id===annotation.id);return copy[index]=annotation,copy}}],next:[null,{setNext:(_,_ref6)=>{let{next}=_ref6;return next}}],loadingNext:[!1,{loadAnnotationsNext:()=>!0,appendAnnotations:()=>!1}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({annotations:[s=>[s.rawAnnotations,s.timezone],(rawAnnotations,timezone)=>rawAnnotations.map(annotation=>deserializeAnnotation(annotation,timezone))],annotationsLoading:[s=>[s.rawAnnotationsLoading],rawAnnotationsLoading=>rawAnnotationsLoading]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{actions,values}=_ref7;return{loadAnnotationsNext:async()=>{let results=[];if(values.next){let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.get(values.next);actions.setNext(response.next),results=response.results}actions.appendAnnotations(results)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref8=>{let{values,actions}=_ref8;(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.R)(values.currentTeam)&&actions.loadAnnotations()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/cohortsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>cohortsModel,k:()=>processCohort});var fuse_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/types.ts");function processCohort(cohort){var _cohort$filters$prope;return{...cohort,filters:{properties:{...cohort.filters.properties,values:null!==(_cohort$filters$prope=cohort.filters.properties?.values?.map(group=>"values"in group?{...group,values:group.values.map(c=>(function(criteria){if(!criteria.type)return criteria;let processedCriteria={...criteria};return![scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Cohort,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Person].includes(criteria.type)||"value_property"in criteria||(processedCriteria.value_property=criteria.value,processedCriteria.value=criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Cohort?_types__WEBPACK_IMPORTED_MODULE_11__.Vb.InCohort:_types__WEBPACK_IMPORTED_MODULE_11__.G2.HaveProperty),[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Behavioral].includes(criteria.type)&&!("explicit_datetime"in criteria)&&criteria.value&&scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_6__.Gp.includes(criteria.value)&&(processedCriteria.explicit_datetime=function(criteria){let timeValue=criteria?.time_value,timeInterval=criteria?.time_interval;if(timeValue&&timeInterval)return`-${timeValue}${timeInterval[0]}`}(criteria)),processedCriteria})(c))}:group))&&void 0!==_cohort$filters$prope?_cohort$filters$prope:[]}}}}let cohortsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","cohortsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H,["currentTeam"]],actions:[lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__.exportsLogic,["startExport"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({setPollTimeout:pollTimeout=>({pollTimeout}),updateCohort:cohort=>({cohort}),deleteCohort:cohort=>({cohort}),cohortCreated:cohort=>({cohort}),exportCohortPersons:(id,columns)=>({id,columns})})),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(()=>({cohorts:{__default:[],loadCohorts:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.cohorts.list();return scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_8__.T.findMounted({syncWithUrl:!0})?.actions.loadCohorts(),response?.results?.map(cohort=>processCohort(cohort))||[]}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({pollTimeout:[null,{setPollTimeout:(_,_ref)=>{let{pollTimeout}=_ref;return pollTimeout}}],cohorts:{updateCohort:(state,_ref2)=>{let{cohort}=_ref2;return cohort?[...state].map(existingCohort=>existingCohort.id===cohort.id?cohort:existingCohort):state},cohortCreated:(state,_ref3)=>{let{cohort}=_ref3;return cohort?[cohort,...state]:state},deleteCohort:(state,_ref4)=>{let{cohort}=_ref4;return cohort.id?[...state].filter(c=>c.id!==cohort.id):state}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({cohortsWithAllUsers:[s=>[s.cohorts],cohorts=>[{id:"all",name:"All Users*"},...cohorts]],cohortsById:[s=>[s.cohorts],cohorts=>Object.fromEntries(cohorts.map(cohort=>[cohort.id,cohort]))],cohortsSearch:[s=>[s.cohorts],cohorts=>{let fuse=new fuse_js__WEBPACK_IMPORTED_MODULE_12__.Z(null!=cohorts?cohorts:[],{keys:["name"],threshold:.3});return term=>fuse.search(term).map(result=>result.item)}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref5=>{let{actions}=_ref5;return{loadCohortsSuccess:async _ref6=>{let{cohorts}=_ref6,is_calculating=cohorts.filter(cohort=>cohort.is_calculating).length>0;is_calculating&&window.location.pathname.includes(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.cohorts())&&actions.setPollTimeout(window.setTimeout(actions.loadCohorts,5e3))},exportCohortPersons:async _ref7=>{let{id,columns}=_ref7,exportCommand={export_format:_types__WEBPACK_IMPORTED_MODULE_11__.P5.CSV,export_context:{path:`/api/cohort/${id}/persons`}};columns&&columns.length>0&&(exportCommand.export_context.columns=columns),actions.startExport(exportCommand)},deleteCohort:async _ref8=>{let{cohort}=_ref8;await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.cohorts.determineDeleteEndpoint(),object:cohort,callback:actions.loadCohorts})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref9=>{let{values}=_ref9;clearTimeout(values.pollTimeout||void 0)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref10=>{let{actions,values}=_ref10;(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.R)(values.currentTeam)&&actions.loadCohorts()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/dashboardsModel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>dashboardsModel,q:()=>nameCompareFunction});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_tagsModel__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/models/tagsModel.ts"),_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dashboardsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","dashboardsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_models_tagsModel__WEBPACK_IMPORTED_MODULE_11__.x,["loadTags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({dashboardsFullyLoaded:!0,delayedDeleteDashboard:id=>({id}),setDiveSourceId:id=>({id}),addDashboardSuccess:dashboard=>({dashboard}),updateDashboardInsight:(insight,extraDashboardIds)=>({insight,extraDashboardIds}),pinDashboard:(id,source)=>({id,source}),unpinDashboard:(id,source)=>({id,source}),duplicateDashboard:_ref=>{let{id,name,show,duplicateTiles}=_ref;return{id:id,name:name||`#${id}`,show:show||!1,duplicateTiles:duplicateTiles||!1}},tileMovedToDashboard:(tile,dashboardId)=>({tile,dashboardId}),tileRemovedFromDashboard:_ref2=>{let{tile,dashboardId}=_ref2;return{tile,dashboardId}},tileAddedToDashboard:dashboardId=>({dashboardId})})),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{values,actions}=_ref3;return{pagedDashboards:[null,{loadDashboards:async url=>{let exportedDashboard=window.POSTHOG_EXPORTED_DATA?.dashboard;if(exportedDashboard?.id&&exportedDashboard?.tiles)return{count:1,next:null,previous:null,results:[(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(exportedDashboard)]};if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_6__.Pc)())return{count:0,next:null,previous:null,results:[]};let dashboards=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url||`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/?limit=2000`);return{...dashboards,results:dashboards.results?.map(dashboard=>_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob(dashboard))}}}],dashboard:{__default:null,updateDashboard:async(_ref4,breakpoint)=>{let{id,allowUndo,...payload}=_ref4;if(!Object.entries(payload).length)return;breakpoint();let beforeChange={...values.rawDashboards[id]},response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,payload),updatedAttribute=Object.keys(payload)[0];return("name"===updatedAttribute||"description"===updatedAttribute||"tags"===updatedAttribute)&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardFrontEndUpdate(updatedAttribute,values.rawDashboards[id]?.[updatedAttribute]?.length||0,payload[updatedAttribute].length),"tags"===updatedAttribute&&actions.loadTags()),allowUndo&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Dashboard updated",{button:{label:"Undo",action:async()=>{let reverted=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,beforeChange);actions.updateDashboardSuccess((0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(reverted)),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Dashboard change reverted")}}}),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},deleteDashboard:async _ref5=>{let{id,deleteInsights}=_ref5;return(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{deleted:!0,delete_insights:deleteInsights}))},restoreDashboard:async _ref6=>{let{id}=_ref6;return(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{deleted:!1}))},pinDashboard:async _ref7=>{let{id,source}=_ref7,response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{pinned:!0});return lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardPinToggled(!0,source),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},unpinDashboard:async _ref8=>{let{id,source}=_ref8,response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{pinned:!1});return lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardPinToggled(!1,source),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},duplicateDashboard:async _ref9=>{let{id,name,show,duplicateTiles}=_ref9,result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/`,{use_dashboard:id,name:`${name} (Copy)`,duplicate_tiles:duplicateTiles});return show&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(result.id)),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({pagingDashboardsCompleted:[!1,{dashboardsFullyLoaded:()=>!0}],redirect:[!0,{deleteDashboard:(state,_ref10)=>{let{redirect}=_ref10;return void 0!==redirect?redirect:state},restoreDashboard:(state,_ref11)=>{let{redirect}=_ref11;return void 0!==redirect?redirect:state}}],rawDashboards:[{},{loadDashboardsSuccess:(state,_ref12)=>{let{pagedDashboards}=_ref12;return pagedDashboards?{...state,...(0,lib_utils__WEBPACK_IMPORTED_MODULE_6__.Tl)(pagedDashboards.results)}:state},addDashboardSuccess:(state,_ref13)=>{let{dashboard}=_ref13;return{...state,[dashboard.id]:dashboard}},restoreDashboardSuccess:(state,_ref14)=>{let{dashboard}=_ref14;return{...state,[dashboard.id]:dashboard}},updateDashboardSuccess:(state,_ref15)=>{let{dashboard}=_ref15;return dashboard?{...state,[dashboard.id]:dashboard}:state},deleteDashboardSuccess:(state,_ref16)=>{let{dashboard}=_ref16;return{...state,[dashboard.id]:{...state[dashboard.id],deleted:!0}}},delayedDeleteDashboard:(state,_ref17)=>{let{id}=_ref17,{[id]:_discard,...rest}=state;return rest},pinDashboardSuccess:(state,_ref18)=>{let{dashboard}=_ref18;return{...state,[dashboard.id]:dashboard}},unpinDashboardSuccess:(state,_ref19)=>{let{dashboard}=_ref19;return{...state,[dashboard.id]:dashboard}},duplicateDashboardSuccess:(state,_ref20)=>{let{dashboard}=_ref20;return{...state,[dashboard.id]:{...dashboard,_highlight:!0}}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref21=>{let{selectors}=_ref21;return{nameSortedDashboards:[()=>[selectors.rawDashboards],rawDashboards=>[...Object.values(rawDashboards)].filter(dashboard=>{var _dashboard$name;return!(null!==(_dashboard$name=dashboard.name)&&void 0!==_dashboard$name?_dashboard$name:"Untitled").startsWith(lib_constants__WEBPACK_IMPORTED_MODULE_4__.Lm)}).sort(nameCompareFunction)],pinSortedDashboards:[()=>[selectors.nameSortedDashboards],nameSortedDashboards=>[...nameSortedDashboards].sort((a,b)=>(Number(b.pinned)-Number(a.pinned))*10+nameCompareFunction(a,b))],dashboardsLoading:[()=>[selectors.pagedDashboardsLoading,selectors.pagingDashboardsCompleted],(pagedDashboardsLoading,pagingDashboardsCompleted)=>pagedDashboardsLoading||!pagingDashboardsCompleted],pinnedDashboards:[()=>[selectors.nameSortedDashboards],nameSortedDashboards=>nameSortedDashboards.filter(d=>d.pinned)]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref22=>{let{actions,values}=_ref22;return{loadDashboardsSuccess:_ref23=>{let{pagedDashboards}=_ref23;pagedDashboards?.next?actions.loadDashboards(pagedDashboards.next):actions.dashboardsFullyLoaded()},addDashboardSuccess:_ref24=>{let{dashboard}=_ref24;kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("onboarding")||lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Dashboard created"}),{button:{label:"View",action:()=>kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(dashboard.id))}})},restoreDashboardSuccess:_ref25=>{let{dashboard}=_ref25;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})," restored"]})),values.redirect&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(dashboard.id))},deleteDashboardSuccess:async _ref26=>{let{dashboard}=_ref26;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})," deleted"]}),{button:{label:"Undo",action:()=>{actions.restoreDashboard({id:dashboard.id,redirect:values.redirect})}}}),actions.delayedDeleteDashboard(dashboard.id)},duplicateDashboardSuccess:async _ref27=>{let{dashboard}=_ref27;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard copied as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})]}))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref28=>{let{actions}=_ref28;actions.loadDashboards()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_8__.Y)()]);function nameCompareFunction(a,b){var _a$name,_b$name;if(a.pinned!==b.pinned)return b.pinned?1:-1;let firstName=null!==(_a$name=a.name)&&void 0!==_a$name?_a$name:"Untitled",secondName=null!==(_b$name=b.name)&&void 0!==_b$name?_b$name:"Untitled";return firstName.localeCompare(secondName)}},"./frontend/src/models/groupsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>groupsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/introductions/groupsAccessLogic.ts"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/projectLogic.ts");let groupsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","groupsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_projectLogic__WEBPACK_IMPORTED_MODULE_6__.K,["currentProjectId"],lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__.e,["groupsEnabled","groupsAccessStatus"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{groupTypesRaw:[[],{loadAllGroupTypes:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(`api/projects/${values.currentProjectId}/groups_types`),updateGroupTypesMetadata:async payload=>values.groupsEnabled?await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`/api/projects/${values.currentProjectId}/groups_types/update_metadata`,payload):[]}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({groupTypes:[s=>[s.groupTypesRaw],groupTypesRaw=>new Map(groupTypesRaw.map(groupType=>[groupType.group_type_index,groupType]))],groupTypesLoading:[s=>[s.groupTypesRawLoading],groupTypesRawLoading=>groupTypesRawLoading],showGroupsOptions:[s=>[s.groupsAccessStatus,s.groupsEnabled,s.groupTypes],(status,enabled,groupTypes)=>status!==lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__.Q.Hidden||enabled&&Array.from(groupTypes.values()).length>0],groupsTaxonomicTypes:[s=>[s.groupTypes],groupTypes=>Array.from(groupTypes.values()).map(groupType=>`${lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__.t.GroupsPrefix}_${groupType.group_type_index}`)],groupNamesTaxonomicTypes:[s=>[s.groupTypes],groupTypes=>Array.from(groupTypes.values()).map(groupType=>`${lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__.t.GroupNamesPrefix}_${groupType.group_type_index}`)],aggregationLabel:[s=>[s.groupTypes],groupTypes=>function(groupTypeIndex){let deferToUserWording=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0!=groupTypeIndex){let groupType=groupTypes.get(groupTypeIndex);return groupType?{singular:groupType.name_singular||groupType.group_type,plural:groupType.name_plural||`${groupType.group_type}(s)`}:{singular:"unknown group",plural:"unknown groups"}}return deferToUserWording?{singular:"user",plural:"users"}:{singular:"person",plural:"persons"}}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref2=>{let{values}=_ref2;return{groupsEnabled:enabled=>{!values.groupTypesLoading&&enabled&&groupsModel.actions.loadAllGroupTypes()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref3=>{let{actions}=_ref3;actions.loadAllGroupTypes()})])},"./frontend/src/models/insightsModel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>insightsModel});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let insightsModel=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["models","insightsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({logic:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__.H]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(()=>({renameInsight:item=>({item}),renameInsightSuccess:item=>({item}),duplicateInsight:item=>({item}),duplicateInsightSuccess:item=>({item}),insightsAddedToDashboard:_ref=>{let{dashboardId,insightIds}=_ref;return{dashboardId,insightIds}}})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{renameInsight:async _ref3=>{let{item}=_ref3;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Rename insight",initialValues:{insightName:item.name},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D,{name:"insightName",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{"data-attr":"insight-name",placeholder:"Please enter the new name",autoFocus:!0})}),errors:{insightName:name=>name?void 0:"You must enter a name"},onSubmit:async _ref4=>{let{insightName}=_ref4,updatedItem=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__.L.update(item.id,{name:insightName});lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Renamed insight from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("b",{children:item.name})," to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("b",{children:insightName})]})),actions.renameInsightSuccess(updatedItem)}})},duplicateInsight:async _ref5=>{let{item}=_ref5,addedItem=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__.L.duplicate(item);actions.duplicateInsightSuccess(addedItem),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.success("Insight duplicated")}}})])},"./frontend/src/models/notebooksModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>notebooksModel,fL:()=>openNotebook,zh:()=>SCRATCHPAD_NOTEBOOK});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_notebooks_Notebook_notebookLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/notebookLogic.ts"),scenes_notebooks_Notebook_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/utils.ts"),scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts"),scenes_notebooks_NotebookTemplates_notebookTemplates__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/types.ts");let SCRATCHPAD_NOTEBOOK={id:"scratchpad",short_id:"scratchpad",title:"My scratchpad",created_at:"",created_by:null},openNotebook=async function(notebookId,target){let autofocus=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,onOpen=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},thePanelLogic=scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__.F.findMounted();thePanelLogic&&target===_types__WEBPACK_IMPORTED_MODULE_12__.bZ.Popover?thePanelLogic.actions.selectNotebook(notebookId,{autofocus}):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname===scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook("new")?kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook(notebookId)):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook(notebookId));let theNotebookLogic=(0,scenes_notebooks_Notebook_notebookLogic__WEBPACK_IMPORTED_MODULE_6__.T)({shortId:notebookId}),unmount=theNotebookLogic.mount();try{onOpen(theNotebookLogic)}finally{unmount()}},notebooksModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","notebooks","Notebook","notebooksModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({createNotebook:(location1,title,content,onCreate)=>({title,location:location1,content,onCreate}),receiveNotebookUpdate:notebook=>({notebook}),loadNotebooks:!0,deleteNotebook:(shortId,title)=>({shortId,title}),createNotebookFromDashboard:dashboard=>({dashboard})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_projectLogic__WEBPACK_IMPORTED_MODULE_10__.K,["currentProjectId"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({scratchpadNotebook:[SCRATCHPAD_NOTEBOOK]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{notebooks:[[],{createNotebook:async _ref2=>{let{title,location:location1,content,onCreate}=_ref2,notebook=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.notebooks.create({title,content:(0,scenes_notebooks_Notebook_utils__WEBPACK_IMPORTED_MODULE_7__.Qc)(title,content)});return await openNotebook(notebook.short_id,location1,"end",logic=>{onCreate?.(logic)}),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("notebook created",{short_id:notebook.short_id}),[notebook,...values.notebooks]},deleteNotebook:async _ref3=>{let{shortId,title}=_ref3;await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:`projects/${values.currentProjectId}/notebooks`,object:{name:title||shortId,id:shortId}});let panelLogic=scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__.F.findMounted();return panelLogic&&panelLogic.values.selectedNotebook===shortId&&panelLogic.actions.selectNotebook(SCRATCHPAD_NOTEBOOK.short_id,{silent:!0}),values.notebooks.filter(n=>n.short_id!==shortId)},receiveNotebookUpdate:_ref4=>{let{notebook}=_ref4;return notebook.is_template?values.notebooks:values.notebooks.filter(n=>n.short_id!==notebook.short_id).concat([notebook])}}],notebookTemplates:[scenes_notebooks_NotebookTemplates_notebookTemplates__WEBPACK_IMPORTED_MODULE_9__.D,{}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref5=>{let{asyncActions}=_ref5;return{createNotebookFromDashboard:async _ref6=>{let{dashboard}=_ref6,queries=dashboard.tiles.reduce((acc,tile)=>tile.insight?[...acc,{title:tile.insight.name,query:tile.insight.query}]:acc,[]),resources=queries.map(x=>({type:_types__WEBPACK_IMPORTED_MODULE_12__.Cz.Query,attrs:{title:x.title,query:x.query}}));await asyncActions.createNotebook(_types__WEBPACK_IMPORTED_MODULE_12__.bZ.Scene,dashboard.name+" (copied)",resources)}}})])},"./frontend/src/models/propertyDefinitionsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IP:()=>propertyDefinitionsModel,kU:()=>PROPERTY_FILTER_TYPES_WITH_TEMPORAL_SUGGESTIONS,rR:()=>PROPERTY_FILTER_TYPES_WITH_ALL_TIME_SUGGESTIONS,s8:()=>updatePropertyDefinitions});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_internalMetrics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/internalMetrics.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/types.ts");let PROPERTY_FILTER_TYPES_WITH_TEMPORAL_SUGGESTIONS=[_types__WEBPACK_IMPORTED_MODULE_7__.FT.Event,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Feature],PROPERTY_FILTER_TYPES_WITH_ALL_TIME_SUGGESTIONS=[_types__WEBPACK_IMPORTED_MODULE_7__.FT.Person,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Group,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Session],localProperties={"event/$session_duration":{id:"$session_duration",name:"$session_duration",description:"Duration of the session",is_numerical:!0,is_seen_on_filtered_events:!1,property_type:_types__WEBPACK_IMPORTED_MODULE_7__.uS.Duration},"session/snapshot_source":{id:"snapshot_source",name:"snapshot_source",description:"Platform session occurred on",is_numerical:!1,is_seen_on_filtered_events:!1,property_type:_types__WEBPACK_IMPORTED_MODULE_7__.uS.Selector}},localOptions={"session/snapshot_source":[{id:0,name:"web"},{id:1,name:"mobile"}],"log_entry/level":[{id:0,name:"info"},{id:1,name:"warn"},{id:2,name:"error"}]},updatePropertyDefinitions=propertyDefinitions=>{propertyDefinitionsModel.findMounted()?.actions.updatePropertyDefinitions(propertyDefinitions)},getPropertyKey=(type,propertyName,groupTypeIndex)=>type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group?`${type}/${groupTypeIndex}/${propertyName}`:`${type}/${propertyName}`,checkOrLoadPropertyDefinition=(propertyName,definitionType,propertyDefinitionStorage,groupTypeIndex)=>{let key=getPropertyKey(definitionType,propertyName,groupTypeIndex);"string"!=typeof propertyName||key in propertyDefinitionStorage||window.setTimeout(()=>propertyDefinitionsModel.findMounted()?.actions.loadPropertyDefinitions([propertyName],definitionType,groupTypeIndex),0);let cachedResponse=propertyDefinitionStorage[key];return"object"==typeof cachedResponse?cachedResponse:null},constructValuesEndpoint=(endpoint,teamId,type,propertyKey,eventNames,newInput)=>{let basePath=type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Session?`api/projects/${teamId}/${type}s/values`:`api/${type}/values`,path=endpoint||basePath+`?key=${encodeURIComponent(propertyKey)}`,eventParams="";for(let eventName of eventNames||[])eventParams+=`&event_name=${eventName}`;return path+(newInput?"&value="+encodeURIComponent(newInput):"")+eventParams},propertyDefinitionsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","propertyDefinitionsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["currentTeamId"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadPropertyDefinitions:(propertyKeys,type,groupTypeIndex)=>({propertyKeys,type,groupTypeIndex}),updatePropertyDefinitions:propertyDefinitions=>({propertyDefinitions}),loadPropertyValues:payload=>payload,setOptionsLoading:key=>({key}),setOptions:(key,values,allowCustomValues)=>({key,values,allowCustomValues}),fetchAllPendingDefinitions:!0,abortAnyRunningQuery:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({propertyDefinitionStorage:[{...localProperties},{updatePropertyDefinitions:(state,_ref)=>{let{propertyDefinitions}=_ref;return{...state,...propertyDefinitions}}}],options:[{},{setOptionsLoading:(state,_ref2)=>{let{key}=_ref2;return{...state,[key]:{...state[key],status:"loading"}}},setOptions:(state,_ref3)=>{let{key,values,allowCustomValues}=_ref3;return{...state,[key]:{values:[...Array.from(new Set(values))],status:"loaded",allowCustomValues}}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref4=>{let{actions,values,cache}=_ref4;return{loadPropertyDefinitions:async _ref5=>{let{propertyKeys,type,groupTypeIndex}=_ref5,{propertyDefinitionStorage}=values,pendingStateUpdate={};for(let propertyKey of propertyKeys){let key=getPropertyKey(type,propertyKey,groupTypeIndex);key in propertyDefinitionStorage&&propertyDefinitionStorage[key]!==_types__WEBPACK_IMPORTED_MODULE_7__.wz.Error||(pendingStateUpdate[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Pending)}0!==Object.keys(pendingStateUpdate).length&&(actions.updatePropertyDefinitions(pendingStateUpdate),actions.fetchAllPendingDefinitions())},fetchAllPendingDefinitions:async(_,breakpoint)=>{if(await breakpoint(10),0===values.pendingProperties.length)return;let allPending=values.pendingProperties.slice(0,50),pendingByType={event:[],person:[],"group/0":[],"group/1":[],"group/2":[],"group/3":[],"group/4":[],session:[]};for(let key of allPending){let[type,...rest]=key.split("/");if("group"===type&&(type=`${type}/${rest[0]}`,rest=rest.slice(1)),!(type in pendingByType))throw Error(`Unknown property definition type: ${type}`);pendingByType[type].push(rest.join("/"))}try{let newProperties={};for(let[type,pending]of Object.entries(pendingByType)){if(0===pending.length)continue;actions.updatePropertyDefinitions(Object.fromEntries(pending.map(key=>[`${type}/${key}`,_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading])));let queryParams={type:type,group_type_index:null};for(let propertyDefinition of(type.startsWith("group")&&(queryParams={type:_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group,group_type_index:type.split("/")[1]}),("session"===type?await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.sessions.propertyDefinitions({properties:pending}):await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.propertyDefinitions.list({properties:pending,...queryParams})).results))newProperties[`${type}/${propertyDefinition.name}`]=propertyDefinition;for(let property of pending){let key=`${type}/${property}`;key in newProperties||values.propertyDefinitionStorage[key]!==_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading||(newProperties[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Missing)}actions.updatePropertyDefinitions(newProperties)}}catch(e){let newProperties={};for(let[type,pending]of Object.entries(pendingByType))for(let property of pending){let key=`${type}/${property}`;values.propertyDefinitionStorage[key]===_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading&&(newProperties[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Error)}actions.updatePropertyDefinitions(newProperties)}breakpoint(),values.pendingProperties.length>0&&actions.fetchAllPendingDefinitions()},loadPropertyValues:async(_ref6,breakpoint)=>{let{endpoint,type,newInput,propertyKey,eventNames}=_ref6;if(["cohort"].includes(type)||!propertyKey||null===values.currentTeamId)return;if(localOptions[getPropertyKey(type,propertyKey)]){actions.setOptions(propertyKey,localOptions[getPropertyKey(type,propertyKey)],!1);return}let start=performance.now();await breakpoint(300),actions.setOptionsLoading(propertyKey),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},propValues=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.get(constructValuesEndpoint(endpoint,values.currentTeamId,type,propertyKey,eventNames,newInput),methodOptions);breakpoint(),actions.setOptions(propertyKey,propValues,!0),cache.abortController=null,await (0,lib_internalMetrics__WEBPACK_IMPORTED_MODULE_3__.Gt)(scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H.values.currentTeamId,{type:"property_values_load",context:"filters",action:type,primary_interaction_id:"",status:"success",time_to_see_data_ms:Math.floor(performance.now()-start),api_response_bytes:0})},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({pendingProperties:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>Object.keys(propertyDefinitionStorage).filter(key=>propertyDefinitionStorage[key]===_types__WEBPACK_IMPORTED_MODULE_7__.wz.Pending)],propertyDefinitionsByType:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(type,groupTypeIndex)=>{let keyPrefix="group"===type?`${type}/${groupTypeIndex}/`:`${type}/`;return Object.entries(null!=propertyDefinitionStorage?propertyDefinitionStorage:{}).filter(_ref7=>{let[key,value]=_ref7;return key.startsWith(keyPrefix)&&"object"==typeof value}).map(_ref8=>{let[,value]=_ref8;return value})}],getPropertyDefinition:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,type,groupTypeIndex)=>propertyName&&(type!==_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group||null!=groupTypeIndex)?checkOrLoadPropertyDefinition(propertyName,type,propertyDefinitionStorage,groupTypeIndex):null],describeProperty:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,type,groupTypeIndex)=>{var _checkOrLoadPropertyD;return propertyName&&(type!==_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group||null!=groupTypeIndex)&&null!==(_checkOrLoadPropertyD=checkOrLoadPropertyDefinition(propertyName,type,propertyDefinitionStorage,groupTypeIndex)?.property_type)&&void 0!==_checkOrLoadPropertyD?_checkOrLoadPropertyD:null}],formatPropertyValueForDisplay:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,valueToFormat,type,groupTypeIndex)=>{if(null==valueToFormat||type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group&&null==groupTypeIndex)return null;let propertyDefinition=checkOrLoadPropertyDefinition(propertyName,null!=type?type:_types__WEBPACK_IMPORTED_MODULE_7__.ll.Event,propertyDefinitionStorage,groupTypeIndex),arrayOfPropertyValues=Array.isArray(valueToFormat)?valueToFormat:[valueToFormat],formattedValues=arrayOfPropertyValues.map(_propertyValue=>{let propertyValue=String(_propertyValue);if(propertyDefinition?.property_type==="DateTime"){if(propertyValue?.match(/^\d{10}(\.\d*)?$/)){let numericalTimestamp=Number.parseFloat(propertyValue);return lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.unix(numericalTimestamp).tz().format("YYYY-MM-DD hh:mm:ss")}if(propertyValue?.match(/^\d{13}$/)){let numericalTimestamp=Number.parseInt(propertyValue);return(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(numericalTimestamp).tz().format("YYYY-MM-DD hh:mm:ss")}}else if(propertyDefinition?.property_type===_types__WEBPACK_IMPORTED_MODULE_7__.uS.Duration){let numericalDuration=Number.parseFloat(propertyValue);return isNaN(numericalDuration)?propertyValue:(0,lib_utils__WEBPACK_IMPORTED_MODULE_4__.Dh)(numericalDuration)}return propertyValue});return Array.isArray(valueToFormat)?formattedValues:formattedValues[0]}]}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/tagsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>tagsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx");let tagsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","tagsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_3__.p,["hasTagging"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{tags:{__default:[],loadTags:async()=>values.hasTagging&&await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.tags.list()||[]}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;return actions.loadTags()})])},"./frontend/src/queries/Query/Query.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Query});var LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),HogDebug=__webpack_require__("./frontend/src/scenes/debug/HogDebug.tsx"),ErrorBoundary=__webpack_require__("./frontend/src/layout/ErrorBoundary/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function OpenEditorButton(_ref){let{query,...props}=_ref;return(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"open-json-editor-button",type:"secondary",to:query?urls.j.insightNew(void 0,void 0,query):void 0,icon:(0,jsx_runtime.jsx)(icons.VM,{}),tooltip:"Open as a new insight",...props})}let uniqueNode=0;function DataNode(props){let[key]=(0,react.useState)(()=>`DataNode.${uniqueNode++}`),logic=(0,dataNodeLogic.M)({...props,key,cachedResults:props.cachedResults,dataNodeCollectionId:key}),{response,responseLoading,responseErrorObject}=(0,index_esm.useValues)(logic);return(0,jsx_runtime.jsxs)("div",{className:"relative",children:[(0,jsx_runtime.jsx)("div",{className:"absolute right-0 z-10 p-1 mr-3",children:(0,jsx_runtime.jsx)(OpenEditorButton,{query:props.query})}),responseLoading?(0,jsx_runtime.jsx)("div",{className:"text-2xl",children:(0,jsx_runtime.jsx)(Spinner.$,{})}):(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref=>{let{height}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"json",value:JSON.stringify(null!=response?response:responseErrorObject,null,2),height:Math.max(height,300)})}})]})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DataTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/DataTable.scss"),DataTable_default=__webpack_require__.n(DataTable),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DataTable_default(),options),DataTable_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TaxonomicPopover=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),EventDetails=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/activity/explore/EventDetails.scss"),EventDetails_default=__webpack_require__.n(EventDetails),EventDetails_options={};EventDetails_options.insert="head",EventDetails_options.singleton=!1,injectStylesIntoStyleTag_default()(EventDetails_default(),EventDetails_options),EventDetails_default().locals;var ErrorDisplay=__webpack_require__("./frontend/src/lib/components/Errors/ErrorDisplay.tsx"),HTMLElementsDisplay=__webpack_require__("./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.tsx"),JSONViewer=__webpack_require__("./frontend/src/lib/components/JSONViewer.tsx"),PropertiesTable=__webpack_require__("./frontend/src/lib/components/PropertiesTable/index.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),event_property_utls=__webpack_require__("./frontend/src/lib/utils/event-property-utls.tsx"),src_types=__webpack_require__("./frontend/src/types.ts");function EventDetails_EventDetails(_ref){let{event,tableProps}=_ref,[showSystemProps,setShowSystemProps]=(0,react.useState)(!1),[activeTab,setActiveTab]=(0,react.useState)("$exception"===event.event?"exception":"properties"),displayedEventProperties={},visibleSystemProperties={},featureFlagProperties={},systemPropsCount=0;for(let key of Object.keys(event.properties))taxonomy.dA.events[key]&&taxonomy.dA.events[key].system&&(systemPropsCount+=1,showSystemProps&&(visibleSystemProperties[key]=event.properties[key])),taxonomy.dA.events[key]&&taxonomy.dA.events[key].system||(key.startsWith("$feature")||"$active_feature_flags"===key?featureFlagProperties[key]=event.properties[key]:displayedEventProperties[key]=event.properties[key]);let tabs=[{key:"raw",label:"Raw",content:(0,jsx_runtime.jsx)("div",{className:"-mt-3 px-4 py-2",children:(0,jsx_runtime.jsx)(JSONViewer.C,{src:event,name:"event",collapsed:1,collapseStringsAfterLength:80,sortKeys:!0})})},{key:"metadata",label:"Metadata",content:(0,jsx_runtime.jsx)("div",{className:"-mt-3",children:(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Meta,properties:{event:event.event,distinct_id:event.distinct_id,timestamp:event.timestamp},sortProperties:!0,tableProps:tableProps})})},{key:"properties",label:"Properties",content:(0,jsx_runtime.jsxs)("div",{className:"ml-10 mt-2",children:[(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Event,properties:{..."timestamp"in event?{$timestamp:(0,dayjs.Bv)(event.timestamp).toISOString()}:{},...displayedEventProperties,...visibleSystemProperties},useDetectedPropertyType:!0,tableProps:tableProps,filterable:!0,searchable:!0,parent:event.event}),systemPropsCount>0&&(0,jsx_runtime.jsxs)(LemonButton.J,{className:"mb-2",onClick:()=>setShowSystemProps(!showSystemProps),size:"small",children:[showSystemProps?"Hide":"Show"," ",(0,utils.Zi)(systemPropsCount,"system property","system properties")]})]})}];return event.elements&&event.elements.length>0&&tabs.push({key:"elements",label:"Elements",content:(0,jsx_runtime.jsx)(HTMLElementsDisplay.t,{elements:event.elements,selectedText:event.properties.$selected_content})}),event.elements&&(0,event_property_utls.Uq)(event.elements)&&tabs.push({key:"image",label:"Image",content:(0,jsx_runtime.jsx)(event_property_utls.R3,{elements:event.elements})}),"$exception"===event.event&&tabs.push({key:"exception",label:"Exception",content:(0,jsx_runtime.jsx)("div",{className:"ml-10 my-2",children:(0,jsx_runtime.jsx)(ErrorDisplay.X,{eventProperties:event.properties})})}),Object.keys(featureFlagProperties).length>0&&tabs.push({key:"feature_flags",label:"Feature flags",content:(0,jsx_runtime.jsx)("div",{className:"ml-10 mt-2",children:(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Event,properties:{...featureFlagProperties},useDetectedPropertyType:!0,tableProps:tableProps,searchable:!0})})}),(0,jsx_runtime.jsx)(LemonTabs.T,{"data-attr":"event-details",tabs:tabs,activeKey:activeTab,onChange:setActiveTab})}var EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),PersonDeleteModal=__webpack_require__("./frontend/src/scenes/persons/PersonDeleteModal.tsx"),DateRange=__webpack_require__("./frontend/src/queries/nodes/DataNode/DateRange.tsx"),ElapsedTime=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),LoadNext=__webpack_require__("./frontend/src/queries/nodes/DataNode/LoadNext.tsx"),Reload=__webpack_require__("./frontend/src/queries/nodes/DataNode/Reload.tsx"),TestAccountFiltersSwitch=__webpack_require__("./frontend/src/lib/components/TestAccountFiltersSwitch.tsx"),filterTestAccountDefaultsLogic=__webpack_require__("./frontend/src/scenes/settings/environment/filterTestAccountDefaultsLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts");function TestAccountFilters(_ref){let{query,setQuery}=_ref,{currentTeam}=(0,index_esm.useValues)(teamLogic.H),hasFilters=(currentTeam?.test_account_filters||[]).length>0,{setLocalDefault}=(0,index_esm.useActions)(filterTestAccountDefaultsLogic.V);if(!(0,queries_utils.rz)(query)&&!(0,queries_utils.Vf)(query))return null;let checked=!!hasFilters&&!!((0,queries_utils.Vf)(query)?query.filters?.filterTestAccounts:!!(0,queries_utils.rz)(query)&&query.filterTestAccounts),onChange=(0,queries_utils.Vf)(query)?checked=>{let newQuery={...query,filters:{...query.filters,filterTestAccounts:checked}};setQuery?.(newQuery)}:(0,queries_utils.rz)(query)?checked=>{let newQuery={...query,filterTestAccounts:checked};setQuery?.(newQuery)}:void 0;return(0,jsx_runtime.jsx)(TestAccountFiltersSwitch.Z,{checked:checked,onChange:checked=>{onChange?.(checked),setLocalDefault(checked)}})}var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),summarizeInsight=__webpack_require__("./frontend/src/scenes/insights/summarizeInsight.ts"),mathsLogic=__webpack_require__("./frontend/src/scenes/trends/mathsLogic.tsx"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts");function BackToSource(){var _backToSourceQuery$so;let{aggregationLabel}=(0,index_esm.useValues)(groupsModel.$),{cohortsById}=(0,index_esm.useValues)(cohortsModel.Q),{mathDefinitions}=(0,index_esm.useValues)(mathsLogic.fx),{backToSourceQuery}=(0,index_esm.useValues)(dataNodeLogic.M);if(!backToSourceQuery)return null;let summary=(0,summarizeInsight.wN)(backToSourceQuery.source,{aggregationLabel,cohortsById,mathDefinitions});return(0,jsx_runtime.jsxs)(LemonButton.J,{tooltip:summary,type:"secondary",onClick:()=>lib.router.actions.push(urls.j.insightNew(void 0,void 0,backToSourceQuery)),children:["\xab Back to ",null!==(_backToSourceQuery$so=backToSourceQuery.source.kind?.replace("Query",""))&&void 0!==_backToSourceQuery$so?_backToSourceQuery$so:"Insight"]})}var ColumnConfigurator=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss"),ColumnConfigurator_default=__webpack_require__.n(ColumnConfigurator),ColumnConfigurator_options={};ColumnConfigurator_options.insert="head",ColumnConfigurator_options.singleton=!1,injectStylesIntoStyleTag_default()(ColumnConfigurator_default(),ColumnConfigurator_options),ColumnConfigurator_default().locals;var core_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@dnd-kit/core/dist/core.esm.js"),modifiers_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+modifiers@6.0.1_@dnd-kit+core@6.0.8_react@18.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js"),sortable_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+sortable@7.0.2_@dnd-kit+core@6.0.8_react@18.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.js"),utilities_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+utilities@3.2.1_react@18.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),PropertyFilterIcon=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/PropertyFilterIcon.tsx"),PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),RestrictedArea=__webpack_require__("./frontend/src/lib/components/RestrictedArea.tsx"),TaxonomicFilter=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonCheckbox=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),dataTableLogic=__webpack_require__("./frontend/src/queries/nodes/DataTable/dataTableLogic.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),DataTable_utils=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),defaultEventsQuery=__webpack_require__("./frontend/src/queries/nodes/DataTable/defaultEventsQuery.ts");let columnConfiguratorLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.path)(["queries","nodes","DataTable","columnConfiguratorLogic"]),(0,index_esm.key)(props=>props.key),(0,index_esm.actions)({showModal:!0,hideModal:!0,selectColumn:column=>({column}),unselectColumn:column=>({column}),setColumns:columns=>({columns}),moveColumn:(oldIndex,newIndex)=>({oldIndex,newIndex}),save:!0,toggleSaveAsDefault:!0}),(0,index_esm.reducers)(_ref=>{let{props}=_ref;return{saveAsDefault:[!1,{toggleSaveAsDefault:state=>!state,showModal:()=>!1}],modalVisible:[!1,{showModal:()=>!0,hideModal:()=>!1,save:()=>!1}],columns:[props.columns,{setColumns:(_,_ref2)=>{let{columns}=_ref2;return columns},selectColumn:(state,_ref3)=>{let{column}=_ref3;return Array.from(new Set([...state,column]))},unselectColumn:(state,_ref4)=>{let{column}=_ref4;return state.filter(c=>c!==column)},moveColumn:(state,_ref5)=>{let{oldIndex,newIndex}=_ref5,newColumns=[...state],[removed]=newColumns.splice(oldIndex,1);return newColumns.splice(newIndex,0,removed),newColumns}}]}}),(0,index_esm.propsChanged)((_ref6,oldProps)=>{let{actions,props}=_ref6;JSON.stringify(props.columns)!==JSON.stringify(oldProps.columns)&&actions.setColumns(props.columns)}),(0,index_esm.listeners)(_ref7=>{let{values,props}=_ref7;return{save:()=>{props.isPersistent&&values.saveAsDefault&&teamLogic.H.actions.updateCurrentTeam({live_events_columns:[defaultEventsQuery.JB,...values.columns]}),props.setColumns(values.columns)}}})]),ColumnConfigurator_uniqueNode=0;function ColumnConfigurator_ColumnConfigurator_ColumnConfigurator(_ref){let{query,setQuery}=_ref,{columnsInQuery}=(0,index_esm.useValues)(dataTableLogic.yC),[key]=(0,react.useState)(()=>String(ColumnConfigurator_uniqueNode++)),columnConfiguratorLogicProps={key,isPersistent:!!query.showPersistentColumnConfigurator,columns:columnsInQuery,setColumns:columns=>{if((0,queries_utils.rz)(query.source)){let orderBy=query.source.orderBy;if(orderBy&&orderBy.length>0){let orderColumn=(0,DataTable_utils.$p)(orderBy[0].endsWith(" DESC")?orderBy[0].replace(/ DESC$/,""):orderBy[0]);columns.some(c=>(0,DataTable_utils.$p)(c)===orderColumn)||(orderBy=void 0)}setQuery?.({...query,source:{...query.source,orderBy,select:columns}})}else setQuery?.({...query,columns})}},{showModal}=(0,index_esm.useActions)(columnConfiguratorLogic(columnConfiguratorLogicProps));return(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:columnConfiguratorLogic,props:columnConfiguratorLogicProps,children:[(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary","data-attr":"events-table-column-selector",icon:(0,jsx_runtime.jsx)(icons._x,{}),onClick:showModal,children:"Configure columns"}),(0,jsx_runtime.jsx)(ColumnConfiguratorModal,{query:query,setQuery:setQuery})]})}function ColumnConfiguratorModal(_ref2){let{query}=_ref2,restrictionReason=(0,RestrictedArea.U)({minimumAccessLevel:constants.ZN.Admin,scope:RestrictedArea.C.Project}),{modalVisible,columns,saveAsDefault}=(0,index_esm.useValues)(columnConfiguratorLogic),{hideModal,moveColumn,setColumns,selectColumn,unselectColumn,save,toggleSaveAsDefault}=(0,index_esm.useActions)(columnConfiguratorLogic),onEditColumn=(column,index)=>{let newColumn=window.prompt("Edit column",column);newColumn&&setColumns(columns.map((c,i)=>i===index?newColumn:c))};return(0,jsx_runtime.jsx)(LemonModal.f,{isOpen:modalVisible,title:"Configure columns",onClose:hideModal,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:()=>setColumns((0,DataTable_utils.Qi)(schema.OH.EventsQuery)),children:"Reset to defaults"})}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:hideModal,children:"Close"}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",onClick:save,"data-attr":"items-selector-confirm",children:"Save"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"ColumnConfiguratorModal",children:[(0,jsx_runtime.jsxs)("div",{className:"Columns",children:[(0,jsx_runtime.jsxs)("div",{className:"HalfColumn",children:[(0,jsx_runtime.jsxs)("h4",{className:"secondary uppercase text-muted",children:["Visible columns (",columns.length,") - Drag to reorder"]}),(0,jsx_runtime.jsx)(core_esm.LB,{onDragEnd:_ref3=>{let{active,over}=_ref3;over&&active.id!==over.id&&moveColumn(columns.indexOf(active.id.toString()),columns.indexOf(over.id.toString()))},modifiers:[modifiers_esm.DL,modifiers_esm.F4],children:(0,jsx_runtime.jsx)(sortable_esm.Fo,{items:columns,strategy:sortable_esm.qw,children:columns.map((column,index)=>(0,jsx_runtime.jsx)(SelectedColumn,{column:column,dataIndex:index,onEdit:onEditColumn,onRemove:unselectColumn},column))})})]}),(0,jsx_runtime.jsxs)("div",{className:"HalfColumn",children:[(0,jsx_runtime.jsx)("h4",{className:"secondary uppercase text-muted",children:"Available columns"}),(0,jsx_runtime.jsx)("div",{className:"h-[360px]",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref4=>{let{height,width}=_ref4;return(0,jsx_runtime.jsx)(TaxonomicFilter.I,{height:height,width:width,taxonomicGroupTypes:[types.t.EventProperties,types.t.EventFeatureFlags,types.t.PersonProperties,...(0,queries_utils.rz)(query.source)?[types.t.HogQLExpression]:[]],value:void 0,onChange:(group,value)=>{let column=(0,queries_utils.R_)(group.type,value);null!==column&&selectColumn(column)},popoverEnabled:!1,selectFirstItem:!1})}})})]})]}),(0,queries_utils.rz)(query.source)&&query.showPersistentColumnConfigurator?(0,jsx_runtime.jsx)(LemonCheckbox.H,{label:"Save as default for all project members",className:"mt-2","data-attr":"events-table-save-columns-as-default-toggle",bordered:!0,checked:saveAsDefault,onChange:toggleSaveAsDefault,disabledReason:restrictionReason}):null]})})}let SelectedColumn=_ref5=>{let filterGroupType,{column,dataIndex,onEdit,onRemove}=_ref5,{setNodeRef,attributes,transform,transition,listeners}=(0,sortable_esm.nB)({id:column}),columnType=null,columnKey=column;return column.startsWith("person.properties.")&&(columnType=src_types.FT.Person,filterGroupType=types.t.PersonProperties,columnKey=column.substring(18)),column.startsWith("properties.")&&(columnType=src_types.FT.Event,columnKey=column.substring(11)),columnKey=(0,queries_utils.go)((0,DataTable_utils.fU)(columnKey)),(0,jsx_runtime.jsx)("div",{ref:setNodeRef,style:{transform:utilities_esm.ux.Transform.toString(transform),transition},...attributes,children:(0,jsx_runtime.jsxs)("div",{className:"SelectedColumn",children:[(0,jsx_runtime.jsx)("span",{...listeners,className:"drag-handle",children:(0,jsx_runtime.jsx)(icons.ar,{})}),columnType&&(0,jsx_runtime.jsx)(PropertyFilterIcon.h,{type:columnType}),(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{className:"ml-1",value:columnKey,type:filterGroupType||types.t.EventProperties}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Edit",children:(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>onEdit(column,dataIndex),size:"small",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{"data-attr":"column-display-item-edit-icon"})})}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Remove",children:(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>onRemove(column),status:"danger",size:"small",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{"data-attr":"column-display-item-remove-icon"})})})]})})};var DataTableExport=__webpack_require__("./frontend/src/queries/nodes/DataTable/DataTableExport.tsx"),ViewRecordingButton=__webpack_require__("./frontend/src/lib/components/ViewRecordingButton.tsx"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),getAppContext=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),createActionFromEvent=__webpack_require__("./frontend/src/scenes/activity/explore/createActionFromEvent.tsx"),insights_utils=__webpack_require__("./frontend/src/scenes/insights/utils.tsx");function EventRowActions(_ref){let{event}=_ref,insightUrl=(0,insights_utils.XR)(event);return(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,getAppContext.ev)()&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>void(0,createActionFromEvent.YG)((0,getAppContext.ev)(),event,0,teamLogic.H.findMounted()?.values.currentTeam?.data_attributes||[]),fullWidth:!0,"data-attr":"events-table-create-action",children:"Create action from event"}),event.uuid&&event.timestamp&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,sideIcon:(0,jsx_runtime.jsx)(icons.JH,{}),"data-attr":"events-table-event-link",onClick:()=>void(0,copyToClipboard.v)(urls.j.absolute(urls.j.currentProject(urls.j.event(String(event.uuid),event.timestamp))),"link to event"),children:"Copy link to event"}),(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{fullWidth:!0,inModal:!0,sessionId:event.properties.$session_id,timestamp:event.timestamp,disabledReason:(0,ViewRecordingButton.k)(event.properties)?void 0:"Replay was not active when capturing this event","data-attr":"events-table-usage"}),insightUrl&&(0,jsx_runtime.jsx)(LemonButton.J,{to:insightUrl,fullWidth:!0,"data-attr":"events-table-usage",children:"Try out in Insights"})]})})}var LemonSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),persons_modal_utils=__webpack_require__("./frontend/src/scenes/trends/persons-modal/persons-modal-utils.tsx"),kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),query=__webpack_require__("./frontend/src/queries/query.ts");let insightActorsQueryOptionsLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","nodes","DataTable","sourceQueryOptionsLogic"]),(0,index_esm.props)({}),(0,index_esm.actions)({load:!0}),(0,kea_loaders_lib.loaders)(_ref=>{let{values,props}=_ref;return{insightActorsQueryOptions:[null,{load:async()=>{if(!props.query||!(0,queries_utils.a5)(props.query))return values.insightActorsQueryOptions||null;let optionsQuery={kind:schema.OH.InsightActorsQueryOptions,source:props.query};return await (0,query.jr)(optionsQuery)}}]}}),(0,index_esm.afterMount)(_ref2=>{let{actions}=_ref2;actions.load()}),(0,index_esm.propsChanged)((_ref3,oldProps)=>{let{actions,props}=_ref3;JSON.stringify(props.query)!==JSON.stringify(oldProps.query)&&actions.load()})]);function InsightActorsQueryOptions(_ref){let{setQuery,query}=_ref,localDataNodeLogic=(0,index_esm.useMountedLogic)(dataNodeLogic.M),{insightActorsQueryOptions}=(0,index_esm.useValues)(insightActorsQueryOptionsLogic({key:localDataNodeLogic.key,query:query}));return query&&insightActorsQueryOptions?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,persons_modal_utils.Nc)(insightActorsQueryOptions,query).map(_ref2=>{var _query$key;let[key,options]=_ref2;return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(LemonSelect.Yv,{fullWidth:!0,className:"min-w-32",placeholder:key,value:null!==(_query$key=query?.[key])&&void 0!==_query$key?_query$key:null,onChange:v=>setQuery?.({...query,[key]:v}),options:options})},key)})}):null}var queryFeatures=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),renderColumn=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumn.tsx"),renderColumnMeta=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumnMeta.tsx"),fast_deep_equal=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal_default=__webpack_require__.n(fast_deep_equal);function SavedQueries(_ref){let{query,setQuery}=_ref,{currentTeam}=(0,index_esm.useValues)(teamLogic.H);if(!setQuery||!currentTeam)return null;let eventsQueries=(0,defaultEventsQuery.v8)(currentTeam),selectedTitle=Object.keys(eventsQueries).find(key=>fast_deep_equal_default()(eventsQueries[key],query.source));return selectedTitle||(selectedTitle=Object.keys(eventsQueries).find(key=>fast_deep_equal_default()({...eventsQueries[key],before:"",after:""},{...query.source,before:"",after:""}))),selectedTitle||(selectedTitle="Custom query"),(0,jsx_runtime.jsx)(LemonButton.$,{dropdown:{matchWidth:!1,overlay:Object.entries(eventsQueries).map(_ref2=>{let[title,eventsQuery]=_ref2;return(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,active:title===selectedTitle,onClick:()=>setQuery?.({...query,source:eventsQuery}),children:title},title)})},type:"secondary",children:selectedTitle})}var EventName=__webpack_require__("./frontend/src/scenes/actions/EventName.tsx");function EventName_EventName(_ref){var _query$event;let{query,setQuery}=_ref;return(0,jsx_runtime.jsx)(EventName.C,{value:null!==(_query$event=query.event)&&void 0!==_query$event?_query$event:"",disabled:!setQuery,onChange:value=>setQuery?.({...query,event:value}),allEventsOption:"clear"})}var EventPropertyFilters=__webpack_require__("./frontend/src/queries/nodes/EventsNode/EventPropertyFilters.tsx"),HogQLQueryEditor=__webpack_require__("./frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx"),InsightViz=__webpack_require__("./frontend/src/queries/nodes/InsightViz/InsightViz.tsx");function EditHogQLButton(_ref){let{hogql,...props}=_ref,query={kind:schema.OH.DataTableNode,full:!0,source:{kind:schema.OH.HogQLQuery,query:hogql}};return(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"open-json-editor-button",type:"secondary",to:urls.j.insightNew(void 0,void 0,query),icon:(0,jsx_runtime.jsx)(icons._b,{}),tooltip:"Edit SQL directly",...props})}var PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx");let PersonPropertyFilters_uniqueNode=0;function PersonPropertyFilters(_ref){let{query,setQuery}=_ref,[id]=(0,react.useState)(PersonPropertyFilters_uniqueNode++);return!query.properties||Array.isArray(query.properties)?(0,jsx_runtime.jsx)(PropertyFilters.t,{propertyFilters:query.properties||[],onChange:value=>{setQuery?.({...query,properties:value})},pageKey:`PersonPropertyFilters.${id}`,taxonomicGroupTypes:(0,queries_utils.NS)(query)?[types.t.PersonProperties,types.t.Cohorts,types.t.HogQLExpression]:[types.t.PersonProperties],metadataSource:{kind:schema.OH.ActorsQuery}}):(0,jsx_runtime.jsx)("div",{children:"Error: property groups are not supported."})}var LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx");let labels={person:{label:"persons",description:"Search by name, email, Person ID or Distinct ID."},group:{label:"groups",description:"Search by group name or Distinct ID. Group name will match partially. Distinct ID needs to match exactly."}};function PersonsSearch(_ref){let{query,setQuery}=_ref,{value,onChange}=function(query,setQuery,getValueFromQuery,getModifiedQuery){let timeoutMs=arguments.length>4&&void 0!==arguments[4]?arguments[4]:300,propsValue=getValueFromQuery(query),[localValue,setLocalValue]=(0,react.useState)(propsValue),queryRef=(0,react.useRef)(query);(0,react.useEffect)(()=>{queryRef.current=query},[query]);let timeoutRef=(0,react.useRef)();return{value:localValue,onChange:newValue=>{setLocalValue(newValue),timeoutRef.current&&clearTimeout(timeoutRef.current),timeoutRef.current=window.setTimeout(()=>{setQuery?.(getModifiedQuery(queryRef.current,newValue))},timeoutMs)}}}(query,setQuery,query=>query.search||"",(query,value)=>({...query,search:value})),target=(0,queries_utils.wd)(query)?"group":"person";return(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(LemonInput.D,{type:"search",value:value,placeholder:`Search for ${labels[target].label}`,"data-attr":"persons-search",disabled:!setQuery,onChange:onChange}),(0,jsx_runtime.jsx)(Tooltip.u,{title:labels[target].description,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-2xl text-muted-alt shrink-0"})})]})}var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx");function DataTableOpenEditor(_ref){let{query}=_ref,{response}=(0,index_esm.useValues)(dataTableLogic.yC),tableInsightQuery=response?.hogql?{kind:schema.OH.DataTableNode,full:!0,source:{kind:schema.OH.HogQLQuery,query:response.hogql}}:null;return(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",icon:(0,jsx_runtime.jsx)(icons.p$,{}),to:urls.j.insightNew(void 0,void 0,query),sideAction:response?.hogql?{dropdown:{overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{label:"Open as direct SQL insight",to:urls.j.insightNew(void 0,void 0,tableInsightQuery),"data-attr":"open-sql-editor-button"}]})}}:void 0,"data-attr":"open-json-editor-button",children:"Open as new insight"})}let eventGroupTypes=[types.t.HogQLExpression,types.t.EventProperties,types.t.PersonProperties,types.t.EventFeatureFlags],personGroupTypes=[types.t.HogQLExpression,types.t.PersonProperties],DataTable_uniqueNode=0;function DataTable_DataTable_DataTable(_ref){let{uniqueKey,query,setQuery,context,cachedResults,readOnly}=_ref,[uniqueNodeKey]=(0,react.useState)(()=>DataTable_uniqueNode++),[dataKey]=(0,react.useState)(()=>`DataNode.${uniqueKey||uniqueNodeKey}`),insightProps=context?.insightProps||{dashboardItemId:`new-AdHoc.${dataKey}`,dataNodeCollectionId:dataKey},vizKey=(0,InsightViz.gG)(insightProps),dataNodeLogicProps={query:query.source,key:vizKey,cachedResults:cachedResults,dataNodeCollectionId:context?.insightProps?.dataNodeCollectionId||dataKey,alwaysRefresh:context?.alwaysRefresh},builtDataNodeLogic=(0,dataNodeLogic.M)(dataNodeLogicProps),{response,responseLoading,responseError,queryCancelled,nextDataLoading,newDataLoading,highlightedRows,backToSourceQuery}=(0,index_esm.useValues)(builtDataNodeLogic),dataTableLogicProps={query,vizKey,dataKey,dataNodeLogicKey:dataNodeLogicProps.key,context},{dataTableRows,columnsInQuery,columnsInResponse,queryWithDefaults,canSort,sourceFeatures}=(0,index_esm.useValues)((0,dataTableLogic.yC)(dataTableLogicProps)),{showActions,showDateRange,showTestAccountFilters,showSearch,showEventFilter,showPropertyFilter,showHogQLEditor,showReload,showExport,showElapsedTime,showColumnConfigurator,showPersistentColumnConfigurator,showSavedQueries,expandable,embedded,showOpenEditorButton,showResultsTable,showTimings}=queryWithDefaults,isReadOnly=!!readOnly,eventActionsColumnShown=showActions&&sourceFeatures.has(queryFeatures.P.eventActionsColumn)&&columnsInResponse?.includes("*"),columnsInLemonTable=sourceFeatures.has(queryFeatures.P.columnsInResponse)&&null!=columnsInResponse?columnsInResponse:columnsInQuery,groupTypes=(0,queries_utils.NS)(query.source)?personGroupTypes:eventGroupTypes,lemonColumns=[...columnsInLemonTable.map((key,index)=>({dataIndex:key,...(0,renderColumnMeta.a)(key,query,context),render:function RenderDataTableColumn(_,_ref2,recordIndex){let{result,label}=_ref2;return label?index===(expandable?1:0)?{children:label,props:{colSpan:columnsInLemonTable.length+(eventActionsColumnShown?1:0)}}:{props:{colSpan:0}}:result?sourceFeatures.has(queryFeatures.P.resultIsArrayOfArrays)?(0,renderColumn.W)(key,result[index],result,recordIndex,query,setQuery,context):(0,renderColumn.W)(key,result[key],result,recordIndex,query,setQuery,context):void 0},sorter:void 0,more:!isReadOnly&&showActions&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"px-2 py-1",children:[(0,jsx_runtime.jsx)("div",{className:"font-mono font-bold",children:(0,DataTable_utils.fU)(key)}),(0,DataTable_utils.fU)(key)!==(0,DataTable_utils.$p)(key)&&(0,jsx_runtime.jsx)("div",{className:"font-mono",children:(0,DataTable_utils.$p)(key)})]}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:key,groupTypes:groupTypes,metadataSource:query.source,renderValue:()=>(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Edit column"}),type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source),isAggregation=(0,queries_utils.Tw)(hogQl),isOrderBy=source.orderBy?.[0]===key,isDescOrderBy=source.orderBy?.[0]===`${key} DESC`;setQuery({...query,source:{...source,select:columns.map((s,i)=>i===index?hogQl:s).filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c),orderBy:isOrderBy||isDescOrderBy?[isDescOrderBy?`${hogQl} DESC`:hogQl]:source.orderBy}})}}}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),canSort&&"person.$delete"!==key&&"person"!==key?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"datatable-sort-asc",onClick:()=>{setQuery?.({...query,source:{...query.source,orderBy:[key]}})},children:"Sort ascending"}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"datatable-sort-desc",onClick:()=>{setQuery?.({...query,source:{...query.source,orderBy:[`${key} DESC`]}})},children:"Sort descending"}),(0,jsx_runtime.jsx)(LemonDivider.p,{})]}):null,(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:"",groupTypes:groupTypes,metadataSource:query.source,placeholder:(0,jsx_runtime.jsx)("span",{className:"not-italic",children:"Add column left"}),"data-attr":"datatable-add-column-left",type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let isAggregation=(0,queries_utils.Tw)(hogQl),source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source);setQuery({...query,source:{...source,select:[...columns.slice(0,index),hogQl,...columns.slice(index)].filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c)}})}}}),(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:"",groupTypes:groupTypes,metadataSource:query.source,placeholder:(0,jsx_runtime.jsx)("span",{className:"not-italic",children:"Add column right"}),"data-attr":"datatable-add-column-right",type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let isAggregation=(0,queries_utils.Tw)(hogQl),source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source);setQuery?.({...query,source:{...source,select:[...columns.slice(0,index+1),hogQl,...columns.slice(index+1)].filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c)}})}}}),columnsInQuery.filter(c=>"*"!==c).length>1?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,status:"danger","data-attr":"datatable-remove-column",onClick:()=>{let cleanColumnKey=(0,DataTable_utils.$p)(key),newSource={...query.source,select:query.source.select.filter((_,i)=>i!==index),orderBy:query.source.orderBy?.find(orderKey=>DataTable_utils.$p(orderKey)===cleanColumnKey||DataTable_utils.$p(orderKey)===`-${cleanColumnKey}`)?void 0:query.source.orderBy};setQuery?.({...query,source:newSource})},children:"Remove column"})]}):null]}):void 0})),...eventActionsColumnShown?[{dataIndex:"__more",title:"",render:function RenderMore(_,_ref3){let{label,result}=_ref3;return label?{props:{colSpan:0}}:result&&columnsInResponse?.includes("*")?(0,jsx_runtime.jsx)(EventRowActions,{event:result[columnsInResponse.indexOf("*")]}):null},width:0}]:[]].filter(column=>!query.hiddenColumns?.includes(column.dataIndex)&&"*"!==column.dataIndex),setQuerySource=(0,react.useCallback)(source=>setQuery?.({...query,source}),[setQuery,query]),firstRowLeft=[backToSourceQuery?(0,jsx_runtime.jsx)(BackToSource,{},"return-to-source"):null,backToSourceQuery&&(0,queries_utils.NS)(query.source)&&(0,queries_utils.a5)(query.source.source)?(0,jsx_runtime.jsx)(InsightActorsQueryOptions,{query:query.source.source,setQuery:q=>setQuerySource({...query.source,source:{...query.source.source,...q}})},"source-query-options"):null,showDateRange&&sourceFeatures.has(queryFeatures.P.dateRangePicker)?(0,jsx_runtime.jsx)(DateRange.C,{query:query.source,setQuery:setQuerySource},"date-range"):null,showEventFilter&&sourceFeatures.has(queryFeatures.P.eventNameFilter)?(0,jsx_runtime.jsx)(EventName_EventName,{query:query.source,setQuery:setQuerySource},"event-name"):null,showSearch&&sourceFeatures.has(queryFeatures.P.personsSearch)?(0,jsx_runtime.jsx)(PersonsSearch,{query:query.source,setQuery:setQuerySource},"persons-search"):null,showPropertyFilter&&sourceFeatures.has(queryFeatures.P.eventPropertyFilters)?(0,jsx_runtime.jsx)(EventPropertyFilters.H,{query:query.source,setQuery:setQuerySource,taxonomicGroupTypes:Array.isArray(showPropertyFilter)?showPropertyFilter:void 0},"event-property"):null,showPropertyFilter&&sourceFeatures.has(queryFeatures.P.personPropertyFilters)?(0,jsx_runtime.jsx)(PersonPropertyFilters,{query:query.source,setQuery:setQuerySource},"person-property"):null].filter(x=>!!x),firstRowRight=[showTestAccountFilters&&sourceFeatures.has(queryFeatures.P.testAccountFilters)?(0,jsx_runtime.jsx)(TestAccountFilters,{query:query.source,setQuery:setQuerySource},"test-account-filters"):null,showSavedQueries&&sourceFeatures.has(queryFeatures.P.savedEventsQueries)?(0,jsx_runtime.jsx)(SavedQueries,{query:query,setQuery:setQuery},"saved-queries"):null].filter(x=>!!x),secondRowLeft=[showReload?(0,jsx_runtime.jsx)(Reload.L,{},"reload"):null,showElapsedTime?(0,jsx_runtime.jsx)(ElapsedTime.W,{showTimings:showTimings},"elapsed-time"):null].filter(x=>!!x),secondRowRight=[(showColumnConfigurator||showPersistentColumnConfigurator)&&sourceFeatures.has(queryFeatures.P.columnConfigurator)?(0,jsx_runtime.jsx)(ColumnConfigurator_ColumnConfigurator_ColumnConfigurator,{query:query,setQuery:setQuery},"column-configurator"):null,showExport?(0,jsx_runtime.jsx)(DataTableExport.ln,{query:query,setQuery:setQuery},"data-table-export"):null,showExport&&showOpenEditorButton?(0,jsx_runtime.jsx)(DataTableOpenEditor,{query:query,setQuery:setQuery},"data-table-open-editor"):null].filter(x=>!!x),showFirstRow=!isReadOnly&&(firstRowLeft.length>0||firstRowRight.length>0),showSecondRow=!isReadOnly&&(secondRowLeft.length>0||secondRowRight.length>0),inlineEditorButtonOnRow=showFirstRow?1:showSecondRow?2:0,editorButton=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(OpenEditorButton,{query:query}),response?.hogql?(0,jsx_runtime.jsx)(EditHogQLButton,{hogql:response.hogql}):null]});return showExport||!showOpenEditorButton||isReadOnly||(1===inlineEditorButtonOnRow?firstRowRight.push(editorButton):2===inlineEditorButtonOnRow&&secondRowRight.push(editorButton)),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataTableLogic.yC,props:dataTableLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1 h-full",children:[showHogQLEditor&&(0,queries_utils.Vf)(query.source)&&!isReadOnly?(0,jsx_runtime.jsx)(HogQLQueryEditor.n,{query:query.source,setQuery:setQuerySource,embedded:embedded}):null,showFirstRow&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[firstRowLeft,firstRowLeft.length>0&&firstRowRight.length>0?(0,jsx_runtime.jsx)("div",{className:"flex-1"}):null,firstRowRight]}),showFirstRow&&showSecondRow&&(0,jsx_runtime.jsx)(LemonDivider.p,{className:"my-0"}),showSecondRow&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap",children:[(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:secondRowLeft}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:secondRowRight})]}),showOpenEditorButton&&0===inlineEditorButtonOnRow&&!isReadOnly?(0,jsx_runtime.jsx)("div",{className:"absolute right-0 z-10 p-1",children:editorButton}):null,showResultsTable&&(0,jsx_runtime.jsx)(LemonTable.g,{className:"DataTable",loading:responseLoading&&!nextDataLoading&&!newDataLoading,columns:lemonColumns,embedded:embedded,dataSource:null!=dataTableRows?dataTableRows:[],rowKey:(_,rowIndex)=>rowIndex,sorting:null,useURLForSorting:!1,emptyState:responseError?sourceFeatures.has(queryFeatures.P.displayResponseError)?(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError}):(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query}):(0,jsx_runtime.jsx)(EmptyStates.dV,{heading:context?.emptyStateHeading,detail:context?.emptyStateDetail}),expandable:expandable&&columnsInResponse?.includes("*")?{expandedRowRender:function renderExpand(_ref4){let{result}=_ref4;if((0,queries_utils.rz)(query.source)&&Array.isArray(result)){var _result$columnsInResp;return(0,jsx_runtime.jsx)(EventDetails_EventDetails,{event:null!==(_result$columnsInResp=result[columnsInResponse.indexOf("*")])&&void 0!==_result$columnsInResp?_result$columnsInResp:{}})}if(result&&!Array.isArray(result))return(0,jsx_runtime.jsx)(EventDetails_EventDetails,{event:result})},rowExpandable:_ref5=>{let{result}=_ref5;return!!result},noIndent:!0,expandedRowClassName:_ref6=>{let{result}=_ref6,record=Array.isArray(result)?result[0]:result;return record&&"$exception"===record.event?"border border-x-danger-dark bg-danger-highlight":null}}:void 0,rowClassName:_ref7=>{let{result,label}=_ref7;return(0,clsx_m.default)("DataTable__row",{"DataTable__row--highlight_once":result&&highlightedRows.has(result),"DataTable__row--category_row":!!label,"border border-x-danger-dark bg-danger-highlight":result&&result[0]&&"$exception"===result[0].event})},footer:(null!=dataTableRows?dataTableRows:[]).length>0&&!sourceFeatures.has(queryFeatures.P.hideLoadNextButton)?(0,jsx_runtime.jsx)(LoadNext.g,{query:query.source}):null,onRow:context?.rowProps},[...null!=columnsInResponse?columnsInResponse:[],...columnsInQuery].join("::")),(0,jsx_runtime.jsx)(PersonDeleteModal.S,{})]})})})}var colors=__webpack_require__("./frontend/src/lib/colors.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts");let EvenlyDistributedRows=_ref=>{var _rowLayout$itemsPerRo;let{children,minWidthRems,className}=_ref,[rowLayout,setRowLayout]=(0,react.useState)(),elementRef=(0,react.useRef)(null),updateSize=(0,react.useCallback)(()=>{if(!elementRef.current)return;let pxPerRem=parseFloat(getComputedStyle(document.documentElement).fontSize),minWidthPx=minWidthRems*pxPerRem,containerWidthPx=elementRef.current.offsetWidth,numRows=Math.ceil(children.length/Math.floor(containerWidthPx/minWidthPx)),itemsPerRow=Math.ceil(children.length/numRows);setRowLayout({numRows,itemsPerRow})},[setRowLayout,elementRef,minWidthRems,children.length]);return(0,react.useEffect)(()=>{let resizeObserver;let element=elementRef.current;if(element)return updateSize(),"undefined"!=typeof ResizeObserver&&(resizeObserver=new ResizeObserver(updateSize)),resizeObserver?.observe(element),()=>{resizeObserver?.unobserve(element)}},[updateSize]),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("grid",className),style:{gridTemplateColumns:`repeat(${null!==(_rowLayout$itemsPerRo=rowLayout?.itemsPerRow)&&void 0!==_rowLayout$itemsPerRo?_rowLayout$itemsPerRo:1}, 1fr)`},ref:elementRef,children:rowLayout?children:null})},OVERVIEW_ITEM_CELL_CLASSES="flex-1 border p-2 bg-bg-light rounded min-w-[10rem] h-30 flex flex-col items-center text-center justify-between",WebOverview_uniqueNode=0;function WebOverview(props){var _props$context$insigh,_samplingRate$denomin,_samplingRate$denomin2;let{onData,loadPriority,dataNodeCollectionId}=null!==(_props$context$insigh=props.context.insightProps)&&void 0!==_props$context$insigh?_props$context$insigh:{},[key]=(0,react.useState)(()=>`WebOverview.${WebOverview_uniqueNode++}`),logic=(0,dataNodeLogic.M)({query:props.query,key,cachedResults:props.cachedResults,loadPriority,onData,dataNodeCollectionId:null!=dataNodeCollectionId?dataNodeCollectionId:key}),{response,responseLoading}=(0,index_esm.useValues)(logic),samplingRate=response?.samplingRate,numSkeletons=props.query.conversionGoal?4:6;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(EvenlyDistributedRows,{className:"flex justify-center items-center flex-wrap w-full gap-2",minWidthRems:12,children:responseLoading?(0,utils.w6)(numSkeletons).map(i=>(0,jsx_runtime.jsx)(WebOverviewItemCellSkeleton,{},i)):response?.results?.map(item=>jsx_runtime.jsx(WebOverviewItemCell,{item:item},item.key))||[]}),samplingRate&&!(1===samplingRate.numerator&&(null!==(_samplingRate$denomin=samplingRate.denominator)&&void 0!==_samplingRate$denomin?_samplingRate$denomin:1)===1)?(0,jsx_runtime.jsxs)(LemonBanner.V,{type:"info",className:"my-4",children:["These results using a sampling factor of ",samplingRate.numerator,null!==(_samplingRate$denomin2=samplingRate.denominator)&&void 0!==_samplingRate$denomin2&&_samplingRate$denomin2?`/${samplingRate.denominator}`:"",". Sampling is currently in beta."]}):null]})}let WebOverviewItemCellSkeleton=()=>(0,jsx_runtime.jsxs)("div",{className:OVERVIEW_ITEM_CELL_CLASSES,children:[(0,jsx_runtime.jsx)(src.yW,{className:"h-2 w-10"}),(0,jsx_runtime.jsx)(src.yW,{className:"h-6 w-20"}),(0,jsx_runtime.jsx)(src.yW,{className:"h-2 w-10"})]}),WebOverviewItemCell=_ref=>{let{item}=_ref,label=labelFromKey(item.key),trend=(0,utils.DX)(item.changeFromPreviousPct)?0===item.changeFromPreviousPct?{Icon:icons.cs,color:(0,colors.cM)("muted")}:item.changeFromPreviousPct>0?{Icon:posthog_icons_es.IconTrending,color:item.isIncreaseBad?(0,colors.cM)("danger"):(0,colors.cM)("success")}:{Icon:icons.j4,color:item.isIncreaseBad?(0,colors.cM)("success"):(0,colors.cM)("danger")}:void 0,tooltip=(0,utils.DX)(item.value)&&(0,utils.DX)(item.previous)&&(0,utils.DX)(item.changeFromPreviousPct)?`${label}: ${item.value>=item.previous?"increased":"decreased"} by ${formatPercentage(Math.abs(item.changeFromPreviousPct),{precise:!0})}, to ${formatItem(item.value,item.kind,{precise:!0})} from ${formatItem(item.previous,item.kind,{precise:!0})}`:(0,utils.DX)(item.value)?`${label}: ${formatItem(item.value,item.kind,{precise:!0})}`:"No data";return(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltip,children:(0,jsx_runtime.jsxs)("div",{className:OVERVIEW_ITEM_CELL_CLASSES,children:[(0,jsx_runtime.jsx)("div",{className:"font-bold uppercase text-xs",children:label}),(0,jsx_runtime.jsx)("div",{className:"w-full flex-1 flex items-center justify-center",children:(0,jsx_runtime.jsx)("div",{className:"text-2xl",children:formatItem(item.value,item.kind)})}),trend&&(0,utils.DX)(item.changeFromPreviousPct)?(0,jsx_runtime.jsxs)("div",{style:{color:trend.color},children:[(0,jsx_runtime.jsx)(trend.Icon,{color:trend.color})," ",formatPercentage(item.changeFromPreviousPct)]}):(0,jsx_runtime.jsx)("div",{})]})})},formatPercentage=(x,options)=>options?.precise?(x/100).toLocaleString(void 0,{style:"percent",maximumFractionDigits:1}):x>=1e3?(0,utils.d$)(x)+"%":(x/100).toLocaleString(void 0,{style:"percent",maximumSignificantDigits:2}),formatUnit=(x,options)=>options?.precise?x.toLocaleString():(0,utils.d$)(x),formatItem=(value,kind,options)=>null==value?"-":"percentage"===kind?formatPercentage(value,options):"duration_s"===kind?(0,utils.C7)(value,{secondsPrecision:3}):formatUnit(value,options),labelFromKey=key=>{switch(key){case"visitors":return"Visitors";case"views":return"Page views";case"sessions":return"Sessions";case"session duration":return"Session duration";case"bounce rate":return"Bounce rate";case"lcp score":return"LCP Score";case"conversion rate":return"Conversion rate";case"total conversions":return"Total conversions";case"unique conversions":return"Unique conversions";default:return key.split(" ").map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}};var QueryEditor=__webpack_require__("./frontend/src/queries/QueryEditor/QueryEditor.tsx"),Chart=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Chart.scss"),Chart_default=__webpack_require__.n(Chart),Chart_options={};Chart_options.insert="head",Chart_options.singleton=!1,injectStylesIntoStyleTag_default()(Chart_default(),Chart_options),Chart_default().locals;var animations=__webpack_require__("./frontend/src/lib/animations/animations.ts"),Animation=__webpack_require__("./frontend/src/lib/components/Animation/Animation.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),DataWarehouseTables=__webpack_require__("./frontend/src/scenes/data-warehouse/external/DataWarehouseTables.tsx"),insightDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),insightSceneLogic=__webpack_require__("./frontend/src/scenes/insights/insightSceneLogic.tsx"),BoldNumber=__webpack_require__("./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx"),LineGraph=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx"),SideBar=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/SideBar.tsx"),Table=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Table.tsx"),TableDisplay=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx"),AddVariableButton=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/AddVariableButton.tsx"),variableModalLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),variablesLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts");let DataVisualization_uniqueNode=0;function DataTableVisualization(_ref){let{uniqueKey,query,setQuery,context,cachedResults,readOnly,variablesOverride}=_ref,[key]=(0,react.useState)(`DataVisualizationNode.${null!=uniqueKey?uniqueKey:DataVisualization_uniqueNode++}`),insightProps=context?.insightProps||{dashboardItemId:`new-AdHoc.${key}`,query,setQuery,dataNodeCollectionId:key},vizKey=(0,InsightViz.gG)(insightProps),dataNodeCollectionId=(0,InsightViz.Cf)(insightProps,key),{insightMode}=(0,index_esm.useValues)(insightSceneLogic.T),dataVisualizationLogicProps={key:vizKey,query,dashboardId:insightProps.dashboardId,dataNodeCollectionId,loadPriority:insightProps.loadPriority,insightMode,setQuery,cachedResults,variablesOverride},dataNodeLogicProps={query:query.source,key:vizKey,cachedResults,loadPriority:insightProps.loadPriority,dataNodeCollectionId,variablesOverride},{insightProps:insightLogicProps}=(0,index_esm.useValues)(insightLogic.zm),{exportContext}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightLogicProps));return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataVisualizationLogic.H8,props:dataVisualizationLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:displayLogic.Y,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variablesLogic.Q,props:{key:dataVisualizationLogicProps.key,readOnly:null!=readOnly&&readOnly,dashboardId:insightProps.dashboardId},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variableModalLogic.b,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(InternalDataTableVisualization,{uniqueKey:key,query:query,setQuery:setQuery,context:context,cachedResults:cachedResults,readOnly:readOnly,exportContext:exportContext})})})})})})}function InternalDataTableVisualization(props){let{readOnly}=props,{query,visualizationType,showEditingUI,showResultControls,sourceFeatures,response,responseLoading,responseError,queryCancelled,isChartSettingsPanelOpen}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{setEditorQuery}=(0,index_esm.useActions)(variablesLogic.Q),{toggleChartSettingsPanel}=(0,index_esm.useActions)(dataVisualizationLogic.H8),setQuerySource=(0,react.useCallback)(source=>props.setQuery?.({...props.query,source}),[props.setQuery,props.query]),component=null;return showEditingUI||response&&!responseLoading?visualizationType===src_types.Qb.ActionsTable?component=(0,jsx_runtime.jsx)(Table.i,{uniqueKey:props.uniqueKey,query:query,context:props.context,cachedResults:props.cachedResults}):visualizationType===src_types.Qb.ActionsLineGraph||visualizationType===src_types.Qb.ActionsBar||visualizationType===src_types.Qb.ActionsAreaGraph||visualizationType===src_types.Qb.ActionsStackedBar?component=(0,jsx_runtime.jsx)(LineGraph.x,{}):visualizationType===src_types.Qb.BoldNumber&&(component=(0,jsx_runtime.jsx)(BoldNumber.w,{})):component=(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 justify-center items-center border rounded bg-bg-light",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})}),(0,jsx_runtime.jsxs)("div",{className:"DataVisualization flex flex-1 gap-2",children:[!readOnly&&showEditingUI&&(0,jsx_runtime.jsx)("div",{className:"max-sm:hidden max-w-xs",children:(0,jsx_runtime.jsx)(DataWarehouseTables.f,{inline:!0})}),(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1 overflow-hidden",children:[!readOnly&&showEditingUI&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(HogQLQueryEditor.n,{query:query.source,queryResponse:null!=response?response:void 0,setQuery:setQuerySource,embedded:!0,onChange:setEditorQuery})}),!readOnly&&showResultControls&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.p2,{className:"my-0"}),(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap px-px",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,jsx_runtime.jsx)(Reload.L,{}),(0,jsx_runtime.jsx)(ElapsedTime.W,{})]}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[(0,jsx_runtime.jsx)(AddVariableButton.u,{}),sourceFeatures.has(queryFeatures.P.dateRangePicker)&&!lib.router.values.location.pathname.includes(urls.j.dataWarehouse())&&(0,jsx_runtime.jsx)(DateRange.C,{query:query.source,setQuery:query=>{query.kind===schema.OH.HogQLQuery&&setQuerySource(query)}},"date-range"),(0,jsx_runtime.jsx)(TableDisplay.V,{}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),type:isChartSettingsPanelOpen?"primary":"secondary",onClick:()=>toggleChartSettingsPanel(),tooltip:"Visualization settings"}),props.exportContext&&(0,jsx_runtime.jsx)(ExportButton.j,{disabledReason:visualizationType!=src_types.Qb.ActionsTable&&"Only table results are exportable",type:"secondary",items:[{export_format:src_types.P5.CSV,export_context:props.exportContext},{export_format:src_types.P5.XLSX,export_context:props.exportContext}]})]})})]})]}),(0,jsx_runtime.jsx)(Variables.M,{}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-row gap-4",children:[showEditingUI&&isChartSettingsPanelOpen&&(0,jsx_runtime.jsx)("div",{className:"h-full",children:(0,jsx_runtime.jsx)(SideBar.K,{})}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full flex-1 overflow-auto"),children:visualizationType!==src_types.Qb.ActionsTable&&responseError?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("rounded bg-bg-light relative flex flex-1 flex-col p-2",{border:showEditingUI}),children:(0,jsx_runtime.jsx)(EmptyStates.jC,{query:props.query,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError})}):component})]})]})]})}function SavedInsight(_ref){let{query:propsQuery,context,embedded,readOnly}=_ref,insightProps={dashboardItemId:propsQuery.shortId},{insight,insightLoading}=(0,index_esm.useValues)((0,insightLogic.zm)(insightProps)),{query:dataQuery}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightProps));if(insightLoading)return(0,jsx_runtime.jsx)("div",{className:"text-center",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})});let query={...propsQuery,...dataQuery,full:propsQuery.full};return(0,jsx_runtime.jsx)(Query,{query:query,cachedResults:insight,context:{...context,insightProps},embedded:embedded,readOnly:readOnly})}function Query(props){var _props$uniqueKey;let component;let{query:propsQuery,setQuery:propsSetQuery,readOnly,embedded,filtersOverride,variablesOverride,inSharedMode}=props,[localQuery,localSetQuery]=(0,react.useState)(propsQuery);(0,react.useEffect)(()=>{propsQuery!==localQuery&&localSetQuery(propsQuery)},[propsQuery]);let query=readOnly?propsQuery:localQuery,setQuery=null!=propsSetQuery?propsSetQuery:localSetQuery,queryContext=props.context||{},uniqueKey=null!==(_props$uniqueKey=props.uniqueKey)&&void 0!==_props$uniqueKey?_props$uniqueKey:props.context?.insightProps&&(0,InsightViz.gG)(props.context.insightProps);if(null===query)return null;if("string"==typeof query)try{return(0,jsx_runtime.jsx)(Query,{...props,query:JSON.parse(query)})}catch(e){return(0,jsx_runtime.jsxs)("div",{className:"border border-danger p-4 text-danger",children:["Error parsing JSON: ",e.message]})}return(component=(0,queries_utils.TC)(query)?(0,jsx_runtime.jsx)(DataTable_DataTable_DataTable,{query:query,setQuery:setQuery,context:queryContext,cachedResults:props.cachedResults,uniqueKey:uniqueKey,readOnly:readOnly}):(0,queries_utils.A_)(query)?(0,jsx_runtime.jsx)(DataTableVisualization,{query:query,setQuery:setQuery,cachedResults:props.cachedResults,uniqueKey:uniqueKey,context:queryContext,readOnly:readOnly,variablesOverride:props.variablesOverride}):(0,queries_utils.E0)(query)?(0,jsx_runtime.jsx)(SavedInsight,{query:query,context:queryContext,readOnly:readOnly,embedded:embedded}):(0,queries_utils.KN)(query)?(0,jsx_runtime.jsx)(InsightViz.hs,{query:query,setQuery:setQuery,context:queryContext,readOnly:readOnly,uniqueKey:uniqueKey,embedded:embedded,inSharedMode:inSharedMode,filtersOverride:filtersOverride,variablesOverride:variablesOverride}):(0,queries_utils.vD)(query)?(0,jsx_runtime.jsx)(WebOverview,{query:query,cachedResults:props.cachedResults,context:queryContext}):(0,queries_utils.GD)(query)?(0,jsx_runtime.jsx)(HogDebug.O,{query:query,setQuery:setQuery,queryKey:String(uniqueKey)}):(0,jsx_runtime.jsx)(DataNode,{query:query,cachedResults:props.cachedResults}))?(0,jsx_runtime.jsx)(ErrorBoundary.S,{children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[props.context?.showQueryEditor?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(QueryEditor.W,{query:JSON.stringify(query),setQuery:stringQuery=>setQuery?.(JSON.parse(stringQuery),!0),context:queryContext}),(0,jsx_runtime.jsx)("div",{className:"my-4",children:(0,jsx_runtime.jsx)(LemonDivider.p,{})})]}):null,component]})}):(0,jsx_runtime.jsxs)("div",{className:"text-danger border border-danger p-2",children:[(0,jsx_runtime.jsx)("strong",{children:"PostHoqQuery error:"})," ",query?.kind?`Invalid node type "${query.kind}"`:"Invalid query"]})}},"./frontend/src/queries/QueryEditor/QueryEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>QueryEditor});var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx");function prettyJSON(source){try{return JSON.stringify(JSON.parse(source),null,2)+"\n"}catch(e){return source}}let queryEditorLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","QueryEditor","queryEditorLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.key),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.query!==oldProps.query&&actions.setQueryInput(prettyJSON(props.query))}),(0,index_esm.actions)({saveQuery:!0,setQueryInput:queryInput=>({queryInput})}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{queryInput:[prettyJSON(props.query),{setQueryInput:(_,_ref3)=>{let{queryInput}=_ref3;return queryInput}}]}}),(0,index_esm.selectors)({parsedQuery:[s=>[s.queryInput],query=>{let JSONQuery=null,error=null;try{JSONQuery=JSON.parse(query)}catch(e){error=e.message}return{JSONQuery,error}}],JSONQuery:[s=>[s.parsedQuery],_ref4=>{let{JSONQuery}=_ref4;return JSONQuery}],error:[s=>[s.parsedQuery],_ref5=>{let{error}=_ref5;return error}],inputChanged:[(s,p)=>[p.query,s.queryInput],(query,queryInput)=>query!==queryInput]}),(0,index_esm.listeners)(_ref6=>{let{actions,props,values}=_ref6;return{saveQuery:()=>{if(values.error)LemonToast.UJ.error(`Error parsing JSON: ${values.error}`);else{let withoutFormatting=JSON.stringify(JSON.parse(values.queryInput));actions.setQueryInput(prettyJSON(withoutFormatting)),props.setQuery?.(withoutFormatting)}}}})]);var schema=__webpack_require__("./frontend/src/queries/schema.json"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let i=0;function QueryEditor(props){let[key]=(0,react.useState)(()=>i++),{queryInput,error,inputChanged}=(0,index_esm.useValues)(queryEditorLogic({...props,key})),{setQueryInput,saveQuery}=(0,index_esm.useActions)(queryEditorLogic({...props,key}));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[props.context?.showQueryHelp?(0,jsx_runtime.jsx)("div",{className:"mb-2 flex flex-row flex-wrap justify-between items-center",children:(0,jsx_runtime.jsxs)("div",{children:["Insight configurations follow a declarative schema. Edit them as code here. Open under"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.debugQuery(queryInput),children:"/debug"}),"."]})}):null,(0,jsx_runtime.jsxs)("div",{"data-attr":"query-editor",className:(0,clsx_m.default)("flex flex-col p-2 bg-bg-3000 space-y-2 resize-y overflow-auto h-80 rounded",props.className),children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref=>{let{height}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"json",value:queryInput,onChange:v=>setQueryInput(null!=v?v:""),height:height,schema:schema})}})}),error?(0,jsx_runtime.jsxs)("div",{className:"bg-danger text-white p-2",children:[(0,jsx_runtime.jsx)("strong",{children:"Error parsing JSON:"})," ",error]}):null,props.aboveButton,(0,jsx_runtime.jsx)(LemonButton.J,{onClick:saveQuery,type:"primary",status:error?"danger":"default",disabled:!props.setQuery||!!error||!inputChanged,fullWidth:!0,center:!0,"data-attr":"query-editor-save",children:props.setQuery?"Update and run":"No permission to update"})]})]})}},"./frontend/src/queries/examples.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$R:()=>examples,Os:()=>stringifiedExamples});var _queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts"),_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/types.ts");let Events={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery),properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"}],after:"-24h",limit:100},EventsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,source:Events},EventsTableFull={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:Events},TotalEvents={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["count()"]},TotalEventsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:TotalEvents},PropertyFormulas={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["1 + 2 + 3","event","person.created_at","concat(properties['$browser'], ' 💚 ', properties['$geoip_city_name']) -- Browser 💚 City","'random string'"],limit:100},PropertyFormulasTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:PropertyFormulas},EventAggregations={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["concat(properties['$geoip_city_name'], ' ', 'Rocks') -- City","event","count() + 100000 -- Inflamed total","1 + 2"],orderBy:["-count()"]}},Persons={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode,properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Person,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"}]},PersonsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,columns:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode),source:Persons},PersonsTableFull={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,columns:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode),source:Persons},properties={type:_types__WEBPACK_IMPORTED_MODULE_2__.J2.And,values:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.J2.Or,values:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$current_url",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:["https://hedgebox.net/files/"]},{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$geoip_country_code",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:["US","AU"]}]}]},series=[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsNode,name:"$pageview",custom_name:"Views",event:"$pageview",properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"},{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Cohort,key:"id",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.In,value:2}]}],InsightTrendsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.TrendsQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,trendsFilter:{display:_types__WEBPACK_IMPORTED_MODULE_2__.Qb.ActionsAreaGraph},breakdownFilter:{breakdown:"$geoip_country_code",breakdown_type:"event"}},InsightFunnelsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.FunnelsQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,funnelsFilter:{funnelOrderType:_types__WEBPACK_IMPORTED_MODULE_2__.kO.ORDERED},breakdownFilter:{breakdown:"$geoip_country_code",breakdown_type:"event"}},InsightRetentionQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.RetentionQuery,properties,filterTestAccounts:!1,retentionFilter:{targetEntity:{type:"events",id:"$pageview",name:"$pageview"},returningEntity:{type:"events",id:"$pageview",name:"$pageview"}}},InsightPathsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PathsQuery,properties,filterTestAccounts:!1,pathsFilter:{}},InsightStickinessQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.StickinessQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,stickinessFilter:{}},InsightLifecycleQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.LifecycleQuery,properties,filterTestAccounts:!1,dateRange:{date_from:"-7d"},series},HogQLRaw={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.HogQLQuery,query:` select event, +![${fileName}](${url})`),posthog_js__WEBPACK_IMPORTED_MODULE_10__.ZP.capture("markdown image uploaded",{name:fileName})},onError:detail=>{posthog_js__WEBPACK_IMPORTED_MODULE_10__.ZP.capture("markdown image upload failed",{error:detail}),lib_lemon_ui_LemonToast__WEBPACK_IMPORTED_MODULE_7__.U.error(`Error uploading image: ${detail}`)}});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_5__.T,{activeKey:isPreviewShown?"preview":"write",onChange:key=>setIsPreviewShown("preview"===key),tabs:[{key:"write",label:"Write",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{ref:dropRef,className:"LemonTextMarkdown flex flex-col space-y-1 rounded",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTextArea_LemonTextArea__WEBPACK_IMPORTED_MODULE_6__._,{ref:ref,...editAreaProps,autoFocus:!0,value:value,onChange:onChange}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{className:"text-muted inline-flex items-center space-x-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.kh,{className:"text-2xl"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span",{children:"Markdown formatting support"})]}),objectStorageAvailable?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonFileInput__WEBPACK_IMPORTED_MODULE_4__.m,{accept:"image/*",multiple:!1,alternativeDropTargetRef:dropRef,onChange:setFilesToUpload,loading:uploading,value:filesToUpload}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div",{className:"text-muted inline-flex items-center space-x-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_9__.u,{title:"Enable object storage to add images by dragging and dropping.",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.sH,{className:"text-xl mr-1"})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("span",{children:["Add external images using"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_8__.r,{to:"https://www.markdownguide.org/basic-syntax/#images-1",children:[" ","Markdown image links"]}),"."]})]})]})},{key:"preview",label:"Preview",content:value?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_components_Cards_TextCard_TextCard__WEBPACK_IMPORTED_MODULE_1__.D7,{text:value,className:"LemonTextArea--preview"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("i",{children:"Nothing to preview"})}]})})},"./frontend/src/lib/lemon-ui/LemonTextArea/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>lib_lemon_ui_LemonTextArea_LemonTextAreaMarkdown__WEBPACK_IMPORTED_MODULE_1__.X,_:()=>_LemonTextArea__WEBPACK_IMPORTED_MODULE_0__._});var _LemonTextArea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.tsx"),lib_lemon_ui_LemonTextArea_LemonTextAreaMarkdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx")},"./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{UJ:()=>lemonToast,fI:()=>ToastContent,ty:()=>ToastCloseButton});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),posthog_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),react_toastify__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react-toastify@8.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-toastify/dist/react-toastify.esm.js"),_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),_LemonButton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),_Spinner__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ToastCloseButton(_ref){let{closeToast}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_4__.J,{type:"tertiary",size:"small",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{}),onClick:closeToast,"data-attr":"toast-close-button"})}let GET_HELP_BUTTON={label:"Get help",action:()=>{window.open("https://posthog.com/support?utm_medium=in-product&utm_campaign=error-toast","_blank")}};function ToastContent(_ref2){let{type,message,button,id}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div",{className:"flex items-center","data-attr":`${type}-toast`,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{className:"grow overflow-hidden text-ellipsis",children:message}),button&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_LemonButton__WEBPACK_IMPORTED_MODULE_4__.J,{onClick:()=>{button.action(),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.dismiss(id)},type:"secondary",size:"small","data-attr":button.dataAttr,children:button.label})]})}function ensureToastId(toastOptions){return toastOptions.toastId?toastOptions:{...toastOptions,toastId:`lemon-${Math.round(1e7*Math.random())}`}}let lemonToast={info(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.info((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"info",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconInfo,{}),...toastOptions})},success(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"success",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{}),...toastOptions})},warning(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture("toast warning",{message:String(message),button:button?.label,toastId:toastOptions.toastId}),toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.warning((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"warning",message:message,button:button,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconWarning,{}),...toastOptions})},error(message){let{button,...toastOptions}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture&&posthog_js__WEBPACK_IMPORTED_MODULE_1__.ZP.capture("toast error",{message:String(message),button:button?.label,toastId:toastOptions.toastId}),toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.error((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"error",message:message,button:button||GET_HELP_BUTTON,id:toastOptions.toastId}),{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.b8,{}),...toastOptions})},promise(promise,messages){var _icons$pending,_icons$success,_icons$error;let icons=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{button,...toastOptions}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return toastOptions=ensureToastId(toastOptions),react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.promise(promise,{pending:{render:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"info",message:messages.pending}),icon:null!==(_icons$pending=icons.pending)&&void 0!==_icons$pending?_icons$pending:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_Spinner__WEBPACK_IMPORTED_MODULE_5__.$,{})},success:{render(_ref3){let{data}=_ref3;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"success",message:data||messages.success})},icon:null!==(_icons$success=icons.success)&&void 0!==_icons$success?_icons$success:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{})},error:{render(_ref4){let{data}=_ref4;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ToastContent,{type:"error",message:data?.message||messages.error})},icon:null!==(_icons$error=icons.error)&&void 0!==_icons$error?_icons$error:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__.b8,{})}},toastOptions)},dismiss(id){react_toastify__WEBPACK_IMPORTED_MODULE_2__.Am.dismiss(id)}}},"./frontend/src/lib/lemon-ui/LemonToast/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>_LemonToast__WEBPACK_IMPORTED_MODULE_0__.UJ});var _LemonToast__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx")},"./frontend/src/lib/lemon-ui/LemonWidget/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_:()=>LemonWidget_LemonWidget_LemonWidget});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LemonWidget=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonWidget/LemonWidget.scss"),LemonWidget_default=__webpack_require__.n(LemonWidget),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LemonWidget_default(),options),LemonWidget_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonWidget_LemonWidget_LemonWidget(_ref){let{title,onClose,actions,children,className}=_ref;return(0,jsx_runtime.jsxs)(Widget,{className:className,children:[(0,jsx_runtime.jsxs)(Header,{children:[(0,jsx_runtime.jsx)("span",{className:"flex-1 text-primary-alt px-2 truncate",children:title}),actions,onClose&&(0,jsx_runtime.jsx)(LemonButton.J,{status:"danger",onClick:onClose,size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})})]}),(0,jsx_runtime.jsx)(Content,{children:children})]})}let Widget=_ref2=>{let{children,className}=_ref2;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonWidget",className),children:children})},Header=_ref3=>{let{children,className}=_ref3;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("LemonWidget__header",className),children:children})},Content=_ref4=>{let{children}=_ref4;return(0,jsx_runtime.jsx)("div",{className:"LemonWidget__content border-t border-border",children:children})}},"./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>Lettermark_Lettermark_Lettermark,w:()=>LettermarkColor});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Lettermark=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Lettermark/Lettermark.scss"),Lettermark_default=__webpack_require__.n(Lettermark),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Lettermark_default(),options),Lettermark_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let LettermarkColor=function(LettermarkColor){return LettermarkColor.Gray="gray",LettermarkColor}({}),Lettermark_Lettermark_Lettermark=react.forwardRef(function Lettermark(_ref,ref){let{name,index,color,outlined=!1,rounded=!1,size="medium"}=_ref,representation=name?"number"==typeof name?String(Math.floor(name)):String.fromCodePoint(name.codePointAt(0)).toLocaleUpperCase():"?",colorIndex=color||("number"==typeof index?index%8+1:void 0);return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)(`Lettermark Lettermark--${size}`,colorIndex&&`Lettermark--variant-${colorIndex}`,outlined&&"Lettermark--outlined",rounded&&"Lettermark--rounded","?"===representation&&"Lettermark--unknown"),ref:ref,children:representation})})},"./frontend/src/lib/lemon-ui/Lettermark/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>_Lettermark__WEBPACK_IMPORTED_MODULE_0__.B,w:()=>_Lettermark__WEBPACK_IMPORTED_MODULE_0__.w});var _Lettermark__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx")},"./frontend/src/lib/lemon-ui/Link/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>Link_Link_Link});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Link=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Link/Link.scss"),Link_default=__webpack_require__.n(Link),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Link_default(),options),Link_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),getAppContext=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),router_utils=__webpack_require__("./frontend/src/lib/utils/router-utils.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),DraggableToNotebook=__webpack_require__("./frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx"),sidePanelStateLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),types=__webpack_require__("./frontend/src/types.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let shouldForcePageLoad=input=>{if(!input||"string"!=typeof input)return!1;let matches=input.match(/\/project\/(\d+)/);return!!matches&&matches[1]!==`${(0,getAppContext.ev)()}`},isPostHogDomain=url=>/^https:\/\/((www|app|eu)\.)?posthog\.com/.test(url),isDirectLink=url=>/^(mailto:|https?:\/\/|:\/\/)/.test(url),isPostHogComDocs=url=>/^https:\/\/(www\.)?posthog\.com\/docs/.test(url),Link_Link_Link=react.forwardRef((_ref,ref)=>{let{to,target,subtle,disableClientSideRouting,preventClick=!1,onClick:onClickRaw,className,children,disabled,disabledReason,targetBlankIcon="string"==typeof children,...props}=_ref,{elementProps:draggableProps}=(0,DraggableToNotebook.V)({href:"string"==typeof to?to:void 0}),onClick=event=>{if(event.metaKey||event.ctrlKey){event.stopPropagation();return}if(onClickRaw?.(event),event.isDefaultPrevented()){event.preventDefault();return}let mountedSidePanelLogic=sidePanelStateLogic.f.findMounted();if("string"==typeof to&&isPostHogComDocs(to)&&mountedSidePanelLogic){let{sidePanelOpen}=mountedSidePanelLogic.values,{openSidePanel}=mountedSidePanelLogic.actions;event.preventDefault();let target=event.currentTarget,container=document.getElementsByTagName("main")[0],topBar=document.getElementsByClassName("TopBar3000")[0];!sidePanelOpen&&container.contains(target)&&setTimeout(()=>{let y=container.scrollTop+target.getBoundingClientRect().top-topBar.clientHeight;container.scrollTo({top:y})},50),openSidePanel(types.H$.Docs,to);return}target||!to||(0,utils.Bm)(to)||disableClientSideRouting||shouldForcePageLoad(to)||(event.preventDefault(),to&&"#"!==to&&!preventClick&&(Array.isArray(to)?lib.router.actions.push(...to):lib.router.actions.push(to)))},rel="string"==typeof to&&isPostHogDomain(to)?"noopener":"noopener noreferrer",href=to?"string"==typeof to?isDirectLink(to)||disableClientSideRouting?to:(0,router_utils.Jf)(to):"#":void 0;return to?(0,jsx_runtime.jsxs)("a",{ref:ref,className:(0,clsx_m.default)("Link",subtle&&"Link--subtle",className),onClick:onClick,href:href,target:target,rel:"_blank"===target?rel:void 0,...props,...draggableProps,children:[children,targetBlankIcon&&"_blank"===target?(0,jsx_runtime.jsx)(icons.pF,{}):null]}):(0,jsx_runtime.jsx)(Tooltip.u,{title:disabledReason?(0,jsx_runtime.jsx)("span",{className:"italic",children:disabledReason}):void 0,children:(0,jsx_runtime.jsx)("span",{children:(0,jsx_runtime.jsx)("button",{ref:ref,className:(0,clsx_m.default)("Link",subtle&&"Link--subtle",className),onClick:onClick,type:"button",disabled:disabled||!!disabledReason,...props,children:children})})})});Link_Link_Link.displayName="Link"},"./frontend/src/lib/lemon-ui/Link/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>_Link__WEBPACK_IMPORTED_MODULE_0__.r});var _Link__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/Link.tsx")},"./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>PaginationControl_PaginationControl_PaginationControl});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PaginationControl=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.scss"),PaginationControl_default=__webpack_require__.n(PaginationControl),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PaginationControl_default(),options),PaginationControl_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function PaginationControl_PaginationControl_PaginationControl(_ref){let{pagination,currentPage,setCurrentPage,pageCount,dataSourcePage,entryCount,currentStartIndex,currentEndIndex,nouns=["entry","entries"],bordered=!1}=_ref,isPreviousAvailable=null!==currentPage?currentPage>1:!!(pagination?.controlled&&pagination.onBackward),isNextAvailable=null!==currentPage&&null!==pageCount?currentPage{pagination?.controlled&&pagination.onBackward?.(),(pagination?.controlled&¤tPage||!pagination?.controlled)&&setCurrentPage(Math.max(1,Math.min(pageCount,currentPage)-1))}}),(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(icons.VG,{}),disabledReason:isNextAvailable?void 0:"No next page",size:"small",onClick:()=>{pagination?.controlled&&pagination.onForward?.(),(pagination?.controlled&¤tPage||!pagination?.controlled)&&setCurrentPage(Math.min(pageCount,currentPage+1))}})]}):null}},"./frontend/src/lib/lemon-ui/PaginationControl/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>_PaginationControl__WEBPACK_IMPORTED_MODULE_0__.R,h:()=>_usePagination__WEBPACK_IMPORTED_MODULE_1__.h});var _PaginationControl__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.tsx"),_usePagination__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts")},"./frontend/src/lib/lemon-ui/PaginationControl/usePagination.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>usePagination});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function usePagination(dataSource,pagination,id){let currentPageParam=id?`${id}_page`:"page",{location:location1,searchParams,hashParams}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(kea_router__WEBPACK_IMPORTED_MODULE_1__.router),{push}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(kea_router__WEBPACK_IMPORTED_MODULE_1__.router),setCurrentPage=(0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(newPage=>push(location1.pathname,{...searchParams,[currentPageParam]:newPage},hashParams),[location1,searchParams,hashParams,push]),entryCount=pagination?.controlled?pagination.entryCount||null:dataSource.length,pageCount=entryCount&&(pagination?pagination.pageSize?Math.ceil(entryCount/pagination.pageSize):1:null),currentPage=pagination?.controlled?pagination.currentPage||null:Math.min(parseInt(searchParams[currentPageParam])||1,pageCount),{dataSourcePage,currentStartIndex,currentEndIndex}=(0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(()=>{let calculatedStartIndex=pagination&¤tPage&&pagination.pageSize?(currentPage-1)*pagination.pageSize:0,processedDataSource=pagination&&!pagination.controlled?dataSource.slice(calculatedStartIndex,calculatedStartIndex+pagination.pageSize):dataSource,calculatedEndIndex=calculatedStartIndex+processedDataSource.length;return{dataSourcePage:processedDataSource,currentStartIndex:calculatedStartIndex,currentEndIndex:calculatedEndIndex}},[currentPage,pageCount,pagination,dataSource]);return{pagination,dataSourcePage,currentPage,pageCount,currentStartIndex,currentEndIndex,entryCount,setCurrentPage}}},"./frontend/src/lib/lemon-ui/Popover/Popover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J2:()=>Popover,Mp:()=>PopoverOverlayContext,Sn:()=>PopoverReferenceContext}),__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.scss");var _floating_ui_react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/@floating-ui+dom@1.6.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/@floating-ui+react-dom@2.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),clsx__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_components_ScrollableShadows_ScrollableShadows__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/hooks/useEventListener.ts"),lib_hooks_useFloatingContainerContext__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/hooks/useFloatingContainerContext.ts"),lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/hooks/useOutsideClickHandler.ts"),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_transition_group__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/CSSTransition.js"),_LemonTable_LemonTableLoader__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let PopoverOverlayContext=react__WEBPACK_IMPORTED_MODULE_5__.createContext([!0,-1]),PopoverReferenceContext=react__WEBPACK_IMPORTED_MODULE_5__.createContext(null),nestedPopoverReceivedClick=!1,Popover=react__WEBPACK_IMPORTED_MODULE_5__.forwardRef(function PopoverInternal(_ref,contentRef){let{children,referenceElement,overlay,loadingBar,visible,onClickOutside,onClickInside,onMouseEnterInside,onMouseLeaveInside,placement="bottom-start",fallbackPlacements=["bottom-start","bottom-end","top-start","top-end"],className,padded=!0,middleware,matchWidth=!1,maxContentWidth=!1,additionalRefs=[],closeParentPopoverOnClickInside=!1,referenceRef:extraReferenceRef,floatingRef:extraFloatingRef,style,showArrow=!1,overflowHidden=!1}=_ref,[parentPopoverVisible,parentPopoverLevel]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(PopoverOverlayContext),currentPopoverLevel=parentPopoverLevel+1;parentPopoverVisible||(visible=!1);let arrowRef=(0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null),{x,y,refs:{reference:referenceRef,floating:floatingRef,setReference},strategy,placement:effectivePlacement,update,middlewareData}=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.YF)({open:visible,placement,strategy:"fixed",middleware:[...fallbackPlacements?[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.RR)({fallbackPlacements,fallbackStrategy:"initialPlacement"})]:[],(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.uY)({padding:8,boundary:document.body}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.dp)({padding:4,apply(_ref2){let{availableWidth,availableHeight,rects,elements:{floating}}=_ref2;floating.style.maxHeight=`${availableHeight}px`,floating.style.maxWidth=`${Math.min(availableWidth,window.innerWidth-16)}px`,floating.style.width="initial",matchWidth&&(floating.style.minWidth=`${rects.reference.width}px`)}}),...showArrow?[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_10__.x7)({element:arrowRef,padding:8})]:[],...null!=middleware?middleware:[]]}),[floatingElement,setFloatingElement]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(null),mergedReferenceRef=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.qq)([referenceRef,extraReferenceRef||null,children?.ref]),arrowStyle=middlewareData.arrow?{left:`${middlewareData.arrow.x}px`,top:`${middlewareData.arrow.y}px`}:{};(0,react__WEBPACK_IMPORTED_MODULE_5__.useLayoutEffect)(()=>{referenceElement&&setReference(referenceElement)},[referenceElement]),(0,lib_hooks_useEventListener__WEBPACK_IMPORTED_MODULE_2__.O)("keydown",event=>{"Escape"===event.key&&onClickOutside?.(event)},referenceElement),(0,lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__.e)([floatingRef,referenceRef,...additionalRefs],event=>{setTimeout(()=>{visible&&!nestedPopoverReceivedClick&&onClickOutside?.(event)},1)},[visible]),(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>{if(visible&&referenceRef?.current&&floatingElement)return(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_9__.Me)(referenceRef.current,floatingElement,update)},[visible,placement,referenceRef?.current,floatingElement,...additionalRefs]);let floatingContainer=(0,lib_hooks_useFloatingContainerContext__WEBPACK_IMPORTED_MODULE_3__.A)(),clonedChildren=children?react__WEBPACK_IMPORTED_MODULE_5__.cloneElement(children,{ref:mergedReferenceRef}):null,isAttached=clonedChildren||referenceElement,top=isAttached?null!=y?y:0:void 0,left=isAttached?null!=x?x:0:void 0;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[clonedChildren&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverReferenceContext.Provider,{value:[visible,effectivePlacement],children:clonedChildren}),visible?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.ll,{root:floatingContainer,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_transition_group__WEBPACK_IMPORTED_MODULE_11__.Z,{in:visible,timeout:50,classNames:"Popover-",appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverReferenceContext.Provider,{value:null,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(PopoverOverlayContext.Provider,{value:[visible,currentPopoverLevel],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_12__.default)("Popover",padded&&"Popover--padded",maxContentWidth&&"Popover--max-content-width",!isAttached&&"Popover--top-centered",showArrow&&"Popover--with-arrow",className),"data-placement":effectivePlacement,ref:el=>{setFloatingElement(el),floatingRef.current=el,extraFloatingRef&&(extraFloatingRef.current=el)},style:{display:middlewareData.hide?.referenceHidden?"none":void 0,position:strategy,top,left,...style},onClick:e=>{e.target instanceof HTMLElement&&e.target.closest(`.${lib_hooks_useOutsideClickHandler__WEBPACK_IMPORTED_MODULE_4__.r}`)||(onClickInside?.(e),parentPopoverLevel>-1&&!closeParentPopoverOnClickInside&&(nestedPopoverReceivedClick=!0,setTimeout(()=>{nestedPopoverReceivedClick=!1},1)))},onMouseEnter:onMouseEnterInside,onMouseLeave:onMouseLeaveInside,"aria-level":currentPopoverLevel,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div",{className:"Popover__box",children:[showArrow&&isAttached&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{ref:arrowRef,className:"Popover__arrow",style:arrowStyle}),null!=loadingBar&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_LemonTable_LemonTableLoader__WEBPACK_IMPORTED_MODULE_6__.v,{loading:loadingBar,placement:"top"}),overflowHidden?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div",{className:"Popover__content flex flex-col overflow-hidden",ref:contentRef,children:overlay}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_components_ScrollableShadows_ScrollableShadows__WEBPACK_IMPORTED_MODULE_1__.D,{className:"Popover__content",ref:contentRef,direction:"vertical",children:overlay})]})})})})})}):null]})})},"./frontend/src/lib/lemon-ui/Popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J2:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.J2,Mp:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.Mp,Sn:()=>_Popover__WEBPACK_IMPORTED_MODULE_0__.Sn});var _Popover__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx")},"./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ProfileBubbles});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),_Tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ProfileBubbles(_ref){let restTitle,{people,tooltip,limit=6,...divProps}=_ref,overflowing=people.length>limit,shownPeople=people,stashedPeople=[];return overflowing&&(shownPeople=people.slice(0,limit-1),restTitle=(stashedPeople=people.slice(limit-1)).map(_ref2=>{let{email,name,title}=_ref2;return title||name||email}).join(", ")),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Tooltip__WEBPACK_IMPORTED_MODULE_0__.u,{title:tooltip,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.default)("ProfileBubbles",!!divProps.onClick&&"cursor-pointer"),...divProps,children:[shownPeople.map((_ref3,index)=>{let{email,name,title}=_ref3;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(___WEBPACK_IMPORTED_MODULE_1__.Y,{user:{email,first_name:name},title:title||name||email,size:"md",index:index},email)}),overflowing&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:"ProfileBubbles__more",title:restTitle,children:["+",stashedPeople.length]})]})})}},"./frontend/src/lib/lemon-ui/ProfilePicture/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ProfileBubbles.r,Y:()=>ProfilePicture_ProfilePicture_ProfilePicture});var ProfileBubbles=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/ProfileBubbles.tsx"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ProfilePicture=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.scss"),ProfilePicture_default=__webpack_require__.n(ProfilePicture),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ProfilePicture_default(),options),ProfilePicture_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),HedgehogBuddyRender=__webpack_require__("./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddyRender.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),md5=__webpack_require__("./node_modules/.pnpm/md5@2.3.0/node_modules/md5/md5.js"),md5_default=__webpack_require__.n(md5),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),Lettermark=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/Lettermark.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ProfilePicture_ProfilePicture_ProfilePicture=react.forwardRef(function ProfilePicture(_ref,ref){let{user,name,size="lg",showName,className,index,title,type="person"}=_ref,{user:currentUser}=(0,index_esm.useValues)(userLogic.userLogic),[gravatarLoaded,setGravatarLoaded]=(0,react.useState)(),email=user?.email;user&&(name=(0,utils.v2)(user),email=user.email);let combinedNameAndEmail=name&&email?`${name} <${email}>`:name||email,hedgehogProfile=!!user?.hedgehog_config?.use_as_profile,gravatarUrl=(0,react.useMemo)(()=>{if(hedgehogProfile||(0,utils.es)())return;let emailOrNameWithEmail=email||(name?.includes("@")?name:void 0);if(emailOrNameWithEmail){let emailHash=md5_default()(emailOrNameWithEmail.trim().toLowerCase());return`https://www.gravatar.com/avatar/${emailHash}?s=96&d=404`}},[email,hedgehogProfile]),pictureComponent=(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("ProfilePicture",size,className),ref:ref,children:[hedgehogProfile?(0,jsx_runtime.jsx)(HedgehogBuddyRender.C,{...user.hedgehog_config,size:"100%"}):!0!==gravatarLoaded&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"bot"===type?(0,jsx_runtime.jsx)(icons.Ye,{className:"p-0.5"}):hedgehogProfile?(0,jsx_runtime.jsx)(HedgehogBuddyRender.C,{...user.hedgehog_config,size:"100%"}):(0,jsx_runtime.jsx)(Lettermark.B,{name:combinedNameAndEmail,index:index,rounded:!0,color:"system"===type?Lettermark.w.Gray:void 0})}),gravatarUrl&&!1!==gravatarLoaded?(0,jsx_runtime.jsx)("img",{className:"absolute top-0 left-0 w-full h-full rounded-full",src:gravatarUrl,title:title||`This is the Gravatar for ${combinedNameAndEmail}`,alt:"",onError:()=>setGravatarLoaded(!1),onLoad:()=>setGravatarLoaded(!0)}):null]});return showName?(0,jsx_runtime.jsxs)("div",{className:"profile-package",title:combinedNameAndEmail,children:[pictureComponent,(0,jsx_runtime.jsx)("span",{className:"profile-name",children:currentUser?.email===email?"you":name||email||"an unknown user"})]}):pictureComponent})},"./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Spinner_Spinner_Spinner,t:()=>SpinnerOverlay});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Spinner=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Spinner/Spinner.scss"),Spinner_default=__webpack_require__.n(Spinner),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Spinner_default(),options),Spinner_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),bundle_mjs=__webpack_require__("./node_modules/.pnpm/tailwind-merge@2.2.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Spinner_Spinner_Spinner(_ref){let{textColored=!1,className}=_ref;return(0,jsx_runtime.jsxs)("svg",{className:(0,bundle_mjs.m6)("LemonIcon Spinner",textColored&&"Spinner--textColored",className),viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,jsx_runtime.jsx)("g",{className:"Spinner__layer",children:(0,jsx_runtime.jsx)("circle",{cx:"24",cy:"24",r:"16"})}),(0,jsx_runtime.jsx)("g",{className:"Spinner__layer",children:(0,jsx_runtime.jsx)("circle",{cx:"24",cy:"24",r:"16"})})]})}function SpinnerOverlay(_ref2){let{sceneLevel,visible=!0,className,mode="spinning",...spinnerProps}=_ref2;return(0,jsx_runtime.jsx)("div",{className:(0,bundle_mjs.dV)("SpinnerOverlay",sceneLevel&&"SpinnerOverlay--scene-level"),"aria-hidden":!visible,children:"editing"===mode?(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{className:"text-5xl text-primary z-10 drop-shadow-xl"}):(0,jsx_runtime.jsx)(Spinner_Spinner_Spinner,{className:(0,bundle_mjs.m6)("text-5xl",className),...spinnerProps})})}},"./frontend/src/lib/lemon-ui/Spinner/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>_Spinner__WEBPACK_IMPORTED_MODULE_0__.$,t:()=>_Spinner__WEBPACK_IMPORTED_MODULE_0__.t});var _Spinner__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx")},"./frontend/src/lib/lemon-ui/Splotch/Splotch.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>Splotch_Splotch_Splotch,N:()=>SplotchColor});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Splotch=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Splotch/Splotch.scss"),Splotch_default=__webpack_require__.n(Splotch),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Splotch_default(),options),Splotch_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let SplotchColor=function(SplotchColor){return SplotchColor.Purple="purple",SplotchColor.Blue="blue",SplotchColor.Green="green",SplotchColor.Black="black",SplotchColor.White="white",SplotchColor}({});function Splotch_Splotch_Splotch(_ref){let{color}=_ref;return(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("Splotch",`Splotch--${color}`),children:(0,jsx_runtime.jsx)("div",{className:"Splotch__paint"})})}},"./frontend/src/lib/lemon-ui/Splotch/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>_Splotch__WEBPACK_IMPORTED_MODULE_0__.N,k:()=>_Splotch__WEBPACK_IMPORTED_MODULE_0__.k});var _Splotch__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Splotch/Splotch.tsx")},"./frontend/src/lib/lemon-ui/Tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip_Tooltip_Tooltip});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Tooltip=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Tooltip/Tooltip.scss"),Tooltip_default=__webpack_require__.n(Tooltip),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Tooltip_default(),options),Tooltip_default().locals;var floating_ui_react=__webpack_require__("./node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),floating_ui_dom=__webpack_require__("./node_modules/.pnpm/@floating-ui+dom@1.6.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),floating_ui_react_dom=__webpack_require__("./node_modules/.pnpm/@floating-ui+react-dom@2.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),useFloatingContainerContext=__webpack_require__("./frontend/src/lib/hooks/useFloatingContainerContext.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Tooltip_Tooltip_Tooltip(_ref){let{children,title,className="",placement="top",offset=8,arrowOffset,delayMs=500,closeDelayMs=100,interactive=!1,visible:controlledOpen}=_ref,[uncontrolledOpen,setUncontrolledOpen]=(0,react.useState)(!1),[isHoveringTooltip,setIsHoveringTooltip]=(0,react.useState)(!1),caretRef=(0,react.useRef)(null),floatingContainer=(0,useFloatingContainerContext.A)(),open1=null!=controlledOpen?controlledOpen:uncontrolledOpen||isHoveringTooltip,{context,refs}=(0,floating_ui_react.YF)({placement,open:open1,onOpenChange:setUncontrolledOpen,whileElementsMounted:floating_ui_dom.Me,middleware:[(0,floating_ui_core.cv)(offset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.uY)(),(0,floating_ui_react_dom.x7)({element:caretRef})]}),hover=(0,floating_ui_react.XI)(context,{move:!1,delay:{open:delayMs,close:closeDelayMs}}),focus=(0,floating_ui_react.KK)(context),dismiss=(0,floating_ui_react.bQ)(context),role=(0,floating_ui_react.qs)(context,{role:"tooltip"}),{getFloatingProps,getReferenceProps}=(0,floating_ui_react.NI)([hover,focus,dismiss,role]),{styles:transitionStyles}=(0,floating_ui_react.Y_)(context,{duration:{open:150,close:0},initial:_ref2=>{let{side}=_ref2;return{opacity:0,transform:({top:"translateY(3px)",bottom:"translateY(-3px)",left:"translateX(3px)",right:"translateX(-3px)"})[side]}}}),childrenRef=children.ref,triggerRef=(0,floating_ui_react.qq)([refs.setReference,childrenRef]),child=react.isValidElement(children)?children:(0,jsx_runtime.jsx)("span",{children:children}),clonedChild=react.cloneElement(child,getReferenceProps({ref:triggerRef,...child.props}));return title?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[clonedChild,open1&&(0,jsx_runtime.jsx)(floating_ui_react.ll,{root:floatingContainer,children:(0,jsx_runtime.jsx)("div",{ref:refs.setFloating,className:"Tooltip max-w-sm",style:{...context.floatingStyles},...getFloatingProps({onMouseEnter:()=>interactive&&setIsHoveringTooltip(!0),onMouseLeave:()=>interactive&&setIsHoveringTooltip(!1)}),children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("bg-[var(--tooltip-bg)] py-1.5 px-2 break-words rounded text-start text-white",className),style:{...transitionStyles},children:["function"==typeof title?title():title,(0,jsx_runtime.jsx)(floating_ui_react.Y$,{ref:caretRef,context:context,width:8,height:4,staticOffset:arrowOffset,fill:"var(--tooltip-bg)"})]})})})]}):children}},"./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>UploadedLogo});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_LemonSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),_Lettermark__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let UploadedLogo=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function UploadedLogo(_ref,ref){let{name,mediaId,entityId,size="medium",outlinedLettermark}=_ref,[isLoadingImage,setIsLoadingImage]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!0);return mediaId?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)("relative flex overflow-hidden select-none","xlarge"===size?"size-16 rounded before:absolute before:inset-0 before:border before:rounded":"medium"===size?"size-6 rounded-sm":"size-4 rounded-sm"),ref:ref,children:[isLoadingImage&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_LemonSkeleton__WEBPACK_IMPORTED_MODULE_1__.y,{className:"absolute inset-0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img",{className:"size-full object-cover",src:mediaId.startsWith("data:")?mediaId:`/uploaded_media/${mediaId}`,onError:()=>setIsLoadingImage(!1),onLoad:()=>setIsLoadingImage(!1)})]}):("string"==typeof entityId&&(entityId=parseInt(entityId.split("-").at(-1),16)),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Lettermark__WEBPACK_IMPORTED_MODULE_2__.B,{index:entityId,name:name,size:size,outlined:outlinedLettermark}))})},"./frontend/src/lib/lemon-ui/UploadedLogo/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>_UploadedLogo__WEBPACK_IMPORTED_MODULE_0__.U});var _UploadedLogo__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/UploadedLogo/UploadedLogo.tsx")},"./frontend/src/lib/lemon-ui/hooks.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>useSliderPositioning});var lib_hooks_useResizeObserver__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function useSliderPositioning(currentValue,transitionMs){let hasRenderedInitiallyRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1),containerRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),selectionRef=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),[[selectionWidth,selectionOffset],setSelectionWidthAndOffset]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([0,0]),[transitioning,setTransitioning]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),{width:containerWidth=0}=(0,lib_hooks_useResizeObserver__WEBPACK_IMPORTED_MODULE_0__.y)({ref:containerRef});return(0,react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(()=>{if(selectionRef.current){if(setSelectionWidthAndOffset([selectionRef.current.offsetWidth,selectionRef.current.offsetLeft]),hasRenderedInitiallyRef.current){setTransitioning(!0);let transitioningTimeout=setTimeout(()=>setTransitioning(!1),transitionMs);return()=>clearTimeout(transitioningTimeout)}hasRenderedInitiallyRef.current=!0}},[currentValue,containerWidth]),{containerRef,selectionRef,sliderWidth:selectionWidth,sliderOffset:selectionOffset,transitioning}}},"./frontend/src/lib/lemon-ui/icons/icons.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Icon123:()=>Icon123,IconAction:()=>IconAction,IconAdsClick:()=>IconAdsClick,IconAndroidOS:()=>IconAndroidOS,IconAppleIOS:()=>IconAppleIOS,IconAreaChart:()=>IconAreaChart,IconArrowDown:()=>IconArrowDown,IconArrowUp:()=>IconArrowUp,IconBold:()=>IconBold,IconBookmarkBorder:()=>IconBookmarkBorder,IconBranch:()=>IconBranch,IconCalculate:()=>IconCalculate,IconCancel:()=>IconCancel,IconChevronLeft:()=>IconChevronLeft,IconChevronRight:()=>IconChevronRight,IconChrome:()=>IconChrome,IconClipboardEdit:()=>IconClipboardEdit,IconCohort:()=>IconCohort,IconComment:()=>IconComment,IconCumulativeChart:()=>IconCumulativeChart,IconDevices:()=>IconDevices,IconDocumentExpand:()=>IconDocumentExpand,IconDragHandle:()=>IconDragHandle,IconErrorOutline:()=>IconErrorOutline,IconEvent:()=>IconEvent,IconExclamation:()=>IconExclamation,IconEyeHidden:()=>IconEyeHidden,IconFeedback:()=>IconFeedback,IconFirefox:()=>IconFirefox,IconFlare:()=>IconFlare,IconFlutter:()=>IconFlutter,IconFullScreen:()=>IconFullScreen,IconFunnelHorizontal:()=>IconFunnelHorizontal,IconFunnelVertical:()=>IconFunnelVertical,IconGithub:()=>IconGithub,IconGitlab:()=>IconGitlab,IconGolang:()=>IconGolang,IconGoogle:()=>IconGoogle,IconGridView:()=>IconGridView,IconGroupedEvents:()=>IconGroupedEvents,IconHandClick:()=>IconHandClick,IconHeatmap:()=>IconHeatmap,IconInfinity:()=>IconInfinity,IconInternetExplorer:()=>IconInternetExplorer,IconItalic:()=>IconItalic,IconJavascript:()=>IconJavascript,IconKey:()=>IconKey,IconLegend:()=>IconLegend,IconLink:()=>IconLink,IconLinux:()=>IconLinux,IconListView:()=>IconListView,IconMacOS:()=>IconMacOS,IconMarkdown:()=>IconMarkdown,IconMenu:()=>IconMenu,IconMicrosoftEdge:()=>IconMicrosoftEdge,IconMonitor:()=>IconMonitor,IconNodeJS:()=>IconNodeJS,IconOffline:()=>IconOffline,IconOpenInApp:()=>IconOpenInApp,IconOpenInNew:()=>IconOpenInNew,IconOpera:()=>IconOpera,IconPHP:()=>IconPHP,IconPhone:()=>IconPhone,IconPlayCircle:()=>IconPlayCircle,IconPremium:()=>IconPremium,IconPreview:()=>IconPreview,IconPython:()=>IconPython,IconQueryEditor:()=>IconQueryEditor,IconQuestionAnswer:()=>IconQuestionAnswer,IconRadioButtonUnchecked:()=>IconRadioButtonUnchecked,IconReact:()=>IconReact,IconRecording:()=>IconRecording,IconRefresh:()=>IconRefresh,IconReplay:()=>IconReplay,IconRobot:()=>IconRobot,IconRuby:()=>IconRuby,IconSad:()=>IconSad,IconSafari:()=>IconSafari,IconSelectAll:()=>IconSelectAll,IconSelectEvents:()=>IconSelectEvents,IconSelectProperties:()=>IconSelectProperties,IconSkipBackward:()=>IconSkipBackward,IconSlack:()=>IconSlack,IconSlackExternal:()=>IconSlackExternal,IconSort:()=>IconSort,IconSquare:()=>IconSquare,IconSubArrowRight:()=>IconSubArrowRight,IconSubdirectoryArrowRight:()=>IconSubdirectoryArrowRight,IconSubtitles:()=>IconSubtitles,IconSubtitlesOff:()=>IconSubtitlesOff,IconSurveys:()=>IconSurveys,IconSwapHoriz:()=>IconSwapHoriz,IconSync:()=>IconSync,IconTableChart:()=>IconTableChart,IconTablet:()=>IconTablet,IconTextSize:()=>IconTextSize,IconTools:()=>IconTools,IconTrendingDown:()=>IconTrendingDown,IconTrendingFlat:()=>IconTrendingFlat,IconTrendingFlatDown:()=>IconTrendingFlatDown,IconTuning:()=>IconTuning,IconUnverifiedEvent:()=>IconUnverifiedEvent,IconUploadFile:()=>IconUploadFile,IconVerifiedEvent:()=>IconVerifiedEvent,IconWeb:()=>IconWeb,IconWindows:()=>IconWindows,IconWithBadge:()=>IconWithBadge,IconWithCount:()=>IconWithCount,IconXmasTree:()=>IconXmasTree,SortableDragIcon:()=>SortableDragIcon});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),icons=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/icons/icons.scss"),icons_default=__webpack_require__.n(icons),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(icons_default(),options),icons_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),LemonBadge=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function IconWithCount(_ref){let{count,children,showZero,status="primary",className}=_ref;return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("relative inline-flex",className),children:[children,(0,jsx_runtime.jsx)(LemonBadge.M.Number,{count:count,size:"small",position:"top-right",showZero:showZero,status:status})]})}function IconWithBadge(_ref2){let{content,children,status="primary",className}=_ref2;return(0,jsx_runtime.jsxs)("span",{className:(0,clsx_m.default)("relative inline-flex",className),children:[children,(0,jsx_runtime.jsx)(LemonBadge.M,{visible:!!content,content:content,size:"small",position:"top-right",status:status})]})}let LemonIconBase=_ref3=>{let{className,...props}=_ref3;return(0,jsx_runtime.jsx)("svg",{className:(0,clsx_m.default)("LemonIcon",className),width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",focusable:"false","aria-hidden":"true",...props})};function IconTextSize(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M2 4V7H7V19H10V7H15V4H2M21 9H12V12H15V19H18V12H21V9Z"})})}function IconBranch(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M13,14C9.64,14 8.54,15.35 8.18,16.24C9.25,16.7 10,17.76 10,19A3,3 0 0,1 7,22A3,3 0 0,1 4,19C4,17.69 4.83,16.58 6,16.17V7.83C4.83,7.42 4,6.31 4,5A3,3 0 0,1 7,2A3,3 0 0,1 10,5C10,6.31 9.17,7.42 8,7.83V13.12C8.88,12.47 10.16,12 12,12C14.67,12 15.56,10.66 15.85,9.77C14.77,9.32 14,8.25 14,7A3,3 0 0,1 17,4A3,3 0 0,1 20,7C20,8.34 19.12,9.5 17.91,9.86C17.65,11.29 16.68,14 13,14M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M7,4A1,1 0 0,0 6,5A1,1 0 0,0 7,6A1,1 0 0,0 8,5A1,1 0 0,0 7,4M17,6A1,1 0 0,0 16,7A1,1 0 0,0 17,8A1,1 0 0,0 18,7A1,1 0 0,0 17,6Z"})})}function IconClipboardEdit(props){return(0,jsx_runtime.jsx)(LemonIconBase,{fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{d:"M21.04 12.13C21.18 12.13 21.31 12.19 21.42 12.3L22.7 13.58C22.92 13.79 22.92 14.14 22.7 14.35L21.7 15.35L19.65 13.3L20.65 12.3C20.76 12.19 20.9 12.13 21.04 12.13M19.07 13.88L21.12 15.93L15.06 22H13V19.94L19.07 13.88M11 19L9 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3H19C20.1 3 21 3.9 21 5V9L19 11V5H17V7H7V5H5V19H11M12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4C13 3.45 12.55 3 12 3Z"})})}function IconJavascript(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 32 32",fill:"currentColor",...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H32V32H0V0ZM23.8479 14.5396C22.6981 14.6309 21.7338 15.0446 21.0159 15.7564C20.2768 16.4894 19.9239 17.3837 19.9239 18.5183C19.9239 20.2157 20.6205 21.402 22.1749 22.3419C22.5703 22.5792 23.1087 22.8377 24.0395 23.2392C25.308 23.7837 25.7794 24.0423 26.0806 24.3647C26.4517 24.7632 26.5551 25.3989 26.3209 25.8856C26.2752 25.9799 26.1566 26.1381 26.0502 26.2446C25.6912 26.6065 25.1254 26.7982 24.4228 26.7982C23.2365 26.7982 22.3513 26.3115 21.6395 25.259C21.5422 25.1191 21.454 25.0035 21.4418 25.0035C21.4144 25.0035 19.0996 26.3389 19.0509 26.3845C19.0205 26.4119 19.0449 26.4757 19.1635 26.6704C20.0882 28.2278 21.5331 29.1404 23.4859 29.402C23.9969 29.4719 24.9551 29.4689 25.4448 29.402C26.6737 29.2286 27.5954 28.821 28.3102 28.1275C29.0707 27.3944 29.4448 26.4453 29.4448 25.256C29.4448 24.4955 29.3201 23.9024 29.0372 23.3153C28.8425 22.9138 28.6479 22.643 28.3133 22.3024C27.6714 21.6514 26.841 21.1586 25.1832 20.4468C23.93 19.9084 23.5102 19.6773 23.2334 19.3822C22.9688 19.0993 22.8562 18.7678 22.8806 18.3541C22.9019 18.0256 22.9931 17.8035 23.1939 17.5875C23.4829 17.2742 23.8175 17.1434 24.3346 17.1465C24.9216 17.1465 25.3019 17.2986 25.6882 17.6879C25.8251 17.8217 26.0015 18.0377 26.0836 18.1685C26.1779 18.3176 26.2479 18.3997 26.2722 18.3906C26.3513 18.3571 28.5627 16.9275 28.5627 16.9062C28.5627 16.894 28.4501 16.7176 28.3133 16.5107C28.0212 16.0727 27.495 15.5252 27.133 15.2849C26.4638 14.8408 25.749 14.6126 24.8061 14.5427C24.3437 14.5062 24.2829 14.5062 23.8479 14.5396ZM14.3695 25.4449L14.3787 20.0669L14.3908 14.692H15.8783H17.3688V20.0852C17.3688 23.6623 17.3566 25.5635 17.3384 25.7338C17.1285 27.416 16.3346 28.5475 14.981 29.095C13.8524 29.5483 12.3133 29.5848 11.1148 29.1863C9.9802 28.8091 9.03723 27.9878 8.49274 26.9019L8.40149 26.7194L9.60301 25.9893C10.2631 25.5909 10.8137 25.2593 10.8258 25.2532C10.8349 25.2502 10.914 25.3688 11.0022 25.5148C11.5467 26.4456 12.0152 26.7772 12.7969 26.7741C13.3445 26.7711 13.673 26.6646 13.9285 26.4091C14.111 26.2266 14.2144 26.0289 14.3026 25.6973L14.3695 25.4449Z",fill:"currentColor"})})}function IconNodeJS(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 256 282",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M116.504 3.58c6.962-3.985 16.03-4.003 22.986 0 34.995 19.774 70.001 39.517 104.99 59.303 6.581 3.707 10.983 11.031 10.916 18.614v118.968c.049 7.897-4.788 15.396-11.731 19.019-34.88 19.665-69.742 39.354-104.616 59.019-7.106 4.063-16.356 3.75-23.24-.646-10.457-6.062-20.932-12.094-31.39-18.15-2.137-1.274-4.546-2.288-6.055-4.36 1.334-1.798 3.719-2.022 5.657-2.807 4.365-1.388 8.374-3.616 12.384-5.778 1.014-.694 2.252-.428 3.224.193 8.942 5.127 17.805 10.403 26.777 15.481 1.914 1.105 3.852-.362 5.488-1.274 34.228-19.345 68.498-38.617 102.72-57.968 1.268-.61 1.969-1.956 1.866-3.345.024-39.245.006-78.497.012-117.742.145-1.576-.767-3.025-2.192-3.67-34.759-19.575-69.5-39.18-104.253-58.76a3.621 3.621 0 0 0-4.094-.006C91.2 39.257 56.465 58.88 21.712 78.454c-1.42.646-2.373 2.071-2.204 3.653.006 39.245 0 78.497 0 117.748a3.329 3.329 0 0 0 1.89 3.303c9.274 5.259 18.56 10.481 27.84 15.722 5.228 2.814 11.647 4.486 17.407 2.33 5.083-1.823 8.646-7.01 8.549-12.407.048-39.016-.024-78.038.036-117.048-.127-1.732 1.516-3.163 3.2-3 4.456-.03 8.918-.06 13.374.012 1.86-.042 3.14 1.823 2.91 3.568-.018 39.263.048 78.527-.03 117.79.012 10.464-4.287 21.85-13.966 26.97-11.924 6.177-26.662 4.867-38.442-1.056-10.198-5.09-19.93-11.097-29.947-16.55C5.368 215.886.555 208.357.604 200.466V81.497c-.073-7.74 4.504-15.197 11.29-18.85C46.768 42.966 81.636 23.27 116.504 3.58z"}),(0,jsx_runtime.jsx)("path",{d:"M146.928 85.99c15.21-.979 31.493-.58 45.18 6.913 10.597 5.742 16.472 17.793 16.659 29.566-.296 1.588-1.956 2.464-3.472 2.355-4.413-.006-8.827.06-13.24-.03-1.872.072-2.96-1.654-3.195-3.309-1.268-5.633-4.34-11.212-9.642-13.929-8.139-4.075-17.576-3.87-26.451-3.785-6.479.344-13.446.905-18.935 4.715-4.214 2.886-5.494 8.712-3.99 13.404 1.418 3.369 5.307 4.456 8.489 5.458 18.33 4.794 37.754 4.317 55.734 10.626 7.444 2.572 14.726 7.572 17.274 15.366 3.333 10.446 1.872 22.932-5.56 31.318-6.027 6.901-14.805 10.657-23.56 12.697-11.647 2.597-23.734 2.663-35.562 1.51-11.122-1.268-22.696-4.19-31.282-11.768-7.342-6.375-10.928-16.308-10.572-25.895.085-1.619 1.697-2.748 3.248-2.615 4.444-.036 8.888-.048 13.332.006 1.775-.127 3.091 1.407 3.182 3.08.82 5.367 2.837 11 7.517 14.182 9.032 5.827 20.365 5.428 30.707 5.591 8.568-.38 18.186-.495 25.178-6.158 3.689-3.23 4.782-8.634 3.785-13.283-1.08-3.925-5.186-5.754-8.712-6.95-18.095-5.724-37.736-3.647-55.656-10.12-7.275-2.571-14.31-7.432-17.105-14.906-3.9-10.578-2.113-23.662 6.098-31.765 8.006-8.06 19.563-11.164 30.551-12.275z"})]})}function IconPHP(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 -1 100 50",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"m7.579 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"}),(0,jsx_runtime.jsx)("path",{d:"m41.093 0 7.314 0-2.067 10.123 6.572 0c3.604 0.071 6.289 0.813 8.056 2.226 1.802 1.413 2.332 4.099 1.59 8.056l-3.551 17.649-7.42 0 3.392-16.854c0.353-1.767 0.247-3.021-0.318-3.763-0.565-0.742-1.784-1.113-3.657-1.113l-5.883-0.053-4.346 21.783-7.314 0 7.632-38.054 0 0"}),(0,jsx_runtime.jsx)("path",{d:"m70.412 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"})]})}function IconRuby(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 728.000000 728.000000",...props,children:(0,jsx_runtime.jsxs)("g",{transform:"translate(0.000000,728.000000) scale(0.100000,-0.100000)",fill:"currentColor",stroke:"none",children:[(0,jsx_runtime.jsx)("path",{d:"M4090 6986 c0 -3 57 -44 128 -93 70 -48 147 -102 172 -120 25 -17 122 -84 215 -149 94 -65 187 -130 207 -146 l36 -28 114 63 c62 35 169 95 238 134 69 38 161 89 205 113 91 49 398 221 404 226 2 2 -383 4 -857 4 -474 0 -862 -2 -862 -4z"}),(0,jsx_runtime.jsx)("path",{d:"M3610 6843 c-52 -20 -205 -76 -340 -126 -297 -108 -472 -173 -605 -222 -65 -24 -114 -50 -140 -73 -42 -37 -523 -484 -655 -608 -41 -39 -149 -139 -240 -224 -437 -406 -431 -400 -492 -506 -64 -112 -129 -225 -210 -364 -215 -367 -452 -779 -461 -797 -8 -18 -1 -43 36 -130 41 -97 100 -239 367 -873 45 -107 85 -198 88 -202 4 -4 66 7 137 23 72 16 200 45 285 64 85 19 306 68 490 110 184 42 378 85 430 96 52 11 106 28 120 37 25 16 49 37 305 277 72 66 162 150 200 185 39 36 75 69 81 75 6 5 64 60 130 121 65 61 196 182 290 270 94 87 308 287 476 443 265 246 307 289 318 325 6 22 34 113 62 201 113 358 170 541 236 750 177 559 166 518 146 533 -11 7 -84 59 -164 114 -80 56 -285 200 -457 320 -171 120 -318 218 -325 217 -7 -1 -56 -17 -108 -36z"}),(0,jsx_runtime.jsx)("path",{d:"M6110 6821 c-246 -138 -434 -243 -702 -391 -277 -154 -296 -166 -280 -182 9 -9 85 -64 167 -124 83 -59 177 -127 210 -151 33 -24 107 -78 165 -120 58 -42 137 -100 175 -128 71 -53 240 -176 376 -273 41 -30 207 -150 369 -268 267 -194 310 -223 310 -210 0 2 11 61 25 131 24 125 48 289 60 415 10 95 -12 349 -39 471 -86 380 -305 659 -653 833 -50 26 -92 46 -94 45 -2 0 -42 -22 -89 -48z"}),(0,jsx_runtime.jsx)("path",{d:"M4927 6023 c-2 -5 -21 -62 -41 -128 -21 -66 -69 -219 -107 -340 -83 -259 -111 -348 -174 -550 -25 -82 -53 -169 -60 -192 l-14 -43 142 0 c78 0 311 4 517 10 206 5 523 12 704 16 181 4 415 9 520 13 l191 6 -420 304 c-231 168 -451 328 -490 356 -38 28 -98 71 -131 95 -34 25 -111 81 -170 124 -60 44 -150 109 -199 145 -50 36 -104 76 -120 88 -102 75 -144 102 -148 96z"}),(0,jsx_runtime.jsx)("path",{d:"M6715 4523 c-22 -1 -283 -7 -580 -13 -297 -6 -722 -15 -945 -20 -223 -5 -460 -10 -527 -11 -80 -1 -123 -5 -123 -12 0 -6 65 -209 144 -451 80 -243 215 -657 301 -921 250 -766 280 -855 286 -855 6 0 201 215 320 355 371 434 683 889 905 1320 131 254 273 580 262 603 -2 4 -21 6 -43 5z"}),(0,jsx_runtime.jsx)("path",{d:"M4230 4327 c-122 -114 -564 -526 -600 -557 -48 -42 -860 -802 -860 -805 0 -2 37 -18 83 -35 45 -17 120 -47 167 -65 47 -19 162 -63 255 -99 94 -36 274 -105 400 -154 127 -49 298 -115 380 -147 83 -31 202 -77 265 -102 63 -24 167 -64 230 -89 63 -24 189 -73 280 -108 91 -35 167 -62 168 -61 4 4 -10 49 -249 780 -83 253 -223 681 -310 950 -88 270 -163 498 -167 508 -6 15 -11 14 -42 -16z"}),(0,jsx_runtime.jsx)("path",{d:"M6806 3883 c-300 -606 -755 -1239 -1329 -1852 -43 -46 -77 -86 -75 -90 2 -4 48 -47 103 -97 55 -49 116 -103 135 -120 19 -17 241 -215 493 -439 252 -223 466 -420 476 -436 l18 -30 12 158 c7 87 16 201 21 253 5 52 12 142 15 200 3 58 8 121 10 140 3 19 9 100 15 180 5 80 14 204 20 275 5 72 21 276 35 455 14 179 45 590 70 914 25 324 44 593 43 598 -2 5 -29 -44 -62 -109z"}),(0,jsx_runtime.jsx)("path",{d:"M290 2692 c0 -469 2 -852 4 -852 2 0 34 53 72 118 37 64 82 142 100 172 18 30 70 120 117 200 46 80 94 161 106 181 l22 37 -107 253 c-58 140 -151 362 -206 494 -55 132 -102 242 -104 244 -2 2 -4 -379 -4 -847z"}),(0,jsx_runtime.jsx)("path",{d:"M2145 2680 c-194 -44 -894 -201 -965 -216 -36 -8 -77 -17 -91 -22 l-26 -7 159 -455 c277 -797 346 -992 393 -1125 25 -71 62 -177 81 -235 19 -58 38 -108 43 -113 4 -4 51 167 104 380 54 214 178 709 277 1101 99 392 180 715 180 718 0 7 -34 2 -155 -26z"}),(0,jsx_runtime.jsx)("path",{d:"M2594 2683 c-3 -16 -44 -179 -91 -363 -394 -1563 -493 -1959 -493 -1968 0 -17 340 52 556 113 398 114 786 286 1179 522 154 93 243 152 418 279 174 125 296 222 496 393 200 172 220 191 191 191 -6 0 -83 29 -173 64 -89 35 -310 121 -492 191 -181 69 -399 153 -483 186 -84 33 -192 75 -240 93 -155 59 -766 294 -804 310 -50 22 -57 20 -64 -11z"}),(0,jsx_runtime.jsx)("path",{d:"M817 2158 c-8 -13 -32 -54 -54 -93 -100 -173 -159 -276 -287 -494 l-137 -234 21 -81 c50 -184 115 -322 220 -461 163 -216 376 -349 678 -425 120 -30 232 -48 232 -37 0 4 -7 24 -15 44 -8 21 -64 180 -124 353 -60 173 -133 380 -161 460 -28 80 -75 215 -104 300 -30 85 -61 175 -70 200 -22 59 -111 314 -144 413 -14 42 -30 77 -34 77 -4 0 -14 -10 -21 -22z"}),(0,jsx_runtime.jsx)("path",{d:"M5125 1684 c-435 -398 -775 -661 -1195 -926 -153 -97 -392 -224 -574 -308 -38 -17 -67 -33 -65 -35 3 -2 54 0 114 5 61 5 187 14 280 20 94 6 229 15 300 20 72 5 171 12 220 15 50 3 115 8 145 10 30 3 224 16 430 30 206 14 445 30 530 35 85 6 216 15 290 20 74 5 272 19 440 30 404 27 455 32 413 41 -40 8 -27 -2 -254 199 -102 91 -239 212 -304 270 -66 58 -203 179 -305 270 -102 91 -201 179 -220 196 -19 17 -66 59 -104 93 -37 33 -73 61 -80 61 -6 -1 -33 -21 -61 -46z"})]})})}function IconGolang(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 254.5 225",fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M40.2,101.1c-0.4,0-0.5-0.2-0.3-0.5l2.1-2.7c0.2-0.3,0.7-0.5,1.1-0.5l35.7,0c0.4,0,0.5,0.3,0.3,0.6l-1.7,2.6 c-0.2,0.3-0.7,0.6-1,0.6L40.2,101.1z"}),(0,jsx_runtime.jsx)("path",{d:"M25.1,110.3c-0.4,0-0.5-0.2-0.3-0.5l2.1-2.7c0.2-0.3,0.7-0.5,1.1-0.5l45.6,0c0.4,0,0.6,0.3,0.5,0.6l-0.8,2.4 c-0.1,0.4-0.5,0.6-0.9,0.6L25.1,110.3z"}),(0,jsx_runtime.jsx)("path",{d:"M49.3,119.5c-0.4,0-0.5-0.3-0.3-0.6l1.4-2.5c0.2-0.3,0.6-0.6,1-0.6l20,0c0.4,0,0.6,0.3,0.6,0.7l-0.2,2.4 c0,0.4-0.4,0.7-0.7,0.7L49.3,119.5z"}),(0,jsx_runtime.jsx)("path",{d:"M153.1,99.3c-6.3,1.6-10.6,2.8-16.8,4.4c-1.5,0.4-1.6,0.5-2.9-1c-1.5-1.7-2.6-2.8-4.7-3.8c-6.3-3.1-12.4-2.2-18.1,1.5 c-6.8,4.4-10.3,10.9-10.2,19c0.1,8,5.6,14.6,13.5,15.7c6.8,0.9,12.5-1.5,17-6.6c0.9-1.1,1.7-2.3,2.7-3.7c-3.6,0-8.1,0-19.3,0 c-2.1,0-2.6-1.3-1.9-3c1.3-3.1,3.7-8.3,5.1-10.9c0.3-0.6,1-1.6,2.5-1.6c5.1,0,23.9,0,36.4,0c-0.2,2.7-0.2,5.4-0.6,8.1 c-1.1,7.2-3.8,13.8-8.2,19.6c-7.2,9.5-16.6,15.4-28.5,17c-9.8,1.3-18.9-0.6-26.9-6.6c-7.4-5.6-11.6-13-12.7-22.2 c-1.3-10.9,1.9-20.7,8.5-29.3c7.1-9.3,16.5-15.2,28-17.3c9.4-1.7,18.4-0.6,26.5,4.9c5.3,3.5,9.1,8.3,11.6,14.1 C154.7,98.5,154.3,99,153.1,99.3z"}),(0,jsx_runtime.jsx)("path",{d:"M186.2,154.6c-9.1-0.2-17.4-2.8-24.4-8.8c-5.9-5.1-9.6-11.6-10.8-19.3c-1.8-11.3,1.3-21.3,8.1-30.2 c7.3-9.6,16.1-14.6,28-16.7c10.2-1.8,19.8-0.8,28.5,5.1c7.9,5.4,12.8,12.7,14.1,22.3c1.7,13.5-2.2,24.5-11.5,33.9 c-6.6,6.7-14.7,10.9-24,12.8C191.5,154.2,188.8,154.3,186.2,154.6z M210,114.2c-0.1-1.3-0.1-2.3-0.3-3.3 c-1.8-9.9-10.9-15.5-20.4-13.3c-9.3,2.1-15.3,8-17.5,17.4c-1.8,7.8,2,15.7,9.2,18.9c5.5,2.4,11,2.1,16.3-0.6 C205.2,129.2,209.5,122.8,210,114.2z"})]})}function IconPython(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 32 32",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M15.8846 0C7.76106 5.79599e-07 8.26835 3.52288 8.26835 3.52288L8.2774 7.17254H16.0295V8.26835H5.19828C5.19828 8.26835 0 7.67882 0 15.8756C-5.79599e-07 24.0724 4.53718 23.7817 4.53718 23.7817H7.24499V19.9781C7.24499 19.9781 7.09903 15.4409 11.7097 15.4409C16.3204 15.4409 19.3985 15.4409 19.3985 15.4409C19.3985 15.4409 23.7183 15.5107 23.7183 11.266C23.7183 7.02121 23.7183 4.24738 23.7183 4.24738C23.7183 4.24738 24.3742 0 15.8846 0ZM11.6101 2.45424C12.3814 2.45424 13.0048 3.07762 13.0048 3.8489C13.0048 4.62018 12.3814 5.24356 11.6101 5.24356C10.8388 5.24356 10.2154 4.62018 10.2154 3.8489C10.2154 3.07762 10.8388 2.45424 11.6101 2.45424Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M16.1154 31.8333C24.2389 31.8333 23.7317 28.3104 23.7317 28.3104L23.7226 24.6607H15.9705V23.5649H26.8017C26.8017 23.5649 32 24.1544 32 15.9577C32 7.76089 27.4628 8.05157 27.4628 8.05157H24.755V11.8552C24.755 11.8552 24.901 16.3924 20.2903 16.3924C15.6796 16.3924 12.6015 16.3924 12.6015 16.3924C12.6015 16.3924 8.28171 16.3225 8.28171 20.5673C8.28171 24.812 8.28171 27.5859 8.28171 27.5859C8.28171 27.5859 7.62584 31.8333 16.1154 31.8333ZM20.3899 29.379C19.6186 29.379 18.9952 28.7556 18.9952 27.9844C18.9952 27.2131 19.6186 26.5897 20.3899 26.5897C21.1612 26.5897 21.7846 27.2131 21.7846 27.9844C21.7846 28.7556 21.1612 29.379 20.3899 29.379Z",fill:"currentColor"})]})}function IconHandClick(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 18 18",...props,children:(0,jsx_runtime.jsx)("path",{d:"M14.9942 7.90164C14.9942 7.82992 14.9583 7.46993 14.6342 7.10993C14.2925 6.71407 13.7524 6.49822 13.05 6.44407C12.9783 6.33579 12.8883 6.22822 12.7442 6.11993C12.3483 5.81407 11.7359 5.65164 10.9442 5.63407C10.8724 5.54407 10.7459 5.43578 10.6024 5.32822C10.2425 5.0765 9.79245 4.93236 9.23416 4.87822V3.41993C9.23416 3.27579 9.25244 2.66407 8.83831 2.23164C8.65831 2.03335 8.31659 1.79993 7.74002 1.79993C7.14587 1.79993 6.80416 2.03407 6.60587 2.23164C6.22759 2.64578 6.22759 3.18578 6.22759 3.31164V8.46C5.88587 8.1 5.50759 7.70414 5.29173 7.56C4.84173 7.21829 3.99587 7.39828 3.51002 7.75829C3.04173 8.1 2.88002 8.62243 3.06002 9.12658C3.38416 10.0266 4.19416 10.9266 4.39173 11.1424C4.57173 11.4841 5.38173 12.9782 6.10173 13.5182C6.48002 13.8065 6.76759 14.9941 6.84002 15.7499L6.87588 16.1457H13.6801V14.364C13.7701 14.1123 13.9859 13.5723 14.2201 13.3199C14.7783 12.7616 14.9583 11.3582 14.9583 10.9257V7.91986L14.9942 7.90164ZM14.1117 10.89C14.1117 11.4117 13.8959 12.4017 13.6259 12.6717C13.1576 13.14 12.87 14.04 12.8517 14.13L12.8335 14.1841V15.2283H7.68583C7.64997 15.03 7.61411 14.7783 7.54169 14.5083C7.32583 13.6441 7.03754 13.0866 6.65998 12.7983C6.13826 12.4024 5.39998 11.1241 5.16583 10.6566L5.09411 10.5484C5.09411 10.5301 4.2124 9.63008 3.90582 8.80251C3.86996 8.69423 3.86996 8.60422 3.99582 8.47836C4.22997 8.26251 4.67997 8.20836 4.78754 8.24422C5.05754 8.46008 5.88582 9.34251 6.35339 9.86422L7.12754 10.7284L7.12824 3.29418V3.25762C7.12824 3.1859 7.14652 2.95176 7.27238 2.82591C7.36238 2.71763 7.52409 2.66419 7.75824 2.66419C7.95652 2.66419 8.09995 2.71833 8.20824 2.80833C8.35238 2.97005 8.36996 3.25833 8.36996 3.36662V8.02826H9.25167V5.7599C10.0617 5.8499 10.2958 6.19161 10.3317 6.24575L10.3675 6.33575V8.02747H11.2492V6.53332C12.0051 6.60504 12.2934 6.83918 12.3651 6.94747V8.65747H13.2468V7.34332C14.021 7.4516 14.1468 7.86504 14.1651 7.95504L14.1658 10.8899L14.1117 10.89Z",fill:"currentColor"})})}function SortableDragIcon(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 16 16",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M2 6C2 6.13132 2.02587 6.26136 2.07612 6.38268C2.12638 6.50401 2.20003 6.61425 2.29289 6.70711C2.38575 6.79997 2.49599 6.87362 2.61732 6.92388C2.73864 6.97413 2.86868 7 3 7C3.13132 7 3.26136 6.97413 3.38268 6.92388C3.50401 6.87362 3.61425 6.79997 3.70711 6.70711C3.79997 6.61425 3.87362 6.50401 3.92388 6.38268C3.97413 6.26136 4 6.13132 4 6C4 5.86868 3.97413 5.73864 3.92388 5.61732C3.87362 5.49599 3.79997 5.38575 3.70711 5.29289C3.61425 5.20003 3.50401 5.12638 3.38268 5.07612C3.26136 5.02587 3.13132 5 3 5C2.86868 5 2.73864 5.02587 2.61732 5.07612C2.49599 5.12638 2.38575 5.20003 2.29289 5.29289C2.20003 5.38575 2.12638 5.49599 2.07612 5.61732C2.02587 5.73864 2 5.86868 2 6ZM7 6C7 6.26522 7.10536 6.51957 7.29289 6.70711C7.48043 6.89464 7.73478 7 8 7C8.26522 7 8.51957 6.89464 8.70711 6.70711C8.89464 6.51957 9 6.26522 9 6C9 5.73478 8.89464 5.48043 8.70711 5.29289C8.51957 5.10536 8.26522 5 8 5C7.73478 5 7.48043 5.10536 7.29289 5.29289C7.10536 5.48043 7 5.73478 7 6ZM12 6C12 6.26522 12.1054 6.51957 12.2929 6.70711C12.4804 6.89464 12.7348 7 13 7C13.2652 7 13.5196 6.89464 13.7071 6.70711C13.8946 6.51957 14 6.26522 14 6C14 5.73478 13.8946 5.48043 13.7071 5.29289C13.5196 5.10536 13.2652 5 13 5C12.7348 5 12.4804 5.10536 12.2929 5.29289C12.1054 5.48043 12 5.73478 12 6Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M2 10C2 10.1313 2.02587 10.2614 2.07612 10.3827C2.12638 10.504 2.20003 10.6142 2.29289 10.7071C2.38575 10.8 2.49599 10.8736 2.61732 10.9239C2.73864 10.9741 2.86868 11 3 11C3.13132 11 3.26136 10.9741 3.38268 10.9239C3.50401 10.8736 3.61425 10.8 3.70711 10.7071C3.79997 10.6142 3.87362 10.504 3.92388 10.3827C3.97413 10.2614 4 10.1313 4 10C4 9.86868 3.97413 9.73864 3.92388 9.61732C3.87362 9.49599 3.79997 9.38575 3.70711 9.29289C3.61425 9.20003 3.50401 9.12638 3.38268 9.07612C3.26136 9.02587 3.13132 9 3 9C2.86868 9 2.73864 9.02587 2.61732 9.07612C2.49599 9.12638 2.38575 9.20003 2.29289 9.29289C2.20003 9.38575 2.12638 9.49599 2.07612 9.61732C2.02587 9.73864 2 9.86868 2 10ZM7 10C7 10.2652 7.10536 10.5196 7.29289 10.7071C7.48043 10.8946 7.73478 11 8 11C8.26522 11 8.51957 10.8946 8.70711 10.7071C8.89464 10.5196 9 10.2652 9 10C9 9.73478 8.89464 9.48043 8.70711 9.29289C8.51957 9.10536 8.26522 9 8 9C7.73478 9 7.48043 9.10536 7.29289 9.29289C7.10536 9.48043 7 9.73478 7 10ZM12 10C12 10.2652 12.1054 10.5196 12.2929 10.7071C12.4804 10.8946 12.7348 11 13 11C13.2652 11 13.5196 10.8946 13.7071 10.7071C13.8946 10.5196 14 10.2652 14 10C14 9.73478 13.8946 9.48043 13.7071 9.29289C13.5196 9.10536 13.2652 9 13 9C12.7348 9 12.4804 9.10536 12.2929 9.29289C12.1054 9.48043 12 9.73478 12 10Z",fill:"currentColor"})]})}function IconInfinity(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 14 6",fill:"none",...props,children:(0,jsx_runtime.jsx)("path",{d:"M10.6817 0C9.87877 0 9.12041 0.312268 8.57952 0.85316L4.65944 4.33271C4.30256 4.68959 3.82859 4.88476 3.32115 4.88476C2.2784 4.88476 1.43082 4.04275 1.43082 3C1.43082 1.95725 2.2784 1.11524 3.32115 1.11524C3.82859 1.11524 4.30256 1.31041 4.68175 1.68959L5.31186 2.24721L6.15386 1.5L5.45126 0.881041C4.88249 0.312268 4.12412 0 3.32115 0C1.65944 0 0.309998 1.34944 0.309998 3C0.309998 4.65056 1.65944 6 3.32115 6C4.12412 6 4.88249 5.68773 5.42338 5.14684L9.34346 1.66729C9.70033 1.31041 10.1743 1.11524 10.6817 1.11524C11.7245 1.11524 12.5721 1.95725 12.5721 3C12.5721 4.04275 11.7245 4.88476 10.6817 4.88476C10.1799 4.88476 9.70033 4.68959 9.32115 4.31041L8.68546 3.74721L7.84346 4.49442L8.55163 5.11896C9.12041 5.68216 9.8732 5.99442 10.6817 5.99442C12.3435 5.99442 13.6929 4.65056 13.6929 2.99442C13.6929 1.33829 12.3435 0 10.6817 0Z",fill:"currentColor"})})}function IconFeedback(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 32 32",...props,children:(0,jsx_runtime.jsx)("path",{d:"M26.6667 2.66663H5.33341C3.86675 2.66663 2.68008 3.86663 2.68008 5.33329L2.66675 29.3333L8.00008 24H26.6667C28.1334 24 29.3334 22.8 29.3334 21.3333V5.33329C29.3334 3.86663 28.1334 2.66663 26.6667 2.66663ZM26.6667 21.3333H6.89341L6.10675 22.12L5.33341 22.8933V5.33329H26.6667V21.3333ZM14.6667 16H17.3334V18.6666H14.6667V16ZM14.6667 7.99996H17.3334V13.3333H14.6667V7.99996Z",fill:"currentColor"})})}function IconSelectEvents(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M16.23 14.26L20 13L10 10L13 20L14.26 16.23L18.53 20.5L20.51 18.52L16.23 14.26Z",fill:"currentColor"})]})}function IconSelectAll(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z",fill:"currentColor"})})}function IconSurveys(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z",fill:"currentColor"})})}function IconKey(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M21,10h-8.35C11.83,7.67,9.61,6,7,6c-3.31,0-6,2.69-6,6s2.69,6,6,6c2.61,0,4.83-1.67,5.65-4H13l2,2l2-2l2,2l4-4.04L21,10z M7,15c-1.65,0-3-1.35-3-3c0-1.65,1.35-3,3-3s3,1.35,3,3C10,13.65,8.65,15,7,15z",fill:"currentColor"})})}function IconOpenInApp(props){return(0,jsx_runtime.jsx)(LemonIconBase,{"aria-hidden":"true",role:"img",preserveAspectRatio:"xMidYMid meet",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"m12 10l-4 4h3v6h2v-6h3m3-10H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H5V8h14v10h-4v2h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Z"})})}function IconSelectProperties(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.73368 17.7247H2.26243C2.10826 17.7247 1.98761 17.5981 2.00102 17.4449C2.0458 16.5963 2.29659 15.7711 2.73195 15.0397C3.16732 14.3084 3.77433 13.6926 4.50115 13.245C3.89455 12.5788 3.5259 11.6995 3.5259 10.7303C3.5259 8.66865 5.19823 7 7.25933 7C9.32043 7 10.9928 8.66865 10.9928 10.7303C10.995 11.6602 10.6471 12.5572 10.0175 13.245C11.4452 14.1243 12.4238 15.6697 12.5176 17.4449C12.5195 17.481 12.5139 17.5171 12.5012 17.551C12.4886 17.5849 12.4691 17.6158 12.444 17.642C12.4189 17.6682 12.3888 17.689 12.3553 17.7032C12.3219 17.7174 12.2859 17.7247 12.2495 17.7247H10.7783C10.6375 17.7247 10.5236 17.6148 10.5135 17.4749C10.3862 15.7929 8.97189 14.4607 7.25598 14.4607C5.54007 14.4607 4.12579 15.7929 3.99844 17.4749C3.98839 17.6148 3.87444 17.7247 3.73368 17.7247ZM8.9884 10.73C8.9884 9.77414 8.21088 8.9981 7.25574 8.9981C6.3006 8.9981 5.52308 9.77414 5.52308 10.73C5.52308 11.6859 6.3006 12.462 7.25574 12.462C8.21088 12.462 8.9884 11.6859 8.9884 10.73ZM14.8829 9.9675H21.7379C21.8819 9.9675 22 10.0436 22 10.1365V11.1508C22 11.2437 21.8819 11.3198 21.7379 11.3198H14.8829C14.7389 11.3198 14.6208 11.2437 14.6208 11.1508V10.1365C14.6208 10.0436 14.7389 9.9675 14.8829 9.9675ZM14.7057 13.0102H19.261C19.309 13.0102 19.3459 13.0863 19.3459 13.1792V14.1935C19.3459 14.2864 19.309 14.3625 19.261 14.3625H14.7057C14.6577 14.3625 14.6208 14.2864 14.6208 14.1935V13.1792C14.6208 13.0863 14.6577 13.0102 14.7057 13.0102Z",fill:"currentColor"})})}function IconSwapHoriz(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m6.99 11-3.99 4 3.99 4v-3h7.01v-2h-7.01zm14.01-2-3.99-4v3h-7.01v2h7.01v3z",fill:"currentColor"})})}function IconChevronLeft(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M13.9999 6L15.4099 7.41L10.8299 12L15.4099 16.59L13.9999 18L7.99991 12L13.9999 6Z",fill:"currentColor"})})}function IconChevronRight(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M10.0001 6L8.59009 7.41L13.1701 12L8.59009 16.59L10.0001 18L16.0001 12L10.0001 6Z",fill:"currentColor"})})}function IconRadioButtonUnchecked(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{fill:"currentColor",...props,children:[(0,jsx_runtime.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,jsx_runtime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})]})}function IconOffline(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12 2.02c-5.51 0-9.98 4.47-9.98 9.98s4.47 9.98 9.98 9.98 9.98-4.47 9.98-9.98-4.47-9.98-9.98-9.98zm0 17.96c-4.4 0-7.98-3.58-7.98-7.98s3.58-7.98 7.98-7.98 7.98 3.58 7.98 7.98-3.58 7.98-7.98 7.98zm.75-14.98-4.5 8.5h3.14v5.5l4.36-8.5h-3z",fill:"currentColor"})})}function IconMenu(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m3 18h18v-2h-18zm0-5h18v-2h-18zm0-7v2h18v-2z",fill:"currentColor"})})}function IconSync(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12.5 4v-3l-4 4 4 4v-3c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46c.78-1.23 1.24-2.69 1.24-4.26 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8l-1.46-1.46c-.78 1.23-1.24 2.69-1.24 4.26 0 4.42 3.58 8 8 8v3l4-4-4-4z",fill:"currentColor"})})}function IconSubtitles(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 4h-16c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-16v-12h16zm-14-8h2v2h-2zm0 4h8v2h-8zm10 0h2v2h-2zm-6-4h8v2h-8z",fill:"currentColor"})})}function IconSubtitlesOff(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m20.0001 4h-13.17002l2 2h11.17002v11.17l1.76 1.76c.15-.28.24-.59.24-.93v-12c0-1.1-.9-2-2-2z"}),(0,jsx_runtime.jsx)("path",{d:"m18.0001 10h-5.17l2 2h3.17z"}),(0,jsx_runtime.jsx)("path",{d:"m1.04004 3.86922 1.2 1.2c-.15.28-.24.59-.24.93v11.99998c0 1.1.9 2 2 2h13.16996l2.96 2.96 1.41-1.41-19.08996-19.09998zm2.96 2.96 3.17 3.17h-1.17v1.99998h2v-1.17l3.16996 3.17h-5.16996v2h7.16996l2 2h-11.16996z"})]})})}function IconCalculate(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m19 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z"}),(0,jsx_runtime.jsx)("path",{d:"m11.25 7.7207h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m18 15.75h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m18 13.25h-5v1.5h5z"}),(0,jsx_runtime.jsx)("path",{d:"m8 18h1.5v-2h2v-1.5h-2v-2h-1.5v2h-2v1.5h2z"}),(0,jsx_runtime.jsx)("path",{d:"m14.09 10.95 1.41-1.41 1.41 1.41 1.06-1.06-1.41-1.42 1.41-1.41-1.06-1.06-1.41 1.41-1.41-1.41-1.06 1.06 1.41 1.41-1.41 1.42z"})]})})}function IconSubdirectoryArrowRight(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"m19 15-6 6-1.42-1.42 3.59-3.58h-11.17v-12h2v10h9.17l-3.59-3.58 1.42-1.42z",fill:"currentColor"})," "]})}function IconSubArrowRight(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z",fill:"currentColor"})," "]})}function IconGroupedEvents(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{clipRule:"evenodd",d:"m2 6h2v14h14v2h-14c-1.1 0-2-.9-2-2zm6-4h12c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2h-12c-1.1 0-2-.9-2-2v-12c0-1.1.9-2 2-2zm0 14h12v-12h-12zm4.6851-3.6586-.5398 1.6584h-1.6477l2.5106-7.27275h1.9815l2.5071 7.27275h-1.6477l-.5398-1.6584zm1.2855-3.95242-.8949 2.75212h1.8466l-.8949-2.75212z",fill:"currentColor",fillRule:"evenodd"})})}function IconCumulativeChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20.8805 7.97408C15.0614 18.7809 6.51281 19.5979 2.71265 18.4578L3.28734 16.5422C6.15384 17.4021 13.7386 17.0191 19.1195 7.02588L20.8805 7.97408Z",fill:"currentColor"})})}function IconAreaChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z",fill:"currentColor"})})}function IconTableChart(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z",fill:"currentColor"})})}function Icon123(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M7,15H5.5v-4.5H4V9h3V15z M13.5,13.5h-3v-1h2c0.55,0,1-0.45,1-1V10c0-0.55-0.45-1-1-1H9v1.5h3v1h-2c-0.55,0-1,0.45-1,1V15 h4.5V13.5z M19.5,14v-4c0-0.55-0.45-1-1-1H15v1.5h3v1h-2v1h2v1h-3V15h3.5C19.05,15,19.5,14.55,19.5,14z",fill:"currentColor"})})}function IconCohort(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58-.74.32-1.22 1.04-1.22 1.85v1.57h4.5v-1.61c0-.83.23-1.61.63-2.29zm14.87-1.1c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29v1.61h4.5zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9s-3.07.39-4.24.9c-1.08.48-1.76 1.56-1.76 2.74v1.61h12v-1.61c0-1.18-.68-2.26-1.76-2.74zm-8.17 2.35c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zm3.93-8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"currentColor"})})}function IconTools(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m21.67 18.17-5.3-5.3h-.99l-2.54 2.54v.99l5.3 5.3c.39.39 1.02.39 1.41 0l2.12-2.12c.39-.38.39-1.02 0-1.41zm-2.83 1.42-4.24-4.24.71-.71 4.24 4.24z"}),(0,jsx_runtime.jsx)("path",{d:"m17.34 10.19 1.41-1.41 2.12 2.12c1.17-1.17 1.17-3.07 0-4.24l-3.54-3.54-1.41 1.41v-2.82l-.7-.71-3.54 3.54.71.71h2.83l-1.41 1.41 1.06 1.06-2.89 2.89-4.13-4.13v-1.42l-3.02-3.02-2.83 2.83 3.03 3.03h1.41l4.13 4.13-.85.85h-2.12l-5.3 5.3c-.39.39-.39 1.02 0 1.41l2.12 2.12c.39.39 1.02.39 1.41 0l5.3-5.3v-2.12l5.15-5.15zm-7.98 5.15-4.24 4.24-.71-.71 4.24-4.24z"})]})})}function IconExclamation(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",children:[(0,jsx_runtime.jsx)("path",{d:"m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z"}),(0,jsx_runtime.jsx)("path",{d:"m10 3h4v12h-4z"})]})})}function IconErrorOutline(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m11 15h2v2h-2zm0-8h2v6h-2zm.99-5c-5.52 0-9.99 4.48-9.99 10s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10s-4.48-10-10.01-10zm.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",fill:"currentColor"})})}function IconComment(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 4v13.17l-1.17-1.17h-14.83v-12zm0-2h-16c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4v-18c0-1.1-.9-2-2-2zm-2 10h-12v2h12zm0-3h-12v2h12zm0-3h-12v2h12z",fill:"currentColor"})})}function IconRecording(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m10 8v8l5-4zm9-5h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z",fill:"currentColor"})})}function IconQuestionAnswer(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m15 4v7h-9.83l-1.17 1.17v-8.17zm1-2h-13c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1zm5 4h-2v9h-13v2c0 .55.45 1 1 1h11l4 4v-15c0-.55-.45-1-1-1z",fill:"currentColor"})})}function IconGithub(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{clipRule:"evenodd",d:"m12 2c-5.525 0-10 4.475-10 10 0 4.425 2.8625 8.1625 6.8375 9.4875.5.0875.6875-.2125.6875-.475 0-.2375-.0125-1.025-.0125-1.8625-2.5125.4625-3.1625-.6125-3.3625-1.175-.1125-.2875-.6-1.175-1.025-1.4125-.35-.1875-.85-.65-.0125-.6625.7875-.0125 1.35.725 1.5375 1.025.9 1.5125 2.3375 1.0875 2.9125.825.0875-.65.35-1.0875.6375-1.3375-2.225-.25-4.55-1.1125-4.55-4.9375 0-1.0875.3875-1.9875 1.025-2.6875-.1-.25-.45-1.275.1-2.65 0 0 .8375-.2625 2.75 1.025.8-.225 1.65-.3375 2.5-.3375s1.7.1125 2.5.3375c1.9125-1.3 2.75-1.025 2.75-1.025.55 1.375.2 2.4.1 2.65.6375.7 1.025 1.5875 1.025 2.6875 0 3.8375-2.3375 4.6875-4.5625 4.9375.3625.3125.675.9125.675 1.85 0 1.3375-.0125 2.4125-.0125 2.75 0 .2625.1875.575.6875.475 1.9852-.6702 3.7102-1.946 4.9323-3.648 1.2221-1.7019 1.8797-3.7442 1.8802-5.8395 0-5.525-4.475-10-10-10z",fill:"currentColor",fillRule:"evenodd"})})}function IconGitlab(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M23.4841 9.51355L23.4507 9.42452L20.2169 0.621934C20.1511 0.449408 20.0346 0.303054 19.8841 0.20387C19.7336 0.106371 19.5579 0.0594128 19.3809 0.0693348C19.204 0.0792569 19.0342 0.145582 18.8945 0.259354C18.7563 0.376393 18.6561 0.534985 18.6074 0.713547L16.4239 7.68129H7.58229L5.39878 0.713547C5.35143 0.534012 5.251 0.374625 5.11178 0.258063C4.97208 0.144291 4.80228 0.0779663 4.62529 0.0680442C4.44831 0.0581222 4.27267 0.105081 4.12208 0.20258C3.97193 0.302164 3.85553 0.44839 3.7893 0.620644L0.5493 9.41935L0.517135 9.50839C0.0516127 10.777 -0.00584844 12.1692 0.353415 13.4748C0.712679 14.7805 1.46919 15.929 2.50889 16.7471L2.52002 16.7561L2.54971 16.7781L7.4759 20.6258L9.91301 22.5497L11.3975 23.7187C11.5712 23.8562 11.7832 23.9307 12.0013 23.9307C12.2193 23.9307 12.4313 23.8562 12.605 23.7187L14.0895 22.5497L16.5266 20.6258L21.4825 16.7548L21.4949 16.7445C22.5322 15.9263 23.287 14.779 23.6457 13.4751C24.0044 12.1711 23.9477 10.781 23.4841 9.51355V9.51355Z",fill:"#E24329"}),(0,jsx_runtime.jsx)("path",{d:"M23.4841 9.51355L23.4507 9.42451C21.875 9.76186 20.3902 10.458 19.1023 11.4632L12 17.0645C14.4186 18.9729 16.5241 20.631 16.5241 20.631L21.48 16.76L21.4924 16.7497C22.5312 15.9315 23.2871 14.7834 23.6464 13.4784C24.0056 12.1734 23.9486 10.7819 23.4841 9.51355Z",fill:"#FC6D26"}),(0,jsx_runtime.jsx)("path",{d:"M7.47589 20.631L9.91301 22.5548L11.3975 23.7239C11.5712 23.8614 11.7832 23.9358 12.0013 23.9358C12.2193 23.9358 12.4313 23.8614 12.605 23.7239L14.0895 22.5548L16.5266 20.631C16.5266 20.631 14.4186 18.9677 12 17.0645C9.58146 18.9677 7.47589 20.631 7.47589 20.631Z",fill:"#FCA326"}),(0,jsx_runtime.jsx)("path",{d:"M4.89652 11.4632C3.60966 10.4559 2.12514 9.75798 0.5493 9.41936L0.517135 9.50839C0.0516127 10.777 -0.00584844 12.1692 0.353415 13.4748C0.712679 14.7805 1.46919 15.929 2.50889 16.7471L2.52002 16.7561L2.54971 16.7781L7.4759 20.6258C7.4759 20.6258 9.57899 18.9677 12 17.0594L4.89652 11.4632Z",fill:"#FC6D26"})]})}function IconGoogle(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M23.52 12.2727C23.52 11.4218 23.4436 10.6036 23.3018 9.81818H12V14.4654H18.4582C18.1745 15.96 17.3236 17.2254 16.0473 18.0764V21.0982H19.9418C22.2109 19.0036 23.52 15.9273 23.52 12.2727V12.2727Z",fill:"#4285F4"}),(0,jsx_runtime.jsx)("path",{d:"M12 24C15.24 24 17.9564 22.9309 19.9418 21.0982L16.0473 18.0764C14.9782 18.7964 13.6145 19.2327 12 19.2327C8.87999 19.2327 6.22908 17.1273 5.27999 14.2909H1.28726V17.3891C3.26181 21.3055 7.30908 24 12 24Z",fill:"#34A853"}),(0,jsx_runtime.jsx)("path",{d:"M5.28 14.28C5.04 13.56 4.89818 12.7964 4.89818 12C4.89818 11.2036 5.04 10.44 5.28 9.72001V6.62183H1.28727C0.469091 8.23637 0 10.0582 0 12C0 13.9418 0.469091 15.7636 1.28727 17.3782L4.39636 14.9564L5.28 14.28Z",fill:"#FBBC05"}),(0,jsx_runtime.jsx)("path",{d:"M12 4.77818C13.7673 4.77818 15.3382 5.38909 16.5927 6.56727L20.0291 3.13091C17.9454 1.18909 15.24 0 12 0C7.30908 0 3.26181 2.69455 1.28726 6.62182L5.27999 9.72C6.22908 6.88364 8.87999 4.77818 12 4.77818Z",fill:"#EA4335"})]})}function IconOpenInNew(props){return(0,jsx_runtime.jsx)(LemonIconBase,{width:"1em",height:"1em",viewBox:"0 0 24 24",...props,children:(0,jsx_runtime.jsx)("path",{d:"m19 19h-14v-14h7v-2h-7c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-5-16v2h3.59l-9.83 9.83 1.41 1.41 9.83-9.83v3.59h2v-7z",fill:"currentColor"})})}function IconTrendingFlat(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m20 12-4-4v3h-12v2h12v3z",fill:"currentColor"})})}function IconTrendingFlatDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m17.6567 17.6558v-5.6568l-2.1214 2.1213-8.48523-8.48531-1.41422 1.41422 8.48525 8.48529-2.1213 2.1213z",fill:"currentColor"})})}function IconTrendingDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4-7.41-7.42 1.41-1.41 6 6 4-4 6.3 6.29 2.29-2.29v6z",fill:"currentColor"})})}function IconFlare(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m7 11h-6v2h6zm2.17-3.24-2.12-2.12-1.41 1.41 2.12 2.12zm3.83-6.76h-2v6h2zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41zm-1.36 3.95v2h6v-2zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41zm5.36 6.05h2v-6h-2z",fill:"currentColor"})})}function IconQueryEditor(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M4,14V17C4,19 7.05,20.72 11,21V18.11L11.13,18C7.12,17.76 4,16.06 4,14M12,13C7.58,13 4,11.21 4,9V12C4,14.21 7.58,16 12,16C12.39,16 12.77,16 13.16,16L17,12.12C15.4,12.72 13.71,13 12,13M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M21,11.13C20.85,11.13 20.71,11.19 20.61,11.3L19.61,12.3L21.66,14.3L22.66,13.3C22.87,13.1 22.88,12.76 22.66,12.53L21.42,11.3C21.32,11.19 21.18,11.13 21.04,11.13M19.04,12.88L13,18.94V21H15.06L21.12,14.93L19.04,12.88Z"})})}function IconAction(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 20 20",...props,children:(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 4H2V18H16V20H2C0.9 20 0 19.1 0 18V4ZM6 0H18C19.1 0 20 0.9 20 2V14C20 15.1 19.1 16 18 16H6C4.9 16 4 15.1 4 14V2C4 0.9 4.9 0 6 0ZM6 14H18V2H6V14ZM10.6851 10.3414L10.1453 11.9998H8.49756L11.0082 4.72705H12.9897L15.4968 11.9998H13.8491L13.3093 10.3414H10.6851ZM11.9706 6.38898L11.0757 9.14111H12.9223L12.0274 6.38898H11.9706Z",fill:"currentColor"})})}function IconEvent(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 20 10",...props,children:(0,jsx_runtime.jsx)("path",{d:"M7.4 10.6L2.8 6L7.4 1.4L6 0L0 6L6 12L7.4 10.6ZM12.6 10.6L17.2 6L12.6 1.4L14 0L20 6L14 12L12.6 10.6Z",fill:"currentColor"})})}function IconCancel(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13-3.59 3.59-3.59-3.59-1.41 1.41 3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59z",fill:"currentColor"})})}function IconPremium(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m9.68 13.69 2.32-1.76 2.31 1.76-.88-2.85 2.32-1.84h-2.84l-.91-2.81-.91 2.81h-2.84l2.31 1.84zm10.32-3.69c0-4.42-3.58-8-8-8s-8 3.58-8 8c0 2.03.76 3.87 2 5.28v7.72l6-2 6 2v-7.72c1.24-1.41 2-3.25 2-5.28zm-8-6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zm0 15-4 1.02v-3.1c1.18.68 2.54 1.08 4 1.08s2.82-.4 4-1.08v3.1z",fill:"currentColor"})})}function IconRefresh(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m17.65 6.35c-1.45-1.45-3.44-2.35-5.65-2.35-4.41999 0-7.98999 3.58-7.98999 8s3.57 8 7.98999 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.30999 0-5.99999-2.69-5.99999-6s2.69-6 5.99999-6c1.66 0 3.14.69 4.22 1.78l-3.22 3.22h7v-7z",fill:"currentColor"})})}function IconReplay(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"m12 5v-4l-5 5 5 5v-4c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z",fill:"currentColor"})," "]})}function IconLegend(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-3 -3 24 24",fill:"none",...props,children:(0,jsx_runtime.jsx)("path",{d:"M8 4H14V6H8V4ZM8 8H14V10H8V8ZM8 12H14V14H8V12ZM4 4H6V6H4V4ZM4 8H6V10H4V8ZM4 12H6V14H4V12ZM17.1 0H0.9C0.4 0 0 0.4 0 0.9V17.1C0 17.5 0.4 18 0.9 18H17.1C17.5 18 18 17.5 18 17.1V0.9C18 0.4 17.5 0 17.1 0ZM16 16H2V2H16V16Z",fill:"currentColor"})})}function IconHeatmap(props){return(0,jsx_runtime.jsx)(LemonIconBase,{width:"1em",height:"1em",viewBox:"0 0 32 32",...props,children:(0,jsx_runtime.jsx)("path",{d:"M17.5 1.49056C17.5 0.00305736 15.5844 -0.557568 14.7406 0.675557C7 11.9899 18 12.4993 18 17.9993C18 20.2262 16.1806 22.0281 13.9469 21.9987C11.7487 21.9706 10 20.1381 10 17.9399V12.5956C10 11.2393 8.34562 10.5812 7.41062 11.5643C5.7375 13.3218 4 16.3324 4 19.9993C4 26.6162 9.38312 31.9993 16 31.9993C22.6169 31.9993 28 26.6162 28 19.9993C28 9.35618 17.5 7.93681 17.5 1.49056V1.49056Z",fill:"currentColor"})})}function IconUnverifiedEvent(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M4.8 17.4H19.2V15.6H4.8V17.4ZM6.6 21H17.4V19.2H6.6V21ZM19.2 13.8H4.8C3.81 13.8 3 12.99 3 12V4.8C3 3.81 3.81 3 4.8 3H19.2C20.19 3 21 3.81 21 4.8V12C21 12.99 20.19 13.8 19.2 13.8ZM19.2 4.8H4.8V12H19.2V4.8Z",fill:"currentColor"})})}function IconVerifiedEvent(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 3H4.8C3.81 3 3 3.81 3 4.8V12C3 12.99 3.81 13.8 4.8 13.8H19.2C20.19 13.8 21 12.99 21 12V10H19.2V12H4.8V4.8H14V3ZM19.2 17.4H4.8V15.6H19.2V17.4ZM17.4 21H6.6V19.2H17.4V21Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M17.7289 6.04489L16.0628 4.37164L15 5.44166L17.7289 8.17774L23 2.89228L21.9372 1.82227L17.7289 6.04489Z",fill:"currentColor"})]})}function IconTuning(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"})})}function IconBookmarkBorder(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-4 -3 24 24",...props,children:(0,jsx_runtime.jsx)("path",{d:"M12.5 0H2.5C1.4 0 0.5 0.9 0.5 2V18L7.5 15L14.5 18V2C14.5 0.9 13.6 0 12.5 0ZM12.5 15L7.5 12.82L2.5 15V2H12.5V15Z",fill:"currentColor"})})}function IconUploadFile(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z"})})}function IconSlack(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 2447.6 2452.5",...props,children:(0,jsx_runtime.jsxs)("g",{clipRule:"evenodd",fillRule:"evenodd",children:[(0,jsx_runtime.jsx)("path",{d:"m897.4 0c-135.3.1-244.8 109.9-244.7 245.2-.1 135.3 109.5 245.1 244.8 245.2h244.8v-245.1c.1-135.3-109.5-245.1-244.9-245.3.1 0 .1 0 0 0m0 654h-652.6c-135.3.1-244.9 109.9-244.8 245.2-.2 135.3 109.4 245.1 244.7 245.3h652.7c135.3-.1 244.9-109.9 244.8-245.2.1-135.4-109.5-245.2-244.8-245.3z",fill:"#36c5f0"}),(0,jsx_runtime.jsx)("path",{d:"m2447.6 899.2c.1-135.3-109.5-245.1-244.8-245.2-135.3.1-244.9 109.9-244.8 245.2v245.3h244.8c135.3-.1 244.9-109.9 244.8-245.3zm-652.7 0v-654c.1-135.2-109.4-245-244.7-245.2-135.3.1-244.9 109.9-244.8 245.2v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.3z",fill:"#2eb67d"}),(0,jsx_runtime.jsx)("path",{d:"m1550.1 2452.5c135.3-.1 244.9-109.9 244.8-245.2.1-135.3-109.5-245.1-244.8-245.2h-244.8v245.2c-.1 135.2 109.5 245 244.8 245.2zm0-654.1h652.7c135.3-.1 244.9-109.9 244.8-245.2.2-135.3-109.4-245.1-244.7-245.3h-652.7c-135.3.1-244.9 109.9-244.8 245.2-.1 135.4 109.4 245.2 244.7 245.3z",fill:"#ecb22e"}),(0,jsx_runtime.jsx)("path",{d:"m0 1553.2c-.1 135.3 109.5 245.1 244.8 245.2 135.3-.1 244.9-109.9 244.8-245.2v-245.2h-244.8c-135.3.1-244.9 109.9-244.8 245.2zm652.7 0v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.2v-653.9c.2-135.3-109.4-245.1-244.7-245.3-135.4 0-244.9 109.8-244.8 245.1 0 0 0 .1 0 0",fill:"#e01e5a"})]})})}function IconSlackExternal(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"-2 -2 24 24",...props,children:(0,jsx_runtime.jsxs)("g",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",children:[(0,jsx_runtime.jsx)("path",{d:"M13 4.75 18.25 10 13 15.25 7.75 10 13 4.75Z"}),(0,jsx_runtime.jsx)("path",{d:"M8.01 5.76 7 4.75 1.75 10 7 15.25l1.01-1.01-2.872-3.037a1.75 1.75 0 0 1 0-2.406L8.01 5.76Z"})]})})}function IconChrome(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})})}function IconFirefox(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M9.27 7.94C9.27 7.94 9.27 7.94 9.27 7.94M6.85 6.74C6.86 6.74 6.86 6.74 6.85 6.74M21.28 8.6C20.85 7.55 19.96 6.42 19.27 6.06C19.83 7.17 20.16 8.28 20.29 9.1L20.29 9.12C19.16 6.3 17.24 5.16 15.67 2.68C15.59 2.56 15.5 2.43 15.43 2.3C15.39 2.23 15.36 2.16 15.32 2.09C15.26 1.96 15.2 1.83 15.17 1.69C15.17 1.68 15.16 1.67 15.15 1.67H15.13L15.12 1.67L15.12 1.67L15.12 1.67C12.9 2.97 11.97 5.26 11.74 6.71C11.05 6.75 10.37 6.92 9.75 7.22C9.63 7.27 9.58 7.41 9.62 7.53C9.67 7.67 9.83 7.74 9.96 7.68C10.5 7.42 11.1 7.27 11.7 7.23L11.75 7.23C11.83 7.22 11.92 7.22 12 7.22C12.5 7.21 12.97 7.28 13.44 7.42L13.5 7.44C13.6 7.46 13.67 7.5 13.75 7.5C13.8 7.54 13.86 7.56 13.91 7.58L14.05 7.64C14.12 7.67 14.19 7.7 14.25 7.73C14.28 7.75 14.31 7.76 14.34 7.78C14.41 7.82 14.5 7.85 14.54 7.89C14.58 7.91 14.62 7.94 14.66 7.96C15.39 8.41 16 9.03 16.41 9.77C15.88 9.4 14.92 9.03 14 9.19C17.6 11 16.63 17.19 11.64 16.95C11.2 16.94 10.76 16.85 10.34 16.7C10.24 16.67 10.14 16.63 10.05 16.58C10 16.56 9.93 16.53 9.88 16.5C8.65 15.87 7.64 14.68 7.5 13.23C7.5 13.23 8 11.5 10.83 11.5C11.14 11.5 12 10.64 12.03 10.4C12.03 10.31 10.29 9.62 9.61 8.95C9.24 8.59 9.07 8.42 8.92 8.29C8.84 8.22 8.75 8.16 8.66 8.1C8.43 7.3 8.42 6.45 8.63 5.65C7.6 6.12 6.8 6.86 6.22 7.5H6.22C5.82 7 5.85 5.35 5.87 5C5.86 5 5.57 5.16 5.54 5.18C5.19 5.43 4.86 5.71 4.56 6C4.21 6.37 3.9 6.74 3.62 7.14C3 8.05 2.5 9.09 2.28 10.18C2.28 10.19 2.18 10.59 2.11 11.1L2.08 11.33C2.06 11.5 2.04 11.65 2 11.91L2 11.94L2 12.27L2 12.32C2 17.85 6.5 22.33 12 22.33C16.97 22.33 21.08 18.74 21.88 14C21.9 13.89 21.91 13.76 21.93 13.63C22.13 11.91 21.91 10.11 21.28 8.6Z"})})}function IconMicrosoftEdge(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M10.86 15.37C10.17 14.6 9.7 13.68 9.55 12.65C9.25 13.11 9 13.61 8.82 14.15C7.9 16.9 9.5 20.33 12.22 21.33C14.56 22.11 17.19 20.72 18.92 19.2C19.18 18.85 21.23 17.04 20.21 16.84C17.19 18.39 13.19 17.95 10.86 15.37M11.46 9.56C12.5 9.55 11.5 9.13 11.07 8.81C10.03 8.24 8.81 7.96 7.63 7.96C3.78 8 .995 10.41 2.3 14.4C3.24 18.28 6.61 21.4 10.59 21.9C8.54 20.61 7.3 18.19 7.3 15.78C7.38 13.25 8.94 10.28 11.46 9.56M2.78 8.24C5.82 6 10.66 6.18 13.28 9C14.3 10.11 15 12 14.07 13.37C12.33 15.25 17.15 15.5 18.18 15.22C21.92 14.5 22.91 10.15 21.13 7.15C19.43 3.75 15.66 1.97 11.96 2C7.9 1.93 4.25 4.5 2.78 8.24Z"})})}function IconSafari(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z"})})}function IconOpera(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M9.04,17.07C8.04,15.9 7.4,14.16 7.35,12.21V11.79C7.4,9.84 8.04,8.1 9.04,6.93C9.86,5.95 10.93,5.37 12.1,5.37C14.72,5.37 16.84,8.34 16.84,12C16.84,15.66 14.72,18.63 12.1,18.63C10.93,18.63 10.33,18.5 9.04,17.07M12.03,3H12A9,9 0 0,0 3,12C3,16.83 6.8,20.77 11.57,21H12C14.3,21 16.4,20.13 18,18.71C19.84,17.06 21,14.67 21,12C21,9.33 19.84,6.94 18,5.29C16.41,3.87 14.32,3 12.03,3Z"})})}function IconInternetExplorer(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M13,3L14,3.06C16.8,1.79 19.23,1.64 20.5,2.92C21.5,3.93 21.58,5.67 20.92,7.72C21.61,9 22,10.45 22,12L21.95,13H9.08C9.45,15.28 11.06,17 13,17C14.31,17 15.47,16.21 16.2,15H21.5C20.25,18.5 16.92,21 13,21C11.72,21 10.5,20.73 9.41,20.25C6.5,21.68 3.89,21.9 2.57,20.56C1,18.96 1.68,15.57 4,12C4.93,10.54 6.14,9.06 7.57,7.65L8.38,6.88C7.21,7.57 5.71,8.62 4.19,10.17C5.03,6.08 8.66,3 13,3M13,7C11.21,7 9.69,8.47 9.18,10.5H16.82C16.31,8.47 14.79,7 13,7M20.06,4.06C19.4,3.39 18.22,3.35 16.74,3.81C18.22,4.5 19.5,5.56 20.41,6.89C20.73,5.65 20.64,4.65 20.06,4.06M3.89,20C4.72,20.84 6.4,20.69 8.44,19.76C6.59,18.67 5.17,16.94 4.47,14.88C3.27,17.15 3,19.07 3.89,20Z"})})}function IconWeb(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"})})}function IconListView(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z",fill:"currentColor"})})}function IconGridView(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3,3v8h8V3H3z M9,9H5V5h4V9z M3,13v8h8v-8H3z M9,19H5v-4h4V19z M13,3v8h8V3H13z M19,9h-4V5h4V9z M13,13v8h8v-8H13z M19,19h-4v-4h4V19z",fill:"currentColor"})})}function IconMonitor(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z"})})}function IconBold(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M6.8 19V5H12.325C13.4083 5 14.4083 5.33333 15.325 6C16.2417 6.66667 16.7 7.59167 16.7 8.775C16.7 9.625 16.5083 10.2792 16.125 10.7375C15.7417 11.1958 15.3833 11.525 15.05 11.725C15.4667 11.9083 15.9292 12.25 16.4375 12.75C16.9458 13.25 17.2 14 17.2 15C17.2 16.4833 16.6583 17.5208 15.575 18.1125C14.4917 18.7042 13.475 19 12.525 19H6.8ZM9.825 16.2H12.425C13.225 16.2 13.7125 15.9958 13.8875 15.5875C14.0625 15.1792 14.15 14.8833 14.15 14.7C14.15 14.5167 14.0625 14.2208 13.8875 13.8125C13.7125 13.4042 13.2 13.2 12.35 13.2H9.825V16.2ZM9.825 10.5H12.15C12.7 10.5 13.1 10.3583 13.35 10.075C13.6 9.79167 13.725 9.475 13.725 9.125C13.725 8.725 13.5833 8.4 13.3 8.15C13.0167 7.9 12.65 7.775 12.2 7.775H9.825V10.5Z"})})}function IconItalic(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M5 19V16.5H9L12 7.5H8V5H18V7.5H14.5L11.5 16.5H15V19H5Z"})})}function IconPhone(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z"})})}function IconTablet(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z"})})}function IconDevices(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z"})})}function IconMacOS(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M18.71,19.5C17.88,20.74 17,21.95 15.66,21.97C14.32,22 13.89,21.18 12.37,21.18C10.84,21.18 10.37,21.95 9.1,22C7.79,22.05 6.8,20.68 5.96,19.47C4.25,17 2.94,12.45 4.7,9.39C5.57,7.87 7.13,6.91 8.82,6.88C10.1,6.86 11.32,7.75 12.11,7.75C12.89,7.75 14.37,6.68 15.92,6.84C16.57,6.87 18.39,7.1 19.56,8.82C19.47,8.88 17.39,10.1 17.41,12.63C17.44,15.65 20.06,16.66 20.09,16.67C20.06,16.74 19.67,18.11 18.71,19.5M13,3.5C13.73,2.67 14.94,2.04 15.94,2C16.07,3.17 15.6,4.35 14.9,5.19C14.21,6.04 13.07,6.7 11.95,6.61C11.8,5.46 12.36,4.26 13,3.5Z"})})}function IconAppleIOS(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M2.09 16.8H3.75V9.76H2.09M2.92 8.84C3.44 8.84 3.84 8.44 3.84 7.94C3.84 7.44 3.44 7.04 2.92 7.04C2.4 7.04 2 7.44 2 7.94C2 8.44 2.4 8.84 2.92 8.84M9.25 7.06C6.46 7.06 4.7 8.96 4.7 12C4.7 15.06 6.46 16.96 9.25 16.96C12.04 16.96 13.8 15.06 13.8 12C13.8 8.96 12.04 7.06 9.25 7.06M9.25 8.5C10.96 8.5 12.05 9.87 12.05 12C12.05 14.15 10.96 15.5 9.25 15.5C7.54 15.5 6.46 14.15 6.46 12C6.46 9.87 7.54 8.5 9.25 8.5M14.5 14.11C14.57 15.87 16 16.96 18.22 16.96C20.54 16.96 22 15.82 22 14C22 12.57 21.18 11.77 19.23 11.32L18.13 11.07C16.95 10.79 16.47 10.42 16.47 9.78C16.47 9 17.2 8.45 18.28 8.45C19.38 8.45 20.13 9 20.21 9.89H21.84C21.8 8.2 20.41 7.06 18.29 7.06C16.21 7.06 14.73 8.21 14.73 9.91C14.73 11.28 15.56 12.13 17.33 12.53L18.57 12.82C19.78 13.11 20.27 13.5 20.27 14.2C20.27 15 19.47 15.57 18.31 15.57C17.15 15.57 16.26 15 16.16 14.11H14.5Z"})," "]})}function IconWindows(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3,12V6.75L9,5.43V11.91L3,12M20,3V11.75L10,11.9V5.21L20,3M3,13L9,13.09V19.9L3,18.75V13M20,13.25V22L10,20.09V13.1L20,13.25Z"})," "]})}function IconLinux(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M14.62,8.35C14.2,8.63 12.87,9.39 12.67,9.54C12.28,9.85 11.92,9.83 11.53,9.53C11.33,9.37 10,8.61 9.58,8.34C9.1,8.03 9.13,7.64 9.66,7.42C11.3,6.73 12.94,6.78 14.57,7.45C15.06,7.66 15.08,8.05 14.62,8.35M21.84,15.63C20.91,13.54 19.64,11.64 18,9.97C17.47,9.42 17.14,8.8 16.94,8.09C16.84,7.76 16.77,7.42 16.7,7.08C16.5,6.2 16.41,5.3 16,4.47C15.27,2.89 14,2.07 12.16,2C10.35,2.05 9,2.81 8.21,4.4C8,4.83 7.85,5.28 7.75,5.74C7.58,6.5 7.43,7.29 7.25,8.06C7.1,8.71 6.8,9.27 6.29,9.77C4.68,11.34 3.39,13.14 2.41,15.12C2.27,15.41 2.13,15.7 2.04,16C1.85,16.66 2.33,17.12 3.03,16.96C3.47,16.87 3.91,16.78 4.33,16.65C4.74,16.5 4.9,16.6 5,17C5.65,19.15 7.07,20.66 9.24,21.5C13.36,23.06 18.17,20.84 19.21,16.92C19.28,16.65 19.38,16.55 19.68,16.65C20.14,16.79 20.61,16.89 21.08,17C21.57,17.09 21.93,16.84 22,16.36C22.03,16.1 21.94,15.87 21.84,15.63"})," "]})}function IconAndroidOS(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z"})})}function IconLink(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M7.90326 16.7536C6.93594 15.7863 6.93594 14.2137 7.90326 13.2464L10.166 10.9836L9.0912 9.90883L6.82846 12.1716C5.26717 13.7329 5.26717 16.2671 6.82846 17.8284C8.38975 19.3897 10.924 19.3897 12.4853 17.8284L14.7481 15.5657L13.6733 14.4909L11.4105 16.7536C10.4432 17.7209 8.87058 17.7209 7.90326 16.7536ZM10.7883 15L15.3137 10.4745L14.1824 9.34315L9.65688 13.8686L10.7883 15ZM12.4853 6.51472L10.2226 8.77746L11.2974 9.85226L13.5601 7.58952C14.5274 6.6222 16.1 6.6222 17.0674 7.58952C18.0347 8.55684 18.0347 10.1294 17.0674 11.0968L14.8046 13.3595L15.8794 14.4343L18.1422 12.1716C19.7035 10.6103 19.7035 8.07601 18.1422 6.51472C16.5809 4.95343 14.0466 4.95343 12.4853 6.51472Z",fill:"currentColor"})})}function IconPreview(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.11,3,19,3z M19,19H5V7h14V19z M12,10.5 c1.84,0,3.48,0.96,4.34,2.5c-0.86,1.54-2.5,2.5-4.34,2.5S8.52,14.54,7.66,13C8.52,11.46,10.16,10.5,12,10.5 M12,9 c-2.73,0-5.06,1.66-6,4c0.94,2.34,3.27,4,6,4s5.06-1.66,6-4C17.06,10.66,14.73,9,12,9L12,9z M12,14.5c-0.83,0-1.5-0.67-1.5-1.5 s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S12.83,14.5,12,14.5z"})})}function IconEyeHidden(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M12 6.90455C15.1009 6.90455 17.8664 8.64727 19.2164 11.4045C18.7336 12.4027 18.0545 13.2618 17.2445 13.9573L18.3982 15.1109C19.5355 14.1045 20.4355 12.8445 21 11.4045C19.5845 7.81273 16.0909 5.26818 12 5.26818C10.9609 5.26818 9.96273 5.43182 9.02182 5.73455L10.3718 7.08454C10.9036 6.97818 11.4436 6.90455 12 6.90455ZM11.1245 7.83727L12.8182 9.53091C13.2845 9.73545 13.6609 10.1118 13.8655 10.5782L15.5591 12.2718C15.6245 11.9936 15.6736 11.6991 15.6736 11.3964C15.6818 9.36727 14.0291 7.72273 12 7.72273C11.6973 7.72273 11.4109 7.76364 11.1245 7.83727ZM3.82636 5.16182L6.01909 7.35455C4.68545 8.40182 3.63 9.79273 3 11.4045C4.41545 14.9964 7.90909 17.5409 12 17.5409C13.2436 17.5409 14.4382 17.3036 15.5345 16.87L18.3327 19.6682L19.4864 18.5145L4.98 4L3.82636 5.16182ZM9.96273 11.2982L12.0982 13.4336C12.0655 13.4418 12.0327 13.45 12 13.45C10.8709 13.45 9.95455 12.5336 9.95455 11.4045C9.95455 11.3636 9.96273 11.3391 9.96273 11.2982ZM7.18091 8.51636L8.61273 9.94818C8.42455 10.3982 8.31818 10.8891 8.31818 11.4045C8.31818 13.4336 9.97091 15.0864 12 15.0864C12.5155 15.0864 13.0064 14.98 13.4482 14.7918L14.25 15.5936C13.53 15.79 12.7773 15.9045 12 15.9045C8.89909 15.9045 6.13364 14.1618 4.78364 11.4045C5.35636 10.2345 6.19091 9.26909 7.18091 8.51636Z",fill:"currentColor"})})}function IconFunnelHorizontal(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M19 5L19 8L5 8L5 5L19 5ZM15 10.6L15 13.4L5 13.4L5 10.6L15 10.6ZM11 16.2L11 19L5 19L5 16.2L11 16.2Z",fill:"currentColor"})})}function IconArrowUp(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",fill:"currentColor"})})}function IconArrowDown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",fill:"currentColor"})})}function IconSort(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z",fill:"currentColor"})})}function IconFunnelVertical(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M5 5H8V19H5V5ZM10.6 9H13.4V19H10.6V9ZM16.2 13H19V19H16.2V13Z",fill:"currentColor"})})}function IconMarkdown(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6H20.56C21.35 6 22 6.63 22 7.41V16.59C22 17.37 21.35 18 20.56 18M6.81 15.19V11.53L8.73 13.88L10.65 11.53V15.19H12.58V8.81H10.65L8.73 11.16L6.81 8.81H4.89V15.19H6.81M19.69 12H17.77V8.81H15.85V12H13.92L16.81 15.28L19.69 12Z"})})}function IconFullScreen(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M5 14H3V20H10V18H5V14Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M10 6L10 4L3 4L3 10L5 10L5 6L10 6Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M19 14H21V20H14V18H19V14Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M14 6L14 4L21 4L21 10L19 10L19 6L14 6Z",fill:"currentColor"})]})}function IconPlayCircle(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM9.5 16.5L16.5 12L9.5 7.5V16.5Z",fill:"currentColor"})})}function IconSkipBackward(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M21.8636 13.6486C22.7745 8.20179 18.9753 3.03539 13.3613 2.08842C10.1083 1.5397 6.96075 2.53504 4.71122 4.52864L3.64727 3.39843C3.52963 3.27464 3.31814 3.33531 3.29323 3.49844L2.61914 7.61871C2.59751 7.7469 2.70624 7.86158 2.83872 7.85097L7.12768 7.57298C7.16635 7.57046 7.20339 7.55738 7.23454 7.53524C7.26569 7.5131 7.28969 7.48281 7.30378 7.44784C7.31787 7.41288 7.32148 7.37466 7.31418 7.33758C7.30689 7.3005 7.289 7.26607 7.26256 7.23825L6.10772 6.01158C6.35345 5.79443 6.6153 5.59014 6.89033 5.40074C7.75239 4.80488 8.72707 4.3786 9.7602 4.14561C10.831 3.90282 11.9307 3.87537 13.0286 4.06056C14.1265 4.24575 15.1564 4.63245 16.0883 5.21303C16.9896 5.77326 17.7628 6.48932 18.3877 7.34012C19.0126 8.19091 19.4575 9.13303 19.7082 10.1413C19.9684 11.1866 20.0076 12.2555 19.828 13.3205C19.6483 14.3854 19.2606 15.3823 18.6724 16.282C18.1048 17.1522 17.3755 17.8963 16.5061 18.495C15.6366 19.0938 14.6714 19.5166 13.6362 19.7502C12.5654 19.993 11.4657 20.0204 10.3678 19.8352C9.26987 19.65 8.23995 19.2633 7.30808 18.6827C6.40854 18.1237 5.62762 17.4013 5.00872 16.5557C4.8493 16.3386 4.70383 16.1163 4.56724 15.8879C4.54048 15.8423 4.49636 15.8085 4.44446 15.7941C4.39256 15.7796 4.3371 15.7856 4.29013 15.8108L2.84288 16.5656C2.74229 16.6196 2.70583 16.7427 2.76244 16.841C4.25318 19.3768 6.85284 21.2731 10.0347 21.8098C15.6538 22.7576 20.9514 19.1029 21.8636 13.6486Z",fill:"currentColor"})})}function IconXmasTree(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M10,21V18H3L8,13H5L10,8H7L12,3L17,8H14L19,13H16L21,18H14V21H10Z"})})}function IconRobot(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,fill:"currentColor",children:(0,jsx_runtime.jsx)("path",{d:"M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z"})})}function IconSad(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z"})})}function IconDragHandle(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"m11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",fill:"currentColor"})})}function IconDocumentExpand(_ref4){let{mode,...props}=_ref4;return(0,jsx_runtime.jsxs)(LemonIconBase,{...props,children:[(0,jsx_runtime.jsx)("path",{d:"M3 2.58828C3 2.26328 3.26328 2 3.58828 2C3.91328 2 4.17656 2.26328 4.17656 2.58828V21.4117C4.17656 21.7367 3.91328 22 3.58828 22C3.26328 22 3 21.7367 3 21.4117V2.58828ZM19.4704 2.58828C19.4704 2.26328 19.7337 2 20.0587 2C20.3837 2 20.6469 2.26328 20.6469 2.58828V21.4117C20.6469 21.7367 20.3837 22 20.0587 22C19.7337 22 19.4704 21.7367 19.4704 21.4117V2.58828ZM7.1172 13.1765C6.79298 13.1765 6.5297 12.9132 6.5297 12.5882C6.5297 12.2632 6.79298 11.9999 7.1172 11.9999H16.5296C16.8538 11.9999 17.1171 12.2632 17.1171 12.5882C17.1171 12.9132 16.8538 13.1765 16.5296 13.1765H7.1172ZM7.1172 16.1179C6.79298 16.1179 6.5297 15.8538 6.5297 15.5296C6.5297 15.2046 6.79298 14.9413 7.1172 14.9413H16.5296C16.8538 14.9413 17.1171 15.2046 17.1171 15.5296C17.1171 15.8538 16.8538 16.1179 16.5296 16.1179H7.1172ZM7.1172 19.0585C6.79298 19.0585 6.5297 18.7952 6.5297 18.4702C6.5297 18.146 6.79298 17.8819 7.1172 17.8819H16.5296C16.8538 17.8819 17.1171 18.146 17.1171 18.4702C17.1171 18.7952 16.8538 19.0585 16.5296 19.0585H7.1172Z",fill:"currentColor"}),"collapse"===mode?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("path",{d:"M6.47654 6.12116L8.44086 4.15683C8.65013 3.94756 8.98943 3.94756 9.19838 4.15683C9.40765 4.3661 9.40765 4.70539 9.19838 4.91435L8.14871 5.96401L11.9942 5.96429C12.29 5.96429 12.5332 6.20426 12.5332 6.50002C12.5332 6.79578 12.29 7.03575 11.9942 7.03575H8.14871L9.19867 8.08541C9.40794 8.29468 9.40794 8.63397 9.19867 8.84293C8.9894 9.0522 8.6501 9.0522 8.44115 8.84293L6.47682 6.8786C6.26755 6.66961 6.26755 6.33039 6.47654 6.12116Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M17.0947 6.12116L15.1304 4.15683C14.9211 3.94756 14.5818 3.94756 14.3729 4.15683C14.1636 4.3661 14.1636 4.70539 14.3729 4.91435L15.4225 5.96401L11.6771 5.96429C11.3813 5.96429 11.0371 6.20426 11.0371 6.50002C11.0371 6.79578 11.3813 7.03575 11.6771 7.03575H15.4225L14.3726 8.08541C14.1633 8.29468 14.1633 8.63397 14.3726 8.84293C14.5818 9.0522 14.9211 9.0522 15.1301 8.84293L17.0944 6.8786C17.3037 6.66961 17.3037 6.33039 17.0947 6.12116Z",fill:"currentColor"})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("path",{d:"M12.4765 6.12116L14.4408 4.15683C14.6501 3.94756 14.9894 3.94756 15.1984 4.15683C15.4076 4.3661 15.4076 4.70539 15.1984 4.91435L14.1487 5.96401L16.9942 5.96429C17.29 5.96429 17.5332 6.20426 17.5332 6.50002C17.5332 6.79578 17.29 7.03575 16.9942 7.03575H14.1487L15.1986 8.08541C15.4079 8.29468 15.4079 8.63397 15.1986 8.84293C14.9894 9.0522 14.6501 9.0522 14.4411 8.84293L12.4768 6.8786C12.2675 6.66961 12.2675 6.33039 12.4765 6.12116Z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M11.3818 6.12116L9.4175 4.15683C9.20823 3.94756 8.86894 3.94756 8.65998 4.15683C8.45071 4.3661 8.45071 4.70539 8.65998 4.91435L9.70965 5.96401L6.96422 5.96429C6.66846 5.96429 6.32422 6.20426 6.32422 6.50002C6.32422 6.79578 6.66846 7.03575 6.96422 7.03575H9.70965L8.6597 8.08541C8.45043 8.29468 8.45043 8.63397 8.6597 8.84293C8.86896 9.0522 9.20826 9.0522 9.41721 8.84293L11.3815 6.8786C11.5908 6.66961 11.5908 6.33039 11.3818 6.12116Z",fill:"currentColor"})]})]})}function IconAdsClick(props){return(0,jsx_runtime.jsx)(LemonIconBase,{...props,children:(0,jsx_runtime.jsx)("path",{d:"M11.71,17.99C8.53,17.84,6,15.22,6,12c0-3.31,2.69-6,6-6c3.22,0,5.84,2.53,5.99,5.71l-2.1-0.63C15.48,9.31,13.89,8,12,8 c-2.21,0-4,1.79-4,4c0,1.89,1.31,3.48,3.08,3.89L11.71,17.99z M22,12c0,0.3-0.01,0.6-0.04,0.9l-1.97-0.59C20,12.21,20,12.1,20,12 c0-4.42-3.58-8-8-8s-8,3.58-8,8s3.58,8,8,8c0.1,0,0.21,0,0.31-0.01l0.59,1.97C12.6,21.99,12.3,22,12,22C6.48,22,2,17.52,2,12 C2,6.48,6.48,2,12,2S22,6.48,22,12z M18.23,16.26L22,15l-10-3l3,10l1.26-3.77l4.27,4.27l1.98-1.98L18.23,16.26z",fill:"currentColor"})})}function IconSquare(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 256 256",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",stroke:"currentColor",strokeWidth:6,d:"M208,220H48a12.01367,12.01367,0,0,1-12-12V48A12.01359,12.01359,0,0,1,48,36H208a12.01359,12.01359,0,0,1,12,12V208A12.01367,12.01367,0,0,1,208,220ZM48,44a4.00458,4.00458,0,0,0-4,4V208a4.00458,4.00458,0,0,0,4,4H208a4.00458,4.00458,0,0,0,4-4V48a4.00458,4.00458,0,0,0-4-4Z"})})}function IconReact(props){return(0,jsx_runtime.jsxs)(LemonIconBase,{viewBox:"0 0 23 21",...props,children:[(0,jsx_runtime.jsxs)("g",{clipPath:"url(#clip0)",children:[(0,jsx_runtime.jsx)("path",{d:"M11.5 12.282a2.05 2.05 0 100-4.1 2.05 2.05 0 000 4.1z",fill:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M11.5 14.432c6.075 0 11-1.88 11-4.2 0-2.32-4.925-4.2-11-4.2s-11 1.88-11 4.2c0 2.32 4.925 4.2 11 4.2z",stroke:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M7.863 12.332c3.038 5.261 7.129 8.586 9.137 7.426 2.01-1.16 1.175-6.365-1.862-11.626C12.1 2.87 8.009-.454 6 .705c-2.008 1.16-1.174 6.366 1.863 11.627z",stroke:"currentColor"}),(0,jsx_runtime.jsx)("path",{d:"M7.863 8.132C4.826 13.392 3.992 18.598 6 19.758c2.01 1.16 6.1-2.165 9.138-7.426C18.175 7.07 19.009 1.865 17 .705c-2.008-1.16-6.1 2.165-9.137 7.427z",stroke:"currentColor"})]}),(0,jsx_runtime.jsx)("defs",{children:(0,jsx_runtime.jsx)("clipPath",{id:"clip0",children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M0 0h23v20.463H0z"})})})]})}function IconFlutter(props){return(0,jsx_runtime.jsx)(LemonIconBase,{viewBox:"0 0 24 24",...props,children:(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3.5 12.5L6.5 15.5 19 3 13 3zM19 12L13 12 8 17 13 22 19 22 14 17z"})})}},"./frontend/src/lib/lemon-ui/icons/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$L:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconEyeHidden,$M:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBranch,$b:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectProperties,B4:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSort,BD:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconArrowDown,Bm:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPython,C9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconItalic,CO:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconUnverifiedEvent,Cc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectEvents,Cz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconArrowUp,D9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGroupedEvents,DB:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconLinux,DM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDocumentExpand,D_:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFlutter,EF:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconInfinity,Eo:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRecording,Et:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGitlab,GH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGolang,G_:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSkipBackward,IN:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconHandClick,Ii:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAreaChart,Io:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconXmasTree,JH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconLink,JK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSync,K6:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingFlatDown,Kp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAndroidOS,MN:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubtitles,Mr:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFunnelHorizontal,OG:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpera,Ol:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconKey,PV:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChrome,Qp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAction,RQ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconJavascript,Rz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFeedback,S9:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPhone,SE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFunnelVertical,Sc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWeb,T:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWithBadge,U0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAdsClick,UE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenInApp,Ud:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPlayCircle,VG:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChevronRight,VI:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFirefox,VM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPreview,VZ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubArrowRight,W7:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPHP,WB:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconVerifiedEvent,X:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconHeatmap,X8:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCalculate,Xd:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWithCount,Xq:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSafari,YX:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDevices,Ye:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRobot,Z0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCohort,Zf:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSlackExternal,_S:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSwapHoriz,_b:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconQueryEditor,_x:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTuning,ar:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.SortableDragIcon,b8:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconErrorOutline,bK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSelectAll,bn:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconUploadFile,cs:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingFlat,dX:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconListView,dc:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMenu,ed:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconChevronLeft,ee:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTextSize,fS:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconNodeJS,ge:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconComment,gx:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSlack,gz:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRuby,hQ:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.Icon123,ig:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOffline,in:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconAppleIOS,ix:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTablet,j4:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrendingDown,jP:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconInternetExplorer,jo:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconWindows,kh:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMarkdown,ku:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconPremium,lE:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMacOS,lM:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBold,p$:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTableChart,pF:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenInNew,q3:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSurveys,qV:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconExclamation,qw:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconSubtitlesOff,r3:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMicrosoftEdge,rU:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconDragHandle,re:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconMonitor,rp:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCumulativeChart,s5:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFullScreen,sH:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconTools,sL:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconBookmarkBorder,tr:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconRefresh,uR:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconCancel,v$:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconReact,vY:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGoogle,yK:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconClipboardEdit,yf:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconFlare,ys:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconReplay,z0:()=>_icons__WEBPACK_IMPORTED_MODULE_0__.IconGridView});var _icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/icons.tsx")},"./frontend/src/lib/logic/apiStatusLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>apiStatusLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let apiStatusLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","apiStatusLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({onApiResponse:(response,error)=>({response,error}),setInternetConnectionIssue:issue=>({issue}),setTimeSensitiveAuthenticationRequired:required=>({required})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({internetConnectionIssue:[!1,{setInternetConnectionIssue:(_,_ref)=>{let{issue}=_ref;return issue}}],timeSensitiveAuthenticationRequired:[!1,{setTimeSensitiveAuthenticationRequired:(_,_ref2)=>{let{required}=_ref2;return required}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref3=>{let{cache,actions,values}=_ref3;return{onApiResponse:async(_ref4,breakpoint)=>{let{response,error}=_ref4;(error||!response?.status)&&(await breakpoint(50),error?.message==="Failed to fetch"&&actions.setInternetConnectionIssue(!0)),response?.ok&&values.internetConnectionIssue&&actions.setInternetConnectionIssue(!1);try{if(response?.status===403){let data=await response?.json();"This action requires you to be recently authenticated."===data.detail&&actions.setTimeSensitiveAuthenticationRequired(!0)}}catch(e){}if(response?.status===401){var _cache$lastUnauthoriz;if(!scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__.userLogic.findMounted()?.values.user)return;let now=Date.now();now-1e4>(null!==(_cache$lastUnauthoriz=cache.lastUnauthorizedCheck)&&void 0!==_cache$lastUnauthoriz?_cache$lastUnauthoriz:0)&&(cache.lastUnauthorizedCheck=Date.now(),await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.get("api/users/@me/").catch(error=>{401===error.status&&scenes_userLogic__WEBPACK_IMPORTED_MODULE_2__.userLogic.findMounted()?.actions.logout()}))}}}})])},"./frontend/src/lib/logic/featureFlagLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>featureFlagLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js");let eventsNotified={};function notifyFlagIfNeeded(flag,flagState){eventsNotified[flag]||(posthog_js__WEBPACK_IMPORTED_MODULE_2__.ZP.capture("$feature_flag_called",{$feature_flag:flag,$feature_flag_response:void 0!==flagState&&flagState}),eventsNotified[flag]=!0)}function getPersistedFeatureFlags(){let appContext=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__.Fj)(),persistedFeatureFlags=appContext?.persisted_feature_flags||[],flags=Object.fromEntries(persistedFeatureFlags.map(f=>[f,!0]));return flags}let featureFlagLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","logic","featureFlagLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setFeatureFlags:(flags,variants)=>({flags,variants})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({featureFlags:[getPersistedFeatureFlags(),{persist:!0},{setFeatureFlags:(_,_ref)=>{let{variants}=_ref;return function(featureFlags){let appContext=(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__.Fj)(),persistedFlags=getPersistedFeatureFlags(appContext),availableFlags=appContext?.preflight?.cloud||appContext?.preflight?.is_debug?{...persistedFlags,...featureFlags}:persistedFlags;if(void 0!==window.Proxy)return new Proxy({},{get(_,flag){if("toJSON"===flag)return()=>availableFlags;let flagString=flag.toString(),flagState=availableFlags[flagString];return notifyFlagIfNeeded(flagString,flagState),flagState}});let flags={};for(let flag of Object.keys(availableFlags))Object.defineProperty(flags,flag,{get:function(){return"toJSON"===flag?()=>availableFlags:(notifyFlagIfNeeded(flag,!0),!0)}});return flags}(variants)}}],receivedFeatureFlags:[!1,{setFeatureFlags:()=>!0}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;posthog_js__WEBPACK_IMPORTED_MODULE_2__.ZP.onFeatureFlags(actions.setFeatureFlags)})])},"./frontend/src/lib/logic/userPreferencesLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>userPreferencesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let userPreferencesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","logic","userPreferencesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setHidePostHogPropertiesInTable:enabled=>({enabled}),setHideNullValues:enabled=>({enabled})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({hidePostHogPropertiesInTable:[!1,{persist:!0},{setHidePostHogPropertiesInTable:(_,_ref)=>{let{enabled}=_ref;return enabled}}],hideNullValues:[!0,{persist:!0},{setHideNullValues:(_,_ref2)=>{let{enabled}=_ref2;return enabled}}]}))])},"./frontend/src/lib/monaco/CodeEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>CodeEditor_CodeEditor,Z:()=>initModel});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CodeEditor=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/monaco/CodeEditor.scss"),CodeEditor_default=__webpack_require__.n(CodeEditor),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CodeEditor_default(),options),CodeEditor_default().locals;var dist=__webpack_require__("./node_modules/.pnpm/@monaco-editor+react@4.6.0_monaco-editor@0.49.0_react-dom@18.2.0_react@18.2.0/node_modules/@monaco-editor/react/dist/index.mjs"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),codeEditorLogic=__webpack_require__("./frontend/src/lib/monaco/codeEditorLogic.tsx");function isFocusable(element){if("DIV"===element.tagName||"SECTION"===element.tagName)return!1;let hasTabIndex=element.hasAttribute("tabindex"),tabIndex=hasTabIndex?parseInt(element.getAttribute("tabindex")||"0",10):-1,isFocusableInherently=/^(input|select|textarea|button|object)$/.test(element.tagName.toLowerCase())||"a"===element.tagName.toLowerCase()&&element.hasAttribute("href"),isDisabledOrHidden=element.hasAttribute("disabled")||"true"===element.getAttribute("aria-hidden")||"none"===element.style.display||"hidden"===element.style.visibility;return!isDisabledOrHidden&&(isFocusableInherently||tabIndex>=0)}var hog=__webpack_require__("./frontend/src/lib/monaco/languages/hog.ts"),hogQLAutocompleteProvider=__webpack_require__("./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts"),hogQLMetadataProvider=__webpack_require__("./frontend/src/lib/monaco/hogQLMetadataProvider.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts");let conf=()=>({...(0,hog.aK)()}),language=()=>({...(0,hog.dK)(),jsonKeywords:["true","false","null","undefined"],tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"json"}],json:[{include:"@whitespace"},[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[\w@]+/,{cases:{"@jsonKeywords":"keyword"}}],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_format_json"]],hog:[{include:"@whitespace"},[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format_json:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"hog"}]}}),hogQL_conf=()=>({comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),hogQL_language=()=>({defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","ANTI","ANY","ARRAY","AS","ASCENDING","ASOF","BOTH","BY","CASE","CAST","COHORT","COLLATE","CROSS","CUBE","CURRENT","DATE","DAY","DESC","DESCENDING","DISTINCT","ELSE","END","EXTRACT","FINAL","FIRST","FN","FOLLOWING","FOR","FROM","FULL","GROUP","HAVING","HOUR","ID","IF","INF","INTERVAL","KEY","LAST","LEADING","LET","LIMIT","MINUTE","MONTH","NAN_SQL","NULL_SQL","NULLS","OFFSET","ON","ORDER","OVER","PARTITION","PRECEDING","PREWHERE","QUARTER","RANGE","RETURN","ROLLUP","ROW","ROWS","SAMPLE","SECOND","SELECT","SEMI","SETTINGS","SUBSTRING","THEN","TIES","TO","TOP","TOTALS","TRAILING","TRIM","TRUNCATE","UNBOUNDED","USING","WEEK","WHEN","WHERE","WHILE","WINDOW","WITH","YEAR"],operators:["AND","BETWEEN","IN","LIKE","ILIKE","NOT","OR","IS","NULL","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["plus","minus","multiply","divide","intDiv","intDivOrZero","modulo","moduloOrZero","positiveModulo","negate","abs","gcd","lcm","max2","min2","multiplyDecimal","divideDecimal","empty","notEmpty","length","reverse","array","range","arrayConcat","arrayElement","has","hasAll","hasAny","hasSubstr","indexOf","arrayCount","countEqual","arrayEnumerate","arrayEnumerateUniq","arrayPopBack","arrayPopFront","arrayPushBack","arrayPushFront","arrayResize","arraySlice","arraySort","arrayReverseSort","arrayUniq","arrayJoin","arrayDifference","arrayDistinct","arrayEnumerateDense","arrayIntersect","arrayReverse","arrayFilter","arrayFlatten","arrayCompact","arrayZip","arrayAUC","arrayMap","arrayFill","arraySplit","arrayReverseFill","arrayReverseSplit","arrayExists","arrayAll","arrayFirst","arrayLast","arrayFirstIndex","arrayLastIndex","arrayMin","arrayMax","arraySum","arrayAvg","arrayCumSum","arrayCumSumNonNegative","arrayProduct","equals","notEquals","less","greater","lessOrEquals","greaterOrEquals","and","or","xor","not","hex","unhex","reinterpretAsUInt8","reinterpretAsUInt16","reinterpretAsUInt32","reinterpretAsUInt64","reinterpretAsUInt128","reinterpretAsUInt256","reinterpretAsInt8","reinterpretAsInt16","reinterpretAsInt32","reinterpretAsInt64","reinterpretAsInt128","reinterpretAsInt256","reinterpretAsFloat32","reinterpretAsFloat64","toInt","_toInt64","toFloat","toDecimal","toDate","toDateTime","toUUID","toString","toJSONString","parseDateTime","parseDateTimeBestEffort","toTypeName","toTimeZone","timeZoneOf","timeZoneOffset","toYear","toQuarter","toMonth","toDayOfYear","toDayOfMonth","toDayOfWeek","toHour","toMinute","toSecond","toUnixTimestamp","toUnixTimestamp64Milli","toStartOfYear","toStartOfISOYear","toStartOfQuarter","toStartOfMonth","toLastDayOfMonth","toMonday","toStartOfWeek","toStartOfDay","toLastDayOfWeek","toStartOfHour","toStartOfMinute","toStartOfSecond","toStartOfFiveMinutes","toStartOfTenMinutes","toStartOfFifteenMinutes","toTime","toISOYear","toISOWeek","toWeek","toYearWeek","age","dateDiff","dateTrunc","dateAdd","dateSub","timeStampAdd","timeStampSub","now","nowInBlock","rowNumberInAllBlocks","today","yesterday","timeSlot","toYYYYMM","toYYYYMMDD","toYYYYMMDDhhmmss","addYears","addMonths","addWeeks","addDays","addHours","addMinutes","addSeconds","addQuarters","subtractYears","subtractMonths","subtractWeeks","subtractDays","subtractHours","subtractMinutes","subtractSeconds","subtractQuarters","timeSlots","formatDateTime","dateName","monthName","fromUnixTimestamp","toModifiedJulianDay","fromModifiedJulianDay","toIntervalSecond","toIntervalMinute","toIntervalHour","toIntervalDay","toIntervalWeek","toIntervalMonth","toIntervalQuarter","toIntervalYear","left","right","lengthUTF8","leftPad","rightPad","leftPadUTF8","rightPadUTF8","lower","upper","lowerUTF8","upperUTF8","isValidUTF8","toValidUTF8","repeat","format","reverseUTF8","concat","substring","substringUTF8","appendTrailingCharIfAbsent","convertCharset","base58Encode","base58Decode","tryBase58Decode","base64Encode","base64Decode","tryBase64Decode","endsWith","startsWith","trim","trimLeft","trimRight","encodeXMLComponent","decodeXMLComponent","extractTextFromHTML","ascii","concatWithSeparator","position","positionCaseInsensitive","positionUTF8","positionCaseInsensitiveUTF8","multiSearchAllPositions","multiSearchAllPositionsUTF8","multiSearchFirstPosition","multiSearchFirstIndex","multiSearchAny","match","multiMatchAny","multiMatchAnyIndex","multiMatchAllIndices","multiFuzzyMatchAny","multiFuzzyMatchAnyIndex","multiFuzzyMatchAllIndices","extract","extractAll","extractAllGroupsHorizontal","extractAllGroupsVertical","like","ilike","notLike","notILike","ngramDistance","ngramSearch","countSubstrings","countSubstringsCaseInsensitive","countSubstringsCaseInsensitiveUTF8","countMatches","regexpExtract","replace","replaceAll","replaceOne","replaceRegexpAll","replaceRegexpOne","regexpQuoteMeta","translate","translateUTF8","if","multiIf","e","pi","exp","log","ln","exp2","log2","exp10","log10","sqrt","cbrt","erf","erfc","lgamma","tgamma","sin","cos","tan","asin","acos","atan","pow","power","intExp2","intExp10","cosh","acosh","sinh","asinh","atanh","atan2","hypot","log1p","sign","degrees","radians","factorial","width_bucket","floor","ceil","trunc","round","roundBankers","roundToExp2","roundDuration","roundAge","roundDown","map","mapFromArrays","mapAdd","mapSubtract","mapPopulateSeries","mapContains","mapKeys","mapValues","mapContainsKeyLike","mapExtractKeyLike","mapApply","mapFilter","mapUpdate","splitByChar","splitByString","splitByRegexp","splitByWhitespace","splitByNonAlpha","arrayStringConcat","alphaTokens","extractAllGroups","ngrams","tokens","bitAnd","bitOr","bitXor","bitNot","bitShiftLeft","bitShiftRight","bitRotateLeft","bitRotateRight","bitSlice","bitTest","bitTestAll","bitTestAny","bitCount","bitHammingDistance","bitmapBuild","bitmapToArray","bitmapSubsetInRange","bitmapSubsetLimit","subBitmap","bitmapContains","bitmapHasAny","bitmapHasAll","bitmapCardinality","bitmapMin","bitmapMax","bitmapTransform","bitmapAnd","bitmapOr","bitmapXor","bitmapAndnot","bitmapAndCardinality","bitmapOrCardinality","bitmapXorCardinality","bitmapAndnotCardinality","protocol","domain","domainWithoutWWW","topLevelDomain","firstSignificantSubdomain","cutToFirstSignificantSubdomain","cutToFirstSignificantSubdomainWithWWW","port","path","pathFull","queryString","fragment","queryStringAndFragment","extractURLParameter","extractURLParameters","extractURLParameterNames","URLHierarchy","URLPathHierarchy","encodeURLComponent","decodeURLComponent","encodeURLFormComponent","decodeURLFormComponent","netloc","cutWWW","cutQueryString","cutFragment","cutQueryStringAndFragment","cutURLParameter","isValidJSON","JSONHas","JSONLength","JSONArrayLength","JSONType","JSONExtractUInt","JSONExtractInt","JSONExtractFloat","JSONExtractBool","JSONExtractString","JSONExtractKey","JSONExtractKeys","JSONExtractRaw","JSONExtractArrayRaw","JSONExtractKeysAndValues","JSONExtractKeysAndValuesRaw","JSON_VALUE","in","notIn","greatCircleDistance","geoDistance","greatCircleAngle","pointInEllipses","pointInPolygon","geohashEncode","geohashDecode","geohashesInBox","isnull","isNotNull","coalesce","ifnull","nullif","assumeNotNull","toNullable","tuple","tupleElement","untuple","tupleHammingDistance","tupleToNameValuePairs","tuplePlus","tupleMinus","tupleMultiply","tupleDivide","tupleNegate","tupleMultiplyByNumber","tupleDivideByNumber","dotProduct","isFinite","isInfinite","ifNotFinite","isNaN","bar","transform","formatReadableDecimalSize","formatReadableSize","formatReadableQuantity","formatReadableTimeDelta","least","greatest","tumble","hop","tumbleStart","tumbleEnd","hopStart","hopEnd","L1Norm","L2Norm","LinfNorm","LpNorm","L1Distance","L2Distance","LinfDistance","LpDistance","L1Normalize","L2Normalize","LinfNormalize","LpNormalize","cosineDistance","rank","dense_rank","row_number","first_value","last_value","nth_value","lagInFrame","leadInFrame","equals","notEquals","less","greater","lessOrEquals","greaterOrEquals","like","ilike","notLike","notILike","in","notIn","count","countIf","countDistinctIf","min","minIf","max","maxIf","sum","sumIf","avg","avgIf","any","anyIf","stddevPop","stddevPopIf","stddevSamp","stddevSampIf","varPop","varPopIf","varSamp","varSampIf","covarPop","covarPopIf","covarSamp","covarSampIf","corr","anyHeavy","anyHeavyIf","anyLast","anyLastIf","argMin","argMinIf","argMax","argMaxIf","argMinMerge","argMaxMerge","avgState","avgMerge","avgWeighted","avgWeightedIf","avgArray","groupArray","groupUniqArray","groupUniqArrayIf","groupArrayInsertAt","groupArrayInsertAtIf","groupArrayMovingAvg","groupArrayMovingAvgIf","groupArrayMovingSum","groupArrayMovingSumIf","groupBitAnd","groupBitAndIf","groupBitOr","groupBitOrIf","groupBitXor","groupBitXorIf","groupBitmap","groupBitmapIf","groupBitmapAnd","groupBitmapAndIf","groupBitmapOr","groupBitmapOrIf","groupBitmapXor","groupBitmapXorIf","sumWithOverflow","sumWithOverflowIf","deltaSum","deltaSumIf","deltaSumTimestamp","deltaSumTimestampIf","sumMap","sumMapIf","sumMapMerge","minMap","minMapIf","maxMap","maxMapIf","medianArray","skewSamp","skewSampIf","skewPop","skewPopIf","kurtSamp","kurtSampIf","kurtPop","kurtPopIf","uniq","uniqIf","uniqExact","uniqExactIf","uniqHLL12","uniqHLL12If","uniqTheta","uniqThetaIf","median","medianIf","medianExact","medianExactIf","medianExactLow","medianExactLowIf","medianExactHigh","medianExactHighIf","medianExactWeighted","medianExactWeightedIf","medianTiming","medianTimingIf","medianTimingWeighted","medianTimingWeightedIf","medianDeterministic","medianDeterministicIf","medianTDigest","medianTDigestIf","medianTDigestWeighted","medianTDigestWeightedIf","medianBFloat16","medianBFloat16If","quantile","quantileIf","quantiles","quantilesIf","simpleLinearRegression","simpleLinearRegressionIf","contingency","contingencyIf","cramersV","cramersVIf","cramersVBiasCorrected","cramersVBiasCorrectedIf","theilsU","theilsUIf","maxIntersections","maxIntersectionsIf","maxIntersectionsPosition","maxIntersectionsPositionIf"],builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/#+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/\\'/,"string"],[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],complexIdentifiers:[[/`/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^`]+/,"identifier"],[/``/,"identifier"],[/`/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}),hogTemplate_conf=()=>({...(0,hog.aK)()}),hogTemplate_language=()=>({...(0,hog.dK)(),tokenizer:{root:[{include:"template_string"}],template_string:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^{]+/,"text"],[/@escapes/,"text.escape"],[/\\./,"text.escape.invalid"]],hog:[{include:"@whitespace"},[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"hog"}]}});var utils=__webpack_require__("./frontend/src/lib/utils.tsx"),editor_main=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");dist._m&&dist._m.config({monaco:editor_main});let codeEditorIndex=0;function initModel(model,builtCodeEditorLogic){model.codeEditorLogic=builtCodeEditorLogic}function CodeEditor_CodeEditor(_ref){var _editorProps$language;let{queryKey,options,onMount,value,onPressCmdEnter,autoFocus,globals,sourceQuery,schema:schema1,onError,onMetadata,onMetadataLoading,...editorProps}=_ref,{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),scrollbarRendering=(0,utils.es)()?"hidden":"auto",[monacoAndEditor,setMonacoAndEditor]=(0,react.useState)(null),[monaco,editor]=null!=monacoAndEditor?monacoAndEditor:[],[realKey]=(0,react.useState)(()=>codeEditorIndex++),builtCodeEditorLogic=(0,codeEditorLogic.Pc)({key:null!=queryKey?queryKey:`new/${realKey}`,query:null!=value?value:"",language:null!==(_editorProps$language=editorProps.language)&&void 0!==_editorProps$language?_editorProps$language:"text",globals,sourceQuery,monaco:monaco,editor:editor,onError,onMetadata,onMetadataLoading});(0,index_esm.useMountedLogic)(builtCodeEditorLogic);let monacoRoot=(0,react.useMemo)(()=>{let body="undefined"!=typeof document&&document.getElementsByTagName("body")[0]||null,monacoRoot=document.createElement("div");return monacoRoot.classList.add("monaco-editor"),monacoRoot.style.zIndex="var(--z-tooltip)",body?.appendChild(monacoRoot),monacoRoot},[]);(0,react.useEffect)(()=>()=>{monacoRoot?.remove()},[]),(0,react.useEffect)(()=>{monaco&&monaco.languages.typescript.typescriptDefaults.setCompilerOptions({jsx:editorProps?.path?.endsWith(".tsx")?monaco.languages.typescript.JsxEmit.React:monaco.languages.typescript.JsxEmit.Preserve,esModuleInterop:!0})},[monaco,editorProps.path]),(0,react.useEffect)(()=>{monaco&&monaco.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:schema1?[{uri:"http://internal/node-schema.json",fileMatch:["*"],schema:schema1}]:[]})},[monaco,schema1]);let monacoDisposables=(0,react.useRef)([]);return(0,react.useEffect)(()=>()=>{monacoDisposables.current.forEach(d=>d?.dispose())},[]),(0,jsx_runtime.jsx)(dist.ZP,{theme:isDarkModeOn?"vs-dark":"vs-light",loading:(0,jsx_runtime.jsx)(Spinner.$,{}),options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,glyphMargin:!1,folding:!0,wordWrap:"off",lineNumbers:"on",tabFocusMode:!1,overviewRulerBorder:!0,hideCursorInOverviewRuler:!1,overviewRulerLanes:3,overflowWidgetsDomNode:monacoRoot,...options,padding:{bottom:8,top:8},scrollbar:{vertical:scrollbarRendering,horizontal:scrollbarRendering,...options?.scrollbar}},value:value,onMount:(editor,monaco)=>{if(setMonacoAndEditor([monaco,editor]),function(monaco,editor,editorProps,options,builtCodeEditorLogic){let model=editor.getModel();model&&initModel(model,builtCodeEditorLogic),editorProps?.language==="hog"&&(0,hog.CW)(monaco),(editorProps?.language==="hogQL"||editorProps?.language==="hogQLExpr")&&function(monaco){let lang=arguments.length>1&&void 0!==arguments[1]?arguments[1]:schema.oU.hogQL;monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return id===lang})||(monaco.languages.register("hogQL"===lang?{id:lang,extensions:[".sql",".hogql"],mimetypes:["application/hogql"]}:{id:lang,mimetypes:["application/hogql+expr"]}),monaco.languages.setLanguageConfiguration(lang,hogQL_conf()),monaco.languages.setMonarchTokensProvider(lang,hogQL_language()),monaco.languages.registerCompletionItemProvider(lang,(0,hogQLAutocompleteProvider.B)(lang)),monaco.languages.registerCodeActionProvider(lang,(0,hogQLMetadataProvider.G)()))}(monaco,editorProps.language),editorProps?.language==="hogTemplate"&&(monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hogTemplate"===id})||(monaco.languages.register({id:"hogTemplate",mimetypes:["application/hog+template"]}),monaco.languages.setLanguageConfiguration("hogTemplate",hogTemplate_conf()),monaco.languages.setMonarchTokensProvider("hogTemplate",hogTemplate_language()),monaco.languages.registerCompletionItemProvider("hogTemplate",(0,hogQLAutocompleteProvider.B)(schema.oU.hogTemplate)),monaco.languages.registerCodeActionProvider("hogTemplate",(0,hogQLMetadataProvider.G)()))),editorProps?.language==="hogJson"&&(monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hogJson"===id})||(monaco.languages.register({id:"hogJson",mimetypes:["application/hog+json"]}),monaco.languages.setLanguageConfiguration("hogJson",conf()),monaco.languages.setMonarchTokensProvider("hogJson",language()),monaco.languages.registerCompletionItemProvider("hogJson",(0,hogQLAutocompleteProvider.B)(schema.oU.hogJson)),monaco.languages.registerCodeActionProvider("hogJson",(0,hogQLMetadataProvider.G)()))),(options.tabFocusMode||editorProps.onPressUpNoValue)&&editor.onKeyDown(evt=>{if(options.tabFocusMode&&evt.keyCode===monaco.KeyCode.Tab&&!evt.metaKey&&!evt.ctrlKey){var _evt$target$parentEle;let selection=editor.getSelection();if(selection&&(selection.startColumn!==selection.endColumn||selection.startLineNumber!==selection.endLineNumber))return;evt.preventDefault(),evt.stopPropagation();let element=null!==(_evt$target$parentEle=evt.target?.parentElement?.parentElement?.parentElement)&&void 0!==_evt$target$parentEle?_evt$target$parentEle:null;if(!element)return;let nextElement=evt.shiftKey?function(startElement){let prevSearchable=startElement.previousElementSibling,parentElement=startElement.parentElement;for(;parentElement;){for(;prevSearchable;){let focusable=function searchFocusable(currentElement){if(isFocusable(currentElement)&¤tElement!==startElement)return currentElement;let child=currentElement.lastElementChild;for(;child;){let focusable=searchFocusable(child);if(focusable)return focusable;child=child.previousElementSibling}return null}(prevSearchable);if(focusable)return focusable;prevSearchable=prevSearchable.previousElementSibling}if(isFocusable(parentElement)&&parentElement!==startElement)return parentElement;prevSearchable=parentElement.previousElementSibling,parentElement=parentElement.parentElement}return null}(element):function(startElement){let nextSearchable=startElement.nextElementSibling,parentElement=startElement.parentElement;for(;parentElement;){for(;nextSearchable;){let focusable=function searchFocusable(currentElement){if(isFocusable(currentElement)&¤tElement!==startElement)return currentElement;let child=currentElement.firstElementChild;for(;child;){let focusable=searchFocusable(child);if(focusable)return focusable;child=child.nextElementSibling}return null}(nextSearchable);if(focusable)return focusable;nextSearchable=nextSearchable.nextElementSibling}nextSearchable=parentElement.nextElementSibling,parentElement=parentElement.parentElement}return null}(element);nextElement&&"focus"in nextElement&&nextElement.focus()}!editorProps.onPressUpNoValue||evt.keyCode!==monaco.KeyCode.UpArrow||evt.metaKey||evt.ctrlKey||""!==editor.getValue()||(evt.preventDefault(),evt.stopPropagation(),editorProps.onPressUpNoValue())})}(monaco,editor,editorProps,null!=options?options:{},builtCodeEditorLogic),onPressCmdEnter&&monacoDisposables.current.push(editor.addAction({id:"saveAndRunPostHog",label:"Save and run query",keybindings:[monaco.KeyMod.CtrlCmd|monaco.KeyCode.Enter],run:()=>{let selection=editor.getSelection(),model=editor.getModel();if(selection&&model){let highlightedText=model.getValueInRange(selection);onPressCmdEnter(highlightedText,"selection");return}onPressCmdEnter(editor.getValue(),"full")}})),autoFocus){editor.focus();let model=editor.getModel();model&&editor.setPosition({column:model.getLineContent(model.getLineCount()).length+1,lineNumber:model.getLineCount()})}onMount?.(editor,monaco)},...editorProps},queryKey)}},"./frontend/src/lib/monaco/CodeEditorInline.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{s:()=>CodeEditorInline});var clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_monaco_CodeEditorResizable__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/CodeEditorResizable.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CodeEditorInline(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lib_monaco_CodeEditorResizable__WEBPACK_IMPORTED_MODULE_0__.Y,{minHeight:"29px",...props,className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.default)(".CodeEditorInline",props.className),options:{lineNumbers:"off",minimap:{enabled:!1},folding:!1,wordWrap:"on",renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"hidden"},overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,overviewRulerLanes:0,tabFocusMode:!0,...props.options}})}},"./frontend/src/lib/monaco/CodeEditorResizable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>CodeEditorResizeable});var clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),react_virtualized_dist_es_AutoSizer__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CodeEditorResizeable(_ref){let{height:defaultHeight,minHeight="5rem",maxHeight="90vh",className,editorClassName,embedded=!1,...props}=_ref,[height,setHeight]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultHeight),[manualHeight,setManualHeight]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultHeight),ref=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{var _value$split$length;let value="string"!=typeof props.value?JSON.stringify(props.value,null,2):props.value,lineCount=(null!==(_value$split$length=value?.split("\n").length)&&void 0!==_value$split$length?_value$split$length:1)+1;setHeight(18*lineCount)},[props.value]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{ref:ref,className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.default)("CodeEditorResizeable relative",embedded?"":"border rounded w-full",className),style:{minHeight,maxHeight,height:null!=manualHeight?manualHeight:height},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_virtualized_dist_es_AutoSizer__WEBPACK_IMPORTED_MODULE_2__.Z,{disableWidth:!0,children:_ref2=>{let{height}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_0__.p,{...props,className:editorClassName,height:height-2})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"absolute bottom-0 right-0 z-10 resize-y h-5 w-5 cursor-s-resize overflow-hidden",onMouseDown:e=>{var _ref$current$clientHe;let startY=e.clientY,startHeight=null!==(_ref$current$clientHe=ref.current?.clientHeight)&&void 0!==_ref$current$clientHe?_ref$current$clientHe:0,onMouseMove=event=>{setManualHeight(startHeight+event.clientY-startY)},onMouseUp=()=>{window.removeEventListener("mousemove",onMouseMove),window.removeEventListener("mouseup",onMouseUp)};window.addEventListener("mousemove",onMouseMove),window.addEventListener("mouseup",onMouseUp)}})]})}},"./frontend/src/lib/monaco/codeEditorLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Pc:()=>codeEditorLogic,nx:()=>activeModelStateKey,nz:()=>editorModelsStateKey});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_queries_examples__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/examples.ts"),_queries_query__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/schema.ts");let editorModelsStateKey=key=>`${key}/editorModelQueries`,activeModelStateKey=key=>`${key}/activeModelUri`,METADATA_LANGUAGES=[_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hog,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogQL,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogQLExpr,_queries_schema__WEBPACK_IMPORTED_MODULE_7__.oU.hogTemplate],codeEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["lib","monaco","hogQLMetadataProvider"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({reloadMetadata:!0,createModel:!0,addModel:modelName=>({modelName}),setModel:modelName=>({modelName}),deleteModel:modelName=>({modelName}),removeModel:modelName=>({modelName}),setModels:models=>({models}),updateState:!0,setLocalState:(key,value)=>({key,value})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{props}=_ref;return{metadata:[null,{reloadMetadata:async(_,breakpoint)=>{var _props$sourceQuery$va;let model=props.editor?.getModel();if(!model||!props.monaco||!METADATA_LANGUAGES.includes(props.language))return props.onMetadata?.(null),null;await breakpoint(300);let query=props.query;if(""===query)return props.onMetadata?.(null),null;let variables=props.sourceQuery?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLQuery&&null!==(_props$sourceQuery$va=props.sourceQuery.variables)&&void 0!==_props$sourceQuery$va?_props$sourceQuery$va:void 0,response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_6__.jr)({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLMetadata,language:props.language,query:query,filters:props.metadataFilters,globals:props.globals,sourceQuery:props.sourceQuery,variables});return breakpoint(),props.onMetadata?.(response),[query,response]}}],modelMarkers:[[],{reloadMetadataSuccess:_ref2=>{var _metadataResponse$err,_metadataResponse$war,_metadataResponse$not;let{metadata}=_ref2,model=props.editor?.getModel();if(!model||!metadata)return[];let markers=[],[query,metadataResponse]=metadata;function noticeToMarker(error,severity){var _error$start,_error$end,_error$start2,_error$end2,_error$message;let start=model.getPositionAt(null!==(_error$start=error.start)&&void 0!==_error$start?_error$start:0),end=model.getPositionAt(null!==(_error$end=error.end)&&void 0!==_error$end?_error$end:query.length);return{start:null!==(_error$start2=error.start)&&void 0!==_error$start2?_error$start2:0,startLineNumber:start.lineNumber,startColumn:start.column,end:null!==(_error$end2=error.end)&&void 0!==_error$end2?_error$end2:query.length,endLineNumber:end.lineNumber,endColumn:end.column,message:null!==(_error$message=error.message)&&void 0!==_error$message?_error$message:"Unknown error",severity:severity,hogQLFix:error.fix}}for(let notice of null!==(_metadataResponse$err=metadataResponse?.errors)&&void 0!==_metadataResponse$err?_metadataResponse$err:[])markers.push(noticeToMarker(notice,8));for(let notice of null!==(_metadataResponse$war=metadataResponse?.warnings)&&void 0!==_metadataResponse$war?_metadataResponse$war:[])markers.push(noticeToMarker(notice,4));for(let notice of null!==(_metadataResponse$not=metadataResponse?.notices)&&void 0!==_metadataResponse$not?_metadataResponse$not:[])markers.push(noticeToMarker(notice,1));return props.monaco?.editor.setModelMarkers(model,"hogql",markers),markers}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({activeModelUri:[null,{setModel:(_,_ref3)=>{let{modelName}=_ref3;return modelName}}],allModels:[[],{addModel:(state,_ref4)=>{let{modelName}=_ref4,newModels=[...state,modelName];return newModels},removeModel:(state,_ref5)=>{let{modelName}=_ref5,newModels=state.filter(model=>model.toString()!==modelName.toString());return newModels},setModels:(_,_ref6)=>{let{models}=_ref6;return models}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{props,values,actions}=_ref7;return{addModel:()=>{if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},removeModel:()=>{if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},setModel:_ref8=>{let{modelName}=_ref8;if(props.monaco){let model=props.monaco.editor.getModel(modelName);props.editor?.setModel(model)}if(values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let path=modelName.path.split("/").pop();path&&props.multitab&&actions.setLocalState(activeModelStateKey(props.key),path)}},deleteModel:_ref9=>{let{modelName}=_ref9;if(props.monaco){let model=props.monaco.editor.getModel(modelName);if(modelName==values.activeModelUri){let indexOfModel=values.allModels.findIndex(model=>model.toString()===modelName.toString()),nextModel=values.allModels[indexOfModel+1]||values.allModels[indexOfModel-1]||values.allModels[0];actions.setModel(nextModel)}model?.dispose(),actions.removeModel(modelName)}},setLocalState:_ref10=>{let{key,value}=_ref10;localStorage.setItem(key,value)},updateState:async(_,breakpoint)=>{if(await breakpoint(100),values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.MULTITAB_EDITOR]||values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.SQL_EDITOR]){let queries=values.allModels.map(model=>({query:props.monaco?.editor.getModel(model)?.getValue()||_queries_examples__WEBPACK_IMPORTED_MODULE_5__.$R.DataWarehouse.source.query,path:model.path.split("/").pop()}));props.multitab&&localStorage.setItem(editorModelsStateKey(props.key),JSON.stringify(queries))}},createModel:()=>{let currentModelCount=1,allNumbers=values.allModels.map(model=>parseInt(model.path.split("/").pop()||"0"));for(;allNumbers.includes(currentModelCount);)currentModelCount++;if(props.monaco){let uri=props.monaco.Uri.parse(currentModelCount.toString()),model=props.monaco.editor.createModel("SELECT event FROM events LIMIT 100",props.language,uri);props.editor?.setModel(model),actions.setModel(uri),actions.addModel(uri)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({isValidView:[s=>[s.metadata],metadata=>!!(metadata&&metadata[1]?.isValidView)],hasErrors:[s=>[s.modelMarkers],modelMarkers=>!!(null!=modelMarkers?modelMarkers:[]).filter(e=>8===e.severity).length],error:[s=>[s.hasErrors,s.modelMarkers],(hasErrors,modelMarkers)=>{let firstError=modelMarkers.find(e=>8===e.severity);return hasErrors&&firstError?`Error on line ${firstError.startLineNumber}, column ${firstError.startColumn}`:null}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref11=>{let{props,values}=_ref11;return{isValidView:isValidView=>{props.onError?.(values.error,isValidView)},error:error=>{props.onError?.(error,values.isValidView)},metadataLoading:loading=>{props.onMetadataLoading?.(loading)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref12,oldProps)=>{let{actions,props}=_ref12;(props.query!==oldProps.query||props.language!==oldProps.language||props.editor!==oldProps.editor)&&actions.reloadMetadata()})])},"./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>hogQLAutocompleteProvider});var monaco_editor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),_queries_query__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/schema.ts");let convertCompletionItemKind=kind=>{switch(kind){case"Method":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Method;case"Function":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Function;case"Constructor":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Constructor;case"Field":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Field;case"Variable":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Variable;case"Class":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Class;case"Struct":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Struct;case"Interface":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Interface;case"Module":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Module;case"Property":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Property;case"Event":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Event;case"Operator":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Operator;case"Unit":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Unit;case"Value":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Value;case"Constant":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Constant;case"Enum":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Enum;case"EnumMember":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.EnumMember;case"Keyword":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Keyword;case"Text":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Text;case"Color":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Color;case"File":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.File;case"Reference":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Reference;case"Customcolor":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Customcolor;case"Folder":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Folder;case"TypeParameter":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.TypeParameter;case"User":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.User;case"Issue":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Issue;case"Snippet":return monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Snippet;default:throw Error(`Unknown CompletionItemKind: ${kind}`)}},kindToSortText=(kind,label)=>"Variable"===kind?`1-${label}`:"Method"===kind||"Function"===kind?`2-${label}`:`3-${label}`,hogQLAutocompleteProvider=type=>({triggerCharacters:[" ",",",".","{"],provideCompletionItems:async(model,position)=>{let logic=model.codeEditorLogic;if(!logic||!logic.isMounted())return{suggestions:[],incomplete:!1};let word=model.getWordUntilPosition(position),startOffset=model.getOffsetAt({lineNumber:position.lineNumber,column:word.startColumn}),endOffset=model.getOffsetAt({lineNumber:position.lineNumber,column:word.endColumn}),query={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_2__.OH.HogQLAutocomplete,language:type,query:model.getValue(),filters:logic.isMounted()?logic.props.metadataFilters:void 0,globals:logic.isMounted()?logic.props.globals:void 0,sourceQuery:logic.isMounted()?logic.props.sourceQuery:void 0,startPosition:startOffset,endPosition:endOffset},response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_1__.jr)(query),completionItems=response.suggestions,suggestions=completionItems.map(item=>{let kind=convertCompletionItemKind(item.kind),sortText=kindToSortText(item.kind,item.label);return{label:{label:item.label,detail:item.detail},documentation:item.documentation,insertText:item.insertText,range:{startLineNumber:position.lineNumber,endLineNumber:position.lineNumber,startColumn:word.startColumn,endColumn:word.endColumn},kind,sortText,command:kind===monaco_editor__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind.Function?{id:"cursorLeft",title:"Move cursor left"}:void 0}});return{suggestions,incomplete:response.incomplete_list}}})},"./frontend/src/lib/monaco/hogQLMetadataProvider.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>hogQLMetadataProvider});let hogQLMetadataProvider=()=>({provideCodeActions:(model,_range,context)=>{let logic=model.codeEditorLogic;if(logic?.isMounted()){let markersFromMonaco=context.markers,markersFromMetadata=logic.values.modelMarkers,quickFixes=[];for(let activeMarker of markersFromMonaco){let start=model.getOffsetAt({column:activeMarker.startColumn,lineNumber:activeMarker.startLineNumber}),end=model.getOffsetAt({column:activeMarker.endColumn,lineNumber:activeMarker.endLineNumber});for(let rawMarker of markersFromMetadata)rawMarker.hogQLFix&&rawMarker.start<=end&&rawMarker.end>=start&&quickFixes.push({title:`Replace with: ${rawMarker.hogQLFix}`,diagnostics:[rawMarker],kind:"quickfix",edit:{edits:[{resource:model.uri,textEdit:{range:rawMarker,text:rawMarker.hogQLFix},versionId:void 0}]},isPreferred:!0})}return{actions:quickFixes,dispose:()=>{}}}}})},"./frontend/src/lib/monaco/languages/hog.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{CW:()=>initHogLanguage,aK:()=>conf,dK:()=>language});var lib_monaco_hogQLAutocompleteProvider__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/monaco/hogQLAutocompleteProvider.ts"),lib_monaco_hogQLMetadataProvider__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/monaco/hogQLMetadataProvider.tsx"),monaco_editor__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/monaco-editor@0.49.0/node_modules/monaco-editor/esm/vs/editor/editor.main.js"),_queries_schema__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/schema.ts");let conf=()=>({wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:monaco_editor__WEBPACK_IMPORTED_MODULE_1__.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:RegExp("^\\s*//\\s*#?region\\b"),end:RegExp("^\\s*//\\s*#?endregion\\b")}}}),language=()=>({defaultToken:"invalid",tokenPostfix:".hog",keywords:["fn","let","if","else","return","true","false","null","for","while","like","ilike","not","and","or","in"],operators:["<=",">=","==","!=","=>","+","-","**","*","/","%","<<",">",">>>","&","|","^","!","~","||","??","?",":","=",":=","+=","-=","*=","*=~","!=","!=~"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"type.identifier.invalid"],[/'([^'\\]|\\.)*$/,"type.identifier.invalid"],[/"/,"type.identifier","@string_double"],[/`/,"type.identifier","@string_backtick"],[/f'/,"string","@string_format"],[/'/,"string","@string_single"],[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/--.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string_double:[[/[^\\"]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/"/,"type.identifier","@pop"]],string_backtick:[[/[^\\`]+/,"type.identifier"],[/@escapes/,"type.identifier.escape"],[/\\./,"type.identifier.escape.invalid"],[/`/,"type.identifier","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_format:[[/\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\'{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}});function initHogLanguage(monaco){monaco.languages.getLanguages().some(_ref=>{let{id}=_ref;return"hog"===id})||(monaco.languages.register({id:"hog",extensions:[".hog"],mimetypes:["application/hog"]}),monaco.languages.setLanguageConfiguration("hog",conf()),monaco.languages.setMonarchTokensProvider("hog",language()),monaco.languages.registerCompletionItemProvider("hog",(0,lib_monaco_hogQLAutocompleteProvider__WEBPACK_IMPORTED_MODULE_0__.B)(_queries_schema__WEBPACK_IMPORTED_MODULE_2__.oU.hog)),monaco.languages.registerCodeActionProvider("hog",(0,lib_monaco_hogQLMetadataProvider__WEBPACK_IMPORTED_MODULE_3__.G)()))}},"./frontend/src/lib/taxonomy.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IR:()=>CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS,NV:()=>getCoreFilterDefinition,Q3:()=>POSTHOG_EVENT_PROMOTED_PROPERTIES,R6:()=>getFilterLabel,dA:()=>CORE_FILTER_DEFINITIONS_BY_GROUP,jA:()=>isCoreFilter,t_:()=>PROPERTY_KEYS});var _components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let PERSON_PROPERTIES_ADAPTED_FROM_EVENT=new Set(["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_version","$referring_domain","$referrer","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"]),SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS=new Set(["$referring_domain","utm_source","utm_campaign","utm_medium","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"]),CORE_FILTER_DEFINITIONS_BY_GROUP={events:{"":{label:"All events",description:"This is a wildcard that matches all events."},$pageview:{label:"Pageview",description:"When a user loads (or reloads) a page."},$pageleave:{label:"Pageleave",description:"When a user leaves a page."},$autocapture:{label:"Autocapture",description:"User interactions that were automatically captured.",examples:["clicked button"]},$$heatmap:{label:"Heatmap",description:"Heatmap events carry heatmap data to the backend, they do not contribute to event counts."},$copy_autocapture:{label:"Clipboard autocapture",description:"Selected text automatically captured when a user copies or cuts."},$screen:{label:"Screen",description:"When a user loads a screen in a mobile app."},$set:{label:"Set",description:"Setting person properties."},$opt_in:{label:"Opt In",description:"When a user opts into analytics."},$feature_flag_called:{label:"Feature Flag Called",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["The feature flag that was called.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),'Warning! This only works in combination with the $feature_flag event. If you want to filter other events, try "Active Feature Flags".']}),examples:["beta-feature"]},$feature_view:{label:"Feature View",description:"When a user views a feature."},$feature_interaction:{label:"Feature Interaction",description:"When a user interacts with a feature."},$feature_enrollment_update:{label:"Feature Enrollment",description:"When a user enrolls with a feature."},$capture_metrics:{label:"Capture Metrics",description:"Metrics captured with values pertaining to your systems at a specific point in time"},$identify:{label:"Identify",description:"A user has been identified with properties"},$create_alias:{label:"Alias",description:"An alias ID has been added to a user"},$merge_dangerously:{label:"Merge",description:"An alias ID has been added to a user"},$groupidentify:{label:"Group Identify",description:"A group has been identified with properties"},$rageclick:{label:"Rageclick",description:"A user has rapidly and repeatedly clicked in a single place"},$dead_click:{label:"Dead click",description:"A user has clicked on something that is probably not clickable"},$exception:{label:"Exception",description:"Exceptions - an error or unexpected event in your application"},$web_vitals:{label:"Web Vitals",description:"Automatically captured web vitals data"},"Application Opened":{label:"Application Opened",description:"When a user opens the mobile app either for the first time or from the foreground."},"Application Backgrounded":{label:"Application Backgrounded",description:"When a user puts the mobile app in the background."},"Application Updated":{label:"Application Updated",description:"When a user upgrades mobile the app."},"Application Installed":{label:"Application Installed",description:"When a user installs mobile the app."},"Application Became Active":{label:"Application Became Active",description:"When a user puts the mobile app in the foreground."},"Deep Link Opened":{label:"Deep Link Opened",description:"When a user opens the mobile app via a deep link."}},elements:{tag_name:{label:"Tag Name",description:"HTML tag name of the element which you want to filter.",examples:["a","button","input"]},selector:{label:"CSS Selector",description:"Select any element by CSS selector.",examples:["div > a","table td:nth-child(2)",".my-class"]},text:{label:"Text",description:"Filter on the inner text of the HTML element."},href:{label:"Target (href)",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["Filter on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"href"})," attribute of the element."]}),examples:["https://posthog.com/about"]}},metadata:{distinct_id:{label:"Distinct ID",description:"The current distinct ID of the user.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"]},timestamp:{label:"Timestamp",description:"Time the event happened.",examples:["2023-05-20T15:30:00Z"],system:!0},event:{label:"Event",description:"The name of the event.",examples:["$pageview"],system:!0}},event_properties:{distinct_id:{},$session_duration:{},$copy_type:{label:"Copy Type",description:"Type of copy event.",examples:["copy","cut"]},$selected_content:{label:"Copied content",description:"The content that was selected when the user copied or cut."},$set:{label:"Set",description:"Person properties to be set"},$set_once:{label:"Set Once",description:"Person properties to be set if not set already (i.e. first-touch)"},$pageview_id:{label:"Pageview ID",description:"PostHog's internal ID for matching events to a pageview.",system:!0},$autocapture_disabled_server_side:{label:"Autocapture Disabled Server-Side",description:"If autocapture has been disabled server-side.",system:!0},$feature_flag_payloads:{label:"Feature Flag Payloads",description:"Feature flag payloads active in the environment."},$capture_failed_request:{label:"Capture Failed Request",description:""},$lib_rate_limit_remaining_tokens:{label:"Clientside rate limit remaining tokens",description:"Remaining rate limit tokens for the posthog-js library client-side rate limiting implementation.",examples:["100"]},token:{label:"Token",description:"Token used for authentication.",examples:["ph_abcdefg"]},$ce_version:{label:"$ce_version",description:"",system:!0},$anon_distinct_id:{label:"Anon Distinct ID",description:"If the user was previously anonymous, their anonymous ID will be set here.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],system:!0},$event_type:{label:"Event Type",description:"When the event is an $autocapture event, this specifies what the action was against the element.",examples:["click","submit","change"]},$insert_id:{label:"Insert ID",description:"Unique insert ID for the event.",system:!0},$time:{label:"$time (deprecated)",description:"Use the HogQL field `timestamp` instead. This field was previously set on some client side events.",system:!0,examples:["1681211521.345"]},$device_id:{label:"Device ID",description:"Unique ID for that device, consistent even if users are logging in/out.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"],system:!0},$browser_type:{label:"Browser Type",description:"This is only added when posthog-js config.opt_out_useragent_filter is true.",examples:["browser","bot"]},$replay_minimum_duration:{label:"Replay config - minimum duration",description:"Config for minimum duration before emitting a session recording.",examples:["1000"]},$replay_sample_rate:{label:"Replay config - sample rate",description:"Config for sampling rate of session recordings.",examples:["0.1"]},$console_log_recording_enabled_server_side:{label:"Console Log Recording Enabled Server-Side",description:"If console log recording has been enabled server-side.",system:!0},$session_recording_recorder_version_server_side:{label:"Session Recording Recorder Version Server-Side",description:"The version of the session recording recorder that is enabled server-side.",examples:["v2"],system:!0},$session_recording_start_reason:{label:"Session recording start reason",description:"Reason for starting the session recording. Useful for e.g. if you have sampling enabled and want to see on batch exported events which sessions have recordings available.",examples:["sampling_override","recording_initialized","linked_flag_match"]},$session_recording_canvas_recording:{label:"Session recording canvas recording",description:"Session recording canvas capture config.",examples:['{"enabled": false}']},$session_recording_network_payload_capture:{label:"Session recording network payload capture",description:"Session recording network payload capture config.",examples:['{"recordHeaders": false}']},$configured_session_timeout_ms:{label:"Configured session timeout",description:"Configured session timeout in milliseconds.",examples:["1800000"]},$replay_script_config:{label:"Replay script config",description:"Sets an alternative recorder script for the web sdk.",examples:['{"script": "recorder-next""}']},$session_recording_url_trigger_activated_session:{label:"Session recording URL trigger activated session",description:"Session recording URL trigger activated session config. Used by posthog-js to track URL activation of session replay."},$session_recording_url_trigger_status:{label:"Session recording URL trigger status",description:"Session recording URL trigger status. Used by posthog-js to track URL activation of session replay."},$recording_status:{label:"Session recording status",description:"The status of session recording at the time the event was captured"},$cymbal_errors:{label:"Exception processing errors",description:"Errors encountered while trying to process exceptions",system:!0},$exception_list:{label:"Exception list",description:"List of one or more associated exceptions"},$sentry_exception:{label:"Sentry exception",description:"Raw Sentry exception data",system:!0},$sentry_exception_message:{label:"Sentry exception message"},$sentry_exception_type:{label:"Sentry exception type",description:"Class name of the exception object"},$sentry_tags:{label:"Sentry tags",description:"Tags sent to Sentry along with the exception"},$exception_type:{label:"Exception type",description:'Exception categorized into types. E.g. "Error"'},$exception_message:{label:"Exception Message",description:"The message detected on the error."},$exception_source:{label:"Exception source",description:"The source of the exception. E.g. JS file."},$exception_lineno:{label:"Exception source line number",description:"Which line in the exception source that caused the exception."},$exception_colno:{label:"Exception source column number",description:"Which column of the line in the exception source that caused the exception."},$exception_DOMException_code:{label:"DOMException code",description:"If a DOMException was thrown, it also has a DOMException code."},$exception_is_synthetic:{label:"Exception is synthetic",description:"Whether this was detected as a synthetic exception"},$exception_stack_trace_raw:{label:"Exception raw stack trace",description:"The exception's stack trace, as a string."},$exception_handled:{label:"Exception was handled",description:"Whether this was a handled or unhandled exception"},$exception_personURL:{label:"Exception person URL",description:"The PostHog person that experienced the exception"},$exception_capture_endpoint:{label:"Exception capture endpoint",description:"Endpoint used by posthog-js exception autocapture.",examples:["/e/"]},$exception_capture_endpoint_suffix:{label:"Exception capture endpoint",description:"Endpoint used by posthog-js exception autocapture.",examples:["/e/"]},$exception_capture_enabled_server_side:{label:"Exception capture enabled server side",description:"Whether exception autocapture was enabled in remote config."},$geoip_city_name:{label:"City Name",description:"Name of the city matched to this event's IP address.",examples:["Sydney","Chennai","Brooklyn"]},$geoip_country_name:{label:"Country Name",description:"Name of the country matched to this event's IP address.",examples:["Australia","India","United States"]},$geoip_country_code:{label:"Country Code",description:"Code of the country matched to this event's IP address.",examples:["AU","IN","US"]},$geoip_continent_name:{label:"Continent Name",description:"Name of the continent matched to this event's IP address.",examples:["Oceania","Asia","North America"]},$geoip_continent_code:{label:"Continent Code",description:"Code of the continent matched to this event's IP address.",examples:["OC","AS"," NA"]},$geoip_postal_code:{label:"Postal Code",description:"Approximated postal code matched to this event's IP address.",examples:["2000","600004","11211"]},$geoip_latitude:{label:"Latitude",description:"Approximated latitude matched to this event's IP address.",examples:["-33.8591","13.1337","40.7"]},$geoip_longitude:{label:"Longitude",description:"Approximated longitude matched to this event's IP address.",examples:["151.2","80.8008","-73.9"]},$geoip_time_zone:{label:"Timezone",description:"Timezone matched to this event's IP address.",examples:["Australia/Sydney","Asia/Kolkata","America/New_York"]},$geoip_subdivision_1_name:{label:"Subdivision 1 Name",description:"Name of the subdivision matched to this event's IP address.",examples:["New South Wales","Tamil Nadu","New York"]},$geoip_subdivision_1_code:{label:"Subdivision 1 Code",description:"Code of the subdivision matched to this event's IP address.",examples:["NSW","TN","NY"]},$geoip_subdivision_2_name:{label:"Subdivision 2 Name",description:"Name of the second subdivision matched to this event's IP address."},$geoip_subdivision_2_code:{label:"Subdivision 2 Code",description:"Code of the second subdivision matched to this event's IP address."},$geoip_subdivision_3_name:{label:"Subdivision 3 Name",description:"Name of the third subdivision matched to this event's IP address."},$geoip_subdivision_3_code:{label:"Subdivision 3 Code",description:"Code of the third subdivision matched to this event's IP address."},$geoip_disable:{label:"GeoIP Disabled",description:"Whether to skip GeoIP processing for the event."},$geoip_city_confidence:{label:"GeoIP detection city confidence",description:"Confidence level of the city matched to this event's IP address.",examples:["0.5"]},$geoip_country_confidence:{label:"GeoIP detection country confidence",description:"Confidence level of the country matched to this event's IP address.",examples:["0.5"]},$geoip_accuracy_radius:{label:"GeoIP detection accuracy radius",description:"Accuracy radius of the location matched to this event's IP address.",examples:["50"]},$geoip_subdivision_1_confidence:{label:"GeoIP detection subdivision 1 confidence",description:"Confidence level of the first subdivision matched to this event's IP address.",examples:["0.5"]},$el_text:{label:"Element Text",description:"The text of the element that was clicked. Only sent with Autocapture events.",examples:["Click here!"]},$app_build:{label:"App Build",description:"The build number for the app."},$app_name:{label:"App Name",description:"The name of the app."},$app_namespace:{label:"App Namespace",description:"The namespace of the app as identified in the app store.",examples:["com.posthog.app"]},$app_version:{label:"App Version",description:"The version of the app."},$device_manufacturer:{label:"Device Manufacturer",description:"The manufacturer of the device",examples:["Apple","Samsung"]},$is_emulator:{label:"Is Emulator",description:"Indicates whether the app is running on an emulator or a physical device",examples:["true","false"]},$device_name:{label:"Device Name",description:"Name of the device",examples:["iPhone 12 Pro","Samsung Galaxy 10"]},$locale:{label:"Locale",description:"The locale of the device",examples:["en-US","de-DE"]},$os_name:{label:"OS Name",description:"The Operating System name",examples:["iOS","Android"]},$os_version:{label:"OS Version",description:"The Operating System version.",examples:["15.5"]},$timezone:{label:"Timezone",description:"The timezone as reported by the device"},$touch_x:{label:"Touch X",description:"The location of a Touch event on the X axis"},$touch_y:{label:"Touch Y",description:"The location of a Touch event on the Y axis"},$plugins_succeeded:{label:"Plugins Succeeded",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins that successfully processed the event, e.g. edited properties (plugin method"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"processEvent"}),")."]})},$groups:{label:"Groups",description:"Relevant groups"},$group_0:{label:"Group 1",system:!0},$group_1:{label:"Group 2",system:!0},$group_2:{label:"Group 3",system:!0},$group_3:{label:"Group 4",system:!0},$group_4:{label:"Group 5",system:!0},$group_set:{label:"Group Set",description:"Group properties to be set"},$group_key:{label:"Group Key",description:"Specified group key"},$group_type:{label:"Group Type",description:"Specified group type"},$window_id:{label:"Window ID",description:"Unique window ID for session recording disambiguation",system:!0},$session_id:{label:"Session ID",description:"Unique session ID for session recording disambiguation",system:!0},$plugins_failed:{label:"Plugins Failed",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins that failed to process the event (plugin method ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"processEvent"}),")."]})},$plugins_deferred:{label:"Plugins Deferred",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["Plugins to which the event was handed off post-ingestion, e.g. for export (plugin method"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"onEvent"}),")."]})},$$plugin_metrics:{label:"Plugin Metric",description:"Performance metrics for a given plugin."},$creator_event_uuid:{label:"Creator Event ID",description:"Unique ID for the event, which created this person.",examples:["16ff262c4301e5-0aa346c03894bc-39667c0e-1aeaa0-16ff262c431767"]},utm_source:{label:"UTM Source",description:"UTM source tag.",examples:["Google","Bing","Twitter","Facebook"]},$initial_utm_source:{label:"Initial UTM Source",description:"UTM source tag.",examples:["Google","Bing","Twitter","Facebook"]},utm_medium:{label:"UTM Medium",description:"UTM medium tag.",examples:["Social","Organic","Paid","Email"]},utm_campaign:{label:"UTM Campaign",description:"UTM campaign tag.",examples:["feature launch","discount"]},utm_name:{label:"UTM Name",description:"UTM campaign tag, sent via Segment.",examples:["feature launch","discount"]},utm_content:{label:"UTM Content",description:"UTM content tag.",examples:["bottom link","second button"]},utm_term:{label:"UTM Term",description:"UTM term tag.",examples:["free goodies"]},$performance_page_loaded:{label:"Page Loaded",description:"The time taken until the browser's page load event in milliseconds."},$performance_raw:{label:"Browser Performance",description:"The browser performance entries for navigation (the page), paint, and resources. That were available when the page view event fired",system:!0},$had_persisted_distinct_id:{label:"$had_persisted_distinct_id",description:"",system:!0},$sentry_event_id:{label:"Sentry Event ID",description:"This is the Sentry key for an event.",examples:["byroc2ar9ee4ijqp"],system:!0},$timestamp:{label:"Timestamp (deprecated)",description:"Use the HogQL field `timestamp` instead. This field was previously set on some client side events.",examples:["2023-05-20T15:30:00Z"],system:!0},$sent_at:{label:"Sent At",description:"Time the event was sent to PostHog. Used for correcting the event timestamp when the device clock is off.",examples:[new Date().toISOString()]},$browser:{label:"Browser",description:"Name of the browser the user has used.",examples:["Chrome","Firefox"]},$os:{label:"OS",description:"The operating system of the user.",examples:["Windows","Mac OS X"]},$browser_language:{label:"Browser Language",description:"Language.",examples:["en","en-US","cn","pl-PL"]},$current_url:{label:"Current URL",description:"The URL visited at the time of the event.",examples:["https://example.com/interesting-article?parameter=true"]},$browser_version:{label:"Browser Version",description:"The version of the browser that was used. Used in combination with Browser.",examples:["70","79"]},$raw_user_agent:{label:"Raw User Agent",description:"PostHog process information like browser, OS, and device type from the user agent string. This is the raw user agent string.",examples:["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)"]},$user_agent:{label:"Raw User Agent",description:"Some SDKs (like Android) send the raw user agent as $user_agent.",examples:["Dalvik/2.1.0 (Linux; U; Android 11; Pixel 3 Build/RQ2A.210505.002)"]},$screen_height:{label:"Screen Height",description:"The height of the user's entire screen (in pixels).",examples:["2160","1050"]},$screen_width:{label:"Screen Width",description:"The width of the user's entire screen (in pixels).",examples:["1440","1920"]},$screen_name:{label:"Screen Name",description:"The name of the active screen."},$viewport_height:{label:"Viewport Height",description:"The height of the user's actual browser window (in pixels).",examples:["2094","1031"]},$viewport_width:{label:"Viewport Width",description:"The width of the user's actual browser window (in pixels).",examples:["1439","1915"]},$lib:{label:"Library",description:"What library was used to send the event.",examples:["web","posthog-ios"]},$lib_custom_api_host:{label:"Library Custom API Host",description:"The custom API host used to send the event.",examples:["https://ph.example.com"]},$lib_version:{label:"Library Version",description:"Version of the library used to send the event. Used in combination with Library.",examples:["1.0.3"]},$lib_version__major:{label:"Library Version (Major)",description:"Major version of the library used to send the event.",examples:[1]},$lib_version__minor:{label:"Library Version (Minor)",description:"Minor version of the library used to send the event.",examples:[0]},$lib_version__patch:{label:"Library Version (Patch)",description:"Patch version of the library used to send the event.",examples:[3]},$referrer:{label:"Referrer URL",description:"URL of where the user came from.",examples:["https://google.com/search?q=posthog&rlz=1C..."]},$referring_domain:{label:"Referring Domain",description:"Domain of where the user came from.",examples:["google.com","facebook.com"]},$user_id:{label:"User ID",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["This variable will be set to the distinct ID if you've called"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("pre",{className:"inline",children:"posthog.identify('distinct id')"}),". If the user is anonymous, it'll be empty."]})},$ip:{label:"IP Address",description:"IP address for this user when the event was sent.",examples:["203.0.113.0"]},$host:{label:"Host",description:"The hostname of the Current URL.",examples:["example.com","localhost:8000"]},$pathname:{label:"Path Name",description:"The path of the Current URL, which means everything in the url after the domain.",examples:["/pricing","/about-us/team"]},$search_engine:{label:"Search Engine",description:"The search engine the user came in from (if any).",examples:["Google","DuckDuckGo"]},$active_feature_flags:{label:"Active Feature Flags",description:"Keys of the feature flags that were active while this event was sent.",examples:["['beta-feature']"]},$enabled_feature_flags:{label:"Enabled Feature Flags",description:"Keys and multivariate values of the feature flags that were active while this event was sent.",examples:['{"flag": "value"}']},$feature_flag_response:{label:"Feature Flag Response",description:"What the call to feature flag responded with.",examples:["true","false"]},$feature_flag_payload:{label:"Feature Flag Response Payload",description:"The JSON payload that the call to feature flag responded with (if any)",examples:['{"variant": "test"}']},$feature_flag:{label:"Feature Flag",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:["The feature flag that was called.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),'Warning! This only works in combination with the $feature_flag_called event. If you want to filter other events, try "Active Feature Flags".']}),examples:["beta-feature"]},$survey_response:{label:"Survey Response",description:"The response value for the first question in the survey.",examples:["I love it!",5,"['choice 1', 'choice 3']"]},$survey_name:{label:"Survey Name",description:"The name of the survey.",examples:["Product Feedback for New Product","Home page NPS"]},$survey_questions:{label:"Survey Questions",description:"The questions asked in the survey."},$survey_id:{label:"Survey ID",description:"The unique identifier for the survey."},$survey_iteration:{label:"Survey Iteration Number",description:"The iteration number for the survey."},$survey_iteration_start_date:{label:"Survey Iteration Start Date",description:"The start date for the current iteration of the survey."},$device:{label:"Device",description:"The mobile device that was used.",examples:["iPad","iPhone","Android"]},$sentry_url:{label:"Sentry URL",description:"Direct link to the exception in Sentry",examples:["https://sentry.io/..."]},$device_type:{label:"Device Type",description:"The type of device that was used.",examples:["Mobile","Tablet","Desktop"]},$screen_density:{label:"Screen density",description:'The logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen), providing the baseline of the system\'s display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc.',examples:[2.75]},$device_model:{label:"Device Model",description:"The model of the device that was used.",examples:["iPhone9,3","SM-G965W"]},$network_wifi:{label:"Network WiFi",description:"Whether the user was on WiFi when the event was sent.",examples:["true","false"]},$network_bluetooth:{label:"Network Bluetooth",description:"Whether the user was on Bluetooth when the event was sent.",examples:["true","false"]},$network_cellular:{label:"Network Cellular",description:"Whether the user was on cellular when the event was sent.",examples:["true","false"]},$client_session_initial_referring_host:{label:"Referrer Host",description:"Host that the user came from. (First-touch, session-scoped)",examples:["google.com","facebook.com"]},$client_session_initial_pathname:{label:"Initial Path",description:"Path that the user started their session on. (First-touch, session-scoped)",examples:["/register","/some/landing/page"]},$client_session_initial_utm_source:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["Google","Bing","Twitter","Facebook"]},$client_session_initial_utm_campaign:{label:"Initial UTM Campaign",description:"UTM Campaign. (First-touch, session-scoped)",examples:["feature launch","discount"]},$client_session_initial_utm_medium:{label:"Initial UTM Medium",description:"UTM Medium. (First-touch, session-scoped)",examples:["Social","Organic","Paid","Email"]},$client_session_initial_utm_content:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["bottom link","second button"]},$client_session_initial_utm_term:{label:"Initial UTM Source",description:"UTM Source. (First-touch, session-scoped)",examples:["free goodies"]},$network_carrier:{label:"Network Carrier",description:"The network carrier that the user is on.",examples:["cricket","telecom"]},from_background:{label:"From Background",description:"Whether the app was opened for the first time or from the background.",examples:["true","false"]},url:{label:"URL",description:"The deep link URL that the app was opened from.",examples:["https://open.my.app"]},referring_application:{label:"Referrer Application",description:"The namespace of the app that made the request.",examples:["com.posthog.app"]},version:{label:"App Version",description:"The version of the app",examples:["1.0.0"]},previous_version:{label:"App Previous Version",description:"The previous version of the app",examples:["1.0.0"]},build:{label:"App Build",description:"The build number for the app",examples:["1"]},previous_build:{label:"App Previous Build",description:"The previous build number for the app",examples:["1"]},gclid:{label:"gclid",description:"Google Click ID"},rdt_cid:{label:"rdt_cid",description:"Reddit Click ID"},gad_source:{label:"gad_source",description:"Google Ads Source"},gclsrc:{label:"gclsrc",description:"Google Click Source"},dclid:{label:"dclid",description:"DoubleClick ID"},gbraid:{label:"gbraid",description:"Google Ads, web to app"},wbraid:{label:"wbraid",description:"Google Ads, app to web"},fbclid:{label:"fbclid",description:"Facebook Click ID"},msclkid:{label:"msclkid",description:"Microsoft Click ID"},twclid:{label:"twclid",description:"Twitter Click ID"},li_fat_id:{label:"li_fat_id",description:"LinkedIn First-Party Ad Tracking ID"},mc_cid:{label:"mc_cid",description:"Mailchimp Campaign ID"},igshid:{label:"igshid",description:"Instagram Share ID"},ttclid:{label:"ttclid",description:"TikTok Click ID"},$is_identified:{label:"Is Identified",description:"When the person was identified"},$initial_person_info:{label:"Initial Person Info",description:"posthog-js initial person information. used in the $set_once flow"},$web_vitals_enabled_server_side:{label:"Web vitals enabled server side",description:"Whether web vitals was enabled in remote config"},$web_vitals_FCP_event:{label:"Web vitals FCP measure event details"},$web_vitals_FCP_value:{label:"Web vitals FCP value"},$web_vitals_LCP_event:{label:"Web vitals LCP measure event details"},$web_vitals_LCP_value:{label:"Web vitals LCP value"},$web_vitals_INP_event:{label:"Web vitals INP measure event details"},$web_vitals_INP_value:{label:"Web vitals INP value"},$web_vitals_CLS_event:{label:"Web vitals CLS measure event details"},$web_vitals_CLS_value:{label:"Web vitals CLS value"},$web_vitals_allowed_metrics:{label:"Web vitals allowed metrics",description:"Allowed web vitals metrics config.",examples:['["LCP", "CLS"]']},$prev_pageview_last_scroll:{label:"Previous pageview last scroll",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",examples:[0]},$prev_pageview_last_scroll_percentage:{label:"Previous pageview last scroll percentage",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",examples:[0]},$prev_pageview_max_scroll:{examples:[0],label:"Previous pageview max scroll",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_max_scroll_percentage:{examples:[0],label:"Previous pageview max scroll percentage",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_last_content:{examples:[0],label:"Previous pageview last content",description:"posthog-js adds these to the page leave event, they are used in web analytics calculations"},$prev_pageview_last_content_percentage:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview last content percentage"},$prev_pageview_max_content:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview max content"},$prev_pageview_max_content_percentage:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview max content percentage"},$prev_pageview_pathname:{examples:["/pricing","/about-us/team"],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview pathname"},$prev_pageview_duration:{examples:[0],description:"posthog-js adds these to the page leave event, they are used in web analytics calculations",label:"Previous pageview duration"},$surveys_activated:{label:"Surveys Activated",description:"The surveys that were activated for this event."},$process_person_profile:{label:"Person Profile processing flag",description:"The setting from an SDK to control whether an event has person processing enabled"},$dead_clicks_enabled_server_side:{label:"Dead clicks enabled server side",description:"Whether dead clicks were enabled in remote config"},$dead_click_scroll_delay_ms:{label:"Dead click scroll delay in milliseconds",description:"The delay between a click and the next scroll event"},$dead_click_mutation_delay_ms:{label:"Dead click mutation delay in milliseconds",description:"The delay between a click and the next mutation event"},$dead_click_absolute_delay_ms:{label:"Dead click absolute delay in milliseconds",description:"The delay between a click and having seen no activity at all"},$dead_click_selection_changed_delay_ms:{label:"Dead click selection changed delay in milliseconds",description:"The delay between a click and the next text selection change event"},$dead_click_last_mutation_timestamp:{label:"Dead click last mutation timestamp",description:"debug signal time of the last mutation seen by dead click autocapture"},$dead_click_event_timestamp:{label:"Dead click event timestamp",description:"debug signal time of the event that triggered dead click autocapture"},$dead_click_scroll_timeout:{label:"Dead click scroll timeout",description:"whether the dead click autocapture passed the threshold for waiting for a scroll event"},$dead_click_mutation_timeout:{label:"Dead click mutation timeout",description:"whether the dead click autocapture passed the threshold for waiting for a mutation event"},$dead_click_absolute_timeout:{label:"Dead click absolute timeout",description:"whether the dead click autocapture passed the threshold for waiting for any activity"},$dead_click_selection_changed_timeout:{label:"Dead click selection changed timeout",description:"whether the dead click autocapture passed the threshold for waiting for a text selection change event"}},numerical_event_properties:{},person_properties:{},session_properties:{$session_duration:{label:"Session duration",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:["The duration of the session being tracked. Learn more about how PostHog tracks sessions in"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_1__.r,{to:"https://posthog.com/docs/user-guides/sessions",children:"our documentation."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),"Note, if the duration is formatted as a single number (not 'HH:MM:SS'), it's in seconds."]}),examples:["01:04:12"]},$start_timestamp:{label:"Start timestamp",description:"The timestamp of the first event from this session.",examples:[new Date().toISOString()]},$end_timestamp:{label:"End timestamp",description:"The timestamp of the last event from this session",examples:[new Date().toISOString()]},$entry_current_url:{label:"Entry URL",description:"The first URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$entry_pathname:{label:"Entry pathname",description:"The first pathname visited in this session.",examples:["/interesting-article?parameter=true"]},$end_current_url:{label:"Entry URL",description:"The first URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$end_pathname:{label:"Entry pathname",description:"The first pathname visited in this session.",examples:["/interesting-article?parameter=true"]},$exit_current_url:{label:"Exit URL",description:"The last URL visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$exit_pathname:{label:"Exit pathname",description:"The last pathname visited in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$pageview_count:{label:"Pageview count",description:"The number of page view events in this session.",examples:["123"]},$autocapture_count:{label:"Autocapture count",description:"The number of autocapture events in this session.",examples:["123"]},$screen_count:{label:"Screen count",description:"The number of screen events in this session.",examples:["123"]},$channel_type:{label:"Channel type",description:"What type of acquisition channel this traffic came from.",examples:["Paid Search","Organic Video","Direct"]},$is_bounce:{label:"Is bounce",description:"Whether the session was a bounce.",examples:["true","false"]},$last_external_click_url:{label:"Last external click URL",description:"The last external URL clicked in this session.",examples:["https://example.com/interesting-article?parameter=true"]},$vitals_lcp:{label:"Web vitals LCP",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span",{children:"The time it took for the Largest Contentful Paint on the page. This captures the perceived load time of the page, and measure how long it took for the main content of the page to be visible to users."}),examples:["2.2"]}},groups:{$group_key:{label:"Group Key",description:"Specified group key"}},replay:{snapshot_source:{label:"Platform",description:"Platform the session was recorded on",examples:["web","mobile"]},console_log_level:{label:"Log level",description:"Level of console logs captured",examples:["info","warn","error"]},console_log_query:{label:"Console log",description:"Text of console logs captured"},visited_page:{label:"Visited page",description:"URL a user visited during their session"},click_count:{label:"Clicks",description:"Number of clicks during the session"},keypress_count:{label:"Key presses",description:"Number of key presses during the session"},console_error_count:{label:"Errors",description:"Number of console errors during the session"}},log_entries:{level:{label:"Console log level",description:"Level of the ",examples:["info","warn","error"]},message:{label:"Console log message",description:"The contents of the log message"}}};for(let[key,value]of(CORE_FILTER_DEFINITIONS_BY_GROUP.numerical_event_properties=CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties,CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties.distinct_id=CORE_FILTER_DEFINITIONS_BY_GROUP.metadata.distinct_id,Object.entries(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties)))PERSON_PROPERTIES_ADAPTED_FROM_EVENT.has(key)||key.startsWith("$geoip_")?(CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[key]={...value,label:`Latest ${value.label}`,description:"description"in value?`${value.description} Data from the last time this user was seen.`:"Data from the last time this user was seen."},CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[`$initial_${key.replace(/^\$/,"")}`]={...value,label:`Initial ${value.label}`,description:"description"in value?`${value.description} Data from the first time this user was seen.`:"Data from the first time this user was seen."}):CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties[key]=value,SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS.has(key)&&(CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties[`$entry_${key.replace(/^\$/,"")}`]={...value,label:`Entry ${value.label}`,description:"description"in value?`${value.description} Data from the first event in this session.`:"Data from the first event in this session."});CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties.$session_duration=CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties.$session_duration;let PROPERTY_KEYS=Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties),CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS=["billing_period_end","billing_period_start","current_amount_usd.data_warehouse","current_amount_usd.feature_flags","current_amount_usd.integrations","current_amount_usd.platform_and_support","current_amount_usd.product_analytics","current_amount_usd.session_replay","current_amount_usd.surveys","current_total_amount_usd","current_usage.data_warehouse","current_usage.feature_flags","current_usage.integrations","current_usage.platform_and_support","current_usage.product_analytics","current_usage.session_replay","current_usage.surveys","customer_deactivated","custom_limits.data_warehouse","custom_limits.feature_flags","custom_limits.integrations","custom_limits.platform_and_support","custom_limits.product_analytics","custom_limits.session_replay","custom_limits.surveys","custom_limits_usd.data_warehouse","custom_limits_usd.feature_flags","custom_limits_usd.integrations","custom_limits_usd.platform_and_support","custom_limits_usd.product_analytics","custom_limits_usd.session_replay","custom_limits_usd.surveys","free_allocation.data_warehouse","free_allocation.feature_flags","free_allocation.integrations","free_allocation.platform_and_support","free_allocation.product_analytics","free_allocation.session_replay","free_allocation.surveys","has_billing_plan","percentage_usage.data_warehouse","percentage_usage.feature_flags","percentage_usage.integrations","percentage_usage.platform_and_support","percentage_usage.product_analytics","percentage_usage.session_replay","percentage_usage.surveys","projected_usage.data_warehouse","projected_usage.feature_flags","projected_usage.integrations","projected_usage.platform_and_support","projected_usage.product_analytics","projected_usage.session_replay","projected_usage.surveys","unit_amount_usd.data_warehouse","unit_amount_usd.feature_flags","unit_amount_usd.integrations","unit_amount_usd.platform_and_support","unit_amount_usd.product_analytics","unit_amount_usd.session_replay","unit_amount_usd.surveys","usage_limit.data_warehouse","usage_limit.feature_flags","usage_limit.integrations","usage_limit.platform_and_support","usage_limit.product_analytics","usage_limit.session_replay","usage_limit.surveys","is_demo_project","realm","email_service_available","slack_service_available","commit_sha"],POSTHOG_EVENT_PROMOTED_PROPERTIES={$pageview:["$current_url","title","$referrer"],$pageleave:["$current_url","title","$referrer"],$groupidentify:["$group_type","$group_key","$group_set"],$screen:["$screen_name"],$web_vitals:["$web_vitals_FCP_value","$web_vitals_CLS_value","$web_vitals_INP_value","$web_vitals_LCP_value","$web_vitals_FCP_event","$web_vitals_CLS_event","$web_vitals_INP_event","$web_vitals_LCP_event"],$set:["$set","$set_once"]};function isCoreFilter(key){return Object.values(CORE_FILTER_DEFINITIONS_BY_GROUP).some(mapping=>Object.keys(mapping).includes(key))}function getCoreFilterDefinition(value,type){if(void 0==value)return null;value=value.toString();let isGroupTaxonomicFilterType=type.startsWith("groups_");if(type in CORE_FILTER_DEFINITIONS_BY_GROUP&&value in CORE_FILTER_DEFINITIONS_BY_GROUP[type])return{...CORE_FILTER_DEFINITIONS_BY_GROUP[type][value]};if(isGroupTaxonomicFilterType&&value in CORE_FILTER_DEFINITIONS_BY_GROUP[_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.GroupsPrefix])return{...CORE_FILTER_DEFINITIONS_BY_GROUP[_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.GroupsPrefix][value]};if(value.startsWith("$survey_responded/")){let surveyId=value.replace(/^\$survey_responded\//,"");if(surveyId)return{label:`Survey Responded: ${surveyId}`,description:`Whether the user responded to survey with ID: "${surveyId}".`}}else if(value.startsWith("$survey_dismissed/")){let surveyId=value.replace(/^\$survey_dismissed\//,"");if(surveyId)return{label:`Survey Dismissed: ${surveyId}`,description:`Whether the user dismissed survey with ID: "${surveyId}".`}}else if(value.startsWith("$survey_response_")){let surveyIndex=value.replace(/^\$survey_response_/,"");if(surveyIndex){let index=Number(surveyIndex)+1;return{label:`Survey Response Question ID: ${surveyIndex}`,description:`The response value for the ${index}${1===index?"st":2===index?"nd":3===index?"rd":"th"} question in the survey.`}}}else if(value.startsWith("$feature/")){let featureFlagKey=value.replace(/^\$feature\//,"");if(featureFlagKey)return{label:`Feature: ${featureFlagKey}`,description:`Value for the feature flag "${featureFlagKey}" when this event was sent.`,examples:["true","variant-1a"]}}else if(value.startsWith("$feature_enrollment/")){let featureFlagKey=value.replace(/^\$feature_enrollment\//,"");if(featureFlagKey)return{label:`Feature Enrollment: ${featureFlagKey}`,description:`Whether the user has opted into the "${featureFlagKey}" beta program.`,examples:["true","false"]}}else if(value.startsWith("$feature_interaction/")){let featureFlagKey=value.replace(/^\$feature_interaction\//,"");if(featureFlagKey)return{label:`Feature Interaction: ${featureFlagKey}`,description:`Whether the user has interacted with "${featureFlagKey}".`,examples:["true","false"]}}return null}function getFilterLabel(key,type){var _trim;let data=getCoreFilterDefinition(key,type);return null!==(_trim=(data?data.label:key)?.trim())&&void 0!==_trim?_trim:"(empty string)"}},"./frontend/src/lib/utils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$G:()=>truncate,$W:()=>hexToRGB,Ae:()=>areObjectValuesEmpty,Ao:()=>sampleOne,BB:()=>toString,BN:()=>fromParamsGivenUrl,BW:()=>gradateColor,Bm:()=>isExternalLink,C2:()=>median,C7:()=>function humanFriendlyDuration(d){let{maxUnits,secondsPrecision,secondsFixed}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(""===d||null==d||0===maxUnits)return"";if((d=Number(d))<0)return`-${humanFriendlyDuration(-d)}`;if(0===d)return"0s";if(d<1)return`${Math.round(1e3*d)}ms`;if(d<60)return null!=secondsPrecision?`${parseFloat(d.toPrecision(secondsPrecision))}s`:`${parseFloat(d.toFixed(null!=secondsFixed?secondsFixed:0))}s`;let days=Math.floor(d/86400),h=Math.floor(d%86400/3600),m=Math.floor(d%3600/60),s=Math.round(d%3600%60),hDisplay=h>0?h+"h":"",mDisplay=m>0?m+"m":"";return(days>0?[days>0?days+"d":"",hDisplay].filter(Boolean):[hDisplay,mDisplay,s>0?s+"s":hDisplay||mDisplay?"":"0s"].filter(Boolean)).slice(0,null!=maxUnits?maxUnits:void 0).join("\xa0")},CW:()=>dateFromToText,Cp:()=>humanFriendlyCurrency,Cy:()=>tryJsonParse,DX:()=>isNotNil,Dh:()=>colonDelimitedDuration,Ds:()=>debounce,E9:()=>hexToRGBA,FZ:()=>dateStringToDayJs,Fw:()=>RGBToRGBA,HD:()=>isString,IP:()=>isNonEmptyObject,JP:()=>compactNumber,J_:()=>isDate,Je:()=>isOperatorRange,Jh:()=>isEmail,Kl:()=>dateFilterToText,Kn:()=>isObject,Kx:()=>allOperatorsMapping,Lc:()=>humanFriendlyNumber,MD:()=>inStorybook,N:()=>isAbortedRequest,Nc:()=>getEventNamesForAction,O3:()=>clearDOMTextSelection,PX:()=>isURL,Pc:()=>isUserLoggedIn,Qr:()=>isEmptyObject,Rx:()=>getDefaultInterval,S8:()=>isOperatorRegex,Sh:()=>autoCaptureEventToDescription,Sm:()=>sum,Sv:()=>downloadFile,Tl:()=>idToKey,UV:()=>identifierToHuman,V5:()=>isMac,VV:()=>stripHTTP,Vj:()=>uuid,WU:()=>chooseOperatorMap,Wd:()=>PURPLE,XH:()=>ceilMsToClosestSecond,Y8:()=>average,ZH:()=>eventToDescription,Zi:()=>pluralize,_$:()=>lightenDarkenColor,_6:()=>is12HoursOrLess,_Q:()=>formatDateRange,ab:()=>isOperatorMulti,bE:()=>dateMapping,bH:()=>alphabet,bn:()=>isOperatorCohort,bo:()=>humanFriendlyDetailedTime,bv:()=>hasFormErrors,d$:()=>humanFriendlyLargeNumber,dD:()=>isDomain,dm:()=>isMultiSeriesFormula,e9:()=>percentage,es:()=>inStorybookTestRunner,eu:()=>colorForString,f2:()=>ensureStringIsNotBlank,fZ:()=>isLessThan2Days,fc:()=>RGBToHex,fm:()=>capitalizeFirstLetter,gw:()=>delay,h$:()=>base64Encode,h0:()=>objectsEqual,hO:()=>objectClean,ig:()=>shortTimeZone,iw:()=>parseGithubRepoURL,jU:()=>objectCleanWithEmpty,jb:()=>roundToDecimal,kE:()=>isNumeric,kK:()=>humanizeBytes,kS:()=>sortedKeys,ke:()=>BRAND_BLUE_HSL,lV:()=>slugify,lz:()=>isOperatorFlag,mG:()=>genericOperatorMap,mo:()=>hashCodeForString,mq:()=>midEllipsis,nj:()=>objectDiffShallow,o0:()=>formatDateTime,oZ:()=>toParams,ow:()=>calculateDays,p6:()=>formatDate,pQ:()=>updateDatesWithInterval,pg:()=>humanFriendlyMilliseconds,pt:()=>dateStringToComponents,q0:()=>UnexpectedNeverError,q7:()=>shouldIgnoreInput,q_:()=>base64ArrayBuffer,qr:()=>findLastIndex,rt:()=>resolveWebhookService,sd:()=>shouldCancelQuery,t2:()=>reverseColonDelimitedDuration,tB:()=>cohortOperatorMap,tK:()=>isGroupType,tV:()=>base64Decode,tc:()=>isOperatorDate,tq:()=>isMobile,uZ:()=>clamp,uw:()=>uniqueBy,uy:()=>promiseResolveReject,v2:()=>fullName,vM:()=>groupBy,w6:()=>range,wR:()=>toSentenceCase,x1:()=>humanList,z9:()=>DEFAULT_DECIMAL_PLACES});var _sentry_react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__),lib_colors__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/colors.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/types.ts"),_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/DateFilter/types.ts"),_utils_getAppContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts");function uuid(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,c=>(parseInt(c)^(void 0!==window?.crypto?window.crypto.getRandomValues(new Uint8Array(1))[0]:Math.floor(256*Math.random()))&15>>parseInt(c)/4).toString(16))}function areObjectValuesEmpty(obj){return!!obj&&"object"==typeof obj&&!Object.values(obj).some(x=>null!==x&&""!==x&&void 0!==x)}let humanizeBytes=fileSizeInBytes=>{if(null===fileSizeInBytes)return"";let i=-1,convertedBytes=fileSizeInBytes;do convertedBytes/=1024,i++;while(convertedBytes>1024)return convertedBytes<.1?fileSizeInBytes+" bytes":convertedBytes.toFixed(2)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][i]};function toSentenceCase(str){return str.replace(/\b\w/g,c=>c.toUpperCase())}function toParams(obj){let explodeArrays=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return obj?Object.entries(obj).filter(item=>void 0!=item[1]&&null!=item[1]).reduce((acc,_ref)=>{let[key,val]=_ref;return explodeArrays&&Array.isArray(val)?val.forEach(v=>acc.push([key,v])):acc.push([key,val]),acc},[]).map(_ref2=>{var val;let[key,val1]=_ref2;return`${key}=${val=val1,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(val)?encodeURIComponent(val.format("YYYY-MM-DD")):encodeURIComponent(val="object"==typeof val?JSON.stringify(val):val)}`}).join("&"):""}function fromParamsGivenUrl(url){return url?url.replace(/^\?/,"").split("&").reduce((paramsObject,paramString)=>{let[key,value]=paramString.split("=");return paramsObject[key]=decodeURIComponent(value),paramsObject},{}):{}}function percentage(division){let maximumFractionDigits=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,fixedPrecision=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return division===1/0?"∞%":division.toLocaleString("en-US",{style:"percent",maximumFractionDigits,minimumFractionDigits:fixedPrecision?maximumFractionDigits:void 0})}function capitalizeFirstLetter(string){return string.charAt(0).toUpperCase()+string.slice(1)}function fullName(props){return`${props.first_name||""} ${props.last_name||""}`.trim()}let genericOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",icontains:"∋ contains",not_icontains:"∌ doesn't contain",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",gt:"> greater than",lt:"< less than",is_set:"✓ is set",is_not_set:"✕ is not set"},stringOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",icontains:"∋ contains",not_icontains:"∌ doesn't contain",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",is_set:"✓ is set",is_not_set:"✕ is not set"},numericOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",regex:"∼ matches regex",not_regex:"≁ doesn't match regex",gt:"> greater than",lt:"< less than",is_set:"✓ is set",is_not_set:"✕ is not set"},dateTimeOperatorMap={is_date_exact:"= equals",is_date_before:"< before",is_date_after:"> after",is_set:"✓ is set",is_not_set:"✕ is not set"},booleanOperatorMap={exact:"= equals",is_not:"≠ doesn't equal",is_set:"✓ is set",is_not_set:"✕ is not set"},durationOperatorMap={gt:"> greater than",lt:"< less than"},selectorOperatorMap={exact:"= equals",is_not:"≠ doesn't equal"},cohortOperatorMap={in:"user in",not_in:"user not in"},allOperatorsMapping={exact:"Exactly",gte:"At least",lte:"At most (but at least once)",...dateTimeOperatorMap,...stringOperatorMap,...numericOperatorMap,...genericOperatorMap,...booleanOperatorMap,...durationOperatorMap,...selectorOperatorMap,...cohortOperatorMap},operatorMappingChoice={DateTime:dateTimeOperatorMap,String:stringOperatorMap,Numeric:numericOperatorMap,Boolean:booleanOperatorMap,Duration:durationOperatorMap,Selector:selectorOperatorMap,Cohort:cohortOperatorMap};function chooseOperatorMap(propertyType){let choice=genericOperatorMap;return propertyType&&(choice=operatorMappingChoice[propertyType]||genericOperatorMap),choice}function isOperatorMulti(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.Exact,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsNot].includes(operator)}function isOperatorFlag(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsNotSet,_types__WEBPACK_IMPORTED_MODULE_3__.WV.In,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotIn].includes(operator)}function isOperatorCohort(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.In,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotIn].includes(operator)}function isOperatorRegex(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.Regex,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotRegex].includes(operator)}function isOperatorRange(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.GreaterThan,_types__WEBPACK_IMPORTED_MODULE_3__.WV.GreaterThanOrEqual,_types__WEBPACK_IMPORTED_MODULE_3__.WV.LessThan,_types__WEBPACK_IMPORTED_MODULE_3__.WV.LessThanOrEqual,_types__WEBPACK_IMPORTED_MODULE_3__.WV.Between,_types__WEBPACK_IMPORTED_MODULE_3__.WV.NotBetween].includes(operator)}function isOperatorDate(operator){return[_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateBefore,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateAfter,_types__WEBPACK_IMPORTED_MODULE_3__.WV.IsDateExact].includes(operator)}function objectsEqual(obj1,obj2){return fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default()(obj1,obj2)}function isString(candidate){return"string"==typeof candidate}function isObject(candidate){return"object"==typeof candidate&&null!==candidate}function isEmptyObject(candidate){return isObject(candidate)&&0===Object.keys(candidate).length}function isNonEmptyObject(candidate){return isObject(candidate)&&!isEmptyObject(candidate)}function objectClean(obj){let response={...obj};return Object.keys(response).forEach(key=>{void 0===response[key]&&delete response[key]}),response}function objectCleanWithEmpty(obj){let ignoredKeys=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],response={...obj};return Object.keys(response).filter(key=>!ignoredKeys.includes(key)).forEach(key=>{void 0===response[key]&&delete response[key],"object"==typeof response[key]&&Array.isArray(response[key])&&0===response[key].length&&delete response[key],"object"!=typeof response[key]||Array.isArray(response[key])||null===response[key]||0!==Object.keys(response[key]).length||delete response[key]}),response}function objectDiffShallow(obj1,obj2){let response={...obj2};for(let key of Object.keys(obj1))key in response?obj1[key]===response[key]&&delete response[key]:response[key]=void 0;return response}function idToKey(array){let keyField=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",object={};for(let element of array)object[element[keyField]]=element;return object}function delay(ms,signal){return new Promise((resolve,reject)=>{let timeoutId=setTimeout(resolve,ms);signal&&signal.addEventListener("abort",()=>{clearTimeout(timeoutId),reject(new DOMException("Aborted","AbortError"))})})}function clearDOMTextSelection(){window.getSelection?window.getSelection()?.empty?window.getSelection()?.empty():window.getSelection()?.removeAllRanges&&window.getSelection()?.removeAllRanges():document.selection&&document.selection.empty()}function slugify(text){return text.toString().toLowerCase().normalize("NFD").trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}let DEFAULT_DECIMAL_PLACES=2;function humanFriendlyNumber(d){let precision=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DEFAULT_DECIMAL_PLACES;return(isNaN(precision)||precision<0)&&(precision=DEFAULT_DECIMAL_PLACES),d.toLocaleString("en-US",{maximumFractionDigits:precision})}function humanFriendlyCurrency(d){let number,precision=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return d||(d="0.00"),number="string"==typeof d?parseFloat(d):d,`$${number.toLocaleString("en-US",{maximumFractionDigits:precision,minimumFractionDigits:precision})}`}function humanFriendlyLargeNumber(d){if(isNaN(d))return"NaN";if(!isFinite(d))return d>0?"inf":"-inf";let prefix=d>=0?"":"-";return(d=parseFloat((d=Math.abs(d)).toPrecision(3)))>=1e12?`${prefix}${(d/1e12).toString()}T`:d>=1e9?`${prefix}${(d/1e9).toString()}B`:d>=1e6?`${prefix}${(d/1e6).toString()}M`:d>=1e3?`${prefix}${(d/1e3).toString()}K`:`${prefix}${d}`}let humanFriendlyMilliseconds=timestamp=>"number"!=typeof timestamp?void 0:timestamp<1e3?`${Math.ceil(timestamp)}ms`:`${(timestamp/1e3).toFixed(2)}s`;function humanFriendlyDetailedTime(date){let formatString,formatDate=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMMM\xa0DD,\xa0YYYY",formatTime=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss\xa0A";if(!date)return"Never";let parsedDate=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(date),today=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().startOf("day"),yesterday=today.clone().subtract(1,"days").startOf("day");return parsedDate.isSame((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(),"m")?"Just now":(formatString=parsedDate.isSame(today,"d")?`[Today]\xa0${formatTime}`:parsedDate.isSame(yesterday,"d")?`[Yesterday]\xa0${formatTime}`:`${formatDate} ${formatTime}`,parsedDate.format(formatString))}let zeroPad=(num,places)=>String(num).padStart(places,"0");function colonDelimitedDuration(d){let fixedUnits=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(""===d||null==d)return"";let s=d=Number(d),weeks=0,days=0,h=0,m=0;weeks=!fixedUnits||fixedUnits>4?Math.floor(s/604800):0,s-=604800*weeks,days=!fixedUnits||fixedUnits>3?Math.floor(s/86400):0,s-=86400*days,h=!fixedUnits||fixedUnits>2?Math.floor(s/3600):0,s-=3600*h,m=!fixedUnits||fixedUnits>1?Math.floor(s/60):0,s-=60*m,s=Math.floor(s);let stopTrimming=!1,units=[];return([weeks,days,h,m,s].forEach((unit,i)=>{(fixedUnits||unit||stopTrimming||!(i<3))&&(units.push(zeroPad(unit,2)),stopTrimming=!0)}),fixedUnits)?units.slice(-fixedUnits).join(":"):units.join(":")}function reverseColonDelimitedDuration(duration){if(!duration||!/^(\d\d?:)*(\d\d?)$/.test(duration))return null;let seconds=0,units=duration.split(":").map(unit=>Number(unit)).reverse();return[1,60,3600,86400,604800].forEach((unit,index)=>{units[index]&&(seconds+=units[index]*unit)}),seconds}function stripHTTP(url){return url=(url=url.replace(/(^[0-9]+_)/,"")).replace(/(^\w+:|^)\/\//,"")}function isDomain(url){try{let parsedUrl="string"==typeof url?new URL(url):url;if(parsedUrl.protocol.includes("http")&&(!parsedUrl.pathname||"/"===parsedUrl.pathname)||!parsedUrl.pathname.replace(/^\/\//,"").includes("/"))return!0}catch{}return!1}function isURL(input){return!!input&&"string"==typeof input&&!!input.trim().match(/^(http|capacitor|https):\/\/[\w*.-]+[\w*.-]+[\w\-._~:/?#[\]@%!$&'()*+,;=]+$/)}function isExternalLink(input){return!!input&&"string"==typeof input&&!!input.trim().match(/^(https?:|mailto:)/)}function isEmail(string){return!!string&&!!string.match?.(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)}function truncate(str,maxLength){return str.length>maxLength?str.slice(0,maxLength-1)+"...":str}function eventToDescription(event){let shortForm=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(["$pageview","$pageleave"].includes(event.event)){var _ref3,_event$properties$$pa;return null!==(_ref3=null!==(_event$properties$$pa=event.properties.$pathname)&&void 0!==_event$properties$$pa?_event$properties$$pa:event.properties.$current_url)&&void 0!==_ref3?_ref3:""}return"$autocapture"===event.event?autoCaptureEventToDescription(event,shortForm):event.event}let eventTypeToVerb={click:"clicked",change:"typed something into",submit:"submitted",touch:"touched a",value_changed:"changed value in",toggle:"toggled",menu_action:"pressed menu",swipe:"swiped",pinch:"pinched",pan:"panned",rotation:"rotated",long_press:"long pressed",scroll:"scrolled in"};function autoCaptureEventToDescription(event){let shortForm=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("$autocapture"!==event.event)return event.event;let getVerb=()=>eventTypeToVerb[event.properties.$event_type]||"interacted with",getTag=()=>{var _event$elements$0$tag;return event.elements?.[0]?.tag_name==="a"?"link":event.elements?.[0]?.tag_name==="img"?"image":null!==(_event$elements$0$tag=event.elements?.[0]?.tag_name)&&void 0!==_event$elements$0$tag?_event$elements$0$tag:"element"},getValue=()=>event.elements?.[0]?.text?`${shortForm?"":"with text "}"${event.elements[0].text}"`:event.elements?.[0]?.attributes?.["attr__aria-label"]?`${shortForm?"":"with aria label "}"${event.elements[0].attributes["attr__aria-label"]}"`:null;if(shortForm){var _getValue;return[getVerb(),null!==(_getValue=getValue())&&void 0!==_getValue?_getValue:getTag()].filter(x=>x).join(" ")}let value=getValue();return[getVerb(),getTag(),value].filter(x=>x).join(" ")}let DATE_FORMAT="MMMM D, YYYY",formatDate=(date,format)=>date.format(null!=format?format:DATE_FORMAT),formatDateTime=(date,format)=>date.format(null!=format?format:"MMMM D, YYYY HH:mm:ss"),formatDateRange=(dateFrom,dateTo,format)=>{let formatFrom=null!=format?format:DATE_FORMAT,formatTo=null!=format?format:DATE_FORMAT;return format&&format!==DATE_FORMAT||dateFrom.year()!==dateTo.year()||(formatFrom="MMMM D"),`${dateFrom.format(formatFrom)} - ${dateTo.format(formatTo)}`},dateMapping=[{key:_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__.Q2,values:[]},{key:"Today",values:["dStart"],getFormattedDate:date=>date.startOf("d").format(DATE_FORMAT),defaultInterval:"hour"},{key:"Yesterday",values:["-1dStart","-1dEnd"],getFormattedDate:date=>date.subtract(1,"d").format(DATE_FORMAT),defaultInterval:"hour"},{key:"Last 24 hours",values:["-24h"],getFormattedDate:date=>formatDateRange(date.subtract(24,"h"),date.endOf("d")),defaultInterval:"hour"},{key:"Last 48 hours",values:["-48h"],getFormattedDate:date=>formatDateRange(date.subtract(48,"h"),date.endOf("d")),inactive:!0,defaultInterval:"hour"},{key:"Last 7 days",values:["-7d"],getFormattedDate:date=>formatDateRange(date.subtract(7,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 14 days",values:["-14d"],getFormattedDate:date=>formatDateRange(date.subtract(14,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 30 days",values:["-30d"],getFormattedDate:date=>formatDateRange(date.subtract(30,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 90 days",values:["-90d"],getFormattedDate:date=>formatDateRange(date.subtract(90,"d"),date.endOf("d")),defaultInterval:"day"},{key:"Last 180 days",values:["-180d"],getFormattedDate:date=>formatDateRange(date.subtract(180,"d"),date.endOf("d")),defaultInterval:"month"},{key:"This month",values:["mStart"],getFormattedDate:date=>formatDateRange(date.startOf("month"),date.endOf("month")),defaultInterval:"day"},{key:"Previous month",values:["-1mStart","-1mEnd"],getFormattedDate:date=>formatDateRange(date.subtract(1,"month").startOf("month"),date.subtract(1,"month").endOf("month")),inactive:!0,defaultInterval:"day"},{key:"Year to date",values:["yStart"],getFormattedDate:date=>formatDateRange(date.startOf("y"),date.endOf("d")),defaultInterval:"month"},{key:"All time",values:["all"],defaultInterval:"month"}],isDate=/([0-9]{4}-[0-9]{2}-[0-9]{2})/,dateOptionsMap={y:"year",q:"quarter",m:"month",w:"week",d:"day",h:"hour"};function dateFilterToText(dateFrom,dateTo,defaultValue){let dateOptions=arguments.length>3&&void 0!==arguments[3]?arguments[3]:dateMapping,isDateFormatted=arguments.length>4&&void 0!==arguments[4]&&arguments[4],dateFormat=arguments.length>5&&void 0!==arguments[5]?arguments[5]:DATE_FORMAT,startOfRange=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(dateFrom)&&lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.isDayjs(dateTo))return formatDateRange(dateFrom,dateTo,dateFormat);if(dateFrom=dateFrom||void 0,dateTo=dateTo||void 0,isDate.test(dateFrom||"")&&isDate.test(dateTo||""))return isDateFormatted?formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom,"YYYY-MM-DD"),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateTo,"YYYY-MM-DD")):`${dateFrom} - ${dateTo}`;if(isDate.test(dateFrom||"")&&!isDate.test(dateTo||"")){let days=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().diff((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),"days");return days>366?isDateFormatted?`${dateFrom} - today`:formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)()):days>0?isDateFormatted?formatDateRange((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom),(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)()):`Last ${days} days`:0===days?isDateFormatted?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom).format(dateFormat):"Today":isDateFormatted?`${(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(dateFrom).format(dateFormat)} - `:`Starting from ${dateFrom}`}for(let{key,values,getFormattedDate}of dateOptions)if(values[0]===dateFrom&&values[1]===dateTo&&key!==_components_DateFilter_types__WEBPACK_IMPORTED_MODULE_4__.Q2)return isDateFormatted&&getFormattedDate?getFormattedDate((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(),dateFormat):key;if(dateFrom){let dateOption=dateOptionsMap[dateFrom.slice(-1)],counter=parseInt(dateFrom.slice(1,-1));if(dateOption&&counter){let date=null;switch(dateOption){case"year":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"y");break;case"hour":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"h");break;case"quarter":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(3*counter,"M");break;case"month":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"M");break;case"week":date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(7*counter,"d");break;default:date=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().subtract(counter,"d")}return isDateFormatted?formatDateRange(date,(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().endOf("d")):startOfRange?formatDate(date,dateFormat):`Last ${counter} ${dateOption}${counter>1?"s":""}`}}return defaultValue}function dateFromToText(dateFrom){let dateOption=dateOptionsMap[dateFrom.slice(-1)],counter=parseInt(dateFrom.slice(1,-1));if(dateOption&&counter)return`${counter} ${dateOption}${counter>1?"s":""}`}function dateStringToComponents(date){if(!date)return null;let matches=date.match(/^([-+]?)([0-9]*)([hdwmqy])(|Start|End)$/);if(!matches)return null;let[,sign,rawAmount,rawUnit,clip]=matches,amount=rawAmount?parseInt(sign+rawAmount):0,unit=dateOptionsMap[rawUnit]||"day";return{amount,unit,clip:clip}}function dateStringToDayJs(date){let response;if(isDate.test(date||""))return(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(date);let dateComponents=dateStringToComponents(date);if(!dateComponents)return null;let{unit,amount,clip}=dateComponents;switch(unit){case"year":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"year");break;case"quarter":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(3*amount,"month");break;case"month":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"month");break;case"week":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(7*amount,"day");break;case"day":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"day");break;case"hour":response=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)().add(amount,"hour");break;default:throw new UnexpectedNeverError(unit)}return"Start"===clip?response.startOf(unit):"End"===clip?response.endOf(unit):response.startOf("day")}let getDefaultInterval=(dateFrom,dateTo)=>{for(let mapping of dateMapping){var _mapping$values$,_mapping$values$2;let mappingFrom=null!==(_mapping$values$=mapping.values[0])&&void 0!==_mapping$values$?_mapping$values$:null,mappingTo=null!==(_mapping$values$2=mapping.values[1])&&void 0!==_mapping$values$2?_mapping$values$2:null;if(mappingFrom===dateFrom&&mappingTo===dateTo&&mapping.defaultInterval)return mapping.defaultInterval}let parsedDateFrom=dateStringToComponents(dateFrom),parsedDateTo=dateStringToComponents(dateTo);if(parsedDateFrom?.unit==="hour"||parsedDateTo?.unit==="hour")return"hour";if(parsedDateFrom?.unit==="day"||parsedDateTo?.unit==="day"||"mStart"===dateFrom)return"day";if(parsedDateFrom?.unit==="month"||parsedDateTo?.unit==="month"||parsedDateFrom?.unit==="quarter"||parsedDateTo?.unit==="quarter"||parsedDateFrom?.unit==="year"||parsedDateTo?.unit==="year"||"all"===dateFrom)return"month";let dateFromDayJs=dateStringToDayJs(dateFrom),dateToDayJs=dateStringToDayJs(dateTo),intervalMonths=dateFromDayJs?.diff(dateToDayJs,"month");if(null!=intervalMonths&&Math.abs(intervalMonths)>=2)return"month";let intervalDays=dateFromDayJs?.diff(dateToDayJs,"day");if(null!=intervalDays&&Math.abs(intervalDays)>=14)return"week";if(null!=intervalDays&&Math.abs(intervalDays)>=2)return"day";let intervalHours=dateFromDayJs?.diff(dateToDayJs,"hour");return null!=intervalHours&&Math.abs(intervalHours)>=1?"hour":"day"},areDatesValidForInterval=(interval,oldDateFrom,oldDateTo)=>{let parsedOldDateFrom=dateStringToDayJs(oldDateFrom),parsedOldDateTo=dateStringToDayJs(oldDateTo)||(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)();if("all"===oldDateFrom||!parsedOldDateFrom)return"month"===interval;if("month"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"month")>=2;if("week"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"week")>=2;if("day"===interval){let diff=parsedOldDateTo.diff(parsedOldDateFrom,"day");return diff>=2}if("hour"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"hour")>=2&&336>parsedOldDateTo.diff(parsedOldDateFrom,"hour");if("minute"===interval)return parsedOldDateTo.diff(parsedOldDateFrom,"minute")>=2&&720>parsedOldDateTo.diff(parsedOldDateFrom,"minute");throw new UnexpectedNeverError(interval)},defaultDatesForInterval={minute:{dateFrom:"-1h",dateTo:null},hour:{dateFrom:"-24h",dateTo:null},day:{dateFrom:"-7d",dateTo:null},week:{dateFrom:"-28d",dateTo:null},month:{dateFrom:"-6m",dateTo:null}},updateDatesWithInterval=(interval,oldDateFrom,oldDateTo)=>areDatesValidForInterval(interval,oldDateFrom,oldDateTo)?{dateFrom:oldDateFrom,dateTo:oldDateTo}:defaultDatesForInterval[interval];function is12HoursOrLess(dateFrom){return!!dateFrom&&-1!=dateFrom.search(/^-([0-9]|1[0-2])h$/)}function isLessThan2Days(dateFrom){return!!dateFrom&&-1!=dateFrom.search(/^-(4[0-7]|[0-3]?[0-9])h|[1-2]d$/)}function clamp(value,min,max){return value>max?max:value1&&void 0!==arguments[1]?arguments[1]:"sentence",words=[],currentWord="";return String(identifier).trim().split("").forEach(character=>{"_"===character||"-"===character?(currentWord&&words.push(currentWord),currentWord=""):character===character.toLowerCase()&&(!"0123456789".includes(character)||currentWord&&"0123456789".includes(currentWord[currentWord.length-1]))?currentWord+=character:(currentWord&&words.push(currentWord),currentWord=character.toLowerCase())}),currentWord&&words.push(currentWord),capitalizeFirstLetter(words.map(word=>"sentence"===caseType?word:capitalizeFirstLetter(word)).join(" "))}function parseGithubRepoURL(url){let match=url.match(/^https?:\/\/(?:www\.)?github\.com\/([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)(\/(commit|tree|releases\/tag)\/([A-Za-z0-9_.\-/]+))?/);if(!match)throw Error(`${url} is not a valid GitHub URL`);let[,user,repo,,type,path]=match;return{user,repo,type,path}}function hashCodeForString(s){let hash=0;if(0===s.trim().length)return hash;for(let i=0;i3)||void 0===arguments[3]||arguments[3];plural||(plural=singular+"s");let form=1===count?singular:plural;return includeNumber?`${humanFriendlyNumber(count)}\xa0${form}`:form}let COMPACT_NUMBER_MAGNITUDES=["","K","M","B","T","P","E","Z","Y"];function compactNumber(value){if(null===value)return"-";value=parseFloat(value.toPrecision(3));let magnitude=0;for(;Math.abs(value)>=1e3;)magnitude++,value/=1e3;return magnitude>0?`${value}\xa0${COMPACT_NUMBER_MAGNITUDES[magnitude]}`:value.toString()}function roundToDecimal(value){let places=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return null===value?"-":(Math.round(100*value)/100).toFixed(places)}function sortedKeys(object){let newObject={};for(let key of Object.keys(object).sort())newObject[key]=object[key];return newObject}let alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");function shortTimeZone(timeZone,atDate){let date=atDate?new Date(atDate):new Date;try{let localeTimeStringParts=date.toLocaleTimeString("en-us",{timeZoneName:"short",timeZone:timeZone||void 0}).replace("GMT","UTC").split(" ");return localeTimeStringParts[localeTimeStringParts.length-1]}catch(e){return _sentry_react__WEBPACK_IMPORTED_MODULE_7__.Tb(e),null}}function humanList(arr){return arr.length>2?arr.slice(0,-1).join(", ")+", and "+arr.at(-1):arr.join(" and ")}function resolveWebhookService(webhookUrl){for(let[service,domain]of Object.entries(lib_constants__WEBPACK_IMPORTED_MODULE_1__.dA))if(webhookUrl.includes(domain+"/"))return service;return"your webhook service"}function hexToRGB(hex){let originalString=hex.trim(),hasPoundSign="#"===originalString[0],originalColor=hasPoundSign?originalString.slice(1):originalString;if(3===originalColor.length&&(originalColor=originalColor.split("").map(c=>c+c).join("")),6!==originalColor.length)return console.warn(`Incorrectly formatted color string: ${hex}.`),{r:0,g:0,b:0};let originalBase16=parseInt(originalColor,16);return{r:originalBase16>>16,g:originalBase16>>8&255,b:255&originalBase16}}function hexToRGBA(hex){let alpha=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{r,g,b}=hexToRGB(hex);return`rgba(${[r,g,b,alpha].join(",")})`}function RGBToHex(rgb){let rgbValues=rgb.replace("rgb(","").replace(")","").split(",").map(Number);return`#${rgbValues.map(val=>val.toString(16).padStart(2,"0")).join("")}`}function RGBToRGBA(rgb,a){let[r,g,b]=rgb.slice(4,rgb.length-1).split(",");return`rgba(${[r,g,b,a].join(",")})`}function lightenDarkenColor(hex,pct){function output(val){return Math.max(0,Math.min(255,val))}let amt=Math.round(2.55*pct),{r,g,b}=hexToRGB(hex);return r=output(r+amt),g=output(g+amt),b=output(b+amt),`rgb(${[r,g,b].join(",")})`}let BRAND_BLUE_HSL=[228,100,56],PURPLE=[260,88,71];function gradateColor(hsl,strength){let floor=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return`hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, ${(floor+(1-floor)*strength).toPrecision(3)})`}function toString(input){return input?.toString()||""}function average(input){return Math.round(input.reduce((acc,val)=>acc+val,0)/input.length*10)/10}function median(input){let sorted=[...input].sort((a,b)=>a-b),half=Math.floor(sorted.length/2);return sorted.length%2?sorted[half]:average([sorted[half-1],sorted[half]])}function sum(input){return input.reduce((a,b)=>a+b,0)}function tryJsonParse(value,fallback){try{return JSON.parse(value)}catch(error){return fallback}}function ensureStringIsNotBlank(s){return"string"==typeof s&&""!==s.trim()?s:null}function isMultiSeriesFormula(formula){if(!formula)return!1;let count=(formula.match(/[a-zA-Z]/g)||[]).length;return count>1}function ceilMsToClosestSecond(ms){return 1e3*Math.ceil(ms/1e3)}function findLastIndex(array,predicate){let l=array.length;for(;l--;)if(predicate(array[l],l,array))return l;return -1}function isGroupType(actor){return"group"===actor.type}function getEventNamesForAction(actionId,allActions){let id=parseInt(String(actionId));return allActions.filter(a=>a.id===id).flatMap(a=>a.steps?.filter(step=>step.event).map(step=>String(step.event)))}let isUserLoggedIn=()=>!_utils_getAppContext__WEBPACK_IMPORTED_MODULE_5__.Fj()?.anonymous;function isNumeric(x){return"number"==typeof x||"string"==typeof x&&!isNaN(Number(x))&&!isNaN(parseFloat(x))}function isNotNil(arg){return null!=arg}class UnexpectedNeverError extends Error{constructor(x,message){super(message=null!=message?message:"Unexpected never: "+String(x));let actualProto=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,actualProto)}}function promiseResolveReject(){let resolve,reject;let promise=new Promise((innerResolve,innerReject)=>{resolve=innerResolve,reject=innerReject});return{resolve:resolve,reject:reject,promise}}function calculateDays(timeValue,timeUnit){return timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Year?365*timeValue:timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Month?30*timeValue:timeUnit===_types__WEBPACK_IMPORTED_MODULE_3__.Xy.Week?7*timeValue:timeValue}function range(startOrEnd,end){let length=startOrEnd,start=0;return"number"==typeof end&&(length=end-(start=startOrEnd)),Array.from({length},(_,i)=>i+start)}function downloadFile(file){let link=document.createElement("a");link.style.display="none",link.href=URL.createObjectURL(file),link.download=file.name,document.body.appendChild(link),link.click(),setTimeout(()=>{URL.revokeObjectURL(link.href),link?.parentNode?.removeChild(link)},0)}function inStorybookTestRunner(){return navigator.userAgent.includes("StorybookTestRunner")}function inStorybook(){return"__STORYBOOK_CLIENT_API__"in window}function shouldCancelQuery(error){return isAbortedRequest(error)||504===error.status}function isAbortedRequest(error){return"AbortError"===error.name||error.message?.name==="AbortError"}let shouldIgnoreInput=e=>["input","textarea"].includes(e.target.tagName.toLowerCase())||e.target.isContentEditable||e.target.parentElement?.isContentEditable||!1,base64Encode=str=>{let data=new TextEncoder().encode(str),binString=Array.from(data,byte=>String.fromCharCode(byte)).join("");return btoa(binString)},base64Decode=encodedString=>{let data=base64ToUint8Array(encodedString);return new TextDecoder().decode(data)},base64ArrayBuffer=encodedString=>{let data=base64ToUint8Array(encodedString);return data.buffer},base64ToUint8Array=encodedString=>{let binString=atob(encodedString),data=new Uint8Array(binString.length);for(let i=0;ifunc(...args),waitFor)}}},"./frontend/src/lib/utils/apiHost.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function apiHostOrigin(){let appOrigin=window.location.origin;return"https://us.posthog.com"===appOrigin?"https://us.i.posthog.com":"https://eu.posthog.com"===appOrigin?"https://eu.i.posthog.com":appOrigin}function liveEventsHostOrigin(){let appOrigin=window.location.origin;return"https://us.posthog.com"===appOrigin?"https://live.us.posthog.com":"https://eu.posthog.com"===appOrigin?"https://live.eu.posthog.com":"https://app.dev.posthog.dev"===appOrigin?"https://live.dev.posthog.dev":"http://localhost:8666"}__webpack_require__.d(__webpack_exports__,{K:()=>liveEventsHostOrigin,Y:()=>apiHostOrigin})},"./frontend/src/lib/utils/copyToClipboard.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>copyToClipboard});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");async function copyToClipboard(value){let description=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";if(!navigator.clipboard)return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.warning("Oops! Clipboard capabilities are only available over HTTPS or on localhost"),!1;try{return await navigator.clipboard.writeText(value),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.info(`Copied ${description} to clipboard`,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCopy,{})}),!0}catch(e){try{let textArea=document.createElement("textarea");return textArea.value=value,document.body.appendChild(textArea),textArea.select(),document.execCommand("copy"),document.body.removeChild(textArea),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.info(`Copied ${description} to clipboard`,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCopy,{})}),!0}catch(err){return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.error(`Could not copy ${description} to clipboard: ${err}`),!1}}}},"./frontend/src/lib/utils/cssEscape.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */function cssEscape(string){let codeUnit;let length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);for(;++index=1&&codeUnit<=31||127==codeUnit||0==index&&codeUnit>=48&&codeUnit<=57||1==index&&codeUnit>=48&&codeUnit<=57&&45==firstCodeUnit){result+="\\"+codeUnit.toString(16)+" ";continue}if(0==index&&1==length&&45==codeUnit){result+="\\"+string.charAt(index);continue}if(codeUnit>=128||45==codeUnit||95==codeUnit||codeUnit>=48&&codeUnit<=57||codeUnit>=65&&codeUnit<=90||codeUnit>=97&&codeUnit<=122){result+=string.charAt(index);continue}result+="\\"+string.charAt(index)}return result}__webpack_require__.d(__webpack_exports__,{Q:()=>cssEscape})},"./frontend/src/lib/utils/deleteWithUndo.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>deleteWithUndo,c:()=>deleteInsightWithUndo});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");async function deleteWithUndo(_ref){let{undo=!1,...props}=_ref;await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.update(`api/${props.endpoint}/${props.object[props.idField||"id"]}`,{...props.object,deleted:!undo}),props.callback?.(undo,props.object),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ[undo?"success":"info"]((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b",{children:props.object.name||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i",{children:props.object.derived_name||"Unnamed"})})," has been"," ",undo?"restored":"deleted"]}),{toastId:`delete-item-${props.object.id}-${undo}`,button:undo?void 0:{label:"Undo",action:()=>deleteWithUndo({undo:!0,...props})}})}async function deleteInsightWithUndo(_ref2){let{undo=!1,...props}=_ref2;await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.update(`api/${props.endpoint}/${props.object[props.idField||"id"]}`,{...props.object,deleted:!undo}),props.callback?.(undo,props.object),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ[undo?"success":"info"]((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("b",{children:props.object.name||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i",{children:props.object.derived_name||"Unnamed"})})," has been"," ",undo?"restored":"deleted"]}),{toastId:`delete-item-${props.object.id}-${undo}`,button:undo?void 0:{label:"Undo",action:()=>deleteInsightWithUndo({undo:!0,...props})}})}},"./frontend/src/lib/utils/event-property-utls.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BM:()=>AutocapturePreviewImage,R3:()=>AutocaptureImageTab,Uq:()=>autocaptureToImage});var lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function autocaptureToImage(elements){let find=elements.find(el=>"img"===el.tag_name),image={src:find?.attributes?.attr__src,width:find?.attributes?.attr__width,height:find?.attributes?.attr__height};return image.src?image:null}function AutocaptureImage(_ref){let{img}=_ref;return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"flex bg-bg-3000 items-center justify-center relative border-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"ImagePreview__background absolute h-full w-full"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img",{className:"relative z-10 max-h-100 object-contain",src:img.src,alt:"Autocapture image src",height:img.height||"auto",width:img.width||"auto"})]}):null}function AutocaptureImageTab(_ref2){let{elements}=_ref2,img=autocaptureToImage(elements);return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"flex bg-bg-3000 items-center justify-center relative border-2 w-full",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(AutocaptureImage,{img:img})}):null}function AutocapturePreviewImage(_ref3){let{elements,imgPreviewHeight="40"}=_ref3,img=autocaptureToImage(elements);return img?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_0__.u,{title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(AutocaptureImage,{img:img}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img",{className:"max-h-10",src:img.src,alt:"Autocapture image src",height:imgPreviewHeight,width:"auto"})}):null}},"./frontend/src/lib/utils/eventUsageLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{GU:()=>DashboardEventSource,Tu:()=>GraphSeriesAddedSource,sR:()=>InsightEventSource,vx:()=>eventUsageLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),utils=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts"),UniversalFilters_utils=__webpack_require__("./frontend/src/lib/components/UniversalFilters/utils.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),lib_utils=__webpack_require__("./frontend/src/lib/utils.tsx"),dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),sharedUtils=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),defineProperty=__webpack_require__("./node_modules/.pnpm/@babel+runtime@7.24.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");class EventIndex{constructor(events){(0,defineProperty.Z)(this,"events",void 0),(0,defineProperty.Z)(this,"baseTime",void 0),(0,defineProperty.Z)(this,"_filterByCaches",void 0),(0,defineProperty.Z)(this,"getDuration",()=>this.events.length>0?this.events[this.events.length-1].timestamp-this.events[0].timestamp:0),(0,defineProperty.Z)(this,"getRecordingScreenMetadata",playerTime=>findCurrent(playerTime,this.recordingScreenMetadata())),(0,defineProperty.Z)(this,"pageChangeEvents",()=>this._filterBy("href",event=>{let eventData=event.data;return eventData?.href?{href:event.data.href,playerTime:event.timestamp-this.baseTime}:5===event.type&&"$pageview"===event.data.tag?{href:event.data.payload.href,playerTime:event.timestamp-this.baseTime}:null})),(0,defineProperty.Z)(this,"recordingScreenMetadata",()=>this._filterBy("resolution",event=>{let eventData=event.data;if(eventData?.width&&eventData?.height){let{width,height}=eventData;return{resolution:`${width} x ${height}`,height:height,width:width,playerTime:event.timestamp-this.baseTime}}return null})),(0,defineProperty.Z)(this,"_filterBy",(dataKey,transformer)=>{if(!this._filterByCaches[dataKey]){let lastValueKey;this._filterByCaches[dataKey]=this.events.map(transformer).filter(value=>!!value&&value[dataKey]!==lastValueKey&&(lastValueKey=value[dataKey],!0))}return this._filterByCaches[dataKey]}),this.events=events,this.baseTime=events.length>0?events[0].timestamp:0,this._filterByCaches={}}}let findCurrent=(playerTime,events)=>{let index=events.findIndex(event=>event.playerTime>playerTime);return 0===index?[events[0],0]:-1===index?(index=events.length-1,[events[index],index]):[events[index-1],index-1]};var session_recordings_utils=__webpack_require__("./frontend/src/scenes/session-recordings/utils.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let DashboardEventSource=function(DashboardEventSource){return DashboardEventSource.LongPress="long_press",DashboardEventSource.MoreDropdown="more_dropdown",DashboardEventSource.DashboardHeaderSaveDashboard="dashboard_header_save_dashboard",DashboardEventSource.DashboardHeaderDiscardChanges="dashboard_header_discard_changes",DashboardEventSource.DashboardHeaderExitFullscreen="dashboard_header_exit_fullscreen",DashboardEventSource.Hotkey="hotkey",DashboardEventSource.InputEnter="input_enter",DashboardEventSource.Toast="toast",DashboardEventSource.Browser="browser",DashboardEventSource.AddDescription="add_dashboard_description",DashboardEventSource.MainNavigation="main_nav",DashboardEventSource.DashboardsList="dashboards_list",DashboardEventSource}({}),InsightEventSource=function(InsightEventSource){return InsightEventSource.LongPress="long_press",InsightEventSource.MoreDropdown="more_dropdown",InsightEventSource.InsightHeader="insight_header",InsightEventSource.Hotkey="hotkey",InsightEventSource.InputEnter="input_enter",InsightEventSource.Toast="toast",InsightEventSource.Browser="browser",InsightEventSource.AddDescription="add_insight_description",InsightEventSource}({}),GraphSeriesAddedSource=function(GraphSeriesAddedSource){return GraphSeriesAddedSource.Default="default",GraphSeriesAddedSource.Duplicate="duplicate",GraphSeriesAddedSource}({});function flattenProperties(properties){let output=[];for(let prop of properties||[])prop.key&&(0,taxonomy.jA)(prop.key)?output.push(prop.key):output.push("redacted");return output}function hasGroupProperties(properties){let flattenedProperties=(0,utils.Y4)(properties);return!!flattenedProperties&&flattenedProperties.some(property=>(0,utils.lv)(property)&&void 0!==property.group_type_index)}function sanitizeFilterParams(filters){let{interval,date_from,date_to,filter_test_accounts,insight}=filters,properties_local=[],properties=Array.isArray(filters.properties)?filters.properties:[],events=Array.isArray(filters.events)?filters.events:[],actions=Array.isArray(filters.actions)?filters.actions:[],entities=events.concat(actions),aggregating_by_groups=void 0!=filters.aggregation_group_type_index,breakdown_by_groups=void 0!=filters.breakdown_group_type_index,using_groups=hasGroupProperties(filters.properties),used_cohort_filter_ids=function(properties){let flattenedProperties=(0,utils.Y4)(properties)||[],cohortIds=flattenedProperties.filter(p=>"cohort"===p.type).map(p=>p.value).filter(a=>!!a);return cohortIds||[]}(filters.properties);for(let entity of entities){let entityProperties=Array.isArray(entity.properties)?entity.properties:[];properties_local=properties_local.concat(flattenProperties(entityProperties)),using_groups=using_groups||hasGroupProperties(entityProperties),void 0!=entity.math_group_type_index&&(aggregating_by_groups=!0)}let properties_global=flattenProperties(properties);return{display:(0,sharedUtils.dn)(filters)?filters.display:void 0,interval,date_from,date_to,filter_test_accounts,formula:(0,sharedUtils.pM)(filters)?filters.formula:void 0,filters_count:properties?.length||0,events_count:events?.length||0,actions_count:actions?.length||0,funnel_viz_type:(0,sharedUtils.e1)(filters)?filters.funnel_viz_type:void 0,funnel_from_step:(0,sharedUtils.e1)(filters)?filters.funnel_from_step:void 0,funnel_to_step:(0,sharedUtils.e1)(filters)?filters.funnel_to_step:void 0,properties_global,properties_global_custom_count:properties_global.filter(item=>"custom"===item).length,properties_local,properties_local_custom_count:properties_local.filter(item=>"custom"===item).length,properties_all:properties_global.concat(properties_local),aggregating_by_groups,breakdown_by_groups,using_groups:using_groups||aggregating_by_groups||breakdown_by_groups,used_cohort_filter_ids,insight}}function sanitizeQuery(query){let payload={query_kind:query?.kind,query_source_kind:(0,queries_utils.gV)(query)?query.source.kind:void 0};if((0,queries_utils.KN)(query)||(0,queries_utils.Yg)(query)){let querySource=(0,queries_utils.KN)(query)?query.source:query,{dateRange,filterTestAccounts,samplingFactor,properties}=querySource;payload.date_from=dateRange?.date_from||void 0,payload.date_to=dateRange?.date_to||void 0,payload.interval=(0,queries_utils.ZS)(querySource),payload.samplingFactor=samplingFactor||void 0,payload.series_length=queries_utils.gU(querySource)?.length,payload.event_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.cT(e)).length,payload.action_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.VU(e)).length,payload.data_warehouse_entity_count=queries_utils.gU(querySource)?.filter(e=>queries_utils.oX(e)).length,payload.has_data_warehouse_series=!!queries_utils.gU(querySource)?.find(e=>queries_utils.oX(e)),payload.has_properties=!!properties,payload.filter_test_accounts=filterTestAccounts,payload.breakdown_type=queries_utils.Km(querySource)?.breakdown_type||void 0,payload.breakdown_limit=queries_utils.Km(querySource)?.breakdown_limit||void 0,payload.breakdown_hide_other_aggregation=queries_utils.Km(querySource)?.breakdown_hide_other_aggregation||void 0,payload.has_formula=!!(0,queries_utils.pT)(querySource),payload.display=(0,queries_utils.nI)(querySource),payload.compare=queries_utils.lC(querySource)?.compare,payload.compare_to=queries_utils.lC(querySource)?.compare_to,payload.funnel_viz_type=(0,queries_utils.Wl)(querySource)?querySource.funnelsFilter?.funnelVizType:void 0,payload.funnel_order_type=(0,queries_utils.Wl)(querySource)?querySource.funnelsFilter?.funnelOrderType:void 0}return(0,lib_utils.hO)(payload)}let eventUsageLogic=(0,index_esm.kea)([(0,index_esm.path)(["lib","utils","eventUsageLogic"]),(0,index_esm.connect)(()=>({values:[preflightLogic.preflightLogic,["realm"],userLogic.userLogic,["user"]]})),(0,index_esm.actions)({reportPersonDetailViewed:person=>({person}),reportPersonsModalViewed:params=>({params}),reportTimeToSeeData:payload=>({payload}),reportInsightCreated:query=>({query}),reportInsightSaved:(query,isNewInsight)=>({query,isNewInsight}),reportInsightViewed:(insightModel,query,isFirstLoad,delay)=>({insightModel,query,isFirstLoad,delay}),reportFunnelCalculated:(eventCount,actionCount,interval,funnelVizType,success,error)=>({eventCount,actionCount,interval,funnelVizType,success,error}),reportFunnelStepReordered:!0,reportInsightFilterRemoved:index=>({index}),reportInsightFilterAdded:(newLength,source)=>({newLength,source}),reportInsightFilterSet:filters=>({filters}),reportEntityFilterVisibilitySet:(index,visible)=>({index,visible}),reportInsightsTableCalcToggled:mode=>({mode}),reportPropertyGroupFilterAdded:!0,reportChangeOuterPropertyGroupFiltersType:(type,groupsLength)=>({type,groupsLength}),reportChangeInnerPropertyGroupFiltersType:(type,filtersLength)=>({type,filtersLength}),reportCorrelationViewed:(query,delay,propertiesTable)=>({query,delay,propertiesTable}),reportCorrelationInteraction:(correlationType,action,props)=>({correlationType,action,props}),reportCorrelationAnalysisFeedback:rating=>({rating}),reportCorrelationAnalysisDetailedFeedback:(rating,comments)=>({rating,comments}),reportBookmarkletDragged:!0,reportProjectCreationSubmitted:(projectCount,nameLength)=>({projectCount,nameLength}),reportProjectNoticeDismissed:key=>({key}),reportPersonPropertyUpdated:(action,totalProperties,oldPropertyType,newPropertyType)=>({action,totalProperties,oldPropertyType,newPropertyType}),reportDashboardViewed:(dashboard,lastRefreshed,delay)=>({dashboard,delay,lastRefreshed}),reportDashboardModeToggled:(mode,source)=>({mode,source}),reportDashboardRefreshed:(dashboardId,lastRefreshed)=>({dashboardId,lastRefreshed}),reportDashboardDateRangeChanged:(dateFrom,dateTo)=>({dateFrom,dateTo}),reportDashboardPropertiesChanged:!0,reportDashboardPinToggled:(pinned,source)=>({pinned,source}),reportDashboardFrontEndUpdate:(attribute,originalLength,newLength)=>({attribute,originalLength,newLength}),reportDashboardShareToggled:isShared=>({isShared}),reportUpgradeModalShown:featureName=>({featureName}),reportTimezoneComponentViewed:(component,project_timezone,device_timezone)=>({component,project_timezone,device_timezone}),reportTestAccountFiltersUpdated:filters=>({filters}),reportPoEModeUpdated:mode=>({mode}),reportPersonsJoinModeUpdated:mode=>({mode}),reportBounceRatePageViewModeUpdated:mode=>({mode}),reportSessionTableVersionUpdated:version=>({version}),reportCustomChannelTypeRulesUpdated:numRules=>({numRules}),reportPropertySelectOpened:!0,reportCreatedDashboardFromModal:!0,reportSavedInsightToDashboard:!0,reportRemovedInsightFromDashboard:!0,reportSavedInsightTabChanged:tab=>({tab}),reportSavedInsightFilterUsed:filterKeys=>({filterKeys}),reportSavedInsightLayoutChanged:layout=>({layout}),reportSavedInsightNewInsightClicked:insightType=>({insightType}),reportPersonSplit:merge_count=>({merge_count}),reportRecording:(playerData,durations,type,metadata,delay)=>({playerData,durations,type,delay,metadata}),reportHelpButtonViewed:!0,reportHelpButtonUsed:help_type=>({help_type}),reportRecordingsListFetched:(loadTime,filters,defaultDurationFilter)=>({loadTime,filters,defaultDurationFilter}),reportRecordingsListPropertiesFetched:loadTime=>({loadTime}),reportRecordingsListFilterAdded:filterType=>({filterType}),reportRecordingPlayerSeekbarEventHovered:!0,reportRecordingInspectorItemExpanded:(tab,index)=>({tab,index}),reportRecordingInspectorMiniFilterViewed:(minifilterKey,enabled)=>({minifilterKey,enabled}),reportNextRecordingTriggered:automatic=>({automatic}),reportRecordingExportedToFile:!0,reportRecordingLoadedFromFile:data=>data,reportRecordingListVisibilityToggled:(type,visible)=>({type,visible}),reportRecordingPinnedToList:pinned=>({pinned}),reportRecordingPlaylistCreated:source=>({source}),reportExperimentArchived:experiment=>({experiment}),reportExperimentReset:experiment=>({experiment}),reportExperimentCreated:experiment=>({experiment}),reportExperimentViewed:experiment=>({experiment}),reportExperimentLaunched:(experiment,launchDate)=>({experiment,launchDate}),reportExperimentStartDateChange:(experiment,newStartDate)=>({experiment,newStartDate}),reportExperimentCompleted:(experiment,endDate,duration,significant)=>({experiment,endDate,duration,significant}),reportExperimentExposureCohortCreated:(experiment,cohort)=>({experiment,cohort}),reportExperimentExposureCohortEdited:(existingCohort,newCohort)=>({existingCohort,newCohort}),reportExperimentInsightLoadFailed:!0,reportExperimentVariantShipped:experiment=>({experiment}),reportExperimentVariantScreenshotUploaded:experimentId=>({experimentId}),reportExperimentResultsLoadingTimeout:experimentId=>({experimentId}),reportExperimentReleaseConditionsViewed:experimentId=>({experimentId}),reportExperimentReleaseConditionsUpdated:experimentId=>({experimentId}),reportExperimentHoldoutCreated:holdout=>({holdout}),reportExperimentHoldoutAssigned:_ref=>{let{experimentId,holdoutId}=_ref;return{experimentId,holdoutId}},reportDataManagementDefinitionHovered:type=>({type}),reportDataManagementDefinitionClickView:type=>({type}),reportDataManagementDefinitionClickEdit:type=>({type}),reportDataManagementDefinitionSaveSucceeded:(type,loadTime)=>({type,loadTime}),reportDataManagementDefinitionSaveFailed:(type,loadTime,error)=>({type,loadTime,error}),reportDataManagementDefinitionCancel:type=>({type}),reportDataManagementEventDefinitionsPageLoadSucceeded:(loadTime,resultsLength)=>({loadTime,resultsLength}),reportDataManagementEventDefinitionsPageLoadFailed:(loadTime,error)=>({loadTime,error}),reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded:loadTime=>({loadTime}),reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed:(loadTime,error)=>({loadTime,error}),reportDataManagementEventPropertyDefinitionsPageLoadSucceeded:(loadTime,resultsLength)=>({loadTime,resultsLength}),reportDataManagementEventPropertyDefinitionsPageLoadFailed:(loadTime,error)=>({loadTime,error}),reportInsightRefreshTime:(loadingMilliseconds,insightShortId)=>({loadingMilliseconds,insightShortId}),reportInsightOpenedFromRecentInsightList:!0,reportRecordingOpenedFromRecentRecordingList:!0,reportPersonOpenedFromNewlySeenPersonsList:!0,reportIngestionContinueWithoutVerifying:!0,reportAutocaptureToggled:autocapture_opt_out=>({autocapture_opt_out}),reportAutocaptureExceptionsToggled:autocapture_opt_in=>({autocapture_opt_in}),reportHeatmapsToggled:heatmaps_opt_in=>({heatmaps_opt_in}),reportFailedToCreateFeatureFlagWithCohort:(code,detail)=>({code,detail}),reportFeatureFlagCopySuccess:!0,reportFeatureFlagCopyFailure:error=>({error}),reportFeatureFlagScheduleSuccess:!0,reportFeatureFlagScheduleFailure:error=>({error}),reportInviteMembersButtonClicked:!0,reportDashboardLoadingTime:(loadingMilliseconds,dashboardId)=>({loadingMilliseconds,dashboardId}),reportInstanceSettingChange:(name,value)=>({name,value}),reportAxisUnitsChanged:properties=>({...properties}),reportTeamSettingChange:(name,value)=>({name,value}),reportProjectSettingChange:(name,value)=>({name,value}),reportActivationSideBarTaskClicked:key=>({key}),reportBillingUpgradeClicked:plan=>({plan}),reportBillingDowngradeClicked:plan=>({plan}),reportRoleCreated:role=>({role}),reportResourceAccessLevelUpdated:(resourceType,roleName,accessLevel)=>({resourceType,roleName,accessLevel}),reportRoleCustomAddedToAResource:(resourceType,rolesLength)=>({resourceType,rolesLength}),reportFlagsCodeExampleInteraction:optionType=>({optionType}),reportFlagsCodeExampleLanguage:language=>({language}),reportSurveyViewed:survey=>({survey}),reportSurveyCreated:(survey,isDuplicate)=>({survey,isDuplicate}),reportSurveyEdited:survey=>({survey}),reportSurveyArchived:survey=>({survey}),reportSurveyTemplateClicked:template=>({template}),reportSurveyCycleDetected:survey=>({survey}),reportProductUnsubscribed:product=>({product}),reportSubscribedDuringOnboarding:productKey=>({productKey}),reportCommandBarStatusChanged:status=>({status}),reportCommandBarSearch:queryLength=>({queryLength}),reportCommandBarSearchResultOpened:type=>({type}),reportCommandBarActionSearch:query=>({query}),reportCommandBarActionResultExecuted:resultDisplay=>({resultDisplay}),reportBillingCTAShown:!0}),(0,index_esm.listeners)(_ref2=>{let{values}=_ref2;return{reportBillingCTAShown:()=>{dist_module.ZP.capture("billing CTA shown")},reportAxisUnitsChanged:properties=>{dist_module.ZP.capture("axis units changed",properties)},reportInstanceSettingChange:_ref3=>{let{name,value}=_ref3;dist_module.ZP.capture("instance setting change",{name,value})},reportDashboardLoadingTime:async _ref4=>{let{loadingMilliseconds,dashboardId}=_ref4;dist_module.ZP.capture("dashboard loading time",{loadingMilliseconds,dashboardId})},reportInsightRefreshTime:async _ref5=>{let{loadingMilliseconds,insightShortId}=_ref5;dist_module.ZP.capture("insight refresh time",{loadingMilliseconds,insightShortId})},reportPersonDetailViewed:async(_ref6,breakpoint)=>{let{person}=_ref6;await breakpoint(500);let custom_properties_count=0,posthog_properties_count=0;for(let prop of Object.keys(person.properties))taxonomy.t_.includes(prop)?posthog_properties_count+=1:custom_properties_count+=1;let properties={properties_count:Object.keys(person.properties).length,has_email:!!person.properties.email,has_name:!!person.properties.name,custom_properties_count,posthog_properties_count};dist_module.ZP.capture("person viewed",properties)},reportTimeToSeeData:async _ref7=>{let{payload}=_ref7;dist_module.ZP.capture("time to see data",payload)},reportInsightCreated:async(_ref8,breakpoint)=>{let{query}=_ref8;await breakpoint(500),dist_module.ZP.capture("insight created",{query_kind:query?.kind,query_source_kind:(0,queries_utils.gV)(query)?query.source.kind:void 0})},reportInsightSaved:async _ref9=>{let{query,isNewInsight}=_ref9;dist_module.ZP.capture("insight saved",{...sanitizeQuery(query),is_new_insight:isNewInsight})},reportInsightViewed:_ref10=>{var _insightModel$descrip,_insightModel$tags$le;let{insightModel,query,isFirstLoad,delay}=_ref10,payload={report_delay:delay,is_first_component_load:isFirstLoad,viewer_is_creator:insightModel.created_by?.uuid&&values.user?.uuid?insightModel.created_by?.uuid===values.user?.uuid:void 0,is_saved:insightModel.saved,description_length:null!==(_insightModel$descrip=insightModel.description?.length)&&void 0!==_insightModel$descrip?_insightModel$descrip:0,tags_count:null!==(_insightModel$tags$le=insightModel.tags?.length)&&void 0!==_insightModel$tags$le?_insightModel$tags$le:0,...sanitizeQuery(query)},eventName=delay?"insight analyzed":"insight viewed";dist_module.ZP.capture(eventName,(0,lib_utils.hO)(payload))},reportPersonsModalViewed:async _ref11=>{let{params}=_ref11;dist_module.ZP.capture("insight person modal viewed",params)},reportDashboardViewed:async(_ref12,breakpoint)=>{let{dashboard,lastRefreshed,delay}=_ref12;delay||await breakpoint(500);let{created_at,is_shared,pinned,creation_mode,id}=dashboard,properties={created_at,is_shared,pinned,creation_mode,sample_items_count:0,item_count:dashboard.tiles?.length||0,created_by_system:!dashboard.created_by,dashboard_id:id,lastRefreshed:lastRefreshed?.toISOString(),refreshAge:lastRefreshed?(0,dayjs.zO)().diff(lastRefreshed,"seconds"):void 0};for(let item of dashboard.tiles||[])if(item.insight){let query=(0,queries_utils.gV)(item.insight.query)?item.insight.query.source:item.insight.query,key=`${query?.kind||item.text?"text":"empty"}_count`;properties[key]?properties[key]+=1:properties[key]=1,properties.sample_items_count+=item.insight.is_sample?1:0}else properties.text_tiles_count?properties.text_tiles_count+=1:properties.text_tiles_count=1;dist_module.ZP.capture(delay?"dashboard analyzed":"viewed dashboard",properties)},reportBookmarkletDragged:async(_,breakpoint)=>{await breakpoint(500),dist_module.ZP.capture("bookmarklet drag start")},reportProjectCreationSubmitted:async _ref13=>{let{projectCount,nameLength}=_ref13;dist_module.ZP.capture("project create submitted",{current_project_count:projectCount,name_length:nameLength})},reportProjectNoticeDismissed:async _ref14=>{let{key}=_ref14;dist_module.ZP.capture("demo warning dismissed",{warning_key:key})},reportFunnelCalculated:async _ref15=>{let{eventCount,actionCount,interval,funnelVizType,success,error}=_ref15;dist_module.ZP.capture("funnel result calculated",{event_count:eventCount,action_count:actionCount,total_count_actions_events:eventCount+actionCount,interval:interval,funnel_viz_type:funnelVizType,success:success,error:error})},reportFunnelStepReordered:async()=>{dist_module.ZP.capture("funnel step reordered")},reportPersonPropertyUpdated:async _ref16=>{let{action,totalProperties,oldPropertyType,newPropertyType}=_ref16;dist_module.ZP.capture(`person property ${action}`,{old_property_type:"undefined"!==oldPropertyType?oldPropertyType:void 0,new_property_type:"undefined"!==newPropertyType?newPropertyType:void 0,total_properties:totalProperties})},reportDashboardModeToggled:async _ref17=>{let{mode,source}=_ref17;dist_module.ZP.capture("dashboard mode toggled",{mode,source})},reportDashboardRefreshed:async _ref18=>{let{dashboardId,lastRefreshed}=_ref18;dist_module.ZP.capture("dashboard refreshed",{dashboard_id:dashboardId,last_refreshed:lastRefreshed?.toString(),refreshAge:lastRefreshed?(0,dayjs.zO)().diff(lastRefreshed,"seconds"):void 0})},reportDashboardDateRangeChanged:async _ref19=>{let{dateFrom,dateTo}=_ref19;dist_module.ZP.capture("dashboard date range changed",{date_from:dateFrom?.toString()||"Custom",date_to:dateTo?.toString()})},reportDashboardPropertiesChanged:async()=>{dist_module.ZP.capture("dashboard properties changed")},reportDashboardPinToggled:async payload=>{dist_module.ZP.capture("dashboard pin toggled",payload)},reportDashboardFrontEndUpdate:async _ref20=>{let{attribute,originalLength,newLength}=_ref20;dist_module.ZP.capture("dashboard frontend updated",{attribute,original_length:originalLength,new_length:newLength})},reportDashboardShareToggled:async _ref21=>{let{isShared}=_ref21;dist_module.ZP.capture("dashboard share toggled",{is_shared:isShared})},reportUpgradeModalShown:async payload=>{dist_module.ZP.capture("upgrade modal shown",payload)},reportTimezoneComponentViewed:async payload=>{dist_module.ZP.capture("timezone component viewed",payload)},reportTestAccountFiltersUpdated:async _ref22=>{let{filters}=_ref22,payload={filters_count:filters.length,filters:filters.map(filter=>({key:filter.key,operator:filter.operator,value_length:filter.value.length}))};dist_module.ZP.capture("test account filters updated",payload)},reportPoEModeUpdated:async _ref23=>{let{mode}=_ref23;dist_module.ZP.capture("persons on events mode updated",{mode})},reportPersonJoinModeUpdated:async _ref24=>{let{mode}=_ref24;dist_module.ZP.capture("persons join mode updated",{mode})},reportBounceRatePageViewModeUpdated:async _ref25=>{let{mode}=_ref25;dist_module.ZP.capture("bounce rate page view mode updated",{mode})},reportSessionTableVersionUpdated:async _ref26=>{let{version}=_ref26;dist_module.ZP.capture("session table version updated",{version})},reportCustomChannelTypeRulesUpdated:async _ref27=>{let{numRules}=_ref27;dist_module.ZP.capture("custom channel type rules updated",{numRules})},reportInsightFilterRemoved:async _ref28=>{let{index}=_ref28;dist_module.ZP.capture("local filter removed",{index})},reportInsightFilterAdded:async _ref29=>{let{newLength}=_ref29;dist_module.ZP.capture("filter added",{newLength})},reportInsightFilterSet:async _ref30=>{let{filters}=_ref30;dist_module.ZP.capture("filters set",{filters})},reportEntityFilterVisibilitySet:async _ref31=>{let{index,visible}=_ref31;dist_module.ZP.capture("entity filter visbility set",{index,visible})},reportPropertySelectOpened:async()=>{dist_module.ZP.capture("property select toggle opened")},reportCreatedDashboardFromModal:async()=>{dist_module.ZP.capture("created new dashboard from modal")},reportSavedInsightToDashboard:async()=>{dist_module.ZP.capture("saved insight to dashboard")},reportRemovedInsightFromDashboard:async()=>{dist_module.ZP.capture("removed insight from dashboard")},reportInsightsTableCalcToggled:async payload=>{dist_module.ZP.capture("insights table calc toggled",payload)},reportSavedInsightFilterUsed:_ref32=>{let{filterKeys}=_ref32;dist_module.ZP.capture("saved insights list page filter used",{filter_keys:filterKeys})},reportSavedInsightTabChanged:_ref33=>{let{tab}=_ref33;dist_module.ZP.capture("saved insights list page tab changed",{tab})},reportSavedInsightLayoutChanged:_ref34=>{let{layout}=_ref34;dist_module.ZP.capture("saved insights list page layout changed",{layout})},reportSavedInsightNewInsightClicked:_ref35=>{let{insightType}=_ref35;dist_module.ZP.capture("saved insights new insight clicked",{insight_type:insightType})},reportRecording:_ref36=>{var _playerData$start$val,_playerData$end$value,_durations$firstPaint;let{playerData,durations,type,metadata}=_ref36,eventIndex=new EventIndex(playerData?.snapshots||[]),payload={snapshots_load_time:durations.snapshots,metadata_load_time:durations.metadata,events_load_time:durations.events,first_paint_load_time:durations.firstPaint,duration:eventIndex.getDuration(),recording_id:playerData.sessionRecordingId,start_time:null!==(_playerData$start$val=playerData.start?.valueOf())&&void 0!==_playerData$start$val?_playerData$start$val:0,end_time:null!==(_playerData$end$value=playerData.end?.valueOf())&&void 0!==_playerData$end$value?_playerData$end$value:0,page_change_events_length:eventIndex.pageChangeEvents().length,recording_width:eventIndex.getRecordingScreenMetadata(0)[0]?.width,load_time:null!==(_durations$firstPaint=durations.firstPaint)&&void 0!==_durations$firstPaint?_durations$firstPaint:0,snapshot_source:metadata?.snapshot_source||"unknown"};dist_module.ZP.capture(`recording ${type}`,payload)},reportPersonSplit:props=>{dist_module.ZP.capture("split person started",props)},reportHelpButtonViewed:()=>{dist_module.ZP.capture("help button viewed")},reportHelpButtonUsed:props=>{dist_module.ZP.capture("help button used",props)},reportCorrelationAnalysisFeedback:props=>{dist_module.ZP.capture("correlation analysis feedback",props)},reportCorrelationAnalysisDetailedFeedback:props=>{dist_module.ZP.capture("correlation analysis detailed feedback",props)},reportCorrelationInteraction:_ref37=>{let{correlationType,action,props}=_ref37;dist_module.ZP.capture("correlation interaction",{correlation_type:correlationType,action,...props})},reportCorrelationViewed:_ref38=>{let{delay,query,propertiesTable}=_ref38,payload=sanitizeQuery(query);0===delay?dist_module.ZP.capture(`correlation${propertiesTable?" properties":""} viewed`,payload):dist_module.ZP.capture(`correlation${propertiesTable?" properties":""} analyzed`,{...payload,delay})},reportRecordingsListFilterAdded:_ref39=>{let{filterType}=_ref39;dist_module.ZP.capture("recording list filter added",{filter_type:filterType})},reportRecordingsListFetched:_ref40=>{let{loadTime,filters,defaultDurationFilter}=_ref40,filterValues=(0,session_recordings_utils.Ri)(filters),eventFilters=filterValues.filter(UniversalFilters_utils.Lu),actionFilters=filterValues.filter(UniversalFilters_utils.$e),propertyFilters=filterValues.filter(utils.RG),consoleLogFilters=propertyFilters.filter(utils.B9),filterBreakdown=filters&&defaultDurationFilter?{hasEventsFilters:!!eventFilters.length,hasActionsFilters:!!actionFilters.length,hasPropertiesFilters:!!propertyFilters.length,hasCohortFilter:propertyFilters.some(p=>p.type===types.FT.Cohort),hasPersonFilter:propertyFilters.some(p=>p.type===types.FT.Person),hasDurationFilters:(filters.duration[0].value||-1)>defaultDurationFilter.value,hasConsoleLogsFilters:!!consoleLogFilters.length}:{};dist_module.ZP.capture("recording list fetched",{load_time:loadTime,listing_version:"3",filters,...filterBreakdown})},reportRecordingsListPropertiesFetched:_ref41=>{let{loadTime}=_ref41;dist_module.ZP.capture("recording list properties fetched",{load_time:loadTime})},reportRecordingPlayerSeekbarEventHovered:()=>{dist_module.ZP.capture("recording player seekbar event hovered")},reportRecordingInspectorItemExpanded:_ref42=>{let{tab,index}=_ref42;dist_module.ZP.capture("recording inspector item expanded",{tab:"replay-4000",type:tab,index})},reportRecordingInspectorMiniFilterViewed:_ref43=>{let{minifilterKey,enabled}=_ref43;dist_module.ZP.capture("recording inspector minifilter selected",{tab:"replay-4000",enabled,minifilterKey})},reportNextRecordingTriggered:_ref44=>{let{automatic}=_ref44;dist_module.ZP.capture("recording next recording triggered",{automatic})},reportRecordingExportedToFile:()=>{dist_module.ZP.capture("recording exported to file")},reportRecordingLoadedFromFile:properties=>{dist_module.ZP.capture("recording loaded from file",properties)},reportRecordingListVisibilityToggled:properties=>{dist_module.ZP.capture("recording list visibility toggled",properties)},reportRecordingPinnedToList:properties=>{dist_module.ZP.capture("recording pinned to list",properties)},reportRecordingPlaylistCreated:properties=>{dist_module.ZP.capture("recording playlist created",properties)},reportExperimentArchived:_ref45=>{let{experiment}=_ref45;dist_module.ZP.capture("experiment archived",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters})},reportExperimentReset:_ref46=>{let{experiment}=_ref46;dist_module.ZP.capture("experiment reset",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters})},reportExperimentCreated:_ref47=>{let{experiment}=_ref47;dist_module.ZP.capture("experiment created",{name:experiment.name,id:experiment.id,type:experiment.type,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentViewed:_ref48=>{let{experiment}=_ref48;dist_module.ZP.capture("experiment viewed",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentLaunched:_ref49=>{let{experiment,launchDate}=_ref49;dist_module.ZP.capture("experiment launched",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length,launch_date:launchDate.toISOString()})},reportExperimentStartDateChange:_ref50=>{let{experiment,newStartDate}=_ref50;dist_module.ZP.capture("experiment start date changed",{name:experiment.name,id:experiment.id,old_start_date:experiment.start_date,new_start_date:newStartDate})},reportExperimentCompleted:_ref51=>{let{experiment,endDate,duration,significant}=_ref51;dist_module.ZP.capture("experiment completed",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length,end_date:endDate.toISOString(),duration,significant})},reportExperimentExposureCohortCreated:_ref52=>{let{experiment,cohort}=_ref52;dist_module.ZP.capture("experiment exposure cohort created",{experiment_id:experiment.id,cohort_filters:cohort.filters})},reportExperimentExposureCohortEdited:_ref53=>{let{existingCohort,newCohort}=_ref53;dist_module.ZP.capture("experiment exposure cohort edited",{existing_filters:existingCohort.filters,new_filters:newCohort.filters,id:newCohort.id})},reportExperimentInsightLoadFailed:()=>{dist_module.ZP.capture("experiment load insight failed")},reportExperimentVariantShipped:_ref54=>{let{experiment}=_ref54;dist_module.ZP.capture("experiment variant shipped",{name:experiment.name,id:experiment.id,filters:sanitizeFilterParams(experiment.filters),parameters:experiment.parameters,secondary_metrics_count:experiment.secondary_metrics.length})},reportExperimentVariantScreenshotUploaded:_ref55=>{let{experimentId}=_ref55;dist_module.ZP.capture("experiment variant screenshot uploaded",{experiment_id:experimentId})},reportExperimentResultsLoadingTimeout:_ref56=>{let{experimentId}=_ref56;dist_module.ZP.capture("experiment results loading timeout",{experiment_id:experimentId})},reportExperimentReleaseConditionsViewed:_ref57=>{let{experimentId}=_ref57;dist_module.ZP.capture("experiment release conditions viewed",{experiment_id:experimentId})},reportExperimentReleaseConditionsUpdated:_ref58=>{let{experimentId}=_ref58;dist_module.ZP.capture("experiment release conditions updated",{experiment_id:experimentId})},reportExperimentHoldoutCreated:_ref59=>{let{holdout}=_ref59;dist_module.ZP.capture("experiment holdout created",{name:holdout.name,holdout_id:holdout.id,filters:holdout.filters})},reportExperimentHoldoutAssigned:_ref60=>{let{experimentId,holdoutId}=_ref60;dist_module.ZP.capture("experiment holdout assigned",{experiment_id:experimentId,holdout_id:holdoutId})},reportPropertyGroupFilterAdded:()=>{dist_module.ZP.capture("property group filter added")},reportChangeOuterPropertyGroupFiltersType:_ref61=>{let{type,groupsLength}=_ref61;dist_module.ZP.capture("outer match property groups type changed",{type,groupsLength})},reportChangeInnerPropertyGroupFiltersType:_ref62=>{let{type,filtersLength}=_ref62;dist_module.ZP.capture("inner match property group filters type changed",{type,filtersLength})},reportDataManagementDefinitionHovered:_ref63=>{let{type}=_ref63;dist_module.ZP.capture("definition hovered",{type})},reportDataManagementDefinitionClickView:_ref64=>{let{type}=_ref64;dist_module.ZP.capture("definition click view",{type})},reportDataManagementDefinitionClickEdit:_ref65=>{let{type}=_ref65;dist_module.ZP.capture("definition click edit",{type})},reportDataManagementDefinitionSaveSucceeded:_ref66=>{let{type,loadTime}=_ref66;dist_module.ZP.capture("definition save succeeded",{type,load_time:loadTime})},reportDataManagementDefinitionSaveFailed:_ref67=>{let{type,loadTime,error}=_ref67;dist_module.ZP.capture("definition save failed",{type,load_time:loadTime,error})},reportDataManagementDefinitionCancel:_ref68=>{let{type}=_ref68;dist_module.ZP.capture("definition cancelled",{type})},reportDataManagementEventDefinitionsPageLoadSucceeded:_ref69=>{let{loadTime,resultsLength}=_ref69;dist_module.ZP.capture("event definitions page load succeeded",{load_time:loadTime,num_results:resultsLength})},reportDataManagementEventDefinitionsPageLoadFailed:_ref70=>{let{loadTime,error}=_ref70;dist_module.ZP.capture("event definitions page load failed",{load_time:loadTime,error})},reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded:_ref71=>{let{loadTime}=_ref71;dist_module.ZP.capture("event definitions page event nested properties load succeeded",{load_time:loadTime})},reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed:_ref72=>{let{loadTime,error}=_ref72;dist_module.ZP.capture("event definitions page event nested properties load failed",{load_time:loadTime,error})},reportDataManagementEventPropertyDefinitionsPageLoadSucceeded:_ref73=>{let{loadTime,resultsLength}=_ref73;dist_module.ZP.capture("event property definitions page load succeeded",{load_time:loadTime,num_results:resultsLength})},reportDataManagementEventPropertyDefinitionsPageLoadFailed:_ref74=>{let{loadTime,error}=_ref74;dist_module.ZP.capture("event property definitions page load failed",{load_time:loadTime,error})},reportInsightOpenedFromRecentInsightList:()=>{dist_module.ZP.capture("insight opened from recent insight list")},reportRecordingOpenedFromRecentRecordingList:()=>{dist_module.ZP.capture("recording opened from recent recording list")},reportPersonOpenedFromNewlySeenPersonsList:()=>{dist_module.ZP.capture("person opened from newly seen persons list")},reportIngestionContinueWithoutVerifying:()=>{dist_module.ZP.capture("ingestion continue without verifying")},reportAutocaptureToggled:_ref75=>{let{autocapture_opt_out}=_ref75;dist_module.ZP.capture("autocapture toggled",{autocapture_opt_out})},reportAutocaptureExceptionsToggled:_ref76=>{let{autocapture_opt_in}=_ref76;dist_module.ZP.capture("autocapture exceptions toggled",{autocapture_opt_in})},reportHeatmapsToggled:_ref77=>{let{heatmaps_opt_in}=_ref77;dist_module.ZP.capture("heatmaps toggled",{heatmaps_opt_in})},reportFailedToCreateFeatureFlagWithCohort:_ref78=>{let{detail,code}=_ref78;dist_module.ZP.capture("failed to create feature flag with cohort",{detail,code})},reportFeatureFlagCopySuccess:()=>{dist_module.ZP.capture("feature flag copied")},reportFeatureFlagCopyFailure:_ref79=>{let{error}=_ref79;dist_module.ZP.capture("feature flag copy failure",{error})},reportFeatureFlagScheduleSuccess:()=>{dist_module.ZP.capture("feature flag scheduled")},reportFeatureFlagScheduleFailure:_ref80=>{let{error}=_ref80;dist_module.ZP.capture("feature flag schedule failure",{error})},reportInviteMembersButtonClicked:()=>{dist_module.ZP.capture("invite members button clicked")},reportTeamSettingChange:_ref81=>{let{name,value}=_ref81;dist_module.ZP.capture(`${name} team setting updated`,{setting:name,value})},reportProjectSettingChange:_ref82=>{let{name,value}=_ref82;dist_module.ZP.capture(`${name} project setting updated`,{setting:name,value})},reportActivationSideBarTaskClicked:_ref83=>{let{key}=_ref83;dist_module.ZP.capture("activation sidebar task clicked",{key})},reportBillingUpgradeClicked:_ref84=>{let{plan}=_ref84;dist_module.ZP.capture("billing upgrade button clicked",{plan})},reportBillingDowngradeClicked:_ref85=>{let{plan}=_ref85;dist_module.ZP.capture("billing downgrade button clicked",{plan})},reportRoleCreated:_ref86=>{let{role}=_ref86;dist_module.ZP.capture("new role created",{role})},reportResourceAccessLevelUpdated:_ref87=>{let{resourceType,roleName,accessLevel}=_ref87;dist_module.ZP.capture("resource access level updated",{resource_type:resourceType,role_name:roleName,access_level:accessLevel})},reportRoleCustomAddedToAResource:_ref88=>{let{resourceType,rolesLength}=_ref88;dist_module.ZP.capture("role custom added to a resource",{resource_type:resourceType,roles_length:rolesLength})},reportFlagsCodeExampleInteraction:_ref89=>{let{optionType}=_ref89;dist_module.ZP.capture("flags code example option selected",{option_type:optionType})},reportFlagsCodeExampleLanguage:_ref90=>{let{language}=_ref90;dist_module.ZP.capture("flags code example language selected",{language})},reportSurveyCreated:_ref91=>{let{survey,isDuplicate}=_ref91,questionsWithShuffledOptions=survey.questions.filter(question=>question.hasOwnProperty("shuffleOptions")&&question.shuffleOptions);dist_module.ZP.capture("survey created",{name:survey.name,id:survey.id,survey_type:survey.type,questions_length:survey.questions.length,question_types:survey.questions.map(question=>question.type),is_duplicate:null!=isDuplicate&&isDuplicate,events_count:survey.conditions?.events?.values.length,recurring_survey_iteration_count:void 0==survey.iteration_count?0:survey.iteration_count,recurring_survey_iteration_interval:void 0==survey.iteration_frequency_days?0:survey.iteration_frequency_days,shuffle_questions_enabled:!!survey.appearance?.shuffleQuestions,shuffle_question_options_enabled_count:questionsWithShuffledOptions.length,has_branching_logic:survey.questions.some(question=>question.branching&&Object.keys(question.branching).length>0)})},reportSurveyViewed:_ref92=>{let{survey}=_ref92;dist_module.ZP.capture("survey viewed",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,end_date:survey.end_date})},reportSurveyArchived:_ref93=>{let{survey}=_ref93;dist_module.ZP.capture("survey archived",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,end_date:survey.end_date})},reportSurveyEdited:_ref94=>{let{survey}=_ref94,questionsWithShuffledOptions=survey.questions.filter(question=>question.hasOwnProperty("shuffleOptions")&&question.shuffleOptions);dist_module.ZP.capture("survey edited",{name:survey.name,id:survey.id,created_at:survey.created_at,start_date:survey.start_date,events_count:survey.conditions?.events?.values.length,recurring_survey_iteration_count:void 0==survey.iteration_count?0:survey.iteration_count,recurring_survey_iteration_interval:void 0==survey.iteration_frequency_days?0:survey.iteration_frequency_days,shuffle_questions_enabled:!!survey.appearance?.shuffleQuestions,shuffle_question_options_enabled_count:questionsWithShuffledOptions.length,has_branching_logic:survey.questions.some(question=>question.branching&&Object.keys(question.branching).length>0)})},reportSurveyTemplateClicked:_ref95=>{let{template}=_ref95;dist_module.ZP.capture("survey template clicked",{template})},reportSurveyCycleDetected:_ref96=>{let{survey}=_ref96;dist_module.ZP.capture("survey cycle detected",{name:survey.name,id:survey.id,start_date:survey.start_date,end_date:survey.end_date})},reportProductUnsubscribed:_ref97=>{let{product}=_ref97,property_key=`unsubscribed_from_${product}`;dist_module.ZP.capture("product unsubscribed",{product,$set:{[property_key]:!0}})},reportSubscribedDuringOnboarding:_ref98=>{let{productKey}=_ref98;dist_module.ZP.capture("subscribed during onboarding",{product_key:productKey})},reportCommandBarStatusChanged:_ref99=>{let{status}=_ref99;dist_module.ZP.capture("command bar status changed",{status})},reportCommandBarSearch:_ref100=>{let{queryLength}=_ref100;dist_module.ZP.capture("command bar search",{queryLength})},reportCommandBarSearchResultOpened:_ref101=>{let{type}=_ref101;dist_module.ZP.capture("command bar search result opened",{type})},reportCommandBarActionSearch:_ref102=>{let{query}=_ref102;dist_module.ZP.capture("command bar action search",{query})},reportCommandBarActionResultExecuted:_ref103=>{let{resultDisplay}=_ref103;dist_module.ZP.capture("command bar search result executed",{resultDisplay})}}})])},"./frontend/src/lib/utils/file-utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function selectFiles(options){return new Promise((resolve,reject)=>{let input=document.createElement("input");input.type="file",input.multiple=options.multiple,input.accept=options.contentType,input.onchange=()=>{if(!input.files)return resolve([]);let files=Array.from(input.files);resolve(files)},input.oncancel=()=>{resolve([])},input.onerror=()=>{reject(Error("Error selecting file"))},input.click()})}function getTextFromFile(file){return new Promise((resolve,reject)=>{let filereader=new FileReader;filereader.onload=e=>{resolve(e.target?.result)},filereader.onerror=e=>{reject(e)},filereader.readAsText(file)})}__webpack_require__.d(__webpack_exports__,{l:()=>selectFiles,m:()=>getTextFromFile})},"./frontend/src/lib/utils/getAppContext.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fj:()=>getAppContext,XO:()=>getDefaultEventName,Zy:()=>getDefaultEventLabel,ev:()=>getCurrentTeamId});var _types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/types.ts");function getAppContext(){return window.POSTHOG_APP_CONTEXT||void 0}function getDefaultEventName(){return getAppContext()?.default_event_name||_types__WEBPACK_IMPORTED_MODULE_0__.cB.PageView}function getDefaultEventLabel(){let name=getDefaultEventName();return name===_types__WEBPACK_IMPORTED_MODULE_0__.cB.PageView?"Pageview":name===_types__WEBPACK_IMPORTED_MODULE_0__.cB.Screen?"Screen":name}function getCurrentTeamId(){let maybeTeamId=getAppContext()?.current_team?.id;if(!maybeTeamId)throw Error(`Project ID is not known.${getAppContext()?.anonymous?" User is anonymous.":""}`);return maybeTeamId}},"./frontend/src/lib/utils/kea-logic-builders.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>permanentlyMount});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");function permanentlyMount(){return logic=>{(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(()=>{logic.cache._permanentMount||(logic.cache._permanentMount=!0,logic.wrapper.mount())})(logic)}}},"./frontend/src/lib/utils/permissioning.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F9:()=>getReasonForAccessLevelChangeProhibition,WS:()=>membershipLevelToName,YR:()=>teamMembershipLevelIntegers,mr:()=>organizationMembershipLevelIntegers});var _constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/constants.tsx");function getReasonForAccessLevelChangeProhibition(currentMembershipLevel,currentUser,memberToBeUpdated,newLevelOrAllowedLevels){let effectiveLevelToBeUpdated;if(memberToBeUpdated.user.uuid===currentUser.uuid)return"You can't change your own access level.";if(!currentMembershipLevel)return"Your membership level is unknown.";if(effectiveLevelToBeUpdated="effectiveLevel"in memberToBeUpdated?memberToBeUpdated.effective_level:memberToBeUpdated.level,Array.isArray(newLevelOrAllowedLevels)){if(currentMembershipLevel===_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Owner)return null;if(!newLevelOrAllowedLevels.length)return"You don't have permission to change this member's access level."}else{if(newLevelOrAllowedLevels===effectiveLevelToBeUpdated)return"It doesn't make sense to set the same level as before.";if(currentMembershipLevel===_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Owner)return null;if(newLevelOrAllowedLevels>currentMembershipLevel)return"You can only change access level of others to lower or equal to your current one."}return currentMembershipLevel<_constants__WEBPACK_IMPORTED_MODULE_0__.Dk.Admin?"You don't have permission to change access levels.":currentMembershipLevel"number"==typeof value),teamMembershipLevelIntegers=Object.values(_constants__WEBPACK_IMPORTED_MODULE_0__.ZN).filter(value=>"number"==typeof value)},"./frontend/src/lib/utils/router-utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Jf:()=>addProjectIdIfMissing,YZ:()=>removeFlagIdIfPresent,sv:()=>removeProjectIdIfPresent});var _getAppContext__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts");let pathsWithoutProjectId=["api","me","instance","organization","preflight","login","signup","create-organization","account"];function removeProjectIdIfPresent(path){return path.match(/^\/project\/\d+/)?"/"+path.split("/").splice(3).join("/"):path}function removeFlagIdIfPresent(path){return path.match(/^\/feature_flags\/\d+/)?path.replace(/(feature_flags).*$/,"$1/"):path}function addProjectIdIfMissing(path,teamId){return!function(path){let firstPart=path.split("/")[1];return pathsWithoutProjectId.includes(firstPart)}(removeProjectIdIfPresent(path))?function(path,teamId){if(path.match(/^\/project\/\d+/))return path;let prefix="";try{if(prefix=`/project/${null!=teamId?teamId:(0,_getAppContext__WEBPACK_IMPORTED_MODULE_0__.ev)()}`,"/"==path)return prefix}catch(e){}return path===prefix||path.startsWith(prefix+"/")?path:`${prefix}/${path.startsWith("/")?path.slice(1):path}`}(path,teamId):removeProjectIdIfPresent(path)}},"./frontend/src/lib/utils/semver.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function parseVersion(version){let split=version.split("-",2);version=split[0];let extra=split[1],match=version.match(/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?$/);if(!match)throw Error(`Invalid semver string: ${version}`);let[,major,minor,patch]=match,majorInt=parseInt(major,10),minorInt=null!=minor?parseInt(minor,10):void 0,patchInt=null!=patch?parseInt(patch,10):void 0;if(isNaN(majorInt)||null!=minorInt&&isNaN(minorInt)||null!=patchInt&&isNaN(patchInt))throw Error(`Invalid semver string: ${version}`);return{major:majorInt,minor:minorInt,patch:patchInt,extra}}function tryParseVersion(version){try{return parseVersion(version)}catch{return null}}function diffVersions(a,b){var _pa$minor,_pb$minor,_pa$patch,_pb$patch;let pa="string"==typeof a?parseVersion(a):a,pb="string"==typeof b?parseVersion(b):b;if(pa.major!==pb.major)return{kind:"major",diff:pa.major-pb.major};if(pa.minor!==pb.minor)return{kind:"minor",diff:(null!==(_pa$minor=pa.minor)&&void 0!==_pa$minor?_pa$minor:0)-(null!==(_pb$minor=pb.minor)&&void 0!==_pb$minor?_pb$minor:0)};if(pa.patch!==pb.patch)return{kind:"patch",diff:(null!==(_pa$patch=pa.patch)&&void 0!==_pa$patch?_pa$patch:0)-(null!==(_pb$patch=pb.patch)&&void 0!==_pb$patch?_pb$patch:0)};if(pa.extra!==pb.extra){if(pa.extra)return pb.extra?{kind:"extra",diff:pa.extra.localeCompare(pb.extra)}:{kind:"extra",diff:-1};if(pb.extra)return{kind:"extra",diff:1}}return null}function compareVersion(a,b){let diff=diffVersions(a,b);return diff?diff.diff:0}function highestVersion(versions){let parsed=versions.map(v=>"string"==typeof v?parseVersion(v):v);return parsed.sort(compareVersion),parsed[parsed.length-1]}function isEqualVersion(a,b){return null===diffVersions(a,b)}function versionToString(version){let versionPart=`${version.major}${null!=version.minor?`.${version.minor}${null!=version.patch?`.${version.patch}`:""}`:""}`;return version.extra?`${versionPart}-${version.extra}`:versionPart}function createVersionChecker(requiredVersion){return version=>{let diff=diffVersions(version,requiredVersion);return!diff||diff.diff>0}}__webpack_require__.d(__webpack_exports__,{FL:()=>isEqualVersion,Ff:()=>createVersionChecker,I4:()=>diffVersions,Jt:()=>tryParseVersion,L$:()=>versionToString,ej:()=>highestVersion,wy:()=>parseVersion})},"./frontend/src/lib/utils/stringWithWBR.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>stringWithWBR});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function stringWithWBR(text){let splitAt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,addWBRAfter=[",",".","/","\\"],naturalSplit=[" ","-"],returnArray=[],final="",sinceSplit=0,i=0;return""===text?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("i",{children:"(empty string)"}):(text.split("").forEach(letter=>{addWBRAfter.indexOf(letter)>=0||sinceSplit>=splitAt?(sinceSplit=0,final+=letter,returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:final},i++)),returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("wbr",{},i++)),final=""):(naturalSplit.indexOf(letter)>=0?sinceSplit=0:sinceSplit+=1,final+=letter)}),final&&returnArray.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:final},i++)),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:returnArray}))}},"./frontend/src/mocks/browser.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{KK:()=>worker,ok:()=>useStorybookMocks,x8:()=>mswDecorator,zt:()=>setFeatureFlags});var msw__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/msw@0.49.0_typescript@4.9.5/node_modules/msw/lib/index.js"),_mocks_handlers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/mocks/handlers.ts"),_mocks_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/mocks/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let worker=(0,msw__WEBPACK_IMPORTED_MODULE_2__.setupWorker)(..._mocks_handlers__WEBPACK_IMPORTED_MODULE_0__.qi),useStorybookMocks=mocks=>worker.use(...(0,_mocks_utils__WEBPACK_IMPORTED_MODULE_3__.D)(mocks)),mswDecorator=mocks=>function StoryMock(Story,_ref){let{parameters}=_ref,mergedMocks={};for(let restMethod of Object.keys(msw__WEBPACK_IMPORTED_MODULE_2__.rest)){for(let[path,handler]of(mergedMocks[restMethod]={},Object.entries(parameters.msw?.mocks?.[restMethod]||{}))){let cleanedPath=path.replace(/\/?$/,"/");mergedMocks[restMethod][cleanedPath]=handler}for(let[path,handler]of Object.entries(mocks?.[restMethod]||{})){let cleanedPath=path.replace(/\/?$/,"/");mergedMocks[restMethod][cleanedPath]=handler}}return useStorybookMocks(mergedMocks),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Story,{})},setFeatureFlags=featureFlags=>{window.POSTHOG_APP_CONTEXT.persisted_feature_flags=featureFlags}},"./frontend/src/mocks/features.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>getAvailableProductFeatures,y:()=>useAvailableFeatures});let features=[],useAvailableFeatures=f=>{features=f},getAvailableProductFeatures=()=>features.map(feature=>({key:feature,name:feature}))},"./frontend/src/mocks/fixtures/_billing.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>billingJson});var lib_dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/dayjs.ts");let billingJson={customer_id:"cus_Pg7PIL8MsKi6bx",deactivated:!1,has_active_subscription:!0,billing_period:{current_period_start:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_0__.Bv)("2024-03-07T22:54:32Z"),current_period_end:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_0__.Bv)("2024-04-07T22:54:32Z"),interval:"month"},current_total_amount_usd:"403.07",current_total_amount_usd_after_discount:"403.07",products:[{name:"Product analytics",headline:"Product analytics with autocapture",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",price_description:null,usage_key:"events",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",screenshot_url:"https://posthog.com/images/products/product-analytics/screenshot-product-analytics.png",icon_key:"IconGraph",docs_url:"https://posthog.com/docs/product-analytics",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"product_analytics",name:"Free",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",docs_url:"https://posthog.com/docs/product-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:1e6,features:[{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",unit:null,limit:null,note:null},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",unit:null,limit:null,note:null},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",unit:null,limit:null,note:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",unit:null,limit:null,note:"Limited"},{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20240111",product_key:"product_analytics",name:"Paid",description:"A comprehensive product analytics platform built to natively work with session replay, feature flags, experiments, and surveys.",image_url:"https://posthog.com/images/products/product-analytics/product-analytics.png",docs_url:"https://posthog.com/docs/product-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",unit:null,limit:null,note:null},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",unit:null,limit:null,note:null},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",unit:null,limit:null,note:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",unit:null,limit:null,note:null},{key:"subscriptions",name:"Insight & dashboard subscriptions",description:"Create a subscription for any insight or dashboard in PostHog to receive regular reports with their updates.",unit:null,limit:null,note:null},{key:"paths_advanced",name:"Advanced paths",description:"Customize your path insights by setting the maximum number of paths, number of people on each path, and how path names should appear.",unit:null,limit:null,note:null},{key:"correlation_analysis",name:"Correlation analysis",description:"Automatically highlight significant factors that affect the conversion rate of users within a funnel.",unit:null,limit:null,note:null},{key:"behavioral_cohort_filtering",name:"Lifecycle",description:"Discover how your active users break down, highlighting those who have recently stopped being active or those who have just become active for the first time.",unit:null,limit:null,note:null},{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00031",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00013",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000819",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000455",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000234",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000052",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null}],type:"product_analytics",free_allocation:0,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:882128,projected_usage:1e6,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.00031",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1e6,projected_amount_usd:"310.00"},{flat_amount_usd:"0",unit_amount_usd:"0.00013",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:5e6,projected_amount_usd:"650.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0000819",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000455",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000234",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000052",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:"0.00",current_amount_usd:"0.00",current_usage:882128,usage_limit:882128,has_exceeded_limit:!1,percentage_usage:.4423939206,projected_usage:7e6,projected_amount_usd:"960.00",unit:"event",addons:[{name:"Group analytics",inclusion_only:!1,features:[{key:"group_analytics",name:"Group analytics",description:"Associate events with a group - such as a company, community, or project - and analyze them in that context.",unit:null,limit:null,note:null}],description:"Associate events with a group or entity - such as a company, community, or project. Analyze these events as if they were sent by that entity itself. Great for B2B, marketplaces, and more.",price_description:null,image_url:"https://posthog.com/images/product/product-icons/group-analytics.svg",icon_key:"IconPeople",docs_url:"https://posthog.com/docs/product-analytics/group-analytics",type:"group_analytics",tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:882128,projected_usage:1e6,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0000708",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1e6,projected_amount_usd:"70.8"},{flat_amount_usd:"0",unit_amount_usd:"0.00003",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:1910636,projected_amount_usd:"57.32"},{flat_amount_usd:"0",unit_amount_usd:"0.0000189",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000105",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000054",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000012",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,included_with_main_product:!1,subscribed:!0,unit:"event",unit_amount_usd:null,current_amount_usd:null,current_usage:882128,projected_usage:3910636,projected_amount_usd:"128.12",plans:[{plan_key:"addon-20230509",product_key:"group_analytics",name:"Addon",description:"Associate events with a group or entity - such as a company, community, or project. Analyze these events as if they were sent by that entity itself. Great for B2B, marketplaces, and more.",image_url:"https://posthog.com/images/product/product-icons/group-analytics.svg",docs_url:"https://posthog.com/docs/product-analytics/group-analytics",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"group_analytics",name:"Group analytics",description:"Associate events with a group - such as a company, community, or project - and analyze them in that context.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000708",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00003",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000189",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000105",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000054",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000012",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],contact_support:!1},{name:"Data pipelines",inclusion_only:!1,features:[{key:"data_pipelines",name:"Data pipelines",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",unit:null,limit:null,note:null}],description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",price_description:null,image_url:"None",icon_key:"IconDecisionTree",docs_url:"https://posthog.com/docs/cdp/batch-exports",type:"data_pipelines",tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000248",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000104",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000655",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000364",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000187",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000042",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,included_with_main_product:!1,subscribed:!1,unit:"event",unit_amount_usd:null,current_amount_usd:null,current_usage:0,projected_usage:0,projected_amount_usd:"0.00",plans:[{plan_key:"addon-20240111",product_key:"data_pipelines",name:"Addon",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",image_url:null,docs_url:"https://posthog.com/docs/cdp/batch-exports",note:null,unit:"event",flat_rate:!1,free_allocation:null,features:[{key:"data_pipelines",name:"Data pipelines",description:"Get your PostHog data into your data warehouse or other tools like BigQuery, Redshift, Customer.io, and more.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000248",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000104",up_to:15e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000655",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000364",up_to:1e8,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000187",up_to:25e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0000042",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],contact_support:!1}],contact_support:!1,inclusion_only:!1,features:[{key:"product_analytics_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"dashboards",name:"Dashboards",description:"Save trends, funnels, and other insights for easy reference by your whole team.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-dashboards.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-dashboards-dark.png"},icon_key:null,type:"primary"},{key:"funnels",name:"Funnels",description:"Visualize user dropoff between a sequence of events. See conversion rate over time, use flexible step ordering, set exclusion steps, and more.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-funnels.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-funnels-dark.png"},icon_key:null,type:"primary"},{key:"graphs_trends",name:"Graphs & trends",description:"Plot any number of events or actions over time.",images:null,icon_key:null,type:null},{key:"paths",name:"User paths",description:"Limited paths excludes: customizing path insights by setting the maximum number of paths, number of people on each path, how path names appear",images:null,icon_key:null,type:null},{key:"insights",name:"Unlimited Insights",description:"Trends, funnels, retention, user paths, stickiness, and lifecycle insights to visualize your data.",images:null,icon_key:null,type:null},{key:"subscriptions",name:"Insight & dashboard subscriptions",description:"Create a subscription for any insight or dashboard in PostHog to receive regular reports with their updates.",images:null,icon_key:"IconNotification",type:"secondary"},{key:"paths_advanced",name:"Advanced paths",description:"Customize your path insights by setting the maximum number of paths, number of people on each path, and how path names should appear.",images:null,icon_key:null,type:null},{key:"correlation_analysis",name:"Correlation analysis",description:"Automatically highlight significant factors that affect the conversion rate of users within a funnel.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-correlation-analysis.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-correlation-analysis-dark.png"},icon_key:null,type:"primary"},{key:"behavioral_cohort_filtering",name:"Lifecycle",description:"Discover how your active users break down, highlighting those who have recently stopped being active or those who have just become active for the first time.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-lifecycle.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-lifecycle-dark.png"},icon_key:null,type:"primary"},{key:"product_analytics_retention",name:"Retention",description:"See how many users return on subsequent days after performing an event the first time, or recurrently.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-retention.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-retention-dark.png"},icon_key:null,type:"primary"},{key:"product_analytics_stickiness",name:"Stickiness",description:"Learn how many times users perform a specific event in a period of time.",images:{light:"https://posthog.com/images/products/product-analytics/screenshot-stickiness.png",dark:"https://posthog.com/images/products/product-analytics/screenshot-stickiness-dark.png"},icon_key:null,type:"primary"},{key:"autocapture",name:"Autocapture",description:"Add PostHog.js to your website or web app to track all event data and retroactively define events.",images:null,icon_key:"IconBolt",type:"secondary"},{key:"data_visualization",name:"Data visualization",description:"Filter data by user property, group data, and use formulas in queries.",images:null,icon_key:"IconPieChart",type:"secondary"},{key:"product_analytics_sql_queries",name:"Query with SQL",description:"Use PostHog’s filtering interface or switch into SQL mode for more powerful querying.",images:null,icon_key:"IconTerminal",type:"secondary"}]},{name:"Session replay",headline:"Watch how users experience your app",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",price_description:null,usage_key:"recordings",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",screenshot_url:"https://posthog.com/images/products/session-replay/screenshot-session-replay.png",icon_key:"IconRewindPlay",docs_url:"https://posthog.com/docs/session-replay",subscribed:!0,plans:[{plan_key:"free-20231218",product_key:"session_replay",name:"Free",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",docs_url:"https://posthog.com/docs/session-replay",note:null,unit:"recording",flat_rate:!1,free_allocation:5e3,features:[{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",unit:null,limit:null,note:null},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",unit:null,limit:null,note:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",unit:null,limit:null,note:null},{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",unit:"playlists",limit:5,note:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"month",limit:1,note:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",unit:null,limit:null,note:null},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",unit:null,limit:null,note:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",unit:null,limit:null,note:null},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",unit:null,limit:null,note:null},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",unit:null,limit:null,note:null},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",unit:null,limit:null,note:null},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20231218",product_key:"session_replay",name:"Paid",description:"Session replay helps you diagnose issues and understand user behavior in your product or website.",image_url:"https://posthog.com/images/products/session-replay/session-replay.png",docs_url:"https://posthog.com/docs/session-replay",note:null,unit:"recording",flat_rate:!1,free_allocation:null,features:[{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",unit:null,limit:null,note:null},{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",unit:null,limit:null,note:null},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",unit:null,limit:null,note:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",unit:null,limit:null,note:null},{key:"recordings_file_export",name:"Download recordings",description:"Retain recordings beyond data retention limits.",unit:null,limit:null,note:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"months",limit:3,note:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",unit:null,limit:null,note:null},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",unit:null,limit:null,note:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",unit:null,limit:null,note:null},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",unit:null,limit:null,note:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",unit:null,limit:null,note:null},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",unit:null,limit:null,note:null},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",unit:null,limit:null,note:null},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",unit:null,limit:null,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:5e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.04",up_to:15e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.003",up_to:5e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0027",up_to:15e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0025",up_to:5e5,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.002",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null}],type:"session_replay",free_allocation:5e3,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:5e3,current_amount_usd:"0.00",current_usage:5e3,projected_usage:5e3,projected_amount_usd:"0.00"},{flat_amount_usd:"0",unit_amount_usd:"0.04",up_to:15e3,current_amount_usd:"0.00",current_usage:1e4,projected_usage:1e4,projected_amount_usd:"400.00"},{flat_amount_usd:"0",unit_amount_usd:"0.003",up_to:5e4,current_amount_usd:"0.00",current_usage:1022,projected_usage:35e3,projected_amount_usd:"105"},{flat_amount_usd:"0",unit_amount_usd:"0.0027",up_to:15e4,current_amount_usd:"0.00",current_usage:0,projected_usage:1e4,projected_amount_usd:"270.00"},{flat_amount_usd:"0",unit_amount_usd:"0.0025",up_to:5e5,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.002",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:"0.00",current_amount_usd:"403.07",current_usage:16022,usage_limit:1e5,has_exceeded_limit:!1,percentage_usage:.16022,projected_usage:5e4,projected_amount_usd:"775.00",unit:"recording",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"recordings_playlists",name:"Recording playlists",description:"Create playlists of certain session recordings to easily find and watch them again in the future.",images:null,icon_key:null,type:null},{key:"session_replay_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"console_logs",name:"Console logs",description:"Debug issues faster by browsing the user's console.",images:{light:"https://posthog.com/images/products/session-replay/console.png",dark:"https://posthog.com/images/products/session-replay/console-dark.png"},icon_key:null,type:"primary"},{key:"recordings_performance",name:"Network performance on recordings",description:"See your end-user's network performance and information alongside session recordings.",images:null,icon_key:null,type:null},{key:"session_replay_network_payloads",name:"Network monitor",description:"Analyze performance and network calls.",images:{light:"https://posthog.com/images/products/session-replay/network.png",dark:"https://posthog.com/images/products/session-replay/network-dark.png"},icon_key:null,type:"primary"},{key:"recordings_file_export",name:"Download recordings",description:"Retain recordings beyond data retention limits.",images:null,icon_key:"IconDownload",type:"secondary"},{key:"session_replay_sampling",name:"Sample recorded sessions",description:"Restrict the percentage of sessions that will be recorded.",images:null,icon_key:"IconSampling",type:"secondary"},{key:"replay_recording_duration_minimum",name:"Minimum duration",description:"Only record sessions longer than the minimum duration.",images:null,icon_key:"IconClock",type:"secondary"},{key:"replay_feature_flag_based_recording",name:"Record via feature flag",description:"Only record sessions for users that have the flag enabled.",images:null,icon_key:null,type:null},{key:"replay_mask_sensitive_data",name:"Block sensitive data",description:"Disable capturing data from any DOM element with HTML attributes or a customizable config.",images:null,icon_key:"IconPassword",type:"secondary"},{key:"replay_sharing_embedding",name:"Share and embed",description:"Share replays directly via URL or embed via iframe.",images:null,icon_key:null,type:null},{key:"replay_product_analytics_integration",name:"Event timeline",description:"See a history of everything that happened in a user's session.",images:{light:"https://posthog.com/images/products/session-replay/timeline.png",dark:"https://posthog.com/images/products/session-replay/timeline-dark.png"},icon_key:null,type:"primary"},{key:"replay_filter_person_properties",name:"Filter person properties",description:"Filter by person properties to quickly find relevant recordings.",images:null,icon_key:null,type:null},{key:"replay_filter_events",name:"Filter events",description:"Filter by events to quickly find relevant recordings.",images:null,icon_key:null,type:null},{key:"replay_dom_explorer",name:"DOM Explorer",description:"Freeze snapshots of recordings and explore the DOM with your browser dev tools.",images:null,icon_key:null,type:null},{key:"works_with_posthog_js",name:"Capture sessions without extra code",description:"Works with PostHog.js",images:null,icon_key:"IconBolt",type:"secondary"},{key:"replay_automatic_playlists",name:"Automatic playlists",description:"Filter by user behavior, user properties, or time.",images:null,icon_key:"IconPlaylist",type:"secondary"}]},{name:"Feature flags & experiments",headline:"Safely roll out features and experiments to specific users or groups",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",price_description:null,usage_key:"feature_flag_requests",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",screenshot_url:"https://posthog.com/images/products/feature-flags/screenshot-feature-flags.png",icon_key:"IconToggle",docs_url:"https://posthog.com/docs/feature-flags",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"feature_flags",name:"Free",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",docs_url:"https://posthog.com/docs/feature-flags",note:null,unit:"request",flat_rate:!1,free_allocation:1e6,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",unit:null,limit:null,note:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",unit:null,limit:null,note:null},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",unit:null,limit:null,note:null},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",unit:null,limit:null,note:null},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",unit:null,limit:null,note:null},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",unit:null,limit:null,note:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",unit:null,limit:null,note:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",unit:null,limit:null,note:null},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",unit:null,limit:null,note:null},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",unit:null,limit:null,note:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",unit:null,limit:null,note:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",unit:null,limit:null,note:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",unit:null,limit:null,note:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230623",product_key:"feature_flags",name:"Paid",description:"Test changes with small groups of users before rolling out wider. Analyze usage with product analytics and session replay.",image_url:"https://posthog.com/images/products/feature-flags/feature-flags.png",docs_url:"https://posthog.com/docs/feature-flags",note:null,flat_rate:!1,unit:"request",free_allocation:null,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",unit:null,limit:null,note:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",unit:null,limit:null,note:null},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",unit:null,limit:null,note:null},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",unit:null,limit:null,note:null},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",unit:null,limit:null,note:null},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",unit:null,limit:null,note:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",unit:null,limit:null,note:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",unit:null,limit:null,note:null},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",unit:null,limit:null,note:null},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",unit:null,limit:null,note:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",unit:null,limit:null,note:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",unit:null,limit:null,note:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",unit:null,limit:null,note:null},{key:"group_experiments",name:"Group experiments",description:"Target experiments to specific groups of users so everyone in the same group gets the same variant.",unit:null,limit:null,note:null},{key:"multiple_environments",name:"Multi-environment support",description:"Test flags in local development or staging by using the same flag key across PostHog projects.",unit:null,limit:null,note:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:1e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.0001",up_to:2e6,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000045",up_to:1e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.000025",up_to:5e7,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.00001",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],type:"feature_flags",free_allocation:1e6,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:1e6,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:"request",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"boolean_flags",name:"Boolean feature flags",description:"Turn features on and off for specific users.",images:null,icon_key:null,type:null},{key:"feature_flags_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"multivariate_flags",name:"Multivariate feature flags & experiments",description:"Create three or more variants of a feature flag to test or release different versions of a feature.",images:{light:"https://posthog.com/images/products/feature-flags/multivariate.png",dark:"https://posthog.com/images/products/feature-flags/multivariate-dark.png"},icon_key:null,type:"primary"},{key:"persist_flags_cross_authentication",name:"Persist flags across authentication",description:"Persist feature flags across authentication events so that flag values don't change when an anonymous user logs in and becomes identified.",images:null,icon_key:"IconUnlock",type:"secondary"},{key:"feature_flag_payloads",name:"Test changes without code",description:"Use JSON payloads to change text, visuals, or entire blocks of code without subsequent deployments.",images:{light:"https://posthog.com/images/products/feature-flags/payloads.png",dark:"https://posthog.com/images/products/feature-flags/payloads-dark.png"},icon_key:null,type:"primary"},{key:"multiple_release_conditions",name:"Multiple release conditions",description:"Customize your rollout strategy by user or group properties, cohort, or trafic percentage.",images:{light:"https://posthog.com/images/products/feature-flags/release-conditions.png",dark:"https://posthog.com/images/products/feature-flags/release-conditions-dark.png"},icon_key:null,type:"primary"},{key:"release_condition_overrides",name:"Release condition overrides",description:"For any release condition, specify which flag value the users or groups in that condition should receive.",images:null,icon_key:null,type:null},{key:"targeting_by_group",name:"Flag targeting by groups",description:"Target feature flag release conditions by group properties, not just user properties.",images:null,icon_key:null,type:null},{key:"local_evaluation_and_bootstrapping",name:"Local evaluation & bootstrapping",description:"Bootstrap flags on initialization so all flags are available immediately, without having to make extra network requests.",images:null,icon_key:"IconDecisionTree",type:"secondary"},{key:"flag_usage_stats",name:"Flag usage stats",description:"See how many times a flag has been evaluated, how many times each variant has been returned, and what values users received.",images:{light:"https://posthog.com/images/products/feature-flags/reports.png",dark:"https://posthog.com/images/products/feature-flags/reports-dark.png"},icon_key:null,type:"primary"},{key:"multiple_environments",name:"Multi-environment support",description:"Test flags in local development or staging by using the same flag key across PostHog projects.",images:null,icon_key:"IconStack",type:"secondary"},{key:"user_opt_in",name:"Early access feature opt-in widget",description:"Allow users to opt in to (or out of) specified features. Or use the API to build your own UI.",images:{light:"https://posthog.com/images/products/feature-flags/early-access.png",dark:"https://posthog.com/images/products/feature-flags/early-access-dark.png"},icon_key:null,type:"primary"},{key:"instant_rollbacks",name:"Instant rollbacks",description:"Disable a feature without touching your codebase.",images:null,icon_key:"IconRevert",type:"secondary"},{key:"experimentation",name:"Experiments",description:"Test changes to your product and evaluate the impacts those changes make.",images:null,icon_key:null,type:null},{key:"group_experiments",name:"Group experiments",description:"Target experiments to specific groups of users so everyone in the same group gets the same variant.",images:null,icon_key:null,type:null},{key:"funnel_experiments",name:"Funnel & trend experiments",description:"Measure the impact of a change on a aggregate values or a series of events, like a signup flow.",images:null,icon_key:null,type:null},{key:"secondary_metrics",name:"Secondary experiment metrics",description:"Track additional metrics to see how your experiment affects other parts of your app or different flows.",images:null,icon_key:null,type:null},{key:"statistical_analysis",name:"Statistical analysis",description:"Get a statistical analysis of your experiment results to see if the results are significant, or if they're likely just due to chance.",images:null,icon_key:null,type:null}]},{name:"Surveys",headline:"Ask anything with no-code surveys",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",price_description:null,usage_key:"survey_responses",image_url:"https://posthog.com/images/products/surveys/surveys.png",screenshot_url:"https://posthog.com/images/products/surveys/screenshot-surveys.png",icon_key:"IconMessage",docs_url:"https://posthog.com/docs/surveys",subscribed:!0,plans:[{plan_key:"free-20230928",product_key:"surveys",name:"Free",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",image_url:"https://posthog.com/images/products/surveys/surveys.png",docs_url:"https://posthog.com/docs/surveys",note:null,flat_rate:!1,unit:"survey response",free_allocation:250,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",unit:null,limit:null,note:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",unit:null,limit:null,note:null},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",unit:null,limit:null,note:null},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",unit:null,limit:null,note:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",unit:null,limit:null,note:null},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",unit:null,limit:null,note:null},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",unit:null,limit:null,note:null},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"year",limit:1,note:null}],tiers:null,current_plan:!0,included_if:null,contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230928",product_key:"surveys",name:"Paid",description:"Build in-app popups with freeform text responses, multiple choice, NPS, ratings, and emoji reactions. Or use the API for complete control.",image_url:"https://posthog.com/images/products/surveys/surveys.png",docs_url:"https://posthog.com/docs/surveys",note:null,flat_rate:!1,unit:"survey response",free_allocation:null,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",unit:null,limit:null,note:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",unit:null,limit:null,note:null},{key:"surveys_multiple_questions",name:"Multiple questions",description:"Ask up to 10 questions in a single survey.",unit:null,limit:null,note:null},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",unit:null,limit:null,note:null},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",unit:null,limit:null,note:null},{key:"surveys_styling",name:"Custom colors & positioning",description:"Customize the colors of your surveys to match your brand and set survey position.",unit:null,limit:null,note:null},{key:"surveys_text_html",name:"Custom HTML text",description:"Add custom HTML to your survey text.",unit:null,limit:null,note:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",unit:null,limit:null,note:null},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",unit:null,limit:null,note:null},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",unit:null,limit:null,note:null},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",unit:"years",limit:7,note:null}],tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:250,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.2",up_to:500,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.1",up_to:1e3,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.035",up_to:1e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.015",up_to:2e4,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null},{flat_amount_usd:"0",unit_amount_usd:"0.01",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:null}],type:"surveys",free_allocation:250,tiers:[{flat_amount_usd:"0",unit_amount_usd:"0",up_to:null,current_amount_usd:"0.00",current_usage:0,projected_usage:null,projected_amount_usd:null}],tiered:!0,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:250,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:"survey response",addons:[],contact_support:!1,inclusion_only:!1,features:[{key:"surveys_unlimited_surveys",name:"Unlimited surveys",description:"Create as many surveys as you want.",images:null,icon_key:null,type:null},{key:"surveys_all_question_types",name:"All question types",description:"Rating scale (for NPS and the like), multiple choice, single choice, emoji rating, link, free text.",images:{light:"https://posthog.com/images/products/surveys/question-types.png",dark:"https://posthog.com/images/products/surveys/question-types-dark.png"},icon_key:null,type:"primary"},{key:"surveys_multiple_questions",name:"Multiple questions",description:"Ask up to 10 questions in a single survey.",images:{light:"https://posthog.com/images/products/surveys/steps.png",dark:"https://posthog.com/images/products/surveys/steps-dark.png"},icon_key:null,type:"primary"},{key:"surveys_user_targeting",name:"Advanced user targeting",description:"Target by URL, user property, or feature flag when used with Feature flags.",images:{light:"https://posthog.com/images/products/surveys/targeting.png",dark:"https://posthog.com/images/products/surveys/targeting-dark.png"},icon_key:null,type:"primary"},{key:"surveys_user_sampling",name:"User sampling",description:"Sample users to only survey a portion of the users who match the criteria.",images:null,icon_key:null,type:null},{key:"surveys_styling",name:"Custom colors & positioning",description:"Customize the colors of your surveys to match your brand and set survey position.",images:null,icon_key:null,type:null},{key:"surveys_text_html",name:"Custom HTML text",description:"Add custom HTML to your survey text.",images:null,icon_key:null,type:null},{key:"surveys_api_mode",name:"API mode",description:"Using PostHog.js? No more code required. But if want to create your own UI, we have a full API.",images:{light:"https://posthog.com/images/products/surveys/api.png",dark:"https://posthog.com/images/products/surveys/api-dark.png"},icon_key:null,type:"primary"},{key:"surveys_results_analysis",name:"Aggregated results",description:"See feedback summarized and broken down per response, plus completion rates and drop offs.",images:null,icon_key:"IconPieChart",type:"secondary"},{key:"surveys_templates",name:"Templates",description:"Use our templates to get started quickly with NPS, customer satisfaction surveys, user interviews, and more.",images:{light:"https://posthog.com/images/products/surveys/templates.png",dark:"https://posthog.com/images/products/surveys/templates-dark.png"},icon_key:null,type:"primary"},{key:"surveys_data_retention",name:"Data retention",description:"Keep a historical record of your data.",images:null,icon_key:null,type:null},{key:"surveys_link_question_type",name:"Link somewhere",description:"Send users to a webpage or invite them to book a meeting with a calendar invite.",images:{light:"https://posthog.com/images/products/surveys/link-scheduler.png",dark:"https://posthog.com/images/products/surveys/link-scheduler-dark.png"},icon_key:null,type:"primary"},{key:"surveys_slack_notifications",name:"Slack notifications",description:"Send realtime survey responses to a Slack channel.",images:null,icon_key:"IconNotification",type:"secondary"},{key:"surveys_wait_periods",name:"Customizable wait periods",description:"Set a delay before a survey opens.",images:null,icon_key:"IconClock",type:"secondary"}]},{name:"Integrations",headline:null,description:"Connect PostHog to your favorite tools.",price_description:null,usage_key:null,image_url:"https://posthog.com/images/product/product-icons/integrations.svg",screenshot_url:null,icon_key:"IconBolt",docs_url:"https://posthog.com/docs/cdp",subscribed:null,plans:[{plan_key:"free-20230117",product_key:"integrations",name:"Free",description:"Connect PostHog to your favorite tools.",image_url:"https://posthog.com/images/product/product-icons/integrations.svg",docs_url:"https://posthog.com/docs/cdp",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",unit:null,limit:null,note:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",unit:null,limit:null,note:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",unit:null,limit:null,note:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",unit:null,limit:null,note:null},{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:"no_active_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"paid-20230117",product_key:"integrations",name:"Paid",description:"Connect PostHog to your favorite tools.",image_url:"https://posthog.com/images/product/product-icons/integrations.svg",docs_url:"https://posthog.com/docs/cdp",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",unit:null,limit:null,note:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",unit:null,limit:null,note:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",unit:null,limit:null,note:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",unit:null,limit:null,note:null},{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",unit:null,limit:null,note:null},{key:"app_metrics",name:"Transformation & destination metrics",description:"Get metrics on your transformation and destination metrics to see their usage, reliability, and more.",unit:null,limit:null,note:null}],tiers:null,current_plan:!0,included_if:"has_subscription",contact_support:null,unit_amount_usd:null}],type:"integrations",free_allocation:0,tiers:null,tiered:!1,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:0,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:null,addons:[],contact_support:!1,inclusion_only:!0,features:[{key:"apps",name:"Transformations",description:"Use transformations to filter or modify your incoming data. (Destinations not included, see the Data pipelines addon for product analytics.)",images:null,icon_key:null,type:null},{key:"slack_integration",name:"Slack",description:"Get notified about new actions in Slack.",images:null,icon_key:null,type:null},{key:"microsoft_teams_integration",name:"Microsoft Teams",description:"Get notified about new actions in Microsoft Teams.",images:null,icon_key:null,type:null},{key:"discord_integration",name:"Discord",description:"Get notified about new actions in Discord.",images:null,icon_key:null,type:null},{key:"zapier",name:"Zapier",description:"Zapier lets you connect PostHog with thousands of the most popular apps, so you can automate your work and have more time for what matters most—no code required.",images:null,icon_key:null,type:null},{key:"app_metrics",name:"Transformation & destination metrics",description:"Get metrics on your transformation and destination metrics to see their usage, reliability, and more.",images:null,icon_key:null,type:null}]},{name:"Platform and support",headline:null,description:"SSO, permission management, and support.",price_description:null,usage_key:null,image_url:"https://posthog.com/images/product/product-icons/platform.svg",screenshot_url:null,icon_key:"IconStack",docs_url:"https://posthog.com/docs",subscribed:!0,plans:[{plan_key:"free-20230117",product_key:"platform_and_support",name:"Totally free",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:"project",limit:1,note:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:"no_active_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"paid-20240208",product_key:"platform_and_support",name:"With Pay-per-use",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:"projects",limit:2,note:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",unit:null,limit:null,note:"$2k+/month spend"},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null}],tiers:null,current_plan:!0,included_if:"has_subscription",contact_support:null,unit_amount_usd:null},{plan_key:"enterprise-20240208",product_key:"platform_and_support",name:"Enterprise",description:"SSO, permission management, and support.",image_url:"https://posthog.com/images/product/product-icons/platform.svg",docs_url:"https://posthog.com/docs",note:null,unit:null,flat_rate:!1,free_allocation:null,features:[{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",unit:null,limit:null,note:"Unlimited"},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:null,limit:null,note:"Unlimited"},{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",unit:null,limit:null,note:"Unlimited"},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",unit:null,limit:null,note:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",unit:null,limit:null,note:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",unit:null,limit:null,note:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",unit:null,limit:null,note:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",unit:null,limit:null,note:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",unit:null,limit:null,note:null},{key:"saml",name:"SAML SSO",description:"Allow your organization's users to log in with SAML.",unit:null,limit:null,note:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",unit:null,limit:null,note:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",unit:null,limit:null,note:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",unit:null,limit:null,note:null},{key:"role_based_access",name:"Role-based access",description:"Control access to features like experiments, session recordings, and feature flags with custom roles.",unit:null,limit:null,note:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",unit:null,limit:null,note:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",unit:null,limit:null,note:"Advanced"},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",unit:null,limit:null,note:null},{key:"custom_msa",name:"Custom MSA",description:"Get a custom Master Services Agreement (MSA) to use PostHog in a way that fits your company's needs.",unit:null,limit:null,note:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",unit:null,limit:null,note:null},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",unit:null,limit:null,note:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",unit:null,limit:null,note:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",unit:null,limit:null,note:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",unit:null,limit:null,note:null},{key:"training",name:"Ongoing training",description:"Get training from our team to help you quickly get up and running with PostHog.",unit:null,limit:null,note:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",unit:null,limit:null,note:null}],tiers:null,current_plan:!1,included_if:null,contact_support:!0,unit_amount_usd:null}],type:"platform_and_support",free_allocation:0,tiers:null,tiered:!1,unit_amount_usd:null,current_amount_usd_before_addons:null,current_amount_usd:null,current_usage:0,usage_limit:0,has_exceeded_limit:!1,percentage_usage:0,projected_usage:0,projected_amount_usd:null,unit:null,addons:[{name:"Teams",description:"Priority support, unlimited projects, white labelling, SSO enforcement, and features for collaboration with team members",price_description:null,image_url:"None",icon_key:"IconBuilding",docs_url:"https://posthog.com/pricing",type:"teams",tiers:[],tiered:!1,included_with_main_product:!1,subscribed:!1,unit:null,unit_amount_usd:null,current_amount_usd:null,current_usage:0,projected_usage:0,projected_amount_usd:null,plans:[{plan_key:"addon-20240411",product_key:"teams",name:"Teams addon",description:"Priority support, unlimited projects, white labelling, SSO enforcement, and features for collaboration with team members",image_url:null,docs_url:"https://posthog.com/pricing",note:null,unit:"month",flat_rate:!0,free_allocation:null,features:[{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",unit:null,limit:null,note:"Unlimited"},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",unit:null,limit:null,note:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",unit:null,limit:null,note:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",unit:null,limit:null,note:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",unit:null,limit:null,note:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",unit:null,limit:null,note:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",unit:null,limit:null,note:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",unit:null,limit:null,note:"Project-based only"},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",unit:null,limit:null,note:"Basic"},{key:"security_assessment",name:"Security assessment",description:"Security assessment",unit:null,limit:null,note:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",unit:null,limit:null,note:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",unit:null,limit:null,note:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",unit:null,limit:null,note:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",unit:null,limit:null,note:"12 hours"},{key:"automatic_provisioning",name:"Automatic provisioning",description:"Verify your domains to enforce SSO and automatically add users with matching email addresses to your organization.",unit:null,limit:null,note:null},{key:"managed_reverse_proxy",name:"Managed reverse proxy",description:"Send events through your own domain to capture more usage data without having to self-host PostHog.",images:null,icon_key:null,type:null}],tiers:[],current_plan:!1,included_if:null,contact_support:null,unit_amount_usd:"450.00"}],contact_support:null,inclusion_only:!1,included_if:null,features:[{key:"automatic_provisioning",name:"Automatic provisioning",description:"Verify your domains to enforce SSO and automatically add users with matching email addresses to your organization.",images:null,icon_key:null,type:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",images:null,icon_key:null,type:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",images:null,icon_key:null,type:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",images:null,icon_key:null,type:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",images:null,icon_key:null,type:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",images:null,icon_key:null,type:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",images:null,icon_key:null,type:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",images:null,icon_key:null,type:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",images:null,icon_key:null,type:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",images:null,icon_key:null,type:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",images:null,icon_key:null,type:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",images:null,icon_key:null,type:null},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",images:null,icon_key:null,type:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",images:null,icon_key:null,type:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",images:null,icon_key:null,type:null},{key:"managed_reverse_proxy",name:"Managed reverse proxy",description:"Send events through your own domain to capture more usage data without having to self-host PostHog.",images:null,icon_key:null,type:null}],usage_key:void 0,usage_limit:null}],contact_support:!1,inclusion_only:!0,features:[{key:"tracked_users",name:"Tracked users",description:"Track users across devices and sessions.",images:null,icon_key:null,type:null},{key:"team_members",name:"Team members",description:"PostHog doesn't charge per seat add your entire team!",images:null,icon_key:null,type:null},{key:"api_access",name:"API access",description:"Access your data via our developer-friendly API.",images:null,icon_key:null,type:null},{key:"organizations_projects",name:"Projects",description:"Create silos of data within PostHog. All data belongs to a single project and all queries are project-specific.",images:null,icon_key:null,type:null},{key:"social_sso",name:"SSO via Google, Github, or Gitlab",description:"Log in to PostHog with your Google, Github, or Gitlab account.",images:null,icon_key:null,type:null},{key:"role_based_access",name:"Role-based access",description:"Control access to features like experiments, session recordings, and feature flags with custom roles.",images:null,icon_key:null,type:null},{key:"project_based_permissioning",name:"Project permissions",description:"Restrict access to data within the organization to only those who need it.",images:null,icon_key:null,type:null},{key:"advanced_permissions",name:"Advanced permissions",description:"Control who can access and modify data and features within your organization.",images:null,icon_key:null,type:null},{key:"saml",name:"SAML SSO",description:"Allow your organization's users to log in with SAML.",images:null,icon_key:null,type:null},{key:"sso_enforcement",name:"Enforce SSO login",description:"Users can only sign up and log in to your PostHog organization with your specified SSO provider.",images:null,icon_key:null,type:null},{key:"2fa",name:"2FA",description:"Secure your PostHog account with two-factor authentication.",images:null,icon_key:null,type:null},{key:"2fa_enforcement",name:"Enforce 2FA",description:"Require all users in your organization to enable two-factor authentication.",images:null,icon_key:null,type:null},{key:"white_labelling",name:"White labeling",description:"Use your own branding on surveys, shared dashboards, shared insights, and more.",images:null,icon_key:null,type:null},{key:"community_support",name:"Community support",description:"Get help from other users and PostHog team members in our Community forums.",images:null,icon_key:null,type:null},{key:"dedicated_support",name:"Dedicated account manager",description:"Work with a dedicated account manager via Slack or email to help you get the most out of PostHog.",images:null,icon_key:null,type:null},{key:"email_support",name:"Email support",description:"Get help directly from our product engineers via email. No wading through multiple support people before you get help.",images:null,icon_key:null,type:null},{key:"priority_support",name:"Priority support",description:"Get help from our team faster than other customers.",images:null,icon_key:null,type:null},{key:"training",name:"Ongoing training",description:"Get training from our team to help you quickly get up and running with PostHog.",images:null,icon_key:null,type:null},{key:"configuration_support",name:"Personalized onboarding",description:"Get help from our team to create dashboards that will help you understand your data and your business.",images:null,icon_key:null,type:null},{key:"terms_and_conditions",name:"Terms and conditions",description:"Terms and conditions",images:null,icon_key:null,type:null},{key:"security_assessment",name:"Security assessment",description:"Security assessment",images:null,icon_key:null,type:null},{key:"bespoke_pricing",name:"Bespoke pricing",description:"Custom pricing to fit your company's needs.",images:null,icon_key:null,type:null},{key:"invoice_payments",name:"Payment via invoicing",description:"Pay for your PostHog subscription via invoice.",images:null,icon_key:null,type:null},{key:"support_response_time",name:"Support response time",description:"Get help from our team!",images:null,icon_key:null,type:null},{key:"audit_logs",name:"Audit logs",description:"See who in your organization has accessed or modified entities within PostHog.",images:null,icon_key:null,type:null},{key:"hipaa_baa",name:"HIPAA BAA",description:"Get a signed HIPAA Business Associate Agreement (BAA) to use PostHog in a HIPAA-compliant manner.",images:null,icon_key:null,type:null},{key:"custom_msa",name:"Custom MSA",description:"Get a custom Master Services Agreement (MSA) to use PostHog in a way that fits your company's needs.",images:null,icon_key:null,type:null},{key:"ingestion_taxonomy",name:"Ingestion taxonomy",description:"Mark events as verified or unverified to help you understand the quality of your data.",images:null,icon_key:null,type:null},{key:"tagging",name:"Dashboard tags",description:"Organize dashboards with tags.",images:null,icon_key:null,type:null}]}],custom_limits_usd:{},stripe_portal_url:"https://billing.stripe.com/p/session/test_YWNjdF8xSElNRERFdUlhdFJYU2R6LF9QaEVJR3VyemlvMDZzRzdiQXZrc1AxSjNXZk1BellP0100ZsforDQG",subscription_level:"paid"}},"./frontend/src/mocks/handlers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{vv:()=>EMPTY_PAGINATED_RESPONSE,jI:()=>defaultMocks,qi:()=>handlers,Pb:()=>toPaginatedResponse});var api_mock=__webpack_require__("./frontend/src/lib/api.mock.ts"),features=__webpack_require__("./frontend/src/mocks/features.ts"),_billing=__webpack_require__("./frontend/src/mocks/fixtures/_billing.tsx");let _hogFunctionTemplates_namespaceObject=JSON.parse('{"count":26,"next":null,"previous":null,"results":[{"sub_templates":[{"id":"early-access-feature-enrollment","name":"Post to Slack on feature enrollment","description":"Posts a message to Slack when a user enrolls or un-enrolls in an early access feature","filters":{"events":[{"id":"$feature_enrollment_update","type":"events"}]},"masking":null,"inputs":{"text":"*{person.name}* {event.properties.$feature_enrollment ? \'enrolled in\' : \'un-enrolled from\'} the early access feature for \'{event.properties.$feature_flag}\'","blocks":[{"text":{"text":"*{person.name}* {event.properties.$feature_enrollment ? \'enrolled in\' : \'un-enrolled from\'} the early access feature for \'{event.properties.$feature_flag}\'","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{person.url}","text":{"text":"View Person in PostHog","type":"plain_text"},"type":"button"}]}]}},{"id":"survey-response","name":"Post to Slack on survey response","description":"Posts a message to Slack when a user responds to a survey","filters":{"events":[{"id":"survey sent","type":"events","properties":[{"key":"$survey_response","type":"event","value":"is_set","operator":"is_set"}]}]},"masking":null,"inputs":{"text":"*{person.name}* responded to survey *{event.properties.$survey_name}*","blocks":[{"text":{"text":"*{person.name}* responded to survey *{event.properties.$survey_name}*","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{project.url}/surveys/{event.properties.$survey_id}","text":{"text":"View Survey","type":"plain_text"},"type":"button"},{"url":"{person.url}","text":{"text":"View Person","type":"plain_text"},"type":"button"}]}]}}],"status":"free","id":"template-slack","name":"Slack","description":"Sends a message to a slack channel","hog":"let res := fetch(\'https://slack.com/api/chat.postMessage\', {\\n \'body\': {\\n \'channel\': inputs.channel,\\n \'icon_emoji\': inputs.icon_emoji,\\n \'username\': inputs.username,\\n \'blocks\': inputs.blocks,\\n \'text\': inputs.text\\n },\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.slack_workspace.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status != 200 or not res.body.ok) {\\n throw Error(f\'Failed to post message to Slack: {res.status}: {res.body}\');\\n}","inputs_schema":[{"key":"slack_workspace","type":"integration","integration":"slack","label":"Slack workspace","secret":false,"required":true},{"key":"channel","type":"integration_field","integration_key":"slack_workspace","integration_field":"slack_channel","label":"Channel to post to","description":"Select the channel to post to (e.g. #general). The PostHog app must be installed in the workspace.","secret":false,"required":true},{"key":"icon_emoji","type":"string","label":"Emoji icon","default":":hedgehog:","required":false,"secret":false},{"key":"username","type":"string","label":"Bot name","default":"PostHog","required":false,"secret":false},{"key":"blocks","type":"json","label":"Blocks","description":"(see https://api.slack.com/block-kit/building)","default":[{"text":{"text":"*{person.name}* triggered event: \'{event.event}\'","type":"mrkdwn"},"type":"section"},{"type":"actions","elements":[{"url":"{person.url}","text":{"text":"View Person in PostHog","type":"plain_text"},"type":"button"},{"url":"{source.url}","text":{"text":"Message source","type":"plain_text"},"type":"button"}]}],"secret":false,"required":false},{"key":"text","type":"string","label":"Plain text message","description":"Optional fallback message if blocks are not provided or supported","default":"*{person.name}* triggered event: \'{event.event}\'","secret":false,"required":false}],"category":["Customer Success"],"filters":null,"masking":null,"icon_url":"/static/services/slack.png"},{"sub_templates":[{"id":"early-access-feature-enrollment","name":"HTTP Webhook on feature enrollment","description":null,"filters":{"events":[{"id":"$feature_enrollment_update","type":"events"}]},"masking":null,"inputs":null},{"id":"survey-response","name":"HTTP Webhook on survey response","description":null,"filters":{"events":[{"id":"survey sent","type":"events","properties":[{"key":"$survey_response","type":"event","value":"is_set","operator":"is_set"}]}]},"masking":null,"inputs":null}],"status":"beta","id":"template-webhook","name":"HTTP Webhook","description":"Sends a webhook templated by the incoming event data","hog":"let res := fetch(inputs.url, {\\n \'headers\': inputs.headers,\\n \'body\': inputs.body,\\n \'method\': inputs.method\\n});\\n\\nif (inputs.debug) {\\n print(\'Response\', res.status, res.body);\\n}","inputs_schema":[{"key":"url","type":"string","label":"Webhook URL","secret":false,"required":true},{"key":"method","type":"choice","label":"Method","secret":false,"choices":[{"label":"POST","value":"POST"},{"label":"PUT","value":"PUT"},{"label":"PATCH","value":"PATCH"},{"label":"GET","value":"GET"},{"label":"DELETE","value":"DELETE"}],"default":"POST","required":false},{"key":"body","type":"json","label":"JSON Body","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false},{"key":"headers","type":"dictionary","label":"Headers","secret":false,"required":false},{"key":"debug","type":"boolean","label":"Log responses","description":"Logs the response of http calls for debugging.","secret":false,"required":false,"default":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/posthog-icon.svg"},{"sub_templates":null,"status":"beta","id":"template-activecampaign","name":"ActiveCampaign","description":"Creates a new contact in ActiveCampaign whenever an event is triggered.","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet contact := {\\n \'email\': inputs.email,\\n \'fieldValues\': [],\\n}\\n\\nif (not empty(inputs.firstName)) contact.firstName := inputs.firstName\\nif (not empty(inputs.lastName)) contact.lastName := inputs.lastName\\nif (not empty(inputs.phone)) contact.phone := inputs.phone\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n contact.fieldValues := arrayPushBack(contact.fieldValues, {\'field\': key, \'value\': value})\\n }\\n}\\n\\nlet res := fetch(f\'https://{inputs.accountName}.api-us1.com/api/3/contact/sync\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'content-type\': \'application/json\',\\n \'Api-Token\': inputs.apiKey\\n },\\n \'body\': {\\n \'contact\': contact\\n }\\n})\\n\\nif (res.status >= 400) {\\n print(f\'Error from {inputs.accountName}.api-us1.com api:\', res.status, res.body)\\n} else {\\n print(\'Contact has been created or updated successfully!\')\\n}","inputs_schema":[{"key":"accountName","type":"string","label":"Account name","description":"Usually in the form of .activehosted.com. You can use this page to figure our your account name: https://www.activecampaign.com/login/lookup.php","default":"","secret":false,"required":true},{"key":"apiKey","type":"string","label":"Your ActiveCampaign API Key","description":"See the docs here: https://help.activecampaign.com/hc/en-us/articles/207317590-Getting-started-with-the-API#h_01HJ6REM2YQW19KYPB189726ST","default":"","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true},{"key":"firstName","type":"string","label":"First name of the user","description":"Where to find the first name for the contact to be created.","default":"{person.properties.firstName}","secret":false,"required":true},{"key":"lastName","type":"string","label":"Last name of the user","description":"Where to find the last name for the contact to be created.","default":"{person.properties.lastName}","secret":false,"required":true},{"key":"phone","type":"string","label":"Phone number of the user","description":"Where to find the phone number for the contact to be created.","default":"{person.properties.phone}","secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Additional person fields","description":"Map any values to ActiveCampaign person fields. (fieldId:value)","default":{"1":"{person.properties.company}","2":"{person.properties.website}"},"secret":false,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/activecampaign.png"},{"sub_templates":null,"status":"beta","id":"template-avo","name":"Avo","description":"Send events to Avo","hog":"if (empty(inputs.apiKey) or empty(inputs.environment)) {\\n print(\'API Key and environment has to be set. Skipping...\')\\n return\\n}\\n\\nlet avoEvent := {\\n \'apiKey\': inputs.apiKey,\\n \'env\': inputs.environment,\\n \'appName\': inputs.appName,\\n \'sessionId\': event.properties.$session_id ?? generateUUIDv4(),\\n \'createdAt\': toString(toDateTime(toUnixTimestamp(now()))),\\n \'avoFunction\': false,\\n \'eventId\': null,\\n \'eventHash\': null,\\n \'appVersion\': \'1.0.0\',\\n \'libVersion\': \'1.0.0\',\\n \'libPlatform\': \'node\',\\n \'trackingId\': \'\',\\n \'samplingRate\': 1,\\n \'type\': \'event\',\\n \'eventName\': event.event,\\n \'messageId\': event.uuid,\\n \'eventProperties\': []\\n}\\n\\nfun getPropValueType(propValue) {\\n let propType := typeof(propValue)\\n if (propValue == null) {\\n return \'null\'\\n } else if (propType == \'string\') {\\n return \'string\'\\n } else if (propType == \'integer\') {\\n return \'int\'\\n } else if (propType == \'float\') {\\n return \'float\'\\n } else if (propType == \'boolean\') {\\n return \'boolean\'\\n } else if (propType == \'object\') {\\n return \'object\'\\n } else if (propType == \'array\') {\\n return \'list\'\\n } else {\\n return propType\\n }\\n}\\n\\nfor (let key, value in event.properties) {\\n let excludeProperties := arrayMap(x -> trim(x), splitByString(\',\', inputs.excludeProperties))\\n let includeProperties := arrayMap(x -> trim(x), splitByString(\',\', inputs.includeProperties))\\n let isExcluded := has(excludeProperties, key)\\n let isIncluded := includeProperties[1] == \'\' or has(includeProperties, key)\\n\\n if (not (key like \'$%\' or isExcluded or not isIncluded)) {\\n avoEvent.eventProperties := arrayPushBack(avoEvent.eventProperties, { \'propertyName\': key, \'propertyType\': getPropValueType(value) })\\n }\\n}\\n\\nfetch(\'https://api.avo.app/inspector/posthog/v1/track\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'env\': inputs.environment,\\n \'api-key\': inputs.apiKey,\\n \'content-type\': \'application/json\',\\n \'accept\': \'application/json\',\\n },\\n \'body\': [avoEvent]\\n})","inputs_schema":[{"key":"apiKey","type":"string","label":"Avo API Key","description":"Avo source API key","default":"","secret":true,"required":true},{"key":"environment","type":"string","label":"Environment","description":"Environment name","default":"dev","secret":false,"required":false},{"key":"appName","type":"string","label":"App name","description":"App name","default":"PostHog","secret":false,"required":false},{"key":"excludeProperties","type":"string","label":"Properties to exclude","description":"Comma-separated list of event properties that will not be sent to Avo.","default":"","secret":false,"required":false},{"key":"includeProperties","type":"string","label":"Properties to include","description":"Comma separated list of event properties to send to Avo (will send all if left empty).","default":"","secret":false,"required":false}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/avo.png"},{"sub_templates":null,"status":"beta","id":"template-aws-kinesis","name":"AWS Kinesis","description":"Put data to an AWS Kinesis stream","hog":"fun getPayload() {\\n let region := inputs.aws_region\\n let service := \'kinesis\'\\n let amzDate := formatDateTime(now(), \'%Y%m%dT%H%i%sZ\')\\n let date := formatDateTime(now(), \'%Y%m%d\')\\n\\n let payload := jsonStringify({\\n \'StreamName\': inputs.aws_kinesis_stream_arn,\\n \'PartitionKey\': inputs.aws_kinesis_partition_key ?? generateUUIDv4(),\\n \'Data\': base64Encode(jsonStringify(inputs.payload)),\\n })\\n\\n let requestHeaders := {\\n \'Content-Type\': \'application/x-amz-json-1.1\',\\n \'X-Amz-Target\': \'Kinesis_20131202.PutRecord\',\\n \'X-Amz-Date\': amzDate,\\n \'Host\': f\'kinesis.{region}.amazonaws.com\',\\n }\\n\\n let canonicalHeaderParts := []\\n for (let key, value in requestHeaders) {\\n let val := replaceAll(trim(value), \'\\\\\\\\s+\', \' \')\\n canonicalHeaderParts := arrayPushBack(canonicalHeaderParts, f\'{lower(key)}:{val}\')\\n }\\n let canonicalHeaders := arrayStringConcat(arraySort(canonicalHeaderParts), \'\\\\n\') || \'\\\\n\'\\n\\n let signedHeaderParts := []\\n for (let key, value in requestHeaders) {\\n signedHeaderParts := arrayPushBack(signedHeaderParts, lower(key))\\n }\\n let signedHeaders := arrayStringConcat(arraySort(signedHeaderParts), \';\')\\n\\n let canonicalRequest := arrayStringConcat([\\n \'POST\',\\n \'/\',\\n \'\',\\n canonicalHeaders,\\n signedHeaders,\\n sha256Hex(payload),\\n ], \'\\\\n\')\\n\\n let credentialScope := f\'{date}/{region}/{service}/aws4_request\'\\n let stringToSign := arrayStringConcat([\\n \'AWS4-HMAC-SHA256\',\\n amzDate,\\n credentialScope,\\n sha256Hex(canonicalRequest),\\n ], \'\\\\n\')\\n\\n let signature := sha256HmacChainHex([\\n f\'AWS4{inputs.aws_secret_access_key}\', date, region, service, \'aws4_request\', stringToSign\\n ])\\n\\n let authorizationHeader :=\\n f\'AWS4-HMAC-SHA256 Credential={inputs.aws_access_key_id}/{credentialScope}, \' ||\\n f\'SignedHeaders={signedHeaders}, \' ||\\n f\'Signature={signature}\'\\n\\n requestHeaders[\'Authorization\'] := authorizationHeader\\n\\n return {\\n \'headers\': requestHeaders,\\n \'body\': payload,\\n \'method\': \'POST\'\\n }\\n}\\n\\nlet res := fetch(f\'https://kinesis.{inputs.aws_region}.amazonaws.com\', getPayload())\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n print(\'Error sending event:\', res.status, res.body)\\n}","inputs_schema":[{"key":"aws_access_key_id","type":"string","label":"AWS Access Key ID","secret":true,"required":true},{"key":"aws_secret_access_key","type":"string","label":"AWS Secret Access Key","secret":true,"required":true},{"key":"aws_region","type":"string","label":"AWS Region","secret":false,"required":true,"default":"us-east-1"},{"key":"aws_kinesis_stream_arn","type":"string","label":"Kinesis Stream ARN","secret":false,"required":true},{"key":"aws_kinesis_partition_key","type":"string","label":"Kinesis Partition Key","description":"If not provided, a random UUID will be generated.","default":"{event.uuid}","secret":false,"required":false},{"key":"payload","type":"json","label":"Message Payload","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/aws-kinesis.png"},{"sub_templates":null,"status":"beta","id":"template-braze","name":"Braze","description":"Send events to Braze","hog":"let getPayload := () -> [{\\n \'attributes\': inputs.attributes,\\n \'events\': [inputs.event]\\n}]\\n\\nlet res := fetch(f\'{inputs.brazeEndpoint}/users/track\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.apiKey}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': getPayload()\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(f\'Error sending event: {res.status} {res.body}\')\\n}","inputs_schema":[{"key":"brazeEndpoint","type":"choice","label":"Braze REST Endpoint","description":"The endpoint identifier where your Braze instance is located, see the docs here: https://www.braze.com/docs/api/basics","choices":[{"label":"US-01","value":"https://rest.iad-01.braze.com"},{"label":"US-02","value":"https://rest.iad-02.braze.com"},{"label":"US-03","value":"https://rest.iad-03.braze.com"},{"label":"US-04","value":"https://rest.iad-04.braze.com"},{"label":"US-05","value":"https://rest.iad-05.braze.com"},{"label":"US-06","value":"https://rest.iad-06.braze.com"},{"label":"US-08","value":"https://rest.iad-08.braze.com"},{"label":"EU-01","value":"https://rest.fra-01.braze.eu"},{"label":"EU-02","value":"https://rest.fra-02.braze.eu"}],"default":"","secret":false,"required":true},{"key":"apiKey","type":"string","label":"Your Braze API Key","description":"See the docs here: https://www.braze.com/docs/api/api_key/","default":"","secret":true,"required":true},{"key":"attributes","type":"json","label":"Attributes to set","default":{"email":"{person.properties.email}"},"secret":false,"required":true},{"key":"event","type":"json","label":"Event payload","default":{"properties":"{event.properties}","external_id":"{event.distinct_id}","name":"{event.event}","time":"{event.timestamp}"},"secret":false,"required":true}],"category":["Customer Success"],"filters":null,"masking":null,"icon_url":"/static/services/braze.png"},{"sub_templates":null,"status":"alpha","id":"template-clearbit","name":"Clearbit","description":"Loads data from the Clearbit API and tracks an additional event with the enriched data if found. Once enriched, the person will not be enriched again.","hog":"let api_key := inputs.api_key\\nlet email := inputs.email\\n\\nif (empty(email) or event.event == \'$set\' or person.properties.clearbit_enriched) {\\n return false\\n}\\n\\nlet response := fetch(f\'https://person-stream.clearbit.com/v2/combined/find?email={email}\', {\\n \'method\': \'GET\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {api_key}\'\\n }\\n})\\nif (response.status == 200 and not empty(response.body.person)) {\\n print(\'Clearbit data found - sending event to PostHog\')\\n postHogCapture({\\n \'event\': \'$set\',\\n \'distinct_id\': event.distinct_id,\\n \'properties\': {\\n \'$lib\': \'hog_function\',\\n \'$hog_function_source\': source.url,\\n \'$set_once\': {\\n \'person\': response.body.person,\\n \'company\': response.body.company,\\n \'clearbit_enriched\': true\\n }\\n }\\n })\\n} else {\\n print(\'No Clearbit data found\')\\n}","inputs_schema":[{"key":"api_key","type":"string","label":"Clearbit API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Clearbit","default":"{person.properties.email}","secret":false,"required":true}],"category":["Analytics"],"filters":null,"masking":null,"icon_url":"/static/services/clearbit.png"},{"sub_templates":null,"status":"beta","id":"template-customerio","name":"Customer.io","description":"Identify or track events against customers in Customer.io","hog":"let action := inputs.action\\nlet name := event.event\\n\\nlet hasIdentifier := false\\n\\nfor (let key, value in inputs.identifiers) {\\n if (not empty(value)) {\\n hasIdentifier := true\\n }\\n}\\n\\nif (not hasIdentifier) {\\n print(\'No identifier set. Skipping as at least 1 identifier is needed.\')\\n return\\n}\\n\\nif (action == \'automatic\') {\\n if (event.event in (\'$identify\', \'$set\')) {\\n action := \'identify\'\\n name := null\\n } else if (event.event == \'$pageview\') {\\n action := \'page\'\\n name := event.properties.$current_url\\n } else if (event.event == \'$screen\') {\\n action := \'screen\'\\n name := event.properties.$screen_name\\n } else {\\n action := \'event\'\\n }\\n}\\n\\nlet attributes := inputs.include_all_properties ? action == \'identify\' ? person.properties : event.properties : {}\\nif (inputs.include_all_properties and action != \'identify\' and not empty(event.elements_chain)) {\\n attributes[\'$elements_chain\'] := event.elements_chain\\n}\\nlet timestamp := toInt(toUnixTimestamp(toDateTime(event.timestamp)))\\n\\nfor (let key, value in inputs.attributes) {\\n attributes[key] := value\\n}\\n\\nlet res := fetch(f\'https://{inputs.host}/api/v2/entity\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'User-Agent\': \'PostHog Customer.io App\',\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.site_id}:{inputs.token}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'type\': \'person\',\\n \'action\': action,\\n \'name\': name,\\n \'identifiers\': inputs.identifiers,\\n \'attributes\': attributes,\\n \'timestamp\': timestamp\\n }\\n})\\n\\nif (res.status >= 400) {\\n throw Error(f\'Error from customer.io api: {res.status}: {res.body}\');\\n}","inputs_schema":[{"key":"site_id","type":"string","label":"Customer.io site ID","secret":false,"required":true},{"key":"token","type":"string","label":"Customer.io API Key","description":"You can find your API key in your Customer.io account settings (https://fly.customer.io/settings/api_credentials)","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (track.customer.io)","value":"track.customer.io"},{"label":"EU (track-eu.customer.io)","value":"track-eu.customer.io"}],"label":"Customer.io region","description":"Use the EU variant if your Customer.io account is based in the EU region","default":"track.customer.io","secret":false,"required":true},{"key":"identifiers","type":"dictionary","label":"Identifiers","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://customer.io/docs/api/track/#operation/entity","default":{"email":"{person.properties.email}"},"secret":false,"required":true},{"key":"action","type":"choice","label":"Action","description":"Choose the action to be tracked. Automatic will convert $identify, $pageview and $screen to identify, page and screen automatically - otherwise defaulting to event","default":"automatic","choices":[{"label":"Automatic","value":"automatic"},{"label":"Identify","value":"identify"},{"label":"Event","value":"event"},{"label":"Page","value":"page"},{"label":"Screen","value":"screen"},{"label":"Delete","value":"delete"}],"secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below. For identify events the Person properties will be used.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Customer.io attributes and their values. You can use the filters section to filter out unwanted events.","default":{"email":"{person.properties.email}","lastname":"{person.properties.lastname}","firstname":"{person.properties.firstname}"},"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$pageview","name":"$pageview","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/customerio.png"},{"sub_templates":null,"status":"beta","id":"template-engage-so","name":"Engage.so","description":"Send events to Engage.so","hog":"fetch(\'https://api.engage.so/posthog\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.public_key}:{inputs.private_key}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': event\\n})","inputs_schema":[{"key":"public_key","type":"string","label":"Public key","description":"Get your public key from your Engage dashboard (Settings -> Account)","secret":true,"required":true},{"key":"private_key","type":"string","label":"Private key","description":"Get your private key from your Engage dashboard (Settings -> Account)","secret":true,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1},{"id":"$groupidentify","name":"$groupidentify","type":"events","order":2},{"id":"$unset","name":"$unset","type":"events","order":3},{"id":"$create_alias","name":"$create_alias","type":"events","order":4}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/engage.png"},{"sub_templates":null,"status":"beta","id":"template-gleap","name":"Gleap","description":"Updates a contact in Gleap","hog":"let action := inputs.action\\nlet name := event.event\\n\\nif (empty(inputs.userId)) {\\n print(\'No User ID set. Skipping...\')\\n return\\n}\\n\\nlet attributes := inputs.include_all_properties ? person.properties : {}\\n\\nattributes[\'userId\'] := inputs.userId\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n attributes[key] := value\\n }\\n}\\n\\nlet res := fetch(f\'https://api.gleap.io/admin/identify\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'User-Agent\': \'PostHog Gleap.io App\',\\n \'Api-Token\': inputs.apiKey,\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': attributes\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from gleap.io api:\', res.status, res.body)\\n}","inputs_schema":[{"key":"apiKey","type":"string","label":"Gleap.io API Key","secret":true,"required":true},{"key":"userId","type":"string","label":"User ID","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://docs.gleap.io/server/rest-api","default":"{person.id}","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Gleap.io attributes and their values. You can use the filters section to filter out unwanted events.","default":{"email":"{person.properties.email}","name":"{person.properties.name}","phone":"{person.properties.phone}"},"secret":false,"required":false}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/gleap.png"},{"sub_templates":null,"status":"beta","id":"template-google-cloud-storage","name":"Google Cloud Storage","description":"Send data to GCS. This creates a file per event.","hog":"let res := fetch(f\'https://storage.googleapis.com/upload/storage/v1/b/{encodeURLComponent(inputs.bucketName)}/o?uploadType=media&name={encodeURLComponent(inputs.filename)}\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.auth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': inputs.payload\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(\'Error sending event\', res)\\n}","inputs_schema":[{"key":"auth","type":"integration","integration":"google-cloud-storage","label":"Google Cloud service account","secret":false,"required":true},{"key":"bucketName","type":"string","label":"Bucket name","secret":false,"required":true},{"key":"filename","type":"string","label":"Filename","default":"{toDate(event.timestamp)}/{event.timestamp}-{event.uuid}.json","secret":false,"required":true},{"key":"payload","type":"string","label":"File contents","default":"{jsonStringify({ \'event\': event, \'person\': person })}","secret":false,"required":true}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/google-cloud-storage.png"},{"sub_templates":null,"status":"beta","id":"template-google-pubsub","name":"Google Pub/Sub","description":"Send data to a Google Pub/Sub topic","hog":"let headers := () -> {\\n \'Authorization\': f\'Bearer {inputs.auth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n}\\nlet message := () -> {\\n \'messageId\': event.uuid,\\n \'data\': base64Encode(jsonStringify(inputs.payload)),\\n \'attributes\': inputs.attributes\\n}\\nlet res := fetch(f\'https://pubsub.googleapis.com/v1/{inputs.topicId}:publish\', {\\n \'method\': \'POST\',\\n \'headers\': headers(),\\n \'body\': jsonStringify({ \'messages\': [message()] })\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n} else {\\n throw Error(\'Error sending event\', res)\\n}","inputs_schema":[{"key":"auth","type":"integration","integration":"google-pubsub","label":"Google Cloud service account","secret":false,"required":true},{"key":"topicId","type":"string","label":"Topic name","secret":false,"required":true},{"key":"payload","type":"json","label":"Message Payload","default":{"event":"{event}","person":"{person}"},"secret":false,"required":false},{"key":"attributes","type":"json","label":"Attributes","default":{},"secret":false,"required":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/google-cloud.png"},{"sub_templates":null,"status":"beta","id":"template-hubspot","name":"Hubspot","description":"Creates a new contact in Hubspot whenever an event is triggered.","hog":"let properties := inputs.properties\\nproperties.email := inputs.email\\n\\nif (empty(properties.email)) {\\n print(\'`email` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet headers := {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n}\\n\\nlet res := fetch(\'https://api.hubapi.com/crm/v3/objects/contacts\', {\\n \'method\': \'POST\',\\n \'headers\': headers,\\n \'body\': {\\n \'properties\': properties\\n }\\n})\\n\\nif (res.status == 409) {\\n let existingId := replaceOne(res.body.message, \'Contact already exists. Existing ID: \', \'\')\\n let updateRes := fetch(f\'https://api.hubapi.com/crm/v3/objects/contacts/{existingId}\', {\\n \'method\': \'PATCH\',\\n \'headers\': headers,\\n \'body\': {\\n \'properties\': properties\\n }\\n })\\n\\n if (updateRes.status != 200 or updateRes.body.status == \'error\') {\\n print(\'Error updating contact:\', updateRes.body)\\n return\\n }\\n print(\'Contact updated successfully!\')\\n return\\n} else if (res.status >= 300 or res.body.status == \'error\') {\\n print(\'Error creating contact:\', res.body)\\n return\\n} else {\\n print(\'Contact created successfully!\')\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"hubspot","label":"Hubspot connection","secret":false,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Property mapping","description":"Map any event properties to Hubspot properties.","default":{"firstname":"{person.properties.firstname}","lastname":"{person.properties.lastname}","company":"{person.properties.company}","phone":"{person.properties.phone}","website":"{person.properties.website}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/hubspot.png"},{"sub_templates":null,"status":"beta","id":"template-Intercom","name":"Intercom","description":"Send events and contact information to Intercom","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Skipping.\')\\n return\\n}\\n\\nlet res := fetch(f\'https://{inputs.host}/events\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.access_token}\',\\n \'Content-Type\': \'application/json\',\\n \'Accept\': \'application/json\'\\n },\\n \'body\': {\\n \'event_name\': event.event,\\n \'created_at\': toInt(toUnixTimestamp(toDateTime(event.timestamp))),\\n \'email\': inputs.email,\\n \'id\': event.distinct_id,\\n }\\n})\\n\\nif (res.status >= 200 and res.status < 300) {\\n print(\'Event sent successfully!\')\\n return\\n}\\n\\nif (res.status == 404) {\\n print(\'No existing contact found for email\')\\n return\\n}\\n\\nprint(\'Error sending event:\', res.status, res.body)","inputs_schema":[{"key":"access_token","type":"string","label":"Intercom access token","description":"Create an Intercom app (https://developers.intercom.com/docs/build-an-integration/learn-more/authentication), then go to Configure > Authentication to find your token.","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (api.intercom.io)","value":"api.intercom.io"},{"label":"EU (api.eu.intercom.com)","value":"api.eu.intercom.com"}],"label":"Data region","description":"Use the EU variant if your Intercom account is based in the EU region","default":"api.intercom.io","secret":false,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users.","default":"{person.properties.email}","secret":false,"required":true}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/intercom.png"},{"sub_templates":null,"status":"beta","id":"template-knock","name":"Knock","description":"Send events to Knock","hog":"if (empty(inputs.userId)) {\\n print(\'No User ID set. Skipping...\')\\n return\\n}\\n\\nlet body := {\\n \'type\': \'track\',\\n \'event\': event.event,\\n \'userId\': inputs.userId,\\n \'properties\': inputs.include_all_properties ? event.properties : {},\\n \'messageId\': event.uuid,\\n \'timestamp\': event.timestamp\\n}\\nif (inputs.include_all_properties and not empty(event.elements_chain)) {\\n body[\'properties\'][\'$elements_chain\'] := event.elements_chain\\n}\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value)) {\\n body[\'properties\'][key] := value\\n }\\n}\\n\\nlet res := fetch(inputs.webhookUrl, {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': body\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from knock.app api:\', res.status, res.body)\\n}","inputs_schema":[{"key":"webhookUrl","type":"string","label":"Knock.app webhook destination URL","secret":false,"required":true},{"key":"userId","type":"string","label":"User ID","description":"You can choose to fill this from an `email` property or an `id` property. If the value is empty nothing will be sent. See here for more information: https://docs.gleap.io/server/rest-api","default":"{person.id}","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Knock.app attributes and their values. You can use the filters section to filter out unwanted events.","default":{"price":"{event.properties.price}"},"secret":false,"required":false}],"category":["SMS & Push Notifications"],"filters":null,"masking":null,"icon_url":"/static/services/knock.png"},{"sub_templates":null,"status":"beta","id":"template-loops","name":"Loops","description":"Send events to Loops","hog":"let apiKey := inputs.apiKey\\n\\nlet payload := {\\n \'userId\': event.distinct_id,\\n \'eventName\': event.event == \'$set\' ? \'$identify\' : event.event,\\n \'email\': person.properties.email\\n}\\nfor (let key, value in person.properties) {\\n payload[key] := value\\n}\\nfetch(\'https://app.loops.so/api/v1/events/send\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\',\\n \'Authorization\': f\'Bearer {apiKey}\',\\n },\\n \'body\': payload\\n})","inputs_schema":[{"key":"apiKey","type":"string","label":"Loops API Key","description":"Loops API Key","default":"","secret":true,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/loops.png"},{"sub_templates":null,"status":"alpha","id":"template-mailgun-send-email","name":"Mailgun","description":"Send emails using the Mailgun HTTP API","hog":"if (empty(inputs.template.to)) {\\n return false\\n}\\n\\nfun multiPartFormEncode(data) {\\n let boundary := f\'---011000010111000001101001\'\\n let bodyBoundary := f\'--{boundary}\\\\r\\\\n\'\\n let body := bodyBoundary\\n\\n for (let key, value in data) {\\n if (not empty(value)) {\\n body := f\'{body}Content-Disposition: form-data; name=\\"{key}\\"\\\\r\\\\n\\\\r\\\\n{value}\\\\r\\\\n{bodyBoundary}\'\\n }\\n }\\n\\n return {\\n \'body\': body,\\n \'contentType\': f\'multipart/form-data; boundary={boundary}\'\\n }\\n}\\n\\nlet form := multiPartFormEncode({\\n \'from\': inputs.template.from,\\n \'to\': inputs.template.to,\\n \'subject\': inputs.template.subject,\\n \'text\': inputs.template.text,\\n \'html\': inputs.template.html\\n})\\n\\nlet res := fetch(f\'https://{inputs.host}/v3/{inputs.domain_name}/messages\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'api:{inputs.api_key}\')}\',\\n \'Content-Type\': form.contentType\\n },\\n \'body\': form.body\\n})\\n\\nif (res.status >= 400) {\\n print(\'Error from Mailgun API:\', res.status, res.body)\\n}","inputs_schema":[{"key":"domain_name","type":"string","label":"Mailgun Domain Name","description":"The domain name of the Mailgun account","secret":false,"required":true},{"key":"api_key","type":"string","label":"Mailgun API Key","secret":true,"required":true},{"key":"host","type":"choice","choices":[{"label":"US (api.mailgun.net)","value":"api.mailgun.net"},{"label":"EU (api.eu.mailgun.net)","value":"api.eu.mailgun.net"}],"label":"Region","default":"api.eu.mailgun.net","secret":false,"required":true},{"key":"template","type":"email","label":"Email template","default":{"to":"{person.properties.email}"},"secret":false,"required":true}],"category":["Email Marketing"],"filters":{"events":[{"id":"","name":"","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailgun.png"},{"sub_templates":null,"status":"beta","id":"template-mailjet-create-contact","name":"Mailjet","description":"Add contacts to Mailjet","hog":"if (empty(inputs.email)) {\\n return false\\n}\\n\\nfetch(f\'https://api.mailjet.com/v3/REST/contact/\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'Email\': inputs.email,\\n \'Name\': inputs.name,\\n \'IsExcludedFromCampaigns\': inputs.is_excluded_from_campaigns\\n }\\n})","inputs_schema":[{"key":"api_key","type":"string","label":"Mailjet API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Mailjet","default":"{person.properties.email}","secret":false,"required":true},{"key":"name","type":"string","label":"Name","description":"Name of the contact","default":"{person.properties.first_name} {person.properties.last_name}","secret":false,"required":false},{"key":"is_excluded_from_campaigns","type":"boolean","label":"Is excluded from campaigns","description":"Whether the contact should be excluded from campaigns","default":false,"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailjet.png"},{"sub_templates":null,"status":"beta","id":"template-mailjet-update-contact-list","name":"Mailjet","description":"Update a Mailjet contact list","hog":"if (empty(inputs.email)) {\\n return false\\n}\\n\\nfetch(f\'https://api.mailjet.com/v3/REST/contact/{inputs.email}/managecontactlists\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'ContactsLists\':[\\n {\\n \'Action\': inputs.action,\\n \'ListID\': inputs.contact_list_id\\n },\\n ]\\n }\\n})","inputs_schema":[{"key":"api_key","type":"string","label":"Mailjet API Key","secret":true,"required":true},{"key":"email","type":"string","label":"Email of the user","description":"Where to find the email for the user to be checked with Mailjet","default":"{person.properties.email}","secret":false,"required":true},{"key":"contact_list_id","type":"string","label":"Contact list ID","description":"ID of the contact list","secret":false,"required":true},{"key":"action","type":"choice","label":"Action","secret":false,"default":"addnoforce","required":true,"choices":[{"label":"Add","value":"addnoforce"},{"label":"Add (force)","value":"addforce"},{"label":"Remove","value":"remove"},{"label":"Unsubscribe","value":"unsub"}]}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/mailjet.png"},{"sub_templates":null,"status":"beta","id":"template-posthog-replicator","name":"PostHog","description":"Send a copy of the incoming data in realtime to another PostHog instance","hog":"let host := inputs.host\\nlet token := inputs.token\\nlet include_all_properties := inputs.include_all_properties\\nlet propertyOverrides := inputs.properties\\nlet properties := include_all_properties ? event.properties : {}\\n\\nfor (let key, value in propertyOverrides) {\\n properties[key] := value\\n}\\n\\nfetch(f\'{host}/e\', {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': {\\n \'token\': token,\\n \'event\': event.event,\\n \'timestamp\': event.timestamp,\\n \'distinct_id\': event.distinct_id,\\n \'elements_chain\': event.elements_chain,\\n \'properties\': properties\\n }\\n})","inputs_schema":[{"key":"host","type":"string","label":"PostHog host","description":"For cloud accounts this is either https://us.i.posthog.com or https://eu.i.posthog.com","default":"https://us.i.posthog.com","secret":false,"required":true},{"key":"token","type":"string","label":"PostHog API key","secret":false,"required":true},{"key":"include_all_properties","type":"boolean","label":"Include all properties by default","description":"If set, all event properties will be included in the payload. Individual properties can be overridden below.","default":true,"secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Property overrides","description":"Provided values will override the event properties.","default":{},"secret":false,"required":false}],"category":["Custom","Analytics"],"filters":null,"masking":null,"icon_url":"/static/posthog-icon.svg"},{"sub_templates":null,"status":"alpha","id":"template-rudderstack","name":"RudderStack","description":"Send data to RudderStack","hog":"fun getPayload() {\\n let rudderPayload := {\\n \'context\': {\\n \'app\': {\\n \'name\': \'PostHogPlugin\',\\n },\\n \'os\': {},\\n \'page\': {},\\n \'screen\': {},\\n \'library\': {},\\n },\\n \'channel\': \'s2s\',\\n \'type\': \'track\',\\n \'properties\': {},\\n }\\n\\n if (not empty(event.properties.$os)) rudderPayload.context.os.name := event.properties.$os\\n if (not empty(event.properties.$browser)) rudderPayload.context.browser := event.properties.$browser\\n if (not empty(event.properties.$browser_version)) rudderPayload.context.browser_version := event.properties.$browser_version\\n if (not empty(event.properties.$host)) rudderPayload.context.page.host := event.properties.$host\\n if (not empty(event.properties.$current_url)) rudderPayload.context.page.url := event.properties.$current_url\\n if (not empty(event.properties.$path)) rudderPayload.context.page.path := event.properties.$path\\n if (not empty(event.properties.$referrer)) rudderPayload.context.page.referrer := event.properties.$referrer\\n if (not empty(event.properties.$initial_referrer)) rudderPayload.context.page.initial_referrer := event.properties.$initial_referrer\\n if (not empty(event.properties.$referring_domain)) rudderPayload.context.page.referring_domain := event.properties.$referring_domain\\n if (not empty(event.properties.$initial_referring_domain)) rudderPayload.context.page.initial_referring_domain := event.properties.$initial_referring_domain\\n if (not empty(event.properties.$screen_height)) rudderPayload.context.screen.height := event.properties.$screen_height\\n if (not empty(event.properties.$screen_width)) rudderPayload.context.screen.width := event.properties.$screen_width\\n if (not empty(event.properties.$lib)) rudderPayload.context.library.name := event.properties.$lib\\n if (not empty(event.properties.$lib_version)) rudderPayload.context.library.version := event.properties.$lib_version\\n if (not empty(event.$ip)) rudderPayload.context.ip := event.$ip\\n if (not empty(event.properties.$active_feature_flags)) rudderPayload.context.active_feature_flags := event.properties.$active_feature_flags\\n if (not empty(event.properties.token)) rudderPayload.context.token := event.properties.token\\n if (not empty(event.uuid)) rudderPayload.messageId := event.uuid\\n if (not empty(event.timestamp)) rudderPayload.originalTimestamp := event.timestamp\\n if (not empty(inputs.identifier)) rudderPayload.userId := inputs.identifier\\n if (not empty(event.properties.$anon_distinct_id ?? event.properties.$device_id ?? event.properties.distinct_id)) rudderPayload.anonymousId := event.properties.$anon_distinct_id ?? event.properties.$device_id ?? event.properties.distinct_id\\n\\n if (event.event in (\'$identify\', \'$set\')) {\\n rudderPayload.type := \'identify\'\\n if (not empty(event.properties.$set)) rudderPayload.context.trait := event.properties.$set\\n if (not empty(event.properties.$set)) rudderPayload.traits := event.properties.$set\\n } else if (event.event == \'$create_alias\') {\\n rudderPayload.type := \'alias\'\\n if (not empty(event.properties.alias)) rudderPayload.userId := event.properties.alias\\n if (not empty(event.distinct_id)) rudderPayload.previousId := event.distinct_id\\n } else if (event.event == \'$pageview\') {\\n rudderPayload.type := \'page\'\\n if (not empty(event.properties.name)) rudderPayload.name := event.properties.name\\n if (not empty(event.properties.$host)) rudderPayload.properties.host := event.properties.$host\\n if (not empty(event.properties.$current_url)) rudderPayload.properties.url := event.properties.$current_url\\n if (not empty(event.properties.$pathname)) rudderPayload.properties.path := event.properties.$pathname\\n if (not empty(event.properties.$referrer)) rudderPayload.properties.referrer := event.properties.$referrer\\n if (not empty(event.properties.$initial_referrer)) rudderPayload.properties.initial_referrer := event.properties.$initial_referrer\\n if (not empty(event.properties.$referring_domain)) rudderPayload.properties.referring_domain := event.properties.$referring_domain\\n if (not empty(event.properties.$initial_referring_domain)) rudderPayload.properties.initial_referring_domain := event.properties.$initial_referring_domain\\n } else if (event.event == \'$autocapture\') {\\n rudderPayload.type := \'track\'\\n if (not empty(event.properties.$event_type)) rudderPayload.event := event.properties.$event_type\\n } else {\\n rudderPayload.type := \'track\'\\n if (not empty(event.event)) rudderPayload.event := event.event\\n }\\n\\n for (let key, value in event.properties) {\\n if (value != null and not key like \'$%\') {\\n rudderPayload.properties[key] := value\\n }\\n }\\n\\n return {\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Content-Type\': \'application/json\',\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.token}:\')}\',\\n },\\n \'body\': {\\n \'batch\': [rudderPayload],\\n \'sentAt\': now()\\n }\\n }\\n}\\n\\nfetch(f\'{inputs.host}/v1/batch\', getPayload())","inputs_schema":[{"key":"host","type":"string","label":"Rudderstack host","description":"The Rudderstack destination instance","default":"https://hosted.rudderlabs.com","secret":false,"required":true},{"key":"token","type":"string","label":"Write API key","description":"RudderStack Source Writekey","secret":true,"required":true},{"key":"identifier","type":"string","label":"Identifier","default":"{person.id}","secret":false,"required":true}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/rudderstack.png"},{"sub_templates":null,"status":"alpha","id":"template-salesforce-create","name":"Salesforce","description":"Create objects in Salesforce","hog":"let getPayload := () -> {\\n let properties := {}\\n if (inputs.include_all_event_properties) {\\n if (not empty(event.elements_chain)) {\\n properties[\'$elements_chain\'] := event.elements_chain\\n }\\n for (let key, value in event.properties) {\\n properties[key] := value\\n }\\n }\\n if (inputs.include_all_person_properties) {\\n for (let key, value in person.properties) {\\n properties[key] := value\\n }\\n }\\n for (let key, value in inputs.properties) {\\n properties[key] := value\\n }\\n return properties\\n}\\n\\nlet res := fetch(f\'{inputs.oauth.instance_url}/services/data/v61.0/sobjects/{inputs.path}\', {\\n \'body\': getPayload(),\\n \'method\': \'POST\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status >= 400) {\\n print(\'Bad response:\', res.status, res.body)\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"salesforce","label":"Salesforce account","secret":false,"required":true},{"key":"path","type":"string","label":"Object path","description":"The path to the object you want to create.","default":"Contact","secret":false,"required":true},{"key":"include_all_event_properties","type":"boolean","label":"Include all event properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"include_all_person_properties","type":"boolean","label":"Include all person properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"properties","type":"json","label":"Additional properties","description":"Additional properties for the Salesforce Object.","default":{"email":"{person.properties.email}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/salesforce.png"},{"sub_templates":null,"status":"alpha","id":"template-salesforce-update","name":"Salesforce","description":"Update objects in Salesforce","hog":"let getPayload := () -> {\\n let properties := {}\\n if (inputs.include_all_event_properties) {\\n for (let key, value in event.properties) {\\n properties[key] := value\\n }\\n }\\n if (inputs.include_all_person_properties) {\\n for (let key, value in person.properties) {\\n properties[key] := value\\n }\\n }\\n for (let key, value in inputs.properties) {\\n properties[key] := value\\n }\\n return properties\\n}\\n\\nlet res := fetch(f\'{inputs.oauth.instance_url}/services/data/v61.0/sobjects/{inputs.path}\', {\\n \'body\': getPayload(),\\n \'method\': \'PATCH\',\\n \'headers\': {\\n \'Authorization\': f\'Bearer {inputs.oauth.access_token}\',\\n \'Content-Type\': \'application/json\'\\n }\\n});\\n\\nif (res.status >= 400) {\\n print(\'Bad response:\', res.status, res.body)\\n}","inputs_schema":[{"key":"oauth","type":"integration","integration":"salesforce","label":"Salesforce account","secret":false,"required":true},{"key":"path","type":"string","label":"Object path","description":"The path to the object you want to create or update. This can be a standard object like \'Contact\' for creating records or `Lead/Email/{person.properties.email}` for updating a lead by email. See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm for more information.","default":"Leads/Email/{person.properties.email}","secret":false,"required":true},{"key":"include_all_event_properties","type":"boolean","label":"Include all event properties as attributes","description":"If set, all event properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"include_all_person_properties","type":"boolean","label":"Include all person properties as attributes","description":"If set, all person properties will be included as attributes. Individual attributes can be overridden below.","default":false,"secret":false,"required":true},{"key":"properties","type":"json","label":"Additional properties","description":"Additional properties for the Salesforce Object.","default":{"email":"{person.properties.email}","browser":"{event.properties.$browser}"},"secret":false,"required":true}],"category":["CRM","Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/salesforce.png"},{"sub_templates":null,"status":"beta","id":"template-sendgrid","name":"Sendgrid","description":"Update marketing contacts in Sendgrid","hog":"if (empty(inputs.email)) {\\n print(\'`email` input is empty. Not updating contacts.\')\\n return\\n}\\n\\nlet contact := {\\n \'email\': inputs.email,\\n}\\n\\nfor (let key, value in inputs.properties) {\\n if (not empty(value)) {\\n contact[key] := value\\n }\\n}\\n\\nlet headers := {\\n \'Authorization\': f\'Bearer {inputs.api_key}\',\\n \'Content-Type\': \'application/json\'\\n}\\n\\nif (not empty(inputs.custom_fields)) {\\n let response := fetch(\'https://api.sendgrid.com/v3/marketing/field_definitions\', {\\n \'method\': \'GET\',\\n \'headers\': headers\\n })\\n if (response.status != 200) {\\n throw Error(f\'Could not fetch custom fields. Status: {response.status}\')\\n }\\n contact[\'custom_fields\'] := {}\\n for (let obj in response.body?.custom_fields ?? {}) {\\n let inputValue := inputs.custom_fields[obj.name]\\n if (not empty(inputValue)) {\\n contact[\'custom_fields\'][obj.id] := inputValue\\n }\\n }\\n}\\n\\nlet res := fetch(\'https://api.sendgrid.com/v3/marketing/contacts\', {\\n \'method\': \'PUT\',\\n \'headers\': headers,\\n \'body\': { \'contacts\': [contact] }\\n})\\n\\nif (res.status > 300) {\\n print(\'Error updating contact:\', res.status, res.body)\\n}","inputs_schema":[{"key":"api_key","type":"string","label":"Sendgrid API Key","description":"See https://app.sendgrid.com/settings/api_keys","secret":true,"required":true},{"key":"email","type":"string","label":"The email of the user","default":"{person.properties.email}","secret":false,"required":true},{"key":"properties","type":"dictionary","label":"Reserved fields","description":"The following field names are allowed: address_line_1, address_line_2, alternate_emails, anonymous_id, city, country, email, external_id, facebook, first_name, last_name, phone_number_id, postal_code, state_province_region, unique_name, whatsapp.","default":{"first_name":"{person.properties.first_name}","last_name":"{person.properties.last_name}","city":"{person.properties.city}","country":"{person.properties.country}","postal_code":"{person.properties.postal_code}"},"secret":false,"required":true},{"key":"custom_fields","type":"dictionary","label":"Custom fields","description":"Configure custom fields in SendGrid before using them here: https://mc.sendgrid.com/custom-fields","default":{},"secret":false,"required":false}],"category":["Email Marketing"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/sendgrid.png"},{"sub_templates":null,"status":"free","id":"template-zapier","name":"Zapier","description":"Sends a webhook templated by the incoming event data","hog":"let res := fetch(f\'https://hooks.zapier.com/{inputs.hook}\', {\\n \'method\': \'POST\',\\n \'body\': inputs.body\\n});\\n\\nif (inputs.debug) {\\n print(\'Response\', res.status, res.body);\\n}","inputs_schema":[{"key":"hook","type":"string","label":"Zapier hook path","description":"The path of the Zapier webhook. You can create your own or use our native Zapier integration https://zapier.com/apps/posthog/integrations","secret":false,"required":true},{"key":"body","type":"json","label":"JSON Body","default":{"hook":{"id":"{source.url}","event":"{event}","target":"https://hooks.zapier.com/{inputs.hook}"},"data":{"eventUuid":"{event.uuid}","event":"{event.event}","teamId":"{project.id}","distinctId":"{event.distinct_id}","properties":"{event.properties}","elementsChain":"{event.elementsChain}","timestamp":"{event.timestamp}","person":{"uuid":"{person.id}","properties":"{person.properties}"}}},"secret":false,"required":false},{"key":"debug","type":"boolean","label":"Log responses","description":"Logs the response of http calls for debugging.","secret":false,"required":false,"default":false}],"category":["Custom"],"filters":null,"masking":null,"icon_url":"/static/services/zapier.png"},{"sub_templates":null,"status":"beta","id":"template-zendesk","name":"Zendesk","description":"Update contacts in Zendesk","hog":"if (empty(inputs.email) or empty(inputs.name)) {\\n print(\'`email` or `name` input is empty. Not creating a contact.\')\\n return\\n}\\n\\nlet body := {\\n \'user\': {\\n \'email\': inputs.email,\\n \'name\': inputs.name,\\n \'skip_verify_email\': true,\\n \'user_fields\': {}\\n }\\n}\\n\\nfor (let key, value in inputs.attributes) {\\n if (not empty(value) and key != \'email\' and key != \'name\') {\\n body.user.user_fields[key] := value\\n }\\n}\\n\\nfetch(f\'https://{inputs.subdomain}.zendesk.com/api/v2/users/create_or_update\', {\\n \'headers\': {\\n \'Authorization\': f\'Basic {base64Encode(f\'{inputs.admin_email}/token:{inputs.token}\')}\',\\n \'Content-Type\': \'application/json\'\\n },\\n \'body\': body,\\n \'method\': \'POST\'\\n});","inputs_schema":[{"key":"subdomain","type":"string","label":"Zendesk subdomain","description":"Generally, Your Zendesk URL has two parts: a subdomain name you chose when you set up your account, followed by zendesk.com (for example: mycompany.zendesk.com). Please share the subdomain name with us so we can set up your account.","secret":false,"required":true},{"key":"admin_email","type":"string","label":"API user email","secret":true,"required":true,"description":"Enter the email of an admin in Zendesk. Activity using the API key will be attributed to this user."},{"key":"token","type":"string","label":"API token","secret":true,"required":true,"hint":"Enter your Zendesk API Token"},{"key":"email","type":"string","label":"User email","default":"{person.properties.email}","secret":false,"required":true,"hint":"The email of the user you want to create or update."},{"key":"name","type":"string","label":"User name","default":"{person.properties.name}","secret":false,"required":true,"hint":"The name of the user you want to create or update."},{"key":"attributes","type":"dictionary","label":"Attribute mapping","description":"Map of Zendesk user fields and their values. You\'ll need to create User fields in Zendesk for these to work.","default":{"phone":"{person.properties.phone}","plan":"{person.properties.plan}"},"secret":false,"required":false}],"category":["Customer Success"],"filters":{"events":[{"id":"$identify","name":"$identify","type":"events","order":0},{"id":"$set","name":"$set","type":"events","order":1}],"actions":[],"filter_test_accounts":true},"masking":null,"icon_url":"/static/services/zendesk.png"}]}'),_status_page_all_ok_namespaceObject=JSON.parse('{"page":{"id":"1ll2gn427qjl","name":"PostHog","url":"https://status.posthog.com","time_zone":"Etc/UTC","updated_at":"2024-06-29T05:42:34.351Z"},"components":[{"id":"6v7xydh2714r","name":"App","status":"operational","created_at":"2020-08-03T22:28:14.454Z","updated_at":"2024-05-28T10:24:00.192Z","position":1,"description":"Frontend application and API servers","showcase":true,"start_date":null,"group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"xtkq4whlbry9","name":"Update Service","status":"operational","created_at":"2022-11-21T21:30:16.813Z","updated_at":"2022-11-21T21:40:45.215Z","position":1,"description":null,"showcase":true,"start_date":"2022-08-01","group_id":"0cn1jr2pwdwm","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"j6bgzv8dh942","name":"PostHog.com","status":"operational","created_at":"2022-11-21T21:31:36.659Z","updated_at":"2023-04-28T19:15:51.255Z","position":1,"description":"Homepage, Docs, and Handbook","showcase":true,"start_date":"2022-07-01","group_id":null,"page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"y4bsf3hcl974","name":"AWS ec2-us-east-1","status":"operational","created_at":"2022-11-21T21:37:14.434Z","updated_at":"2024-03-26T22:17:17.790Z","position":1,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"fm3yyllyxhgj","name":"AWS elb-eu-central-1","status":"operational","created_at":"2022-11-21T21:38:24.779Z","updated_at":"2022-11-21T21:46:47.748Z","position":1,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"gl055wcw583j","name":"App","status":"operational","created_at":"2022-11-21T21:39:13.887Z","updated_at":"2024-05-08T15:33:56.331Z","position":1,"description":"Frontend application and API servers","showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"ylm2gzb49rr7","name":"License Server","status":"operational","created_at":"2022-11-21T21:34:54.421Z","updated_at":"2022-11-21T21:40:55.589Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"0cn1jr2pwdwm","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"cjgb5s1jqy56","name":"Event and Data Ingestion","status":"operational","created_at":"2022-11-21T21:35:18.114Z","updated_at":"2024-04-30T19:32:00.323Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"ps354j1bvl04","name":"AWS elasticache-eu-central-1","status":"operational","created_at":"2022-11-21T21:38:04.615Z","updated_at":"2022-11-21T21:47:06.804Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"t053nl3g63sw","name":"AWS elb-us-east-1","status":"operational","created_at":"2022-11-21T21:38:15.462Z","updated_at":"2024-06-26T03:49:53.357Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"41df083ftqt6","name":"US Cloud 🇺🇸","status":"operational","created_at":"2022-11-21T21:43:17.594Z","updated_at":"2022-11-22T01:55:51.439Z","position":2,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["6v7xydh2714r","cjgb5s1jqy56","1t4b8gf5psbc"]},{"id":"4tw78vnj4045","name":"Event and Data Ingestion","status":"operational","created_at":"2022-11-21T21:48:51.909Z","updated_at":"2024-05-27T23:47:54.117Z","position":2,"description":null,"showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"1t4b8gf5psbc","name":"Feature Flags and Experiments","status":"operational","created_at":"2022-11-21T21:35:49.794Z","updated_at":"2024-05-22T17:36:43.895Z","position":3,"description":"Decide endpoint","showcase":true,"start_date":"2022-07-01","group_id":"41df083ftqt6","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"tkzg024s2zsc","name":"AWS rds-us-east-1","status":"operational","created_at":"2022-11-21T21:37:21.722Z","updated_at":"2023-06-13T21:28:10.603Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"9t36hjkpdffk","name":"AWS rds-eu-central-1","status":"operational","created_at":"2022-11-21T21:37:32.316Z","updated_at":"2022-11-21T21:47:25.843Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"c4d9jd1jcx3f","name":"EU Cloud 🇪🇺","status":"operational","created_at":"2022-11-21T21:44:27.968Z","updated_at":"2022-11-21T21:45:39.939Z","position":3,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["gl055wcw583j","4tw78vnj4045","1mcb5g8sznnz"]},{"id":"1mcb5g8sznnz","name":"Feature Flags and Experiments","status":"operational","created_at":"2022-11-21T21:49:13.429Z","updated_at":"2024-05-22T17:36:43.909Z","position":3,"description":"Decide endpoint","showcase":true,"start_date":"2022-07-01","group_id":"c4d9jd1jcx3f","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"7zz5gc65m794","name":"AWS ec2-eu-central-1","status":"operational","created_at":"2022-11-21T21:37:41.686Z","updated_at":"2022-11-21T21:47:44.353Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"833w3100npw3","name":"AWS elasticache-us-east-1","status":"operational","created_at":"2022-11-21T21:37:50.482Z","updated_at":"2023-09-18T23:53:20.416Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"0cn1jr2pwdwm","name":"Support APIs","status":"operational","created_at":"2022-11-21T21:40:45.187Z","updated_at":"2022-11-22T01:55:51.456Z","position":4,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["xtkq4whlbry9","ylm2gzb49rr7"]},{"id":"z0y6m9kyvy3j","name":"AWS US 🇺🇸","status":"operational","created_at":"2022-11-21T21:46:33.358Z","updated_at":"2022-11-22T01:55:51.473Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["y4bsf3hcl974","t053nl3g63sw","tkzg024s2zsc","833w3100npw3","rgyd1tg1jhcv"]},{"id":"rgyd1tg1jhcv","name":"AWS kafka-us-east-1","status":"operational","created_at":"2022-11-22T02:03:23.870Z","updated_at":"2023-09-29T04:43:36.890Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":"z0y6m9kyvy3j","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"20jjhvqn3xcq","name":"AWS kafka-eu-central-1","status":"operational","created_at":"2022-11-22T02:03:26.507Z","updated_at":"2022-11-22T02:04:08.037Z","position":5,"description":null,"showcase":false,"start_date":null,"group_id":"nfknrn2bf3yz","page_id":"1ll2gn427qjl","group":false,"only_show_if_degraded":false},{"id":"nfknrn2bf3yz","name":"AWS EU 🇪🇺","status":"operational","created_at":"2022-11-21T21:46:47.736Z","updated_at":"2022-11-22T01:55:51.491Z","position":6,"description":null,"showcase":false,"start_date":null,"group_id":null,"page_id":"1ll2gn427qjl","group":true,"only_show_if_degraded":false,"components":["fm3yyllyxhgj","ps354j1bvl04","9t36hjkpdffk","7zz5gc65m794","20jjhvqn3xcq"]}],"incidents":[],"scheduled_maintenances":[],"status":{"indicator":"none","description":"All Systems Operational"}}');var fixtures_status_page_all_ok_namespaceObject=__webpack_require__.t(_status_page_all_ok_namespaceObject,2),utils=__webpack_require__("./frontend/src/mocks/utils.ts");let EMPTY_PAGINATED_RESPONSE={count:0,results:[],next:null,previous:null},toPaginatedResponse=results=>({count:results.length,results,next:null,previous:null});function posthogCORSResponse(req,res,ctx){return res(ctx.status(200),ctx.json("ok"),ctx.set("Access-Control-Allow-Origin",req.referrer.length?req.referrer:"http://localhost"),ctx.set("Access-Control-Allow-Credentials","true"),ctx.set("Access-Control-Allow-Headers","*"))}let defaultMocks={get:{"/api/projects/:team_id/activity_log/important_changes/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/actions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/annotations/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/event_definitions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/cohorts/":toPaginatedResponse([api_mock.IN]),"/api/environments/:team_id/dashboards/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/alerts/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/dashboard_templates":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/dashboard_templates/repository/":[],"/api/projects/:team_id/external_data_sources/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/notebooks":()=>[200,{count:0,results:[]}],"api/projects/:team/notebooks/recording_comments":{results:[]},"/api/projects/:team_id/groups/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/groups_types/":[],"/api/environments/:team_id/insights/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/insights/:insight_id/sharing/":{enabled:!1,access_token:"foo",created_at:"2020-11-11T00:00:00Z"},"/api/projects/:team_id/property_definitions/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/feature_flags/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/feature_flags/:feature_flag_id/role_access":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/experiments/":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/explicit_members/":[],"/api/projects/:team_id/warehouse_view_link/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/warehouse_saved_queries/":EMPTY_PAGINATED_RESPONSE,"/api/projects/:team_id/warehouse_tables/":EMPTY_PAGINATED_RESPONSE,"/api/organizations/@current/":()=>[200,{...api_mock.On,available_product_features:(0,features.I)()}],"/api/organizations/@current/roles/":EMPTY_PAGINATED_RESPONSE,"/api/organizations/@current/members/":toPaginatedResponse([api_mock.hH,api_mock.RC]),"/api/organizations/@current/invites/":toPaginatedResponse([api_mock.aM]),"/api/organizations/@current/plugins/":toPaginatedResponse([api_mock.ZZ]),"/api/organizations/@current/plugins/repository/":[],"/api/organizations/@current/plugins/unused/":[],"/api/plugin_config/":toPaginatedResponse([api_mock.i6]),[`/api/environments/:team_id/plugin_configs/${api_mock.i6.id}/`]:api_mock.i6,"/api/environments/:team_id/persons":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/persons/properties/":toPaginatedResponse(api_mock.R2),"/api/personal_api_keys/":[],"/api/users/@me/":()=>[200,{...api_mock.T6,organization:{...api_mock.On,available_product_features:(0,features.I)()}}],"/api/users/@me/two_factor_status/":()=>[200,{is_enabled:!0,backup_codes:[],method:"TOTP"}],"/api/environments/@current/":api_mock.k3,"/api/projects/@current/":api_mock.k3,"/api/projects/:team_id/comments/count":{count:0},"/api/projects/:team_id/comments":{results:[]},"/_preflight":__webpack_require__("./frontend/src/mocks/fixtures/_preflight.json"),"/_system_status":__webpack_require__("./frontend/src/mocks/fixtures/_system_status.json"),"/api/instance_status":__webpack_require__("./frontend/src/mocks/fixtures/_instance_status.json"),"/api/sentry_stats/":{error:"Error fetching stats from sentry",exception:"[ErrorDetail(string='Sentry integration not configured', code='invalid')]"},"https://api.github.com/repos/posthog/posthog-js/tags":()=>[200,[]],"https://www.gravatar.com/avatar/:gravatar_id":()=>[404,""],"https://us.i.posthog.com/api/early_access_features":{earlyAccessFeatures:[]},"/api/billing/":{..._billing.t},"/api/billing/get_invoices":{link:null,count:0},"/api/billing/credits/overview":{status:"None",eligible:!1},"https://status.posthog.com/api/v2/summary.json":fixtures_status_page_all_ok_namespaceObject,"/api/projects/:team_id/hog_function_templates":_hogFunctionTemplates_namespaceObject,"/api/projects/:team_id/hog_function_templates/:id":(req,res,ctx)=>{let hogFunctionTemplate=_hogFunctionTemplates_namespaceObject.results.find(conf=>conf.id===req.params.id);return res(_hogFunctionTemplates_namespaceObject?ctx.json({...hogFunctionTemplate}):ctx.status(404))},"/api/projects/:team_id/hog_functions":EMPTY_PAGINATED_RESPONSE,"/api/environments/:team_id/data_color_themes":api_mock.J7},post:{"https://us.i.posthog.com/e/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/e/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"https://us.i.posthog.com/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"https://us.i.posthog.com/engage/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx),"/api/environments/:team_id/insights/:insight_id/viewed/":()=>[201,null],"api/environments/:team_id/query":[200,{results:[]}]},patch:{"/api/projects/:team_id/session_recording_playlists/:playlist_id/":{}},options:{"https://us.i.posthog.com/decide/":(req,res,ctx)=>posthogCORSResponse(req,res,ctx)}},handlers=(0,utils.D)(defaultMocks)},"./frontend/src/mocks/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>mocksToHandlers});var msw__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/msw@0.49.0_typescript@4.9.5/node_modules/msw/lib/index.js");let mocksToHandlers=mocks=>{let response=[];return Object.entries(mocks).map(_ref=>{let[method,mockHandlers]=_ref;Object.entries(mockHandlers).map(_ref2=>{let[path,handler]=_ref2,pathWithoutTrailingSlash=path.replace(/\/$/,"");response.push(msw__WEBPACK_IMPORTED_MODULE_0__.rest[method](pathWithoutTrailingSlash,async(req,res,ctx)=>{if("function"==typeof handler){let response=await handler(req,res,ctx);if(Array.isArray(response)){if(2===response.length&&"number"==typeof response[0]){var _responseArray$;return res(ctx.status(response[0]),ctx.json(null!==(_responseArray$=response[1])&&void 0!==_responseArray$?_responseArray$:null))}return res(...response)}return response||res()}return res(ctx.json(null!=handler?handler:null))}))})}),response}},"./frontend/src/models/actionsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>actionsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx");let actionsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","actionsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__.H,["currentTeam"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{props,values,actions}=_ref;return{actions:{__default:[],loadActions:async()=>{var _response$results;let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.list(props.params);return null!==(_response$results=response.results)&&void 0!==_response$results?_response$results:[]},updateAction:action=>(values.actions||[]).map(a=>action.id===a.id?action:a)},pin:{pinAction:async action=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.update(action.id,{name:action.name,pinned_at:new Date().toISOString()});actions.updateAction(response)},unpinAction:async action=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.update(action.id,{name:action.name,pinned_at:null});actions.updateAction(response)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref2=>{let{selectors}=_ref2;return{actionsGrouped:[()=>[selectors.actions],actions=>[{label:"Select an action",options:actions.map(action=>({label:action.name,value:action.id}))}]],actionsById:[s=>[s.actions],actions=>Object.fromEntries(actions.map(action=>[action.id,action]))],actionsSorted:[s=>[s.actions],actions=>actions.sort((a,b)=>(b.pinned_at?1:0)-(a.pinned_at?1:0))]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.events)(_ref3=>{let{values,actions}=_ref3;return{afterMount:()=>{(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_4__.R)(values.currentTeam)&&actions.loadActions()}}}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_3__.Y)()])},"./frontend/src/models/annotationsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AT:()=>annotationsModel,vH:()=>deserializeAnnotation});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_dayjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx");function deserializeAnnotation(annotation,projectTimezone){return{...annotation,date_marker:annotation.date_marker?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.fp)(annotation.date_marker,projectTimezone):null,created_at:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.fp)(annotation.created_at,projectTimezone)}}let annotationsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","annotationsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["currentTeam","timezone"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteAnnotation:annotation=>({annotation}),loadAnnotationsNext:()=>!0,setNext:next=>({next}),appendAnnotations:annotations=>({annotations}),replaceAnnotation:annotation=>({annotation})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values,actions}=_ref;return{rawAnnotations:{__default:[],loadAnnotations:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.list();return actions.setNext(response.next||null),response.results},createAnnotationGenerically:async annotationData=>{let createdAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.create(annotationData);actions.appendAnnotations([createdAnnotation])},updateAnnotation:async _ref2=>{let{annotationId,annotationData}=_ref2,updatedAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.update(annotationId,annotationData);actions.replaceAnnotation(updatedAnnotation)},deleteAnnotation:async _ref3=>{let{annotation}=_ref3;return await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.annotations.determineDeleteEndpoint(),object:{name:`${annotation.date_marker} annotation`,...annotation},callback:(undo,annotation)=>{undo&&actions.appendAnnotations([function(annotation){return{...annotation,date_marker:annotation.date_marker?annotation.date_marker.toISOString():null,created_at:annotation.created_at.toISOString()}}(annotation)])}}),values.annotations.filter(a=>a.id!==annotation.id)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({rawAnnotations:[[],{appendAnnotations:(state,_ref4)=>{let{annotations}=_ref4;return[...state,...annotations]},replaceAnnotation:(state,_ref5)=>{let{annotation}=_ref5,copy=state.slice(),index=copy.findIndex(iterationAnnotation=>iterationAnnotation.id===annotation.id);return copy[index]=annotation,copy}}],next:[null,{setNext:(_,_ref6)=>{let{next}=_ref6;return next}}],loadingNext:[!1,{loadAnnotationsNext:()=>!0,appendAnnotations:()=>!1}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({annotations:[s=>[s.rawAnnotations,s.timezone],(rawAnnotations,timezone)=>rawAnnotations.map(annotation=>deserializeAnnotation(annotation,timezone))],annotationsLoading:[s=>[s.rawAnnotationsLoading],rawAnnotationsLoading=>rawAnnotationsLoading]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{actions,values}=_ref7;return{loadAnnotationsNext:async()=>{let results=[];if(values.next){let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.get(values.next);actions.setNext(response.next),results=response.results}actions.appendAnnotations(results)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref8=>{let{values,actions}=_ref8;(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.R)(values.currentTeam)&&actions.loadAnnotations()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/cohortsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>cohortsModel,k:()=>processCohort});var fuse_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/types.ts");function processCohort(cohort){var _cohort$filters$prope;return{...cohort,filters:{properties:{...cohort.filters.properties,values:null!==(_cohort$filters$prope=cohort.filters.properties?.values?.map(group=>"values"in group?{...group,values:group.values.map(c=>(function(criteria){if(!criteria.type)return criteria;let processedCriteria={...criteria};return![scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Cohort,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Person].includes(criteria.type)||"value_property"in criteria||(processedCriteria.value_property=criteria.value,processedCriteria.value=criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Cohort?_types__WEBPACK_IMPORTED_MODULE_11__.Vb.InCohort:_types__WEBPACK_IMPORTED_MODULE_11__.G2.HaveProperty),[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_7__.y4.Behavioral].includes(criteria.type)&&!("explicit_datetime"in criteria)&&criteria.value&&scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_6__.Gp.includes(criteria.value)&&(processedCriteria.explicit_datetime=function(criteria){let timeValue=criteria?.time_value,timeInterval=criteria?.time_interval;if(timeValue&&timeInterval)return`-${timeValue}${timeInterval[0]}`}(criteria)),processedCriteria})(c))}:group))&&void 0!==_cohort$filters$prope?_cohort$filters$prope:[]}}}}let cohortsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","cohortsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H,["currentTeam"]],actions:[lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__.exportsLogic,["startExport"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({setPollTimeout:pollTimeout=>({pollTimeout}),updateCohort:cohort=>({cohort}),deleteCohort:cohort=>({cohort}),cohortCreated:cohort=>({cohort}),exportCohortPersons:(id,columns)=>({id,columns})})),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(()=>({cohorts:{__default:[],loadCohorts:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.cohorts.list();return scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_8__.T.findMounted({syncWithUrl:!0})?.actions.loadCohorts(),response?.results?.map(cohort=>processCohort(cohort))||[]}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({pollTimeout:[null,{setPollTimeout:(_,_ref)=>{let{pollTimeout}=_ref;return pollTimeout}}],cohorts:{updateCohort:(state,_ref2)=>{let{cohort}=_ref2;return cohort?[...state].map(existingCohort=>existingCohort.id===cohort.id?cohort:existingCohort):state},cohortCreated:(state,_ref3)=>{let{cohort}=_ref3;return cohort?[cohort,...state]:state},deleteCohort:(state,_ref4)=>{let{cohort}=_ref4;return cohort.id?[...state].filter(c=>c.id!==cohort.id):state}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({cohortsWithAllUsers:[s=>[s.cohorts],cohorts=>[{id:"all",name:"All Users*"},...cohorts]],cohortsById:[s=>[s.cohorts],cohorts=>Object.fromEntries(cohorts.map(cohort=>[cohort.id,cohort]))],cohortsSearch:[s=>[s.cohorts],cohorts=>{let fuse=new fuse_js__WEBPACK_IMPORTED_MODULE_12__.Z(null!=cohorts?cohorts:[],{keys:["name"],threshold:.3});return term=>fuse.search(term).map(result=>result.item)}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref5=>{let{actions}=_ref5;return{loadCohortsSuccess:async _ref6=>{let{cohorts}=_ref6,is_calculating=cohorts.filter(cohort=>cohort.is_calculating).length>0;is_calculating&&window.location.pathname.includes(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.cohorts())&&actions.setPollTimeout(window.setTimeout(actions.loadCohorts,5e3))},exportCohortPersons:async _ref7=>{let{id,columns}=_ref7,exportCommand={export_format:_types__WEBPACK_IMPORTED_MODULE_11__.P5.CSV,export_context:{path:`/api/cohort/${id}/persons`}};columns&&columns.length>0&&(exportCommand.export_context.columns=columns),actions.startExport(exportCommand)},deleteCohort:async _ref8=>{let{cohort}=_ref8;await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.cohorts.determineDeleteEndpoint(),object:cohort,callback:actions.loadCohorts})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref9=>{let{values}=_ref9;clearTimeout(values.pollTimeout||void 0)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref10=>{let{actions,values}=_ref10;(0,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.R)(values.currentTeam)&&actions.loadCohorts()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/dashboardsModel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>dashboardsModel,q:()=>nameCompareFunction});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_tagsModel__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/models/tagsModel.ts"),_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dashboardsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","dashboardsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_models_tagsModel__WEBPACK_IMPORTED_MODULE_11__.x,["loadTags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({dashboardsFullyLoaded:!0,delayedDeleteDashboard:id=>({id}),setDiveSourceId:id=>({id}),addDashboardSuccess:dashboard=>({dashboard}),updateDashboardInsight:(insight,extraDashboardIds)=>({insight,extraDashboardIds}),pinDashboard:(id,source)=>({id,source}),unpinDashboard:(id,source)=>({id,source}),duplicateDashboard:_ref=>{let{id,name,show,duplicateTiles}=_ref;return{id:id,name:name||`#${id}`,show:show||!1,duplicateTiles:duplicateTiles||!1}},tileMovedToDashboard:(tile,dashboardId)=>({tile,dashboardId}),tileRemovedFromDashboard:_ref2=>{let{tile,dashboardId}=_ref2;return{tile,dashboardId}},tileAddedToDashboard:dashboardId=>({dashboardId})})),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{values,actions}=_ref3;return{pagedDashboards:[null,{loadDashboards:async url=>{let exportedDashboard=window.POSTHOG_EXPORTED_DATA?.dashboard;if(exportedDashboard?.id&&exportedDashboard?.tiles)return{count:1,next:null,previous:null,results:[(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(exportedDashboard)]};if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_6__.Pc)())return{count:0,next:null,previous:null,results:[]};let dashboards=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url||`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/?limit=2000`);return{...dashboards,results:dashboards.results?.map(dashboard=>_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob(dashboard))}}}],dashboard:{__default:null,updateDashboard:async(_ref4,breakpoint)=>{let{id,allowUndo,...payload}=_ref4;if(!Object.entries(payload).length)return;breakpoint();let beforeChange={...values.rawDashboards[id]},response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,payload),updatedAttribute=Object.keys(payload)[0];return("name"===updatedAttribute||"description"===updatedAttribute||"tags"===updatedAttribute)&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardFrontEndUpdate(updatedAttribute,values.rawDashboards[id]?.[updatedAttribute]?.length||0,payload[updatedAttribute].length),"tags"===updatedAttribute&&actions.loadTags()),allowUndo&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Dashboard updated",{button:{label:"Undo",action:async()=>{let reverted=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,beforeChange);actions.updateDashboardSuccess((0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(reverted)),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Dashboard change reverted")}}}),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},deleteDashboard:async _ref5=>{let{id,deleteInsights}=_ref5;return(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{deleted:!0,delete_insights:deleteInsights}))},restoreDashboard:async _ref6=>{let{id}=_ref6;return(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{deleted:!1}))},pinDashboard:async _ref7=>{let{id,source}=_ref7,response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{pinned:!0});return lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardPinToggled(!0,source),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},unpinDashboard:async _ref8=>{let{id,source}=_ref8,response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/${id}`,{pinned:!1});return lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx.actions.reportDashboardPinToggled(!1,source),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(response)},duplicateDashboard:async _ref9=>{let{id,name,show,duplicateTiles}=_ref9,result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_9__.H.values.currentTeamId}/dashboards/`,{use_dashboard:id,name:`${name} (Copy)`,duplicate_tiles:duplicateTiles});return show&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(result.id)),(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({pagingDashboardsCompleted:[!1,{dashboardsFullyLoaded:()=>!0}],redirect:[!0,{deleteDashboard:(state,_ref10)=>{let{redirect}=_ref10;return void 0!==redirect?redirect:state},restoreDashboard:(state,_ref11)=>{let{redirect}=_ref11;return void 0!==redirect?redirect:state}}],rawDashboards:[{},{loadDashboardsSuccess:(state,_ref12)=>{let{pagedDashboards}=_ref12;return pagedDashboards?{...state,...(0,lib_utils__WEBPACK_IMPORTED_MODULE_6__.Tl)(pagedDashboards.results)}:state},addDashboardSuccess:(state,_ref13)=>{let{dashboard}=_ref13;return{...state,[dashboard.id]:dashboard}},restoreDashboardSuccess:(state,_ref14)=>{let{dashboard}=_ref14;return{...state,[dashboard.id]:dashboard}},updateDashboardSuccess:(state,_ref15)=>{let{dashboard}=_ref15;return dashboard?{...state,[dashboard.id]:dashboard}:state},deleteDashboardSuccess:(state,_ref16)=>{let{dashboard}=_ref16;return{...state,[dashboard.id]:{...state[dashboard.id],deleted:!0}}},delayedDeleteDashboard:(state,_ref17)=>{let{id}=_ref17,{[id]:_discard,...rest}=state;return rest},pinDashboardSuccess:(state,_ref18)=>{let{dashboard}=_ref18;return{...state,[dashboard.id]:dashboard}},unpinDashboardSuccess:(state,_ref19)=>{let{dashboard}=_ref19;return{...state,[dashboard.id]:dashboard}},duplicateDashboardSuccess:(state,_ref20)=>{let{dashboard}=_ref20;return{...state,[dashboard.id]:{...dashboard,_highlight:!0}}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref21=>{let{selectors}=_ref21;return{nameSortedDashboards:[()=>[selectors.rawDashboards],rawDashboards=>[...Object.values(rawDashboards)].filter(dashboard=>{var _dashboard$name;return!(null!==(_dashboard$name=dashboard.name)&&void 0!==_dashboard$name?_dashboard$name:"Untitled").startsWith(lib_constants__WEBPACK_IMPORTED_MODULE_4__.Lm)}).sort(nameCompareFunction)],pinSortedDashboards:[()=>[selectors.nameSortedDashboards],nameSortedDashboards=>[...nameSortedDashboards].sort((a,b)=>(Number(b.pinned)-Number(a.pinned))*10+nameCompareFunction(a,b))],dashboardsLoading:[()=>[selectors.pagedDashboardsLoading,selectors.pagingDashboardsCompleted],(pagedDashboardsLoading,pagingDashboardsCompleted)=>pagedDashboardsLoading||!pagingDashboardsCompleted],pinnedDashboards:[()=>[selectors.nameSortedDashboards],nameSortedDashboards=>nameSortedDashboards.filter(d=>d.pinned)]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref22=>{let{actions,values}=_ref22;return{loadDashboardsSuccess:_ref23=>{let{pagedDashboards}=_ref23;pagedDashboards?.next?actions.loadDashboards(pagedDashboards.next):actions.dashboardsFullyLoaded()},addDashboardSuccess:_ref24=>{let{dashboard}=_ref24;kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("onboarding")||lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Dashboard created"}),{button:{label:"View",action:()=>kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(dashboard.id))}})},restoreDashboardSuccess:_ref25=>{let{dashboard}=_ref25;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})," restored"]})),values.redirect&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_10__.j.dashboard(dashboard.id))},deleteDashboardSuccess:async _ref26=>{let{dashboard}=_ref26;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})," deleted"]}),{button:{label:"Undo",action:()=>{actions.restoreDashboard({id:dashboard.id,redirect:values.redirect})}}}),actions.delayedDeleteDashboard(dashboard.id)},duplicateDashboardSuccess:async _ref27=>{let{dashboard}=_ref27;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Dashboard copied as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("b",{children:dashboard.name})]}))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref28=>{let{actions}=_ref28;actions.loadDashboards()}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_8__.Y)()]);function nameCompareFunction(a,b){var _a$name,_b$name;if(a.pinned!==b.pinned)return b.pinned?1:-1;let firstName=null!==(_a$name=a.name)&&void 0!==_a$name?_a$name:"Untitled",secondName=null!==(_b$name=b.name)&&void 0!==_b$name?_b$name:"Untitled";return firstName.localeCompare(secondName)}},"./frontend/src/models/groupsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>groupsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/introductions/groupsAccessLogic.ts"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/projectLogic.ts");let groupsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","groupsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_projectLogic__WEBPACK_IMPORTED_MODULE_6__.K,["currentProjectId"],lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__.e,["groupsEnabled","groupsAccessStatus"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{groupTypesRaw:[[],{loadAllGroupTypes:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(`api/projects/${values.currentProjectId}/groups_types`),updateGroupTypesMetadata:async payload=>values.groupsEnabled?await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.update(`/api/projects/${values.currentProjectId}/groups_types/update_metadata`,payload):[]}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({groupTypes:[s=>[s.groupTypesRaw],groupTypesRaw=>new Map(groupTypesRaw.map(groupType=>[groupType.group_type_index,groupType]))],groupTypesLoading:[s=>[s.groupTypesRawLoading],groupTypesRawLoading=>groupTypesRawLoading],showGroupsOptions:[s=>[s.groupsAccessStatus,s.groupsEnabled,s.groupTypes],(status,enabled,groupTypes)=>status!==lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_5__.Q.Hidden||enabled&&Array.from(groupTypes.values()).length>0],groupsTaxonomicTypes:[s=>[s.groupTypes],groupTypes=>Array.from(groupTypes.values()).map(groupType=>`${lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__.t.GroupsPrefix}_${groupType.group_type_index}`)],groupNamesTaxonomicTypes:[s=>[s.groupTypes],groupTypes=>Array.from(groupTypes.values()).map(groupType=>`${lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_4__.t.GroupNamesPrefix}_${groupType.group_type_index}`)],aggregationLabel:[s=>[s.groupTypes],groupTypes=>function(groupTypeIndex){let deferToUserWording=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0!=groupTypeIndex){let groupType=groupTypes.get(groupTypeIndex);return groupType?{singular:groupType.name_singular||groupType.group_type,plural:groupType.name_plural||`${groupType.group_type}(s)`}:{singular:"unknown group",plural:"unknown groups"}}return deferToUserWording?{singular:"user",plural:"users"}:{singular:"person",plural:"persons"}}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref2=>{let{values}=_ref2;return{groupsEnabled:enabled=>{!values.groupTypesLoading&&enabled&&groupsModel.actions.loadAllGroupTypes()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref3=>{let{actions}=_ref3;actions.loadAllGroupTypes()})])},"./frontend/src/models/insightsModel.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>insightsModel});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let insightsModel=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["models","insightsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({logic:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__.H]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(()=>({renameInsight:item=>({item}),renameInsightSuccess:item=>({item}),duplicateInsight:item=>({item}),duplicateInsightSuccess:item=>({item}),insightsAddedToDashboard:_ref=>{let{dashboardId,insightIds}=_ref;return{dashboardId,insightIds}}})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{renameInsight:async _ref3=>{let{item}=_ref3;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Rename insight",initialValues:{insightName:item.name},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D,{name:"insightName",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{"data-attr":"insight-name",placeholder:"Please enter the new name",autoFocus:!0})}),errors:{insightName:name=>name?void 0:"You must enter a name"},onSubmit:async _ref4=>{let{insightName}=_ref4,updatedItem=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__.L.update(item.id,{name:insightName});lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Renamed insight from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("b",{children:item.name})," to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("b",{children:insightName})]})),actions.renameInsightSuccess(updatedItem)}})},duplicateInsight:async _ref5=>{let{item}=_ref5,addedItem=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_4__.L.duplicate(item);actions.duplicateInsightSuccess(addedItem),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.success("Insight duplicated")}}})])},"./frontend/src/models/notebooksModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>notebooksModel,fL:()=>openNotebook,zh:()=>SCRATCHPAD_NOTEBOOK});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_notebooks_Notebook_notebookLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/notebookLogic.ts"),scenes_notebooks_Notebook_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/notebooks/Notebook/utils.ts"),scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts"),scenes_notebooks_NotebookTemplates_notebookTemplates__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/notebooks/NotebookTemplates/notebookTemplates.ts"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/types.ts");let SCRATCHPAD_NOTEBOOK={id:"scratchpad",short_id:"scratchpad",title:"My scratchpad",created_at:"",created_by:null},openNotebook=async function(notebookId,target){let autofocus=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,onOpen=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},thePanelLogic=scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__.F.findMounted();thePanelLogic&&target===_types__WEBPACK_IMPORTED_MODULE_12__.bZ.Popover?thePanelLogic.actions.selectNotebook(notebookId,{autofocus}):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname===scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook("new")?kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook(notebookId)):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.notebook(notebookId));let theNotebookLogic=(0,scenes_notebooks_Notebook_notebookLogic__WEBPACK_IMPORTED_MODULE_6__.T)({shortId:notebookId}),unmount=theNotebookLogic.mount();try{onOpen(theNotebookLogic)}finally{unmount()}},notebooksModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","notebooks","Notebook","notebooksModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({createNotebook:(location1,title,content,onCreate)=>({title,location:location1,content,onCreate}),receiveNotebookUpdate:notebook=>({notebook}),loadNotebooks:!0,deleteNotebook:(shortId,title)=>({shortId,title}),createNotebookFromDashboard:dashboard=>({dashboard})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_projectLogic__WEBPACK_IMPORTED_MODULE_10__.K,["currentProjectId"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({scratchpadNotebook:[SCRATCHPAD_NOTEBOOK]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{notebooks:[[],{createNotebook:async _ref2=>{let{title,location:location1,content,onCreate}=_ref2,notebook=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.notebooks.create({title,content:(0,scenes_notebooks_Notebook_utils__WEBPACK_IMPORTED_MODULE_7__.Qc)(title,content)});return await openNotebook(notebook.short_id,location1,"end",logic=>{onCreate?.(logic)}),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("notebook created",{short_id:notebook.short_id}),[notebook,...values.notebooks]},deleteNotebook:async _ref3=>{let{shortId,title}=_ref3;await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:`projects/${values.currentProjectId}/notebooks`,object:{name:title||shortId,id:shortId}});let panelLogic=scenes_notebooks_NotebookPanel_notebookPanelLogic__WEBPACK_IMPORTED_MODULE_8__.F.findMounted();return panelLogic&&panelLogic.values.selectedNotebook===shortId&&panelLogic.actions.selectNotebook(SCRATCHPAD_NOTEBOOK.short_id,{silent:!0}),values.notebooks.filter(n=>n.short_id!==shortId)},receiveNotebookUpdate:_ref4=>{let{notebook}=_ref4;return notebook.is_template?values.notebooks:values.notebooks.filter(n=>n.short_id!==notebook.short_id).concat([notebook])}}],notebookTemplates:[scenes_notebooks_NotebookTemplates_notebookTemplates__WEBPACK_IMPORTED_MODULE_9__.D,{}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref5=>{let{asyncActions}=_ref5;return{createNotebookFromDashboard:async _ref6=>{let{dashboard}=_ref6,queries=dashboard.tiles.reduce((acc,tile)=>tile.insight?[...acc,{title:tile.insight.name,query:tile.insight.query}]:acc,[]),resources=queries.map(x=>({type:_types__WEBPACK_IMPORTED_MODULE_12__.Cz.Query,attrs:{title:x.title,query:x.query}}));await asyncActions.createNotebook(_types__WEBPACK_IMPORTED_MODULE_12__.bZ.Scene,dashboard.name+" (copied)",resources)}}})])},"./frontend/src/models/propertyDefinitionsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IP:()=>propertyDefinitionsModel,kU:()=>PROPERTY_FILTER_TYPES_WITH_TEMPORAL_SUGGESTIONS,rR:()=>PROPERTY_FILTER_TYPES_WITH_ALL_TIME_SUGGESTIONS,s8:()=>updatePropertyDefinitions});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_internalMetrics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/internalMetrics.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/kea-logic-builders.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/types.ts");let PROPERTY_FILTER_TYPES_WITH_TEMPORAL_SUGGESTIONS=[_types__WEBPACK_IMPORTED_MODULE_7__.FT.Event,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Feature],PROPERTY_FILTER_TYPES_WITH_ALL_TIME_SUGGESTIONS=[_types__WEBPACK_IMPORTED_MODULE_7__.FT.Person,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Group,_types__WEBPACK_IMPORTED_MODULE_7__.FT.Session],localProperties={"event/$session_duration":{id:"$session_duration",name:"$session_duration",description:"Duration of the session",is_numerical:!0,is_seen_on_filtered_events:!1,property_type:_types__WEBPACK_IMPORTED_MODULE_7__.uS.Duration},"session/snapshot_source":{id:"snapshot_source",name:"snapshot_source",description:"Platform session occurred on",is_numerical:!1,is_seen_on_filtered_events:!1,property_type:_types__WEBPACK_IMPORTED_MODULE_7__.uS.Selector}},localOptions={"session/snapshot_source":[{id:0,name:"web"},{id:1,name:"mobile"}],"log_entry/level":[{id:0,name:"info"},{id:1,name:"warn"},{id:2,name:"error"}]},updatePropertyDefinitions=propertyDefinitions=>{propertyDefinitionsModel.findMounted()?.actions.updatePropertyDefinitions(propertyDefinitions)},getPropertyKey=(type,propertyName,groupTypeIndex)=>type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group?`${type}/${groupTypeIndex}/${propertyName}`:`${type}/${propertyName}`,checkOrLoadPropertyDefinition=(propertyName,definitionType,propertyDefinitionStorage,groupTypeIndex)=>{let key=getPropertyKey(definitionType,propertyName,groupTypeIndex);"string"!=typeof propertyName||key in propertyDefinitionStorage||window.setTimeout(()=>propertyDefinitionsModel.findMounted()?.actions.loadPropertyDefinitions([propertyName],definitionType,groupTypeIndex),0);let cachedResponse=propertyDefinitionStorage[key];return"object"==typeof cachedResponse?cachedResponse:null},constructValuesEndpoint=(endpoint,teamId,type,propertyKey,eventNames,newInput)=>{let basePath=type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Session?`api/projects/${teamId}/${type}s/values`:`api/${type}/values`,path=endpoint||basePath+`?key=${encodeURIComponent(propertyKey)}`,eventParams="";for(let eventName of eventNames||[])eventParams+=`&event_name=${eventName}`;return path+(newInput?"&value="+encodeURIComponent(newInput):"")+eventParams},propertyDefinitionsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","propertyDefinitionsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["currentTeamId"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadPropertyDefinitions:(propertyKeys,type,groupTypeIndex)=>({propertyKeys,type,groupTypeIndex}),updatePropertyDefinitions:propertyDefinitions=>({propertyDefinitions}),loadPropertyValues:payload=>payload,setOptionsLoading:key=>({key}),setOptions:(key,values,allowCustomValues)=>({key,values,allowCustomValues}),fetchAllPendingDefinitions:!0,abortAnyRunningQuery:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({propertyDefinitionStorage:[{...localProperties},{updatePropertyDefinitions:(state,_ref)=>{let{propertyDefinitions}=_ref;return{...state,...propertyDefinitions}}}],options:[{},{setOptionsLoading:(state,_ref2)=>{let{key}=_ref2;return{...state,[key]:{...state[key],status:"loading"}}},setOptions:(state,_ref3)=>{let{key,values,allowCustomValues}=_ref3;return{...state,[key]:{values:[...Array.from(new Set(values))],status:"loaded",allowCustomValues}}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref4=>{let{actions,values,cache}=_ref4;return{loadPropertyDefinitions:async _ref5=>{let{propertyKeys,type,groupTypeIndex}=_ref5,{propertyDefinitionStorage}=values,pendingStateUpdate={};for(let propertyKey of propertyKeys){let key=getPropertyKey(type,propertyKey,groupTypeIndex);key in propertyDefinitionStorage&&propertyDefinitionStorage[key]!==_types__WEBPACK_IMPORTED_MODULE_7__.wz.Error||(pendingStateUpdate[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Pending)}0!==Object.keys(pendingStateUpdate).length&&(actions.updatePropertyDefinitions(pendingStateUpdate),actions.fetchAllPendingDefinitions())},fetchAllPendingDefinitions:async(_,breakpoint)=>{if(await breakpoint(10),0===values.pendingProperties.length)return;let allPending=values.pendingProperties.slice(0,50),pendingByType={event:[],person:[],"group/0":[],"group/1":[],"group/2":[],"group/3":[],"group/4":[],session:[]};for(let key of allPending){let[type,...rest]=key.split("/");if("group"===type&&(type=`${type}/${rest[0]}`,rest=rest.slice(1)),!(type in pendingByType))throw Error(`Unknown property definition type: ${type}`);pendingByType[type].push(rest.join("/"))}try{let newProperties={};for(let[type,pending]of Object.entries(pendingByType)){if(0===pending.length)continue;actions.updatePropertyDefinitions(Object.fromEntries(pending.map(key=>[`${type}/${key}`,_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading])));let queryParams={type:type,group_type_index:null};for(let propertyDefinition of(type.startsWith("group")&&(queryParams={type:_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group,group_type_index:type.split("/")[1]}),("session"===type?await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.sessions.propertyDefinitions({properties:pending}):await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.propertyDefinitions.list({properties:pending,...queryParams})).results))newProperties[`${type}/${propertyDefinition.name}`]=propertyDefinition;for(let property of pending){let key=`${type}/${property}`;key in newProperties||values.propertyDefinitionStorage[key]!==_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading||(newProperties[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Missing)}actions.updatePropertyDefinitions(newProperties)}}catch(e){let newProperties={};for(let[type,pending]of Object.entries(pendingByType))for(let property of pending){let key=`${type}/${property}`;values.propertyDefinitionStorage[key]===_types__WEBPACK_IMPORTED_MODULE_7__.wz.Loading&&(newProperties[key]=_types__WEBPACK_IMPORTED_MODULE_7__.wz.Error)}actions.updatePropertyDefinitions(newProperties)}breakpoint(),values.pendingProperties.length>0&&actions.fetchAllPendingDefinitions()},loadPropertyValues:async(_ref6,breakpoint)=>{let{endpoint,type,newInput,propertyKey,eventNames}=_ref6;if(["cohort"].includes(type)||!propertyKey||null===values.currentTeamId)return;if(localOptions[getPropertyKey(type,propertyKey)]){actions.setOptions(propertyKey,localOptions[getPropertyKey(type,propertyKey)],!1);return}let start=performance.now();await breakpoint(300),actions.setOptionsLoading(propertyKey),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},propValues=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.get(constructValuesEndpoint(endpoint,values.currentTeamId,type,propertyKey,eventNames,newInput),methodOptions);breakpoint(),actions.setOptions(propertyKey,propValues,!0),cache.abortController=null,await (0,lib_internalMetrics__WEBPACK_IMPORTED_MODULE_3__.Gt)(scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H.values.currentTeamId,{type:"property_values_load",context:"filters",action:type,primary_interaction_id:"",status:"success",time_to_see_data_ms:Math.floor(performance.now()-start),api_response_bytes:0})},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({pendingProperties:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>Object.keys(propertyDefinitionStorage).filter(key=>propertyDefinitionStorage[key]===_types__WEBPACK_IMPORTED_MODULE_7__.wz.Pending)],propertyDefinitionsByType:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(type,groupTypeIndex)=>{let keyPrefix="group"===type?`${type}/${groupTypeIndex}/`:`${type}/`;return Object.entries(null!=propertyDefinitionStorage?propertyDefinitionStorage:{}).filter(_ref7=>{let[key,value]=_ref7;return key.startsWith(keyPrefix)&&"object"==typeof value}).map(_ref8=>{let[,value]=_ref8;return value})}],getPropertyDefinition:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,type,groupTypeIndex)=>propertyName&&(type!==_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group||null!=groupTypeIndex)?checkOrLoadPropertyDefinition(propertyName,type,propertyDefinitionStorage,groupTypeIndex):null],describeProperty:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,type,groupTypeIndex)=>{var _checkOrLoadPropertyD;return propertyName&&(type!==_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group||null!=groupTypeIndex)&&null!==(_checkOrLoadPropertyD=checkOrLoadPropertyDefinition(propertyName,type,propertyDefinitionStorage,groupTypeIndex)?.property_type)&&void 0!==_checkOrLoadPropertyD?_checkOrLoadPropertyD:null}],formatPropertyValueForDisplay:[s=>[s.propertyDefinitionStorage],propertyDefinitionStorage=>(propertyName,valueToFormat,type,groupTypeIndex)=>{if(null==valueToFormat||type===_types__WEBPACK_IMPORTED_MODULE_7__.ll.Group&&null==groupTypeIndex)return null;let propertyDefinition=checkOrLoadPropertyDefinition(propertyName,null!=type?type:_types__WEBPACK_IMPORTED_MODULE_7__.ll.Event,propertyDefinitionStorage,groupTypeIndex),arrayOfPropertyValues=Array.isArray(valueToFormat)?valueToFormat:[valueToFormat],formattedValues=arrayOfPropertyValues.map(_propertyValue=>{let propertyValue=String(_propertyValue);if(propertyDefinition?.property_type==="DateTime"){if(propertyValue?.match(/^\d{10}(\.\d*)?$/)){let numericalTimestamp=Number.parseFloat(propertyValue);return lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv.unix(numericalTimestamp).tz().format("YYYY-MM-DD hh:mm:ss")}if(propertyValue?.match(/^\d{13}$/)){let numericalTimestamp=Number.parseInt(propertyValue);return(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(numericalTimestamp).tz().format("YYYY-MM-DD hh:mm:ss")}}else if(propertyDefinition?.property_type===_types__WEBPACK_IMPORTED_MODULE_7__.uS.Duration){let numericalDuration=Number.parseFloat(propertyValue);return isNaN(numericalDuration)?propertyValue:(0,lib_utils__WEBPACK_IMPORTED_MODULE_4__.Dh)(numericalDuration)}return propertyValue});return Array.isArray(valueToFormat)?formattedValues:formattedValues[0]}]}),(0,lib_utils_kea_logic_builders__WEBPACK_IMPORTED_MODULE_5__.Y)()])},"./frontend/src/models/tagsModel.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>tagsModel});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx");let tagsModel=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["models","tagsModel"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_3__.p,["hasTagging"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values}=_ref;return{tags:{__default:[],loadTags:async()=>values.hasTagging&&await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.tags.list()||[]}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;return actions.loadTags()})])},"./frontend/src/queries/Query/Query.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Query});var LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),HogDebug=__webpack_require__("./frontend/src/scenes/debug/HogDebug.tsx"),ErrorBoundary=__webpack_require__("./frontend/src/layout/ErrorBoundary/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function OpenEditorButton(_ref){let{query,...props}=_ref;return(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"open-json-editor-button",type:"secondary",to:query?urls.j.insightNew(void 0,void 0,query):void 0,icon:(0,jsx_runtime.jsx)(icons.VM,{}),tooltip:"Open as a new insight",...props})}let uniqueNode=0;function DataNode(props){let[key]=(0,react.useState)(()=>`DataNode.${uniqueNode++}`),logic=(0,dataNodeLogic.M)({...props,key,cachedResults:props.cachedResults,dataNodeCollectionId:key}),{response,responseLoading,responseErrorObject}=(0,index_esm.useValues)(logic);return(0,jsx_runtime.jsxs)("div",{className:"relative",children:[(0,jsx_runtime.jsx)("div",{className:"absolute right-0 z-10 p-1 mr-3",children:(0,jsx_runtime.jsx)(OpenEditorButton,{query:props.query})}),responseLoading?(0,jsx_runtime.jsx)("div",{className:"text-2xl",children:(0,jsx_runtime.jsx)(Spinner.$,{})}):(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref=>{let{height}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"json",value:JSON.stringify(null!=response?response:responseErrorObject,null,2),height:Math.max(height,300)})}})]})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DataTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/DataTable.scss"),DataTable_default=__webpack_require__.n(DataTable),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DataTable_default(),options),DataTable_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TaxonomicPopover=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),EventDetails=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/activity/explore/EventDetails.scss"),EventDetails_default=__webpack_require__.n(EventDetails),EventDetails_options={};EventDetails_options.insert="head",EventDetails_options.singleton=!1,injectStylesIntoStyleTag_default()(EventDetails_default(),EventDetails_options),EventDetails_default().locals;var ErrorDisplay=__webpack_require__("./frontend/src/lib/components/Errors/ErrorDisplay.tsx"),HTMLElementsDisplay=__webpack_require__("./frontend/src/lib/components/HTMLElementsDisplay/HTMLElementsDisplay.tsx"),JSONViewer=__webpack_require__("./frontend/src/lib/components/JSONViewer.tsx"),PropertiesTable=__webpack_require__("./frontend/src/lib/components/PropertiesTable/index.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),taxonomy=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),event_property_utls=__webpack_require__("./frontend/src/lib/utils/event-property-utls.tsx"),src_types=__webpack_require__("./frontend/src/types.ts");function EventDetails_EventDetails(_ref){let{event,tableProps}=_ref,[showSystemProps,setShowSystemProps]=(0,react.useState)(!1),[activeTab,setActiveTab]=(0,react.useState)("$exception"===event.event?"exception":"properties"),displayedEventProperties={},visibleSystemProperties={},featureFlagProperties={},systemPropsCount=0;for(let key of Object.keys(event.properties))taxonomy.dA.events[key]&&taxonomy.dA.events[key].system&&(systemPropsCount+=1,showSystemProps&&(visibleSystemProperties[key]=event.properties[key])),taxonomy.dA.events[key]&&taxonomy.dA.events[key].system||(key.startsWith("$feature")||"$active_feature_flags"===key?featureFlagProperties[key]=event.properties[key]:displayedEventProperties[key]=event.properties[key]);let tabs=[{key:"raw",label:"Raw",content:(0,jsx_runtime.jsx)("div",{className:"-mt-3 px-4 py-2",children:(0,jsx_runtime.jsx)(JSONViewer.C,{src:event,name:"event",collapsed:1,collapseStringsAfterLength:80,sortKeys:!0})})},{key:"metadata",label:"Metadata",content:(0,jsx_runtime.jsx)("div",{className:"-mt-3",children:(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Meta,properties:{event:event.event,distinct_id:event.distinct_id,timestamp:event.timestamp},sortProperties:!0,tableProps:tableProps})})},{key:"properties",label:"Properties",content:(0,jsx_runtime.jsxs)("div",{className:"ml-10 mt-2",children:[(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Event,properties:{..."timestamp"in event?{$timestamp:(0,dayjs.Bv)(event.timestamp).toISOString()}:{},...displayedEventProperties,...visibleSystemProperties},useDetectedPropertyType:!0,tableProps:tableProps,filterable:!0,searchable:!0,parent:event.event}),systemPropsCount>0&&(0,jsx_runtime.jsxs)(LemonButton.J,{className:"mb-2",onClick:()=>setShowSystemProps(!showSystemProps),size:"small",children:[showSystemProps?"Hide":"Show"," ",(0,utils.Zi)(systemPropsCount,"system property","system properties")]})]})}];return event.elements&&event.elements.length>0&&tabs.push({key:"elements",label:"Elements",content:(0,jsx_runtime.jsx)(HTMLElementsDisplay.t,{elements:event.elements,selectedText:event.properties.$selected_content})}),event.elements&&(0,event_property_utls.Uq)(event.elements)&&tabs.push({key:"image",label:"Image",content:(0,jsx_runtime.jsx)(event_property_utls.R3,{elements:event.elements})}),"$exception"===event.event&&tabs.push({key:"exception",label:"Exception",content:(0,jsx_runtime.jsx)("div",{className:"ml-10 my-2",children:(0,jsx_runtime.jsx)(ErrorDisplay.X,{eventProperties:event.properties})})}),Object.keys(featureFlagProperties).length>0&&tabs.push({key:"feature_flags",label:"Feature flags",content:(0,jsx_runtime.jsx)("div",{className:"ml-10 mt-2",children:(0,jsx_runtime.jsx)(PropertiesTable.V,{type:src_types.ll.Event,properties:{...featureFlagProperties},useDetectedPropertyType:!0,tableProps:tableProps,searchable:!0})})}),(0,jsx_runtime.jsx)(LemonTabs.T,{"data-attr":"event-details",tabs:tabs,activeKey:activeTab,onChange:setActiveTab})}var EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),PersonDeleteModal=__webpack_require__("./frontend/src/scenes/persons/PersonDeleteModal.tsx"),DateRange=__webpack_require__("./frontend/src/queries/nodes/DataNode/DateRange.tsx"),ElapsedTime=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),LoadNext=__webpack_require__("./frontend/src/queries/nodes/DataNode/LoadNext.tsx"),Reload=__webpack_require__("./frontend/src/queries/nodes/DataNode/Reload.tsx"),TestAccountFiltersSwitch=__webpack_require__("./frontend/src/lib/components/TestAccountFiltersSwitch.tsx"),filterTestAccountDefaultsLogic=__webpack_require__("./frontend/src/scenes/settings/environment/filterTestAccountDefaultsLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts");function TestAccountFilters(_ref){let{query,setQuery}=_ref,{currentTeam}=(0,index_esm.useValues)(teamLogic.H),hasFilters=(currentTeam?.test_account_filters||[]).length>0,{setLocalDefault}=(0,index_esm.useActions)(filterTestAccountDefaultsLogic.V);if(!(0,queries_utils.rz)(query)&&!(0,queries_utils.Vf)(query))return null;let checked=!!hasFilters&&!!((0,queries_utils.Vf)(query)?query.filters?.filterTestAccounts:!!(0,queries_utils.rz)(query)&&query.filterTestAccounts),onChange=(0,queries_utils.Vf)(query)?checked=>{let newQuery={...query,filters:{...query.filters,filterTestAccounts:checked}};setQuery?.(newQuery)}:(0,queries_utils.rz)(query)?checked=>{let newQuery={...query,filterTestAccounts:checked};setQuery?.(newQuery)}:void 0;return(0,jsx_runtime.jsx)(TestAccountFiltersSwitch.Z,{checked:checked,onChange:checked=>{onChange?.(checked),setLocalDefault(checked)}})}var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),summarizeInsight=__webpack_require__("./frontend/src/scenes/insights/summarizeInsight.ts"),mathsLogic=__webpack_require__("./frontend/src/scenes/trends/mathsLogic.tsx"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts");function BackToSource(){var _backToSourceQuery$so;let{aggregationLabel}=(0,index_esm.useValues)(groupsModel.$),{cohortsById}=(0,index_esm.useValues)(cohortsModel.Q),{mathDefinitions}=(0,index_esm.useValues)(mathsLogic.fx),{backToSourceQuery}=(0,index_esm.useValues)(dataNodeLogic.M);if(!backToSourceQuery)return null;let summary=(0,summarizeInsight.wN)(backToSourceQuery.source,{aggregationLabel,cohortsById,mathDefinitions});return(0,jsx_runtime.jsxs)(LemonButton.J,{tooltip:summary,type:"secondary",onClick:()=>lib.router.actions.push(urls.j.insightNew(void 0,void 0,backToSourceQuery)),children:["\xab Back to ",null!==(_backToSourceQuery$so=backToSourceQuery.source.kind?.replace("Query",""))&&void 0!==_backToSourceQuery$so?_backToSourceQuery$so:"Insight"]})}var ColumnConfigurator=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss"),ColumnConfigurator_default=__webpack_require__.n(ColumnConfigurator),ColumnConfigurator_options={};ColumnConfigurator_options.insert="head",ColumnConfigurator_options.singleton=!1,injectStylesIntoStyleTag_default()(ColumnConfigurator_default(),ColumnConfigurator_options),ColumnConfigurator_default().locals;var core_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.2.0_react@18.2.0/node_modules/@dnd-kit/core/dist/core.esm.js"),modifiers_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+modifiers@6.0.1_@dnd-kit+core@6.0.8_react@18.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js"),sortable_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+sortable@7.0.2_@dnd-kit+core@6.0.8_react@18.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.js"),utilities_esm=__webpack_require__("./node_modules/.pnpm/@dnd-kit+utilities@3.2.1_react@18.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),PropertyFilterIcon=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/PropertyFilterIcon.tsx"),PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),RestrictedArea=__webpack_require__("./frontend/src/lib/components/RestrictedArea.tsx"),TaxonomicFilter=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonCheckbox=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),dataTableLogic=__webpack_require__("./frontend/src/queries/nodes/DataTable/dataTableLogic.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),DataTable_utils=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),defaultEventsQuery=__webpack_require__("./frontend/src/queries/nodes/DataTable/defaultEventsQuery.ts");let columnConfiguratorLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.path)(["queries","nodes","DataTable","columnConfiguratorLogic"]),(0,index_esm.key)(props=>props.key),(0,index_esm.actions)({showModal:!0,hideModal:!0,selectColumn:column=>({column}),unselectColumn:column=>({column}),setColumns:columns=>({columns}),moveColumn:(oldIndex,newIndex)=>({oldIndex,newIndex}),save:!0,toggleSaveAsDefault:!0}),(0,index_esm.reducers)(_ref=>{let{props}=_ref;return{saveAsDefault:[!1,{toggleSaveAsDefault:state=>!state,showModal:()=>!1}],modalVisible:[!1,{showModal:()=>!0,hideModal:()=>!1,save:()=>!1}],columns:[props.columns,{setColumns:(_,_ref2)=>{let{columns}=_ref2;return columns},selectColumn:(state,_ref3)=>{let{column}=_ref3;return Array.from(new Set([...state,column]))},unselectColumn:(state,_ref4)=>{let{column}=_ref4;return state.filter(c=>c!==column)},moveColumn:(state,_ref5)=>{let{oldIndex,newIndex}=_ref5,newColumns=[...state],[removed]=newColumns.splice(oldIndex,1);return newColumns.splice(newIndex,0,removed),newColumns}}]}}),(0,index_esm.propsChanged)((_ref6,oldProps)=>{let{actions,props}=_ref6;JSON.stringify(props.columns)!==JSON.stringify(oldProps.columns)&&actions.setColumns(props.columns)}),(0,index_esm.listeners)(_ref7=>{let{values,props}=_ref7;return{save:()=>{props.isPersistent&&values.saveAsDefault&&teamLogic.H.actions.updateCurrentTeam({live_events_columns:[defaultEventsQuery.JB,...values.columns]}),props.setColumns(values.columns)}}})]),ColumnConfigurator_uniqueNode=0;function ColumnConfigurator_ColumnConfigurator_ColumnConfigurator(_ref){let{query,setQuery}=_ref,{columnsInQuery}=(0,index_esm.useValues)(dataTableLogic.yC),[key]=(0,react.useState)(()=>String(ColumnConfigurator_uniqueNode++)),columnConfiguratorLogicProps={key,isPersistent:!!query.showPersistentColumnConfigurator,columns:columnsInQuery,setColumns:columns=>{if((0,queries_utils.rz)(query.source)){let orderBy=query.source.orderBy;if(orderBy&&orderBy.length>0){let orderColumn=(0,DataTable_utils.$p)(orderBy[0].endsWith(" DESC")?orderBy[0].replace(/ DESC$/,""):orderBy[0]);columns.some(c=>(0,DataTable_utils.$p)(c)===orderColumn)||(orderBy=void 0)}setQuery?.({...query,source:{...query.source,orderBy,select:columns}})}else setQuery?.({...query,columns})}},{showModal}=(0,index_esm.useActions)(columnConfiguratorLogic(columnConfiguratorLogicProps));return(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:columnConfiguratorLogic,props:columnConfiguratorLogicProps,children:[(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary","data-attr":"events-table-column-selector",icon:(0,jsx_runtime.jsx)(icons._x,{}),onClick:showModal,children:"Configure columns"}),(0,jsx_runtime.jsx)(ColumnConfiguratorModal,{query:query,setQuery:setQuery})]})}function ColumnConfiguratorModal(_ref2){let{query}=_ref2,restrictionReason=(0,RestrictedArea.U)({minimumAccessLevel:constants.ZN.Admin,scope:RestrictedArea.C.Project}),{modalVisible,columns,saveAsDefault}=(0,index_esm.useValues)(columnConfiguratorLogic),{hideModal,moveColumn,setColumns,selectColumn,unselectColumn,save,toggleSaveAsDefault}=(0,index_esm.useActions)(columnConfiguratorLogic),onEditColumn=(column,index)=>{let newColumn=window.prompt("Edit column",column);newColumn&&setColumns(columns.map((c,i)=>i===index?newColumn:c))};return(0,jsx_runtime.jsx)(LemonModal.f,{isOpen:modalVisible,title:"Configure columns",onClose:hideModal,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:()=>setColumns((0,DataTable_utils.Qi)(schema.OH.EventsQuery)),children:"Reset to defaults"})}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:hideModal,children:"Close"}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",onClick:save,"data-attr":"items-selector-confirm",children:"Save"})]}),children:(0,jsx_runtime.jsxs)("div",{className:"ColumnConfiguratorModal",children:[(0,jsx_runtime.jsxs)("div",{className:"Columns",children:[(0,jsx_runtime.jsxs)("div",{className:"HalfColumn",children:[(0,jsx_runtime.jsxs)("h4",{className:"secondary uppercase text-muted",children:["Visible columns (",columns.length,") - Drag to reorder"]}),(0,jsx_runtime.jsx)(core_esm.LB,{onDragEnd:_ref3=>{let{active,over}=_ref3;over&&active.id!==over.id&&moveColumn(columns.indexOf(active.id.toString()),columns.indexOf(over.id.toString()))},modifiers:[modifiers_esm.DL,modifiers_esm.F4],children:(0,jsx_runtime.jsx)(sortable_esm.Fo,{items:columns,strategy:sortable_esm.qw,children:columns.map((column,index)=>(0,jsx_runtime.jsx)(SelectedColumn,{column:column,dataIndex:index,onEdit:onEditColumn,onRemove:unselectColumn},column))})})]}),(0,jsx_runtime.jsxs)("div",{className:"HalfColumn",children:[(0,jsx_runtime.jsx)("h4",{className:"secondary uppercase text-muted",children:"Available columns"}),(0,jsx_runtime.jsx)("div",{className:"h-[360px]",children:(0,jsx_runtime.jsx)(AutoSizer.q,{children:_ref4=>{let{height,width}=_ref4;return(0,jsx_runtime.jsx)(TaxonomicFilter.I,{height:height,width:width,taxonomicGroupTypes:[types.t.EventProperties,types.t.EventFeatureFlags,types.t.PersonProperties,...(0,queries_utils.rz)(query.source)?[types.t.HogQLExpression]:[]],value:void 0,onChange:(group,value)=>{let column=(0,queries_utils.R_)(group.type,value);null!==column&&selectColumn(column)},popoverEnabled:!1,selectFirstItem:!1})}})})]})]}),(0,queries_utils.rz)(query.source)&&query.showPersistentColumnConfigurator?(0,jsx_runtime.jsx)(LemonCheckbox.H,{label:"Save as default for all project members",className:"mt-2","data-attr":"events-table-save-columns-as-default-toggle",bordered:!0,checked:saveAsDefault,onChange:toggleSaveAsDefault,disabledReason:restrictionReason}):null]})})}let SelectedColumn=_ref5=>{let filterGroupType,{column,dataIndex,onEdit,onRemove}=_ref5,{setNodeRef,attributes,transform,transition,listeners}=(0,sortable_esm.nB)({id:column}),columnType=null,columnKey=column;return column.startsWith("person.properties.")&&(columnType=src_types.FT.Person,filterGroupType=types.t.PersonProperties,columnKey=column.substring(18)),column.startsWith("properties.")&&(columnType=src_types.FT.Event,columnKey=column.substring(11)),columnKey=(0,queries_utils.go)((0,DataTable_utils.fU)(columnKey)),(0,jsx_runtime.jsx)("div",{ref:setNodeRef,style:{transform:utilities_esm.ux.Transform.toString(transform),transition},...attributes,children:(0,jsx_runtime.jsxs)("div",{className:"SelectedColumn",children:[(0,jsx_runtime.jsx)("span",{...listeners,className:"drag-handle",children:(0,jsx_runtime.jsx)(icons.ar,{})}),columnType&&(0,jsx_runtime.jsx)(PropertyFilterIcon.h,{type:columnType}),(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{className:"ml-1",value:columnKey,type:filterGroupType||types.t.EventProperties}),(0,jsx_runtime.jsx)("div",{className:"flex-1"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Edit",children:(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>onEdit(column,dataIndex),size:"small",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{"data-attr":"column-display-item-edit-icon"})})}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Remove",children:(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>onRemove(column),status:"danger",size:"small",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{"data-attr":"column-display-item-remove-icon"})})})]})})};var DataTableExport=__webpack_require__("./frontend/src/queries/nodes/DataTable/DataTableExport.tsx"),ViewRecordingButton=__webpack_require__("./frontend/src/lib/components/ViewRecordingButton.tsx"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),getAppContext=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),createActionFromEvent=__webpack_require__("./frontend/src/scenes/activity/explore/createActionFromEvent.tsx"),insights_utils=__webpack_require__("./frontend/src/scenes/insights/utils.tsx");function EventRowActions(_ref){let{event}=_ref,insightUrl=(0,insights_utils.XR)(event);return(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,getAppContext.ev)()&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>void(0,createActionFromEvent.YG)((0,getAppContext.ev)(),event,0,teamLogic.H.findMounted()?.values.currentTeam?.data_attributes||[]),fullWidth:!0,"data-attr":"events-table-create-action",children:"Create action from event"}),event.uuid&&event.timestamp&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,sideIcon:(0,jsx_runtime.jsx)(icons.JH,{}),"data-attr":"events-table-event-link",onClick:()=>void(0,copyToClipboard.v)(urls.j.absolute(urls.j.currentProject(urls.j.event(String(event.uuid),event.timestamp))),"link to event"),children:"Copy link to event"}),(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{fullWidth:!0,inModal:!0,sessionId:event.properties.$session_id,timestamp:event.timestamp,disabledReason:(0,ViewRecordingButton.k)(event.properties)?void 0:"Replay was not active when capturing this event","data-attr":"events-table-usage"}),insightUrl&&(0,jsx_runtime.jsx)(LemonButton.J,{to:insightUrl,fullWidth:!0,"data-attr":"events-table-usage",children:"Try out in Insights"})]})})}var LemonSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),persons_modal_utils=__webpack_require__("./frontend/src/scenes/trends/persons-modal/persons-modal-utils.tsx"),kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),query=__webpack_require__("./frontend/src/queries/query.ts");let insightActorsQueryOptionsLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","nodes","DataTable","sourceQueryOptionsLogic"]),(0,index_esm.props)({}),(0,index_esm.actions)({load:!0}),(0,kea_loaders_lib.loaders)(_ref=>{let{values,props}=_ref;return{insightActorsQueryOptions:[null,{load:async()=>{if(!props.query||!(0,queries_utils.a5)(props.query))return values.insightActorsQueryOptions||null;let optionsQuery={kind:schema.OH.InsightActorsQueryOptions,source:props.query};return await (0,query.jr)(optionsQuery)}}]}}),(0,index_esm.afterMount)(_ref2=>{let{actions}=_ref2;actions.load()}),(0,index_esm.propsChanged)((_ref3,oldProps)=>{let{actions,props}=_ref3;JSON.stringify(props.query)!==JSON.stringify(oldProps.query)&&actions.load()})]);function InsightActorsQueryOptions(_ref){let{setQuery,query}=_ref,localDataNodeLogic=(0,index_esm.useMountedLogic)(dataNodeLogic.M),{insightActorsQueryOptions}=(0,index_esm.useValues)(insightActorsQueryOptionsLogic({key:localDataNodeLogic.key,query:query}));return query&&insightActorsQueryOptions?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,persons_modal_utils.Nc)(insightActorsQueryOptions,query).map(_ref2=>{var _query$key;let[key,options]=_ref2;return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(LemonSelect.Yv,{fullWidth:!0,className:"min-w-32",placeholder:key,value:null!==(_query$key=query?.[key])&&void 0!==_query$key?_query$key:null,onChange:v=>setQuery?.({...query,[key]:v}),options:options})},key)})}):null}var queryFeatures=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),renderColumn=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumn.tsx"),renderColumnMeta=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumnMeta.tsx"),fast_deep_equal=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal_default=__webpack_require__.n(fast_deep_equal);function SavedQueries(_ref){let{query,setQuery}=_ref,{currentTeam}=(0,index_esm.useValues)(teamLogic.H);if(!setQuery||!currentTeam)return null;let eventsQueries=(0,defaultEventsQuery.v8)(currentTeam),selectedTitle=Object.keys(eventsQueries).find(key=>fast_deep_equal_default()(eventsQueries[key],query.source));return selectedTitle||(selectedTitle=Object.keys(eventsQueries).find(key=>fast_deep_equal_default()({...eventsQueries[key],before:"",after:""},{...query.source,before:"",after:""}))),selectedTitle||(selectedTitle="Custom query"),(0,jsx_runtime.jsx)(LemonButton.$,{dropdown:{matchWidth:!1,overlay:Object.entries(eventsQueries).map(_ref2=>{let[title,eventsQuery]=_ref2;return(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,active:title===selectedTitle,onClick:()=>setQuery?.({...query,source:eventsQuery}),children:title},title)})},type:"secondary",children:selectedTitle})}var EventName=__webpack_require__("./frontend/src/scenes/actions/EventName.tsx");function EventName_EventName(_ref){var _query$event;let{query,setQuery}=_ref;return(0,jsx_runtime.jsx)(EventName.C,{value:null!==(_query$event=query.event)&&void 0!==_query$event?_query$event:"",disabled:!setQuery,onChange:value=>setQuery?.({...query,event:value}),allEventsOption:"clear"})}var EventPropertyFilters=__webpack_require__("./frontend/src/queries/nodes/EventsNode/EventPropertyFilters.tsx"),HogQLQueryEditor=__webpack_require__("./frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx"),InsightViz=__webpack_require__("./frontend/src/queries/nodes/InsightViz/InsightViz.tsx");function EditHogQLButton(_ref){let{hogql,...props}=_ref,query={kind:schema.OH.DataTableNode,full:!0,source:{kind:schema.OH.HogQLQuery,query:hogql}};return(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"open-json-editor-button",type:"secondary",to:urls.j.insightNew(void 0,void 0,query),icon:(0,jsx_runtime.jsx)(icons._b,{}),tooltip:"Edit SQL directly",...props})}var PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx");let PersonPropertyFilters_uniqueNode=0;function PersonPropertyFilters(_ref){let{query,setQuery}=_ref,[id]=(0,react.useState)(PersonPropertyFilters_uniqueNode++);return!query.properties||Array.isArray(query.properties)?(0,jsx_runtime.jsx)(PropertyFilters.t,{propertyFilters:query.properties||[],onChange:value=>{setQuery?.({...query,properties:value})},pageKey:`PersonPropertyFilters.${id}`,taxonomicGroupTypes:(0,queries_utils.NS)(query)?[types.t.PersonProperties,types.t.Cohorts,types.t.HogQLExpression]:[types.t.PersonProperties],metadataSource:{kind:schema.OH.ActorsQuery}}):(0,jsx_runtime.jsx)("div",{children:"Error: property groups are not supported."})}var LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx");let labels={person:{label:"persons",description:"Search by name, email, Person ID or Distinct ID."},group:{label:"groups",description:"Search by group name or Distinct ID. Group name will match partially. Distinct ID needs to match exactly."}};function PersonsSearch(_ref){let{query,setQuery}=_ref,{value,onChange}=function(query,setQuery,getValueFromQuery,getModifiedQuery){let timeoutMs=arguments.length>4&&void 0!==arguments[4]?arguments[4]:300,propsValue=getValueFromQuery(query),[localValue,setLocalValue]=(0,react.useState)(propsValue),queryRef=(0,react.useRef)(query);(0,react.useEffect)(()=>{queryRef.current=query},[query]);let timeoutRef=(0,react.useRef)();return{value:localValue,onChange:newValue=>{setLocalValue(newValue),timeoutRef.current&&clearTimeout(timeoutRef.current),timeoutRef.current=window.setTimeout(()=>{setQuery?.(getModifiedQuery(queryRef.current,newValue))},timeoutMs)}}}(query,setQuery,query=>query.search||"",(query,value)=>({...query,search:value})),target=(0,queries_utils.wd)(query)?"group":"person";return(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(LemonInput.D,{type:"search",value:value,placeholder:`Search for ${labels[target].label}`,"data-attr":"persons-search",disabled:!setQuery,onChange:onChange}),(0,jsx_runtime.jsx)(Tooltip.u,{title:labels[target].description,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-2xl text-muted-alt shrink-0"})})]})}var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx");function DataTableOpenEditor(_ref){let{query}=_ref,{response}=(0,index_esm.useValues)(dataTableLogic.yC),tableInsightQuery=response?.hogql?{kind:schema.OH.DataTableNode,full:!0,source:{kind:schema.OH.HogQLQuery,query:response.hogql}}:null;return(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",icon:(0,jsx_runtime.jsx)(icons.p$,{}),to:urls.j.insightNew(void 0,void 0,query),sideAction:response?.hogql?{dropdown:{overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{label:"Open as direct SQL insight",to:urls.j.insightNew(void 0,void 0,tableInsightQuery),"data-attr":"open-sql-editor-button"}]})}}:void 0,"data-attr":"open-json-editor-button",children:"Open as new insight"})}let eventGroupTypes=[types.t.HogQLExpression,types.t.EventProperties,types.t.PersonProperties,types.t.EventFeatureFlags],personGroupTypes=[types.t.HogQLExpression,types.t.PersonProperties],DataTable_uniqueNode=0;function DataTable_DataTable_DataTable(_ref){let{uniqueKey,query,setQuery,context,cachedResults,readOnly}=_ref,[uniqueNodeKey]=(0,react.useState)(()=>DataTable_uniqueNode++),[dataKey]=(0,react.useState)(()=>`DataNode.${uniqueKey||uniqueNodeKey}`),insightProps=context?.insightProps||{dashboardItemId:`new-AdHoc.${dataKey}`,dataNodeCollectionId:dataKey},vizKey=(0,InsightViz.gG)(insightProps),dataNodeLogicProps={query:query.source,key:vizKey,cachedResults:cachedResults,dataNodeCollectionId:context?.insightProps?.dataNodeCollectionId||dataKey,alwaysRefresh:context?.alwaysRefresh},builtDataNodeLogic=(0,dataNodeLogic.M)(dataNodeLogicProps),{response,responseLoading,responseError,queryCancelled,nextDataLoading,newDataLoading,highlightedRows,backToSourceQuery}=(0,index_esm.useValues)(builtDataNodeLogic),dataTableLogicProps={query,vizKey,dataKey,dataNodeLogicKey:dataNodeLogicProps.key,context},{dataTableRows,columnsInQuery,columnsInResponse,queryWithDefaults,canSort,sourceFeatures}=(0,index_esm.useValues)((0,dataTableLogic.yC)(dataTableLogicProps)),{showActions,showDateRange,showTestAccountFilters,showSearch,showEventFilter,showPropertyFilter,showHogQLEditor,showReload,showExport,showElapsedTime,showColumnConfigurator,showPersistentColumnConfigurator,showSavedQueries,expandable,embedded,showOpenEditorButton,showResultsTable,showTimings}=queryWithDefaults,isReadOnly=!!readOnly,eventActionsColumnShown=showActions&&sourceFeatures.has(queryFeatures.P.eventActionsColumn)&&columnsInResponse?.includes("*"),columnsInLemonTable=sourceFeatures.has(queryFeatures.P.columnsInResponse)&&null!=columnsInResponse?columnsInResponse:columnsInQuery,groupTypes=(0,queries_utils.NS)(query.source)?personGroupTypes:eventGroupTypes,lemonColumns=[...columnsInLemonTable.map((key,index)=>({dataIndex:key,...(0,renderColumnMeta.a)(key,query,context),render:function RenderDataTableColumn(_,_ref2,recordIndex){let{result,label}=_ref2;return label?index===(expandable?1:0)?{children:label,props:{colSpan:columnsInLemonTable.length+(eventActionsColumnShown?1:0)}}:{props:{colSpan:0}}:result?sourceFeatures.has(queryFeatures.P.resultIsArrayOfArrays)?(0,renderColumn.W)(key,result[index],result,recordIndex,query,setQuery,context):(0,renderColumn.W)(key,result[key],result,recordIndex,query,setQuery,context):void 0},sorter:void 0,more:!isReadOnly&&showActions&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"px-2 py-1",children:[(0,jsx_runtime.jsx)("div",{className:"font-mono font-bold",children:(0,DataTable_utils.fU)(key)}),(0,DataTable_utils.fU)(key)!==(0,DataTable_utils.$p)(key)&&(0,jsx_runtime.jsx)("div",{className:"font-mono",children:(0,DataTable_utils.$p)(key)})]}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:key,groupTypes:groupTypes,metadataSource:query.source,renderValue:()=>(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Edit column"}),type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source),isAggregation=(0,queries_utils.Tw)(hogQl),isOrderBy=source.orderBy?.[0]===key,isDescOrderBy=source.orderBy?.[0]===`${key} DESC`;setQuery({...query,source:{...source,select:columns.map((s,i)=>i===index?hogQl:s).filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c),orderBy:isOrderBy||isDescOrderBy?[isDescOrderBy?`${hogQl} DESC`:hogQl]:source.orderBy}})}}}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),canSort&&"person.$delete"!==key&&"person"!==key?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"datatable-sort-asc",onClick:()=>{setQuery?.({...query,source:{...query.source,orderBy:[key]}})},children:"Sort ascending"}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,"data-attr":"datatable-sort-desc",onClick:()=>{setQuery?.({...query,source:{...query.source,orderBy:[`${key} DESC`]}})},children:"Sort descending"}),(0,jsx_runtime.jsx)(LemonDivider.p,{})]}):null,(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:"",groupTypes:groupTypes,metadataSource:query.source,placeholder:(0,jsx_runtime.jsx)("span",{className:"not-italic",children:"Add column left"}),"data-attr":"datatable-add-column-left",type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let isAggregation=(0,queries_utils.Tw)(hogQl),source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source);setQuery({...query,source:{...source,select:[...columns.slice(0,index),hogQl,...columns.slice(index)].filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c)}})}}}),(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:types.t.HogQLExpression,value:"",groupTypes:groupTypes,metadataSource:query.source,placeholder:(0,jsx_runtime.jsx)("span",{className:"not-italic",children:"Add column right"}),"data-attr":"datatable-add-column-right",type:"tertiary",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,queries_utils.NS)(query.source)?(0,queries_utils.SO)(g,v):(0,queries_utils.R_)(g,v);if(setQuery&&hogQl&&sourceFeatures.has(queryFeatures.P.selectAndOrderByColumns)){let isAggregation=(0,queries_utils.Tw)(hogQl),source=query.source,columns=null!=columnsInLemonTable?columnsInLemonTable:(0,DataTable_utils.DP)(source);setQuery?.({...query,source:{...source,select:[...columns.slice(0,index+1),hogQl,...columns.slice(index+1)].filter(c=>!isAggregation||"*"!==c&&"person.$delete"!==c)}})}}}),columnsInQuery.filter(c=>"*"!==c).length>1?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,status:"danger","data-attr":"datatable-remove-column",onClick:()=>{let cleanColumnKey=(0,DataTable_utils.$p)(key),newSource={...query.source,select:query.source.select.filter((_,i)=>i!==index),orderBy:query.source.orderBy?.find(orderKey=>DataTable_utils.$p(orderKey)===cleanColumnKey||DataTable_utils.$p(orderKey)===`-${cleanColumnKey}`)?void 0:query.source.orderBy};setQuery?.({...query,source:newSource})},children:"Remove column"})]}):null]}):void 0})),...eventActionsColumnShown?[{dataIndex:"__more",title:"",render:function RenderMore(_,_ref3){let{label,result}=_ref3;return label?{props:{colSpan:0}}:result&&columnsInResponse?.includes("*")?(0,jsx_runtime.jsx)(EventRowActions,{event:result[columnsInResponse.indexOf("*")]}):null},width:0}]:[]].filter(column=>!query.hiddenColumns?.includes(column.dataIndex)&&"*"!==column.dataIndex),setQuerySource=(0,react.useCallback)(source=>setQuery?.({...query,source}),[setQuery,query]),firstRowLeft=[backToSourceQuery?(0,jsx_runtime.jsx)(BackToSource,{},"return-to-source"):null,backToSourceQuery&&(0,queries_utils.NS)(query.source)&&(0,queries_utils.a5)(query.source.source)?(0,jsx_runtime.jsx)(InsightActorsQueryOptions,{query:query.source.source,setQuery:q=>setQuerySource({...query.source,source:{...query.source.source,...q}})},"source-query-options"):null,showDateRange&&sourceFeatures.has(queryFeatures.P.dateRangePicker)?(0,jsx_runtime.jsx)(DateRange.C,{query:query.source,setQuery:setQuerySource},"date-range"):null,showEventFilter&&sourceFeatures.has(queryFeatures.P.eventNameFilter)?(0,jsx_runtime.jsx)(EventName_EventName,{query:query.source,setQuery:setQuerySource},"event-name"):null,showSearch&&sourceFeatures.has(queryFeatures.P.personsSearch)?(0,jsx_runtime.jsx)(PersonsSearch,{query:query.source,setQuery:setQuerySource},"persons-search"):null,showPropertyFilter&&sourceFeatures.has(queryFeatures.P.eventPropertyFilters)?(0,jsx_runtime.jsx)(EventPropertyFilters.H,{query:query.source,setQuery:setQuerySource,taxonomicGroupTypes:Array.isArray(showPropertyFilter)?showPropertyFilter:void 0},"event-property"):null,showPropertyFilter&&sourceFeatures.has(queryFeatures.P.personPropertyFilters)?(0,jsx_runtime.jsx)(PersonPropertyFilters,{query:query.source,setQuery:setQuerySource},"person-property"):null].filter(x=>!!x),firstRowRight=[showTestAccountFilters&&sourceFeatures.has(queryFeatures.P.testAccountFilters)?(0,jsx_runtime.jsx)(TestAccountFilters,{query:query.source,setQuery:setQuerySource},"test-account-filters"):null,showSavedQueries&&sourceFeatures.has(queryFeatures.P.savedEventsQueries)?(0,jsx_runtime.jsx)(SavedQueries,{query:query,setQuery:setQuery},"saved-queries"):null].filter(x=>!!x),secondRowLeft=[showReload?(0,jsx_runtime.jsx)(Reload.L,{},"reload"):null,showElapsedTime?(0,jsx_runtime.jsx)(ElapsedTime.W,{showTimings:showTimings},"elapsed-time"):null].filter(x=>!!x),secondRowRight=[(showColumnConfigurator||showPersistentColumnConfigurator)&&sourceFeatures.has(queryFeatures.P.columnConfigurator)?(0,jsx_runtime.jsx)(ColumnConfigurator_ColumnConfigurator_ColumnConfigurator,{query:query,setQuery:setQuery},"column-configurator"):null,showExport?(0,jsx_runtime.jsx)(DataTableExport.ln,{query:query,setQuery:setQuery},"data-table-export"):null,showExport&&showOpenEditorButton?(0,jsx_runtime.jsx)(DataTableOpenEditor,{query:query,setQuery:setQuery},"data-table-open-editor"):null].filter(x=>!!x),showFirstRow=!isReadOnly&&(firstRowLeft.length>0||firstRowRight.length>0),showSecondRow=!isReadOnly&&(secondRowLeft.length>0||secondRowRight.length>0),inlineEditorButtonOnRow=showFirstRow?1:showSecondRow?2:0,editorButton=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(OpenEditorButton,{query:query}),response?.hogql?(0,jsx_runtime.jsx)(EditHogQLButton,{hogql:response.hogql}):null]});return showExport||!showOpenEditorButton||isReadOnly||(1===inlineEditorButtonOnRow?firstRowRight.push(editorButton):2===inlineEditorButtonOnRow&&secondRowRight.push(editorButton)),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataTableLogic.yC,props:dataTableLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1 h-full",children:[showHogQLEditor&&(0,queries_utils.Vf)(query.source)&&!isReadOnly?(0,jsx_runtime.jsx)(HogQLQueryEditor.n,{query:query.source,setQuery:setQuerySource,embedded:embedded}):null,showFirstRow&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[firstRowLeft,firstRowLeft.length>0&&firstRowRight.length>0?(0,jsx_runtime.jsx)("div",{className:"flex-1"}):null,firstRowRight]}),showFirstRow&&showSecondRow&&(0,jsx_runtime.jsx)(LemonDivider.p,{className:"my-0"}),showSecondRow&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap",children:[(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:secondRowLeft}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:secondRowRight})]}),showOpenEditorButton&&0===inlineEditorButtonOnRow&&!isReadOnly?(0,jsx_runtime.jsx)("div",{className:"absolute right-0 z-10 p-1",children:editorButton}):null,showResultsTable&&(0,jsx_runtime.jsx)(LemonTable.g,{className:"DataTable",loading:responseLoading&&!nextDataLoading&&!newDataLoading,columns:lemonColumns,embedded:embedded,dataSource:null!=dataTableRows?dataTableRows:[],rowKey:(_,rowIndex)=>rowIndex,sorting:null,useURLForSorting:!1,emptyState:responseError?sourceFeatures.has(queryFeatures.P.displayResponseError)?(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError}):(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query}):(0,jsx_runtime.jsx)(EmptyStates.dV,{heading:context?.emptyStateHeading,detail:context?.emptyStateDetail}),expandable:expandable&&columnsInResponse?.includes("*")?{expandedRowRender:function renderExpand(_ref4){let{result}=_ref4;if((0,queries_utils.rz)(query.source)&&Array.isArray(result)){var _result$columnsInResp;return(0,jsx_runtime.jsx)(EventDetails_EventDetails,{event:null!==(_result$columnsInResp=result[columnsInResponse.indexOf("*")])&&void 0!==_result$columnsInResp?_result$columnsInResp:{}})}if(result&&!Array.isArray(result))return(0,jsx_runtime.jsx)(EventDetails_EventDetails,{event:result})},rowExpandable:_ref5=>{let{result}=_ref5;return!!result},noIndent:!0,expandedRowClassName:_ref6=>{let{result}=_ref6,record=Array.isArray(result)?result[0]:result;return record&&"$exception"===record.event?"border border-x-danger-dark bg-danger-highlight":null}}:void 0,rowClassName:_ref7=>{let{result,label}=_ref7;return(0,clsx_m.default)("DataTable__row",{"DataTable__row--highlight_once":result&&highlightedRows.has(result),"DataTable__row--category_row":!!label,"border border-x-danger-dark bg-danger-highlight":result&&result[0]&&"$exception"===result[0].event})},footer:(null!=dataTableRows?dataTableRows:[]).length>0&&!sourceFeatures.has(queryFeatures.P.hideLoadNextButton)?(0,jsx_runtime.jsx)(LoadNext.g,{query:query.source}):null,onRow:context?.rowProps},[...null!=columnsInResponse?columnsInResponse:[],...columnsInQuery].join("::")),(0,jsx_runtime.jsx)(PersonDeleteModal.S,{})]})})})}var colors=__webpack_require__("./frontend/src/lib/colors.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts");let EvenlyDistributedRows=_ref=>{var _rowLayout$itemsPerRo;let{children,minWidthRems,className}=_ref,[rowLayout,setRowLayout]=(0,react.useState)(),elementRef=(0,react.useRef)(null),updateSize=(0,react.useCallback)(()=>{if(!elementRef.current)return;let pxPerRem=parseFloat(getComputedStyle(document.documentElement).fontSize),minWidthPx=minWidthRems*pxPerRem,containerWidthPx=elementRef.current.offsetWidth,numRows=Math.ceil(children.length/Math.floor(containerWidthPx/minWidthPx)),itemsPerRow=Math.ceil(children.length/numRows);setRowLayout({numRows,itemsPerRow})},[setRowLayout,elementRef,minWidthRems,children.length]);return(0,react.useEffect)(()=>{let resizeObserver;let element=elementRef.current;if(element)return updateSize(),"undefined"!=typeof ResizeObserver&&(resizeObserver=new ResizeObserver(updateSize)),resizeObserver?.observe(element),()=>{resizeObserver?.unobserve(element)}},[updateSize]),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("grid",className),style:{gridTemplateColumns:`repeat(${null!==(_rowLayout$itemsPerRo=rowLayout?.itemsPerRow)&&void 0!==_rowLayout$itemsPerRo?_rowLayout$itemsPerRo:1}, 1fr)`},ref:elementRef,children:rowLayout?children:null})},OVERVIEW_ITEM_CELL_CLASSES="flex-1 border p-2 bg-bg-light rounded min-w-[10rem] h-30 flex flex-col items-center text-center justify-between",WebOverview_uniqueNode=0;function WebOverview(props){var _props$context$insigh,_samplingRate$denomin,_samplingRate$denomin2;let{onData,loadPriority,dataNodeCollectionId}=null!==(_props$context$insigh=props.context.insightProps)&&void 0!==_props$context$insigh?_props$context$insigh:{},[key]=(0,react.useState)(()=>`WebOverview.${WebOverview_uniqueNode++}`),logic=(0,dataNodeLogic.M)({query:props.query,key,cachedResults:props.cachedResults,loadPriority,onData,dataNodeCollectionId:null!=dataNodeCollectionId?dataNodeCollectionId:key}),{response,responseLoading}=(0,index_esm.useValues)(logic),samplingRate=response?.samplingRate,numSkeletons=props.query.conversionGoal?4:6;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(EvenlyDistributedRows,{className:"flex justify-center items-center flex-wrap w-full gap-2",minWidthRems:12,children:responseLoading?(0,utils.w6)(numSkeletons).map(i=>(0,jsx_runtime.jsx)(WebOverviewItemCellSkeleton,{},i)):response?.results?.map(item=>jsx_runtime.jsx(WebOverviewItemCell,{item:item},item.key))||[]}),samplingRate&&!(1===samplingRate.numerator&&(null!==(_samplingRate$denomin=samplingRate.denominator)&&void 0!==_samplingRate$denomin?_samplingRate$denomin:1)===1)?(0,jsx_runtime.jsxs)(LemonBanner.V,{type:"info",className:"my-4",children:["These results using a sampling factor of ",samplingRate.numerator,null!==(_samplingRate$denomin2=samplingRate.denominator)&&void 0!==_samplingRate$denomin2&&_samplingRate$denomin2?`/${samplingRate.denominator}`:"",". Sampling is currently in beta."]}):null]})}let WebOverviewItemCellSkeleton=()=>(0,jsx_runtime.jsxs)("div",{className:OVERVIEW_ITEM_CELL_CLASSES,children:[(0,jsx_runtime.jsx)(src.yW,{className:"h-2 w-10"}),(0,jsx_runtime.jsx)(src.yW,{className:"h-6 w-20"}),(0,jsx_runtime.jsx)(src.yW,{className:"h-2 w-10"})]}),WebOverviewItemCell=_ref=>{let{item}=_ref,label=labelFromKey(item.key),trend=(0,utils.DX)(item.changeFromPreviousPct)?0===item.changeFromPreviousPct?{Icon:icons.cs,color:(0,colors.cM)("muted")}:item.changeFromPreviousPct>0?{Icon:posthog_icons_es.IconTrending,color:item.isIncreaseBad?(0,colors.cM)("danger"):(0,colors.cM)("success")}:{Icon:icons.j4,color:item.isIncreaseBad?(0,colors.cM)("success"):(0,colors.cM)("danger")}:void 0,tooltip=(0,utils.DX)(item.value)&&(0,utils.DX)(item.previous)&&(0,utils.DX)(item.changeFromPreviousPct)?`${label}: ${item.value>=item.previous?"increased":"decreased"} by ${formatPercentage(Math.abs(item.changeFromPreviousPct),{precise:!0})}, to ${formatItem(item.value,item.kind,{precise:!0})} from ${formatItem(item.previous,item.kind,{precise:!0})}`:(0,utils.DX)(item.value)?`${label}: ${formatItem(item.value,item.kind,{precise:!0})}`:"No data";return(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltip,children:(0,jsx_runtime.jsxs)("div",{className:OVERVIEW_ITEM_CELL_CLASSES,children:[(0,jsx_runtime.jsx)("div",{className:"font-bold uppercase text-xs",children:label}),(0,jsx_runtime.jsx)("div",{className:"w-full flex-1 flex items-center justify-center",children:(0,jsx_runtime.jsx)("div",{className:"text-2xl",children:formatItem(item.value,item.kind)})}),trend&&(0,utils.DX)(item.changeFromPreviousPct)?(0,jsx_runtime.jsxs)("div",{style:{color:trend.color},children:[(0,jsx_runtime.jsx)(trend.Icon,{color:trend.color})," ",formatPercentage(item.changeFromPreviousPct)]}):(0,jsx_runtime.jsx)("div",{})]})})},formatPercentage=(x,options)=>options?.precise?(x/100).toLocaleString(void 0,{style:"percent",maximumFractionDigits:1}):x>=1e3?(0,utils.d$)(x)+"%":(x/100).toLocaleString(void 0,{style:"percent",maximumSignificantDigits:2}),formatUnit=(x,options)=>options?.precise?x.toLocaleString():(0,utils.d$)(x),formatItem=(value,kind,options)=>null==value?"-":"percentage"===kind?formatPercentage(value,options):"duration_s"===kind?(0,utils.C7)(value,{secondsPrecision:3}):formatUnit(value,options),labelFromKey=key=>{switch(key){case"visitors":return"Visitors";case"views":return"Page views";case"sessions":return"Sessions";case"session duration":return"Session duration";case"bounce rate":return"Bounce rate";case"lcp score":return"LCP Score";case"conversion rate":return"Conversion rate";case"total conversions":return"Total conversions";case"unique conversions":return"Unique conversions";default:return key.split(" ").map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}};var QueryEditor=__webpack_require__("./frontend/src/queries/QueryEditor/QueryEditor.tsx"),Chart=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Chart.scss"),Chart_default=__webpack_require__.n(Chart),Chart_options={};Chart_options.insert="head",Chart_options.singleton=!1,injectStylesIntoStyleTag_default()(Chart_default(),Chart_options),Chart_default().locals;var animations=__webpack_require__("./frontend/src/lib/animations/animations.ts"),Animation=__webpack_require__("./frontend/src/lib/components/Animation/Animation.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),DataWarehouseTables=__webpack_require__("./frontend/src/scenes/data-warehouse/external/DataWarehouseTables.tsx"),insightDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),insightSceneLogic=__webpack_require__("./frontend/src/scenes/insights/insightSceneLogic.tsx"),BoldNumber=__webpack_require__("./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx"),LineGraph=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx"),SideBar=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/SideBar.tsx"),Table=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Table.tsx"),TableDisplay=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx"),AddVariableButton=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/AddVariableButton.tsx"),variableModalLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),variablesLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts");let DataVisualization_uniqueNode=0;function DataTableVisualization(_ref){let{uniqueKey,query,setQuery,context,cachedResults,readOnly,variablesOverride}=_ref,[key]=(0,react.useState)(`DataVisualizationNode.${null!=uniqueKey?uniqueKey:DataVisualization_uniqueNode++}`),insightProps=context?.insightProps||{dashboardItemId:`new-AdHoc.${key}`,query,setQuery,dataNodeCollectionId:key},vizKey=(0,InsightViz.gG)(insightProps),dataNodeCollectionId=(0,InsightViz.Cf)(insightProps,key),{insightMode}=(0,index_esm.useValues)(insightSceneLogic.T),dataVisualizationLogicProps={key:vizKey,query,dashboardId:insightProps.dashboardId,dataNodeCollectionId,loadPriority:insightProps.loadPriority,insightMode,setQuery,cachedResults,variablesOverride},dataNodeLogicProps={query:query.source,key:vizKey,cachedResults,loadPriority:insightProps.loadPriority,dataNodeCollectionId,variablesOverride},{insightProps:insightLogicProps}=(0,index_esm.useValues)(insightLogic.zm),{exportContext}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightLogicProps));return(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataVisualizationLogic.H8,props:dataVisualizationLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:displayLogic.Y,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variablesLogic.Q,props:{key:dataVisualizationLogicProps.key,readOnly:null!=readOnly&&readOnly,dashboardId:insightProps.dashboardId},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:variableModalLogic.b,props:{key:dataVisualizationLogicProps.key},children:(0,jsx_runtime.jsx)(InternalDataTableVisualization,{uniqueKey:key,query:query,setQuery:setQuery,context:context,cachedResults:cachedResults,readOnly:readOnly,exportContext:exportContext})})})})})})}function InternalDataTableVisualization(props){let{readOnly}=props,{query,visualizationType,showEditingUI,showResultControls,sourceFeatures,response,responseLoading,responseError,queryCancelled,isChartSettingsPanelOpen}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{setEditorQuery}=(0,index_esm.useActions)(variablesLogic.Q),{toggleChartSettingsPanel}=(0,index_esm.useActions)(dataVisualizationLogic.H8),setQuerySource=(0,react.useCallback)(source=>props.setQuery?.({...props.query,source}),[props.setQuery,props.query]),component=null;return showEditingUI||response&&!responseLoading?visualizationType===src_types.Qb.ActionsTable?component=(0,jsx_runtime.jsx)(Table.i,{uniqueKey:props.uniqueKey,query:query,context:props.context,cachedResults:props.cachedResults}):visualizationType===src_types.Qb.ActionsLineGraph||visualizationType===src_types.Qb.ActionsBar||visualizationType===src_types.Qb.ActionsAreaGraph||visualizationType===src_types.Qb.ActionsStackedBar?component=(0,jsx_runtime.jsx)(LineGraph.x,{}):visualizationType===src_types.Qb.BoldNumber&&(component=(0,jsx_runtime.jsx)(BoldNumber.w,{})):component=(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 justify-center items-center border rounded bg-bg-light",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})}),(0,jsx_runtime.jsxs)("div",{className:"DataVisualization flex flex-1 gap-2",children:[!readOnly&&showEditingUI&&(0,jsx_runtime.jsx)("div",{className:"max-sm:hidden max-w-xs",children:(0,jsx_runtime.jsx)(DataWarehouseTables.f,{inline:!0})}),(0,jsx_runtime.jsxs)("div",{className:"relative w-full flex flex-col gap-4 flex-1 overflow-hidden",children:[!readOnly&&showEditingUI&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(HogQLQueryEditor.n,{query:query.source,queryResponse:null!=response?response:void 0,setQuery:setQuerySource,embedded:!0,onChange:setEditorQuery})}),!readOnly&&showResultControls&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.p2,{className:"my-0"}),(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 justify-between flex-wrap px-px",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,jsx_runtime.jsx)(Reload.L,{}),(0,jsx_runtime.jsx)(ElapsedTime.W,{})]}),(0,jsx_runtime.jsx)("div",{className:"flex gap-4 items-center",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center flex-wrap",children:[(0,jsx_runtime.jsx)(AddVariableButton.u,{}),sourceFeatures.has(queryFeatures.P.dateRangePicker)&&!lib.router.values.location.pathname.includes(urls.j.dataWarehouse())&&(0,jsx_runtime.jsx)(DateRange.C,{query:query.source,setQuery:query=>{query.kind===schema.OH.HogQLQuery&&setQuerySource(query)}},"date-range"),(0,jsx_runtime.jsx)(TableDisplay.V,{}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),type:isChartSettingsPanelOpen?"primary":"secondary",onClick:()=>toggleChartSettingsPanel(),tooltip:"Visualization settings"}),props.exportContext&&(0,jsx_runtime.jsx)(ExportButton.j,{disabledReason:visualizationType!=src_types.Qb.ActionsTable&&"Only table results are exportable",type:"secondary",items:[{export_format:src_types.P5.CSV,export_context:props.exportContext},{export_format:src_types.P5.XLSX,export_context:props.exportContext}]})]})})]})]}),(0,jsx_runtime.jsx)(Variables.M,{}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 flex-row gap-4",children:[showEditingUI&&isChartSettingsPanelOpen&&(0,jsx_runtime.jsx)("div",{className:"h-full",children:(0,jsx_runtime.jsx)(SideBar.K,{})}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full flex-1 overflow-auto"),children:visualizationType!==src_types.Qb.ActionsTable&&responseError?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("rounded bg-bg-light relative flex flex-1 flex-col p-2",{border:showEditingUI}),children:(0,jsx_runtime.jsx)(EmptyStates.jC,{query:props.query,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError})}):component})]})]})]})}function SavedInsight(_ref){let{query:propsQuery,context,embedded,readOnly}=_ref,insightProps={dashboardItemId:propsQuery.shortId},{insight,insightLoading}=(0,index_esm.useValues)((0,insightLogic.zm)(insightProps)),{query:dataQuery}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightProps));if(insightLoading)return(0,jsx_runtime.jsx)("div",{className:"text-center",children:(0,jsx_runtime.jsx)(Animation.f,{type:animations.ru.LaptopHog})});let query={...propsQuery,...dataQuery,full:propsQuery.full};return(0,jsx_runtime.jsx)(Query,{query:query,cachedResults:insight,context:{...context,insightProps},embedded:embedded,readOnly:readOnly})}function Query(props){var _props$uniqueKey;let component;let{query:propsQuery,setQuery:propsSetQuery,readOnly,embedded,filtersOverride,variablesOverride,inSharedMode}=props,[localQuery,localSetQuery]=(0,react.useState)(propsQuery);(0,react.useEffect)(()=>{propsQuery!==localQuery&&localSetQuery(propsQuery)},[propsQuery]);let query=readOnly?propsQuery:localQuery,setQuery=null!=propsSetQuery?propsSetQuery:localSetQuery,queryContext=props.context||{},uniqueKey=null!==(_props$uniqueKey=props.uniqueKey)&&void 0!==_props$uniqueKey?_props$uniqueKey:props.context?.insightProps&&(0,InsightViz.gG)(props.context.insightProps);if(null===query)return null;if("string"==typeof query)try{return(0,jsx_runtime.jsx)(Query,{...props,query:JSON.parse(query)})}catch(e){return(0,jsx_runtime.jsxs)("div",{className:"border border-danger p-4 text-danger",children:["Error parsing JSON: ",e.message]})}return(component=(0,queries_utils.TC)(query)?(0,jsx_runtime.jsx)(DataTable_DataTable_DataTable,{query:query,setQuery:setQuery,context:queryContext,cachedResults:props.cachedResults,uniqueKey:uniqueKey,readOnly:readOnly}):(0,queries_utils.A_)(query)?(0,jsx_runtime.jsx)(DataTableVisualization,{query:query,setQuery:setQuery,cachedResults:props.cachedResults,uniqueKey:uniqueKey,context:queryContext,readOnly:readOnly,variablesOverride:props.variablesOverride}):(0,queries_utils.E0)(query)?(0,jsx_runtime.jsx)(SavedInsight,{query:query,context:queryContext,readOnly:readOnly,embedded:embedded}):(0,queries_utils.KN)(query)?(0,jsx_runtime.jsx)(InsightViz.hs,{query:query,setQuery:setQuery,context:queryContext,readOnly:readOnly,uniqueKey:uniqueKey,embedded:embedded,inSharedMode:inSharedMode,filtersOverride:filtersOverride,variablesOverride:variablesOverride}):(0,queries_utils.vD)(query)?(0,jsx_runtime.jsx)(WebOverview,{query:query,cachedResults:props.cachedResults,context:queryContext}):(0,queries_utils.GD)(query)?(0,jsx_runtime.jsx)(HogDebug.O,{query:query,setQuery:setQuery,queryKey:String(uniqueKey)}):(0,jsx_runtime.jsx)(DataNode,{query:query,cachedResults:props.cachedResults}))?(0,jsx_runtime.jsx)(ErrorBoundary.S,{children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[props.context?.showQueryEditor?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(QueryEditor.W,{query:JSON.stringify(query),setQuery:stringQuery=>setQuery?.(JSON.parse(stringQuery),!0),context:queryContext}),(0,jsx_runtime.jsx)("div",{className:"my-4",children:(0,jsx_runtime.jsx)(LemonDivider.p,{})})]}):null,component]})}):(0,jsx_runtime.jsxs)("div",{className:"text-danger border border-danger p-2",children:[(0,jsx_runtime.jsx)("strong",{children:"PostHoqQuery error:"})," ",query?.kind?`Invalid node type "${query.kind}"`:"Invalid query"]})}},"./frontend/src/queries/QueryEditor/QueryEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>QueryEditor});var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),AutoSizer=__webpack_require__("./node_modules/.pnpm/react-virtualized@9.22.5_react-dom@18.2.0_react@18.2.0/node_modules/react-virtualized/dist/es/AutoSizer/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx");function prettyJSON(source){try{return JSON.stringify(JSON.parse(source),null,2)+"\n"}catch(e){return source}}let queryEditorLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","QueryEditor","queryEditorLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.key),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.query!==oldProps.query&&actions.setQueryInput(prettyJSON(props.query))}),(0,index_esm.actions)({saveQuery:!0,setQueryInput:queryInput=>({queryInput})}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{queryInput:[prettyJSON(props.query),{setQueryInput:(_,_ref3)=>{let{queryInput}=_ref3;return queryInput}}]}}),(0,index_esm.selectors)({parsedQuery:[s=>[s.queryInput],query=>{let JSONQuery=null,error=null;try{JSONQuery=JSON.parse(query)}catch(e){error=e.message}return{JSONQuery,error}}],JSONQuery:[s=>[s.parsedQuery],_ref4=>{let{JSONQuery}=_ref4;return JSONQuery}],error:[s=>[s.parsedQuery],_ref5=>{let{error}=_ref5;return error}],inputChanged:[(s,p)=>[p.query,s.queryInput],(query,queryInput)=>query!==queryInput]}),(0,index_esm.listeners)(_ref6=>{let{actions,props,values}=_ref6;return{saveQuery:()=>{if(values.error)LemonToast.UJ.error(`Error parsing JSON: ${values.error}`);else{let withoutFormatting=JSON.stringify(JSON.parse(values.queryInput));actions.setQueryInput(prettyJSON(withoutFormatting)),props.setQuery?.(withoutFormatting)}}}})]);var schema=__webpack_require__("./frontend/src/queries/schema.json"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let i=0;function QueryEditor(props){let[key]=(0,react.useState)(()=>i++),{queryInput,error,inputChanged}=(0,index_esm.useValues)(queryEditorLogic({...props,key})),{setQueryInput,saveQuery}=(0,index_esm.useActions)(queryEditorLogic({...props,key}));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[props.context?.showQueryHelp?(0,jsx_runtime.jsx)("div",{className:"mb-2 flex flex-row flex-wrap justify-between items-center",children:(0,jsx_runtime.jsxs)("div",{children:["Insight configurations follow a declarative schema. Edit them as code here. Open under"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.debugQuery(queryInput),children:"/debug"}),"."]})}):null,(0,jsx_runtime.jsxs)("div",{"data-attr":"query-editor",className:(0,clsx_m.default)("flex flex-col p-2 bg-bg-3000 space-y-2 resize-y overflow-auto h-80 rounded",props.className),children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(AutoSizer.q,{disableWidth:!0,children:_ref=>{let{height}=_ref;return(0,jsx_runtime.jsx)(CodeEditor.p,{className:"border",language:"json",value:queryInput,onChange:v=>setQueryInput(null!=v?v:""),height:height,schema:schema})}})}),error?(0,jsx_runtime.jsxs)("div",{className:"bg-danger text-white p-2",children:[(0,jsx_runtime.jsx)("strong",{children:"Error parsing JSON:"})," ",error]}):null,props.aboveButton,(0,jsx_runtime.jsx)(LemonButton.J,{onClick:saveQuery,type:"primary",status:error?"danger":"default",disabled:!props.setQuery||!!error||!inputChanged,fullWidth:!0,center:!0,"data-attr":"query-editor-save",children:props.setQuery?"Update and run":"No permission to update"})]})]})}},"./frontend/src/queries/examples.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$R:()=>examples,Os:()=>stringifiedExamples});var _queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts"),_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/types.ts");let Events={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery),properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"}],after:"-24h",limit:100},EventsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,source:Events},EventsTableFull={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:Events},TotalEvents={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["count()"]},TotalEventsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:TotalEvents},PropertyFormulas={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["1 + 2 + 3","event","person.created_at","concat(properties['$browser'], ' 💚 ', properties['$geoip_city_name']) -- Browser 💚 City","'random string'"],limit:100},PropertyFormulasTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:PropertyFormulas},EventAggregations={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["concat(properties['$geoip_city_name'], ' ', 'Rocks') -- City","event","count() + 100000 -- Inflamed total","1 + 2"],orderBy:["-count()"]}},Persons={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode,properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Person,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"}]},PersonsTable={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,columns:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode),source:Persons},PersonsTableFull={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,columns:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode),source:Persons},properties={type:_types__WEBPACK_IMPORTED_MODULE_2__.J2.And,values:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.J2.Or,values:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$current_url",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:["https://hedgebox.net/files/"]},{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$geoip_country_code",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:["US","AU"]}]}]},series=[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsNode,name:"$pageview",custom_name:"Views",event:"$pageview",properties:[{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Event,key:"$browser",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.Exact,value:"Chrome"},{type:_types__WEBPACK_IMPORTED_MODULE_2__.FT.Cohort,key:"id",operator:_types__WEBPACK_IMPORTED_MODULE_2__.WV.In,value:2}]}],InsightTrendsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.TrendsQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,trendsFilter:{display:_types__WEBPACK_IMPORTED_MODULE_2__.Qb.ActionsAreaGraph},breakdownFilter:{breakdown:"$geoip_country_code",breakdown_type:"event"}},InsightFunnelsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.FunnelsQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,funnelsFilter:{funnelOrderType:_types__WEBPACK_IMPORTED_MODULE_2__.kO.ORDERED},breakdownFilter:{breakdown:"$geoip_country_code",breakdown_type:"event"}},InsightRetentionQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.RetentionQuery,properties,filterTestAccounts:!1,retentionFilter:{targetEntity:{type:"events",id:"$pageview",name:"$pageview"},returningEntity:{type:"events",id:"$pageview",name:"$pageview"}}},InsightPathsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PathsQuery,properties,filterTestAccounts:!1,pathsFilter:{}},InsightStickinessQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.StickinessQuery,properties,filterTestAccounts:!1,interval:"day",dateRange:{date_from:"-7d"},series,stickinessFilter:{}},InsightLifecycleQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.LifecycleQuery,properties,filterTestAccounts:!1,dateRange:{date_from:"-7d"},series},HogQLRaw={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.HogQLQuery,query:` select event, person.properties.email, properties.$browser, count() @@ -74,7 +74,7 @@ limit 100`,explain:!0},DataWarehouse={kind:_queries_schema__WEBPACK_IMPORTED_MOD return fibonacci(16);`},queryExamples={Events,EventsTable,EventsTableFull,TotalEventsTable,PropertyFormulasTable,EventAggregations,Persons,PersonsTable,PersonsTableFull,InsightTrendsQuery,InsightTrends:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightTrendsQuery},InsightFunnelsQuery,InsightFunnels:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightFunnelsQuery},InsightRetentionQuery,InsightRetention:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightRetentionQuery},InsightPathsQuery,InsightPaths:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightPathsQuery},InsightStickinessQuery,InsightStickiness:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightStickinessQuery},InsightLifecycleQuery,InsightLifecycle:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.InsightVizNode,source:InsightLifecycleQuery}};Object.fromEntries(Object.entries(queryExamples).map(_ref=>{let[key,node]=_ref;return[key,JSON.stringify(node)]}));let examples={...queryExamples,HogQLRaw,HogQLTable,DataVisualization,Hog,Hoggonacci,DataWarehouse},stringifiedExamples=Object.fromEntries(Object.entries(examples).map(_ref2=>{let[key,node]=_ref2;return[key,JSON.stringify(node)]}))},"./frontend/src/queries/nodes/DataNode/DateRange.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>DateRange});var lib_components_DateFilter_DateFilter__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx"),_queries_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DateRange(_ref){var _query$after,_query$before,_query$filters$dateRa,_query$filters$dateRa2;let{query,setQuery}=_ref;return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_1__.rz)(query)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(lib_components_DateFilter_DateFilter__WEBPACK_IMPORTED_MODULE_0__.f,{dateFrom:null!==(_query$after=query.after)&&void 0!==_query$after?_query$after:void 0,dateTo:null!==(_query$before=query.before)&&void 0!==_query$before?_query$before:void 0,onChange:(changedDateFrom,changedDateTo)=>{let newQuery={...query,after:null!=changedDateFrom?changedDateFrom:void 0,before:null!=changedDateTo?changedDateTo:void 0};setQuery?.(newQuery)}}):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_1__.Vf)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_1__.Sy)(query)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(lib_components_DateFilter_DateFilter__WEBPACK_IMPORTED_MODULE_0__.f,{size:"medium",dateFrom:null!==(_query$filters$dateRa=query.filters?.dateRange?.date_from)&&void 0!==_query$filters$dateRa?_query$filters$dateRa:void 0,dateTo:null!==(_query$filters$dateRa2=query.filters?.dateRange?.date_to)&&void 0!==_query$filters$dateRa2?_query$filters$dateRa2:void 0,onChange:(changedDateFrom,changedDateTo)=>{var _query$filters;let newQuery={...query,filters:{...null!==(_query$filters=query.filters)&&void 0!==_query$filters?_query$filters:{},dateRange:{date_from:null!=changedDateFrom?changedDateFrom:void 0,date_to:null!=changedDateTo?changedDateTo:void 0}}};setQuery?.(newQuery)}}):null}},"./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>Timings,W:()=>ElapsedTime});var clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_Popover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Timings(_ref){let{timings,elapsedTime}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:"space-y-2 p-2",children:[timings.map(_ref2=>{let{k:key,t:time}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.default)("flex justify-between items-start space-x-2",time>.5*timings[timings.length-1].t?"font-bold":""),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",{children:"."==key?"Query total":key}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{children:[time.toFixed(3),"s"]})]},key)}),void 0!==elapsedTime&&timings.length>0?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.default)("flex justify-between items-start space-x-2"),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",{children:"+ HTTP overhead"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{children:[(elapsedTime/1e3-timings[timings.length-1].t).toFixed(3),"s"]})]}):null]})}function ElapsedTimeWithTimings(_ref3){let{elapsedTime,hasError,timings}=_ref3,[popoverVisible,setPopoverVisible]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_Popover__WEBPACK_IMPORTED_MODULE_1__.J2,{onClickOutside:()=>setPopoverVisible(!1),visible:popoverVisible,placement:"bottom",overlay:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Timings,{timings:timings,elapsedTime:elapsedTime}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{onClick:()=>setPopoverVisible(visible=>!visible),className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.default)(hasError?"text-danger":"","cursor-help"),children:[(elapsedTime/1e3).toFixed(elapsedTime<1e3?2:1),"s"]})})}function ElapsedTime(_ref4){let{showTimings}=_ref4,{elapsedTime,loadingStart,responseError,isShowingCachedResults,timings}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_3__.M),[,setTick]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(0),time=elapsedTime;return(isShowingCachedResults&&(time=0),isShowingCachedResults||!loadingStart||elapsedTime||(time=performance.now()-loadingStart,window.requestAnimationFrame(()=>{setTick(tick=>tick+1)})),time)?elapsedTime&&timings&&showTimings?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(ElapsedTimeWithTimings,{elapsedTime:elapsedTime,timings:timings,hasError:!!responseError}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:responseError?"text-danger":"",children:[(time/1e3).toFixed(time<1e3?2:1),"s"]}):null}},"./frontend/src/queries/nodes/DataNode/LoadNext.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>LoadNext});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LoadNext(_ref){let{query}=_ref,{canLoadNextData,nextDataLoading,numberOfRows,hasMoreData,dataLimit}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_2__.M),{loadNextData}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_2__.M);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",{className:"m-2 flex items-center",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{onClick:loadNextData,loading:nextDataLoading,fullWidth:!0,center:!0,disabled:!canLoadNextData,children:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_3__.Vf)(query)&&!canLoadNextData&&hasMoreData&&dataLimit?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("br",{}),"Default limit of ",dataLimit," rows reached. Try adding a LIMIT clause to adjust."]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:["Showing ",canLoadNextData||1===numberOfRows?"":"all ",1===numberOfRows?"one":numberOfRows," ",1===numberOfRows?"entry":"entries",canLoadNextData?". Click to load more.":". Reached the end of results."]})})})}},"./frontend/src/queries/nodes/DataNode/Reload.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ReloadAll,L:()=>Reload});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),_queries_nodes_DataNode_dataNodeCollectionLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeCollectionLogic.ts"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Reload(){let{responseLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_5__.M),{loadData,cancelQuery}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_5__.M);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{type:"secondary",onClick:()=>{responseLoading?cancelQuery():loadData(!0)},icon:responseLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_3__.$,{textColored:!0}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_1__.tr,{}),children:responseLoading?"Cancel":"Reload"})}function ReloadAll(){let{areAnyLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_queries_nodes_DataNode_dataNodeCollectionLogic__WEBPACK_IMPORTED_MODULE_4__.y),{reloadAll}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(_queries_nodes_DataNode_dataNodeCollectionLogic__WEBPACK_IMPORTED_MODULE_4__.y);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{type:"secondary",size:"small",onClick:()=>{reloadAll()},icon:areAnyLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Spinner__WEBPACK_IMPORTED_MODULE_3__.$,{textColored:!0}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_1__.tr,{}),disabledReason:areAnyLoading?"Loading":void 0,children:"Reload"})}},"./frontend/src/queries/nodes/DataNode/dataNodeCollectionLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>dataNodeCollectionLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let dataNodeCollectionLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["queries","nodes","dataNodeCollectionLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({mountDataNode:(id,props)=>({id,props}),unmountDataNode:id=>({id}),reloadAll:()=>({}),cancelAllLoading:()=>({}),collectionNodeLoadData:id=>({id}),collectionNodeLoadDataSuccess:id=>({id}),collectionNodeLoadDataFailure:id=>({id})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({mountedDataNodes:[[],{mountDataNode:(state,payload)=>{let filtered=state.filter(node=>node.id!==payload.id);return[...filtered,payload.props]},unmountDataNode:(state,payload)=>state.filter(node=>node.id!==payload.id)}],collectionNodeStatus:[{},{mountDataNode:(state,payload)=>({...state,[payload.id]:{isLoading:!1,hasError:!1}}),unmountDataNode:(state,payload)=>{let{[payload.id]:_discard,...rest}=state;return rest},collectionNodeLoadData:(state,payload)=>({...state,[payload.id]:{isLoading:!0,hasError:!1}}),collectionNodeLoadDataSuccess:(state,payload)=>({...state,[payload.id]:{isLoading:!1,hasError:!1}}),collectionNodeLoadDataFailure:(state,payload)=>({...state,[payload.id]:{isLoading:!1,hasError:!0}})}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({areAnyLoading:[s=>[s.collectionNodeStatus],collectionNodeStatus=>Object.values(collectionNodeStatus).some(status=>status?.isLoading)]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref=>{let{values}=_ref;return{reloadAll:()=>{values.mountedDataNodes.forEach(node=>node.loadData(!0))},cancelAllLoading:()=>{values.mountedDataNodes.forEach(node=>{let status=values.collectionNodeStatus[node.id];status?.isLoading&&node.cancelQuery()})}}})])},"./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>dataNodeLogic});var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),defineProperty=__webpack_require__("./node_modules/.pnpm/@babel+runtime@7.24.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),FastPriorityQueue=__webpack_require__("./node_modules/.pnpm/fastpriorityqueue@0.7.5/node_modules/fastpriorityqueue/FastPriorityQueue.js"),FastPriorityQueue_default=__webpack_require__.n(FastPriorityQueue);class ConcurrencyControllerItem{constructor(concurrencyController,userFn,abortController){let priority=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,debugTag=arguments.length>4?arguments[4]:void 0;(0,defineProperty.Z)(this,"_debugTag",void 0),(0,defineProperty.Z)(this,"_runFn",void 0),(0,defineProperty.Z)(this,"_priority",1/0),(0,defineProperty.Z)(this,"_promise",void 0),this._debugTag=debugTag,this._priority=priority;let{promise,resolve,reject}=(0,utils.uy)();this._promise=promise,this._runFn=async()=>{if(abortController?.signal.aborted){reject(new FakeAbortError(abortController.signal.reason||"AbortError"));return}if(concurrencyController._current.length>=concurrencyController._concurrencyLimit)throw Error("Developer Error: ConcurrencyControllerItem: _runFn called while already running");try{concurrencyController._current.push(this);let result=await userFn();resolve(result)}catch(error){reject(error)}},abortController?.signal.addEventListener("abort",()=>{reject(new FakeAbortError(abortController.signal.reason||"AbortError"))}),promise.catch(()=>{}).finally(()=>{concurrencyController._current.includes(this)&&(concurrencyController._current=concurrencyController._current.filter(item=>item!==this),concurrencyController._runNext())})}}class FakeAbortError extends Error{constructor(){super(...arguments),(0,defineProperty.Z)(this,"name","AbortError")}}var insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),queryUtils=__webpack_require__("./frontend/src/scenes/insights/utils/queryUtils.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),dataNodeCollectionLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeCollectionLogic.ts"),DataTable_utils=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),queries_query=__webpack_require__("./frontend/src/queries/query.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts");let concurrencyController=new class{constructor(concurrencyLimit){(0,defineProperty.Z)(this,"_concurrencyLimit",void 0),(0,defineProperty.Z)(this,"_current",[]),(0,defineProperty.Z)(this,"_queue",new(FastPriorityQueue_default())((a,b)=>a._priority{let{fn,priority,abortController,debugTag}=_ref,item=new ConcurrencyControllerItem(this,fn,abortController,priority,debugTag);return this._queue.add(item),this._tryRunNext(),item._promise}),(0,defineProperty.Z)(this,"setConcurrencyLimit",limit=>{this._concurrencyLimit=limit}),this._concurrencyLimit=concurrencyLimit}_runNext(){let next=this._queue.poll();next&&next._runFn().catch(()=>{}).finally(()=>{this._tryRunNext()})}_tryRunNext(){this._current.lengthprops.key),(0,index_esm.connect)(props=>({values:[userLogic.userLogic,["user"],teamLogic.H,["currentTeamId"],featureFlagLogic.h,["featureFlags"]],actions:[(0,dataNodeCollectionLogic.y)({key:props.dataNodeCollectionId||props.key}),["mountDataNode","unmountDataNode","collectionNodeLoadData","collectionNodeLoadDataSuccess","collectionNodeLoadDataFailure"]]})),(0,index_esm.props)({query:{},variablesOverride:void 0,autoLoad:!0}),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;if(!props.query)return;oldProps.query?.kind&&props.query.kind!==oldProps.query.kind&&actions.clearResponse();let hasQueryChanged=!(0,queryUtils.xJ)(props.query,oldProps.query),queryVarsHaveChanged=(0,queryUtils.dm)(props.query,oldProps.query),queryStatus=props.cachedResults?.query_status||null;hasQueryChanged&&queryStatus?.complete===!1?actions.loadData(queryVarsHaveChanged,queryStatus.id):hasQueryChanged&&props.autoLoad&&!(props.cachedResults&&props.key.includes("dashboard"))&&(!props.cachedResults||(0,queries_utils.Yg)(props.query)&&!props.cachedResults.result&&!props.cachedResults.results)?actions.loadData(queryVarsHaveChanged):props.cachedResults&&actions.setResponse(props.cachedResults)}),(0,index_esm.actions)({loadData:function(){let refresh=arguments.length>0&&void 0!==arguments[0]&&arguments[0],alreadyRunningQueryId=arguments.length>1?arguments[1]:void 0,overrideQuery=arguments.length>2?arguments[2]:void 0;return{refresh,queryId:alreadyRunningQueryId||(0,utils.Vj)(),pollOnly:!!alreadyRunningQueryId,overrideQuery}},abortAnyRunningQuery:!0,abortQuery:payload=>payload,cancelQuery:!0,setResponse:response=>response,clearResponse:!0,startAutoLoad:!0,stopAutoLoad:!0,toggleAutoLoad:!0,highlightRows:rows=>({rows}),setElapsedTime:elapsedTime=>({elapsedTime}),setPollResponse:status=>({status}),setLocalCache:response=>response}),(0,lib.loaders)(_ref2=>{var _props$cachedResults;let{actions,cache,values,props}=_ref2;return{response:[null!==(_props$cachedResults=props.cachedResults)&&void 0!==_props$cachedResults?_props$cachedResults:null,{setResponse:response=>response,clearResponse:()=>null,loadData:async(_ref3,breakpoint)=>{let{refresh:refreshArg,queryId,pollOnly,overrideQuery}=_ref3,query=null!=overrideQuery?overrideQuery:props.query,refresh=props.alwaysRefresh||refreshArg;if(props.doNotLoad)return props.cachedResults;let queryStatus=props.cachedResults?.query_status||null;if(props.cachedResults&&!refresh&&queryStatus?.complete!==!1&&(props.cachedResults.result||props.cachedResults.results))return props.cachedResults;if("query"in query){let stringifiedQuery=JSON.stringify(query.query);if(cache.localResults[stringifiedQuery]&&!refresh)return cache.localResults[stringifiedQuery];if(!query.query)return null}if(!values.currentTeamId||void 0===query||0===Object.keys(query).length||!(0,queryUtils.O_)(query))return null;actions.abortAnyRunningQuery(),actions.setPollResponse(null);let abortController=new AbortController;cache.abortController=abortController;let methodOptions={signal:cache.abortController.signal};try{let response=await concurrencyController.run({debugTag:query.kind,abortController,priority:props.loadPriority,fn:async()=>{let now=performance.now();try{var _await$performQuery;breakpoint();let data=null!==(_await$performQuery=await (0,queries_query.jr)(addModifiers(query,props.modifiers),methodOptions,refresh,queryId,actions.setPollResponse,props.filtersOverride,props.variablesOverride,pollOnly))&&void 0!==_await$performQuery?_await$performQuery:null,duration=performance.now()-now;return{data,duration}}catch(error){let duration=performance.now()-now;throw error.duration=duration,error}}});return breakpoint(),actions.setElapsedTime(response.duration),response.data}catch(error){throw error.duration&&actions.setElapsedTime(error.duration),error.queryId=queryId,(0,utils.sd)(error)&&actions.abortQuery({queryId}),breakpoint(),error}},loadNewData:async()=>{if(props.cachedResults)return props.cachedResults;if(!values.canLoadNewData||values.dataLoading)return values.response;if((0,queries_utils.rz)(props.query)&&values.newQuery){var _await$performQuery2,_newResponse$results;let now=performance.now(),newResponse=null!==(_await$performQuery2=await (0,queries_query.jr)(addModifiers(values.newQuery,props.modifiers),void 0,props.alwaysRefresh))&&void 0!==_await$performQuery2?_await$performQuery2:null;if(actions.setElapsedTime(performance.now()-now),null===values.response)return newResponse;newResponse?.results&&actions.highlightRows(newResponse?.results);let currentResults=(values.response||{results:[]}).results;return{...values.response,results:[...null!==(_newResponse$results=newResponse?.results)&&void 0!==_newResponse$results?_newResponse$results:[],...currentResults]}}return values.response},loadNextData:async()=>{var _await$performQuery3,_queryResponse$result,_newResponse$results2,_await$performQuery4,_values$response$resu,_newResponse$results3;if(props.cachedResults)return props.cachedResults;if(!values.canLoadNextData||values.dataLoading||!values.nextQuery)return values.response;let now=performance.now();if((0,queries_utils.rz)(props.query)||(0,queries_utils.NS)(props.query)){let newResponse=null!==(_await$performQuery3=await (0,queries_query.jr)(addModifiers(values.nextQuery,props.modifiers),void 0,props.alwaysRefresh))&&void 0!==_await$performQuery3?_await$performQuery3:null;actions.setElapsedTime(performance.now()-now);let queryResponse=values.response;return{...queryResponse,results:[...null!==(_queryResponse$result=queryResponse?.results)&&void 0!==_queryResponse$result?_queryResponse$result:[],...null!==(_newResponse$results2=newResponse?.results)&&void 0!==_newResponse$results2?_newResponse$results2:[]],hasMore:newResponse?.hasMore}}if((0,queries_utils.cK)(props.query)){let newResponse=null!==(_await$performQuery4=await (0,queries_query.jr)(addModifiers(values.nextQuery,props.modifiers),void 0,props.alwaysRefresh))&&void 0!==_await$performQuery4?_await$performQuery4:null;if(actions.setElapsedTime(performance.now()-now),Array.isArray(values.response))throw Error("Unexpected response type for persons node query");return{...values.response,results:[...null!==(_values$response$resu=values.response?.results)&&void 0!==_values$response$resu?_values$response$resu:[],...null!==(_newResponse$results3=newResponse?.results)&&void 0!==_newResponse$results3?_newResponse$results3:[]],next:newResponse?.next}}return values.response}}]}}),(0,index_esm.reducers)(_ref4=>{let{props}=_ref4;return{isRefresh:[!1,{loadData:(_,_ref5)=>{let{refresh}=_ref5;return!!refresh}}],dataLoading:[!1,{loadData:()=>!0,loadDataSuccess:()=>!1,loadDataFailure:()=>!1}],queryId:[null,{loadData:(_,_ref6)=>{let{queryId}=_ref6;return queryId}}],newDataLoading:[!1,{loadNewData:()=>!0,loadNewDataSuccess:()=>!1,loadNewDataFailure:()=>!1}],nextDataLoading:[!1,{loadNextData:()=>!0,loadNextDataSuccess:()=>!1,loadNextDataFailure:()=>!1}],queryCancelled:[!1,{loadNextData:()=>!1,loadNewData:()=>!1,loadData:()=>!1,cancelQuery:()=>!0}],pollResponse:[null,{setPollResponse:(state,_ref7)=>{let{status}=_ref7;return{status,previousStatus:state&&state.status}}}],autoLoadToggled:[!1,{persist:!0,storageKey:(0,clsx_m.default)("queries.nodes.dataNodeLogic.autoLoadToggled",props.query?.kind,{action:(0,queries_utils.rz)(props.query)&&props.query.actionId,person:(0,queries_utils.rz)(props.query)&&props.query.personId})},{toggleAutoLoad:state=>!state}],autoLoadStarted:[!1,{startAutoLoad:()=>!0,stopAutoLoad:()=>!1}],highlightedRows:[new Set,{highlightRows:(state,_ref8)=>{let{rows}=_ref8;return new Set([...Array.from(state),...rows])},loadDataSuccess:()=>new Set}],loadingStart:[null,{setElapsedTime:()=>null,loadData:()=>performance.now(),loadNewData:()=>performance.now(),loadNextData:()=>performance.now()}],response:{loadDataFailure:()=>null},responseErrorObject:[null,{loadData:()=>null,loadDataFailure:(_,_ref9)=>{let{errorObject}=_ref9;return errorObject},loadDataSuccess:()=>null}],responseError:[null,{loadData:()=>null,loadNewData:()=>null,loadDataFailure:(_,_ref10)=>{var _errorObject$error,_errorObject$detail;let{error,errorObject}=_ref10;return errorObject&&"error"in errorObject?null!==(_errorObject$error=errorObject.error)&&void 0!==_errorObject$error?_errorObject$error:"Error loading data":errorObject&&"detail"in errorObject?null!==(_errorObject$detail=errorObject.detail)&&void 0!==_errorObject$detail?_errorObject$detail:"Error loading data":null!=error?error:"Error loading data"},loadNewDataFailure:(_,_ref11)=>{var _errorObject$error2,_errorObject$detail2;let{error,errorObject}=_ref11;return errorObject&&"error"in errorObject?null!==(_errorObject$error2=errorObject.error)&&void 0!==_errorObject$error2?_errorObject$error2:"Error loading data":errorObject&&"detail"in errorObject?null!==(_errorObject$detail2=errorObject.detail)&&void 0!==_errorObject$detail2?_errorObject$detail2:"Error loading data":null!=error?error:"Error loading data"},loadDataSuccess:(_,_ref12)=>{var _response$error;let{response}=_ref12;return null!==(_response$error=response?.error)&&void 0!==_response$error?_response$error:null},loadNewDataSuccess:(_,_ref13)=>{var _response$error2;let{response}=_ref13;return null!==(_response$error2=response?.error)&&void 0!==_response$error2?_response$error2:null}}],elapsedTime:[null,{setElapsedTime:(_,_ref14)=>{let{elapsedTime}=_ref14;return elapsedTime},loadData:()=>null,loadNewData:()=>null,loadNextData:()=>null}],localCache:[{},{setLocalCache:(state,response)=>({...state,...response})}]}}),(0,index_esm.selectors)(_ref15=>{let{cache}=_ref15;return{variableOverridesAreSet:[(_,p)=>{var _p$variablesOverride;return[null!==(_p$variablesOverride=p.variablesOverride)&&void 0!==_p$variablesOverride?_p$variablesOverride:()=>({})]},variablesOverride=>!!variablesOverride],isShowingCachedResults:[s=>[(_,props)=>{var _props$cachedResults2;return null!==(_props$cachedResults2=props.cachedResults)&&void 0!==_props$cachedResults2?_props$cachedResults2:null},(_,props)=>props.query,s.isRefresh],(cachedResults,query,isRefresh)=>!isRefresh&&(!!cachedResults||cache.localResults&&"query"in query&&JSON.stringify(query.query) in cache.localResults)],query:[(_,p)=>[p.query],query=>query],newQuery:[(s,p)=>[p.query,s.response],(query,response)=>{if(!(0,queries_utils.rz)(query))return null;if((0,queries_utils.rz)(query)&&!query.before){var _query$orderBy$;let sortKey=null!==(_query$orderBy$=query.orderBy?.[0])&&void 0!==_query$orderBy$?_query$orderBy$:"timestamp DESC";if("timestamp DESC"===sortKey){let sortColumnIndex=query.select.map(hql=>(0,DataTable_utils.$p)(hql)).indexOf("timestamp");if(-1!==sortColumnIndex){let typedResults=response?.results,firstTimestamp=typedResults?.[0]?.[sortColumnIndex];if(firstTimestamp){let nextQuery={...query,after:firstTimestamp};return nextQuery}return query}}}return null}],canLoadNewData:[s=>[s.newQuery,s.isShowingCachedResults],(newQuery,isShowingCachedResults)=>!isShowingCachedResults&&!!newQuery],nextQuery:[(s,p)=>[p.query,s.response,s.responseError,s.dataLoading,s.isShowingCachedResults],(query,response,responseError,dataLoading,isShowingCachedResults)=>{if(isShowingCachedResults)return null;if(((0,queries_utils.rz)(query)||(0,queries_utils.NS)(query)||(0,queries_utils.Ii)(query))&&!responseError&&!dataLoading&&response?.hasMore){var _query$orderBy$2;let sortKey=null!==(_query$orderBy$2=query.orderBy?.[0])&&void 0!==_query$orderBy$2?_query$orderBy$2:"timestamp DESC";if((0,queries_utils.rz)(query)&&"timestamp DESC"===sortKey){let typedResults=response?.results,sortColumnIndex=query.select.map(hql=>(0,DataTable_utils.$p)(hql)).indexOf("timestamp");if(-1!==sortColumnIndex){let lastTimestamp=typedResults?.[typedResults.length-1]?.[sortColumnIndex];if(lastTimestamp){let newQuery={...query,before:lastTimestamp,limit:Math.max(100,Math.min(2*(typedResults?.length||100),1e4))};return newQuery}}}else{let typedResults=response?.results;return{...query,offset:typedResults?.length||0,limit:Math.max(100,Math.min(2*(typedResults?.length||100),1e4))}}}if((0,queries_utils.cK)(query)&&response&&!responseError&&response.next){let personsResults=response?.results,nextQuery={...query,limit:query.limit||100,offset:personsResults.length};return nextQuery}return null}],canLoadNextData:[s=>[s.nextQuery,s.isShowingCachedResults],(nextQuery,isShowingCachedResults)=>!isShowingCachedResults&&!!nextQuery],hasMoreData:[s=>[s.response],response=>!!response?.hasMore&&response.hasMore],dataLimit:[s=>[s.response],response=>response?.limit?response.limit:null],backToSourceQuery:[s=>[s.query],query=>{if((0,queries_utils.NS)(query)&&(0,queries_utils.a5)(query.source)&&query.source.source){let insightQuery=query.source.source,insightVizNode={kind:schema.OH.InsightVizNode,source:insightQuery,full:!0};return insightVizNode}return null}],autoLoadRunning:[s=>[s.autoLoadToggled,s.autoLoadStarted,s.dataLoading],(autoLoadToggled,autoLoadStarted,dataLoading)=>autoLoadToggled&&autoLoadStarted&&!dataLoading],lastRefresh:[s=>[s.response],response=>response&&"last_refresh"in response?response.last_refresh:null],nextAllowedRefresh:[(s,p)=>[p.query,s.response],(query,response)=>(0,queries_utils.Yg)(query)&&response&&"next_allowed_client_refresh"in response?response.next_allowed_client_refresh:null],getInsightRefreshButtonDisabledReason:[s=>[s.nextAllowedRefresh,s.lastRefresh],(nextAllowedRefresh,lastRefresh)=>()=>{let now=(0,dayjs.Bv)();if(nextAllowedRefresh){let nextRefreshTime=(0,dayjs.Bv)(nextAllowedRefresh);if(now.isBefore(nextRefreshTime))return`You can refresh this insight again ${nextRefreshTime.from(now)}`}if(lastRefresh){let earliestRefresh=(0,dayjs.Bv)(lastRefresh).add(insightLogic.P9,"minutes");if(now.isBefore(earliestRefresh))return`You can refresh this insight again ${earliestRefresh.from(now)}`}return""}],timings:[s=>[s.response],response=>response&&"timings"in response?response.timings:null],numberOfRows:[s=>[s.response],response=>{if(!response)return null;for(let field of["result","results"])if(field in response&&Array.isArray(response[field]))return response[field].length;return null}]}}),(0,index_esm.listeners)(_ref16=>{let{actions,values,cache,props}=_ref16;return{abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)},abortQuery:async _ref17=>{let{queryId}=_ref17;try{let{currentTeamId}=values;await api.ZP.delete(`api/environments/${currentTeamId}/query/${queryId}/`)}catch(e){console.warn("Failed cancelling query",e)}},cancelQuery:()=>{actions.abortAnyRunningQuery()},loadData:()=>{actions.collectionNodeLoadData(props.key)},loadDataSuccess:_ref18=>{let{response}=_ref18;props.onData?.(response),actions.collectionNodeLoadDataSuccess(props.key),"query"in props.query&&(cache.localResults[JSON.stringify(props.query.query)]=response)},loadDataFailure:()=>{actions.collectionNodeLoadDataFailure(props.key)},loadNewDataSuccess:_ref19=>{let{response}=_ref19;props.onData?.(response)},loadNextDataSuccess:_ref20=>{let{response}=_ref20;props.onData?.(response)}}}),(0,kea_subscriptions_lib.Vt)(_ref21=>{let{actions,cache,values}=_ref21;return{autoLoadRunning:autoLoadRunning=>{cache.autoLoadInterval&&(window.clearInterval(cache.autoLoadInterval),cache.autoLoadInterval=null),autoLoadRunning&&(actions.loadNewData(),cache.autoLoadInterval=window.setInterval(()=>{values.responseLoading||actions.loadNewData()},3e4))}}}),(0,index_esm.afterMount)(_ref22=>{let{actions,props,cache}=_ref22;cache.localResults={},props.cachedResults?actions.setResponse(props.cachedResults):Object.keys(props.query||{}).length>0&&actions.loadData(),actions.mountDataNode(props.key,{id:props.key,loadData:actions.loadData,cancelQuery:actions.cancelQuery})}),(0,index_esm.beforeUnmount)(_ref23=>{let{actions,props,values}=_ref23;values.autoLoadRunning&&actions.stopAutoLoad(),values.dataLoading&&actions.abortAnyRunningQuery(),actions.unmountDataNode(props.key)})])},"./frontend/src/queries/nodes/DataTable/DataTableExport.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{dj:()=>startDownload,ln:()=>DataTableExport,yP:()=>MAX_SELECT_RETURNED_ROWS});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_utils_copyToClipboard__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),papaparse__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/papaparse@5.4.1/node_modules/papaparse/papaparse.min.js"),papaparse__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(papaparse__WEBPACK_IMPORTED_MODULE_6__),scenes_persons_person_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/persons/person-utils.ts"),_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),_queries_query__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/types.ts"),_dataTableLogic__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/nodes/DataTable/dataTableLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let MAX_SELECT_RETURNED_ROWS=5e4,columnDisallowList=["person.$delete","*"];async function startDownload(query,onlySelectedColumns,exportCall){let format=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_types__WEBPACK_IMPORTED_MODULE_11__.P5.CSV,exportContext=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(query.source)?{path:(0,_queries_query__WEBPACK_IMPORTED_MODULE_9__.rY)(query.source)}:{source:query.source};if(!exportContext)throw Error("Unsupported node type");if(onlySelectedColumns){var _ref,_ref2;exportContext.columns=(null!==(_ref=null!==(_ref2=_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz(query.source)||_queries_utils__WEBPACK_IMPORTED_MODULE_10__.NS(query.source)?query.source.select:null)&&void 0!==_ref2?_ref2:query.columns)&&void 0!==_ref?_ref:_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__.Qi(query.source.kind))?.filter(c=>"person.$delete"!==c),(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(query.source)?exportContext.columns=exportContext.columns.map(c=>"person"===(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__.$p)(c)?"person.properties.email":c):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(query.source)&&(exportContext.columns=exportContext.columns.map(c=>"person"===(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__.$p)(c)?"email":c)),exportContext.columns.includes("person")&&(exportContext.columns=exportContext.columns.map(c=>"person"===c?"person.distinct_ids.0":c)),exportContext.columns=exportContext.columns.filter(n=>!columnDisallowList.includes(n))}exportCall({export_format:format,export_context:exportContext})}let getCsvTableData=(dataTableRows,columns,query)=>{if((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(query.source)){let filteredColumns=columns.filter(n=>!columnDisallowList.includes(n)),csvData=dataTableRows.map(n=>{let record=n.result,recordWithPerson={...null!=record?record:{},person:record?.name};return filteredColumns.map(n=>recordWithPerson[n])});return[filteredColumns,...csvData]}if((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(query.source)){let filteredColumns=columns.filter(n=>!columnDisallowList.includes(n)).map(n=>(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__.fU)(n)),csvData=dataTableRows.map(n=>columns.map((col,colIndex)=>columnDisallowList.includes(col)?null:"person"===col?(0,scenes_persons_person_utils__WEBPACK_IMPORTED_MODULE_7__.y)(n.result?.[colIndex]):n.result?.[colIndex]).filter(Boolean));return[filteredColumns,...csvData]}return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.Vf)(query.source)?[columns,...dataTableRows.map(n=>{var _ref3;return null!==(_ref3=n.result)&&void 0!==_ref3?_ref3:[]})]:[]},getJsonTableData=(dataTableRows,columns,query)=>{if((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(query.source)){let filteredColumns=columns.filter(n=>!columnDisallowList.includes(n));return dataTableRows.map(n=>{let record=n.result,recordWithPerson={...null!=record?record:{},person:record?.name};return filteredColumns.reduce((acc,cur)=>(acc[cur]=recordWithPerson[cur],acc),{})})}return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(query.source)?dataTableRows.map(n=>columns.reduce((acc,col,colIndex)=>{if(columnDisallowList.includes(col))return acc;if("person"===col)return acc[col]=(0,scenes_persons_person_utils__WEBPACK_IMPORTED_MODULE_7__.y)(n.result?.[colIndex]),acc;let colName=(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_8__.fU)(col);return acc[colName]=n.result?.[colIndex],acc},{})):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.Vf)(query.source)?dataTableRows.map(n=>{var _n$result;let data=null!==(_n$result=n.result)&&void 0!==_n$result?_n$result:{};return columns.reduce((acc,cur,index)=>(acc[cur]=data[index],acc),{})}):[]};function DataTableExport(_ref4){let{query}=_ref4,{dataTableRows,columnsInResponse,columnsInQuery,queryWithDefaults}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_dataTableLogic__WEBPACK_IMPORTED_MODULE_12__.yC),{startExport,createStaticCohort}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(lib_components_ExportButton_exportsLogic__WEBPACK_IMPORTED_MODULE_3__.exportsLogic),source=query.source,filterCount=(((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(source)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(source))&&source.properties?.length||0)+((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(source)&&source.event?1:0)+((0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(source)&&source.search?1:0),canExportAllColumns=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(source)&&source.select.includes("*")||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(source)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.NS)(source),showExportClipboardButtons=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.cK)(source)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(source)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.Vf)(source),canSaveAsCohort=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.NS)(source);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.d6,{items:[{label:"Export current columns",items:[{label:"CSV",onClick:()=>{startDownload(query,!0,startExport)}},{label:"XLSX",onClick:()=>{startDownload(query,!0,startExport,_types__WEBPACK_IMPORTED_MODULE_11__.P5.XLSX)}}]},canExportAllColumns&&{label:"Export all columns",items:[{label:"CSV",onClick:()=>void startDownload(query,!1,startExport)},{label:"XLSX",onClick:()=>void startDownload(query,!1,startExport,_types__WEBPACK_IMPORTED_MODULE_11__.P5.XLSX)}]},showExportClipboardButtons&&{label:"Copy to clipboard",items:[{label:"CSV",onClick:()=>{dataTableRows&&function(dataTableRows,columns,query){try{let tableData=getCsvTableData(dataTableRows,columns,query),csv=papaparse__WEBPACK_IMPORTED_MODULE_6___default().unparse(tableData);(0,lib_utils_copyToClipboard__WEBPACK_IMPORTED_MODULE_5__.v)(csv,"table")}catch{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.error("Copy failed!")}}(dataTableRows,null!=columnsInResponse?columnsInResponse:columnsInQuery,queryWithDefaults)},"data-attr":"copy-csv-to-clipboard"},{label:"JSON",onClick:()=>{dataTableRows&&function(dataTableRows,columns,query){try{let tableData=getJsonTableData(dataTableRows,columns,query),json=JSON.stringify(tableData,null,4);(0,lib_utils_copyToClipboard__WEBPACK_IMPORTED_MODULE_5__.v)(json,"table")}catch{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.UJ.error("Copy failed!")}}(dataTableRows,null!=columnsInResponse?columnsInResponse:columnsInQuery,queryWithDefaults)},"data-attr":"copy-json-to-clipboard"}]},canSaveAsCohort&&{label:"Save as cohort",items:[{label:"Save as static cohort",onClick:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.dn.openForm({title:"Save as static cohort",description:"This will create a cohort with the current list of people.",initialValues:{name:""},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"name",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.DF,{type:"text","data-attr":"insight-name",placeholder:"Name of the new cohort",autoFocus:!0})}),errors:{name:name=>name?void 0:"You must enter a name"},onSubmit:async _ref5=>{let{name}=_ref5;return createStaticCohort(name,source)}})}}]}].filter(Boolean),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"secondary",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconDownload,{}),"data-attr":"data-table-export-menu",children:["Export",filterCount>0?` (${filterCount} filter${1===filterCount?"":"s"})`:""]})})}},"./frontend/src/queries/nodes/DataTable/dataTableLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cl:()=>errorColumn,uB:()=>loadingColumn,yC:()=>dataTableLogic});var fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils.tsx"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/InsightViz.tsx"),_queries_schema__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/utils.ts"),_utils__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts");let loadingColumn=Symbol("..."),errorColumn=Symbol("Error!"),dataTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>{if(!props.vizKey)throw Error("dataTableLogic must contain a vizKey in props");if(!(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.TC)(props.query))throw Error("dataTableLogic only accepts queries of type DataTableNode");return props.vizKey}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["queries","nodes","DataTable","dataTableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setColumnsInQuery:columns=>({columns})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)(_ref=>{let{props}=_ref;return{columnsInQuery:[(0,_utils__WEBPACK_IMPORTED_MODULE_11__.dm)(props.query),{setColumnsInQuery:(_,_ref2)=>{let{columns}=_ref2;return columns}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(props=>{var _props$dataNodeLogicK,_props$dataNodeLogicK2;return{values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"],(0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__.M)({key:null!==(_props$dataNodeLogicK=props.dataNodeLogicKey)&&void 0!==_props$dataNodeLogicK?_props$dataNodeLogicK:props.dataKey,query:props.query.source,dataNodeCollectionId:(0,_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_8__.Cf)(props.context?.insightProps,null!==(_props$dataNodeLogicK2=props.dataNodeLogicKey)&&void 0!==_props$dataNodeLogicK2?_props$dataNodeLogicK2:props.dataKey),loadPriority:props.context?.insightProps?.loadPriority}),["response","responseLoading","responseError"]]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({sourceKind:[(_,p)=>[p.query],query=>query.source?.kind],sourceFeatures:[(_,p)=>[p.query,(_,props)=>props.context],(query,context)=>{let sourceFeatures=(0,_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_7__.r)(query.source);if(context?.extraDataTableQueryFeatures)for(let feature of context.extraDataTableQueryFeatures)sourceFeatures.add(feature);return sourceFeatures}],orderBy:[(s,p)=>[p.query,s.sourceFeatures],(query,sourceFeatures)=>{var _orderBy;return sourceFeatures.has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_7__.P.selectAndOrderByColumns)?"orderBy"in query.source?null!==(_orderBy=query.source.orderBy)&&void 0!==_orderBy?_orderBy:null:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_10__.rz)(query.source)?["timestamp DESC"]:null:null},{resultEqualityCheck:lib_utils__WEBPACK_IMPORTED_MODULE_5__.h0}],columnsInResponse:[s=>[s.response],response=>response&&"columns"in response&&Array.isArray(response.columns)?response?.columns:null],dataTableRows:[s=>[s.sourceKind,s.orderBy,s.response,s.columnsInQuery,s.columnsInResponse],(sourceKind,orderBy,response,columnsInQuery,columnsInResponse)=>{var _results$map,_columnsInResponse$fi;if(response&&sourceKind===_queries_schema__WEBPACK_IMPORTED_MODULE_9__.OH.EventsQuery&&response){if(!fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default()(columnsInQuery,columnsInResponse))return[];let results=[];if("results"in response?results=response.results:"result"in response&&(results=response.result),!results)return[];let orderKey=orderBy?.[0]?.endsWith(" DESC")?orderBy[0].replace(/ DESC$/,""):orderBy?.[0],orderKeyIndex=null!==(_columnsInResponse$fi=columnsInResponse?.findIndex(column=>_utils__WEBPACK_IMPORTED_MODULE_11__.$p(column)===orderKey||_utils__WEBPACK_IMPORTED_MODULE_11__.$p(column)===`-${orderKey}`))&&void 0!==_columnsInResponse$fi?_columnsInResponse$fi:-1;if("timestamp"===orderKey&&-1!==orderKeyIndex){let lastResult=null,newResults=[];for(let result of results)result&&lastResult&&!(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.Bv)(result[orderKeyIndex]).isSame(lastResult[orderKeyIndex],"day")&&newResults.push({label:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_3__.Bv)(result[orderKeyIndex]).format("LL")}),newResults.push({result}),lastResult=result;return newResults}return results.map(result=>({result}))}let results=response?"results"in response&&Array.isArray(response.results)?response.results:"result"in response&&Array.isArray(response.result)?response.result:null:null;return results&&null!==(_results$map=results.map(result=>({result})))&&void 0!==_results$map?_results$map:null}],queryWithDefaults:[(s,p)=>[p.query,s.columnsInQuery,s.featureFlags,(_,props)=>props.context],(query,columnsInQuery,featureFlags,context)=>{var _query$full,_query$expandable,_query$embedded,_query$propertiesViaU,_query$showPropertyFi,_query$showEventFilte,_query$showSearch,_query$showActions,_query$showDateRange,_query$showTestAccoun,_query$showExport,_query$showReload,_query$showTimings,_query$showTimings2,_query$showElapsedTim,_query$showColumnConf,_query$showPersistent,_query$showSavedQueri,_query$showHogQLEdito,_query$allowSorting,_query$showOpenEditor,_query$showResultsTab;let{kind,columns:_columns,source,...rest}=query,showIfFull=!!query.full,flagQueryRunningTimeEnabled=!!featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_2__.y8.QUERY_RUNNING_TIME],flagQueryTimingsEnabled=!!featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_2__.y8.QUERY_TIMINGS];return{kind,columns:columnsInQuery,hiddenColumns:[],source,...(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.kS)({...rest,full:null!==(_query$full=query.full)&&void 0!==_query$full&&_query$full,expandable:null===(_query$expandable=query.expandable)||void 0===_query$expandable||_query$expandable,embedded:null!==(_query$embedded=query.embedded)&&void 0!==_query$embedded&&_query$embedded,propertiesViaUrl:null!==(_query$propertiesViaU=query.propertiesViaUrl)&&void 0!==_query$propertiesViaU&&_query$propertiesViaU,showPropertyFilter:null!==(_query$showPropertyFi=query.showPropertyFilter)&&void 0!==_query$showPropertyFi?_query$showPropertyFi:showIfFull,showEventFilter:null!==(_query$showEventFilte=query.showEventFilter)&&void 0!==_query$showEventFilte?_query$showEventFilte:showIfFull,showSearch:null!==(_query$showSearch=query.showSearch)&&void 0!==_query$showSearch?_query$showSearch:showIfFull,showActions:null===(_query$showActions=query.showActions)||void 0===_query$showActions||_query$showActions,showDateRange:null!==(_query$showDateRange=query.showDateRange)&&void 0!==_query$showDateRange?_query$showDateRange:showIfFull,showTestAccountFilters:null!==(_query$showTestAccoun=query.showTestAccountFilters)&&void 0!==_query$showTestAccoun?_query$showTestAccoun:showIfFull,showExport:null!==(_query$showExport=query.showExport)&&void 0!==_query$showExport?_query$showExport:showIfFull,showReload:null!==(_query$showReload=query.showReload)&&void 0!==_query$showReload?_query$showReload:showIfFull,showTimings:null!==(_query$showTimings=query.showTimings)&&void 0!==_query$showTimings?_query$showTimings:flagQueryTimingsEnabled,showElapsedTime:(null!==(_query$showTimings2=query.showTimings)&&void 0!==_query$showTimings2?_query$showTimings2:flagQueryTimingsEnabled)||(null!==(_query$showElapsedTim=query.showElapsedTime)&&void 0!==_query$showElapsedTim?_query$showElapsedTim:(flagQueryRunningTimeEnabled||source.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_9__.OH.HogQLQuery)&&showIfFull),showColumnConfigurator:null!==(_query$showColumnConf=query.showColumnConfigurator)&&void 0!==_query$showColumnConf?_query$showColumnConf:showIfFull,showPersistentColumnConfigurator:null!==(_query$showPersistent=query.showPersistentColumnConfigurator)&&void 0!==_query$showPersistent&&_query$showPersistent,showSavedQueries:null!==(_query$showSavedQueri=query.showSavedQueries)&&void 0!==_query$showSavedQueri&&_query$showSavedQueri,showHogQLEditor:null!==(_query$showHogQLEdito=query.showHogQLEditor)&&void 0!==_query$showHogQLEdito?_query$showHogQLEdito:showIfFull,allowSorting:null===(_query$allowSorting=query.allowSorting)||void 0===_query$allowSorting||_query$allowSorting,showOpenEditorButton:context?.showOpenEditorButton!==void 0?context.showOpenEditorButton:null===(_query$showOpenEditor=query.showOpenEditorButton)||void 0===_query$showOpenEditor||_query$showOpenEditor,showResultsTable:null===(_query$showResultsTab=query.showResultsTable)||void 0===_query$showResultsTab||_query$showResultsTab})}}],canSort:[s=>[s.queryWithDefaults,s.sourceFeatures],(query,sourceFeatures)=>sourceFeatures.has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_7__.P.selectAndOrderByColumns)&&!!query.allowSorting]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.propsChanged)((_ref3,oldProps)=>{let{actions,props}=_ref3,newColumns=(0,_utils__WEBPACK_IMPORTED_MODULE_11__.dm)(props.query),oldColumns=(0,_utils__WEBPACK_IMPORTED_MODULE_11__.dm)(oldProps.query);JSON.stringify(newColumns)!==JSON.stringify(oldColumns)&&actions.setColumnsInQuery(newColumns)})])},"./frontend/src/queries/nodes/DataTable/defaultEventsQuery.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JB:()=>HOGQL_COLUMNS_KEY,Rr:()=>getDefaultEventsQueryForTeam,v8:()=>getEventsQueriesForTeam});var scenes_activity_explore_defaults__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/scenes/activity/explore/defaults.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/utils.ts");let HOGQL_COLUMNS_KEY="--v2:hogql";function getDefaultEventsQueryForTeam(team){var columns;let liveColumns=team?.live_events_columns?(columns=team.live_events_columns).length>0&&columns[0]===HOGQL_COLUMNS_KEY?columns.slice(1):["*",...columns.map(column=>"event"===column||"person"===column?column:"url"===column?"coalesce(properties.$current_url, properties.$screen_name) -- Url / Screen":"source"===column?"properties.$lib":`properties.${(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.AU)(String(column))}`),"timestamp"]:null;return liveColumns?{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:liveColumns,after:"-24h",orderBy:liveColumns.includes("timestamp")?["timestamp DESC"]:[]}:null}function getEventsQueriesForTeam(team){let projectDefault=getDefaultEventsQueryForTeam(team);return{...projectDefault?{"Project default view":projectDefault}:{},"PostHog default view":(0,scenes_activity_explore_defaults__WEBPACK_IMPORTED_MODULE_0__.w)().source,"Event counts view":{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:["event","count()"],after:"-24h",orderBy:["count() DESC"]}}}},"./frontend/src/queries/nodes/DataTable/queryFeatures.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>QueryFeature,r:()=>getQueryFeatures});var _queries_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/queries/utils.ts");let QueryFeature=function(QueryFeature){return QueryFeature[QueryFeature.columnsInResponse=0]="columnsInResponse",QueryFeature[QueryFeature.eventActionsColumn=1]="eventActionsColumn",QueryFeature[QueryFeature.dateRangePicker=2]="dateRangePicker",QueryFeature[QueryFeature.eventNameFilter=3]="eventNameFilter",QueryFeature[QueryFeature.eventPropertyFilters=4]="eventPropertyFilters",QueryFeature[QueryFeature.personPropertyFilters=5]="personPropertyFilters",QueryFeature[QueryFeature.personsSearch=6]="personsSearch",QueryFeature[QueryFeature.savedEventsQueries=7]="savedEventsQueries",QueryFeature[QueryFeature.columnConfigurator=8]="columnConfigurator",QueryFeature[QueryFeature.resultIsArrayOfArrays=9]="resultIsArrayOfArrays",QueryFeature[QueryFeature.selectAndOrderByColumns=10]="selectAndOrderByColumns",QueryFeature[QueryFeature.displayResponseError=11]="displayResponseError",QueryFeature[QueryFeature.hideLoadNextButton=12]="hideLoadNextButton",QueryFeature[QueryFeature.testAccountFilters=13]="testAccountFilters",QueryFeature}({});function getQueryFeatures(query){let features=new Set;return((0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.Vf)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.rz)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.Sy)(query))&&(features.add(QueryFeature.dateRangePicker),features.add(QueryFeature.columnsInResponse),features.add(QueryFeature.eventPropertyFilters),features.add(QueryFeature.resultIsArrayOfArrays),features.add(QueryFeature.displayResponseError),features.add(QueryFeature.testAccountFilters)),(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.rz)(query)&&(features.add(QueryFeature.eventActionsColumn),features.add(QueryFeature.eventNameFilter),features.add(QueryFeature.savedEventsQueries),features.add(QueryFeature.columnConfigurator),features.add(QueryFeature.selectAndOrderByColumns)),((0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.cK)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.NS)(query))&&(features.add(QueryFeature.personPropertyFilters),features.add(QueryFeature.personsSearch),(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.NS)(query)&&(features.add(QueryFeature.selectAndOrderByColumns),features.add(QueryFeature.columnsInResponse),features.add(QueryFeature.resultIsArrayOfArrays))),((0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.vD)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__._x)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.Ku)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_0__.yL)(query))&&(features.add(QueryFeature.columnsInResponse),features.add(QueryFeature.resultIsArrayOfArrays),features.add(QueryFeature.hideLoadNextButton)),features}},"./frontend/src/queries/nodes/DataTable/renderColumn.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>renderColumn});var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),CopyToClipboard=__webpack_require__("./frontend/src/lib/components/CopyToClipboard.tsx"),JSONViewer=__webpack_require__("./frontend/src/lib/components/JSONViewer.tsx"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Property(_ref){let valueString,valueComponent,{value}=_ref;return"object"==typeof value?valueString=valueComponent=JSON.stringify(value):(0,utils.Bm)(value)?(valueString=value,valueComponent=(0,jsx_runtime.jsx)(src.rU,{to:valueString,target:"_blank",children:value})):valueString=valueComponent=String(value),(0,jsx_runtime.jsx)("span",{title:valueString,children:valueComponent})}var PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TZLabel=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),GroupActorDisplay=__webpack_require__("./frontend/src/scenes/persons/GroupActorDisplay.tsx"),PersonDisplay=__webpack_require__("./frontend/src/scenes/persons/PersonDisplay.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),dataTableLogic=__webpack_require__("./frontend/src/queries/nodes/DataTable/dataTableLogic.ts"),render=__webpack_require__("./frontend/src/queries/nodes/HogQLX/render.tsx"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),personDeleteModalLogic=__webpack_require__("./frontend/src/scenes/persons/personDeleteModalLogic.tsx"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts");function DeletePersonButton(_ref){let{person}=_ref,{showPersonDeleteModal}=(0,index_esm.useActions)(personDeleteModalLogic.C),{loadData}=(0,index_esm.useActions)(dataNodeLogic.M);return(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>showPersonDeleteModal(person,()=>loadData()),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),status:"danger",size:"small","data-attr":"delete-person"})}var queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),src_types=__webpack_require__("./frontend/src/types.ts");function renderColumn(key,value,record,recordIndex,query,setQuery,context){let queryContextColumnName=key.startsWith("context.columns.")?(0,queries_utils.go)(key.substring(16)):void 0,queryContextColumn=queryContextColumnName?context?.columns?.[queryContextColumnName]:void 0;if(value===dataTableLogic.uB)return(0,jsx_runtime.jsx)(Spinner.$,{});if(value===dataTableLogic.cl)return(0,jsx_runtime.jsx)(LemonTag.o,{className:"text-danger",children:"Error"});if(queryContextColumnName&&queryContextColumn?.render){let Component=queryContextColumn?.render;return(0,jsx_runtime.jsx)(Component,{record:record,columnName:queryContextColumnName,value:value,query:query,recordIndex:recordIndex})}if(context?.columns?.[key]&&context?.columns?.[key].render){let Component=context?.columns?.[key]?.render;return Component?(0,jsx_runtime.jsx)(Component,{record:record,columnName:key,value:value,query:query,recordIndex:recordIndex}):String(value)}if("object"==typeof value&&Array.isArray(value)&&"__hx_tag"===value[0])return(0,render.E)(value);if(null===value)return(0,jsx_runtime.jsx)(Tooltip.u,{title:"NULL",placement:"right",delayMs:0,children:(0,jsx_runtime.jsx)("span",{className:"cursor-default","aria-hidden":!0,children:"—"})});if((0,queries_utils.Vf)(query.source)){if("string"==typeof value){try{if(value.startsWith("{")&&value.endsWith("}"))return(0,jsx_runtime.jsx)(JSONViewer.C,{src:JSON.parse(value),name:key,collapsed:Object.keys(JSON.stringify(value)).length>10?0:1});if(value.startsWith("[")&&value.endsWith("]"))return(0,jsx_runtime.jsx)(JSONViewer.C,{src:JSON.parse(value),name:key,collapsed:JSON.stringify(value).length>10?0:1})}catch(e){}if(value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3,6})?(?:Z|[+-]\d{2}:\d{2})?$/))return(0,jsx_runtime.jsx)(TZLabel.w,{time:value,showSeconds:!0})}return"object"==typeof value?Array.isArray(value)?(0,jsx_runtime.jsx)(JSONViewer.C,{src:value,name:key,collapsed:value.length>10?0:1}):(0,jsx_runtime.jsx)(JSONViewer.C,{src:value,name:key,collapsed:Object.keys(value).length>10?0:1}):(0,jsx_runtime.jsx)(Property,{value:value})}else if("event"===key&&(0,queries_utils.rz)(query.source)){let eventRecord=query.source.select.includes("*")?record[query.source.select.indexOf("*")]:null;if("$autocapture"===value&&eventRecord)return(0,utils.Sh)(eventRecord);let content=(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{value:value,type:types.t.Events}),$sentry_url=eventRecord?.properties?.$sentry_url;return $sentry_url?(0,jsx_runtime.jsx)(Link.r,{to:$sentry_url,target:"_blank",children:content}):content}else if("timestamp"===key||"created_at"===key||"session_start"===key||"session_end"===key)return(0,jsx_runtime.jsx)(TZLabel.w,{time:value,showSeconds:!0});else if(!Array.isArray(record)&&key.startsWith("properties.")){let propertyKey=(0,queries_utils.go)(key.substring(11));if(setQuery&&((0,queries_utils.rz)(query.source)||(0,queries_utils.cK)(query.source))&&query.showPropertyFilter){let newProperty={key:propertyKey,value:record.properties[propertyKey],operator:src_types.WV.Exact,type:(0,queries_utils.cK)(query.source)?src_types.FT.Person:src_types.FT.Event},matchingProperty=(query.source.properties||[]).find(p=>p.key===newProperty.key&&p.type===newProperty.type),newProperties=matchingProperty?(query.source.properties||[]).filter(p=>p!==matchingProperty):[...query.source.properties||[],newProperty],newUrl=query.propertiesViaUrl?(0,lib.combineUrl)(lib.router.values.location.pathname,{...lib.router.values.searchParams,properties:newProperties},lib.router.values.hashParams).url:"#";return(0,jsx_runtime.jsx)(Link.r,{className:"ph-no-capture",to:newUrl,onClick:e=>{e.preventDefault(),setQuery({...query,source:{...query.source,properties:newProperties}})},children:(0,jsx_runtime.jsx)(Property,{value:record.properties[propertyKey]})})}return(0,jsx_runtime.jsx)(Property,{value:record.properties[propertyKey]})}else if(!Array.isArray(record)&&key.startsWith("person.properties.")){let propertyKey=(0,queries_utils.go)(key.substring(18));if(setQuery&&(0,queries_utils.rz)(query.source)){let newProperty={key:propertyKey,value:record.person?.properties[propertyKey],operator:src_types.WV.Exact,type:src_types.FT.Person},matchingProperty=(query.source.properties||[]).find(p=>p.key===newProperty.key&&p.type===newProperty.type),newProperties=matchingProperty?(query.source.properties||[]).filter(p=>p!==matchingProperty):[...query.source.properties||[],newProperty],newUrl=query.propertiesViaUrl?(0,lib.combineUrl)(lib.router.values.location.pathname,{...lib.router.values.searchParams,properties:newProperties},lib.router.values.hashParams).url:"#";return(0,jsx_runtime.jsx)(Link.r,{className:"ph-no-capture",to:newUrl,onClick:e=>{e.preventDefault(),setQuery({...query,source:{...query.source,properties:newProperties}})},children:(0,jsx_runtime.jsx)(Property,{value:record.person?.properties?.[propertyKey]})})}return(0,jsx_runtime.jsx)(Property,{value:record.person?.properties?.[propertyKey]})}else if("person"===key){let displayProps={withIcon:!0,person:record,noPopover:!0};return(0,queries_utils.rz)(query.source)&&(displayProps.person=(value.distinct_id,value),displayProps.noPopover=!1),(0,queries_utils.cK)(query.source)&&record.distinct_ids&&(displayProps.href=urls.j.personByDistinctId(record.distinct_ids[0])),(0,queries_utils.NS)(query.source)&&value&&(displayProps.person=value,displayProps.href=value.distinct_ids?.[0]?urls.j.personByDistinctId(value.distinct_ids[0]):urls.j.personByUUID(value.id)),(0,jsx_runtime.jsx)(PersonDisplay.I,{...displayProps})}else if("group"===key&&"object"==typeof value)return(0,jsx_runtime.jsx)(GroupActorDisplay.k,{actor:value});else if("person.$delete"===key&&((0,queries_utils.cK)(query.source)||(0,queries_utils.NS)(query.source))){if(!Array.isArray(record))return console.error("Expected record to be an array for person.$delete column"),"";let personRecord=record[0];return(0,jsx_runtime.jsx)(DeletePersonButton,{person:personRecord})}else if(key.startsWith("context.columns.")){let columnName=(0,queries_utils.go)(key.substring(16)),Component=context?.columns?.[columnName]?.render;return Component?(0,jsx_runtime.jsx)(Component,{record:record,columnName:columnName,value:value,query:query,recordIndex:recordIndex}):String(value)}else if("id"===key&&((0,queries_utils.cK)(query.source)||(0,queries_utils.NS)(query.source)))return(0,jsx_runtime.jsx)(CopyToClipboard.D,{explicitValue:String(value),iconStyle:{color:"var(--primary)"},description:"person id",children:String(value)});if("object"==typeof value)return(0,jsx_runtime.jsx)(JSONViewer.C,{src:value,name:null,collapsed:Object.keys(value).length>10?0:1});if("string"==typeof value&&(value.startsWith("{")&&value.endsWith("}")||value.startsWith("[")&&value.endsWith("]")))try{return(0,jsx_runtime.jsx)(JSONViewer.C,{src:JSON.parse(value),name:null,collapsed:Object.keys(value).length>10?0:1})}catch(e){}return String(value)}},"./frontend/src/queries/nodes/DataTable/renderColumnMeta.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>renderColumnMeta});var lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_lemon_ui_LemonTable_sorting__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/sorting.tsx"),_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function renderColumnMeta(key,query,context){var _ref;let width,title,align;let queryFeatures=(0,_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_3__.r)(query.source),queryContextColumnName=key.startsWith("context.columns.")?(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.go)(key.substring(16)):void 0,queryContextColumn=null!==(_ref=queryContextColumnName?context?.columns?.[queryContextColumnName]:void 0)&&void 0!==_ref?_ref:context?.columns?.[key];if(queryContextColumnName&&queryContextColumn&&(queryContextColumn.title||queryContextColumn.renderTitle)){let Component=queryContextColumn.renderTitle;title=Component?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Component,{columnName:queryContextColumnName,query:query}):queryContextColumn.title}else if((0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Vf)(query.source)){if((title=key).startsWith("`")&&title.endsWith("`")&&(title=title.substring(1,title.length-1)),title.startsWith("tuple('__hx_tag', '")){let tagName=title.substring(19,title.indexOf("'",19));title="__hx_obj"===tagName?"Object":"RecordingButton"===tagName?"Recording":"<"+tagName+" />"}}else"timestamp"===key?title="Time":"created_at"===key?title="First seen":"event"===key?title="Event":"person"===key?title="Person":key.startsWith("properties.")?title=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__.T,{value:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.go)(key.substring(11)),type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.EventProperties,disableIcon:!0}):"person.$delete"===key?(title="",width=0):title=key.startsWith("person.properties.")?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__.T,{value:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.go)(key.substring(18)),type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.PersonProperties,disableIcon:!0}):queryContextColumnName?queryContextColumnName.replace("_"," "):queryFeatures.has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_3__.P.selectAndOrderByColumns)?(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_4__.fU)(key):key;if(queryContextColumn?.align&&(align=queryContextColumn.align),queryContextColumn?.width?width=queryContextColumn.width:context?.columns?.[key]?.width&&(width=context.columns[key].width),queryContextColumnName&&queryContextColumn&&(queryContextColumn.title||queryContextColumn.renderTitle)){let Component=queryContextColumn.renderTitle;title=Component?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Component,{columnName:queryContextColumnName,query:query}):queryContextColumn.title}else if(context?.columns?.[key]?.title||context?.columns?.[key]?.renderTitle){let Component=context?.columns?.[key]?.renderTitle;title=Component?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Component,{columnName:key,query:query}):context?.columns?.[key]?.title}if(queryFeatures.has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_3__.P.selectAndOrderByColumns)&&(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.TC)(query)&&!query.allowSorting){let sortKey=queryFeatures.has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_3__.P.selectAndOrderByColumns)?query.source?.orderBy?.[0]:null,sortOrder=key===sortKey?1:`-${key}`===sortKey?-1:void 0;sortOrder&&(title=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[title,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonTable_sorting__WEBPACK_IMPORTED_MODULE_2__.a,{order:sortOrder})]}))}return{title,...void 0!==width?{width}:{},...align?{align}:{}}}},"./frontend/src/queries/nodes/DataTable/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$p:()=>removeExpressionComment,DP:()=>getDataNodeDefaultColumns,Qi:()=>defaultDataTableColumns,dm:()=>getColumnsForQuery,fU:()=>extractExpressionComment});var _queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts");let defaultDataTableEventColumns=["*","event","person","coalesce(properties.$current_url, properties.$screen_name) -- Url / Screen","properties.$lib","timestamp"],defaultDataTablePersonColumns=["person","id","created_at","person.$delete"];function defaultDataTableColumns(kind){return kind===_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PersonsNode||kind===_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.ActorsQuery?defaultDataTablePersonColumns:kind===_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery?defaultDataTableEventColumns:kind===_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsNode?defaultDataTableEventColumns.filter(c=>"*"!==c):[]}function getDataNodeDefaultColumns(source){return(0,_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_0__.r)(source).has(_queries_nodes_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_0__.P.selectAndOrderByColumns)&&Array.isArray(source.select)&&source.select.length>0?source.select:defaultDataTableColumns(source.kind)}function getColumnsForQuery(query){var _query$columns;return null!==(_query$columns=query.columns)&&void 0!==_query$columns?_query$columns:getDataNodeDefaultColumns(query.source)}function extractExpressionComment(query){return query.includes("--")&&query.split("--").pop()?.trim()||query}function removeExpressionComment(query){return query.includes("--")?query.split("--").slice(0,-1).join("--").trim():query.trim()}},"./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>Charts_LineGraph_LineGraph}),__webpack_require__("./node_modules/.pnpm/chartjs-adapter-dayjs-3@1.2.3_chart.js@4.4.3_dayjs@1.11.11/node_modules/chartjs-adapter-dayjs-3/dist/chartjs-adapter-dayjs-3.esm.js");var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),LineGraph=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.scss"),LineGraph_default=__webpack_require__.n(LineGraph),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(LineGraph_default(),options),LineGraph_default().locals,__webpack_require__("./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.scss");var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),chartjs_plugin_annotation_esm=__webpack_require__("./node_modules/.pnpm/chartjs-plugin-annotation@2.2.1_chart.js@4.4.3/node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.esm.js"),chartjs_plugin_datalabels_esm=__webpack_require__("./node_modules/.pnpm/chartjs-plugin-datalabels@2.2.0_chart.js@4.4.3/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js"),build=__webpack_require__("./node_modules/.pnpm/chartjs-plugin-stacked100@1.4.0_chart.js@4.4.3/node_modules/chartjs-plugin-stacked100/build/index.js"),build_default=__webpack_require__.n(build),chartjs_plugin_trendline=__webpack_require__("./node_modules/.pnpm/chartjs-plugin-trendline@2.1.2/node_modules/chartjs-plugin-trendline/src/chartjs-plugin-trendline.js"),chartjs_plugin_trendline_default=__webpack_require__.n(chartjs_plugin_trendline),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),Chart=__webpack_require__("./frontend/src/lib/Chart.ts"),lib_colors=__webpack_require__("./frontend/src/lib/colors.ts"),InsightLabel=__webpack_require__("./frontend/src/lib/components/InsightLabel/index.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),LineGraph_LineGraph=__webpack_require__("./frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),types=__webpack_require__("./frontend/src/types.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts"),seriesBreakdownLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/seriesBreakdownLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");Chart.k.register(chartjs_plugin_annotation_esm.Z),Chart.k.register(build_default()),Chart.k.register(chartjs_plugin_trendline_default());let getGraphType=(chartType,settings)=>settings&&settings.display&&settings.display.displayType&&settings.display?.displayType!=="auto"?settings.display?.displayType==="bar"?types.KU.Bar:types.KU.Line:chartType===types.Qb.ActionsBar||chartType===types.Qb.ActionsStackedBar?types.KU.Bar:types.KU.Line,getYAxisSettings=(chartSettings,settings,stacked,position,tickOptions,gridOptions)=>{var _ref,_settings$startAtZero;return settings?.scale==="logarithmic"?{display:!0,stacked:stacked,type:"logarithmic",grid:gridOptions,position}:{display:!0,beginAtZero:null===(_ref=null!==(_settings$startAtZero=settings?.startAtZero)&&void 0!==_settings$startAtZero?_settings$startAtZero:chartSettings.yAxisAtZero)||void 0===_ref||_ref,stacked:stacked,type:"linear",ticks:{display:!0,...tickOptions,precision:1},grid:gridOptions,position}},Charts_LineGraph_LineGraph=()=>{let canvasRef=(0,react.useRef)(null),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),colors=(0,lib_colors.lw)(isDarkModeOn),{xData,yData,presetChartHeight,visualizationType,showEditingUI,chartSettings,dataVisualizationProps}=(0,index_esm.useValues)(dataVisualizationLogic.H8),isBarChart=visualizationType===types.Qb.ActionsBar||visualizationType===types.Qb.ActionsStackedBar,isStackedBarChart=visualizationType===types.Qb.ActionsStackedBar,isAreaChart=visualizationType===types.Qb.ActionsAreaGraph,{seriesBreakdownData}=(0,index_esm.useValues)((0,seriesBreakdownLogic.h)({key:dataVisualizationProps.key})),{goalLines}=(0,index_esm.useValues)(displayLogic.Y);return(0,react.useEffect)(()=>{var _colors$crosshair;let ySeriesData,xSeriesData;let hasRightYAxis=!1,hasLeftYAxis=!1;if(seriesBreakdownData.xData.data.length&&seriesBreakdownData.seriesData.length)ySeriesData=seriesBreakdownData.seriesData,xSeriesData=seriesBreakdownData.xData,hasLeftYAxis=!(hasRightYAxis=!!ySeriesData.find(n=>n.settings?.display?.yAxisPosition==="right"))||!!ySeriesData.find(n=>n.settings?.display?.yAxisPosition==="left");else{if(!xData||!yData)return;ySeriesData=yData,xSeriesData=xData,hasLeftYAxis=!(hasRightYAxis=!!ySeriesData.find(n=>n.settings?.display?.yAxisPosition==="right"))||!!ySeriesData.find(n=>n.settings?.display?.yAxisPosition==="left")}let data={labels:xSeriesData.data,datasets:ySeriesData.map((_ref2,index)=>{var _settings$display$col;let{data,settings}=_ref2,color=null!==(_settings$display$col=settings?.display?.color)&&void 0!==_settings$display$col?_settings$display$col:(0,lib_colors._r)(index),backgroundColor=isAreaChart?(0,utils.E9)(color,.5):color,graphType=getGraphType(visualizationType,settings);return{data,borderColor:color,backgroundColor:backgroundColor,borderWidth:graphType===types.KU.Bar?0:2,pointRadius:0,hitRadius:0,order:1,hoverBorderWidth:graphType===types.KU.Bar?0:2,hoverBorderRadius:graphType===types.KU.Bar?0:2,type:graphType,fill:!!isAreaChart&&"origin",yAxisID:settings?.display?.yAxisPosition==="right"?"yRight":"yLeft",...settings?.display?.trendLine?{trendlineLinear:{colorMin:(0,utils.E9)(color,.6),colorMax:(0,utils.E9)(color,.6),lineStyle:"dotted",width:3}}:{}}})},annotations=goalLines.reduce((acc,cur,curIndex)=>{let line={label:{display:!0,content:cur.label,position:"end"},scaleID:hasLeftYAxis?"yLeft":"yRight",value:cur.value};return acc.annotations[`line${curIndex}`]={type:"line",...line},acc},{annotations:{}}),tickOptions={color:colors.axisLabel,font:{family:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',size:12,weight:"normal"}},gridOptions={color:colors.axisLine,tickColor:colors.axisLine,tickBorderDash:[4,2]},options={responsive:!0,maintainAspectRatio:!1,elements:{line:{tension:0}},plugins:{stacked100:{enable:isStackedBarChart&&chartSettings.stackBars100,precision:1},datalabels:{color:"white",anchor:context=>{let datum=context.dataset.data[context.dataIndex];return"number"!=typeof datum?"end":datum>0?"end":"start"},backgroundColor:context=>context.dataset.borderColor||"black",display:()=>!1,formatter:()=>{},borderWidth:2,borderRadius:4,borderColor:"white"},legend:{display:!1},annotation:annotations,...isBarChart?{crosshair:!1}:{crosshair:{snap:{enabled:!0},sync:{enabled:!1},zoom:{enabled:!1},line:{color:null!==(_colors$crosshair=colors.crosshair)&&void 0!==_colors$crosshair?_colors$crosshair:void 0,width:1}}},tooltip:{enabled:!1,mode:"index",intersect:!1,external(_ref3){let{tooltip}=_ref3;if(!canvasRef.current)return;let[tooltipRoot,tooltipEl]=(0,LineGraph_LineGraph.LS)();if(0===tooltip.opacity){tooltipEl.style.opacity="0";return}if(tooltipEl.classList.remove("above","below","no-transform"),tooltipEl.classList.add(tooltip.yAlign||"no-transform"),tooltipEl.style.opacity="1",tooltip.body){let referenceDataPoint=tooltip.dataPoints[0];tooltipRoot.render((0,jsx_runtime.jsx)("div",{className:"InsightTooltip",children:(0,jsx_runtime.jsx)(src.g3,{dataSource:ySeriesData.map(series=>{let seriesName=series?.settings?.display?.label||("column"in series?series.column.name:series.name);return{series:seriesName,data:(0,dataVisualizationLogic.FB)(series.data[referenceDataPoint.dataIndex],series.settings),rawData:series.data[referenceDataPoint.dataIndex],dataIndex:referenceDataPoint.dataIndex}}),columns:[{title:xSeriesData.data[referenceDataPoint.dataIndex],dataIndex:"series",render:value=>(0,jsx_runtime.jsx)("div",{className:"datum-label-column",children:(0,jsx_runtime.jsx)(InsightLabel.q,{fallbackName:value?.toString(),hideBreakdown:!0,showSingleName:!0,hideCompare:!0,hideIcon:!0,allowWrap:!0})})},{title:"",dataIndex:"data",render:(value,record)=>{if(isStackedBarChart&&chartSettings.stackBars100){let total=ySeriesData.map(n=>n.data[record.dataIndex]).reduce((acc,cur)=>acc+cur,0),percentageLabel=parseFloat((record.rawData/total*100).toFixed(1));return(0,jsx_runtime.jsxs)("div",{className:"series-data-cell",children:[value," (",percentageLabel,"%)"]})}return(0,jsx_runtime.jsx)("div",{className:"series-data-cell",children:value})}}],uppercaseHeader:!1,rowRibbonColor:(_datum,index)=>{var _ySeriesData$index$se;return null!==(_ySeriesData$index$se=ySeriesData[index]?.settings?.display?.color)&&void 0!==_ySeriesData$index$se?_ySeriesData$index$se:(0,lib_colors._r)(index)},showHeader:!0})}))}let bounds=canvasRef.current.getBoundingClientRect(),tooltipClientTop=bounds.top+window.pageYOffset+0,chartClientLeft=bounds.left+window.pageXOffset,defaultOffsetLeft=Math.max(chartClientLeft,chartClientLeft+tooltip.caretX+8),maxXPosition=bounds.right-tooltipEl.clientWidth,tooltipClientLeft=defaultOffsetLeft>maxXPosition?chartClientLeft+tooltip.caretX-tooltipEl.clientWidth-8:defaultOffsetLeft;tooltipEl.style.top=tooltipClientTop+"px",tooltipEl.style.left=tooltipClientLeft+"px"}}},hover:{mode:isBarChart?"point":"nearest",axis:"x",intersect:!1},scales:{x:{display:!0,beginAtZero:!0,stacked:isStackedBarChart,ticks:tickOptions,grid:{...gridOptions,drawOnChartArea:!1,tickLength:12}},...hasLeftYAxis?{yLeft:getYAxisSettings(chartSettings,chartSettings.leftYAxisSettings,isAreaChart||isStackedBarChart,"left",tickOptions,gridOptions)}:{},...hasRightYAxis?{yRight:getYAxisSettings(chartSettings,chartSettings.rightYAxisSettings,isAreaChart||isStackedBarChart,"right",tickOptions,gridOptions)}:{}}},newChart=new Chart.k(canvasRef.current?.getContext("2d"),{type:isBarChart?types.KU.Bar:types.KU.Line,data,options,plugins:[chartjs_plugin_datalabels_esm.Z]});return()=>newChart.destroy()},[xData,yData,seriesBreakdownData,visualizationType,goalLines,chartSettings]),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("rounded bg-bg-light relative flex flex-1 flex-col p-2",{DataVisualization__LineGraph:presetChartHeight,"h-full":!presetChartHeight,border:showEditingUI}),children:(0,jsx_runtime.jsx)("div",{className:"flex flex-1 w-full h-full overflow-hidden",children:(0,jsx_runtime.jsx)("canvas",{ref:canvasRef})})})}},"./frontend/src/queries/nodes/DataVisualization/Components/SideBar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>SideBar_SideBar});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),SideBar=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/SideBar.scss"),SideBar_default=__webpack_require__.n(SideBar),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(SideBar_default(),options),SideBar_default().locals;var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),types=__webpack_require__("./frontend/src/types.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),ConditionalFormattingTab=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/ConditionalFormatting/ConditionalFormattingTab.scss"),ConditionalFormattingTab_default=__webpack_require__.n(ConditionalFormattingTab),ConditionalFormattingTab_options={};ConditionalFormattingTab_options.insert="head",ConditionalFormattingTab_options.singleton=!1,injectStylesIntoStyleTag_default()(ConditionalFormattingTab_default(),ConditionalFormattingTab_options),ConditionalFormattingTab_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),SeriesGlyph=__webpack_require__("./frontend/src/lib/components/SeriesGlyph.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),es=__webpack_require__("./node_modules/.pnpm/react-color@2.19.3_react@18.2.0/node_modules/react-color/es/index.js"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let DEFAULT_PICKER_COLORS=["#FFADAD","#E8A598","#FFD6A5","#FFCFD2","#FDFFB6","#C1FBA4","#9BF6FF","#A0C4FF","#BDB2FF","#FFC6FF"],ColorPickerButton=_ref=>{let{color,onColorSelect:propOnColorSelect,colorChoices=DEFAULT_PICKER_COLORS}=_ref,[pickerOpen,setPickerOpen]=(0,react.useState)(!1),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),colors=isDarkModeOn?colorChoices.map(n=>(0,utils.fc)((0,utils._$)(n,-30))):colorChoices;return(0,jsx_runtime.jsx)(src.J2,{visible:pickerOpen,overlay:(0,jsx_runtime.jsx)(es.e8,{color:color,colors:colors,onChangeComplete:colorResult=>{propOnColorSelect&&propOnColorSelect(colorResult.hex),colorChoices.includes(colorResult.hex)&&setPickerOpen(!1)}}),onClickOutside:()=>setPickerOpen(!1),padded:!1,children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setPickerOpen(!pickerOpen),sideIcon:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),className:"ConditionalFormattingTab__ColorPicker",children:(0,jsx_runtime.jsx)(SeriesGlyph.KA,{color:color})})})};var DataVisualization_types=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/types.ts"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions_lib=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let conditionalFormattingLogic=(0,index_esm.kea)([(0,index_esm.key)(props=>props.rule.id),(0,index_esm.path)(["queries","nodes","DataVisualization","Components","conditionalFormattingLogic"]),(0,index_esm.props)({rule:{id:""},key:""}),(0,index_esm.connect)({actions:[dataVisualizationLogic.H8,["updateConditionalFormattingRule"]]}),(0,index_esm.actions)({selectColumn:columnName=>({columnName}),updateInput:input=>({input}),selectTemplate:templateId=>({templateId}),updateBytecode:bytecode=>({bytecode}),selectColor:color=>({color}),deleteRule:!0}),(0,index_esm.reducers)(_ref=>{let{props}=_ref;return{rule:[props.rule,{selectColumn:(state,_ref2)=>{let{columnName}=_ref2;return{...state,columnName}},updateInput:(state,_ref3)=>{let{input}=_ref3;return{...state,input}},selectTemplate:(state,_ref4)=>{let{templateId}=_ref4;return{...state,templateId}},updateBytecode:(state,_ref5)=>{let{bytecode}=_ref5;return{...state,bytecode}},selectColor:(state,_ref6)=>{let{color}=_ref6;return{...state,color}}}]}}),(0,index_esm.selectors)({template:[s=>[s.rule],rule=>{let template=DataVisualization_types.p.find(n=>n.id===rule.templateId);return template||DataVisualization_types.p[0]}]}),(0,lib.loaders)({hog:[null,{compileHog:async _ref7=>{let{hog}=_ref7,res=await api.ZP.hog.create(hog);return res.bytecode}}]}),(0,index_esm.listeners)(_ref8=>{let{actions,values}=_ref8;return{compileHogSuccess:_ref9=>{let{hog}=_ref9;actions.updateBytecode(hog)},deleteRule:()=>{actions.updateConditionalFormattingRule(values.rule,!0)}}}),(0,kea_subscriptions_lib.Vt)(_ref10=>{let{actions}=_ref10;return{template:(template,oldTemplate)=>{actions.compileHog({hog:template.hog}),!oldTemplate?.hideInput&&template.hideInput&&actions.updateInput("")},rule:rule=>{actions.updateConditionalFormattingRule(rule)}}})]),getRuleHeader=rule=>{if(!rule.columnName||!rule.input)return"New rule";let template=DataVisualization_types.p.find(n=>n.id===rule.templateId);return template?template.hideInput?`${rule.columnName} ${template.label.toLowerCase()}`:`${rule.columnName} ${template.label.toLowerCase()} ${rule.input}`:"New rule"},RuleItem=_ref=>{let{rule:propsRule}=_ref,{columns,responseLoading,dataVisualizationProps}=(0,index_esm.useValues)(dataVisualizationLogic.H8),builtCFLogic=conditionalFormattingLogic({key:dataVisualizationProps.key,rule:propsRule}),{selectColumn,updateInput,selectTemplate,selectColor,deleteRule}=(0,index_esm.useActions)(builtCFLogic),{rule,template}=(0,index_esm.useValues)(builtCFLogic);return(0,jsx_runtime.jsxs)("div",{className:"gap-2 flex flex-col",children:[(0,jsx_runtime.jsx)(src.Yv,{placeholder:"Column",className:"w-full",value:rule.columnName||null,options:columns.map(_ref2=>{let{name,type}=_ref2;return{value:name,label:(0,jsx_runtime.jsxs)("div",{className:"items-center flex-1",children:[name,(0,jsx_runtime.jsx)(src.oe,{className:"ml-2",type:"default",children:type.name})]})}}),disabledReason:responseLoading?"Query loading...":void 0,onChange:value=>{let column=columns.find(n=>n.name===value);column&&selectColumn(column.name)}}),(0,jsx_runtime.jsx)(src.Yv,{className:"w-full",options:DataVisualization_types.p.filter(n=>{let column=columns.find(n=>n.name===rule.columnName);return!column||n.availableColumnTypes.includes(column.type.name)}).map(_ref3=>{let{id,label}=_ref3;return{label,value:id}}),value:rule.templateId,onSelect:value=>selectTemplate(value)}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-1",children:[(0,jsx_runtime.jsx)(ColorPickerButton,{color:rule.color,onColorSelect:selectColor}),(0,jsx_runtime.jsx)(src.DF,{placeholder:"value",className:"ml-2 flex-1",onChange:value=>updateInput(value),value:rule.input,disabled:template.hideInput}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),status:"danger",title:"Delete rule",className:"ml-1",noPadding:!0,tooltip:"Delete formatting rule",onClick:()=>deleteRule()})]})]})};var LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),displayLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/displayLogic.ts"),kea_forms_lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),colors=__webpack_require__("./frontend/src/lib/colors.ts"),seriesBreakdownLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/seriesBreakdownLogic.ts");let YSeriesSettingsTab=function(YSeriesSettingsTab){return YSeriesSettingsTab.Formatting="formatting",YSeriesSettingsTab.Display="display",YSeriesSettingsTab}({}),ySeriesLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","nodes","DataVisualization","Components","ySeriesLogic"]),(0,index_esm.key)(props=>{var _props$series$column$,_props$seriesIndex;return`${null!==(_props$series$column$=props.series?.column?.name)&&void 0!==_props$series$column$?_props$series$column$:"new"}-${null!==(_props$seriesIndex=props.seriesIndex)&&void 0!==_props$seriesIndex?_props$seriesIndex:0}`}),(0,index_esm.connect)(props=>({actions:[(0,dataVisualizationLogic.H8)(props.dataVisualizationProps),["updateSeriesIndex"]]})),(0,index_esm.props)({series:dataVisualizationLogic.pf}),(0,index_esm.actions)({setSettingsOpen:open1=>({open:open1}),setSettingsTab:tab=>({tab})}),(0,index_esm.reducers)({isSettingsOpen:[!1,{setSettingsOpen:(_,_ref)=>{let{open:open1}=_ref;return open1}}],activeSettingsTab:[YSeriesSettingsTab.Formatting,{setSettingsTab:(_state,_ref2)=>{let{tab}=_ref2;return tab}}]}),(0,index_esm.selectors)({canOpenSettings:[(_s,p)=>[p.series],series=>series!==dataVisualizationLogic.pf]}),(0,kea_forms_lib.forms)(_ref3=>{var _props$series$setting,_props$series$setting2,_props$series$setting3,_props$series$setting4,_props$series$setting5,_props$series$setting6,_props$series$setting7,_props$series$setting8;let{actions,props}=_ref3;return{formatting:{defaults:{prefix:null!==(_props$series$setting=props.series?.settings?.formatting?.prefix)&&void 0!==_props$series$setting?_props$series$setting:"",suffix:null!==(_props$series$setting2=props.series?.settings?.formatting?.suffix)&&void 0!==_props$series$setting2?_props$series$setting2:"",style:null!==(_props$series$setting3=props.series?.settings?.formatting?.style)&&void 0!==_props$series$setting3?_props$series$setting3:"none",decimalPlaces:props.series?.settings?.formatting?.decimalPlaces},submit:async format=>{actions.updateSeriesIndex(props.seriesIndex,props.series.column.name,{formatting:{prefix:format.prefix,suffix:format.suffix,style:format.style,decimalPlaces:Number.isNaN(format.decimalPlaces)?void 0:format.decimalPlaces}}),actions.setSettingsOpen(!1)}},display:{defaults:{color:null!==(_props$series$setting4=props.series?.settings?.display?.color)&&void 0!==_props$series$setting4?_props$series$setting4:(0,colors._r)(props.seriesIndex),label:null!==(_props$series$setting5=props.series?.settings?.display?.label)&&void 0!==_props$series$setting5?_props$series$setting5:"",trendLine:null!==(_props$series$setting6=props.series?.settings?.display?.trendLine)&&void 0!==_props$series$setting6&&_props$series$setting6,yAxisPosition:null!==(_props$series$setting7=props.series?.settings?.display?.yAxisPosition)&&void 0!==_props$series$setting7?_props$series$setting7:"left",displayType:null!==(_props$series$setting8=props.series?.settings?.display?.displayType)&&void 0!==_props$series$setting8?_props$series$setting8:"auto"},submit:async display=>{actions.updateSeriesIndex(props.seriesIndex,props.series.column.name,{display:{color:display.color,label:display.label,trendLine:display.trendLine,yAxisPosition:display.yAxisPosition,displayType:display.displayType}}),actions.setSettingsOpen(!1)}}}})]),YSeries=_ref2=>{var _series$settings$disp;let{series,index}=_ref2,{columns,numericalColumns,responseLoading,dataVisualizationProps,showTableSettings}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{updateSeriesIndex,deleteYSeries}=(0,index_esm.useActions)(dataVisualizationLogic.H8),{selectedSeriesBreakdownColumn}=(0,index_esm.useValues)((0,seriesBreakdownLogic.h)({key:dataVisualizationProps.key})),seriesLogicProps={series,seriesIndex:index,dataVisualizationProps},seriesLogic=ySeriesLogic(seriesLogicProps),{isSettingsOpen,canOpenSettings,activeSettingsTab}=(0,index_esm.useValues)(seriesLogic),{setSettingsOpen,submitFormatting,submitDisplay,setSettingsTab}=(0,index_esm.useActions)(seriesLogic),seriesColor=null!==(_series$settings$disp=series.settings?.display?.color)&&void 0!==_series$settings$disp?_series$settings$disp:(0,colors._r)(index),showSeriesColor=!showTableSettings&&!selectedSeriesBreakdownColumn,options=(showTableSettings?columns:numericalColumns).map(_ref3=>{let{name,type}=_ref3;return{value:name,label:(0,jsx_runtime.jsxs)("div",{className:"items-center flex flex-1",children:[showSeriesColor&&(0,jsx_runtime.jsx)(SeriesGlyph.KA,{className:"mr-2",color:seriesColor}),series.settings?.display?.label&&series.column.name===name?series.settings.display.label:name,(0,jsx_runtime.jsx)(src.oe,{className:"ml-2",type:"default",children:type.name})]})}});return(0,jsx_runtime.jsxs)("div",{className:"flex gap-1 mb-1",children:[(0,jsx_runtime.jsx)(src.Yv,{className:"grow flex-1 break-all",value:null!==series?series.column.name:"None",options:options,disabledReason:responseLoading?"Query loading...":void 0,onChange:value=>{let column=columns.find(n=>n.name===value);column&&updateSeriesIndex(index,column.name)}}),(0,jsx_runtime.jsx)(src.J2,{overlay:(0,jsx_runtime.jsx)("div",{className:"m-2",children:(0,jsx_runtime.jsx)(src.TP,{activeKey:activeSettingsTab,barClassName:"justify-around",onChange:tab=>setSettingsTab(tab),tabs:Object.values(Y_SERIES_SETTINGS_TABS).map((_ref4,index)=>{let{label,Component}=_ref4;return{label:label,key:Object.keys(Y_SERIES_SETTINGS_TABS)[index],content:(0,jsx_runtime.jsx)(Component,{ySeriesLogicProps:seriesLogicProps})}})})}),visible:isSettingsOpen,placement:"bottom",onClickOutside:()=>{submitFormatting(),submitDisplay()},children:(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),noPadding:!0,onClick:()=>setSettingsOpen(!0),disabledReason:!canOpenSettings&&"Select a column first"},"seriesSettings")}),!showTableSettings&&(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),status:"danger",title:"Delete Y-series",noPadding:!0,onClick:()=>deleteYSeries(index)},"delete")]})},Y_SERIES_SETTINGS_TABS={[YSeriesSettingsTab.Formatting]:{label:"Formatting",Component:_ref5=>{let{ySeriesLogicProps}=_ref5;return(0,jsx_runtime.jsxs)(kea_forms_lib.Form,{logic:ySeriesLogic,props:ySeriesLogicProps,formKey:"formatting",className:"space-y-4",children:[ySeriesLogicProps.series.column.type.isNumerical&&(0,jsx_runtime.jsx)(LemonField.D,{name:"style",label:"Style",className:"gap-1",children:(0,jsx_runtime.jsx)(src.Yv,{options:[{value:"none",label:"None"},{value:"number",label:"Number"},{value:"percent",label:"Percentage"}]})}),(0,jsx_runtime.jsx)(LemonField.D,{name:"prefix",label:"Prefix",children:(0,jsx_runtime.jsx)(src.DF,{placeholder:"$"})}),(0,jsx_runtime.jsx)(LemonField.D,{name:"suffix",label:"Suffix",children:(0,jsx_runtime.jsx)(src.DF,{placeholder:"USD"})}),ySeriesLogicProps.series.column.type.isNumerical&&(0,jsx_runtime.jsx)(LemonField.D,{name:"decimalPlaces",label:"Decimal places",children:(0,jsx_runtime.jsx)(src.DF,{type:"number",min:0})})]})}},[YSeriesSettingsTab.Display]:{label:"Display",Component:_ref6=>{let{ySeriesLogicProps}=_ref6,{showTableSettings,dataVisualizationProps}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{selectedSeriesBreakdownColumn}=(0,index_esm.useValues)((0,seriesBreakdownLogic.h)({key:dataVisualizationProps.key})),showColorPicker=!showTableSettings&&!selectedSeriesBreakdownColumn,showLabelInput=showTableSettings||!selectedSeriesBreakdownColumn;return(0,jsx_runtime.jsxs)(kea_forms_lib.Form,{logic:ySeriesLogic,props:ySeriesLogicProps,formKey:"display",className:"space-y-4",children:[(showColorPicker||showLabelInput)&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-3",children:[showColorPicker&&(0,jsx_runtime.jsx)(LemonField.D,{name:"color",label:"Color",children:_ref7=>{let{value,onChange}=_ref7;return(0,jsx_runtime.jsx)(ColorPickerButton,{color:value,onColorSelect:onChange,colorChoices:(0,colors.Qu)()})}}),showLabelInput&&(0,jsx_runtime.jsx)(LemonField.D,{name:"label",label:"Label",children:(0,jsx_runtime.jsx)(src.DF,{})})]}),!showTableSettings&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[!selectedSeriesBreakdownColumn&&(0,jsx_runtime.jsx)(LemonField.D,{name:"trendLine",label:"Trend line",children:_ref8=>{let{value,onChange}=_ref8;return(0,jsx_runtime.jsx)(src.f4,{checked:value,onChange:newValue=>onChange(newValue)})}}),(0,jsx_runtime.jsx)(LemonField.D,{name:"yAxisPosition",label:"Y-axis position",children:_ref9=>{let{value,onChange}=_ref9;return(0,jsx_runtime.jsx)(src.P4,{value:value,className:"w-full",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:newValue=>onChange(newValue)})}}),(0,jsx_runtime.jsx)(LemonField.D,{name:"displayType",label:"Display type",children:_ref10=>{let{value,onChange}=_ref10;return(0,jsx_runtime.jsx)(src.P4,{value:value,className:"w-full",options:[{label:"Auto",value:"auto"},{label:"Line",value:"line"},{label:"Bar",value:"bar"}],onChange:newValue=>onChange(newValue)})}})]})]})}}},SeriesBreakdownSelector=()=>{let{columns,responseLoading,selectedXAxis,dataVisualizationProps}=(0,index_esm.useValues)(dataVisualizationLogic.H8),breakdownLogic=(0,seriesBreakdownLogic.h)({key:dataVisualizationProps.key}),{selectedSeriesBreakdownColumn,seriesBreakdownData}=(0,index_esm.useValues)(breakdownLogic),{addSeriesBreakdown,deleteSeriesBreakdown}=(0,index_esm.useActions)(breakdownLogic),seriesBreakdownOptions=columns.map(_ref11=>{let{name,type}=_ref11;return{value:name,label:(0,jsx_runtime.jsxs)("div",{className:"items-center flex-1",children:[name,(0,jsx_runtime.jsx)(src.oe,{className:"ml-2",type:"default",children:type.name})]})}}).filter(column=>column.value!==selectedXAxis);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-1 my-1",children:[(0,jsx_runtime.jsx)(src.Yv,{className:"grow",value:null!==selectedSeriesBreakdownColumn?selectedSeriesBreakdownColumn:"None",options:seriesBreakdownOptions,disabledReason:responseLoading?"Query loading...":void 0,onChange:value=>{let column=columns.find(n=>n.name===value);column&&addSeriesBreakdown(column.name)}}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),status:"danger",title:"Delete series breakdown",noPadding:!0,onClick:()=>deleteSeriesBreakdown()},"delete")]}),(0,jsx_runtime.jsx)("div",{className:"ml-4 mt-2",children:seriesBreakdownData.error?(0,jsx_runtime.jsx)("div",{className:"text-danger font-bold mt-1",children:seriesBreakdownData.error}):seriesBreakdownData.seriesData.map((series,index)=>(0,jsx_runtime.jsx)(BreakdownSeries,{series:series,index:index},`${series.name}-${index}`))})]})},BreakdownSeries=_ref12=>{var _series$settings$disp2;let{series,index}=_ref12,seriesColor=null!==(_series$settings$disp2=series.settings?.display?.color)&&void 0!==_series$settings$disp2?_series$settings$disp2:(0,colors._r)(index);return(0,jsx_runtime.jsx)("div",{className:"flex gap-1 mb-2",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-2",children:[(0,jsx_runtime.jsx)(SeriesGlyph.KA,{color:seriesColor,className:"mr-2"}),(0,jsx_runtime.jsx)("span",{children:series.name?series.name:"[No value]"})]})})},TABS_TO_CONTENT={[dataVisualizationLogic.B8.Series]:{label:"Series",content:(0,jsx_runtime.jsx)(()=>{let{columns,numericalColumns,xData,yData,responseLoading,showTableSettings,tabularColumns,selectedXAxis,dataVisualizationProps}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{updateXSeries,addYSeries}=(0,index_esm.useActions)(dataVisualizationLogic.H8),breakdownLogic=(0,seriesBreakdownLogic.h)({key:dataVisualizationProps.key}),{showSeriesBreakdown}=(0,index_esm.useValues)(breakdownLogic),{addSeriesBreakdown}=(0,index_esm.useActions)(breakdownLogic),hideAddYSeries=yData.length>=numericalColumns.length,hideAddSeriesBreakdown=!(!showSeriesBreakdown&&selectedXAxis&&columns.length>yData.length);if(showTableSettings)return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full",children:[(0,jsx_runtime.jsx)(src.HQ,{children:"Columns"}),tabularColumns.map((series,index)=>(0,jsx_runtime.jsx)(YSeries,{series:series,index:index},`${series.column.name}-${index}`))]});let options=columns.map(_ref=>{let{name,type}=_ref;return{value:name,label:(0,jsx_runtime.jsxs)("div",{className:"items-center flex-1",children:[name,(0,jsx_runtime.jsx)(src.oe,{className:"ml-2",type:"default",children:type.name})]})}});return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full",children:[(0,jsx_runtime.jsx)(src.HQ,{className:"mb-1",children:"X-axis"}),(0,jsx_runtime.jsx)(src.Yv,{className:"w-full",value:null!==xData?xData.column.name:"None",options:options,disabledReason:responseLoading?"Query loading...":void 0,onChange:value=>{let column=columns.find(n=>n.name===value);column&&updateXSeries(column.name)}}),!hideAddSeriesBreakdown&&(0,jsx_runtime.jsx)(src.Jp,{className:"mt-1",type:"tertiary",onClick:()=>addSeriesBreakdown(null),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),fullWidth:!0,children:"Add series breakdown"}),showSeriesBreakdown&&(0,jsx_runtime.jsx)(SeriesBreakdownSelector,{}),(0,jsx_runtime.jsx)(src.HQ,{className:"mt-4 mb-1",children:"Y-axis"}),yData.map((series,index)=>(0,jsx_runtime.jsx)(YSeries,{series:series,index:index},`${series?.column.name}-${index}`)),!hideAddYSeries&&(0,jsx_runtime.jsx)(src.Jp,{className:"mt-1",type:"tertiary",onClick:()=>addYSeries(),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),fullWidth:!0,children:"Add Y-series"})]})},{}),shouldShow:()=>!0},[dataVisualizationLogic.B8.ConditionalFormatting]:{label:"Conditional formatting",content:(0,jsx_runtime.jsx)(()=>{let{conditionalFormattingRules,conditionalFormattingRulesPanelActiveKeys}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{addConditionalFormattingRule,setConditionalFormattingRulesPanelActiveKeys}=(0,index_esm.useActions)(dataVisualizationLogic.H8);return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full ConditionalFormattingTab",children:[(0,jsx_runtime.jsx)("p",{children:"You can add rules to make the cells in the table change color if they meet certain conditions."}),conditionalFormattingRules.length>0&&(0,jsx_runtime.jsx)(src.JL,{activeKeys:conditionalFormattingRulesPanelActiveKeys,onChange:activeKeys=>setConditionalFormattingRulesPanelActiveKeys(activeKeys),multiple:!0,className:"mb-2",size:"small",panels:conditionalFormattingRules.map(rule=>({key:rule.id,header:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SeriesGlyph.KA,{color:rule.color}),(0,jsx_runtime.jsx)("span",{className:"ml-2",children:getRuleHeader(rule)})]}),content:(0,jsx_runtime.jsx)(RuleItem,{rule:rule},rule.id)}))}),(0,jsx_runtime.jsx)(src.Jp,{className:"mt-1",onClick:()=>addConditionalFormattingRule(),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),fullWidth:!0,type:"secondary",children:"Add rule"})]})},{}),shouldShow:displayType=>displayType===types.Qb.ActionsTable},[dataVisualizationLogic.B8.Display]:{label:"Display",content:(0,jsx_runtime.jsx)(()=>{var _chartSettings$leftYA,_ref,_chartSettings$leftYA2,_chartSettings$rightY,_ref2,_chartSettings$rightY2,_chartSettings$stackB;let{visualizationType}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{goalLines,chartSettings}=(0,index_esm.useValues)(displayLogic.Y),{addGoalLine,updateGoalLine,removeGoalLine,updateChartSettings}=(0,index_esm.useActions)(displayLogic.Y),isStackedBarChart=visualizationType===types.Qb.ActionsStackedBar;return(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"mt-1 mb-2 flex flex-col",children:[(0,jsx_runtime.jsx)("h3",{children:"Left Y-axis"}),(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Scale",className:"gap-0 mb-3",children:(0,jsx_runtime.jsx)(src.Yv,{value:null!==(_chartSettings$leftYA=chartSettings.leftYAxisSettings?.scale)&&void 0!==_chartSettings$leftYA?_chartSettings$leftYA:"linear",options:[{value:"linear",label:"Linear"},{value:"logarithmic",label:"Logarithmic"}],onChange:value=>{updateChartSettings({leftYAxisSettings:{scale:value}})}})}),(0,jsx_runtime.jsx)(src.f4,{className:"flex-1 mb-3 w-full",label:"Begin Y-axis at zero",checked:null===(_ref=null!==(_chartSettings$leftYA2=chartSettings.leftYAxisSettings?.startAtZero)&&void 0!==_chartSettings$leftYA2?_chartSettings$leftYA2:chartSettings.yAxisAtZero)||void 0===_ref||_ref,onChange:value=>{updateChartSettings({leftYAxisSettings:{startAtZero:value}})}})]}),(0,jsx_runtime.jsxs)("div",{className:"mt-1 mb-2 flex flex-col",children:[(0,jsx_runtime.jsx)("h3",{children:"Right Y-axis"}),(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Scale",className:"gap-0 mb-3",children:(0,jsx_runtime.jsx)(src.Yv,{value:null!==(_chartSettings$rightY=chartSettings.rightYAxisSettings?.scale)&&void 0!==_chartSettings$rightY?_chartSettings$rightY:"linear",options:[{value:"linear",label:"Linear"},{value:"logarithmic",label:"Logarithmic"}],onChange:value=>{updateChartSettings({rightYAxisSettings:{scale:value}})}})}),(0,jsx_runtime.jsx)(src.f4,{className:"flex-1 mb-3 w-full",label:"Begin Y-axis at zero",checked:null===(_ref2=null!==(_chartSettings$rightY2=chartSettings.rightYAxisSettings?.startAtZero)&&void 0!==_chartSettings$rightY2?_chartSettings$rightY2:chartSettings.yAxisAtZero)||void 0===_ref2||_ref2,onChange:value=>{updateChartSettings({rightYAxisSettings:{startAtZero:value}})}})]}),isStackedBarChart&&(0,jsx_runtime.jsx)("div",{className:"mt-1 mb-2 flex",children:(0,jsx_runtime.jsx)(src.f4,{className:"flex-1",label:"Stack bars 100%",checked:null!==(_chartSettings$stackB=chartSettings.stackBars100)&&void 0!==_chartSettings$stackB&&_chartSettings$stackB,onChange:value=>{updateChartSettings({stackBars100:value})}})}),(0,jsx_runtime.jsxs)("div",{className:"mt-1 mb-2",children:[(0,jsx_runtime.jsx)(src.HQ,{className:"mb-1",children:"Goal line"}),goalLines.map((goalLine,goalLineIndex)=>{var _goalLine$value;return(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 gap-1 mb-1",children:[(0,jsx_runtime.jsx)(SeriesGlyph.rF,{className:"self-center",hasBreakdown:!1,seriesIndex:goalLineIndex}),(0,jsx_runtime.jsx)(src.DF,{placeholder:"Label",className:"grow-2",value:goalLine.label,onChange:value=>updateGoalLine(goalLineIndex,"label",value)}),(0,jsx_runtime.jsx)(src.DF,{placeholder:"Value",className:"grow",value:(null!==(_goalLine$value=goalLine.value)&&void 0!==_goalLine$value?_goalLine$value:0).toString(),inputMode:"numeric",onChange:value=>updateGoalLine(goalLineIndex,"value",parseInt(value))}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),status:"danger",title:"Delete Y-series",noPadding:!0,onClick:()=>removeGoalLine(goalLineIndex)},"delete")]},`${goalLineIndex}`)}),(0,jsx_runtime.jsx)(src.Jp,{className:"mt-1",onClick:()=>addGoalLine(),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{}),fullWidth:!0,children:"Add goal line"})]})]})},{}),shouldShow:displayType=>displayType!==types.Qb.ActionsTable&&displayType!==types.Qb.BoldNumber}},ContentWrapper=_ref=>{let{children}=_ref;return(0,jsx_runtime.jsx)("div",{className:"SideBar bg-bg-light border p-4 rounded-t-none border-t-0",children:children})},SideBar_SideBar=()=>{let{activeSideBarTab,visualizationType}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{setSideBarTab}=(0,index_esm.useActions)(dataVisualizationLogic.H8),tabs=Object.values(TABS_TO_CONTENT).filter(n=>n.shouldShow(visualizationType)).map((tab,index)=>({label:tab.label,key:Object.keys(TABS_TO_CONTENT)[index],content:(0,jsx_runtime.jsx)(ContentWrapper,{children:tab.content})}));return(0,jsx_runtime.jsx)(src.TP,{activeKey:activeSideBarTab,onChange:tab=>setSideBarTab(tab),tabs:tabs})}},"./frontend/src/queries/nodes/DataVisualization/Components/Table.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>Table});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_hog__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/hog.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_insights_EmptyStates__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/schema.ts"),_DataNode_LoadNext__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/nodes/DataNode/LoadNext.tsx"),_DataTable_renderColumn__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumn.tsx"),_DataTable_renderColumnMeta__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/nodes/DataTable/renderColumnMeta.tsx"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let Table=props=>{let{isDarkModeOn}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_5__.b),{tabularData,tabularColumns,conditionalFormattingRules,responseLoading,responseError,queryCancelled,response}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_10__.H8),tableColumns=tabularColumns.map((_ref,index)=>{let{column,settings}=_ref,{title,...columnMeta}=(0,_DataTable_renderColumnMeta__WEBPACK_IMPORTED_MODULE_9__.a)(column.name,props.query,props.context);return{...columnMeta,title:settings?.display?.label||title||column.name,render:(_,data,recordIndex)=>(0,_DataTable_renderColumn__WEBPACK_IMPORTED_MODULE_8__.W)(column.name,data[index].formattedValue,data,recordIndex,{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_6__.OH.DataTableNode,source:props.query.source}),style:(_,data)=>{let cf=conditionalFormattingRules.filter(n=>n.columnName===column.name).map(n=>{let res=(0,lib_hog__WEBPACK_IMPORTED_MODULE_2__.z)(n.bytecode,{globals:{value:data[index].value,input:(0,_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_10__.r2)(n.input,column.type.name)},functions:{},maxAsyncSteps:0});return{rule:n,result:res.result}}),conditionalFormattingMatches=cf.find(n=>!!n.result);if(conditionalFormattingMatches){var _conditionalFormattin;let ruleColor=conditionalFormattingMatches.rule.color,colorMode=null!==(_conditionalFormattin=conditionalFormattingMatches.rule.colorMode)&&void 0!==_conditionalFormattin?_conditionalFormattin:"light";return"dark"===colorMode&&isDarkModeOn||"light"===colorMode&&!isDarkModeOn?{backgroundColor:ruleColor}:"dark"!==colorMode||isDarkModeOn?{backgroundColor:(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__._$)(ruleColor,-30)}:{backgroundColor:(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__._$)(ruleColor,30)}}}}});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div",{className:"relative w-full flex flex-col gap-4 flex-1 h-full",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.g3,{dataSource:tabularData,columns:tableColumns,loading:responseLoading,emptyState:responseError?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(scenes_insights_EmptyStates__WEBPACK_IMPORTED_MODULE_4__.jC,{query:props.query,excludeDetail:!0,title:queryCancelled?"The query was cancelled":response&&"error"in response?response.error:responseError}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(scenes_insights_EmptyStates__WEBPACK_IMPORTED_MODULE_4__.dV,{heading:"There are no matching rows for this query",detail:""}),footer:tabularData.length>0?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_DataNode_LoadNext__WEBPACK_IMPORTED_MODULE_7__.g,{query:props.query}):null,rowClassName:"DataVizRow"})})}},"./frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V:()=>TableDisplay});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let TableDisplay=()=>{let{setVisualizationType}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__.H8),{visualizationType}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__.H8),options=[{title:"Table",options:[{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.ActionsTable,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.p$,{}),label:"Table"},{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.BoldNumber,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.hQ,{}),label:"Big Number"}]},{title:"Charts",options:[{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.ActionsLineGraph,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrends,{}),label:"Line chart"},{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.ActionsBar,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconGraph,{}),label:"Bar chart"},{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.ActionsStackedBar,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLifecycle,{}),label:"Stacked bar chart"},{value:_types__WEBPACK_IMPORTED_MODULE_4__.Qb.ActionsAreaGraph,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_3__.Ii,{}),label:"Area chart"}]}];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Yv,{value:visualizationType,onChange:value=>{setVisualizationType(value)},dropdownPlacement:"bottom-end",optionTooltipPlacement:"left",dropdownMatchSelectWidth:!1,"data-attr":"chart-filter",options:options})}},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/AddVariableButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>AddVariableButton});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),_NewVariableModal__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/NewVariableModal.tsx"),_variableModalLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),_variablesLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let AddVariableButton=()=>{let{showEditingUI}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__.H8),{featureFlags}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h),{openNewVariableModal}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(_variableModalLogic__WEBPACK_IMPORTED_MODULE_7__.b),{variables,variablesLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_variablesLogic__WEBPACK_IMPORTED_MODULE_8__.Q),{addVariable}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(_variablesLogic__WEBPACK_IMPORTED_MODULE_8__.Q);return featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.INSIGHT_VARIABLES]&&showEditingUI?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.d6,{items:[{title:"New variable",items:[{label:"String",onClick:()=>openNewVariableModal("String")},{label:"Number",onClick:()=>openNewVariableModal("Number")},{label:"Boolean",onClick:()=>openNewVariableModal("Boolean")},{label:"List",onClick:()=>openNewVariableModal("List")}]},{label:"Existing variable",items:variablesLoading?[{label:"Loading...",onClick:()=>{}}]:variables.map(n=>({label:n.name,onClick:()=>addVariable({variableId:n.id,code_name:n.code_name})}))}],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"secondary",sideIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconPlus,{}),children:"Add variable"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_NewVariableModal__WEBPACK_IMPORTED_MODULE_6__.f,{})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{})}},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/NewVariableModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>NewVariableModal});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),_variableModalLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let renderVariableSpecificFields=(variable,updateVariable)=>{if("String"===variable.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Default value",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{placeholder:"Default value",value:variable.default_value,onChange:value=>updateVariable({...variable,default_value:value})})});if("Number"===variable.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Default value",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{placeholder:"Default value",type:"number",value:variable.default_value,onChange:value=>updateVariable({...variable,default_value:null!=value?value:0})})});if("Boolean"===variable.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Default value",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.P4,{className:"w-full",value:variable.default_value?"true":"false",onChange:value=>updateVariable({...variable,default_value:"true"===value}),options:[{value:"true",label:"true"},{value:"false",label:"false"}]})});if("List"===variable.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Values",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.nt,{value:variable.values,onChange:value=>updateVariable({...variable,values:value}),placeholder:"Options...",mode:"multiple",allowCustomValues:!0,options:[]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Default value",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Yv,{className:"w-full",placeholder:"Select default value",value:variable.default_value,options:variable.values.map(n=>({label:n,value:n})),onChange:value=>updateVariable({...variable,default_value:null!=value?value:""}),allowClear:!0,dropdownMaxContentWidth:!0})})]});throw Error(`Unsupported variable type: ${variable.type}`)},NewVariableModal=()=>{let{closeModal,updateVariable,save}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_variableModalLogic__WEBPACK_IMPORTED_MODULE_3__.b),{isModalOpen,variable,modalType}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_variableModalLogic__WEBPACK_IMPORTED_MODULE_3__.b),title="new"===modalType?`New ${variable.type} variable`:`Editing ${variable.name}`;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.fQ,{title:title,isOpen:isModalOpen,onClose:closeModal,maxWidth:"30rem",footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:"flex flex-1 justify-end gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"secondary",onClick:closeModal,children:"Close"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary",onClick:()=>save(),children:"Save"})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div",{className:"gap-4 flex flex-col",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_2__.D.Pure,{label:"Name",className:"gap-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{placeholder:"Name",value:variable.name,onChange:value=>updateVariable({...variable,name:value})})}),renderVariableSpecificFields(variable,updateVariable)]})})}},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>VariablesForDashboard,M:()=>VariablesForInsight});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Variables=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.scss"),Variables_default=__webpack_require__.n(Variables),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Variables_default(),options),Variables_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),dataVisualizationLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),NewVariableModal=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/NewVariableModal.tsx"),variableModalLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts"),variablesLogic=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let VariablesForDashboard=()=>{let{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),{dashboardVariables}=(0,index_esm.useValues)(dashboardLogic.BM),{overrideVariableValue}=(0,index_esm.useActions)(dashboardLogic.BM);return featureFlags[constants.y8.INSIGHT_VARIABLES]&&dashboardVariables.length?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{className:"flex gap-4 flex-wrap px-px mt-4",children:dashboardVariables.map(n=>(0,jsx_runtime.jsx)(VariableComponent,{variable:n,showEditingUI:!1,onChange:overrideVariableValue,variableOverridesAreSet:!1},n.id))})}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})},VariablesForInsight=()=>{let{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),{variablesForInsight,showVariablesBar}=(0,index_esm.useValues)(variablesLogic.Q),{updateVariableValue,removeVariable}=(0,index_esm.useActions)(variablesLogic.Q),{showEditingUI}=(0,index_esm.useValues)(dataVisualizationLogic.H8),{variableOverridesAreSet}=(0,index_esm.useValues)(dataNodeLogic.M),{openExistingVariableModal}=(0,index_esm.useActions)(variableModalLogic.b);return featureFlags[constants.y8.INSIGHT_VARIABLES]&&variablesForInsight.length&&showVariablesBar?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex gap-4 flex-wrap px-px",children:variablesForInsight.map(n=>(0,jsx_runtime.jsx)(VariableComponent,{variable:n,showEditingUI:showEditingUI,onChange:updateVariableValue,onRemove:removeVariable,variableOverridesAreSet:variableOverridesAreSet,variableSettingsOnClick:()=>openExistingVariableModal(n)},n.id))}),(0,jsx_runtime.jsx)(NewVariableModal.f,{})]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})},VariableInput=_ref=>{let{variable,showEditingUI,closePopover,onChange,onRemove,variableSettingsOnClick}=_ref,[localInputValue,setLocalInputValue]=(0,react.useState)(()=>{var _variable$value;let val=null!==(_variable$value=variable.value)&&void 0!==_variable$value?_variable$value:variable.default_value;return"Number"!==variable.type||val?null!=val?val:"":0}),inputRef=(0,react.useRef)(null),codeRef=(0,react.useRef)(null);(0,react.useEffect)(()=>{inputRef.current?.focus()},[inputRef.current]);let variableAsHogQL=`{variables.${variable.code_name}}`;return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-1 p-1",children:["String"===variable.type&&(0,jsx_runtime.jsx)(src.DF,{inputRef:inputRef,placeholder:"Value...",className:"flex flex-1",value:localInputValue.toString(),onChange:value=>setLocalInputValue(value),onPressEnter:()=>{onChange(variable.id,localInputValue),closePopover()}}),"Number"===variable.type&&(0,jsx_runtime.jsx)(src.DF,{type:"number",inputRef:inputRef,placeholder:"Value...",className:"flex flex-1",value:Number(localInputValue),onChange:value=>setLocalInputValue(null!=value?value:0),onPressEnter:()=>{onChange(variable.id,localInputValue),closePopover()}}),"Boolean"===variable.type&&(0,jsx_runtime.jsx)(src.P4,{className:"grow",value:localInputValue?"true":"false",onChange:value=>setLocalInputValue("true"===value),options:[{value:"true",label:"true"},{value:"false",label:"false"}]}),"List"===variable.type&&(0,jsx_runtime.jsx)(src.Yv,{className:"grow",value:localInputValue,onChange:value=>setLocalInputValue(value),options:variable.values.map(n=>({label:n,value:n}))}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>{onChange(variable.id,localInputValue),closePopover()},children:showEditingUI?"Save":"Update"})]}),showEditingUI&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.p2,{className:"m1"}),(0,jsx_runtime.jsxs)("div",{className:"flex p-1",children:[(0,jsx_runtime.jsx)("code",{ref:codeRef,onClick:()=>{if(window.getSelection&&codeRef.current){let selection=window.getSelection(),range=document.createRange();range.selectNodeContents(codeRef.current),selection&&(selection.removeAllRanges(),selection.addRange(range))}},className:"text-xs flex flex-1 items-center mr-2",children:variableAsHogQL}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCopy,{}),size:"xsmall",onClick:()=>void(0,copyToClipboard.v)(variableAsHogQL,"variable HogQL"),tooltip:"Copy HogQL"}),onRemove&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>onRemove(variable.id),icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),size:"xsmall",tooltip:"Remove variable from insight"}),variableSettingsOnClick&&(0,jsx_runtime.jsx)(src.Jp,{onClick:variableSettingsOnClick,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),size:"xsmall",tooltip:"Open variable settings"})]})]})]})},VariableComponent=_ref2=>{var _variable$value$toStr,_variable$value2;let{variable,showEditingUI,onChange,variableOverridesAreSet,onRemove,variableSettingsOnClick}=_ref2,[isPopoverOpen,setPopoverOpen]=(0,react.useState)(!1);return showEditingUI||"List"!==variable.type?(0,jsx_runtime.jsx)(src.J2,{overlay:(0,jsx_runtime.jsx)(VariableInput,{variable:variable,showEditingUI:showEditingUI,onChange:onChange,closePopover:()=>setPopoverOpen(!1),onRemove:onRemove,variableSettingsOnClick:()=>{variableSettingsOnClick&&(setPopoverOpen(!1),variableSettingsOnClick())}}),visible:isPopoverOpen,onClickOutside:()=>setPopoverOpen(!1),className:"DataVizVariable_Popover",children:(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:variable.name,className:"gap-0",info:`Use this variable in your HogQL by referencing {variables.${variable.code_name}}`,children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",className:"min-w-32 DataVizVariable_Button",onClick:()=>setPopoverOpen(!isPopoverOpen),disabledReason:variableOverridesAreSet&&"Discard dashboard variables to change",children:null!==(_variable$value$toStr=variable.value?.toString())&&void 0!==_variable$value$toStr?_variable$value$toStr:variable.default_value?.toString()})})})},variable.id):(0,jsx_runtime.jsx)(src.Yv,{value:null!==(_variable$value2=variable.value)&&void 0!==_variable$value2?_variable$value2:variable.default_value,onChange:value=>onChange(variable.id,value),options:variable.values.map(n=>({label:n,value:n}))})}},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableDataLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>variableDataLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts");let variableDataLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["queries","nodes","DataVisualization","Components","Variables","variableDataLogic"]),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({variables:[[],{getVariables:async()=>{let insights=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.insightVariables.list();return insights.results}}]})])},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableModalLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>variableModalLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),_variableDataLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableDataLogic.ts"),_variablesLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts");let DEFAULT_VARIABLE={id:"",type:"String",name:"",default_value:"",code_name:""},variableModalLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["queries","nodes","DataVisualization","Components","Variables","variableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({key:""}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({actions:[_variableDataLogic__WEBPACK_IMPORTED_MODULE_3__.p,["getVariables"],_variablesLogic__WEBPACK_IMPORTED_MODULE_4__.Q,["addVariable"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({openNewVariableModal:variableType=>({variableType}),openExistingVariableModal:variable=>({variable}),closeModal:!0,updateVariable:variable=>({variable}),save:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({modalType:["new",{openNewVariableModal:()=>"new",openExistingVariableModal:()=>"existing"}],variableType:["string",{openNewVariableModal:(_,_ref)=>{let{variableType}=_ref;return variableType},openExistingVariableModal:(_,_ref2)=>{let{variable}=_ref2;return variable.type}}],isModalOpen:[!1,{openNewVariableModal:()=>!0,openExistingVariableModal:()=>!0,closeModal:()=>!1}],variable:[DEFAULT_VARIABLE,{openExistingVariableModal:(_,_ref3)=>{let{variable}=_ref3;return{...variable}},openNewVariableModal:(_,_ref4)=>{let{variableType}=_ref4;if("String"===variableType)return{id:"",type:"String",name:"",default_value:"",code_name:""};if("Number"===variableType)return{id:"",type:"Number",name:"",default_value:0,code_name:""};if("Boolean"===variableType)return{id:"",type:"Boolean",name:"",default_value:!1,code_name:""};if("List"===variableType)return{id:"",type:"List",name:"",values:[],default_value:"",code_name:""};throw Error(`Unsupported variable type ${variableType}`)},updateVariable:(state,_ref5)=>{let{variable}=_ref5;return{...state,...variable}},closeModal:()=>DEFAULT_VARIABLE}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref6=>{let{values,actions}=_ref6;return{save:async()=>{try{if("new"===values.modalType){let variable=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.insightVariables.create(values.variable);actions.addVariable({variableId:variable.id,code_name:variable.code_name})}else await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.insightVariables.update(values.variable.id,values.variable);actions.getVariables(),actions.closeModal()}catch(e){var _error$detail;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(null!==(_error$detail=e.detail)&&void 0!==_error$detail?_error$detail:e.message)}}}})])},"./frontend/src/queries/nodes/DataVisualization/Components/Variables/variablesLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>variablesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_insights_utils_queryUtils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/utils/queryUtils.ts"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts"),_variableDataLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/variableDataLogic.ts");let convertValueToCorrectType=(value,type)=>"Number"===type?Number(value):"Boolean"===type&&"string"==typeof value?"true"===value.toLowerCase():value,variablesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["queries","nodes","DataVisualization","Components","Variables","variablesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({key:""}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__.H8,["setQuery","loadData"],_variableDataLogic__WEBPACK_IMPORTED_MODULE_6__.p,["getVariables"]],values:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_5__.H8,["query"],_variableDataLogic__WEBPACK_IMPORTED_MODULE_6__.p,["variables","variablesLoading"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(_ref=>{let{values}=_ref;return{addVariable:variable=>({variable}),addVariables:variables=>({variables}),removeVariable:variableId=>({variableId}),updateVariableValue:(variableId,value)=>({variableId,value,allVariables:values.variables}),setEditorQuery:query=>({query}),updateSourceQuery:!0}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref2,oldProps)=>{let{props,actions}=_ref2;if(oldProps.queryInput!==props.queryInput){var _props$queryInput;actions.setEditorQuery(null!==(_props$queryInput=props.queryInput)&&void 0!==_props$queryInput?_props$queryInput:"")}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({internalSelectedVariables:[[],{addVariable:(state,_ref3)=>{let{variable}=_ref3;return state.find(n=>variable.variableId===n.variableId)?state:[...state,{...variable}]},addVariables:(_state,_ref4)=>{let{variables}=_ref4;return[...variables.map(n=>({...n}))]},updateVariableValue:(state,_ref5)=>{let{variableId,value,allVariables}=_ref5,variableIndex=state.findIndex(n=>n.variableId===variableId);if(variableIndex<0)return state;let variableType=allVariables.find(n=>n.id===variableId)?.type,valueWithType=convertValueToCorrectType(value,null!=variableType?variableType:"String"),variablesInState=[...state];return variablesInState[variableIndex]={...variablesInState[variableIndex],value:valueWithType},variablesInState},removeVariable:(state,_ref6)=>{let{variableId}=_ref6,stateCopy=[...state],index=stateCopy.findIndex(n=>n.variableId===variableId);return index>=0&&stateCopy.splice(index,1),stateCopy}}],editorQuery:["",{setEditorQuery:(_,_ref7)=>{let{query}=_ref7;return query},setQuery:(_,_ref8)=>{let{node}=_ref8;return node.source.query}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({variablesForInsight:[s=>[s.variables,s.internalSelectedVariables],(variables,internalSelectedVariables)=>variables.length&&internalSelectedVariables.length?internalSelectedVariables.map(_ref9=>{let{variableId,value}=_ref9,v=variables.find(n=>n.id===variableId);if(v)return{...v,value}}).filter(n=>!!n):[]],showVariablesBar:[()=>[(_,props)=>props.dashboardId],dashboardId=>!dashboardId]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref10=>{let{props,values,actions}=_ref10;return{addVariable:()=>{actions.updateSourceQuery()},removeVariable:()=>{actions.updateSourceQuery()},updateVariableValue:()=>{actions.updateSourceQuery()},updateSourceQuery:()=>{if(!values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_2__.y8.INSIGHT_VARIABLES])return;let variables=values.internalSelectedVariables,query={...values.query,source:{...values.query.source,variables:variables.reduce((acc,cur)=>(cur.variableId&&(acc[cur.variableId]={variableId:cur.variableId,value:cur.value,code_name:cur.code_name}),acc),{})}},queryVarsHaveChanged=(0,scenes_insights_utils_queryUtils__WEBPACK_IMPORTED_MODULE_4__.dm)(query.source,values.query.source);queryVarsHaveChanged&&(actions.setQuery(query),props.readOnly&&actions.loadData(!0,void 0,query.source))}}}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__.Vt)(_ref11=>{let{actions,values}=_ref11;return{editorQuery:query=>{let queryVariableMatches=(0,scenes_insights_utils_queryUtils__WEBPACK_IMPORTED_MODULE_4__.Zg)(query);queryVariableMatches?.forEach(match=>{if(null===match)return;let variableExists=values.variables.find(n=>n.code_name===match);if(!variableExists)return;let variableAlreadySelected=values.internalSelectedVariables.find(n=>n.code_name===match);variableAlreadySelected||actions.addVariable({variableId:variableExists.id,code_name:variableExists.code_name})})},query:query=>{var _query$source$variabl;if(!values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_2__.y8.INSIGHT_VARIABLES])return;let variables=Object.values(null!==(_query$source$variabl=query.source.variables)&&void 0!==_query$source$variabl?_query$source$variabl:{});variables.length&&actions.addVariables(variables)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref12=>{let{actions,values}=_ref12;values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_2__.y8.INSIGHT_VARIABLES]&&actions.getVariables()})])},"./frontend/src/queries/nodes/DataVisualization/Components/seriesBreakdownLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>seriesBreakdownLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts");let EmptyBreakdownSeries={xData:{column:{name:"None",type:{name:"INTEGER",isNumerical:!1},label:"None",dataIndex:-1},data:[]},seriesData:[]},createEmptyBreakdownSeriesWithError=error=>({...EmptyBreakdownSeries,error}),seriesBreakdownLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["queries","nodes","DataVisualization","Components","seriesBreakdownLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({key:""}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_2__.H8,["clearAxis","setQuery"]],values:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_2__.H8,["query","response","columns","selectedXAxis","selectedYAxis"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(_ref=>{let{values}=_ref;return{addSeriesBreakdown:columnName=>({columnName,response:values.response}),deleteSeriesBreakdown:()=>({})}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref2=>{var _values$query$chartSe;let{values}=_ref2;return{showSeriesBreakdown:[!1,{clearAxis:()=>!1,addSeriesBreakdown:()=>!0,deleteSeriesBreakdown:()=>!1}],selectedSeriesBreakdownColumn:[null!==(_values$query$chartSe=values.query?.chartSettings?.seriesBreakdownColumn)&&void 0!==_values$query$chartSe?_values$query$chartSe:null,{clearAxis:()=>null,addSeriesBreakdown:(_,_ref3)=>{let{columnName}=_ref3;return columnName},deleteSeriesBreakdown:()=>null}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({breakdownColumnValues:[state=>[state.selectedSeriesBreakdownColumn,state.response,state.columns],(breakdownColumn,response,columns)=>{var _ref4,_response$results;if(!response||null===breakdownColumn)return[];let data=null!==(_ref4=null!==(_response$results=response?.results)&&void 0!==_response$results?_response$results:response?.result)&&void 0!==_ref4?_ref4:[],column=columns.find(n=>n.name===breakdownColumn);return column?Array.from(new Set(data.map(n=>n[column.dataIndex]))):[]}],seriesBreakdownData:[state=>[state.selectedSeriesBreakdownColumn,state.breakdownColumnValues,state.selectedYAxis,state.selectedXAxis,state.response,state.columns],(selectedBreakdownColumn,breakdownColumnValues,ySeries,xSeries,response,columns)=>{var _ref5,_response$results2;if(!response||!selectedBreakdownColumn||null===ySeries||0===ySeries.length||null===xSeries||null===columns||0===columns.length||ySeries.length>1)return EmptyBreakdownSeries;let selectedYAxis=ySeries[0];if(!selectedYAxis)return EmptyBreakdownSeries;let yColumn=columns.find(n=>n.name===selectedYAxis.name);if(!yColumn)return EmptyBreakdownSeries;let xColumn=columns.find(n=>n.name===xSeries);if(!xColumn)return EmptyBreakdownSeries;let breakdownColumn=columns.find(n=>n.name===selectedBreakdownColumn);if(!breakdownColumn)return EmptyBreakdownSeries;if(breakdownColumnValues.length>50)return createEmptyBreakdownSeriesWithError("Too many breakdown values (max 50)");let data=null!==(_ref5=null!==(_response$results2=response?.results)&&void 0!==_response$results2?_response$results2:response?.result)&&void 0!==_ref5?_ref5:[],xData=Array.from(new Set(data.map(n=>n[xColumn.dataIndex]))),isUnaggregated=!1,seriesData=breakdownColumnValues.map(value=>{let filteredData=data.filter(n=>n[breakdownColumn.dataIndex]===value);if(0===filteredData.length)return{name:value,data:[]};if(!isUnaggregated){let xColumnValues=filteredData.map(n=>n[xColumn.dataIndex]),xColumnValuesSet=new Set(xColumnValues);xColumnValues.length!==xColumnValuesSet.size&&(isUnaggregated=!0)}let dataset=xData.map(xValue=>{let yValue=filteredData.filter(n=>n[xColumn.dataIndex]===xValue).map(n=>{try{let value=n[yColumn.dataIndex],multiplier=selectedYAxis.settings.formatting?.style==="percent"?100:1;if(selectedYAxis.settings.formatting?.decimalPlaces)return parseFloat((parseFloat(value)*multiplier).toFixed(selectedYAxis.settings.formatting.decimalPlaces));let isInt=Number.isInteger(value);return isInt?parseInt(value)*multiplier:parseFloat(value)*multiplier}catch{return 0}}).reduce((a,b)=>a+b,0);return yValue});return{name:value||"[No value]",data:dataset,settings:{formatting:selectedYAxis.settings.formatting,display:{yAxisPosition:selectedYAxis.settings?.display?.yAxisPosition,displayType:selectedYAxis.settings?.display?.displayType}}}});return{xData:{column:xColumn,data:xData},seriesData,isUnaggregated}}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__.Vt)(_ref6=>{let{values,actions}=_ref6;return{selectedSeriesBreakdownColumn:value=>{var _values$query$chartSe2;actions.setQuery({...values.query,chartSettings:{...null!==(_values$query$chartSe2=values.query.chartSettings)&&void 0!==_values$query$chartSe2?_values$query$chartSe2:{},seriesBreakdownColumn:value}})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref7=>{let{values,actions}=_ref7;values.query?.chartSettings?.seriesBreakdownColumn&&actions.addSeriesBreakdown(values.query.chartSettings.seriesBreakdownColumn)})])},"./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B8:()=>SideBarTab,FB:()=>formatDataWithSettings,H8:()=>dataVisualizationLogic,pf:()=>EmptyYAxisSeries,r2:()=>convertTableValue});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),lodash_merge__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js"),lodash_merge__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_4__),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/types.ts"),_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/nodes/DataTable/queryFeatures.ts"),_types__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/types.ts");let SideBarTab=function(SideBarTab){return SideBarTab.Series="series",SideBarTab.Display="display",SideBarTab.ConditionalFormatting="conditional_formatting",SideBarTab}({}),EmptyYAxisSeries={column:{name:"None",type:{name:"INTEGER",isNumerical:!1},label:"None",dataIndex:-1},data:[]},DefaultAxisSettings=()=>({formatting:{prefix:"",suffix:""}}),formatDataWithSettings=(data,settings)=>{if(null===data||Number.isNaN(data))return null;if("object"==typeof data)return data;let decimalPlaces=settings?.formatting?.decimalPlaces,dataAsString=`${data}`;return"number"==typeof data&&(dataAsString=`${decimalPlaces?data.toFixed(decimalPlaces):data}`,settings?.formatting?.style==="number"&&(dataAsString=data.toLocaleString(void 0,{maximumFractionDigits:decimalPlaces})),settings?.formatting?.style==="percent"&&(dataAsString=`${data.toLocaleString(void 0,{maximumFractionDigits:decimalPlaces})}%`)),settings?.formatting?.prefix&&(dataAsString=`${settings.formatting.prefix}${dataAsString}`),settings?.formatting?.suffix&&(dataAsString=`${dataAsString}${settings.formatting.suffix}`),dataAsString},convertTableValue=(value,type)=>null==value?null:"STRING"===type?value.toString():"INTEGER"===type?"number"==typeof value?value:parseInt(value):"FLOAT"===type||"DECIMAL"===type?"number"==typeof value?value:parseFloat(value):"BOOLEAN"===type?!!value:"DATE"===type||"DATETIME"===type?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_2__.Bv)(value).unix():value,toFriendlyClickhouseTypeName=type=>-1!==type.indexOf("Tuple")?"TUPLE":-1!==type.indexOf("Int")?"INTEGER":-1!==type.indexOf("Float")?"FLOAT":-1!==type.indexOf("DateTime")?"DATETIME":-1!==type.indexOf("Date")?"DATE":-1!==type.indexOf("Boolean")?"BOOLEAN":-1!==type.indexOf("Decimal")?"DECIMAL":-1!==type.indexOf("String")?"STRING":type,isNumericalType=type=>"INTEGER"===type||"FLOAT"===type||"DECIMAL"===type,dataVisualizationLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["queries","nodes","DataVisualization","dataVisualizationLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(props=>({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_5__.H,["currentTeamId"],(0,_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_8__.M)({cachedResults:props.cachedResults,key:props.key,query:props.query.source,dataNodeCollectionId:props.dataNodeCollectionId,loadPriority:props.loadPriority,variablesOverride:props.variablesOverride}),["response","responseLoading","responseError","queryCancelled"],_layout_navigation_3000_themeLogic__WEBPACK_IMPORTED_MODULE_6__.b,["isDarkModeOn"]],actions:[(0,_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_8__.M)({cachedResults:props.cachedResults,key:props.key,query:props.query.source,dataNodeCollectionId:props.dataNodeCollectionId,loadPriority:props.loadPriority,variablesOverride:props.variablesOverride}),["loadData"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.query&&!(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.h0)(props.query,oldProps.query)&&actions._setQuery(props.query)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({query:{source:{}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(_ref2=>{let{values}=_ref2;return{setVisualizationType:visualizationType=>({visualizationType}),updateXSeries:columnName=>({columnName}),updateSeriesIndex:(seriesIndex,columnName,settings)=>({seriesIndex,columnName,settings}),updateSeries:(columnName,settings)=>({columnName,settings}),addYSeries:(columnName,settings)=>({columnName,settings,allNumericalColumns:values.numericalColumns}),addSeries:(columnName,settings)=>({columnName,settings,allColumns:values.columns}),deleteYSeries:seriesIndex=>({seriesIndex}),clearAxis:!0,setQuery:node=>({node}),updateChartSettings:settings=>({settings}),setSideBarTab:tab=>({tab}),toggleChartSettingsPanel:open1=>({open:open1}),addConditionalFormattingRule:rule=>({rule:null!=rule?rule:{id:(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Vj)()},isDarkModeOn:values.isDarkModeOn}),updateConditionalFormattingRule:(rule,deleteRule)=>({rule,deleteRule,colorMode:values.isDarkModeOn?"dark":"light"}),setConditionalFormattingRulesPanelActiveKeys:keys=>({keys}),_setQuery:node=>({node})}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref3=>{var _props$query$chartSet;let{props}=_ref3;return{query:[props.query,{setQuery:(_,_ref4)=>{let{node}=_ref4;return node},_setQuery:(_,_ref5)=>{let{node}=_ref5;return node}}],visualizationType:[_types__WEBPACK_IMPORTED_MODULE_7__.Qb.ActionsTable,{setVisualizationType:(_,_ref6)=>{let{visualizationType}=_ref6;return visualizationType}}],tabularColumnSettings:[null,{clearAxis:()=>null,addSeries:(state,_ref7)=>{let{columnName,settings,allColumns}=_ref7;if(!state&&void 0!==columnName)return[{name:columnName,settings:null!=settings?settings:DefaultAxisSettings()}];if(!state)return[null];if(!columnName){let ungraphedColumns=allColumns.filter(n=>!state.map(m=>m?.name).includes(n.name));if(ungraphedColumns.length>0)return[...state,{name:ungraphedColumns[0].name,settings:null!=settings?settings:DefaultAxisSettings()}]}return[...state,void 0===columnName?null:{name:columnName,settings:null!=settings?settings:DefaultAxisSettings()}]},updateSeries:(state,_ref8)=>{var _ySeries$index$settin;let{columnName,settings}=_ref8;if(!state)return null;let ySeries=[...state],index=ySeries.findIndex(n=>n?.name===columnName);return index<0||(ySeries[index]={name:columnName,settings:lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(null!==(_ySeries$index$settin=ySeries[index]?.settings)&&void 0!==_ySeries$index$settin?_ySeries$index$settin:{},settings)}),ySeries},updateSeriesIndex:(state,_ref9)=>{var _ySeries$seriesIndex$;let{seriesIndex,columnName,settings}=_ref9;if(!state)return null;let ySeries=[...state];return ySeries[seriesIndex]={name:columnName,settings:lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(null!==(_ySeries$seriesIndex$=ySeries[seriesIndex]?.settings)&&void 0!==_ySeries$seriesIndex$?_ySeries$seriesIndex$:{},settings)},ySeries}}],selectedXAxis:[null,{clearAxis:()=>null,updateXSeries:(_,_ref10)=>{let{columnName}=_ref10;return columnName}}],selectedYAxis:[null,{clearAxis:()=>null,addYSeries:(state,_ref11)=>{let{columnName,settings,allNumericalColumns}=_ref11;if(!state&&void 0!==columnName)return[{name:columnName,settings:null!=settings?settings:DefaultAxisSettings()}];if(!state)return[null];if(!columnName){let ungraphedColumns=allNumericalColumns.filter(n=>!state.map(m=>m?.name).includes(n.name));if(ungraphedColumns.length>0)return[...state,{name:ungraphedColumns[0].name,settings:null!=settings?settings:DefaultAxisSettings()}]}return[...state,void 0===columnName?null:{name:columnName,settings:null!=settings?settings:DefaultAxisSettings()}]},updateSeriesIndex:(state,_ref12)=>{var _ySeries$seriesIndex$2;let{seriesIndex,columnName,settings}=_ref12;if(!state)return null;let ySeries=[...state];return ySeries[seriesIndex]={name:columnName,settings:lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(null!==(_ySeries$seriesIndex$2=ySeries[seriesIndex]?.settings)&&void 0!==_ySeries$seriesIndex$2?_ySeries$seriesIndex$2:{},settings)},ySeries},updateSeries:(state,_ref13)=>{var _ySeries$index$settin2;let{columnName,settings}=_ref13;if(!state)return null;let ySeries=[...state],index=ySeries.findIndex(n=>n?.name===columnName);return index<0||(ySeries[index]={name:columnName,settings:lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(null!==(_ySeries$index$settin2=ySeries[index]?.settings)&&void 0!==_ySeries$index$settin2?_ySeries$index$settin2:{},settings)}),ySeries},deleteYSeries:(state,_ref14)=>{let{seriesIndex}=_ref14;if(!state)return null;if(state.length<=1)return[null];let ySeries=[...state];return ySeries.splice(seriesIndex,1),ySeries}}],activeSideBarTab:[SideBarTab.Series,{setSideBarTab:(_state,_ref15)=>{let{tab}=_ref15;return tab}}],chartSettings:[null!==(_props$query$chartSet=props.query.chartSettings)&&void 0!==_props$query$chartSet?_props$query$chartSet:{},{updateChartSettings:(state,_ref16)=>{let{settings}=_ref16;return{...lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(state,settings)}},setQuery:(state,_ref17)=>{var _node$chartSettings;let{node}=_ref17;return{...lodash_merge__WEBPACK_IMPORTED_MODULE_4___default()(state,null!==(_node$chartSettings=node.chartSettings)&&void 0!==_node$chartSettings?_node$chartSettings:{})}}}],isChartSettingsPanelOpen:[!1,{toggleChartSettingsPanel:(state,_ref18)=>{let{open:open1}=_ref18;return void 0===open1?!state:open1},setVisualizationType:(state,_ref19)=>{let{visualizationType}=_ref19;return!!state||visualizationType!==_types__WEBPACK_IMPORTED_MODULE_7__.Qb.ActionsTable}}],conditionalFormattingRules:[[],{addConditionalFormattingRule:(state,_ref20)=>{let{rule,isDarkModeOn}=_ref20,rules=[...state];return rules.push({templateId:_types__WEBPACK_IMPORTED_MODULE_10__.p[0].id,columnName:"",bytecode:[],input:"",color:isDarkModeOn?(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.fc)((0,lib_utils__WEBPACK_IMPORTED_MODULE_3__._$)("#FFADAD",-30)):"#FFADAD",...rule}),rules},updateConditionalFormattingRule:(state,_ref21)=>{let{rule,deleteRule,colorMode}=_ref21,rules=[...state],index=rules.findIndex(n=>n.id===rule.id);return -1===index||(deleteRule?rules.splice(index,1):rules[index]={...rule,colorMode:colorMode}),rules}}],conditionalFormattingRulesPanelActiveKeys:[[],{addConditionalFormattingRule:(state,_ref22)=>{let{rule:{id}}=_ref22;return[...state,id]},setConditionalFormattingRulesPanelActiveKeys:(_,_ref23)=>{let{keys}=_ref23;return[...keys]}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({columns:[s=>[s.response],response=>{var _response$columns,_response$types;if(!response)return[];let columns=null!==(_response$columns=response.columns)&&void 0!==_response$columns?_response$columns:[],types=null!==(_response$types=response.types)&&void 0!==_response$types?_response$types:[];return columns.map((column,index)=>{let type=types[index]?.[1],friendlyClickhouseTypeName=toFriendlyClickhouseTypeName(type);return{name:column,type:{name:friendlyClickhouseTypeName,isNumerical:isNumericalType(friendlyClickhouseTypeName)},label:`${column} - ${type}`,dataIndex:index}})}],numericalColumns:[s=>[s.columns],columns=>columns.filter(n=>n.type.isNumerical)],dashboardId:[()=>[(_,props)=>props.dashboardId],dashboardId=>null!=dashboardId?dashboardId:null],showEditingUI:[(state,props)=>[props.insightMode,state.dashboardId],(insightMode,dashboardId)=>!dashboardId&&insightMode==_types__WEBPACK_IMPORTED_MODULE_7__.LO.Edit],showResultControls:[(state,props)=>[props.insightMode,state.dashboardId],(insightMode,dashboardId)=>insightMode===_types__WEBPACK_IMPORTED_MODULE_7__.LO.Edit||!dashboardId],presetChartHeight:[(state,props)=>[props.key,state.dashboardId],(key,dashboardId)=>!key.includes("new-SQL")&&!dashboardId],sourceFeatures:[(_,props)=>[props.query],query=>(0,_DataTable_queryFeatures__WEBPACK_IMPORTED_MODULE_9__.r)(query.source)],isShowingCachedResults:[()=>[(_,props)=>{var _props$cachedResults;return null!==(_props$cachedResults=props.cachedResults)&&void 0!==_props$cachedResults?_props$cachedResults:null}],cachedResults=>!!cachedResults],yData:[state=>[state.selectedYAxis,state.response,state.columns],(ySeries,response,columns)=>{var _ref24,_response$results;if(!response||null===ySeries||0===ySeries.length)return[EmptyYAxisSeries];let data=null!==(_ref24=null!==(_response$results=response?.results)&&void 0!==_response$results?_response$results:response?.result)&&void 0!==_ref24?_ref24:[];return ySeries.map(series=>{if(!series)return EmptyYAxisSeries;let column=columns.find(n=>n.name===series.name);return column?{column,data:data.map(n=>{try{let multiplier=series.settings.formatting?.style==="percent"?100:1;if(series.settings.formatting?.decimalPlaces)return parseFloat((parseFloat(n[column.dataIndex])*multiplier).toFixed(series.settings.formatting.decimalPlaces));let isInt=Number.isInteger(n[column.dataIndex]);return isInt?parseInt(n[column.dataIndex],10)*multiplier:parseFloat(n[column.dataIndex])*multiplier}catch{return 0}}),settings:series.settings}:EmptyYAxisSeries}).filter(series=>!!series)}],xData:[state=>[state.selectedXAxis,state.response,state.columns],(xSeries,response,columns)=>{var _ref25,_response$results2;if(!response||null===xSeries)return{column:{name:"None",type:{name:"STRING",isNumerical:!1},label:"None",dataIndex:-1},data:[]};let data=null!==(_ref25=null!==(_response$results2=response?.results)&&void 0!==_response$results2?_response$results2:response?.result)&&void 0!==_ref25?_ref25:[],column=columns.find(n=>n.name===xSeries);return column?{column,data:data.map(n=>n[column.dataIndex])}:null}],tabularData:[state=>[state.tabularColumns,state.response],(tabularColumns,response)=>{var _ref26,_response$results3;if(!response||null===tabularColumns)return[];let data=null!==(_ref26=null!==(_response$results3=response?.results)&&void 0!==_response$results3?_response$results3:response?.result)&&void 0!==_ref26?_ref26:[];return data.map(row=>tabularColumns.map(column=>{if(!column)return{value:null,formattedValue:null,type:"STRING"};let value=row[column.column.dataIndex];if(column.column.type.isNumerical)try{if(null===value)return{value:null,formattedValue:null,type:column.column.type.name};let multiplier=column.settings?.formatting?.style==="percent"?100:1;if(column.settings?.formatting?.decimalPlaces)return{value,formattedValue:formatDataWithSettings(parseFloat((parseFloat(value.toString())*multiplier).toFixed(column.settings.formatting.decimalPlaces)),column.settings),type:column.column.type.name};let isInt=Number.isInteger(value);return{value,formattedValue:formatDataWithSettings(isInt?parseInt(value.toString(),10)*multiplier:parseFloat(value.toString())*multiplier,column.settings),type:column.column.type.name}}catch{return{value:0,formattedValue:"0",type:column.column.type.name}}return{value:convertTableValue(value,column.column.type.name),formattedValue:formatDataWithSettings(value,column.settings),type:column.column.type.name}}))}],tabularColumns:[state=>[state.tabularColumnSettings,state.response,state.columns],(tabularColumnSettings,response,columns)=>response?columns.map(col=>{var _series$settings;let series=(tabularColumnSettings||[]).find(n=>n?.name===col.name);return{column:col,data:[],settings:null!==(_series$settings=series?.settings)&&void 0!==_series$settings?_series$settings:DefaultAxisSettings()}}):[]],dataVisualizationProps:[()=>[(_,props)=>props],props=>props],isTableVisualization:[state=>[state.visualizationType],visualizationType=>visualizationType===_types__WEBPACK_IMPORTED_MODULE_7__.Qb.ActionsTable],showTableSettings:[state=>[state.visualizationType],visualizationType=>visualizationType===_types__WEBPACK_IMPORTED_MODULE_7__.Qb.ActionsTable||visualizationType===_types__WEBPACK_IMPORTED_MODULE_7__.Qb.BoldNumber]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref27=>{let{props,actions}=_ref27;return{updateChartSettings:_ref28=>{var _props$query$chartSet2;let{settings}=_ref28;actions.setQuery({...props.query,chartSettings:{...null!==(_props$query$chartSet2=props.query.chartSettings)&&void 0!==_props$query$chartSet2?_props$query$chartSet2:{},...settings}})},setQuery:_ref29=>{let{node}=_ref29;props.setQuery&&props.setQuery(node)},setVisualizationType:_ref30=>{let{visualizationType}=_ref30;actions.setQuery({...props.query,display:visualizationType})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref31=>{let{actions,props}=_ref31;if(props.query.display&&actions.setVisualizationType(props.query.display),props.query.chartSettings){let{xAxis,yAxis}=props.query.chartSettings;xAxis&&actions.updateXSeries(xAxis.column),yAxis&&yAxis.length&&yAxis.forEach(axis=>{actions.addYSeries(axis.column,axis.settings)})}props.query.tableSettings&&props.query.tableSettings.columns&&props.query.tableSettings.columns.forEach(column=>{actions.addSeries(column.column,column.settings)}),props.query.tableSettings?.conditionalFormatting?.length&&(props.query.tableSettings.conditionalFormatting.forEach(rule=>{actions.addConditionalFormattingRule(rule)}),actions.setConditionalFormattingRulesPanelActiveKeys([]))}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__.Vt)(_ref32=>{let{props,actions,values}=_ref32;return{columns:(value,oldValue)=>{if(!values.response||!values.response.results&&!values.response.result)return;let oldTabularColumnSettings=JSON.parse(JSON.stringify(values.tabularColumnSettings));if(oldValue&&oldValue.length&&JSON.stringify(value)!==JSON.stringify(oldValue)&&actions.clearAxis(),values.response&&null===values.tabularColumnSettings&&value.forEach(column=>{if(oldTabularColumnSettings){let lastValue=oldTabularColumnSettings.find(n=>n?.name===column.name);return actions.addSeries(column.name,lastValue?.settings)}actions.addSeries(column.name)}),values.response&&null===values.selectedXAxis&&null===values.selectedYAxis){let xAxisTypes=value.find(n=>-1!==n.type.name.indexOf("DATE")),yAxisTypes=value.filter(n=>n.type.isNumerical);yAxisTypes&&yAxisTypes.forEach(y=>{if(oldTabularColumnSettings){let lastValue=oldTabularColumnSettings.find(n=>n?.name===y.name);return actions.addYSeries(y.name,lastValue?.settings)}actions.addYSeries(y.name)}),xAxisTypes&&actions.updateXSeries(xAxisTypes.name)}},selectedXAxis:value=>{var _values$selectedYAxis,_props$query$chartSet3;if(values.isTableVisualization)return;let yColumns=null!==(_values$selectedYAxis=values.selectedYAxis?.filter(n=>!!n))&&void 0!==_values$selectedYAxis?_values$selectedYAxis:[];actions.setQuery({...props.query,chartSettings:{...null!==(_props$query$chartSet3=props.query.chartSettings)&&void 0!==_props$query$chartSet3?_props$query$chartSet3:{},yAxis:yColumns.map(n=>({column:n.name,settings:n.settings})),xAxis:null!==value?{column:value}:void 0}})},selectedYAxis:value=>{var _value$filter,_props$query$chartSet4;if(values.isTableVisualization)return;let yColumns=null!==(_value$filter=value?.filter(n=>!!n))&&void 0!==_value$filter?_value$filter:[],xColumn=null!==values.selectedXAxis?{column:values.selectedXAxis}:void 0;actions.setQuery({...props.query,chartSettings:{...null!==(_props$query$chartSet4=props.query.chartSettings)&&void 0!==_props$query$chartSet4?_props$query$chartSet4:{},yAxis:yColumns.map(n=>({column:n.name,settings:n.settings})),xAxis:xColumn}})},tabularColumnSettings:value=>{var _value$filter2,_props$query$tableSet;if(!values.isTableVisualization)return;let columns=null!==(_value$filter2=value?.filter(n=>!!n))&&void 0!==_value$filter2?_value$filter2:[];actions.setQuery({...props.query,tableSettings:{...null!==(_props$query$tableSet=props.query.tableSettings)&&void 0!==_props$query$tableSet?_props$query$tableSet:{},columns:columns.map(n=>({column:n.name,settings:n.settings}))}})},conditionalFormattingRules:rules=>{var _props$query$tableSet2;let saveableRules=rules.filter(n=>n.columnName&&n.input&&n.templateId&&n.bytecode.length);actions.setQuery({...props.query,tableSettings:{...null!==(_props$query$tableSet2=props.query.tableSettings)&&void 0!==_props$query$tableSet2?_props$query$tableSet2:{},conditionalFormatting:saveableRules}})}}})])},"./frontend/src/queries/nodes/DataVisualization/displayLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>displayLogic});var d3__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/d3@7.8.2/node_modules/d3/src/index.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts");let displayLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["queries","nodes","DataVisualization","displayLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({key:""}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_3__.H8,["yData","query","chartSettings"]],actions:[_dataVisualizationLogic__WEBPACK_IMPORTED_MODULE_3__.H8,["setQuery","updateChartSettings"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(_ref=>{let{values}=_ref;return{addGoalLine:()=>({yData:values.yData}),updateGoalLine:(goalLineIndex,key,value)=>({goalLineIndex,key,value}),removeGoalLine:goalLineIndex=>({goalLineIndex}),setGoalLines:goalLines=>({goalLines})}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({goalLines:[[],{addGoalLine:(state,_ref2)=>{var _yData$flatMap,_d3$mean;let{yData}=_ref2,yDataFlat=null!==(_yData$flatMap=yData?.flatMap(n=>n.data))&&void 0!==_yData$flatMap?_yData$flatMap:[],yDataAvg=Math.round(null!==(_d3$mean=d3__WEBPACK_IMPORTED_MODULE_0__.J69(yDataFlat))&&void 0!==_d3$mean?_d3$mean:0);return[...state,{label:"Q4 Goal",value:null!=yDataAvg?yDataAvg:0}]},removeGoalLine:(state,_ref3)=>{let{goalLineIndex}=_ref3,goalLines=[...state];return goalLines.splice(goalLineIndex,1),goalLines},updateGoalLine:(state,_ref4)=>{let{goalLineIndex,key,value}=_ref4,goalLines=[...state];return"value"===key?Number.isNaN(value)?goalLines[goalLineIndex][key]=0:goalLines[goalLineIndex][key]=parseInt(value.toString()):goalLines[goalLineIndex][key]=value,goalLines},setGoalLines:(_state,_ref5)=>{let{goalLines}=_ref5;return goalLines}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref6=>{let{values,actions}=_ref6,chartSettings=values.query.chartSettings;chartSettings?.goalLines&&actions.setGoalLines(chartSettings.goalLines)}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref7=>{let{values,actions}=_ref7;return{goalLines:value=>{let goalLines=value.length>0?value:void 0;actions.setQuery({...values.query,chartSettings:{...values.query.chartSettings,goalLines}})}}})])},"./frontend/src/queries/nodes/DataVisualization/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>FORMATTING_TEMPLATES});let FORMATTING_TEMPLATES=[{id:"equals",label:"Is equal to",hog:"return value == input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL","STRING"]},{id:"not_equals",label:"Is not equal to",hog:"return value != input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL","STRING"]},{id:"greater_than",label:"Is greater than",hog:"return value > input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL"]},{id:"greater_than_equal",label:"Is greater than or equal to",hog:"return value >= input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL"]},{id:"less_than",label:"Is less than",hog:"return value < input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL"]},{id:"less_than_equal",label:"Is less than or equal to",hog:"return value <= input",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL"]},{id:"is_null",label:"Is null",hog:"return value == null",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL","STRING"],hideInput:!0},{id:"is_not_null",label:"Is not null",hog:"return value != null",availableColumnTypes:["INTEGER","FLOAT","DATETIME","DATE","BOOLEAN","DECIMAL","STRING"],hideInput:!0}]},"./frontend/src/queries/nodes/EventsNode/EventPropertyFilters.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>EventPropertyFilters});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_PropertyFilters_PropertyFilters__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_models_groupsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/groupsModel.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/utils.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let uniqueNode=0;function EventPropertyFilters(_ref){let{query,setQuery,taxonomicGroupTypes}=_ref,[id]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>uniqueNode++),properties=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Vf)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Sy)(query)?query.filters?.properties:query.properties,eventNames=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Vf)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Sy)(query)?[]:query.event?[query.event]:[],{groupsTaxonomicTypes}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(_models_groupsModel__WEBPACK_IMPORTED_MODULE_4__.$);return!properties||Array.isArray(properties)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyFilters_PropertyFilters__WEBPACK_IMPORTED_MODULE_1__.t,{propertyFilters:properties||[],taxonomicGroupTypes:taxonomicGroupTypes||[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.EventProperties,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.PersonProperties,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.EventFeatureFlags,...groupsTaxonomicTypes,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.Cohorts,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.Elements,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_2__.t.HogQLExpression],onChange:value=>{if((0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Vf)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.Sy)(query)){var _query$filters;setQuery?.({...query,filters:{...null!==(_query$filters=query.filters)&&void 0!==_query$filters?_query$filters:{},properties:value}})}else setQuery?.({...query,properties:value})},pageKey:`EventPropertyFilters.${id}`,eventNames:eventNames}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div",{children:"Error: property groups are not supported."})}},"./frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>HogQLQueryEditor});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),FlaggedFeature=__webpack_require__("./frontend/src/lib/components/FlaggedFeature.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),CodeEditor=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),codeEditorLogic=__webpack_require__("./frontend/src/lib/monaco/codeEditorLogic.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),dataWarehouseSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),api=__webpack_require__("./frontend/src/lib/api.ts"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let hogQLQueryEditorLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","nodes","HogQLQuery","hogQLQueryEditorLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.key),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref,selection=props.editor?.getSelection(),model=props.editor?.getModel(),highlightedQuery=selection&&model?model.getValueInRange(selection):null;highlightedQuery&&props.query.query===highlightedQuery||props.query.query===oldProps.query.query&&props.editor===oldProps.editor||actions.setQueryInput(props.query.query)}),(0,index_esm.connect)({values:[featureFlagLogic.h,["featureFlags"]],actions:[dataWarehouseViewsLogic.$,["createDataWarehouseSavedQuery"],dataWarehouseSceneLogic.M,["updateView"]]}),(0,index_esm.actions)({saveQuery:queryOverride=>({queryOverride}),setQueryInput:queryInput=>({queryInput}),setPrompt:prompt=>({prompt}),setPromptError:error=>({error}),draftFromPrompt:!0,draftFromPromptComplete:!0,saveAsView:!0,saveAsViewSuccess:name=>({name}),onUpdateView:!0}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{queryInput:[props.query.query,{setQueryInput:(_,_ref3)=>{let{queryInput}=_ref3;return queryInput}}],prompt:["",{setPrompt:(_,_ref4)=>{let{prompt}=_ref4;return prompt}}],promptError:[null,{setPromptError:(_,_ref5)=>{let{error}=_ref5;return error},draftFromPrompt:()=>null,saveQuery:()=>null}],promptLoading:[!1,{draftFromPrompt:()=>!0,draftFromPromptComplete:()=>!1}]}}),(0,index_esm.selectors)({aiAvailable:[()=>[preflightLogic.preflightLogic.selectors.preflight],preflight=>preflight?.openai_available],multitab:[s=>[s.featureFlags,()=>!!dataWarehouseSceneLogic.M.findMounted()?.values.editingView],(featureFlags,isEditingView)=>!!(featureFlags[constants.y8.MULTITAB_EDITOR]&&lib.router.values.location.pathname.includes(urls.j.dataWarehouse())&&0===Object.keys(lib.router.values.hashParams).length&&!isEditingView)]}),(0,index_esm.listeners)(_ref6=>{let{actions,props,values}=_ref6;return{saveQuery:_ref7=>{let{queryOverride}=_ref7,query=values.queryInput;actions.setQueryInput(query),props.setQuery?.({...props.query,query:null!=queryOverride?queryOverride:query})},setQueryInput:async _ref8=>{let{queryInput}=_ref8;props.onChange?.(queryInput)},draftFromPrompt:async()=>{if(!values.aiAvailable)throw Error("To use AI features, configure environment variable OPENAI_API_KEY for this instance of PostHog");try{let result=await api.ZP.get((0,lib.combineUrl)("api/projects/@current/query/draft_sql/",{prompt:values.prompt,current_query:values.queryInput}).url),{sql}=result;actions.setQueryInput(sql)}catch(e){actions.setPromptError(e.detail)}finally{actions.draftFromPromptComplete()}},saveAsView:async()=>{src.dn.openForm({title:"Save as view",initialValues:{viewName:""},content:(0,jsx_runtime.jsx)(LemonField.D,{name:"viewName",children:(0,jsx_runtime.jsx)(src.DF,{placeholder:"Please enter the name of the view",autoFocus:!0})}),errors:{viewName:name=>name?void 0:"You must enter a name"},onSubmit:_ref9=>{let{viewName}=_ref9;return actions.saveAsViewSuccess(viewName)}})},saveAsViewSuccess:async _ref10=>{var _props$queryResponse$;let{name}=_ref10,query={kind:schema.OH.HogQLQuery,query:values.queryInput},types=null!==(_props$queryResponse$=props.queryResponse?.types)&&void 0!==_props$queryResponse$?_props$queryResponse$:[];await dataWarehouseViewsLogic.$.asyncActions.createDataWarehouseSavedQuery({name,query,types})},onUpdateView:async()=>{var _props$queryResponse$2;let types=null!==(_props$queryResponse$2=props.queryResponse?.types)&&void 0!==_props$queryResponse$2?_props$queryResponse$2:[];actions.updateView(values.queryInput,types)}}})]),uniqueNode=0;function HogQLQueryEditor(props){let editorRef=(0,react.useRef)(null),[key,setKey]=(0,react.useState)(()=>lib.router.values.location.pathname.includes(urls.j.dataWarehouse())?lib.router.values.location.pathname:uniqueNode++);(0,react.useEffect)(()=>{lib.router.values.location.pathname.includes(urls.j.dataWarehouse())&&setKey(lib.router.values.location.pathname)},[lib.router.values.location.pathname]);let[monacoAndEditor,setMonacoAndEditor]=(0,react.useState)(null),[monaco,editor]=null!=monacoAndEditor?monacoAndEditor:[],hogQLQueryEditorLogicProps={query:props.query,setQuery:props.setQuery,onChange:props.onChange,key,editor,monaco,queryResponse:props.queryResponse},logic=hogQLQueryEditorLogic(hogQLQueryEditorLogicProps),{queryInput,prompt,aiAvailable,promptError,promptLoading,multitab}=(0,index_esm.useValues)(logic),{setQueryInput,saveQuery,setPrompt,draftFromPrompt,saveAsView,onUpdateView}=(0,index_esm.useActions)(logic),codeEditorKey=`hogQLQueryEditor/${key}`,codeEditorLogicProps={key:codeEditorKey,sourceQuery:props.query,query:queryInput,language:"hogQL",metadataFilters:props.query.filters,multitab},{hasErrors,error,isValidView,activeModelUri,allModels}=(0,index_esm.useValues)((0,codeEditorLogic.Pc)(codeEditorLogicProps)),{createModel,setModel,deleteModel,setModels,addModel,updateState}=(0,index_esm.useActions)((0,codeEditorLogic.Pc)(codeEditorLogicProps)),{editingView}=(0,index_esm.useValues)((0,dataWarehouseSceneLogic.M)({monaco,editor})),monacoDisposables=(0,react.useRef)([]);return(0,react.useEffect)(()=>()=>{monacoDisposables.current.forEach(d=>d?.dispose())},[]),(0,react.useEffect)(()=>{if(monaco&&activeModelUri&&multitab){let _model=monaco.editor.getModel(activeModelUri),val=_model?.getValue();val&&(setQueryInput(val),saveQuery())}},[activeModelUri]),(0,jsx_runtime.jsx)("div",{className:"flex items-start gap-2",children:(0,jsx_runtime.jsxs)("div",{"data-attr":"hogql-query-editor",className:(0,clsx_m.default)("flex flex-col rounded space-y-2 w-full overflow-hidden",!props.embedded&&"p-2 border"),children:[(0,jsx_runtime.jsx)(FlaggedFeature.P,{flag:constants.y8.ARTIFICIAL_HOG,children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-2",children:[(0,jsx_runtime.jsx)(src.DF,{className:"grow",prefix:(0,jsx_runtime.jsx)(posthog_icons_es.IconMagicWand,{}),value:prompt,onPressEnter:()=>draftFromPrompt(),onChange:value=>setPrompt(value),placeholder:aiAvailable?"What do you want to know? How would you like to tweak the query?":"To use AI features, set environment variable OPENAI_API_KEY for this instance of PostHog",disabled:!aiAvailable,maxLength:400}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",onClick:()=>draftFromPrompt(),disabledReason:aiAvailable?prompt?null:"Provide a prompt first":"Environment variable OPENAI_API_KEY is unset for this instance of PostHog",tooltipPlacement:"left",loading:promptLoading,children:"Think"})]})}),promptError?(0,jsx_runtime.jsx)(LemonBanner.V,{type:"warning",children:promptError}):null,(0,jsx_runtime.jsxs)("div",{className:"relative flex-1 overflow-hidden flex-col",children:[multitab&&(0,jsx_runtime.jsxs)("div",{className:"flex flex-row overflow-scroll hide-scrollbar",children:[allModels.map(model=>(0,jsx_runtime.jsx)(QueryTab,{active:model.path===activeModelUri?.path,model:model,onClick:setModel,onClear:allModels.length>1?deleteModel:void 0},model.path)),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{createModel()},icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{fontSize:14})})]}),(0,jsx_runtime.jsx)("div",{ref:editorRef,className:"resize-y overflow-hidden",style:{height:222},children:(0,jsx_runtime.jsx)(CodeEditor.p,{queryKey:codeEditorKey,sourceQuery:props.query,className:"border rounded-b overflow-hidden h-full",language:"hogQL",value:queryInput,onChange:v=>{setQueryInput(null!=v?v:""),updateState()},height:"100%",onMount:(editor,monaco)=>{setMonacoAndEditor([monaco,editor]);let allModelQueries=localStorage.getItem((0,codeEditorLogic.nz)(codeEditorKey)),activeModelUri=localStorage.getItem((0,codeEditorLogic.nx)(codeEditorKey));if(allModelQueries&&multitab){monaco.editor.getModels().forEach(model=>{model.dispose()});let models=JSON.parse(allModelQueries||"[]"),newModels=[];if(models.forEach(model=>{if(monaco){let uri=monaco.Uri.parse(model.path),newModel=monaco.editor.createModel(model.query,"hogQL",uri);editor?.setModel(newModel),newModels.push(uri)}}),setModels(newModels),activeModelUri){let uri=monaco.Uri.parse(activeModelUri),activeModel=monaco.editor.getModels().find(model=>model.uri.path===uri.path);activeModel&&editor?.setModel(activeModel);let val=activeModel?.getValue();val&&(setQueryInput(val),saveQuery()),setModel(uri)}else newModels.length&&setModel(newModels[0])}else{let model=editor.getModel();model&&(addModel(model.uri),setModel(model.uri))}},onPressCmdEnter:(value,selectionType)=>{value&&"selection"===selectionType?saveQuery(value):saveQuery()},options:{minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,suggest:{showInlineDetails:!0},quickSuggestionsDelay:300}})})]}),(0,jsx_runtime.jsx)("div",{className:"flex flex-row px-px",children:props.editorFooter?props.editorFooter(hasErrors,error,isValidView):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>saveQuery(),type:"primary",disabledReason:props.setQuery?hasErrors?null!=error?error:"Query has errors":void 0:"No permission to update",center:!0,fullWidth:!0,"data-attr":"hogql-query-editor-save",children:props.setQuery?"Update and run":"No permission to update"})}),editingView?(0,jsx_runtime.jsx)(LemonButton.J,{className:"ml-2",onClick:onUpdateView,type:"primary",center:!0,disabledReason:hasErrors?null!=error?error:"Query has errors":isValidView?"":"Some fields may need an alias","data-attr":"hogql-query-editor-update-view",children:"Update view"}):(0,jsx_runtime.jsx)(LemonButton.J,{className:"ml-2",onClick:saveAsView,type:"primary",center:!0,disabledReason:hasErrors?null!=error?error:"Query has errors":isValidView?"":"Some fields may need an alias","data-attr":"hogql-query-editor-save-as-view",tooltip:(0,jsx_runtime.jsxs)("div",{children:["Save a query as a view that can be referenced in another query. This is useful for modeling data and organizing large queries into readable chunks."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/data-warehouse",children:"More Info"})," "]}),children:"Save as view"})]})})]})})}function QueryTab(_ref){let{model,active,onClear,onClick}=_ref;return(0,jsx_runtime.jsxs)("button",{onClick:()=>onClick?.(model),className:(0,clsx_m.default)("space-y-px rounded-t p-1 flex flex-row items-center gap-1 hover:bg-[var(--bg-light)] cursor-pointer",active?"bg-[var(--bg-light)] border":"bg-bg-3000",onClear?"pl-3 pr-2":"px-4"),children:["Query "+model.path.split("/").pop(),onClear&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:e=>{e.stopPropagation(),onClear(model)},size:"xsmall",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{})})]})}},"./frontend/src/queries/nodes/HogQLX/render.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>function renderHogQLX(value){let object=function parseHogQLX(value){if(!Array.isArray(value))return value;if("__hx_tag"===value[0]){let object={},start="__hx_obj"===value[1]?2:0;for(let i=start;iparseHogQLX(v))}(value);if("object"==typeof object){if(Array.isArray(object))return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_components_JSONViewer__WEBPACK_IMPORTED_MODULE_1__.C,{src:object,name:null,collapsed:object.length>10?0:1});let{__hx_tag:tag,...rest}=object;if(!tag)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_components_JSONViewer__WEBPACK_IMPORTED_MODULE_1__.C,{src:rest,name:null,collapsed:Object.keys(rest).length>10?0:1});if("Sparkline"===tag){let{data,type,...props}=rest;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__.S,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_components_Sparkline__WEBPACK_IMPORTED_MODULE_2__.b,{className:"h-8",...props,data:null!=data?data:[],type:type})})}if("RecordingButton"===tag){let{sessionId,...props}=rest;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__.S,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lib_components_ViewRecordingButton__WEBPACK_IMPORTED_MODULE_3__.Z,{inModal:!0,sessionId:sessionId,type:"primary",size:"xsmall","data-attr":"hog-ql-view-recording-button",className:"inline-block",...props})})}if("a"===tag){let{href,source,target}=rest;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__.S,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:href,target:null!=target?target:"_self",children:source?renderHogQLX(source):href})})}else if("strong"===tag){let{source}=rest;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__.S,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("strong",{children:renderHogQLX(source)})})}else if("em"===tag){let{source}=rest;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__.S,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("em",{children:renderHogQLX(source)})})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{children:["Unknown tag: ",String(tag)]})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:String(value)})}});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),lib_components_JSONViewer__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/JSONViewer.tsx"),lib_components_Sparkline__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/Sparkline.tsx"),lib_components_ViewRecordingButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/ViewRecordingButton.tsx"),_layout_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/layout/ErrorBoundary/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js")},"./frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NG:()=>actionsAndEventsToSeries,Ic:()=>breakdownFilterToQuery,P0:()=>compareFilterToQuery,aP:()=>exlusionEntityToNode,wK:()=>filtersToQueryNode,Sk:()=>funnelsFilterToQuery,pE:()=>legacyEntityToNode,oW:()=>lifecycleFilterToQuery,iE:()=>pathsFilterToQuery,iq:()=>retentionFilterToQuery,d6:()=>sanitizeRetentionEntity,jx:()=>stickinessFilterToQuery,XK:()=>trendsFilterToQuery});var esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),funnelUtils=__webpack_require__("./frontend/src/scenes/funnels/funnelUtils.ts"),ActionFilterRow=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.tsx"),sharedUtils=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let cleanGlobalProperties=properties=>void 0==properties||Array.isArray(properties)&&0==properties.length||0==Object.keys(properties).length?void 0:(isOldStyleProperties(properties)?properties={type:"AND",values:[{type:"AND",values:properties=transformOldStyleProperties(properties)}]}:Array.isArray(properties)?properties={type:"AND",values:[{type:"AND",values:properties}]}:"AND"!==properties.type&&"OR"!==properties.type||properties.values.some(property=>"AND"===property.type||"OR"===property.type)||(properties={type:"AND",values:[properties]}),cleanPropertyGroupFilter(properties)),cleanEntityProperties=properties=>{if(!(void 0==properties||Array.isArray(properties)&&0==properties.length)&&0!=Object.keys(properties).length){if(isOldStyleProperties(properties))return transformOldStyleProperties(properties);if(Array.isArray(properties))return properties.map(cleanProperty);if(("AND"===properties.type||"OR"===properties.type)&&!properties.values.some(property=>"AND"===property.type||"OR"===property.type))return properties.values.map(cleanProperty);throw Error("Unexpected format of entity properties.")}},cleanPropertyGroupFilter=properties=>(properties.values=cleanPropertyGroupFilterValues(properties.values),properties),cleanPropertyGroupFilterValues=properties=>properties.map(cleanPropertyGroupFilterValue),cleanPropertyGroupFilterValue=property=>"AND"==property.type||"OR"==property.type?(property.values=cleanPropertyGroupFilterValues(property.values),property):cleanProperty(property),cleanProperty=property=>0===Object.keys(property).length||void 0===property.type?{type:types.FT.HogQL,key:"true"}:("events"===property.type&&(property.type="event"),void 0!==property.values&&void 0===property.value&&(property.value=property.values,delete property.values),["precalculated-cohort","static-cohort"].includes(property.type)&&(property.type="cohort"),"cohort"===property.type&&"id"!==property.key&&(property.key="id"),isPropertyWithOperator(property)&&void 0===property.operator&&(property.operator="exact"),isPropertyWithOperator(property)||void 0===property.operator||delete property.operator,"cohort"===property.type&&void 0!==property.negation&&(property.operator===types.WV.Exact&&property.negation&&(property.operator=types.WV.NotIn),delete property.negation),Array.isArray(property.value)&&(property.value=property.value.filter(x=>null!==x)),Object.keys(property).forEach(key=>{void 0===property[key]&&delete property[key]}),property),isPropertyWithOperator=property=>!["hogql"].includes(property.type),isOldStyleProperties=properties=>!Array.isArray(properties)&&1===Object.keys(properties).length&&!["AND","OR"].includes(properties.type),transformOldStyleProperties=properties=>{let key=Object.keys(properties)[0],value=Object.values(properties)[0],keySplit=key.split("__");return[{key:keySplit[0],value:value,operator:keySplit.length>1?keySplit[1]:types.WV.Exact,type:types.FT.Event}]},insightTypeToNodeKind={[types.dw.TRENDS]:schema.OH.TrendsQuery,[types.dw.FUNNELS]:schema.OH.FunnelsQuery,[types.dw.RETENTION]:schema.OH.RetentionQuery,[types.dw.PATHS]:schema.OH.PathsQuery,[types.dw.STICKINESS]:schema.OH.StickinessQuery,[types.dw.LIFECYCLE]:schema.OH.LifecycleQuery},actorsOnlyMathTypes=[types.vN.UniqueUsers,types.vN.WeeklyActiveUsers,types.vN.MonthlyActiveUsers,types.OU.UniqueGroup,types.mY.HogQL],funnelsMathTypes=[types.S7.FirstTimeForUser,types.S7.FirstTimeForUserWithFilters],legacyEntityToNode=(entity,includeProperties,mathAvailability)=>{let shared={name:entity.name||void 0,custom_name:entity.custom_name||void 0};return((0,types.U6)(entity)&&(shared={...shared,id_field:entity.id_field||void 0,timestamp_field:entity.timestamp_field||void 0,distinct_id_field:entity.distinct_id_field||void 0,table_name:entity.table_name||void 0}),includeProperties&&(shared={...shared,properties:cleanEntityProperties(entity.properties)}),mathAvailability!==ActionFilterRow.Qq.None&&(mathAvailability!==ActionFilterRow.Qq.ActorsOnly||actorsOnlyMathTypes.includes(entity.math)?mathAvailability===ActionFilterRow.Qq.FunnelsOnly?funnelsMathTypes.includes(entity.math)&&(shared={...shared,math:entity.math}):shared={...shared,math:entity.math||"total",math_property:entity.math_property,math_property_type:entity.math_property_type,math_hogql:entity.math_hogql,math_group_type_index:entity.math_group_type_index}:shared={...shared,math:types.vN.UniqueUsers}),"actions"===entity.type)?(0,utils.jU)({kind:schema.OH.ActionsNode,id:entity.id,...shared}):"data_warehouse"===entity.type?(0,utils.jU)({kind:schema.OH.DataWarehouseNode,id:entity.id,...shared}):(0,utils.jU)({kind:schema.OH.EventsNode,event:entity.id,...shared})},exlusionEntityToNode=entity=>{let baseEntity=legacyEntityToNode(entity,!1,ActionFilterRow.Qq.None);return{...baseEntity,funnelFromStep:entity.funnel_from_step,funnelToStep:entity.funnel_to_step}},actionsAndEventsToSeries=(_ref,includeProperties,includeMath)=>{let{actions,events,data_warehouse,new_entity}=_ref,series=[...actions||[],...events||[],...data_warehouse||[],...new_entity||[]].sort((a,b)=>a.order||b.order?a.order?b.order?a.order-b.order:1:-1:0).map(f=>legacyEntityToNode(f,includeProperties,includeMath));return series},hiddenLegendKeysToIndexes=hidden_legend_keys=>hidden_legend_keys?Object.entries(hidden_legend_keys).filter(_ref2=>{let[k,v]=_ref2;return/^\d+$/.test(k)&&!0===v}).map(_ref3=>{let[k]=_ref3;return Number(k)}):void 0,hiddenLegendKeysToBreakdowns=hidden_legend_keys=>hidden_legend_keys?Object.entries((0,funnelUtils.oH)(hidden_legend_keys)).filter(_ref4=>{let[k,v]=_ref4;return!/^\d+$/.test(k)&&!0===v}).map(_ref5=>{let[k]=_ref5;return k}):void 0,sanitizeRetentionEntity=entity=>{if(!entity)return;let record={...entity};for(let key of Object.keys(record))["id","kind","name","type","order","uuid","custom_name"].includes(key)||delete record[key];return"id"in record&&"actions"===record.type&&(record.id=Number(record.id)),record},processBool=value=>{if(null!=value)return"boolean"==typeof value?value:"string"==typeof value&&strToBool(value)},strToBool=value=>{if(null!=value)return["y","yes","t","true","on","1"].includes(String(value).toLowerCase())},filtersToQueryNode=filters=>{if(!filters.insight)throw Error('filtersToQueryNode expects "insight"');let query={kind:insightTypeToNodeKind[filters.insight],properties:cleanGlobalProperties(filters.properties),filterTestAccounts:filters.filter_test_accounts};if(filters.sampling_factor&&(query.samplingFactor=filters.sampling_factor),query.dateRange=(0,utils.jU)({date_to:filters.date_to,date_from:filters.date_from,explicitDate:processBool(filters.explicit_date)}),(0,queries_utils.B8)(query)){let includeMath=ActionFilterRow.Qq.None;(0,queries_utils.kX)(query)?includeMath=ActionFilterRow.Qq.All:(0,queries_utils.vy)(query)?includeMath=ActionFilterRow.Qq.ActorsOnly:(0,queries_utils.Wl)(query)&&(includeMath=ActionFilterRow.Qq.FunnelsOnly);let{events,actions,data_warehouse}=filters;query.series=actionsAndEventsToSeries({actions,events,data_warehouse},!0,includeMath),query.interval=filters.interval}return(0,queries_utils.CN)(query)&&(null!=filters.breakdowns?((0,sharedUtils.e1)(filters)&&(1===filters.breakdowns.length?(filters.breakdown_type=filters.breakdowns[0].type||"event",filters.breakdown=filters.breakdowns[0].property):esm_exports.Tb(Error("Could not convert multi-breakdown property `breakdowns` - found more than one breakdown"),{tags:{DataExploration:!0},extra:{filters}})),(0,sharedUtils.pM)(filters)&&(filters.breakdowns=filters.breakdowns.map(b=>({...b,type:b.type||filters.breakdown_type||"event"})))):null!=filters.breakdown&&null==filters.breakdown_type&&(filters.breakdown_type="event"),query.breakdownFilter=breakdownFilterToQuery(filters,(0,sharedUtils.pM)(filters))),(0,queries_utils.DM)(query)&&(query.compareFilter=compareFilterToQuery(filters)),void 0!==filters.aggregation_group_type_index&&(query.aggregation_group_type_index=filters.aggregation_group_type_index),(0,sharedUtils.pM)(filters)&&(0,queries_utils.kX)(query)&&(query.trendsFilter=trendsFilterToQuery(filters)),(0,sharedUtils.e1)(filters)&&(0,queries_utils.Wl)(query)&&(query.funnelsFilter=funnelsFilterToQuery(filters)),(0,sharedUtils.A6)(filters)&&(0,queries_utils.I5)(query)&&(query.retentionFilter=retentionFilterToQuery(filters)),(0,sharedUtils.MS)(filters)&&(0,queries_utils.Qp)(query)&&(query.pathsFilter=pathsFilterToQuery(filters),query.funnelPathsFilter=filtersToFunnelPathsQuery(filters)),(0,sharedUtils.jk)(filters)&&(0,queries_utils.vy)(query)&&(query.stickinessFilter=stickinessFilterToQuery(filters)),(0,sharedUtils.Ni)(filters)&&(0,queries_utils.Vr)(query)&&(query.lifecycleFilter=lifecycleFilterToQuery(filters)),(0,utils.jU)(query,["series"])},trendsFilterToQuery=filters=>(0,utils.jU)({smoothingIntervals:filters.smoothing_intervals,showLegend:filters.show_legend,showAlertThresholdLines:filters.show_alert_threshold_lines,hiddenLegendIndexes:hiddenLegendKeysToIndexes(filters.hidden_legend_keys),aggregationAxisFormat:filters.aggregation_axis_format,aggregationAxisPrefix:filters.aggregation_axis_prefix,aggregationAxisPostfix:filters.aggregation_axis_postfix,decimalPlaces:filters.decimal_places,formula:filters.formula,display:filters.display,showValuesOnSeries:filters.show_values_on_series,showPercentStackView:filters.show_percent_stack_view,showLabelsOnSeries:filters.show_labels_on_series,yAxisScaleType:filters.y_axis_scale_type}),funnelsFilterToQuery=filters=>(0,utils.jU)({funnelVizType:filters.funnel_viz_type,funnelFromStep:filters.funnel_from_step,funnelToStep:filters.funnel_to_step,funnelStepReference:filters.funnel_step_reference,breakdownAttributionType:filters.breakdown_attribution_type,breakdownAttributionValue:filters.breakdown_attribution_value,binCount:filters.bin_count,funnelWindowIntervalUnit:filters.funnel_window_interval_unit,funnelWindowInterval:filters.funnel_window_interval,funnelOrderType:filters.funnel_order_type,exclusions:void 0!==filters.exclusions?filters.exclusions.map(entity=>exlusionEntityToNode(entity)):void 0,layout:filters.layout,hiddenLegendBreakdowns:hiddenLegendKeysToBreakdowns(filters.hidden_legend_keys),funnelAggregateByHogQL:filters.funnel_aggregate_by_hogql}),retentionFilterToQuery=filters=>(0,utils.jU)({retentionType:filters.retention_type,retentionReference:filters.retention_reference,totalIntervals:filters.total_intervals,returningEntity:sanitizeRetentionEntity(filters.returning_entity),targetEntity:sanitizeRetentionEntity(filters.target_entity),period:filters.period,showMean:filters.show_mean,cumulative:filters.cumulative}),pathsFilterToQuery=filters=>(0,utils.jU)({pathsHogQLExpression:filters.paths_hogql_expression,includeEventTypes:filters.include_event_types,startPoint:filters.start_point,endPoint:filters.end_point,pathGroupings:filters.path_groupings,excludeEvents:filters.exclude_events,stepLimit:filters.step_limit,pathReplacements:filters.path_replacements,localPathCleaningFilters:filters.local_path_cleaning_filters,edgeLimit:filters.edge_limit,minEdgeWeight:filters.min_edge_weight,maxEdgeWeight:filters.max_edge_weight}),filtersToFunnelPathsQuery=filters=>{if(void 0!==filters.funnel_paths&&void 0!==filters.funnel_filter)return{funnelPathType:filters.funnel_paths,funnelSource:filtersToQueryNode(filters.funnel_filter),funnelStep:filters.funnel_filter?.funnel_step}},stickinessFilterToQuery=filters=>(0,utils.jU)({display:filters.display,showLegend:filters.show_legend,hiddenLegendIndexes:hiddenLegendKeysToIndexes(filters.hidden_legend_keys),showValuesOnSeries:filters.show_values_on_series}),lifecycleFilterToQuery=filters=>(0,utils.jU)({showLegend:filters.show_legend,toggledLifecycles:filters.toggledLifecycles,showValuesOnSeries:filters.show_values_on_series}),breakdownFilterToQuery=(filters,isTrends)=>(0,utils.jU)({breakdown_type:filters.breakdown_type,breakdown:filters.breakdown,breakdown_normalize_url:filters.breakdown_normalize_url,breakdowns:filters.breakdowns,breakdown_group_type_index:filters.breakdown_group_type_index,breakdown_limit:filters.breakdown_limit,...isTrends?{breakdown_histogram_bin_count:filters.breakdown_histogram_bin_count,breakdown_hide_other_aggregation:filters.breakdown_hide_other_aggregation}:{}}),compareFilterToQuery=filters=>(0,utils.jU)({compare:filters.compare,compare_to:filters.compare_to})},"./frontend/src/queries/nodes/InsightQuery/utils/queryNodeToFilter.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AG:()=>seriesNodeToFilter,Wz:()=>nodeKindToInsightType,ce:()=>queryNodeToFilter,sB:()=>seriesToActionsAndEvents});var lib_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/utils.tsx"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/types.ts");let seriesNodeToFilter=(node,index)=>{let entity=(0,lib_utils__WEBPACK_IMPORTED_MODULE_0__.hO)({type:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.oX)(node)?_types__WEBPACK_IMPORTED_MODULE_3__.DC.DATA_WAREHOUSE:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.VU)(node)?_types__WEBPACK_IMPORTED_MODULE_3__.DC.ACTIONS:_types__WEBPACK_IMPORTED_MODULE_3__.DC.EVENTS,id:(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.oX)(node)?node.table_name:((0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.VU)(node)?node.id:node.event)||null,order:index,name:node.name,custom_name:node.custom_name,math:node.math,math_property:node.math_property,math_property_type:node.math_property_type,math_hogql:node.math_hogql,math_group_type_index:node.math_group_type_index,properties:node.properties,...(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.oX)(node)?{table_name:node.table_name,id_field:node.id_field,timestamp_field:node.timestamp_field,distinct_id_field:node.distinct_id_field}:{}});return entity},seriesToActionsAndEvents=series=>{let actions=[],events=[],data_warehouse=[],new_entity=[];return series.forEach((node,index)=>{let entity=seriesNodeToFilter(node,index);(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.cT)(node)?events.push(entity):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.VU)(node)?actions.push(entity):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.oX)(node)?data_warehouse.push(entity):new_entity.push(entity)}),{actions,events,data_warehouse,new_entity}},hiddenLegendItemsToKeys=hidden_items=>hidden_items?.reduce((k,b)=>({...k,[b]:!0}),{}),nodeKindToInsightType={[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.TrendsQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.TRENDS,[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.FunnelsQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.FUNNELS,[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.RetentionQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.RETENTION,[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PathsQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.PATHS,[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.StickinessQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.STICKINESS,[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.LifecycleQuery]:_types__WEBPACK_IMPORTED_MODULE_3__.dw.LIFECYCLE},nodeKindToFilterKey={[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.TrendsQuery]:"trendsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.FunnelsQuery]:"funnelsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.RetentionQuery]:"retentionFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.PathsQuery]:"pathsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.StickinessQuery]:"stickinessFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.LifecycleQuery]:"lifecycleFilter"},queryNodeToFilter=query=>{let filters=(0,lib_utils__WEBPACK_IMPORTED_MODULE_0__.hO)({insight:nodeKindToInsightType[query.kind],properties:query.properties,filter_test_accounts:query.filterTestAccounts,date_to:query.dateRange?.date_to,date_from:query.dateRange?.date_from,explicit_date:query.dateRange?.explicitDate,entity_type:"events",sampling_factor:query.samplingFactor});if(!(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.I5)(query)&&!(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Qp)(query)){let{actions,events,data_warehouse,new_entity}=seriesToActionsAndEvents(query.series);actions.length>0&&(filters.actions=actions),events.length>0&&(filters.events=events),data_warehouse.length>0&&(filters.data_warehouse=data_warehouse),new_entity.length>0&&(filters.new_entity=new_entity)}((0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.kX)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Wl)(query))&&query.breakdownFilter&&Object.assign(filters,(0,lib_utils__WEBPACK_IMPORTED_MODULE_0__.hO)(query.breakdownFilter)),((0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.kX)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.vy)(query))&&query.compareFilter&&Object.assign(filters,(0,lib_utils__WEBPACK_IMPORTED_MODULE_0__.hO)(query.compareFilter)),(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.vy)(query)||Object.assign(filters,(0,lib_utils__WEBPACK_IMPORTED_MODULE_0__.hO)({aggregation_group_type_index:query.aggregation_group_type_index})),((0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.kX)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.vy)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Vr)(query)||(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Wl)(query))&&(filters.interval=query.interval);let queryCopy=JSON.parse(JSON.stringify(query)),camelCasedTrendsProps={},camelCasedFunnelsProps={},camelCasedRetentionProps={},camelCasedPathsProps={},camelCasedStickinessProps={},camelCasedLifecycleProps={};return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.kX)(queryCopy)?(camelCasedTrendsProps.hidden_legend_keys=hiddenLegendItemsToKeys(queryCopy.trendsFilter?.hiddenLegendIndexes),camelCasedTrendsProps.smoothing_intervals=queryCopy.trendsFilter?.smoothingIntervals,camelCasedTrendsProps.decimal_places=queryCopy.trendsFilter?.decimalPlaces,camelCasedTrendsProps.aggregation_axis_format=queryCopy.trendsFilter?.aggregationAxisFormat,camelCasedTrendsProps.aggregation_axis_postfix=queryCopy.trendsFilter?.aggregationAxisPostfix,camelCasedTrendsProps.aggregation_axis_prefix=queryCopy.trendsFilter?.aggregationAxisPrefix,camelCasedTrendsProps.show_labels_on_series=queryCopy.trendsFilter?.showLabelsOnSeries,camelCasedTrendsProps.show_percent_stack_view=queryCopy.trendsFilter?.showPercentStackView,camelCasedTrendsProps.show_legend=queryCopy.trendsFilter?.showLegend,camelCasedTrendsProps.show_values_on_series=queryCopy.trendsFilter?.showValuesOnSeries,camelCasedTrendsProps.y_axis_scale_type=queryCopy.trendsFilter?.yAxisScaleType,delete queryCopy.trendsFilter?.hiddenLegendIndexes,delete queryCopy.trendsFilter?.smoothingIntervals,delete queryCopy.trendsFilter?.decimalPlaces,delete queryCopy.trendsFilter?.aggregationAxisFormat,delete queryCopy.trendsFilter?.aggregationAxisPostfix,delete queryCopy.trendsFilter?.aggregationAxisPrefix,delete queryCopy.trendsFilter?.showLabelsOnSeries,delete queryCopy.trendsFilter?.showPercentStackView,delete queryCopy.trendsFilter?.showLegend,delete queryCopy.trendsFilter?.showValuesOnSeries,delete queryCopy.trendsFilter?.yAxisScaleType):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Wl)(queryCopy)?(camelCasedFunnelsProps.exclusions=queryCopy.funnelsFilter?.exclusions?queryCopy.funnelsFilter.exclusions.map((_ref,index)=>{let{funnelFromStep,funnelToStep,...rest}=_ref;return{funnel_from_step:funnelFromStep,funnel_to_step:funnelToStep,order:index,...seriesNodeToFilter(rest)}}):void 0,camelCasedFunnelsProps.bin_count=queryCopy.funnelsFilter?.binCount,camelCasedFunnelsProps.breakdown_attribution_type=queryCopy.funnelsFilter?.breakdownAttributionType,camelCasedFunnelsProps.breakdown_attribution_value=queryCopy.funnelsFilter?.breakdownAttributionValue,camelCasedFunnelsProps.funnel_aggregate_by_hogql=queryCopy.funnelsFilter?.funnelAggregateByHogQL,camelCasedFunnelsProps.funnel_to_step=queryCopy.funnelsFilter?.funnelToStep,camelCasedFunnelsProps.funnel_from_step=queryCopy.funnelsFilter?.funnelFromStep,camelCasedFunnelsProps.funnel_order_type=queryCopy.funnelsFilter?.funnelOrderType,camelCasedFunnelsProps.funnel_viz_type=queryCopy.funnelsFilter?.funnelVizType,camelCasedFunnelsProps.funnel_window_interval=queryCopy.funnelsFilter?.funnelWindowInterval,camelCasedFunnelsProps.funnel_window_interval_unit=queryCopy.funnelsFilter?.funnelWindowIntervalUnit,camelCasedFunnelsProps.hidden_legend_keys=hiddenLegendItemsToKeys(queryCopy.funnelsFilter?.hiddenLegendBreakdowns),camelCasedFunnelsProps.funnel_step_reference=queryCopy.funnelsFilter?.funnelStepReference,delete queryCopy.funnelsFilter?.exclusions,delete queryCopy.funnelsFilter?.binCount,delete queryCopy.funnelsFilter?.breakdownAttributionType,delete queryCopy.funnelsFilter?.breakdownAttributionValue,delete queryCopy.funnelsFilter?.funnelAggregateByHogQL,delete queryCopy.funnelsFilter?.funnelToStep,delete queryCopy.funnelsFilter?.funnelFromStep,delete queryCopy.funnelsFilter?.funnelOrderType,delete queryCopy.funnelsFilter?.funnelVizType,delete queryCopy.funnelsFilter?.funnelWindowInterval,delete queryCopy.funnelsFilter?.funnelWindowIntervalUnit,delete queryCopy.funnelsFilter?.hiddenLegendBreakdowns,delete queryCopy.funnelsFilter?.funnelStepReference):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.I5)(queryCopy)?(camelCasedRetentionProps.retention_reference=queryCopy.retentionFilter?.retentionReference,camelCasedRetentionProps.retention_type=queryCopy.retentionFilter?.retentionType,camelCasedRetentionProps.returning_entity=queryCopy.retentionFilter?.returningEntity,camelCasedRetentionProps.target_entity=queryCopy.retentionFilter?.targetEntity,camelCasedRetentionProps.total_intervals=queryCopy.retentionFilter?.totalIntervals,camelCasedRetentionProps.show_mean=queryCopy.retentionFilter?.showMean,camelCasedRetentionProps.cumulative=queryCopy.retentionFilter?.cumulative,delete queryCopy.retentionFilter?.retentionReference,delete queryCopy.retentionFilter?.retentionType,delete queryCopy.retentionFilter?.returningEntity,delete queryCopy.retentionFilter?.targetEntity,delete queryCopy.retentionFilter?.totalIntervals,delete queryCopy.retentionFilter?.showMean,delete queryCopy.retentionFilter?.cumulative):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Qp)(queryCopy)?(camelCasedPathsProps.edge_limit=queryCopy.pathsFilter?.edgeLimit,camelCasedPathsProps.paths_hogql_expression=queryCopy.pathsFilter?.pathsHogQLExpression,camelCasedPathsProps.include_event_types=queryCopy.pathsFilter?.includeEventTypes,camelCasedPathsProps.start_point=queryCopy.pathsFilter?.startPoint,camelCasedPathsProps.end_point=queryCopy.pathsFilter?.endPoint,camelCasedPathsProps.path_groupings=queryCopy.pathsFilter?.pathGroupings,camelCasedPathsProps.exclude_events=queryCopy.pathsFilter?.excludeEvents,camelCasedPathsProps.step_limit=queryCopy.pathsFilter?.stepLimit,camelCasedPathsProps.path_replacements=queryCopy.pathsFilter?.pathReplacements,camelCasedPathsProps.local_path_cleaning_filters=queryCopy.pathsFilter?.localPathCleaningFilters,camelCasedPathsProps.min_edge_weight=queryCopy.pathsFilter?.minEdgeWeight,camelCasedPathsProps.max_edge_weight=queryCopy.pathsFilter?.maxEdgeWeight,camelCasedPathsProps.funnel_paths=queryCopy.funnelPathsFilter?.funnelPathType,camelCasedPathsProps.funnel_filter=void 0!==queryCopy.funnelPathsFilter?{...queryNodeToFilter(queryCopy.funnelPathsFilter.funnelSource),funnel_step:queryCopy.funnelPathsFilter.funnelStep}:void 0,delete queryCopy.pathsFilter?.edgeLimit,delete queryCopy.pathsFilter?.pathsHogQLExpression,delete queryCopy.pathsFilter?.includeEventTypes,delete queryCopy.pathsFilter?.startPoint,delete queryCopy.pathsFilter?.endPoint,delete queryCopy.pathsFilter?.pathGroupings,delete queryCopy.pathsFilter?.excludeEvents,delete queryCopy.pathsFilter?.stepLimit,delete queryCopy.pathsFilter?.pathReplacements,delete queryCopy.pathsFilter?.localPathCleaningFilters,delete queryCopy.pathsFilter?.minEdgeWeight,delete queryCopy.pathsFilter?.maxEdgeWeight,delete queryCopy.funnelPathsFilter):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.vy)(queryCopy)?(camelCasedStickinessProps.show_legend=queryCopy.stickinessFilter?.showLegend,camelCasedStickinessProps.show_values_on_series=queryCopy.stickinessFilter?.showValuesOnSeries,camelCasedStickinessProps.hidden_legend_keys=hiddenLegendItemsToKeys(queryCopy.stickinessFilter?.hiddenLegendIndexes),delete queryCopy.stickinessFilter?.showLegend,delete queryCopy.stickinessFilter?.showValuesOnSeries,delete queryCopy.stickinessFilter?.hiddenLegendIndexes):(0,_queries_utils__WEBPACK_IMPORTED_MODULE_2__.Vr)(queryCopy)&&(camelCasedLifecycleProps.show_values_on_series=queryCopy.lifecycleFilter?.showValuesOnSeries,camelCasedLifecycleProps.show_legend=queryCopy.lifecycleFilter?.showLegend,camelCasedLifecycleProps.toggledLifecycles=queryCopy.lifecycleFilter?.toggledLifecycles,delete queryCopy.lifecycleFilter?.showLegend,delete queryCopy.lifecycleFilter?.showValuesOnSeries,delete queryCopy.lifecycleFilter?.toggledLifecycles),Object.assign(filters,camelCasedTrendsProps),Object.assign(filters,camelCasedFunnelsProps),Object.assign(filters,camelCasedRetentionProps),Object.assign(filters,camelCasedPathsProps),Object.assign(filters,camelCasedStickinessProps),Object.assign(filters,camelCasedLifecycleProps),Object.assign(filters,queryCopy[nodeKindToFilterKey[query.kind]]),filters}},"./frontend/src/queries/nodes/InsightViz/InsightViz.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{hs:()=>InsightViz_InsightViz_InsightViz,Cf:()=>insightVizDataCollectionId,gG:()=>insightVizDataNodeKey});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),InsightViz=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/InsightViz.scss"),InsightViz_default=__webpack_require__.n(InsightViz),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(InsightViz_default(),options),InsightViz_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),useFeatureFlag=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),insightSceneLogic=__webpack_require__("./frontend/src/scenes/insights/insightSceneLogic.tsx"),insightVizDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightVizDataLogic.ts"),sharedUtils=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),ErrorBoundary=__webpack_require__("./frontend/src/layout/ErrorBoundary/index.ts"),utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts"),dataNodeLogic=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),EditorFilters=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/EditorFilters.scss"),EditorFilters_default=__webpack_require__.n(EditorFilters),EditorFilters_options={};EditorFilters_options.insert="head",EditorFilters_options.singleton=!1,injectStylesIntoStyleTag_default()(EditorFilters_default(),EditorFilters_options),EditorFilters_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),CSSTransition=__webpack_require__("./node_modules/.pnpm/react-transition-group@4.4.5_react-dom@18.2.0_react@18.2.0/node_modules/react-transition-group/esm/CSSTransition.js"),funnelDataLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelDataLogic.ts"),FunnelsQuerySteps=__webpack_require__("./frontend/src/scenes/insights/EditorFilters/FunnelsQuerySteps.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Attribution(_ref){let{insightProps}=_ref,{insightFilter,steps}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),{breakdownAttributionType,breakdownAttributionValue,funnelOrderType}=insightFilter||{},currentValue=breakdownAttributionType?breakdownAttributionType===types.q9.Step?`${breakdownAttributionType}/${breakdownAttributionValue||0}`:breakdownAttributionType:types.q9.FirstTouch;return(0,jsx_runtime.jsx)(src.Yv,{value:currentValue,placeholder:"Attribution",options:[{value:types.q9.FirstTouch,label:"First touchpoint"},{value:types.q9.LastTouch,label:"Last touchpoint"},{value:types.q9.AllSteps,label:"All steps"},{value:types.q9.Step,label:"Any step",hidden:funnelOrderType!==types.kO.UNORDERED},{label:"Specific step",options:Array(FunnelsQuerySteps.i).fill(null).map((_,stepIndex)=>({value:`${types.q9.Step}/${stepIndex}`,label:`Step ${stepIndex+1}`,hidden:stepIndex>=steps.length})),hidden:funnelOrderType===types.kO.UNORDERED}],onChange:value=>{let[breakdownAttributionType,breakdownAttributionValue]=(value||"").split("/");value&&updateInsightFilter({breakdownAttributionType:breakdownAttributionType,breakdownAttributionValue:breakdownAttributionValue?parseInt(breakdownAttributionValue):0})},dropdownMaxContentWidth:!0,"data-attr":"breakdown-attributions"})}var LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),dist_module=__webpack_require__("./node_modules/.pnpm/@react-hook+size@2.1.2_react@18.2.0/node_modules/@react-hook/size/dist/module/index.js"),TaxonomicFilter_types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),ActionFilter=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx"),ActionFilterRow=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.tsx"),filtersToQueryNode=__webpack_require__("./frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts");function ExclusionRow(_ref){let{seriesIndicator,filter,suffix,isVertical}=_ref;return isVertical?(0,jsx_runtime.jsxs)("div",{className:"w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-nowrap items-center",children:[(0,jsx_runtime.jsx)("div",{className:"px-2",children:seriesIndicator}),(0,jsx_runtime.jsx)("div",{className:"flex-1",children:filter})]}),(0,jsx_runtime.jsx)("div",{className:"ml-9",children:suffix})]}):(0,jsx_runtime.jsxs)("div",{className:"flex items-center w-full",children:[(0,jsx_runtime.jsx)("div",{className:"px-2",children:seriesIndicator}),(0,jsx_runtime.jsx)("div",{className:"flex-1",children:filter}),suffix]})}var funnelUtils=__webpack_require__("./frontend/src/scenes/funnels/funnelUtils.ts");function ExclusionRowSuffix(_ref){var _exclusions$index$fun,_exclusions$index$fun2,_stepRange$funnelFrom,_stepRange$funnelFrom2;let{index,onClose,isVertical}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{querySource,funnelsFilter,series,isFunnelWithEnoughSteps,exclusionDefaultStepRange}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),exclusions=funnelsFilter?.exclusions,numberOfSeries=series?.length||0,stepRange={funnelFromStep:null!==(_exclusions$index$fun=exclusions?.[index]?.funnelFromStep)&&void 0!==_exclusions$index$fun?_exclusions$index$fun:exclusionDefaultStepRange.funnelFromStep,funnelToStep:null!==(_exclusions$index$fun2=exclusions?.[index]?.funnelToStep)&&void 0!==_exclusions$index$fun2?_exclusions$index$fun2:exclusionDefaultStepRange.funnelToStep},onChange=function(){let funnelFromStep=arguments.length>0&&void 0!==arguments[0]?arguments[0]:stepRange.funnelFromStep,funnelToStep=arguments.length>1&&void 0!==arguments[1]?arguments[1]:stepRange.funnelToStep,newStepRange=(0,funnelUtils.rN)({stepRange:{funnelFromStep,funnelToStep},query:querySource}),newExclusions=funnelsFilter?.exclusions?.map((exclusion,exclusionIndex)=>exclusionIndex===index?{...exclusion,...newStepRange}:exclusion);updateInsightFilter({exclusions:newExclusions})};return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex items-center flex-nowrap pl-1 mx-0",isVertical?"w-full my-1":"w-auto my-0"),children:["between",(0,jsx_runtime.jsx)(src.Yv,{className:"mx-1",size:"small",value:stepRange.funnelFromStep||0,onChange:onChange,options:Array.from(Array(numberOfSeries).keys()).slice(0,-1).map(stepIndex=>({value:stepIndex,label:`Step ${stepIndex+1}`})),disabled:!isFunnelWithEnoughSteps}),"and",(0,jsx_runtime.jsx)(src.Yv,{className:"ml-1",size:"small",value:stepRange.funnelToStep||(null!==(_stepRange$funnelFrom=stepRange.funnelFromStep)&&void 0!==_stepRange$funnelFrom?_stepRange$funnelFrom:0)+1,onChange:toStep=>onChange(stepRange.funnelFromStep,toStep),options:Array.from(Array(numberOfSeries).keys()).slice((null!==(_stepRange$funnelFrom2=stepRange.funnelFromStep)&&void 0!==_stepRange$funnelFrom2?_stepRange$funnelFrom2:0)+1).map(stepIndex=>({value:stepIndex,label:`Step ${stepIndex+1}`})),disabled:!isFunnelWithEnoughSteps}),(0,jsx_runtime.jsx)(src.Jp,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),onClick:onClose,"data-attr":"delete-prop-exclusion-filter",title:"Delete event exclusion series",className:"ml-1"})]})}function FunnelExclusionsFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{exclusionFilters,exclusionDefaultStepRange,isFunnelWithEnoughSteps}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),ref=(0,react.useRef)(null),[width]=(0,dist_module.Z)(ref),isVerticalLayout=!!width&&width<450;return(0,jsx_runtime.jsx)(ActionFilter.T,{ref:ref,setFilters:filters=>{let exclusions=filters.events?.map(entity=>{let baseEntity=filtersToQueryNode.pE(entity,!1,ActionFilterRow.Qq.None);return{...baseEntity,funnelFromStep:entity.funnel_from_step,funnelToStep:entity.funnel_to_step}});updateInsightFilter({exclusions})},filters:exclusionFilters,typeKey:`${(0,sharedUtils.bk)("new")(insightProps)}-FunnelExclusionsFilter`,addFilterDefaultOptions:{id:"$pageview",name:"$pageview",type:types.DC.EVENTS,funnel_from_step:exclusionDefaultStepRange.funnelFromStep,funnel_to_step:exclusionDefaultStepRange.funnelToStep},disabled:!isFunnelWithEnoughSteps,buttonCopy:"Add exclusion",actionsTaxonomicGroupTypes:[TaxonomicFilter_types.t.Events],mathAvailability:ActionFilterRow.Qq.None,hideFilter:!0,hideRename:!0,hideDeleteBtn:!0,seriesIndicatorType:"alpha",renderRow:props=>(0,jsx_runtime.jsx)(ExclusionRow,{...props,isVertical:isVerticalLayout}),customRowSuffix:props=>(0,jsx_runtime.jsx)(ExclusionRowSuffix,{...props,isVertical:isVerticalLayout})})}function FunnelStepReferencePicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{insightFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),{funnelStepReference}=insightFilter||{},options=[{value:types.XF.total,label:"Overall conversion"},{value:types.XF.previous,label:"Relative to previous step"}];return(0,jsx_runtime.jsx)(src.Yv,{value:funnelStepReference||types.XF.total,onChange:stepRef=>stepRef&&updateInsightFilter({funnelStepReference:stepRef}),dropdownMatchSelectWidth:!1,"data-attr":"funnel-step-reference-selector",options:options})}let FunnelStepOrderPicker_options=[{label:"Sequential",value:types.kO.ORDERED},{label:"Strict order",value:types.kO.STRICT},{label:"Any order",value:types.kO.UNORDERED}];function FunnelStepOrderPicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{insightFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),{funnelOrderType}=insightFilter||{};return(0,jsx_runtime.jsx)(src.Yv,{id:"funnel-step-order-filter","data-attr":"funnel-step-order-filter",value:funnelOrderType||types.kO.ORDERED,onChange:stepOrder=>stepOrder&&updateInsightFilter({funnelOrderType:stepOrder}),dropdownMatchSelectWidth:!1,options:FunnelStepOrderPicker_options})}function FunnelsAdvanced(_ref){let{insightProps}=_ref,{querySource,aggregationTargetLabel,advancedOptionsUsedCount}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps));return(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Step order",info:(0,jsx_runtime.jsx)(StepOrderInfo,{}),children:(0,jsx_runtime.jsx)(FunnelStepOrderPicker,{})}),(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Conversion rate calculation",children:(0,jsx_runtime.jsx)(FunnelStepReferencePicker,{})}),(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"Exclusion steps",info:(0,jsx_runtime.jsx)(ExclusionStepsInfo,{aggregationTargetLabel:aggregationTargetLabel,aggregation_group_type_index:querySource?.aggregation_group_type_index}),children:(0,jsx_runtime.jsx)(FunnelExclusionsFilter,{})}),!!advancedOptionsUsedCount&&(0,jsx_runtime.jsx)("div",{className:"mt-4",children:(0,jsx_runtime.jsx)(LemonButton.J,{status:"danger",onClick:()=>{updateInsightFilter({funnelOrderType:void 0,funnelStepReference:void 0,exclusions:void 0})},children:"Reset advanced options"})})]})}function StepOrderInfo(){return(0,jsx_runtime.jsxs)("ul",{className:"list-disc pl-4",children:[(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("b",{children:"Sequential"})," - Step B must happen after Step A, but any number events can happen between A and B."]}),(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("b",{children:"Strict order"})," - Step B must happen directly after Step A without any events in between."]}),(0,jsx_runtime.jsxs)("li",{children:[(0,jsx_runtime.jsx)("b",{children:"Any order"})," - Steps can be completed in any sequence."]})]})}function ExclusionStepsInfo(_ref2){let{aggregationTargetLabel,aggregation_group_type_index}=_ref2;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Exclude ",aggregationTargetLabel.plural," ",void 0!=aggregation_group_type_index?"that":"who"," ","completed the specified event between two specific steps. Note that these ",aggregationTargetLabel.plural," ","will be ",(0,jsx_runtime.jsx)("b",{children:"completely excluded from the entire funnel"}),"."]})}var PayGateMini=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),LemonLabel=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.tsx"),pathsDataLogic=__webpack_require__("./frontend/src/scenes/paths/pathsDataLogic.ts"),PathCleanFilters=__webpack_require__("./frontend/src/lib/components/PathCleanFilters/PathCleanFilters.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts");function PathCleaningFilter(_ref){let{insightProps}=_ref,{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),{localPathCleaningFilters,pathReplacements}=pathsFilter||{},{currentTeam}=(0,index_esm.useValues)(teamLogic.H),hasFilters=(currentTeam?.path_cleaning_filters||[]).length>0;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(PathCleanFilters.f,{filters:localPathCleaningFilters,setFilters:filters=>updateInsightFilter({localPathCleaningFilters:filters})}),(0,jsx_runtime.jsx)(Tooltip.u,{title:hasFilters?"Clean paths based using regex replacement.":"You don't have path cleaning filters. Configure via the gear icon.",children:(0,jsx_runtime.jsx)("div",{className:"inline-block mt-4 w-full",children:(0,jsx_runtime.jsx)(src.f4,{disabled:!hasFilters,checked:!!hasFilters&&(pathReplacements||!1),onChange:checked=>{updateInsightFilter({pathReplacements:checked})},label:(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:[(0,jsx_runtime.jsx)("span",{children:"Apply global path URL cleaning"}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),to:urls.j.settings("project-product-analytics","path-cleaning"),size:"small",noPadding:!0,className:"ml-1"})]}),fullWidth:!0,bordered:!0})})})]})}function PathsAdvanced(_ref){let{insightProps,...rest}=_ref,{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),{edgeLimit,minEdgeWeight,maxEdgeWeight}=pathsFilter||{},[localEdgeParameters,setLocalEdgeParameters]=(0,react.useState)({edgeLimit,minEdgeWeight,maxEdgeWeight}),updateEdgeParameters=()=>{(localEdgeParameters.edgeLimit!==edgeLimit||localEdgeParameters.minEdgeWeight!==minEdgeWeight||localEdgeParameters.maxEdgeWeight!==maxEdgeWeight)&&updateInsightFilter({...localEdgeParameters})};return(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.PATHS_ADVANCED,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,jsx_runtime.jsx)(src.p2,{}),(0,jsx_runtime.jsx)(LemonLabel.H,{info:"Determines the maximum number of path nodes that can be generated. If necessary certain items will be grouped.",children:"Maximum number of paths"}),(0,jsx_runtime.jsx)(src.DF,{type:"number",min:0,max:1e3,defaultValue:localEdgeParameters.edgeLimit||50,onChange:value=>setLocalEdgeParameters(state=>({...state,edgeLimit:Number(value)})),onBlur:updateEdgeParameters,onPressEnter:updateEdgeParameters}),(0,jsx_runtime.jsx)(LemonLabel.H,{info:"Determines the minimum and maximum number of persons in each path. Helps adjust the density of the visualization.",className:"mt-2",children:"Number of people on each path"}),(0,jsx_runtime.jsxs)("div",{className:"flex items-baseline",children:[(0,jsx_runtime.jsx)("span",{className:"mr-2",children:"Between"}),(0,jsx_runtime.jsx)(src.DF,{type:"number",min:0,max:1e5,defaultValue:localEdgeParameters.minEdgeWeight,onChange:value=>{setLocalEdgeParameters(state=>({...state,minEdgeWeight:Number(value)})),updateEdgeParameters()},onBlur:updateEdgeParameters,onPressEnter:updateEdgeParameters}),(0,jsx_runtime.jsx)("span",{className:"mx-2",children:"and"}),(0,jsx_runtime.jsx)(src.DF,{type:"number",onChange:value=>{setLocalEdgeParameters(state=>({...state,maxEdgeWeight:Number(value)})),updateEdgeParameters()},min:0,max:1e5,defaultValue:localEdgeParameters.maxEdgeWeight,onBlur:updateEdgeParameters,onPressEnter:updateEdgeParameters}),(0,jsx_runtime.jsx)("span",{className:"ml-2",children:"persons."})]}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("div",{className:"flex items-center my-2",children:(0,jsx_runtime.jsx)(LemonLabel.H,{info:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Cleaning rules are an advanced feature that uses regex to normalize URLS for paths visualization. Rules can be set for all insights in the project settings, or they can be defined specifically for an insight."}),children:"Path Cleaning Rules"})}),(0,jsx_runtime.jsx)(PathCleaningFilter,{insightProps:insightProps,...rest})]})]})})}var LemonCheckbox=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),lib_utils=__webpack_require__("./frontend/src/lib/utils.tsx"),insights_utils=__webpack_require__("./frontend/src/scenes/insights/utils.tsx");function PathsEventsTypes(_ref){let{insightProps}=_ref,{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),includeEventTypes=pathsFilter?.includeEventTypes,setIncludeEventTypes=includeEventTypes=>{updateInsightFilter({includeEventTypes:includeEventTypes})},options=[{type:types.cB.PageView,label:"Page views",selected:includeEventTypes?.includes(types.cB.PageView)},{type:types.cB.Screen,label:"Screen views",selected:includeEventTypes?.includes(types.cB.Screen)},{type:types.cB.CustomEvent,label:"Custom event",selected:includeEventTypes?.includes(types.cB.CustomEvent)},{type:types.cB.HogQL,label:"HogQL expression",selected:includeEventTypes?.includes(types.cB.HogQL)}],onClickPathtype=pathType=>{includeEventTypes?includeEventTypes.includes(pathType)?setIncludeEventTypes(includeEventTypes.filter(types=>types!==pathType)):setIncludeEventTypes(includeEventTypes?[...includeEventTypes,pathType]:[pathType]):setIncludeEventTypes([pathType])},summary=(0,lib_utils.fm)((0,insights_utils.FE)(includeEventTypes).join(" & "));return(0,jsx_runtime.jsx)(LemonButton.$,{fullWidth:!0,type:"secondary",dropdown:{matchWidth:!0,closeOnClickInside:!1,overlay:options.map(option=>(0,jsx_runtime.jsxs)(LemonButton.J,{onClick:()=>onClickPathtype(option.type),disabledReason:option.selected&&includeEventTypes?.length===1?"At least one event type must be selected":void 0,fullWidth:!0,"data-attr":option["data-attr"],children:[(0,jsx_runtime.jsx)("span",{className:"pointer-events-none mr-2",children:(0,jsx_runtime.jsx)(LemonCheckbox.H,{checked:option.selected})}),option.label]},option.type)),actionable:!0},children:summary})}var TaxonomicFilter=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.tsx"),Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx");function PathItemSelector(_ref){let{pathItem,onChange,children,taxonomicGroupTypes,disabled,wildcardOptions}=_ref,[visible,setVisible]=(0,react.useState)(!1);return(0,jsx_runtime.jsx)(Popover.J2,{visible:visible,placement:"bottom-end",onClickOutside:()=>setVisible(!1),overlay:(0,jsx_runtime.jsx)(TaxonomicFilter.I,{value:pathItem,onChange:(_,value)=>{onChange(value),setVisible(!1)},taxonomicGroupTypes:taxonomicGroupTypes,optionsFromProp:{wildcard:wildcardOptions}}),children:(0,jsx_runtime.jsx)("div",{onClick:disabled?()=>{}:()=>setVisible(!visible),children:children})})}var PropertyFilterButton=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.tsx"),propertyFilterLogic=__webpack_require__("./frontend/src/lib/components/PropertyFilters/propertyFilterLogic.ts");function PathItemFilters(_ref){let{propertyFilters,onChange,pageKey,taxonomicGroupTypes,wildcardOptions}=_ref,logicProps={propertyFilters,onChange,pageKey},{filtersWithNew}=(0,index_esm.useValues)((0,propertyFilterLogic.n)(logicProps)),{setFilter,remove,setFilters}=(0,index_esm.useActions)((0,propertyFilterLogic.n)(logicProps));return(0,react.useEffect)(()=>{propertyFilters&&!(0,lib_utils.h0)(propertyFilters,filtersWithNew)&&setFilters([...propertyFilters,{}])},[propertyFilters]),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:propertyFilterLogic.n,props:logicProps,children:filtersWithNew?.map((filter,index)=>jsx_runtime.jsx("div",{className:"mb-2",children:jsx_runtime.jsx(PathItemSelector,{pathItem:filter.value,onChange:pathItem=>setFilter(index,{key:pathItem,value:pathItem,type:types.FT.Event,operator:types.WV.Exact}),index:index,taxonomicGroupTypes:taxonomicGroupTypes,wildcardOptions:wildcardOptions,children:filter.value?jsx_runtime.jsx(PropertyFilterButton.C,{item:filter,onClose:()=>{remove(index)},children:filter.value.toString()}):jsx_runtime.jsx(src.Jp,{className:"new-prop-filter","data-attr":"new-prop-filter-"+pageKey,type:"secondary",icon:jsx_runtime.jsx(posthog_icons_es.IconPlusSmall,{}),sideIcon:null,children:"Add exclusion"})})},index))})}function PathsExclusions(_ref){let{insightProps}=_ref,{pathsFilter,taxonomicGroupTypes}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),{excludeEvents,pathGroupings}=pathsFilter||{};return(0,jsx_runtime.jsx)(PathItemFilters,{taxonomicGroupTypes:taxonomicGroupTypes,pageKey:`${(0,sharedUtils.bk)("new")(insightProps)}-excludeEvents`,propertyFilters:excludeEvents&&excludeEvents.map(name=>({key:name,value:name,operator:types.WV.Exact,type:types.FT.Event})),onChange:values=>{updateInsightFilter({excludeEvents:values.map(v=>v.value)})},wildcardOptions:pathGroupings?.map(name=>({name}))})}var TaxonomicPopover=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx");function PathsHogQL(_ref){let{insightProps}=_ref,{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps));return(0,jsx_runtime.jsx)(TaxonomicPopover.b,{groupType:TaxonomicFilter_types.t.HogQLExpression,value:pathsFilter?.pathsHogQLExpression||"event","data-attr":"paths-hogql-expression",fullWidth:!0,onChange:(v,g)=>{let hogQl=(0,utils.R_)(g,v);hogQl&&updateInsightFilter({pathsHogQLExpression:hogQl})},groupTypes:[TaxonomicFilter_types.t.HogQLExpression]})}var lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),queryNodeToFilter=__webpack_require__("./frontend/src/queries/nodes/InsightQuery/utils/queryNodeToFilter.ts");function PathsTargetStart(props){return(0,jsx_runtime.jsx)(PathsTarget,{position:"start",...props})}function PathsTargetEnd(props){return(0,jsx_runtime.jsx)(PathsTarget,{position:"end",...props})}function PathsTarget(_ref){let{position,insightProps}=_ref,{pathsFilter,funnelPathsFilter,taxonomicGroupTypes}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter,updateQuerySource}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),{startPoint,endPoint,pathGroupings}=pathsFilter||{},{funnelPathType,funnelSource,funnelStep}=funnelPathsFilter||{},overrideStartInput=funnelPathType&&[types.hP.between,types.hP.after].includes(funnelPathType),overrideEndInput=funnelPathType&&[types.hP.between,types.hP.before].includes(funnelPathType),overrideInputs=overrideStartInput||overrideEndInput,key="start"===position?"startPoint":"endPoint",onReset=()=>{updateQuerySource({pathsFilter:{...pathsFilter,[key]:void 0},funnelPathsFilter:void 0})};function _getStepLabel(funnelSource,index){var _filters$series$name;let shift=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return funnelSource&&index?(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(icons.SE,{className:"text-2xl"}),(0,jsx_runtime.jsx)("span",{className:"label",children:`${index>0?"Funnel step "+(index+shift):"Funnel dropoff "+-1*index}: ${null!==(_filters$series$name=funnelSource.series[(index>0?index+shift:-1*index)-1].name)&&void 0!==_filters$series$name?_filters$series$name:""}`})]}):(0,jsx_runtime.jsx)("span",{})}let positionOptions={start:{index:0,getLabel:function(){return funnelPathType?funnelPathType===types.hP.after?_getStepLabel(funnelSource,funnelStep):funnelPathType===types.hP.between?_getStepLabel(funnelSource,funnelStep,-1):(0,jsx_runtime.jsx)("span",{}):startPoint?(0,jsx_runtime.jsx)("span",{className:"label",children:startPoint}):(0,jsx_runtime.jsx)("span",{className:"label text-muted",children:"Add start point"})},pathItem:startPoint,closeButtonEnabled:startPoint||overrideStartInput,disabled:overrideEndInput&&!overrideStartInput,funnelFilterLink:funnelSource&&overrideStartInput},end:{index:1,getLabel:function(){return funnelPathType?funnelPathType===types.hP.before||funnelPathType===types.hP.between?_getStepLabel(funnelSource,funnelStep):(0,jsx_runtime.jsx)("span",{}):endPoint?(0,jsx_runtime.jsx)("span",{className:"label",children:endPoint}):(0,jsx_runtime.jsx)("span",{className:"label text-muted",children:"Add end point"})},pathItem:endPoint,closeButtonEnabled:endPoint||overrideEndInput,disabled:overrideStartInput&&!overrideEndInput,funnelFilterLink:funnelSource&&overrideEndInput}}[position];return(0,jsx_runtime.jsx)(PathItemSelector,{pathItem:positionOptions.pathItem,index:positionOptions.index,onChange:item=>{updateInsightFilter({[key]:item})},taxonomicGroupTypes:taxonomicGroupTypes,disabled:overrideInputs,wildcardOptions:pathGroupings?.map(name=>({name})),children:(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"new-prop-filter-"+positionOptions.index,fullWidth:!0,className:"paths-endpoint-field",type:"secondary",active:overrideInputs,disabled:positionOptions.disabled,onClick:positionOptions.funnelFilterLink?()=>{lib.router.actions.push((0,lib.combineUrl)("/insights",(0,lib.encodeParams)((0,queryNodeToFilter.ce)(funnelSource),"?")).url)}:()=>{},sideAction:positionOptions.closeButtonEnabled?{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),type:"tertiary",onClick:e=>{onReset(),e.stopPropagation()}}:null,children:positionOptions.getLabel()})})}var LemonInputSelect=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx");function PathsWildcardGroups(_ref){let{insightProps}=_ref,{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps));return(0,jsx_runtime.jsx)(LemonInputSelect.n,{onChange:pathGroupings=>updateInsightFilter({pathGroupings}),value:pathsFilter?.pathGroupings||[],disableFiltering:!0,mode:"multiple",allowCustomValues:!0})}var Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),react_toastify_esm=__webpack_require__("./node_modules/.pnpm/react-toastify@8.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-toastify/dist/react-toastify.esm.js"),AggregationSelect=__webpack_require__("./frontend/src/scenes/insights/filters/AggregationSelect.tsx"),retention_constants=__webpack_require__("./frontend/src/scenes/retention/constants.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts");function RetentionSummary(_ref){let{insightProps}=_ref,{showGroupsOptions}=(0,index_esm.useValues)(groupsModel.$),{retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{targetEntity,returningEntity,retentionType,totalIntervals,period}=retentionFilter||{};return(0,jsx_runtime.jsxs)("div",{className:"space-y-2","data-attr":"retention-summary",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:["Show",showGroupsOptions?(0,jsx_runtime.jsx)(AggregationSelect.C8,{className:"mx-2",insightProps:insightProps,hogqlAvailable:!1}):(0,jsx_runtime.jsx)("b",{children:" Unique users "}),"who performed"]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:["event or action",(0,jsx_runtime.jsx)("span",{className:"mx-2",children:(0,jsx_runtime.jsx)(ActionFilter.T,{entitiesLimit:1,mathAvailability:ActionFilterRow.Qq.None,hideFilter:!0,hideRename:!0,buttonCopy:"Add graph series",filters:{events:[targetEntity]},setFilters:newFilters=>{newFilters.events&&newFilters.events.length>0?updateInsightFilter({targetEntity:newFilters.events[0]}):newFilters.actions&&newFilters.actions.length>0?updateInsightFilter({targetEntity:newFilters.actions[0]}):updateInsightFilter({targetEntity:void 0})},typeKey:`${(0,sharedUtils.bk)("new")(insightProps)}-targetEntity`})}),(0,jsx_runtime.jsx)(src.Yv,{options:Object.entries(retention_constants.Yy).map(_ref2=>{let[key,value]=_ref2;return{label:value,value:key,element:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[value,(0,jsx_runtime.jsx)(Tooltip.u,{placement:"right",title:retention_constants.zm[key],children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"info-indicator"})})]})}}),value:retentionType?retention_constants.Yy[retentionType]:void 0,onChange:value=>updateInsightFilter({retentionType:value}),dropdownMatchSelectWidth:!1})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:["in the last",(0,jsx_runtime.jsx)(src.DF,{type:"number",className:"ml-2 w-20",defaultValue:(null!=totalIntervals?totalIntervals:11)-1,min:1,max:31,onBlur:_ref3=>{let{target}=_ref3,newValue=Number(target.value);newValue>31&&((newValue=Number(target.value.substring(0,2)))>31&&(newValue=10),react_toastify_esm.Am.warn((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["The maximum number of ",retention_constants.M0[period||"Day"]," is ",(0,jsx_runtime.jsx)("strong",{children:"31"})]}))),target.value=newValue.toString(),updateInsightFilter({totalIntervals:(newValue||0)+1})}}),(0,jsx_runtime.jsx)(src.Yv,{className:"mx-2",value:period,onChange:value=>updateInsightFilter({period:value||void 0}),options:retention_constants.Vh.map(period=>({value:period,label:retention_constants.M0[period]||period})),dropdownMatchSelectWidth:!1}),"and then came back to perform"]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:["event or action",(0,jsx_runtime.jsx)("span",{className:"mx-2",children:(0,jsx_runtime.jsx)(ActionFilter.T,{entitiesLimit:1,mathAvailability:ActionFilterRow.Qq.None,hideFilter:!0,hideRename:!0,buttonCopy:"Add graph series",filters:{events:[returningEntity]},setFilters:newFilters=>{newFilters.events&&newFilters.events.length>0?updateInsightFilter({returningEntity:newFilters.events[0]}):newFilters.actions&&newFilters.actions.length>0?updateInsightFilter({returningEntity:newFilters.actions[0]}):updateInsightFilter({returningEntity:void 0})},typeKey:`${(0,sharedUtils.bk)("new")(insightProps)}-returningEntity`})}),"on any of the next ",retention_constants.M0[null!=period?period:"Day"],"."]}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsxs)("p",{className:"text-muted mt-4",children:["Want to learn more about retention?"," ",(0,jsx_runtime.jsx)(Link.r,{to:"https://posthog.com/docs/features/retention?utm_campaign=learn-more-horizontal&utm_medium=in-product",target:"_blank",className:"inline-flex items-center",children:"Go to docs"})]})})]})}var posthog_js_dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),samplingFilterLogic=__webpack_require__("./frontend/src/scenes/insights/EditorFilters/samplingFilterLogic.ts");function SamplingFilter(_ref){let{insightProps,infoTooltipContent}=_ref,{isDataWarehouseSeries}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{samplingPercentage}=(0,index_esm.useValues)((0,samplingFilterLogic.s)(insightProps)),{setSamplingPercentage}=(0,index_esm.useActions)((0,samplingFilterLogic.s)(insightProps));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-1",children:[(0,jsx_runtime.jsxs)(src.HQ,{info:infoTooltipContent||"Sampling computes the result on only a subset of the data, making insights load significantly faster.",infoLink:"https://posthog.com/manual/sampling",children:["Sampling ",(0,jsx_runtime.jsx)(src.oe,{type:"warning",children:"BETA"})]}),(0,jsx_runtime.jsx)(src.f4,{className:"m-2",onChange:checked=>{if(checked){setSamplingPercentage(10),posthog_js_dist_module.ZP.capture("sampling_enabled_on_insight");return}setSamplingPercentage(null),posthog_js_dist_module.ZP.capture("sampling_disabled_on_insight")},checked:!!samplingPercentage,disabledReason:isDataWarehouseSeries?"Sampling is not available for data warehouse series":void 0})]}),samplingPercentage?(0,jsx_runtime.jsx)("div",{className:"SamplingFilter",children:(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-2",children:(0,jsx_runtime.jsx)(src.P4,{options:samplingFilterLogic.N.map(percentage=>({value:percentage,label:`${percentage}%`})),value:samplingPercentage,onChange:newValue=>{setSamplingPercentage(newValue),posthog_js_dist_module.ZP.capture("sampling_percentage_updated",{samplingPercentage})}})})}):null]})}var userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),OperatorValueSelect=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx");function StickinessCriteria(_ref){var _stickinessCriteria$o,_stickinessCriteria$v;let{insightProps}=_ref,{stickinessFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),stickinessCriteria=stickinessFilter?.stickinessCriteria,currentOperator=null!==(_stickinessCriteria$o=stickinessCriteria?.operator)&&void 0!==_stickinessCriteria$o?_stickinessCriteria$o:types.WV.GreaterThanOrEqual,currentValue=null!==(_stickinessCriteria$v=stickinessCriteria?.value)&&void 0!==_stickinessCriteria$v?_stickinessCriteria$v:1,operators=[types.WV.LessThanOrEqual,types.WV.GreaterThanOrEqual,types.WV.Exact];return(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)(OperatorValueSelect.y,{className:"flex-1",operator:currentOperator,operators:operators,onChange:newOperator=>{updateInsightFilter({stickinessCriteria:{operator:newOperator,value:currentValue}})}}),(0,jsx_runtime.jsx)(src.DF,{type:"number",className:"ml-2 w-20",defaultValue:currentValue,min:1,onChange:newValue=>{void 0!==newValue&&updateInsightFilter({stickinessCriteria:{operator:currentOperator,value:newValue}})}}),"time(s) per interval"]})}var lemon_ui_LemonLabel=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/index.ts"),lemon_ui_Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),BreakdownTag=__webpack_require__("./frontend/src/scenes/insights/filters/BreakdownFilter/BreakdownTag.tsx"),GlobalBreakdownOptionsMenu=__webpack_require__("./frontend/src/scenes/insights/filters/BreakdownFilter/GlobalBreakdownOptionsMenu.tsx"),taxonomicBreakdownFilterLogic=__webpack_require__("./frontend/src/scenes/insights/filters/BreakdownFilter/taxonomicBreakdownFilterLogic.ts"),TaxonomicBreakdownPopover=__webpack_require__("./frontend/src/scenes/insights/filters/BreakdownFilter/TaxonomicBreakdownPopover.tsx");function TaxonomicBreakdownButton(_ref){let{disabledReason}=_ref,[open1,setOpen]=(0,react.useState)(!1),{taxonomicBreakdownType}=(0,index_esm.useValues)(taxonomicBreakdownFilterLogic.Nx);return(0,jsx_runtime.jsx)(TaxonomicBreakdownPopover.$,{open:open1,setOpen:setOpen,children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{color:"var(--primary)"}),"data-attr":"add-breakdown-button",onClick:()=>setOpen(!open1),sideIcon:null,disabledReason:disabledReason,children:taxonomicBreakdownType===TaxonomicFilter_types.t.CohortsWithAllUsers?"Add cohort":"Add breakdown"})})}function TaxonomicBreakdownFilter(_ref){let{insightProps,breakdownFilter,display,isTrends,disabledReason,updateBreakdownFilter,updateDisplay}=_ref,logicProps={insightProps,isTrends,display,breakdownFilter:breakdownFilter||{},updateBreakdownFilter,updateDisplay},{breakdownArray,isAddBreakdownDisabled,breakdownOptionsOpened,isMultipleBreakdownsEnabled}=(0,index_esm.useValues)((0,taxonomicBreakdownFilterLogic.Nx)(logicProps)),{toggleBreakdownOptions}=(0,index_esm.useActions)((0,taxonomicBreakdownFilterLogic.Nx)(logicProps)),tags=breakdownArray.map(breakdown=>{var _breakdown$type,_breakdownFilter$brea;return"object"==typeof breakdown?(0,jsx_runtime.jsx)(BreakdownTag.u,{breakdown:breakdown.property,breakdownType:null!==(_breakdown$type=breakdown.type)&&void 0!==_breakdown$type?_breakdown$type:"event",isTrends:isTrends},breakdown.property):(0,jsx_runtime.jsx)(BreakdownTag.u,{breakdown:breakdown,breakdownType:null!==(_breakdownFilter$brea=breakdownFilter?.breakdown_type)&&void 0!==_breakdownFilter$brea?_breakdownFilter$brea:"event",isTrends:isTrends},breakdown)});return(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:taxonomicBreakdownFilterLogic.Nx,props:logicProps,children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,jsx_runtime.jsx)(lemon_ui_LemonLabel.H,{info:"Use breakdown to see the aggregation (total volume, active users, etc.) for each value of that property. For example, breaking down by Current URL with total volume will give you the event volume for each URL your users have visited.",children:"Breakdown by"}),isMultipleBreakdownsEnabled&&(0,jsx_runtime.jsx)(lemon_ui_Popover.J2,{overlay:(0,jsx_runtime.jsx)(GlobalBreakdownOptionsMenu.n,{}),visible:breakdownOptionsOpened,onClickOutside:()=>toggleBreakdownOptions(!1),children:(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),size:"small",noPadding:!0,onClick:()=>toggleBreakdownOptions(!breakdownOptionsOpened)})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[tags,!isAddBreakdownDisabled&&(0,jsx_runtime.jsx)(TaxonomicBreakdownButton,{disabledReason:disabledReason})]})]})}function Breakdown(_ref){let{insightProps}=_ref,{breakdownFilter,display,isTrends,isSingleSeries,isDataWarehouseSeries}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateBreakdownFilter,updateDisplay}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(TaxonomicBreakdownFilter,{insightProps:insightProps,breakdownFilter:breakdownFilter,display:display,isTrends:isTrends,updateBreakdownFilter:updateBreakdownFilter,updateDisplay:updateDisplay,disabledReason:!isSingleSeries&&isDataWarehouseSeries?"Breakdowns are not allowed for multiple series types":void 0})})}var EditorFilterGroup=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/EditorFilterGroup.scss"),EditorFilterGroup_default=__webpack_require__.n(EditorFilterGroup),EditorFilterGroup_options={};EditorFilterGroup_options.insert="head",EditorFilterGroup_options.singleton=!1,injectStylesIntoStyleTag_default()(EditorFilterGroup_default(),EditorFilterGroup_options),EditorFilterGroup_default().locals;var LemonBadge=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.tsx");function EditorFilterGroup_EditorFilterGroup(_ref){let{insightProps,editorFilterGroup}=_ref,{title,count,defaultExpanded=!0,editorFilters}=editorFilterGroup,[isRowExpanded,setIsRowExpanded]=(0,react.useState)(defaultExpanded);return(0,jsx_runtime.jsxs)("div",{className:"EditorFilterGroup",children:[title&&(0,jsx_runtime.jsx)("div",{className:"EditorFilterGroup__title",children:(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,onClick:()=>setIsRowExpanded(!isRowExpanded),sideIcon:isRowExpanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),title:isRowExpanded?"Show less":"Show more","data-attr":"editor-filter-group-collapse-"+(0,lib_utils.lV)(title),children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center space-x-2 font-semibold",children:[(0,jsx_runtime.jsx)("span",{children:title}),(0,jsx_runtime.jsx)(LemonBadge.M.Number,{count:count||0})]})})}),isRowExpanded?(0,jsx_runtime.jsx)("div",{className:"EditorFilterGroup__content",children:editorFilters.map(_ref2=>{let{label:Label,tooltip,showOptional,key,component:Component}=_ref2;if(Component&&"component"===Component.name)throw Error(`Component for filter ${key} is an anonymous function, which is not a valid React component! Use a named function instead.`);return(0,jsx_runtime.jsx)(react.Fragment,{children:(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:"function"==typeof Label?(0,jsx_runtime.jsx)(Label,{insightProps:insightProps}):Label,info:tooltip,showOptional:showOptional,children:Component?(0,jsx_runtime.jsx)(Component,{insightProps:insightProps}):null})},key)})}):null]},title)}var actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),PropertyGroupFilters=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/PropertyGroupFilters.scss"),PropertyGroupFilters_default=__webpack_require__.n(PropertyGroupFilters),PropertyGroupFilters_options={};PropertyGroupFilters_options.insert="head",PropertyGroupFilters_options.singleton=!1,injectStylesIntoStyleTag_default()(PropertyGroupFilters_default(),PropertyGroupFilters_options),PropertyGroupFilters_default().locals;var PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),PropertyFilters_utils=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts"),TestAccountFiltersSwitch=__webpack_require__("./frontend/src/lib/components/TestAccountFiltersSwitch.tsx"),filterTestAccountDefaultsLogic=__webpack_require__("./frontend/src/scenes/settings/environment/filterTestAccountDefaultsLogic.ts");function InsightTestAccountFilter(_ref){let{query,setQuery,disabledReason}=_ref,{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{setLocalDefault}=(0,index_esm.useActions)(filterTestAccountDefaultsLogic.V),hasFilters=(currentTeam?.test_account_filters||[]).length>0;return(0,jsx_runtime.jsx)(TestAccountFiltersSwitch.Z,{checked:!!hasFilters&&!!query.filterTestAccounts,onChange:checked=>{setQuery({...query,filterTestAccounts:checked}),setLocalDefault(checked)},disabledReason:disabledReason,fullWidth:!0})}var AndOrFilterSelect=__webpack_require__("./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts");let propertyGroupFilterLogic=(0,index_esm.kea)([(0,index_esm.path)(["queries","nodes","InsightViz","PropertyGroupFilters","propertyGroupFilterLogic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>props.pageKey),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.query&&!(0,lib_utils.h0)(props.query.properties,oldProps.query.properties)&&actions.setFilters((0,PropertyFilters_utils.N0)(props.query.properties))}),(0,index_esm.actions)({update:propertyGroupIndex=>({propertyGroupIndex}),setFilters:filters=>({filters}),removeFilterGroup:filterGroup=>({filterGroup}),setOuterPropertyGroupsType:type=>({type}),setPropertyFilters:(properties,index)=>({properties,index}),setInnerPropertyGroupType:(type,index)=>({type,index}),duplicateFilterGroup:propertyGroupIndex=>({propertyGroupIndex}),addFilterGroup:!0}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{filters:[(0,PropertyFilters_utils.N0)(props.query.properties),{setFilters:(_,_ref3)=>{let{filters}=_ref3;return filters},addFilterGroup:state=>{if(!state.values)return{type:types.J2.And,values:[{type:types.J2.And,values:[]}]};let filterGroups=[...state.values,{type:types.J2.And,values:[]}];return{...state,values:filterGroups}},removeFilterGroup:(state,_ref4)=>{let{filterGroup}=_ref4,filteredGroups=[...state.values];return filteredGroups.splice(filterGroup,1),{...state,values:filteredGroups}},setOuterPropertyGroupsType:(state,_ref5)=>{let{type}=_ref5;return{...state,type}},setPropertyFilters:(state,_ref6)=>{let{properties,index}=_ref6,values=[...state.values];return values[index]={...values[index],values:properties},{...state,values}},setInnerPropertyGroupType:(state,_ref7)=>{let{type,index}=_ref7,values=[...state.values];return values[index]={...values[index],type},{...state,values}},duplicateFilterGroup:(state,_ref8)=>{let{propertyGroupIndex}=_ref8,values=state.values.concat([state.values[propertyGroupIndex]]);return{...state,values}}}]}}),(0,index_esm.listeners)(_ref9=>{let{actions,props,values}=_ref9;return{setFilters:()=>actions.update(),setPropertyFilters:()=>actions.update(),setInnerPropertyGroupType:_ref10=>{let{type,index}=_ref10;eventUsageLogic.vx.actions.reportChangeInnerPropertyGroupFiltersType(type,values.filters.values[index].values.length),actions.update()},setOuterPropertyGroupsType:_ref11=>{let{type}=_ref11;eventUsageLogic.vx.actions.reportChangeOuterPropertyGroupFiltersType(type,values.filters.values.length),actions.update()},removeFilterGroup:()=>actions.update(),addFilterGroup:()=>{eventUsageLogic.vx.actions.reportPropertyGroupFilterAdded()},update:()=>{props.setQuery({...props.query,properties:values.filters})}}}),(0,index_esm.selectors)({propertyGroupFilter:[s=>[s.filters],propertyGroupFilter=>propertyGroupFilter]})]);function PropertyGroupFilters_PropertyGroupFilters_PropertyGroupFilters(_ref){let{insightProps,query,setQuery,pageKey,eventNames=[],taxonomicGroupTypes,isDataWarehouseSeries}=_ref,logicProps={query,setQuery,pageKey},{propertyGroupFilter}=(0,index_esm.useValues)(propertyGroupFilterLogic(logicProps)),{addFilterGroup,removeFilterGroup,duplicateFilterGroup,setOuterPropertyGroupsType,setInnerPropertyGroupType,setPropertyFilters}=(0,index_esm.useActions)(propertyGroupFilterLogic(logicProps)),showHeader=propertyGroupFilter.type&&propertyGroupFilter.values.length>1,disabledReason=isDataWarehouseSeries?"Cannot add filter groups to data warehouse series. Use individual series filters":void 0;return(0,jsx_runtime.jsxs)("div",{className:"space-y-2 PropertyGroupFilters",children:[propertyGroupFilter.values&&(0,jsx_runtime.jsxs)(index_esm.BindLogic,{logic:propertyGroupFilterLogic,props:logicProps,children:[(0,jsx_runtime.jsx)(InsightTestAccountFilter,{disabledReason:disabledReason,query:query,setQuery:setQuery}),showHeader?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"flex items-center justify-between",children:propertyGroupFilter.type&&propertyGroupFilter.values.length>1&&(0,jsx_runtime.jsx)(AndOrFilterSelect.n,{value:propertyGroupFilter.type,onChange:value=>setOuterPropertyGroupsType(value),topLevelFilter:!0,suffix:["group","groups"]})}),(0,jsx_runtime.jsx)(src.p2,{className:"my-4"})]}):null,propertyGroupFilter.values?.length?(0,jsx_runtime.jsx)("div",{children:propertyGroupFilter.values?.map((group,propertyGroupIndex)=>jsx_runtime.jsxs(react.Fragment,{children:[jsx_runtime.jsxs("div",{className:"property-group",children:[jsx_runtime.jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsx_runtime.jsx(AndOrFilterSelect.n,{onChange:type=>setInnerPropertyGroupType(type,propertyGroupIndex),value:group.type}),jsx_runtime.jsx(src.p2,{className:"flex-1 mx-2"}),jsx_runtime.jsxs("div",{className:"flex items-center space-x-2",children:[jsx_runtime.jsx(src.Jp,{icon:jsx_runtime.jsx(posthog_icons_es.IconCopy,{}),onClick:()=>duplicateFilterGroup(propertyGroupIndex),size:"small"}),jsx_runtime.jsx(src.Jp,{icon:jsx_runtime.jsx(posthog_icons_es.IconTrash,{}),onClick:()=>removeFilterGroup(propertyGroupIndex),size:"small"})]})]}),jsx_runtime.jsx(PropertyFilters.t,{addText:"Add filter",propertyFilters:PropertyFilters_utils.cs(group)?group.values:null,onChange:properties=>{setPropertyFilters(properties,propertyGroupIndex)},pageKey:`${sharedUtils.bk("new")(insightProps)}-PropertyGroupFilters-${propertyGroupIndex}`,taxonomicGroupTypes:taxonomicGroupTypes,eventNames:eventNames,propertyGroupType:group.type,orFiltering:!0})]}),propertyGroupIndex!==propertyGroupFilter.values.length-1&&jsx_runtime.jsx("div",{className:"property-group-and-or-separator",children:jsx_runtime.jsx("span",{children:propertyGroupFilter.type})})]},propertyGroupIndex))}):null]}),(0,jsx_runtime.jsx)(src.Jp,{"data-attr":`${pageKey}-add-filter-group`,type:"secondary",onClick:addFilterGroup,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlusSmall,{color:"var(--primary)"}),sideIcon:null,disabledReason:disabledReason,children:"Add filter group"})]})}var InsightViz_utils=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts");function GlobalAndOrFilters(_ref){let{insightProps}=_ref,{actions:allActions}=(0,index_esm.useValues)(actionsModel.D),{groupsTaxonomicTypes}=(0,index_esm.useValues)(groupsModel.$),{querySource,isDataWarehouseSeries}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateQuerySource}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),taxonomicGroupTypes=[TaxonomicFilter_types.t.EventProperties,TaxonomicFilter_types.t.PersonProperties,TaxonomicFilter_types.t.EventFeatureFlags,...groupsTaxonomicTypes,TaxonomicFilter_types.t.Cohorts,TaxonomicFilter_types.t.Elements,TaxonomicFilter_types.t.SessionProperties,TaxonomicFilter_types.t.HogQLExpression,TaxonomicFilter_types.t.DataWarehousePersonProperties];return(0,jsx_runtime.jsx)(PropertyGroupFilters_PropertyGroupFilters_PropertyGroupFilters,{insightProps:insightProps,pageKey:`${(0,sharedUtils.bk)("new")(insightProps)}-GlobalAndOrFilters`,query:querySource,setQuery:updateQuerySource,eventNames:(0,InsightViz_utils.xp)(querySource,allActions),taxonomicGroupTypes:taxonomicGroupTypes,isDataWarehouseSeries:isDataWarehouseSeries})}let lifecycles=[{name:"new",tooltip:"Users who did the event or action during the interval and were also created during that period – e.g. created an account and sent a message today.",color:"var(--lifecycle-new)"},{name:"returning",tooltip:"Someone who was active in the previous interval and is also active in the current interval – e.g. sent a message yesterday and also sent a message today.",color:"var(--lifecycle-returning)"},{name:"resurrecting",tooltip:"Someone who was not active in the previous interval but became active once again – e.g. did not send any messages for 10 days, but sent one today.",color:"var(--lifecycle-resurrecting)"},{name:"dormant",tooltip:"Users who are not active in the current interval, but were active in the previous interval – e.g. someone who has not sent a message today, but sent one yesterday.",color:"var(--lifecycle-dormant)"}],DEFAULT_LIFECYCLE_TOGGLES=["new","returning","resurrecting","dormant"];function LifecycleToggles(_ref){let{insightProps}=_ref,{insightFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),toggledLifecycles=insightFilter?.toggledLifecycles||DEFAULT_LIFECYCLE_TOGGLES,toggleLifecycle=name=>{toggledLifecycles.includes(name)?updateInsightFilter({toggledLifecycles:toggledLifecycles.filter(n=>n!==name)}):updateInsightFilter({toggledLifecycles:[...toggledLifecycles,name]})};return(0,jsx_runtime.jsx)("div",{className:"flex flex-col -mt-1 uppercase",children:lifecycles.map(lifecycle=>(0,jsx_runtime.jsx)(src.HQ,{info:lifecycle.tooltip,children:(0,jsx_runtime.jsx)(src.Hw,{label:lifecycle.name,color:lifecycle.color,checked:toggledLifecycles.includes(lifecycle.name),onChange:()=>toggleLifecycle(lifecycle.name)})},lifecycle.name))})}let ALLOWED_FORMULA_CHARACTERS=/^[a-zA-Z \-*^0-9+/().]+$/;function TrendsFormula(_ref){let{insightProps}=_ref,{formula,hasFormula}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),[value,setValue]=(0,react.useState)(formula||void 0);return(0,react.useEffect)(()=>{formula&&setValue(formula)},[formula]),hasFormula?(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-2",children:(0,jsx_runtime.jsx)(src.DF,{className:"flex-1",placeholder:"Example: (A + B) / 100",autoFocus:!0,value:value||void 0,onChange:value=>{let changedValue=value.toLocaleUpperCase();setValue(changedValue=changedValue.split("").filter(d=>ALLOWED_FORMULA_CHARACTERS.test(d)).join(""))},onBlur:e=>{e.relatedTarget?.id!=="trends-formula-switch"&&value!==formula&&updateInsightFilter({formula:value})},onFocus:()=>{value&&value!==formula&&updateInsightFilter({formula:value})},onPressEnter:()=>{value!==formula&&updateInsightFilter({formula:value})}})}):null}function TrendsSeries(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{querySource,isLifecycle,isStickiness,display,hasFormula,series}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateQuerySource}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{showGroupsOptions,groupsTaxonomicTypes}=(0,index_esm.useValues)(groupsModel.$),propertiesTaxonomicGroupTypes=[TaxonomicFilter_types.t.EventProperties,TaxonomicFilter_types.t.PersonProperties,TaxonomicFilter_types.t.EventFeatureFlags,...groupsTaxonomicTypes,TaxonomicFilter_types.t.Cohorts,TaxonomicFilter_types.t.Elements,TaxonomicFilter_types.t.SessionProperties,TaxonomicFilter_types.t.HogQLExpression,TaxonomicFilter_types.t.DataWarehouseProperties,TaxonomicFilter_types.t.DataWarehousePersonProperties];if(!(0,utils.Yg)(querySource))return null;let filters=(0,queryNodeToFilter.ce)(querySource),mathAvailability=isLifecycle?ActionFilterRow.Qq.None:isStickiness?ActionFilterRow.Qq.ActorsOnly:ActionFilterRow.Qq.All;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[isLifecycle&&(0,jsx_runtime.jsx)("div",{className:"leading-6",children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:["Showing",showGroupsOptions?(0,jsx_runtime.jsx)(AggregationSelect.C8,{className:"mx-2",insightProps:insightProps,hogqlAvailable:!1}):(0,jsx_runtime.jsx)("b",{children:" Unique users "}),"who did"]})}),(0,jsx_runtime.jsx)(ActionFilter.T,{filters:filters,setFilters:payload=>{updateQuerySource({series:(0,filtersToQueryNode.NG)(payload,!0,mathAvailability)})},typeKey:(0,sharedUtils.bk)("new")(insightProps),buttonCopy:`Add graph ${hasFormula?"variable":"series"}`,showSeriesIndicator:!0,showNestedArrow:!0,entitiesLimit:display&&constants.wG.includes(display)&&!hasFormula||isLifecycle?1:lib_utils.bH.length,mathAvailability:mathAvailability,propertiesTaxonomicGroupTypes:propertiesTaxonomicGroupTypes,actionsTaxonomicGroupTypes:[TaxonomicFilter_types.t.Events,TaxonomicFilter_types.t.Actions,TaxonomicFilter_types.t.DataWarehouse],hideDeleteBtn:series?.length===1})]})}function TrendsSeriesLabel(_ref){let{insightProps}=_ref,{hasFormula,isTrends,display,series}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),canDisableFormula=!isTrends||!display||!constants.wG.includes(display)||series?.length===1,formulaModeButtonDisabled=hasFormula&&!canDisableFormula;return(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,jsx_runtime.jsx)("span",{children:hasFormula?"Variables":"Series"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:formulaModeButtonDisabled?"This chart type does not support multiple series, so in order to disable formula mode, remove variables or switch to a different chart type.":"Make your own formula the output of the insight with formula mode. Use graph series as variables.",children:(0,jsx_runtime.jsx)("div",{className:"-my-1",children:(0,jsx_runtime.jsxs)(src.Jp,{size:"small",onClick:()=>updateInsightFilter({formula:hasFormula?void 0:""}),disabled:formulaModeButtonDisabled,icon:(0,jsx_runtime.jsx)(icons.X8,{}),id:"trends-formula-switch",children:[hasFormula?"Disable":"Enable"," formula mode"]})})})]})}function EditorFilters_EditorFilters(_ref){let{query,showing,embedded}=_ref,{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{isTrends,isFunnels,isRetention,isPaths,isLifecycle,isStickiness,isTrendsLike,display,breakdownFilter,pathsFilter,querySource,shouldShowSessionAnalysisWarning,hasFormula}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{isStepsFunnel,isTrendsFunnel}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps));if(!querySource)return null;let hasBreakdown=isTrends&&!constants.MD.includes(display||types.Qb.ActionsLineGraph)||isStepsFunnel||isTrendsFunnel,hasPathsAdvanced=hasAvailableFeature(types.P$.PATHS_ADVANCED),hasPathsHogQL=isPaths&&pathsFilter?.includeEventTypes?.includes(types.cB.HogQL),editorFilters=[{title:"General",editorFilters:filterFalsy([isRetention&&{key:"retention-summary",label:"Retention Summary",component:RetentionSummary},...isPaths?filterFalsy([{key:"event-types",label:"Event Types",component:PathsEventsTypes},hasPathsHogQL&&{key:"hogql",label:"HogQL Expression",component:PathsHogQL},hasPathsAdvanced&&{key:"wildcard-groups",label:"Wildcard Groups",showOptional:!0,component:PathsWildcardGroups,tooltip:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Use wildcard matching to group events by unique values in path item names. Use an asterisk (*) in place of unique values. For example, instead of /merchant/1234/payment, replace the unique value with an asterisk /merchant/*/payment. ",(0,jsx_runtime.jsx)("b",{children:"Use a comma to separate multiple wildcards."})]})},{key:"start-target",label:"Starts at",component:PathsTargetStart},hasPathsAdvanced&&{key:"ends-target",label:"Ends at",component:PathsTargetEnd}]):[],...isFunnels?filterFalsy([{key:"query-steps",component:FunnelsQuerySteps.O}]):[]])},{title:"Series",editorFilters:filterFalsy([isTrendsLike&&{key:"series",label:isTrends?TrendsSeriesLabel:void 0,component:TrendsSeries},isTrends&&hasFormula?{key:"formula",label:"Formula",component:TrendsFormula}:null])},{title:"Filters",editorFilters:filterFalsy([isLifecycle?{key:"toggles",label:"Lifecycle Toggles",position:"right",component:LifecycleToggles}:null,isStickiness?{key:"stickinessCriteria",label:()=>(0,jsx_runtime.jsxs)("div",{className:"flex",children:[(0,jsx_runtime.jsx)("span",{children:"Stickiness Criteria"}),(0,jsx_runtime.jsx)(src.u,{closeDelayMs:200,title:(0,jsx_runtime.jsx)("div",{className:"space-y-2",children:(0,jsx_runtime.jsx)("div",{children:'The stickiness criteria defines how many times a user must perform an event inside of a given interval in order to be considered "sticky."'})}),children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-xl text-muted-alt shrink-0 ml-1"})})]}),position:"right",component:StickinessCriteria}:null,{key:"properties",label:"Filters",position:"right",component:GlobalAndOrFilters}])},{title:"Breakdown",count:breakdownFilter?.breakdowns?.length||(breakdownFilter?.breakdown?1:0),editorFilters:filterFalsy([hasBreakdown?{key:"breakdown",position:"right",component:Breakdown}:null,isStepsFunnel||isTrendsFunnel?{key:"attribution",label:()=>(0,jsx_runtime.jsxs)("div",{className:"flex",children:[(0,jsx_runtime.jsx)("span",{children:"Attribution type"}),(0,jsx_runtime.jsx)(src.u,{closeDelayMs:200,title:(0,jsx_runtime.jsxs)("div",{className:"space-y-2",children:[(0,jsx_runtime.jsx)("div",{children:"When breaking down funnels, it's possible that the same properties don't exist on every event. For example, if you want to break down by browser on a funnel that contains both frontend and backend events."}),(0,jsx_runtime.jsx)("div",{children:"In this case, you can choose from which step the properties should be selected from by modifying the attribution type. There are four modes to choose from:"}),(0,jsx_runtime.jsxs)("ul",{className:"list-disc pl-4",children:[(0,jsx_runtime.jsx)("li",{children:"First touchpoint: the first property value seen in any of the steps is chosen."}),(0,jsx_runtime.jsx)("li",{children:"Last touchpoint: the last property value seen from all steps is chosen."}),(0,jsx_runtime.jsx)("li",{children:"All steps: the property value must be seen in all steps to be considered in the funnel."}),(0,jsx_runtime.jsx)("li",{children:"Specific step: only the property value seen at the selected step is chosen."})]}),(0,jsx_runtime.jsxs)("div",{children:["Read more in the"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/product-analytics/funnels#attribution-types",children:"documentation."})]})]}),children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"text-xl text-muted-alt shrink-0 ml-1"})})]}),position:"right",component:Attribution}:null])},{title:"Exclusions",editorFilters:filterFalsy([isPaths&&{key:"paths-exclusions",label:"Exclusions",position:"right",tooltip:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Exclude events from Paths visualisation. You can use wildcard groups in exclusions as well."}),component:PathsExclusions}])},{title:"Advanced Options",editorFilters:filterFalsy([isPaths&&{key:"paths-advanced",position:"left",component:PathsAdvanced},isFunnels&&{key:"funnels-advanced",position:"left",component:FunnelsAdvanced}])},{title:"Sampling",editorFilters:filterFalsy([{key:"sampling",position:"right",component:SamplingFilter}])}],editorFilterGroups=[],leftFilters=editorFilters.reduce((acc,x)=>acc.concat(x.editorFilters.filter(y=>"right"!==y.position)),[]),rightFilters=editorFilters.reduce((acc,x)=>acc.concat(x.editorFilters.filter(y=>"right"===y.position)),[]);return editorFilterGroups=[{title:"left",editorFilters:leftFilters},{title:"right",editorFilters:rightFilters}],(0,jsx_runtime.jsx)(CSSTransition.Z,{in:showing,timeout:250,classNames:"anim-",mountOnEnter:!0,unmountOnExit:!0,children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("EditorFiltersWrapper",{"EditorFiltersWrapper--embedded":embedded}),children:[(0,jsx_runtime.jsx)("div",{className:"EditorFilters",children:editorFilterGroups.map(editorFilterGroup=>(0,jsx_runtime.jsx)(EditorFilterGroup_EditorFilterGroup,{editorFilterGroup:editorFilterGroup,insightProps:insightProps,query:query},editorFilterGroup.title))}),shouldShowSessionAnalysisWarning?(0,jsx_runtime.jsxs)(src.Vp,{type:"info",className:"mt-2",children:["When using sessions and session properties, events without session IDs will be excluded from the set of results."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/user-guides/sessions",children:"Learn more about sessions."})]}):null]})})}function filterFalsy(a){return a.filter(e=>!!e)}var ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),InsightLegend=__webpack_require__("./frontend/src/lib/components/InsightLegend/InsightLegend.tsx"),Funnel=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/Funnel.scss"),Funnel_default=__webpack_require__.n(Funnel),Funnel_options={};Funnel_options.insert="head",Funnel_options.singleton=!1,injectStylesIntoStyleTag_default()(Funnel_default(),Funnel_options),Funnel_default().locals;var dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),insightTooltipUtils=__webpack_require__("./frontend/src/scenes/insights/InsightTooltip/insightTooltipUtils.tsx"),LineGraph=__webpack_require__("./frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx"),PersonsModal=__webpack_require__("./frontend/src/scenes/trends/persons-modal/PersonsModal.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),funnelPersonsModalLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelPersonsModalLogic.ts");let LineGraphWrapper=_ref=>{let{inCardView,children}=_ref;return inCardView?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:children}):(0,jsx_runtime.jsx)("div",{className:"TrendsInsight",children:children})};function FunnelLineGraph(_ref2){var _indexedSteps$0$label;let{inCardView,inSharedMode,showPersonsModal:showPersonsModalProp=!0}=_ref2,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{indexedSteps,aggregationTargetLabel,incompletenessOffsetFromEnd,interval,querySource,insightData}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{canOpenPersonModal}=(0,index_esm.useValues)((0,funnelPersonsModalLogic.a)(insightProps));if(!(0,utils.Yg)(querySource))return null;let showPersonsModal=canOpenPersonModal&&showPersonsModalProp,aggregationGroupTypeIndex=querySource.aggregation_group_type_index;return(0,jsx_runtime.jsx)(LineGraphWrapper,{inCardView:inCardView,children:(0,jsx_runtime.jsx)(LineGraph.xr,{"data-attr":"trend-line-graph-funnel",type:types.KU.Line,datasets:indexedSteps,labels:null!==(_indexedSteps$0$label=indexedSteps?.[0]?.labels)&&void 0!==_indexedSteps$0$label?_indexedSteps$0$label:[],isInProgress:incompletenessOffsetFromEnd<0,inSharedMode:!!inSharedMode,showPersonsModal:showPersonsModal,tooltip:{showHeader:!1,hideColorCol:!0,renderSeries:(_,datum)=>indexedSteps?.[0]?.days?(0,insightTooltipUtils.L0)(indexedSteps[0].days?.[datum.dataIndex],null!=interval?interval:void 0)+" "+(insightData?.timezone?(0,lib_utils.ig)(insightData.timezone):"UTC"):"Trend",renderCount:count=>`${count}%`},trendsFilter:{aggregationAxisFormat:"percentage"},labelGroupType:null!=aggregationGroupTypeIndex?aggregationGroupTypeIndex:"people",incompletenessOffsetFromEnd:incompletenessOffsetFromEnd,onClick:showPersonsModal?payload=>{var _dataset$days$index,_ref3,_dataset$label;let{points,index}=payload,dataset=points.clickedPointNotLine?points.pointsIntersectingClick[0].dataset:points.pointsIntersectingLine[0].dataset,day=null!==(_dataset$days$index=dataset?.days?.[index])&&void 0!==_dataset$days$index?_dataset$days$index:"",label=null!==(_ref3=null!==(_dataset$label=dataset?.label)&&void 0!==_dataset$label?_dataset$label:dataset?.labels?.[index])&&void 0!==_ref3?_ref3:"",title=`${(0,lib_utils.fm)(aggregationTargetLabel.plural)} converted on ${(0,dayjs.Bv)(label).format("MMMM Do YYYY")}`,query={kind:schema.OH.FunnelsActorsQuery,source:querySource,funnelTrendsDropOff:!1,includeRecordings:!0,funnelTrendsEntrancePeriodStart:(0,dayjs.Bv)(day).format("YYYY-MM-DD HH:mm:ss")};(0,PersonsModal.Yp)({title,query})}:void 0})})}var FunnelBarHorizontal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.scss"),FunnelBarHorizontal_default=__webpack_require__.n(FunnelBarHorizontal),FunnelBarHorizontal_options={};FunnelBarHorizontal_options.insert="head",FunnelBarHorizontal_options.singleton=!1,injectStylesIntoStyleTag_default()(FunnelBarHorizontal_default(),FunnelBarHorizontal_options),FunnelBarHorizontal_default().locals;var EntityFilterInfo=__webpack_require__("./frontend/src/lib/components/EntityFilterInfo.tsx"),SeriesGlyph=__webpack_require__("./frontend/src/lib/components/SeriesGlyph.tsx"),useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),funnelStepTableUtils=__webpack_require__("./frontend/src/scenes/insights/views/Funnels/funnelStepTableUtils.tsx"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx");function FunnelStepMore(_ref){let{stepIndex}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{querySource}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),stepNumber=stepIndex+1,getPathUrl=(0,react.useCallback)(function(funnelPathType){let dropOff=arguments.length>1&&void 0!==arguments[1]&&arguments[1],query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.PathsQuery,funnelPathsFilter:{funnelStep:dropOff?-1*stepNumber:stepNumber,funnelSource:querySource,funnelPathType},pathsFilter:{includeEventTypes:[types.cB.PageView,types.cB.CustomEvent]},dateRange:{date_from:querySource?.dateRange?.date_from}}};return urls.j.insightNew(void 0,void 0,query)},[querySource,stepNumber]);return querySource?.aggregation_group_type_index!=void 0?null:(0,jsx_runtime.jsx)(More.T,{placement:"bottom-start",noPadding:!0,overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[stepNumber>1&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,to:getPathUrl(types.hP.before),children:"Show user paths leading to step"}),stepNumber>1&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,to:getPathUrl(types.hP.between),children:"Show user paths between previous step and this step"}),(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,to:getPathUrl(types.hP.after),children:"Show user paths after step"}),stepNumber>1&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,to:getPathUrl(types.hP.after,!0),children:"Show user paths after dropoff"}),stepNumber>1&&(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,to:getPathUrl(types.hP.before,!0),children:"Show user paths before dropoff"})]})})}var ValueInspectorButton=__webpack_require__("./frontend/src/scenes/funnels/ValueInspectorButton.tsx"),FunnelTooltip=__webpack_require__("./frontend/src/scenes/funnels/FunnelTooltip.tsx");function Bar(_ref){let{percentage:conversionPercentage,name,onBarClick,disabled,isBreakdown=!1,breakdownIndex,breakdownMaxIndex,breakdownSumPercentage,step,stepIndex,breakdownFilter,aggregationTargetLabel,wrapperWidth}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{getFunnelsColor}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),barRef=(0,react.useRef)(null),labelRef=(0,react.useRef)(null),[labelPosition,setLabelPosition]=(0,react.useState)("inside"),[labelVisible,setLabelVisible]=(0,react.useState)(!0),hasBreakdownSum=isBreakdown&&"number"==typeof breakdownSumPercentage;return((0,react.useEffect)(()=>{!function(){var _barRef$current$clien2,_labelRef$current$cli2,_barRef$current$clien,_barRef$current$offse,_labelRef$current$cli;if(hasBreakdownSum){setLabelPosition("outside");let barWidth=null!==(_barRef$current$clien=barRef.current?.clientWidth)&&void 0!==_barRef$current$clien?_barRef$current$clien:null,barOffset=null!==(_barRef$current$offse=barRef.current?.offsetLeft)&&void 0!==_barRef$current$offse?_barRef$current$offse:null,labelWidth=null!==(_labelRef$current$cli=labelRef.current?.clientWidth)&&void 0!==_labelRef$current$cli?_labelRef$current$cli:null;null!==barWidth&&null!==barOffset&&null!==wrapperWidth&&null!==labelWidth&&(wrapperWidth-(barWidth+barOffset)barWidth){setLabelPosition("outside");return}setLabelPosition("inside")}()},[wrapperWidth]),conversionPercentage)?(0,jsx_runtime.jsx)(src.Qw,{trigger:"hover",placement:"right",showArrow:!0,overlay:(0,jsx_runtime.jsx)(FunnelTooltip.d,{showPersonsModal:!disabled,stepIndex:stepIndex,series:step,groupTypeLabel:aggregationTargetLabel.plural,breakdownFilter:breakdownFilter,embedded:!0}),children:(0,jsx_runtime.jsx)("div",{ref:barRef,className:`funnel-bar ${(0,funnelUtils.s)(breakdownIndex,breakdownMaxIndex)}`,style:{flex:`${conversionPercentage} 1 0`,cursor:disabled?"":"pointer",backgroundColor:getFunnelsColor(step)},onClick:()=>{!disabled&&onBarClick&&onBarClick()},children:(!isBreakdown||hasBreakdownSum&&labelVisible)&&(0,jsx_runtime.jsx)("div",{ref:labelRef,className:`funnel-bar-percentage ${labelPosition}`,title:name?`${(0,lib_utils.fm)(aggregationTargetLabel.plural)} who did ${name}`:void 0,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":(null!=breakdownSumPercentage?breakdownSumPercentage:conversionPercentage)*100,children:(0,lib_utils.e9)(null!=breakdownSumPercentage?breakdownSumPercentage:conversionPercentage,1,!0)})})}):null}function DuplicateStepIndicator(){return(0,jsx_runtime.jsx)(Tooltip.u,{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("b",{children:"This is a repeated event in a sequence"}),(0,jsx_runtime.jsx)("p",{children:"When an event is repeated across funnel steps, it is interpreted as a sequence. For example, a three-step funnel consisting of pageview events is interpretted as first pageview, followed by second pageview, followed by a third pageview."})]}),children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{style:{marginLeft:"0.375rem",fontSize:"1.25rem",color:"var(--muted-alt)"}})})}function FunnelBarHorizontal_FunnelBarHorizontal_FunnelBarHorizontal(_ref){let{inCardView,showPersonsModal:showPersonsModalProp=!0}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{visibleStepsWithConversionMetrics,aggregationTargetLabel,funnelsFilter,breakdownFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{canOpenPersonModal}=(0,index_esm.useValues)((0,funnelPersonsModalLogic.a)(insightProps)),{openPersonsModalForStep,openPersonsModalForSeries}=(0,index_esm.useActions)((0,funnelPersonsModalLogic.a)(insightProps)),{ref:graphRef,width}=(0,useResizeObserver.y)(),stepReference=funnelsFilter?.funnelStepReference||types.XF.total,showPersonsModal=canOpenPersonModal&&showPersonsModalProp;return(0,jsx_runtime.jsx)("div",{"data-attr":"funnel-bar-horizontal",className:(0,clsx_m.default)("FunnelBarHorizontal"),ref:graphRef,children:visibleStepsWithConversionMetrics.map((step,stepIndex)=>{let basisStep=(0,funnelUtils.gS)(visibleStepsWithConversionMetrics,stepReference,stepIndex),showLineBefore=stepIndex>0,showLineAfter=stepIndexsum+item.count,0)||0,isBreakdown=Array.isArray(step.nested_breakdown)&&step.nested_breakdown?.length!==void 0&&1!==step.nested_breakdown.length,dropOffCount=step.order>0?visibleStepsWithConversionMetrics[stepIndex-1].count-step.count:0;return(0,jsx_runtime.jsxs)("section",{className:"funnel-step",children:[(0,jsx_runtime.jsxs)("div",{className:"funnel-series-container",children:[(0,jsx_runtime.jsx)("div",{className:`funnel-series-linebox ${showLineBefore?"before":""}`}),funnelsFilter?.funnelOrderType===types.kO.UNORDERED?(0,jsx_runtime.jsx)(SeriesGlyph.K3,{variant:"funnel-step-glyph",children:(0,jsx_runtime.jsx)(icons.EF,{style:{fill:"var(--primary_alt)",width:14}})}):(0,jsx_runtime.jsx)(SeriesGlyph.K3,{variant:"funnel-step-glyph",children:step.order+1}),(0,jsx_runtime.jsx)("div",{className:`funnel-series-linebox ${showLineAfter?"after":""}`})]}),(0,jsx_runtime.jsxs)("header",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center max-w-full grow",children:[(0,jsx_runtime.jsx)("div",{className:"funnel-step-title",children:funnelsFilter?.funnelOrderType===types.kO.UNORDERED?(0,jsx_runtime.jsxs)("span",{children:["Completed ",step.order+1," steps"]}):(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:(0,funnelStepTableUtils.R)(step)})}),funnelsFilter?.funnelOrderType!==types.kO.UNORDERED&&stepIndex>0&&step.action_id===visibleStepsWithConversionMetrics[stepIndex-1].action_id&&(0,jsx_runtime.jsx)(DuplicateStepIndicator,{}),(0,jsx_runtime.jsx)(FunnelStepMore,{stepIndex:stepIndex})]}),step.average_conversion_time&&step.average_conversion_time>=Number.EPSILON?(0,jsx_runtime.jsxs)("div",{className:"text-muted-alt",children:["Average time to convert:"," ",(0,jsx_runtime.jsx)("b",{children:(0,lib_utils.C7)(step.average_conversion_time,{maxUnits:2})})]}):null]}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("funnel-bar-wrapper",{breakdown:isBreakdown}),"aria-busy":!width,children:width?isBreakdown?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[step?.nested_breakdown?.map((breakdown,index)=>jsx_runtime.jsx(Bar,{name:breakdown.name,percentage:breakdown.count/basisStep.count,isBreakdown:!0,breakdownIndex:index,breakdownMaxIndex:breakdownMaxIndex,breakdownSumPercentage:index===breakdownMaxIndex&&breakdownSum?breakdownSum/basisStep.count:void 0,onBarClick:()=>openPersonsModalForSeries({step,series:breakdown,converted:!0}),step:breakdown,stepIndex:stepIndex,breakdownFilter:breakdownFilter,disabled:!showPersonsModal,aggregationTargetLabel:aggregationTargetLabel,wrapperWidth:width},`${breakdown.action_id}-${step.breakdown_value}-${index}`)),(0,jsx_runtime.jsx)("div",{className:"funnel-bar-empty-space",onClick:()=>openPersonsModalForStep({step,converted:!1}),style:{flex:`${1-breakdownSum/basisStep.count} 1 0`,cursor:`${inCardView?"":"pointer"}`}})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Bar,{name:step.name,percentage:step.conversionRates.fromBasisStep,onBarClick:()=>openPersonsModalForStep({step,converted:!0}),step:step.nested_breakdown[0],stepIndex:stepIndex,breakdownFilter:breakdownFilter,disabled:!showPersonsModal,aggregationTargetLabel:aggregationTargetLabel,wrapperWidth:width}),(0,jsx_runtime.jsx)("div",{className:"funnel-bar-empty-space",onClick:()=>openPersonsModalForStep({step,converted:!1}),style:{flex:`${1-step.conversionRates.fromBasisStep} 1 0`,cursor:`${inCardView?"":"pointer"}`}})]}):null}),(0,jsx_runtime.jsxs)("div",{className:"funnel-conversion-metadata funnel-step-metadata",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)(ValueInspectorButton.M,{onClick:showPersonsModal?()=>openPersonsModalForStep({step,converted:!0}):void 0,children:[(0,jsx_runtime.jsx)(icons.cs,{style:{color:"var(--success)"},className:"value-inspector-button-icon"}),(0,jsx_runtime.jsx)("b",{children:(0,lib_utils.Zi)(step.count,aggregationTargetLabel.singular,aggregationTargetLabel.plural)})]})," ",(0,jsx_runtime.jsx)("span",{className:"text-muted-alt grow",children:`(${(0,lib_utils.e9)(step.conversionRates.fromPrevious,2,!0)}) completed step`})]}),stepIndex>0&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)(ValueInspectorButton.M,{onClick:showPersonsModal?()=>openPersonsModalForStep({step,converted:!1}):void 0,children:[(0,jsx_runtime.jsx)(icons.K6,{style:{color:"var(--danger)"},className:"value-inspector-button-icon"}),(0,jsx_runtime.jsx)("b",{children:(0,lib_utils.Zi)(dropOffCount,aggregationTargetLabel.singular,aggregationTargetLabel.plural)})]})," ",(0,jsx_runtime.jsx)("span",{className:"text-muted-alt",children:`(${(0,lib_utils.e9)(1-step.conversionRates.fromPrevious,2,!0)}) dropped off`})]})]})]},step.order)})})}var FunnelBarVertical=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss"),FunnelBarVertical_default=__webpack_require__.n(FunnelBarVertical),FunnelBarVertical_options={};FunnelBarVertical_options.insert="head",FunnelBarVertical_options.singleton=!1,injectStylesIntoStyleTag_default()(FunnelBarVertical_default(),FunnelBarVertical_options),FunnelBarVertical_default().locals;var ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx");function StepBarLabels(){return(0,jsx_runtime.jsx)("div",{className:"StepBarLabels",children:Array(6).fill(null).map((_,i)=>(0,jsx_runtime.jsx)("div",{className:"StepBarLabels__segment",children:(0,jsx_runtime.jsxs)("div",{className:"StepBarLabels__label",children:[20*i,"%"]})},i))})}var funnelTooltipLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelTooltipLogic.ts");function StepBar(_ref){let{step,stepIndex,series,showPersonsModal}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{getFunnelsColor}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{showTooltip,hideTooltip}=(0,index_esm.useActions)((0,funnelTooltipLogic.Y)(insightProps)),{openPersonsModalForSeries}=(0,index_esm.useActions)((0,funnelPersonsModalLogic.a)(insightProps)),ref=(0,react.useRef)(null);return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("StepBar",!showPersonsModal&&"StepBar__unclickable"),style:{"--series-color":getFunnelsColor(series),"--conversion-rate":(0,lib_utils.e9)(series.conversionRates.fromBasisStep,1,!0)},ref:ref,onMouseEnter:()=>{if(ref.current){let rect=ref.current.getBoundingClientRect();showTooltip([rect.x,rect.y,rect.width],stepIndex,series)}},onMouseLeave:()=>hideTooltip(),children:[(0,jsx_runtime.jsx)("div",{className:"StepBar__backdrop",onClick:showPersonsModal?()=>openPersonsModalForSeries({step,series,converted:!1}):void 0}),(0,jsx_runtime.jsx)("div",{className:"StepBar__fill",onClick:showPersonsModal?()=>openPersonsModalForSeries({step,series,converted:!0}):void 0})]})}function StepBars(_ref){let{step,stepIndex,showPersonsModal}=_ref;return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("StepBars",0===stepIndex&&"StepBars--first"),children:[(0,jsx_runtime.jsx)("div",{className:"StepBars__grid",children:[,,,,,].fill(null).map((_,i)=>(0,jsx_runtime.jsx)("div",{className:"StepBars__gridline StepBars__gridline--horizontal"},`gridline-${stepIndex}-${i}`))}),step.nested_breakdown?.map(series=>jsx_runtime.jsx(StepBar,{step:step,stepIndex:stepIndex,series:series,showPersonsModal:showPersonsModal},`bar-${stepIndex}-${series.order}`))]})}var LemonRow=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRow/index.ts"),Lettermark=__webpack_require__("./frontend/src/lib/lemon-ui/Lettermark/index.ts");function StepLegend(_ref){var _step$count,_step$droppedOffFromP;let{step,stepIndex,showTime,showPersonsModal}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{aggregationTargetLabel}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{canOpenPersonModal,isInExperimentContext}=(0,index_esm.useValues)((0,funnelPersonsModalLogic.a)(insightProps)),{openPersonsModalForStep}=(0,index_esm.useActions)((0,funnelPersonsModalLogic.a)(insightProps)),{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),convertedCountPresentation=(0,lib_utils.Zi)(null!==(_step$count=step.count)&&void 0!==_step$count?_step$count:0,aggregationTargetLabel.singular,aggregationTargetLabel.plural),droppedOffCountPresentation=(0,lib_utils.Zi)(null!==(_step$droppedOffFromP=step.droppedOffFromPrevious)&&void 0!==_step$droppedOffFromP?_step$droppedOffFromP:0,aggregationTargetLabel.singular,aggregationTargetLabel.plural),convertedCountPresentationWithPercentage=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[convertedCountPresentation," ",(0,jsx_runtime.jsxs)("span",{className:"text-muted",children:["(",(0,lib_utils.e9)(step.conversionRates.fromBasisStep,2),")"]})]}),droppedOffCountPresentationWithPercentage=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[droppedOffCountPresentation," ",(0,jsx_runtime.jsxs)("span",{className:"text-muted",children:["(",(0,lib_utils.e9)(1-step.conversionRates.fromPrevious,2),")"]})]});return(0,jsx_runtime.jsxs)("div",{className:"StepLegend",children:[(0,jsx_runtime.jsx)(LemonRow.Q,{icon:(0,jsx_runtime.jsx)(Lettermark.B,{name:stepIndex+1,color:Lettermark.w.Gray}),sideIcon:hasAvailableFeature(types.P$.PATHS_ADVANCED)&&(0,jsx_runtime.jsx)(FunnelStepMore,{stepIndex:stepIndex}),children:(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:(0,funnelStepTableUtils.R)(step)})}),(0,jsx_runtime.jsx)(LemonRow.Q,{icon:(0,jsx_runtime.jsx)(icons.cs,{}),status:"success",style:{color:"unset"},children:(0,jsx_runtime.jsx)(Tooltip.u,{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,lib_utils.fm)(aggregationTargetLabel.plural)," who completed this step,",(0,jsx_runtime.jsx)("br",{}),"with conversion rate relative to the first step"]}),placement:"right",children:showPersonsModal&&canOpenPersonModal&&!isInExperimentContext?(0,jsx_runtime.jsx)(ValueInspectorButton.M,{onClick:()=>openPersonsModalForStep({step,stepIndex,converted:!0}),children:convertedCountPresentationWithPercentage}):(0,jsx_runtime.jsx)("span",{children:convertedCountPresentationWithPercentage})})}),stepIndex>0&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonRow.Q,{icon:(0,jsx_runtime.jsx)(icons.K6,{}),status:"danger",style:{color:"unset"},children:(0,jsx_runtime.jsx)(Tooltip.u,{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,lib_utils.fm)(aggregationTargetLabel.plural)," who didn't complete this step,",(0,jsx_runtime.jsx)("br",{}),"with drop-off rate relative to the previous step"]}),placement:"right",children:showPersonsModal&&stepIndex&&!isInExperimentContext?(0,jsx_runtime.jsx)(ValueInspectorButton.M,{onClick:()=>openPersonsModalForStep({step,stepIndex,converted:!1}),children:droppedOffCountPresentationWithPercentage}):(0,jsx_runtime.jsx)("span",{children:droppedOffCountPresentationWithPercentage})})}),showTime&&(0,jsx_runtime.jsx)(LemonRow.Q,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconClock,{}),title:"Median time of conversion from previous step",children:(0,lib_utils.C7)(step.median_conversion_time,{maxUnits:3})||"–"})]})]})}function FunnelBarVertical_FunnelBarVertical_FunnelBarVertical(_ref){var _visibleStepsWithConv;let{showPersonsModal:showPersonsModalProp=!0}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{visibleStepsWithConversionMetrics}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{canOpenPersonModal}=(0,index_esm.useValues)((0,funnelPersonsModalLogic.a)(insightProps)),showPersonsModal=canOpenPersonModal&&showPersonsModalProp,vizRef=(0,FunnelTooltip.c)(showPersonsModal),{height:availableHeight}=(0,useResizeObserver.y)({ref:vizRef}),[scrollbarHeightPx,setScrollbarHeightPx]=(0,react.useState)(0),seriesCount=null!==(_visibleStepsWithConv=visibleStepsWithConversionMetrics[0]?.nested_breakdown?.length)&&void 0!==_visibleStepsWithConv?_visibleStepsWithConv:0,scrollRef=(0,react.useRef)(null);(0,react.useLayoutEffect)(()=>{scrollRef.current&&setScrollbarHeightPx(scrollRef.current.offsetHeight-scrollRef.current.clientHeight)},[availableHeight]);let showTime=visibleStepsWithConversionMetrics.some(step=>null!=step.average_conversion_time),barRowHeight=`calc(${availableHeight}px - 1px - ${1.75*(showTime?4:3)-.25+1.5}rem - ${scrollbarHeightPx}px)`;return(0,jsx_runtime.jsx)("div",{className:"FunnelBarVertical",ref:vizRef,"data-attr":"funnel-bar-vertical",children:(0,jsx_runtime.jsx)(ScrollableShadows.D,{scrollRef:scrollRef,direction:"horizontal",children:(0,jsx_runtime.jsxs)("table",{style:{"--bar-width":`${seriesCount>=60?4:seriesCount>=20?8:seriesCount>=12?16:seriesCount>=10?20:seriesCount>=8?24:seriesCount>=6?32:seriesCount>=5?40:seriesCount>=4?48:seriesCount>=3?64:seriesCount>=2?96:192}px`,"--bar-row-height":barRowHeight},children:[(0,jsx_runtime.jsxs)("colgroup",{children:[visibleStepsWithConversionMetrics.map((_,i)=>(0,jsx_runtime.jsx)("col",{width:0},i)),(0,jsx_runtime.jsx)("col",{width:"100%"})]}),(0,jsx_runtime.jsxs)("tbody",{children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)(StepBarLabels,{})}),visibleStepsWithConversionMetrics.map((step,stepIndex)=>(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)(StepBars,{step:step,stepIndex:stepIndex,showPersonsModal:showPersonsModal})},stepIndex))]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{}),visibleStepsWithConversionMetrics.map((step,stepIndex)=>(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)(StepLegend,{step:step,stepIndex:stepIndex,showTime:showTime,showPersonsModal:showPersonsModal})},stepIndex))]})]})]})})})}var FunnelHistogram=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelHistogram.scss"),FunnelHistogram_default=__webpack_require__.n(FunnelHistogram),FunnelHistogram_options={};FunnelHistogram_options.insert="head",FunnelHistogram_options.singleton=!1,injectStylesIntoStyleTag_default()(FunnelHistogram_default(),FunnelHistogram_options),FunnelHistogram_default().locals;var Histogram=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Histogram/Histogram.scss"),Histogram_default=__webpack_require__.n(Histogram),Histogram_options={};Histogram_options.insert="head",Histogram_options.singleton=!1,injectStylesIntoStyleTag_default()(Histogram_default(),Histogram_options),Histogram_default().locals;var d3_src=__webpack_require__("./node_modules/.pnpm/d3@7.8.2/node_modules/d3/src/index.js");let useD3=function(renderChartFn){let dependencies=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],ref=(0,react.useRef)();return(0,react.useEffect)(()=>(void 0!==ref.current&&renderChartFn(d3_src.Ys(ref.current)),()=>{}),dependencies),ref},INITIAL_CONFIG={layout:constants.xp.vertical,height:352,width:500,margin:{top:20,right:20,bottom:20,left:40},borderRadius:4,transitionDuration:200,spacing:{btwnBins:6,yLabel:5,xLabel:8,labelLineHeight:1.2,barLabelPadding:8,minBarWidth:90}},getConfig=(layout,width,height)=>{let _width=width||INITIAL_CONFIG.width,_height=height||INITIAL_CONFIG.height,isVertical=layout===constants.xp.vertical;return{...INITIAL_CONFIG,layout,height:_height,width:_width,inner:{height:_height-INITIAL_CONFIG.margin.bottom-INITIAL_CONFIG.margin.top,width:_width-INITIAL_CONFIG.margin.left-INITIAL_CONFIG.margin.right},ranges:{x:isVertical?[INITIAL_CONFIG.margin.left,_width-INITIAL_CONFIG.margin.right]:[INITIAL_CONFIG.margin.top,_height-INITIAL_CONFIG.margin.bottom],y:isVertical?[_height-INITIAL_CONFIG.margin.bottom,INITIAL_CONFIG.margin.top]:[INITIAL_CONFIG.margin.left,_width-INITIAL_CONFIG.margin.right]},gridlineTickSize:isVertical?_width-INITIAL_CONFIG.margin.left+INITIAL_CONFIG.spacing.yLabel-INITIAL_CONFIG.margin.right:_height-INITIAL_CONFIG.margin.bottom-INITIAL_CONFIG.margin.top,transforms:{x:isVertical?`translate(0,${_height-INITIAL_CONFIG.margin.bottom})`:`translate(${INITIAL_CONFIG.margin.left},0)`,y:isVertical?`translate(${INITIAL_CONFIG.margin.left},0)`:`translate(0,${INITIAL_CONFIG.margin.top})`,yGrid:isVertical?`translate(${INITIAL_CONFIG.margin.left-INITIAL_CONFIG.spacing.yLabel},0)`:`translate(0,${INITIAL_CONFIG.margin.top})`},axisFn:{x:isVertical?d3_src.LLu:d3_src.y4O,y:isVertical?d3_src.y4O:d3_src.F5q}}},createRoundedRectPath=(x,y,width,height,radius,position)=>{let isEmpty=0===height&&["top","bottom"].includes(position)||0===width&&["left","right"].includes(position),radii={tl:!isEmpty&&["top","left"].includes(position)?radius:0,tr:!isEmpty&&["top","right"].includes(position)?radius:0,bl:!isEmpty&&["bottom","left"].includes(position)?radius:0,br:!isEmpty&&["bottom","right"].includes(position)?radius:0};return"M"+(x+radii.tl)+","+y+"h"+(width-radii.tl-radii.tr)+"a"+radii.tr+","+radii.tr+" 0 0 1 "+radii.tr+","+radii.tr+"v"+(height-radii.tr-radii.br)+"a"+radii.br+","+radii.br+" 0 0 1 "+-radii.br+","+radii.br+"h"+(radii.br+radii.bl-width)+"a"+-radii.bl+","+-radii.bl+" 0 0 1 "+-radii.bl+","+-radii.bl+"v"+(radii.bl+radii.tl-height)+"a"+radii.tl+","+-radii.tl+" 0 0 1 "+radii.tl+","+-radii.tl+"z"},getOrCreateEl=(container,selector,createCallback)=>{let el=container.select(selector);return el.empty()?createCallback():el},animate=function(it,transitionDuration,isAnimated){let toAnimate=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_it=>_it;return isAnimated?it.transition().duration(transitionDuration).call(toAnimate):it.call(toAnimate)},wrap=function(text,width){let lineHeight=arguments.length>2&&void 0!==arguments[2]?arguments[2]:INITIAL_CONFIG.spacing.labelLineHeight,isVertical=!(arguments.length>3)||void 0===arguments[3]||arguments[3],dx=arguments.length>4&&void 0!==arguments[4]?arguments[4]:INITIAL_CONFIG.spacing.xLabel,maxWidth=width-6;return text.each(function(){let _text=d3_src.Ys(this),words=_text.text().split(/\s+/),y=_text.attr("y"),dy=parseFloat(_text.attr("dy")),line=[],lineNumber=0,tspan=_text.text(null).append("tspan").attr("x",0).attr("y",y).attr("dx",isVertical?0:-dx+"px").attr("dy",dy+"em");words.forEach(word=>{line.push(word),tspan.text(line.join(" ")),(tspan.node()?.getComputedTextLength()||0)>maxWidth&&(line.pop(),tspan.text(line.join(" ")),line=[word],tspan=_text.append("tspan").attr("x",0).attr("y",y).attr("dx",isVertical?0:-dx+"px").attr("dy",++lineNumber*lineHeight+dy+"em").text(word))})}),text},histogramLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","insights","Histogram","histogramLogic"]),(0,index_esm.actions)({setConfig:config=>({config})}),(0,index_esm.reducers)({config:[getConfig(constants.xp.vertical),{setConfig:(state,_ref)=>{let{config}=_ref;return{...state,...config}}}]})]);function Histogram_Histogram_Histogram(_ref){let{data,layout=constants.xp.vertical,width=INITIAL_CONFIG.width,height=INITIAL_CONFIG.height,isAnimated=!1,isDashboardItem=!1,formatXTickLabel=value=>value,formatYTickLabel=value=>value}=_ref,{config}=(0,index_esm.useValues)(histogramLogic),{setConfig}=(0,index_esm.useActions)(histogramLogic),isEmpty=0===data.length||0===d3_src.Smz(data.map(d=>d.count)),xMin=data?.[0]?.bin0||0,xMax=data?.[data.length-1]?.bin1||1,x=d3_src.BYU().domain([xMin,xMax]).range(config.ranges.x).nice(),xAxis=config.axisFn.x(x).tickValues([...data.map(d=>d.bin0),xMax]).tickFormat(v=>{let label=formatXTickLabel(v);return -2===v?`<${label}`:-1===v?`>=${label}`:label}),yMax=d3_src.Fp7(data,d=>d.count),y=d3_src.BYU().domain([0,yMax]).range(config.ranges.y).nice(),yAxis=config.axisFn.y(y).tickValues(y.ticks().filter(tick=>Number.isInteger(tick))).tickSize(0).tickFormat(v=>{let count=formatYTickLabel(v);return d3_src.WUZ("~s")(count)}),yAxisGrid=config.axisFn.y(y).tickSize(-config.gridlineTickSize).tickFormat("").ticks(y.ticks().length);(0,react.useEffect)(()=>{let minWidth=Math.max(width,data.length*(config.spacing.minBarWidth+config.spacing.btwnBins)+config.margin.left+config.margin.right);setConfig(getConfig(layout,isDashboardItem?width:minWidth,height))},[data.length,layout,width,height]);let ref=useD3(container=>{let isVertical=config.layout===constants.xp.vertical;(parentNode=>{x.range(config.ranges.x),y.range(config.ranges.y),yAxisGrid.tickSize(-config.gridlineTickSize);let _svg=getOrCreateEl(parentNode,"svg > g",()=>parentNode.append("svg:svg").attr("viewBox",`0 0 ${config.inner.width} ${config.inner.height}`).attr("width","100%").append("svg:g").classed(config.layout,!0));parentNode.select("svg").attr("viewBox",`0 0 ${config.width} ${config.height}`);let layoutChanged=!_svg.classed(config.layout);_svg.attr("class",null).classed(config.layout,!0),layoutChanged&&_svg.selectAll("#x-axis,#y-axis,#y-gridlines").remove();let _xAxis=getOrCreateEl(_svg,"g#x-axis",()=>_svg.append("svg:g").attr("id","x-axis").attr("transform",config.transforms.x));_xAxis.call(animate,layoutChanged?0:config.transitionDuration,isAnimated,it=>it.call(xAxis).attr("transform",config.transforms.x));let binWidth=x(data?.[0]?.bin1||data?.[data.length-1]?.bin1||1)-x(data?.[0]?.bin0||0);if(_xAxis.selectAll(".tick text").call(wrap,isVertical?binWidth:config.margin.left,config.spacing.labelLineHeight,isVertical,config.spacing.xLabel),!isEmpty){let _yAxis=getOrCreateEl(_svg,"g#y-axis",()=>_svg.append("svg:g").attr("id","y-axis").attr("transform",config.transforms.y));_yAxis.call(animate,layoutChanged?0:config.transitionDuration,isAnimated,it=>it.call(yAxis).attr("transform",config.transforms.y).call(g=>g.selectAll(".tick text").attr("dx",isVertical?`-${config.spacing.yLabel}`:0)));let _yGridlines=getOrCreateEl(_svg,"g#y-gridlines",()=>_svg.append("svg:g").attr("id","y-gridlines").attr("transform",config.transforms.yGrid));_yGridlines.call(animate,layoutChanged?0:config.transitionDuration,isAnimated,it=>it.call(yAxisGrid).attr("transform",config.transforms.yGrid))}let _bars=getOrCreateEl(_svg,"g#bars",()=>_svg.append("svg:g").attr("id","bars"));_bars.selectAll("path").data(data).join("path").call(animate,config.transitionDuration,isAnimated,it=>it.attr("d",d=>isVertical?createRoundedRectPath(x(d.bin0)+config.spacing.btwnBins/2,y(d.count),Math.max(0,x(d.bin1)-x(d.bin0)-config.spacing.btwnBins),y(0)-y(d.count),config.borderRadius,"top"):createRoundedRectPath(y(0),x(d.bin0)+config.spacing.btwnBins/2,y(d.count)-y(0),Math.max(0,x(d.bin1)-x(d.bin0)-config.spacing.btwnBins),config.borderRadius,"right"))),_svg.node().appendChild(_bars.node());let _labels=getOrCreateEl(_svg,"g#labels",()=>_svg.append("svg:g").attr("id","labels"));return _labels.selectAll("text").data(data).join("text").text(d=>d.label).classed("bar-label",!0).each(function(d){let{width:labelWidth,height:labelHeight}=this.getBBox();d.labelWidth=labelWidth,d.labelHeight=labelHeight,d.shouldShowInBar=!1}).attr("x",d=>{if(!isVertical){let labelWidth=(d.labelWidth||0)+2*config.spacing.barLabelPadding,shouldShowInBar=labelWidth<=y(d.count)-y(0),labelDx=shouldShowInBar?-(labelWidth-config.spacing.barLabelPadding):config.spacing.barLabelPadding;return d.shouldShowInBar=shouldShowInBar,y(d.count)+labelDx}return x(d.bin0)+binWidth/2-(d.labelWidth||0)/2}).attr("y",d=>{if(!isVertical)return x(d.bin0)+binWidth/2;let labelHeight=(d.labelHeight||0)+2*config.spacing.barLabelPadding,shouldShowInBar=labelHeight<=y(0)-y(d.count),labelDy=shouldShowInBar?labelHeight-config.spacing.barLabelPadding:-config.spacing.barLabelPadding;return d.shouldShowInBar=shouldShowInBar,y(d.count)+labelDy}).classed("outside",d=>!d.shouldShowInBar),_svg.node().appendChild(_labels.node())})(container)},[data,config]);return(0,jsx_runtime.jsx)("div",{className:"histogram-container",ref:ref,style:{minWidth:config.width}})}function FunnelHistogram_FunnelHistogram(){let{insightProps,isInDashboardContext}=(0,index_esm.useValues)(insightLogic.zm),{histogramGraphData}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),ref=(0,react.useRef)(null),[width,height]=(0,dist_module.Z)(ref),key=isInDashboardContext?(0,lib_utils.mo)(JSON.stringify(histogramGraphData)):"staticGraph";return histogramGraphData?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("FunnelHistogram",{scrollable:!isInDashboardContext,"overflow-hidden":isInDashboardContext,"dashboard-wrapper":isInDashboardContext}),ref:ref,"data-attr":"funnel-histogram",children:(0,jsx_runtime.jsx)(Histogram_Histogram_Histogram,{data:histogramGraphData,width:width,isDashboardItem:isInDashboardContext,height:height,formatXTickLabel:v=>(0,lib_utils.C7)(v,{maxUnits:2})},key)}):null}function Funnel_Funnel(props){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{funnelsFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{funnelVizType,layout}=funnelsFilter||{},viz=null;return viz=funnelVizType==types.Ui.Trends?(0,jsx_runtime.jsx)(FunnelLineGraph,{...props}):funnelVizType==types.Ui.TimeToConvert?(0,jsx_runtime.jsx)(FunnelHistogram_FunnelHistogram,{}):(layout||constants.xp.vertical)===constants.xp.vertical?(0,jsx_runtime.jsx)(FunnelBarVertical_FunnelBarVertical_FunnelBarVertical,{...props}):(0,jsx_runtime.jsx)(FunnelBarHorizontal_FunnelBarHorizontal_FunnelBarHorizontal,{...props}),(0,jsx_runtime.jsx)("div",{className:`FunnelInsight FunnelInsight--type-${funnelVizType?.toLowerCase()}${funnelVizType===types.Ui.Steps?"-"+(null!=layout?layout:constants.xp.vertical):""}`,children:viz})}function FunnelStepsPicker(){var _funnelsFilter$funnel;let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{series,isFunnelWithEnoughSteps,funnelsFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),onChange=(funnelFromStep,funnelToStep)=>{updateInsightFilter({funnelFromStep,funnelToStep})},filterSteps=series||[],numberOfSeries=series?.length||0,fromRange=isFunnelWithEnoughSteps?Array.from(Array(Math.max(numberOfSeries)).keys()).slice(0,-1):[0],toRange=isFunnelWithEnoughSteps?Array.from(Array(Math.max(numberOfSeries)).keys()).slice((null!==(_funnelsFilter$funnel=funnelsFilter?.funnelFromStep)&&void 0!==_funnelsFilter$funnel?_funnelsFilter$funnel:0)+1):[1],optionsForRange=range=>range.map(stepIndex=>filterSteps[stepIndex]?{value:stepIndex,label:`Step ${stepIndex+1}`,labelInMenu:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{children:["Step ",stepIndex+1,"\xa0–\xa0"]}),(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:(0,queryNodeToFilter.AG)(filterSteps[stepIndex])})]})}:null).filter(option=>null!==option);return(0,jsx_runtime.jsxs)("div",{className:"flex items-center",children:[(0,jsx_runtime.jsx)("span",{className:"text-muted-alt",children:"\xa0from"}),(0,jsx_runtime.jsx)(src.Yv,{size:"small",className:"mx-1",dropdownMatchSelectWidth:!1,optionTooltipPlacement:"bottom-start",disabled:!isFunnelWithEnoughSteps,options:optionsForRange(fromRange),value:funnelsFilter?.funnelFromStep||0,onChange:fromStep=>null!=fromStep&&onChange(fromStep,funnelsFilter?.funnelToStep)}),(0,jsx_runtime.jsx)("span",{className:"text-muted-alt",children:"to"}),(0,jsx_runtime.jsx)(src.Yv,{size:"small",className:"mx-1",dropdownMatchSelectWidth:!1,optionTooltipPlacement:"bottom-start",disabled:!isFunnelWithEnoughSteps,options:optionsForRange(toRange),value:funnelsFilter?.funnelToStep||Math.max(numberOfSeries-1,1),onChange:toStep=>null!=toStep&&onChange(funnelsFilter?.funnelFromStep,toStep)})]})}function FunnelCanvasLabel(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{conversionMetrics,aggregationTargetLabel,funnelsFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),labels=[...funnelsFilter?.funnelVizType===types.Ui.Steps?[(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{className:"flex items-center text-muted-alt mr-1",children:[(0,jsx_runtime.jsx)(Tooltip.u,{title:`Overall conversion rate for all ${aggregationTargetLabel.plural} on the entire funnel.`,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"mr-1 text-xl shrink-0"})}),(0,jsx_runtime.jsx)("span",{children:"Total conversion rate:"})]}),(0,jsx_runtime.jsx)("span",{className:"l4",children:(0,lib_utils.e9)(conversionMetrics.totalRate,2,!0)})]})]:[],...funnelsFilter?.funnelVizType!==types.Ui.Trends?[(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{className:"flex items-center text-muted-alt",children:[(0,jsx_runtime.jsx)(Tooltip.u,{title:`Average (arithmetic mean) of the total time each ${aggregationTargetLabel.singular} spent in the entire funnel.`,children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"mr-1 text-xl shrink-0"})}),(0,jsx_runtime.jsx)("span",{children:"Average time to convert"})]}),funnelsFilter?.funnelVizType===types.Ui.TimeToConvert&&(0,jsx_runtime.jsx)(FunnelStepsPicker,{}),(0,jsx_runtime.jsx)("span",{className:"text-muted-alt mr-1",children:":"}),funnelsFilter?.funnelVizType===types.Ui.TimeToConvert?(0,jsx_runtime.jsx)("span",{className:"font-bold",children:(0,lib_utils.C7)(conversionMetrics.averageTime)}):(0,jsx_runtime.jsx)(src.rU,{className:"font-bold",onClick:()=>updateInsightFilter({funnelVizType:types.Ui.TimeToConvert}),children:(0,lib_utils.C7)(conversionMetrics.averageTime)})]})]:[],...funnelsFilter?.funnelVizType===types.Ui.Trends?[(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"text-muted-alt",children:"Conversion rate"}),(0,jsx_runtime.jsx)(FunnelStepsPicker,{})]})]:[]];return(0,jsx_runtime.jsx)("div",{className:"flex items-center",children:labels.map((label,i)=>(0,jsx_runtime.jsxs)(react.Fragment,{children:[i>0&&(0,jsx_runtime.jsx)("span",{className:"my-0.5 mx-2 border-l border-border h-3.5"}),label]},i))})}var EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),insightDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),insightNavLogic=__webpack_require__("./frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx"),FunnelCorrelation=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Funnels/FunnelCorrelation.scss"),FunnelCorrelation_default=__webpack_require__.n(FunnelCorrelation),FunnelCorrelation_options={};FunnelCorrelation_options.insert="head",FunnelCorrelation_options.singleton=!1,injectStylesIntoStyleTag_default()(FunnelCorrelation_default(),FunnelCorrelation_options),FunnelCorrelation_default().locals;var funnelCorrelationUsageLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelCorrelationUsageLogic.ts"),funnelCorrelationLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelCorrelationLogic.ts"),funnelPropertyCorrelationLogic=__webpack_require__("./frontend/src/scenes/funnels/funnelPropertyCorrelationLogic.ts");let funnelCorrelationFeedbackLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("insight_funnel")),(0,index_esm.path)(key=>["scenes","funnels","funnelCorrelationFeedbackLogic",key]),(0,index_esm.connect)(props=>({actions:[(0,funnelCorrelationLogic.p)(props),["loadEventCorrelations"],(0,funnelPropertyCorrelationLogic.X)(props),["loadPropertyCorrelations"]]})),(0,index_esm.actions)({sendCorrelationAnalysisFeedback:!0,hideCorrelationAnalysisFeedback:!0,setCorrelationFeedbackRating:rating=>({rating}),setCorrelationDetailedFeedback:comment=>({comment}),setCorrelationDetailedFeedbackVisible:visible=>({visible})}),(0,index_esm.reducers)({correlationFeedbackHidden:[!0,{loadEventCorrelations:()=>!1,loadPropertyCorrelations:()=>!1,sendCorrelationAnalysisFeedback:()=>!0,hideCorrelationAnalysisFeedback:()=>!0}],correlationDetailedFeedbackVisible:[!1,{setCorrelationDetailedFeedbackVisible:(_,_ref)=>{let{visible}=_ref;return visible}}],correlationFeedbackRating:[0,{setCorrelationFeedbackRating:(_,_ref2)=>{let{rating}=_ref2;return rating}}],correlationDetailedFeedback:["",{setCorrelationDetailedFeedback:(_,_ref3)=>{let{comment}=_ref3;return comment}}]}),(0,index_esm.listeners)(_ref4=>{let{actions,values}=_ref4;return{sendCorrelationAnalysisFeedback:()=>{eventUsageLogic.vx.actions.reportCorrelationAnalysisDetailedFeedback(values.correlationFeedbackRating,values.correlationDetailedFeedback),actions.setCorrelationFeedbackRating(0),actions.setCorrelationDetailedFeedback(""),src.UJ.success("Thanks for your feedback! Your comments help us improve")},setCorrelationFeedbackRating:_ref5=>{let{rating}=_ref5,feedbackBoxVisible=rating>0;actions.setCorrelationDetailedFeedbackVisible(feedbackBoxVisible),feedbackBoxVisible&&eventUsageLogic.vx.actions.reportCorrelationAnalysisFeedback(rating)}}})]),FunnelCorrelationFeedbackForm=()=>{let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{correlationFeedbackHidden,correlationDetailedFeedbackVisible,correlationFeedbackRating}=(0,index_esm.useValues)(funnelCorrelationFeedbackLogic(insightProps)),{sendCorrelationAnalysisFeedback,hideCorrelationAnalysisFeedback,setCorrelationFeedbackRating,setCorrelationDetailedFeedback}=(0,index_esm.useActions)(funnelCorrelationFeedbackLogic(insightProps)),detailedFeedbackRef=(0,react.useRef)(null);return correlationFeedbackHidden?null:(0,jsx_runtime.jsxs)("div",{className:"border rounded p-4 space-y-2 mt-4",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between",children:[(0,jsx_runtime.jsxs)("h4",{className:"text-muted-alt",children:[(0,jsx_runtime.jsx)(icons.ge,{style:{marginRight:4}}),"Was this correlation analysis report useful?"]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[!!correlationFeedbackRating&&(0,jsx_runtime.jsx)("i",{className:"text-success mr-2",children:"Thanks for your feedback!"}),[[5,"😍"],[4,"😀"],[3,"😴"],[2,"😔"],[1,"👎"]].map((content,index)=>(0,jsx_runtime.jsx)(src.Jp,{active:correlationFeedbackRating===content[0],onClick:()=>{correlationFeedbackRating===content[0]?setCorrelationFeedbackRating(0):(setCorrelationFeedbackRating(content[0]),setTimeout(()=>detailedFeedbackRef.current?.focus(),100))},children:content[1]},index)),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:hideCorrelationAnalysisFeedback})]})]}),correlationDetailedFeedbackVisible?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("form",{onSubmit:sendCorrelationAnalysisFeedback,className:"space-y-2",children:[(0,jsx_runtime.jsx)(src._V,{onBlur:e=>setCorrelationDetailedFeedback(e.target.value),placeholder:"Optional. Help us by sharing details around your experience...",ref:detailedFeedbackRef,onPressCmdEnter:()=>{detailedFeedbackRef.current?.blur(),sendCorrelationAnalysisFeedback()}}),(0,jsx_runtime.jsx)("div",{className:"flex justify-end",children:(0,jsx_runtime.jsx)(src.Jp,{"data-attr":"correlation-analysis-share-feedback",type:"primary",htmlType:"submit",children:"Share feedback"})})]})}):null]})},FunnelCorrelationSkewWarning=()=>{let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{isSkewed}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{hideSkewWarning}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps));return isSkewed?(0,jsx_runtime.jsxs)("div",{className:"skew-warning",children:[(0,jsx_runtime.jsxs)("h4",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,jsx_runtime.jsx)(icons.Rz,{style:{fontSize:24,marginRight:4,color:"var(--warning)"}}),(0,jsx_runtime.jsx)("span",{children:"Adjust your funnel definition to improve correlation analysis"})]}),(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),onClick:hideSkewWarning})]}),(0,jsx_runtime.jsxs)("div",{className:"px-2",children:[(0,jsx_runtime.jsx)("b",{className:"font-medium",children:"Tips for adjusting your funnel:"}),(0,jsx_runtime.jsxs)("ol",{children:[(0,jsx_runtime.jsx)("li",{children:"Adjust your first funnel step to be more specific. For example, choose a page or an event that occurs less frequently."}),(0,jsx_runtime.jsx)("li",{children:"Choose an event that happens more frequently for subsequent funnels steps."})]})]})]}):null};var FunnelCorrelationTable=__webpack_require__("./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.tsx"),FunnelPropertyCorrelationTable=__webpack_require__("./frontend/src/scenes/insights/views/Funnels/FunnelPropertyCorrelationTable.tsx");let FunnelCorrelation_FunnelCorrelation=()=>{let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{steps}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps));return((0,index_esm.useMountedLogic)((0,funnelCorrelationUsageLogic.H)(insightProps)),steps.length<=1)?null:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h2",{className:"font-semibold text-lg my-4",children:"Correlation analysis"}),(0,jsx_runtime.jsx)(PayGateMini.E,{feature:types.P$.CORRELATION_ANALYSIS,children:(0,jsx_runtime.jsxs)("div",{className:"funnel-correlation",children:[(0,jsx_runtime.jsx)(FunnelCorrelationSkewWarning,{}),(0,jsx_runtime.jsx)(FunnelCorrelationTable.w,{}),(0,jsx_runtime.jsx)(FunnelCorrelationFeedbackForm,{}),(0,jsx_runtime.jsx)(FunnelPropertyCorrelationTable.i,{})]})})]})};var LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),propertyDefinitionsModel=__webpack_require__("./frontend/src/models/propertyDefinitionsModel.ts"),resultCustomizationsModalLogic=__webpack_require__("./frontend/src/queries/nodes/InsightViz/resultCustomizationsModalLogic.ts"),SeriesColumn=__webpack_require__("./frontend/src/scenes/insights/views/InsightsTable/columns/SeriesColumn.tsx");function FunnelStepsTable(){let{insightProps,insightLoading}=(0,index_esm.useValues)(insightLogic.zm),{breakdownFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{steps,flattenedBreakdowns,hiddenLegendBreakdowns,getFunnelsColor}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{setHiddenLegendBreakdowns,toggleLegendBreakdownVisibility}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),{canOpenPersonModal}=(0,index_esm.useValues)((0,funnelPersonsModalLogic.a)(insightProps)),{openPersonsModalForSeries}=(0,index_esm.useActions)((0,funnelPersonsModalLogic.a)(insightProps)),{hasInsightColors}=(0,index_esm.useValues)((0,resultCustomizationsModalLogic.W)(insightProps)),{openModal}=(0,index_esm.useActions)((0,resultCustomizationsModalLogic.W)(insightProps)),isOnlySeries=flattenedBreakdowns.length<=1,{cohorts}=(0,index_esm.useValues)(cohortsModel.Q),{formatPropertyValueForDisplay}=(0,index_esm.useValues)(propertyDefinitionsModel.IP),allChecked=flattenedBreakdowns?.every(b=>!hiddenLegendBreakdowns?.includes(funnelUtils.y1(b.breakdown_value))),someChecked=flattenedBreakdowns?.some(b=>!hiddenLegendBreakdowns?.includes(funnelUtils.y1(b.breakdown_value))),showCustomizationIcon=hasInsightColors&&!insightProps.cachedInsight?.disable_baseline,columnsGrouped=[{children:[{title:isOnlySeries?"Breakdown":(0,jsx_runtime.jsx)(LemonCheckbox.H,{checked:!!allChecked||!!someChecked&&"indeterminate",onChange:()=>{setHiddenLegendBreakdowns(allChecked?flattenedBreakdowns.map(b=>(0,funnelUtils.y1)(b.breakdown_value)):[])},label:(0,jsx_runtime.jsx)("span",{className:"font-bold",children:"Breakdown"}),size:"small"}),dataIndex:"breakdown_value",render:function RenderBreakdownValue(_,breakdown){let[isHovering,setIsHovering]=(0,react.useState)(!1),value=breakdown.breakdown_value?.length==1?breakdown.breakdown_value[0]:breakdown.breakdown_value,label=(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex justify-between items-center",{"cursor-pointer":showCustomizationIcon}),onClick:showCustomizationIcon?()=>openModal(breakdown):void 0,onMouseEnter:()=>setIsHovering(!0),onMouseLeave:()=>setIsHovering(!1),children:[(0,insights_utils.Cq)(value,breakdownFilter,cohorts,formatPropertyValueForDisplay),showCustomizationIcon&&(0,jsx_runtime.jsx)(SeriesColumn.fx,{isVisible:isHovering})]});return isOnlySeries?(0,jsx_runtime.jsx)("span",{className:"font-medium",children:label}):(0,jsx_runtime.jsx)(LemonCheckbox.H,{checked:!hiddenLegendBreakdowns?.includes(funnelUtils.y1(breakdown.breakdown_value)),onChange:()=>toggleLegendBreakdownVisibility((0,funnelUtils.y1)(breakdown.breakdown_value)),label:label})}},{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Total",(0,jsx_runtime.jsx)("br",{}),"conversion"]}),render:(_,breakdown)=>{var _breakdown$conversion;return(0,lib_utils.e9)(null!==(_breakdown$conversion=breakdown?.conversionRates?.total)&&void 0!==_breakdown$conversion?_breakdown$conversion:0,2,!0)},align:"right"}]},...steps.map((step,stepIndex)=>({title:(0,jsx_runtime.jsx)(LemonRow.Q,{icon:(0,jsx_runtime.jsx)(Lettermark.B,{name:stepIndex+1,color:Lettermark.w.Gray}),style:{font:"inherit",padding:0},size:"small",children:(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:(0,funnelStepTableUtils.R)(step)})}),children:[{title:0===stepIndex?"Entered":"Converted",render:function RenderCompleted(_,breakdown){var _stepSeries$count,_stepSeries$count2;let stepSeries=breakdown.steps?.[stepIndex];return stepSeries&&(canOpenPersonModal?(0,jsx_runtime.jsx)(ValueInspectorButton.M,{onClick:()=>openPersonsModalForSeries({step,series:stepSeries,converted:!0}),children:(0,lib_utils.Lc)(null!==(_stepSeries$count=stepSeries.count)&&void 0!==_stepSeries$count?_stepSeries$count:0)}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,lib_utils.Lc)(null!==(_stepSeries$count2=stepSeries.count)&&void 0!==_stepSeries$count2?_stepSeries$count2:0)}))},align:"right"},...0===stepIndex?[]:[{title:"Dropped\xa0off",render:function RenderDropped(_,breakdown){var _stepSeries$droppedOf,_stepSeries$droppedOf2;let stepSeries=breakdown.steps?.[stepIndex];return stepSeries&&(canOpenPersonModal?(0,jsx_runtime.jsx)(ValueInspectorButton.M,{onClick:()=>openPersonsModalForSeries({step,series:stepSeries,converted:!1}),children:(0,lib_utils.Lc)(null!==(_stepSeries$droppedOf=stepSeries.droppedOffFromPrevious)&&void 0!==_stepSeries$droppedOf?_stepSeries$droppedOf:0)}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,lib_utils.Lc)(null!==(_stepSeries$droppedOf2=stepSeries.droppedOffFromPrevious)&&void 0!==_stepSeries$droppedOf2?_stepSeries$droppedOf2:0)}))},align:"right"}],{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Conversion",(0,jsx_runtime.jsx)("br",{}),"so\xa0far"]}),render:function RenderConversionSoFar(_,breakdown){var _breakdown$steps$step,_breakdown$steps$step2;let significance=(0,funnelStepTableUtils.m)(breakdown,step.order);return significance?.total?(0,jsx_runtime.jsx)(LemonRow.Q,{className:"funnel-significance-highlight",tooltip:"Significantly different from other breakdown values",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFlag,{}),size:"small",children:(0,lib_utils.e9)(null!==(_breakdown$steps$step=breakdown.steps?.[step.order]?.conversionRates.total)&&void 0!==_breakdown$steps$step?_breakdown$steps$step:0,2,!0)}):(0,lib_utils.e9)(null!==(_breakdown$steps$step2=breakdown.steps?.[step.order]?.conversionRates.total)&&void 0!==_breakdown$steps$step2?_breakdown$steps$step2:0,2,!0)},align:"right"},...0===stepIndex?[]:[{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Conversion",(0,jsx_runtime.jsx)("br",{}),"from\xa0previous"]}),render:function RenderConversionFromPrevious(_,breakdown){var _breakdown$steps$step3,_breakdown$steps$step4;let significance=(0,funnelStepTableUtils.m)(breakdown,step.order);return!significance?.total&&significance?.fromPrevious?(0,jsx_runtime.jsx)(LemonRow.Q,{className:"funnel-significance-highlight",tooltip:"Significantly different from other breakdown values",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconFlag,{}),size:"small",children:(0,lib_utils.e9)(null!==(_breakdown$steps$step3=breakdown.steps?.[step.order]?.conversionRates.fromPrevious)&&void 0!==_breakdown$steps$step3?_breakdown$steps$step3:0,2,!0)}):(0,lib_utils.e9)(null!==(_breakdown$steps$step4=breakdown.steps?.[step.order]?.conversionRates.fromPrevious)&&void 0!==_breakdown$steps$step4?_breakdown$steps$step4:0,2,!0)},align:"right"},{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Median",(0,jsx_runtime.jsx)("br",{}),"time"]}),render:(_,breakdown)=>breakdown.steps?.[step.order]?.median_conversion_time!=void 0?(0,lib_utils.C7)(breakdown.steps[step.order].median_conversion_time,{maxUnits:3}):"–",align:"right",width:0,className:"whitespace-nowrap"},{title:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Average",(0,jsx_runtime.jsx)("br",{}),"time"]}),render:(_,breakdown)=>breakdown.steps?.[step.order]?.average_conversion_time!=void 0?(0,lib_utils.C7)(breakdown.steps[step.order].average_conversion_time,{maxUnits:3}):"–",align:"right",width:0,className:"whitespace-nowrap"}]]}))];return(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:flattenedBreakdowns,columns:columnsGrouped,loading:insightLoading,rowKey:"breakdownIndex",rowStatus:record=>record.significant?"highlighted":null,rowRibbonColor:getFunnelsColor,firstColumnSticky:!0})}var InsightsTable=__webpack_require__("./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx"),Paths=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/paths/Paths.scss"),Paths_default=__webpack_require__.n(Paths),Paths_options={};Paths_options.insert="head",Paths_options.singleton=!1,injectStylesIntoStyleTag_default()(Paths_default(),Paths_options),Paths_default().locals;var esm_exports=__webpack_require__("./node_modules/.pnpm/@sentry+core@7.112.1/node_modules/@sentry/core/esm/exports.js"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx");function pageUrl(d,display){let incomingUrls=d.targetLinks.map(l=>l?.source?.name?.replace(/(^[0-9]+_)/,"")).filter(a=>{try{new URL(a)}catch{return!1}return a}).map(a=>new URL(a)),incomingDomains=Array.from(new Set(incomingUrls.map(url=>url.origin))),name=d.name.replace(/(^[0-9]+_)/,"");if(!display)return name;try{let url=new URL(name);name=1!==incomingDomains.length?url.href.replace(/(^\w+:|^)\/\//,""):url.pathname+url.search,url.hash?.includes("/")&&(name+=url.hash)}catch{}return name.length>15?name.substring(0,6)+"..."+name.slice(-8):name.length<4&&d.name.length<25?d.name.replace(/(^[0-9]+_)/,""):name}let isSelectedPathStartOrEnd=(pathsFilter,funnelPathsFilter,pathItemCard)=>{let cardName=pageUrl(pathItemCard),isPathStart=0===pathItemCard.targetLinks.length,isPathEnd=0===pathItemCard.sourceLinks.length,{startPoint,endPoint}=pathsFilter,{funnelPathType,funnelSource,funnelStep}=funnelPathsFilter||{};return startPoint===cardName&&isPathStart||endPoint===cardName&&isPathEnd||funnelPathType===types.hP.between&&(cardName===funnelSource?.series[funnelStep-1].name&&isPathEnd||cardName===funnelSource?.series[funnelStep-2].name&&isPathStart)};function PathNodeCardButton(_ref){let{name,count,node,viewPathToFunnel,openPersonsModal,filter,setFilter}=_ref,{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),hasAdvancedPaths=hasAvailableFeature(types.P$.PATHS_ADVANCED),nodeName=pageUrl(node),isPath=nodeName.includes("/"),isTruncatedPath="_..."===name.slice(1);return(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"font-semibold overflow-hidden max-h-16",children:[(0,jsx_runtime.jsx)("span",{className:"text-xxs text-muted mr-1",children:`0${name[0]}`}),(0,jsx_runtime.jsx)("span",{className:"text-xs break-words",children:pageUrl(node,isPath)})]}),(0,jsx_runtime.jsx)(src.Sn.Provider,{value:null,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-nowrap",children:[(0,jsx_runtime.jsx)(src.Jp,{size:"small",onClick:()=>openPersonsModal({path_end_key:name}),children:(0,jsx_runtime.jsx)("span",{className:"text-link text-xs px-1 font-medium",children:count})}),(0,jsx_runtime.jsx)(src.d6,{items:[{label:"Set as path start",onClick:()=>setFilter({startPoint:nodeName})},...hasAdvancedPaths?[{label:"Set as path end",onClick:()=>setFilter({endPoint:nodeName})},{label:"Exclude path item",onClick:()=>{setFilter({excludeEvents:[...filter.excludeEvents||[],pageUrl(node,!1)]})}},{label:"View funnel",onClick:()=>{viewPathToFunnel(node)}}]:[],{label:"Copy path item name",onClick:()=>{(0,copyToClipboard.v)(nodeName).then(esm_exports.Tb)}}],placement:"bottom-end",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconEllipsis,{}),disabledReason:isTruncatedPath?"Multiple paths truncated and combined for efficiency during querying. No further analysis possible.":void 0})})]})})]})}function PathNodeCardMenu(_ref){let{name,count,continuingCount,dropOffCount,averageConversionTime,isPathEnd,isPathStart,openPersonsModal}=_ref,continuingPercentage=(continuingCount/count*100).toFixed(1),dropoffPercentage=(dropOffCount/count*100).toFixed(1);return(0,jsx_runtime.jsxs)("div",{style:{width:240},children:[!isPathEnd&&(0,jsx_runtime.jsx)(CardItem,{icon:(0,jsx_runtime.jsx)(icons.cs,{className:"text-xl shrink-0 text-success"}),text:"Continuing",count:(0,jsx_runtime.jsx)(CountButton,{onClick:()=>openPersonsModal({path_start_key:name}),count:continuingCount,percentage:continuingPercentage}),border:!1}),dropOffCount>0&&(0,jsx_runtime.jsx)(CardItem,{icon:(0,jsx_runtime.jsx)(icons.K6,{className:"text-xl shrink-0 text-danger"}),text:"Dropping off",count:(0,jsx_runtime.jsx)(CountButton,{onClick:()=>openPersonsModal({path_dropoff_key:name}),count:dropOffCount,percentage:dropoffPercentage})}),!isPathStart&&(0,jsx_runtime.jsx)(CardItem,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconClock,{className:"text-xl shrink-0 text-muted"}),text:"Average time from previous step",count:(0,jsx_runtime.jsx)("b",{className:"pr-2",children:(0,lib_utils.C7)(averageConversionTime)})})]})}function CountButton(_ref2){let{count,percentage,onClick}=_ref2;return(0,jsx_runtime.jsx)(src.Jp,{size:"small",onClick:onClick,children:(0,jsx_runtime.jsxs)("span",{className:"text-xs",children:[count,(0,jsx_runtime.jsxs)("span",{className:"text-muted-alt ml-2",children:["(",percentage,"%)"]})]})})}function CardItem(_ref3){let{icon,text,count,border=!0}=_ref3;return(0,jsx_runtime.jsxs)("div",{className:`text-xs flex items-center justify-between p-2 gap-2 ${border&&"border-t border-dashed"}`,children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[icon,(0,jsx_runtime.jsx)("span",{children:text})]}),count]})}function PathNodeCard(_ref){let{insightProps,node}=_ref,{pathsFilter:_pathsFilter,funnelPathsFilter:_funnelPathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter,openPersonsModal,viewPathToFunnel}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),pathsFilter=_pathsFilter||{},funnelPathsFilter=_funnelPathsFilter||{};if(!node.visible)return null;let isPathStart=0===node.targetLinks.length,isPathEnd=0===node.sourceLinks.length,continuingCount=node.sourceLinks.reduce((prev,curr)=>prev+curr.value,0),dropOffCount=node.value-continuingCount,averageConversionTime=isPathStart?null:node.targetLinks.reduce((prev,curr)=>prev+curr.average_conversion_time/1e3,0)/node.targetLinks.length;return(0,jsx_runtime.jsx)(src.u,{title:pageUrl(node),placement:"right",children:(0,jsx_runtime.jsx)(src.Qw,{overlay:(0,jsx_runtime.jsx)(PathNodeCardMenu,{name:node.name,count:node.value,continuingCount:continuingCount,dropOffCount:dropOffCount,averageConversionTime:averageConversionTime,isPathStart:isPathStart,isPathEnd:isPathEnd,openPersonsModal:openPersonsModal}),trigger:"hover",placement:"bottom",padded:!1,matchWidth:!0,children:(0,jsx_runtime.jsx)("div",{className:"absolute rounded bg-bg-light p-1",style:{width:240,left:isPathEnd?node.x0+7-240:node.x0+7,top:isPathEnd?node.y0+(node.y1-node.y0)/2:node.y0+5,border:`1px solid ${isSelectedPathStartOrEnd(pathsFilter,funnelPathsFilter,node)?"purple":"var(--border)"}`},"data-attr":"path-node-card-button",children:(0,jsx_runtime.jsx)(PathNodeCardButton,{name:node.name,count:node.value,node:node,viewPathToFunnel:viewPathToFunnel,openPersonsModal:openPersonsModal,setFilter:updateInsightFilter,filter:pathsFilter})})})})}var sankey=__webpack_require__("./node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankey.js"),align=__webpack_require__("./node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/align.js"),sankeyLinkHorizontal=__webpack_require__("./node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankeyLinkHorizontal.js");let createCanvas=(canvasRef,width,height)=>d3_src.Ys(canvasRef.current).append("svg").classed("Paths__canvas",!0).style("background","var(--item-background)").style("width",`${width}px`).style("height",`${height}px`),createSankey=(width,height)=>new sankey.Z().nodeId(d=>d.name).nodeAlign(align.PT).nodeSort(null).nodeWidth(15).size([width,height]),appendPathNodes=(svg,nodes,pathsFilter,funnelPathsFilter,setNodeCards)=>{svg.append("g").selectAll("rect").data(nodes).join("rect").attr("x",d=>d.x0+1).attr("y",d=>d.y0).attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0-2).attr("fill",d=>{let c;for(let link of d.sourceLinks)void 0===c?c=link.color:c!==link.color&&(c=null);if(void 0===c)for(let link of d.targetLinks)void 0===c?c=link.color:c!==link.color&&(c=null);if(isSelectedPathStartOrEnd(pathsFilter,funnelPathsFilter,d))return d3_src.$_Y("purple");let startNodeColor=c&&d3_src.$_Y(c)?d3_src.$_Y(c):d3_src.$_Y("#5375ff");return startNodeColor}).on("mouseover",(_event,data)=>{data.y1-data.y0>HIDE_PATH_CARD_HEIGHT||setNodeCards(nodes.map(node=>node.index===data.index?{...node,visible:!0}:{...node,visible:node.y1-node.y0>HIDE_PATH_CARD_HEIGHT}))}).append("title").text(d=>`${(0,lib_utils.VV)(d.name)} ${d.value.toLocaleString()}`)},appendDropoffs=svg=>{let dropOffGradient=svg.append("defs").append("linearGradient").attr("id","dropoff-gradient").attr("gradientTransform","rotate(90)");dropOffGradient.append("stop").attr("offset","0%").attr("stop-color","rgba(220,53,69,0.7)"),dropOffGradient.append("stop").attr("offset","100%").attr("stop-color","var(--bg-light)")},appendPathLinks=(svg,links,nodes,setNodeCards)=>{let link=svg.append("g").attr("fill","none").selectAll("g").data(links).join("g").attr("stroke","var(--primary)").attr("opacity",.35);link.append("path").attr("d",sankeyLinkHorizontal.Z()).attr("id",d=>`path-${d.index}`).attr("stroke-width",d=>Math.max(1,d.width)).on("mouseover",(_event,data)=>{if(svg.select(`#path-${data.index}`).attr("stroke","blue"),data?.source?.targetLinks.length===0)return;let nodesToColor=[data.source],pathCardsToShow=[];for(;nodesToColor.length>0;){let _node=nodesToColor.pop();_node?.targetLinks.forEach(_link=>{svg.select(`#path-${_link.index}`).attr("stroke","blue"),nodesToColor.push(_link.source),pathCardsToShow.push(_link.source.index)})}let pathCards=[data.target];for(pathCardsToShow.push(data.target.index,data.source.index);pathCards.length>0;){let node=pathCards.pop();node?.sourceLinks.forEach(l=>{pathCards.push(l.target),pathCardsToShow.push(l.target.index)})}setNodeCards(nodes.map(node=>({...node,visible:!!pathCardsToShow.includes(node.index)||node.y1-node.y0>HIDE_PATH_CARD_HEIGHT})))}).on("mouseleave",()=>{svg.selectAll("path").attr("stroke","var(--primary)")}),link.append("g").append("path").attr("d",data=>{if(0===data.source.layer)return;let _height=data.source.y1-data.source.y0-data.source.sourceLinks.reduce((prev,curr)=>prev+curr.width,0);return function(x,y,w,h,r,tl,tr,bl,br){let retval;return retval="M"+(0+r)+",0h"+(w-2*r),tr?retval+="a"+r+","+r+" 0 0 1 "+r+","+r:retval+="h"+r+"v"+r,retval+="v"+(h-2*r),br?retval+="a"+r+","+r+" 0 0 1 "+-r+","+r:retval+="v"+r+"h"+-r,retval+="h"+(2*r-w),bl?retval+="a"+r+","+r+" 0 0 1 "+-r+","+-r:retval+="h"+-r+"v"+-r,retval+="v"+(2*r-h),tl?retval+="a"+r+","+r+" 0 0 1 "+r+","+-r:retval+="v"+-r+"h"+r,retval+="z"}(0,0,30,_height,Math.min(25,_height),!1,!0,!1,!1)}).attr("fill","url(#dropoff-gradient)").attr("stroke-width",0).attr("transform",data=>"translate("+Math.round(data.source.x1)+","+Math.round(data.source.y0+data.source.sourceLinks.reduce((prev,curr)=>prev+curr.width,0))+")")},addChartAxisLines=(svg,height,nodes,maxLayer)=>{if(maxLayer>5){let arr=[...Array(maxLayer)],minWidthApart=nodes[1].x0-nodes[0].x0;arr.forEach((_,i)=>{svg.append("line").style("stroke","var(--border)").attr("stroke-width",2).attr("x1",minWidthApart*(i+1)-20).attr("y1",0).attr("x2",minWidthApart*(i+1)-20).attr("y2",height)})}},HIDE_PATH_CARD_HEIGHT=30;function Paths_Paths(){let canvasRef=(0,react.useRef)(null),canvasContainerRef=(0,react.useRef)(null),{width:canvasWidth=1e3,height:canvasHeight=0}=(0,useResizeObserver.y)({ref:canvasRef}),[nodeCards,setNodeCards]=(0,react.useState)([]),{insight,insightProps}=(0,index_esm.useValues)(insightLogic.zm),{insightQuery,paths,pathsFilter,funnelPathsFilter,insightDataLoading,insightDataError}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),id=`'${insight?.short_id||"default_paths"}'`;return((0,react.useEffect)(()=>{setNodeCards([]);let elements=canvasContainerRef.current?.querySelectorAll(".Paths__canvas");return elements?.forEach(node=>node?.parentNode?.removeChild(node)),function(canvasRef,canvasWidth,canvasHeight,paths,pathsFilter,funnelPathsFilter,setNodeCards){if(!paths||0===paths.nodes.length)return;let maxLayer=paths.links.reduce((prev,curr)=>{let currNum=curr.target.name||curr.target;return Math.max(prev,Number(currNum.match(/[^_]*/)))},0),minWidth=canvasWidth>1e3||maxLayer<3?canvasWidth:1e3,width=maxLayer>5&&canvasWidth?minWidth/5*maxLayer:minWidth,svg=createCanvas(canvasRef,width,canvasHeight),sankey=createSankey(width,canvasHeight),{nodes,links}=sankey({nodes:paths.nodes.map(d=>({...d})),links:paths.links.map(d=>({...d}))});setNodeCards(nodes.map(node=>({...node,visible:node.y1-node.y0>HIDE_PATH_CARD_HEIGHT}))),appendPathNodes(svg,nodes,pathsFilter,funnelPathsFilter,setNodeCards),appendDropoffs(svg),appendPathLinks(svg,links,nodes,setNodeCards),addChartAxisLines(svg,canvasHeight,nodes,maxLayer)}(canvasRef,canvasWidth,canvasHeight,paths,pathsFilter||{},funnelPathsFilter||{},setNodeCards),()=>{let elements=canvasContainerRef.current?.querySelectorAll(".Paths__canvas");elements?.forEach(node=>node?.parentNode?.removeChild(node))}},[paths,!insightDataLoading,canvasWidth,canvasHeight]),insightDataError)?(0,jsx_runtime.jsx)(EmptyStates.jC,{query:insightQuery,excludeDetail:!0}):(0,jsx_runtime.jsx)("div",{className:"h-full w-full overflow-auto",id:id,ref:canvasContainerRef,children:(0,jsx_runtime.jsxs)("div",{ref:canvasRef,className:"Paths","data-attr":"paths-viz",children:[!insightDataLoading&&paths&&0===paths.nodes.length&&!insightDataError&&(0,jsx_runtime.jsx)(EmptyStates.dV,{}),!insightDataError&&nodeCards&&nodeCards.map((node,idx)=>(0,jsx_runtime.jsx)(PathNodeCard,{node:node,insightProps:insightProps},idx))]})})}function PathCanvasLabel(){return(0,jsx_runtime.jsx)("div",{className:"flex items-center text-muted-alt",children:"Large path items are shown by default. View smaller items by hovering over a node"})}let retentionLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("default_retention_key")),(0,index_esm.path)(key=>["scenes","retention","retentionLogic",key]),(0,index_esm.connect)(props=>({values:[(0,insightVizDataLogic.Z)(props),["insightQuery","insightData","querySource"]]})),(0,index_esm.selectors)({results:[s=>[s.insightQuery,s.insightData],(insightQuery,insightData)=>{var _insightData$result;return(0,utils.I5)(insightQuery)&&null!==(_insightData$result=insightData?.result)&&void 0!==_insightData$result?_insightData$result:[]}]})]),retentionLineGraphLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("default_retention_key")),(0,index_esm.path)(key=>["scenes","retention","retentionLineGraphLogic",key]),(0,index_esm.connect)(props=>({values:[(0,insightVizDataLogic.Z)(props),["querySource","dateRange","retentionFilter"],retentionLogic(props),["results"]]})),(0,index_esm.selectors)({trendSeries:[s=>[s.results,s.retentionFilter],(results,retentionFilter)=>{let{period,retentionReference}=retentionFilter||{};return results.map((cohortRetention,datasetIndex)=>{let retentionPercentages=cohortRetention.values.map(value=>value.count/cohortRetention.values[0].count).map(value=>isNaN(value)?0:100*value),paddedValues=[100].concat(retentionPercentages);return{id:datasetIndex,days:retentionPercentages.map((_,index)=>`${period} ${index}`),labels:retentionPercentages.map((_,index)=>`${period} ${index}`),count:0,label:cohortRetention.date?"Hour"===period?(0,dayjs.Bv)(cohortRetention.date).format("MMM D, h A"):(0,dayjs.Bv)(cohortRetention.date).format("MMM D"):cohortRetention.label,data:"previous"===retentionReference?retentionPercentages.map((value,index)=>[value,paddedValues[index]]).map(_ref=>{let[value,previous]=_ref;return 100*value/previous}):retentionPercentages,index:datasetIndex}})}],incompletenessOffsetFromEnd:[s=>[s.dateRange,s.retentionFilter,s.trendSeries],(dateRange,retentionFilter,trendSeries)=>{let{date_to}=dateRange||{},{period}=retentionFilter||{};if(!trendSeries?.[0]?.days)return 0;if(!date_to)return -1;let numUnits=trendSeries[0].days.length,interval=retention_constants.tp?.[null!=period?period:types.xW.Day],startDate=(0,dayjs.Bv)().startOf(interval),startIndex=trendSeries[0].days.findIndex((_,i)=>(0,dayjs.Bv)(date_to).add(i-numUnits,interval)>=startDate);return void 0!==startIndex&&-1!==startIndex?startIndex-trendSeries[0].days.length:0}],aggregationGroupTypeIndex:[s=>[s.querySource],querySource=>{var _ref2;return null!==(_ref2=(0,utils.Vr)(querySource)||(0,utils.vy)(querySource)?null:querySource?.aggregation_group_type_index)&&void 0!==_ref2?_ref2:"people"}]})]);var featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),query=__webpack_require__("./frontend/src/queries/query.ts");function retentionToActorsQuery(query,selectedInterval){var _query$retentionFilte;let offset=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,group=null!=query.aggregation_group_type_index,totalIntervals=(query.retentionFilter.totalIntervals||11)-selectedInterval,periodName=null!==(_query$retentionFilte=query.retentionFilter.period?.toLowerCase())&&void 0!==_query$retentionFilte?_query$retentionFilte:"day",selects=Array.from({length:totalIntervals},(_,intervalNumber)=>`${periodName}_${intervalNumber}`);return{kind:schema.OH.ActorsQuery,select:[group?"group":"person",...selects],orderBy:["length(appearances) DESC","actor_id"],source:{kind:schema.OH.InsightActorsQuery,interval:selectedInterval,source:{...query,retentionFilter:{...query.retentionFilter}}},offset,limit:offset?2*offset:void 0}}async function queryForActors(retentionQuery,selectedInterval){let offset=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,actorsQuery=retentionToActorsQuery(retentionQuery,selectedInterval,offset),response=await (0,query.jr)(actorsQuery),results=response.results.map(row=>({person:row[0],appearances:row.slice(1,row.length)}));return{result:results,offset:response.hasMore?response.offset+response.limit:void 0,missing_persons:response.missing_actors_count}}var kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts");let retentionPeopleLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("default_retention_key")),(0,index_esm.path)(key=>["scenes","retention","retentionPeopleLogic",key]),(0,index_esm.connect)(props=>({values:[(0,insightVizDataLogic.Z)(props),["querySource"]],actions:[(0,insightVizDataLogic.Z)(props),["loadDataSuccess"]]})),(0,index_esm.actions)(()=>({clearPeople:!0,loadMorePeople:selectedInterval=>selectedInterval,loadMorePeopleSuccess:payload=>({payload})})),(0,kea_loaders_lib.loaders)(_ref=>{let{values}=_ref;return{people:{__default:{},loadPeople:async selectedInterval=>await queryForActors(values.querySource,selectedInterval)}}}),(0,index_esm.reducers)({people:{clearPeople:()=>({}),loadPeople:()=>({}),loadMorePeopleSuccess:(_,_ref2)=>{let{payload}=_ref2;return payload}},peopleLoadingMore:[!1,{loadMorePeople:()=>!0,loadMorePeopleSuccess:()=>!1}]}),(0,index_esm.selectors)(()=>({apiFilters:[s=>[s.querySource],querySource=>querySource?(0,queryNodeToFilter.ce)(querySource):{}]})),(0,index_esm.listeners)(_ref3=>{let{actions,values}=_ref3;return{loadDataSuccess:()=>{actions.clearPeople()},loadMorePeople:async selectedInterval=>{if(values.people.next||values.people.offset){let peopleResult;peopleResult=values.people.offset&&values.querySource?.kind===schema.OH.RetentionQuery?await queryForActors(values.querySource,selectedInterval,values.people.offset):await api.ZP.get(values.people.next);let newPayload={result:[...values.people.result||[],...peopleResult.result||[]],next:peopleResult.next,offset:peopleResult.offset,missing_persons:(peopleResult.missing_persons||0)+(values.people.missing_persons||0)};actions.loadMorePeopleSuccess(newPayload)}}}})]),retentionModalLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("default_retention_key")),(0,index_esm.path)(key=>["scenes","retention","retentionModalLogic",key]),(0,index_esm.connect)(props=>({values:[(0,insightVizDataLogic.Z)(props),["querySource","retentionFilter"],groupsModel.$,["aggregationLabel"],featureFlagLogic.h,["featureFlags"]],actions:[retentionPeopleLogic(props),["loadPeople"]]})),(0,index_esm.actions)(()=>({openModal:rowIndex=>({rowIndex}),closeModal:!0})),(0,index_esm.reducers)({selectedInterval:[null,{openModal:(_,_ref)=>{let{rowIndex}=_ref;return rowIndex},closeModal:()=>null}]}),(0,index_esm.selectors)({aggregationTargetLabel:[s=>[s.querySource,s.aggregationLabel],(querySource,aggregationLabel)=>{let aggregation_group_type_index=(0,utils.Vr)(querySource)||(0,utils.vy)(querySource)?void 0:querySource?.aggregation_group_type_index;return aggregationLabel(aggregation_group_type_index)}],actorsQuery:[s=>[s.querySource,s.selectedInterval],(querySource,selectedInterval)=>querySource?retentionToActorsQuery(querySource,null!=selectedInterval?selectedInterval:0):null],exploreUrl:[s=>[s.actorsQuery],actorsQuery=>{if(!actorsQuery)return null;let query={kind:schema.OH.DataTableNode,source:actorsQuery,full:!0};return(0,utils.a5)(actorsQuery.source)&&(0,utils.I5)(actorsQuery.source.source)&&void 0!==actorsQuery.source.source.aggregation_group_type_index&&(query.showPropertyFilter=!1),urls.j.insightNew(void 0,void 0,query)}]}),(0,index_esm.listeners)(_ref2=>{let{actions}=_ref2;return{openModal:_ref3=>{let{rowIndex}=_ref3;actions.loadPeople(rowIndex)}}})]);function RetentionLineGraph(_ref){let{inSharedMode=!1}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{trendSeries,incompletenessOffsetFromEnd,aggregationGroupTypeIndex}=(0,index_esm.useValues)(retentionLineGraphLogic(insightProps)),{openModal}=(0,index_esm.useActions)(retentionModalLogic(insightProps));return 0===trendSeries.length?null:trendSeries?(0,jsx_runtime.jsx)(LineGraph.xr,{"data-attr":"trend-line-graph",type:types.KU.Line,datasets:trendSeries,labels:trendSeries[0]&&trendSeries[0].labels||[],isInProgress:incompletenessOffsetFromEnd<0,inSharedMode:!!inSharedMode,showPersonsModal:!1,labelGroupType:aggregationGroupTypeIndex,trendsFilter:{aggregationAxisFormat:"percentage"},tooltip:{rowCutoff:11,renderSeries:function _renderCohortPrefix(value){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[value,(0,jsx_runtime.jsx)("span",{className:"ml-1",children:"Cohort"})]})},showHeader:!1,renderCount:count=>`${(0,lib_utils.jb)(count)}%`},onClick:payload=>{let{points}=payload,rowIndex=points.clickedPointNotLine?points.pointsIntersectingClick[0].dataset.index:points.pointsIntersectingLine[0].dataset.index;void 0!==rowIndex&&openModal(rowIndex)},incompletenessOffsetFromEnd:incompletenessOffsetFromEnd}):(0,jsx_runtime.jsx)(EmptyStates.dV,{})}var RetentionTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/retention/RetentionTable.scss"),RetentionTable_default=__webpack_require__.n(RetentionTable),RetentionTable_options={};RetentionTable_options.insert="head",RetentionTable_options.singleton=!1,injectStylesIntoStyleTag_default()(RetentionTable_default(),RetentionTable_options),RetentionTable_default().locals;var exportsLogic=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),GroupActorDisplay=__webpack_require__("./frontend/src/scenes/persons/GroupActorDisplay.tsx"),person_utils=__webpack_require__("./frontend/src/scenes/persons/person-utils.ts"),DataTableExport=__webpack_require__("./frontend/src/queries/nodes/DataTable/DataTableExport.tsx");function RetentionModal(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{results}=(0,index_esm.useValues)(retentionLogic(insightProps)),{people,peopleLoading,peopleLoadingMore}=(0,index_esm.useValues)(retentionPeopleLogic(insightProps)),{loadMorePeople}=(0,index_esm.useActions)(retentionPeopleLogic(insightProps)),{aggregationTargetLabel,selectedInterval,exploreUrl,actorsQuery}=(0,index_esm.useValues)(retentionModalLogic(insightProps)),{closeModal}=(0,index_esm.useActions)(retentionModalLogic(insightProps)),{startExport}=(0,index_esm.useActions)(exportsLogic.exportsLogic),dataTableNodeQuery=actorsQuery?{kind:schema.OH.DataTableNode,source:actorsQuery}:void 0;if(!results||null===selectedInterval)return null;let row=results[selectedInterval],isEmpty=row.values[0]?.count===0;return(0,jsx_runtime.jsxs)(src.fQ,{isOpen:!0,onClose:closeModal,footer:(0,jsx_runtime.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2",children:[!!people.result?.length&&!exploreUrl&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>startExport({export_format:types.P5.CSV,export_context:{path:row?.people_url}}),children:"Download CSV"}),!!people.result?.length&&!!dataTableNodeQuery&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>{dataTableNodeQuery&&(0,DataTableExport.dj)(dataTableNodeQuery,!0,startExport)},tooltip:`Up to ${DataTableExport.yP} persons will be exported`,children:"Export all as CSV"})]}),exploreUrl&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",to:exploreUrl,"data-attr":"person-modal-new-insight",onClick:()=>{closeModal()},children:"Explore"})]}),width:isEmpty?void 0:"90%",title:`${dayjs.Bv.utc(row.date).format("MMMM D, YYYY")} Cohort`,children:[people&&!!people.missing_persons&&(0,jsx_runtime.jsx)(PersonsModal.JY,{actorLabel:aggregationTargetLabel,missingActorsCount:people.missing_persons}),(0,jsx_runtime.jsx)("div",{children:peopleLoading?(0,jsx_runtime.jsx)(Spinner.t,{}):isEmpty?(0,jsx_runtime.jsxs)("span",{children:["No ",aggregationTargetLabel.plural," during this period."]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("table",{className:"RetentionTable RetentionTable--non-interactive",children:(0,jsx_runtime.jsxs)("tbody",{children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{children:(0,lib_utils.fm)(aggregationTargetLabel.singular)}),row.values?.map((data,index)=>jsx_runtime.jsxs("th",{children:[jsx_runtime.jsx("div",{children:results[index].label}),jsx_runtime.jsxs("div",{children:[data.count,"\xa0",data.count>0&&jsx_runtime.jsxs("span",{className:"text-muted",children:["(",lib_utils.e9(data.count/row?.values[0].count),")"]})]})]},index))]}),people.result&&people.result.map(personAppearances=>(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{className:"min-w-[200px]",children:(0,lib_utils.tK)(personAppearances.person)?(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.group(String(personAppearances.person.group_type_index),personAppearances.person.group_key),"data-attr":"retention-person-link",children:(0,GroupActorDisplay.O)(personAppearances.person.group_key,personAppearances.person.properties)}):(0,jsx_runtime.jsx)(src.Jp,{size:"small",to:urls.j.personByDistinctId(personAppearances.person.distinct_ids?.[0]),"data-attr":"retention-person-link",children:(0,person_utils.y)(personAppearances.person)})}),personAppearances.appearances.map((appearance,index)=>(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("RetentionTable__Tab",appearance?"opacity-100":"opacity-20")})},index))]},personAppearances.person.id))]})}),people.next||people.offset?(0,jsx_runtime.jsx)("div",{className:"m-4 flex justify-center",children:(0,jsx_runtime.jsxs)(src.Jp,{type:"primary",onClick:()=>loadMorePeople(selectedInterval),loading:peopleLoadingMore,children:["Load more ",aggregationTargetLabel.plural]})}):null]})})]})}let periodIsLatest=(date_to,period)=>{if(!date_to||!period)return!0;let curr=(0,dayjs.Bv)(date_to);return!!("Hour"==period&&curr.isSame((0,dayjs.Bv)(),"hour")||"Day"==period&&curr.isSame((0,dayjs.Bv)(),"day")||"Week"==period&&curr.isSame((0,dayjs.Bv)(),"week")||"Month"==period&&curr.isSame((0,dayjs.Bv)(),"month"))},retentionTableLogic=(0,index_esm.kea)([(0,index_esm.props)({}),(0,index_esm.key)((0,sharedUtils.bk)("default_retention_key")),(0,index_esm.path)(key=>["scenes","retention","retentionTableLogic",key]),(0,index_esm.connect)(props=>({values:[(0,insightVizDataLogic.Z)(props),["dateRange","retentionFilter","breakdownFilter","vizSpecificOptions"],retentionLogic(props),["results"]]})),(0,index_esm.selectors)({isLatestPeriod:[s=>[s.dateRange,s.retentionFilter],(dateRange,retentionFilter)=>periodIsLatest(dateRange?.date_to||null,retentionFilter?.period||null)],retentionVizOptions:[s=>[s.vizSpecificOptions],vizSpecificOptions=>vizSpecificOptions?.[types.dw.RETENTION]],hideSizeColumn:[s=>[s.retentionVizOptions],retentionVizOptions=>retentionVizOptions?.hideSizeColumn],maxIntervalsCount:[s=>[s.results],results=>Math.max(...results.map(result=>result.values.length))],tableHeaders:[s=>[s.results,s.hideSizeColumn],(results,hideSizeColumn)=>["Cohort",...hideSizeColumn?[]:["Size"],...results.map(x=>x.label)]],tableRows:[s=>[s.results,s.maxIntervalsCount,s.retentionFilter,s.breakdownFilter,s.hideSizeColumn],(results,maxIntervalsCount,retentionFilter,breakdownFilter,hideSizeColumn)=>{let{period}=retentionFilter||{},{breakdowns}=breakdownFilter||{};return(0,lib_utils.w6)(maxIntervalsCount).map(index=>{let firstColumn;let currentResult=results[index];if(breakdowns?.length)firstColumn=currentResult.label;else switch(period){case"Hour":firstColumn=dayjs.Bv.utc(currentResult.date).format("MMM D, h A");break;case"Month":firstColumn=dayjs.Bv.utc(currentResult.date).format("MMM YYYY");break;case"Week":{let startDate=dayjs.Bv.utc(currentResult.date),endDate=startDate.add(6,"day");firstColumn=`${startDate.format("MMM D")} to ${endDate.format("MMM D")}`;break}default:firstColumn=dayjs.Bv.utc(currentResult.date).format("MMM D")}let secondColumn=hideSizeColumn?[]:[currentResult.values[0].count],otherColumns=currentResult.values.map(value=>{let totalCount=currentResult.values[0].count,percentage=totalCount>0?value.count/totalCount*100:0;return{count:value.count,percentage}});return[firstColumn,...secondColumn,...otherColumns]})}]})]);function RetentionTable_RetentionTable(_ref){let{inSharedMode=!1}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{tableHeaders,tableRows,isLatestPeriod,hideSizeColumn,retentionVizOptions}=(0,index_esm.useValues)(retentionTableLogic(insightProps)),{openModal}=(0,index_esm.useActions)(retentionModalLogic(insightProps)),{retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),showMean=retentionFilter?.showMean||!1;return(0,jsx_runtime.jsx)("table",{className:(0,clsx_m.default)("RetentionTable",{"RetentionTable--small-layout":retentionVizOptions?.useSmallLayout}),"data-attr":"retention-table",children:(0,jsx_runtime.jsxs)("tbody",{children:[(0,jsx_runtime.jsx)("tr",{children:tableHeaders.map(heading=>(0,jsx_runtime.jsx)("th",{children:heading},heading))}),showMean&&tableRows.length>0?(0,jsx_runtime.jsx)("tr",{className:"border-b",children:(0,lib_utils.w6)(0,tableRows[0].length).map(columnIndex=>(0,jsx_runtime.jsx)("td",{className:"pb-2",children:columnIndex<=(hideSizeColumn?0:1)?0==columnIndex?(0,jsx_runtime.jsx)("span",{className:"RetentionTable__TextTab",children:"Mean"}):null:(0,jsx_runtime.jsx)(CohortDay,{percentage:(0,d3_src.J69)(tableRows.map(row=>columnIndex>=row.length-1&&isLatestPeriod||!row[columnIndex]?null:row[columnIndex].percentage))||0,latest:isLatestPeriod&&columnIndex==tableRows[0].length-1,clickable:!1,backgroundColor:lib_utils.Wd})},columnIndex))},-1):void 0,tableRows.map((row,rowIndex)=>(0,jsx_runtime.jsx)("tr",{onClick:()=>{inSharedMode||openModal(rowIndex)},children:row.map((column,columnIndex)=>(0,jsx_runtime.jsx)("td",{className:(0,clsx_m.default)({"pt-2":0===rowIndex&&showMean}),children:columnIndex<=(hideSizeColumn?0:1)?(0,jsx_runtime.jsx)("span",{className:"RetentionTable__TextTab",children:column}):(0,jsx_runtime.jsx)(CohortDay,{percentage:column.percentage,clickable:!0,latest:isLatestPeriod&&columnIndex===row.length-1})},columnIndex))},rowIndex))]})})}function CohortDay(_ref2){let{percentage,latest,clickable,backgroundColor}=_ref2,backgroundColorSaturation=percentage/100,saturatedBackgroundColor=(0,lib_utils.BW)(backgroundColor||lib_utils.ke,backgroundColorSaturation,.1),textColor=backgroundColorSaturation>.4?"#fff":"var(--text-3000)",numberCell=(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("RetentionTable__Tab",{"RetentionTable__Tab--clickable":clickable,"RetentionTable__Tab--period":latest}),style:latest?void 0:{backgroundColor:saturatedBackgroundColor,color:textColor},children:[percentage.toFixed(1),"%"]});return latest?(0,jsx_runtime.jsx)(Tooltip.u,{title:"Period in progress",children:numberCell}):numberCell}function RetentionContainer(_ref){let{inCardView,inSharedMode,vizSpecificOptions}=_ref,hideLineGraph=vizSpecificOptions?.hideLineGraph||inCardView;return(0,jsx_runtime.jsx)("div",{className:"RetentionContainer",children:hideLineGraph?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(RetentionTable_RetentionTable,{inSharedMode:inSharedMode}),inSharedMode?null:(0,jsx_runtime.jsx)(RetentionModal,{})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"RetentionContainer__graph",children:(0,jsx_runtime.jsx)(RetentionLineGraph,{inSharedMode:inSharedMode})}),(0,jsx_runtime.jsx)(src.p2,{}),(0,jsx_runtime.jsx)("div",{className:"RetentionContainer__table overflow-x-auto",children:(0,jsx_runtime.jsx)(RetentionTable_RetentionTable,{inSharedMode:inSharedMode})}),inSharedMode?null:(0,jsx_runtime.jsx)(RetentionModal,{})]})})}var BoldNumber=__webpack_require__("./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.tsx"),WorldMap=__webpack_require__("./frontend/src/scenes/insights/views/WorldMap/index.ts"),trendsDataLogic=__webpack_require__("./frontend/src/scenes/trends/trendsDataLogic.ts");function datasetToActorsQuery(_ref){var _dataset$breakdown_va,_dataset$compare_labe,_dataset$action$order;let{query,dataset,day,index}=_ref,breakdown=null!==(_dataset$breakdown_va=dataset.breakdown_value)&&void 0!==_dataset$breakdown_va?_dataset$breakdown_va:void 0!==index&&Array.isArray(dataset.breakdownValues)?dataset.breakdownValues[index]:void 0,compare=null!==(_dataset$compare_labe=dataset.compare_label)&&void 0!==_dataset$compare_labe?_dataset$compare_labe:void 0!==index&&Array.isArray(dataset.compareLabels)?dataset.compareLabels[index]:void 0;return{kind:schema.OH.InsightActorsQuery,source:query,day,status:dataset.status,series:null!==(_dataset$action$order=dataset.action?.order)&&void 0!==_dataset$action$order?_dataset$action$order:0,breakdown,compare,includeRecordings:!0}}function ActionsHorizontalBar(_ref){let{showPersonsModal=!0}=_ref,[data,setData]=(0,react.useState)(null),[total,setTotal]=(0,react.useState)(0),{cohorts}=(0,index_esm.useValues)(cohortsModel.Q),{formatPropertyValueForDisplay}=(0,index_esm.useValues)(propertyDefinitionsModel.IP),{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{indexedResults,labelGroupType,trendsFilter,formula,showValuesOnSeries,isDataWarehouseSeries,querySource,breakdownFilter,hiddenLegendIndexes,getTrendsColor,theme}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps));return(0,react.useEffect)(()=>{indexedResults&&function(){let _data=[...indexedResults],colorList=indexedResults.map(getTrendsColor);setData([{labels:_data.map(item=>item.label),data:_data.map(item=>item.aggregated_value),actions:_data.map(item=>item.action),personsValues:_data.map(item=>item.persons),breakdownValues:_data.map(item=>item.breakdown_value),breakdownLabels:_data.map(item=>(0,insights_utils.Cq)(item.breakdown_value,breakdownFilter,cohorts,formatPropertyValueForDisplay)),compareLabels:_data.map(item=>item.compare_label),backgroundColor:colorList,hoverBackgroundColor:colorList,hoverBorderColor:colorList,borderColor:colorList,hoverBorderWidth:10,borderWidth:1}]),setTotal(_data.reduce((prev,item)=>prev+item.aggregated_value,0))}()},[indexedResults,theme]),data&&total>0?(0,jsx_runtime.jsx)(LineGraph.xr,{"data-attr":"trend-bar-value-graph",type:types.KU.HorizontalBar,tooltip:{showHeader:!1},labelGroupType:labelGroupType,datasets:data,labels:data[0].labels,hiddenLegendIndexes:hiddenLegendIndexes,showPersonsModal:showPersonsModal,trendsFilter:trendsFilter,formula:formula,showValuesOnSeries:showValuesOnSeries,onClick:!showPersonsModal||trendsFilter?.formula||isDataWarehouseSeries?void 0:point=>{let{index,points}=point,dataset=points.referencePoint.dataset,label=dataset.labels?.[point.index];(0,PersonsModal.Yp)({title:label||"",query:datasetToActorsQuery({dataset,query:querySource,index}),additionalSelect:{value_at_data_point:"event_count",matched_recordings:"matched_recordings"},orderBy:["event_count DESC, actor_id DESC"]})}}):(0,jsx_runtime.jsx)(EmptyStates.dV,{})}var helpers_segment=__webpack_require__("./node_modules/.pnpm/chart.js@4.4.3/node_modules/chart.js/dist/chunks/helpers.segment.js"),insightAlertsLogic=__webpack_require__("./frontend/src/lib/components/Alerts/insightAlertsLogic.ts"),DateDisplay=__webpack_require__("./frontend/src/lib/components/DateDisplay/index.tsx"),PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx");function ActionsLineGraph(_ref){let{inSharedMode=!1,showPersonsModal=!0,context}=_ref,{insightProps,insight}=(0,index_esm.useValues)(insightLogic.zm),{indexedResults,labelGroupType,incompletenessOffsetFromEnd,formula,display,interval,showValuesOnSeries,showPercentStackView,supportsPercentStackView,trendsFilter,isLifecycle,isStickiness,isDataWarehouseSeries,showLegend,hiddenLegendIndexes,querySource,yAxisScaleType}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),{alertThresholdLines}=(0,index_esm.useValues)((0,insightAlertsLogic.E)({insightId:insight.id,insightLogicProps:insightProps})),labels=2===indexedResults.length&&indexedResults.every(x=>x.compare)&&indexedResults.find(x=>"current"===x.compare_label)?.labels||indexedResults[0]&&indexedResults[0].labels||[],shortenLifecycleLabels=s=>{var _ref2,_s$split$;return(0,lib_utils.fm)(null!==(_ref2=null!==(_s$split$=s?.split(" - ")?.[1])&&void 0!==_s$split$?_s$split$:s)&&void 0!==_ref2?_ref2:"None")},legend={display:!1};return(isLifecycle&&showLegend&&(legend.display=!0,legend.labels={generateLabels:chart=>{let labelElements=helpers_segment.d.plugins.legend.labels.generateLabels(chart);return labelElements.forEach(elt=>{elt.text=shortenLifecycleLabels(elt.text)}),labelElements}}),indexedResults&&indexedResults[0]?.data&&indexedResults.filter(result=>0!==result.count).length>0)?(0,jsx_runtime.jsx)(LineGraph.xr,{"data-attr":"trend-line-graph",type:display===types.Qb.ActionsBar||isLifecycle?types.KU.Bar:types.KU.Line,hiddenLegendIndexes:hiddenLegendIndexes,datasets:indexedResults,labels:labels,inSharedMode:inSharedMode,labelGroupType:labelGroupType,showPersonsModal:showPersonsModal,trendsFilter:trendsFilter,formula:formula,showValuesOnSeries:showValuesOnSeries,showPercentStackView:showPercentStackView,supportsPercentStackView:supportsPercentStackView,yAxisScaleType:yAxisScaleType,tooltip:isLifecycle?{altTitle:"Users",altRightTitle:(_,date)=>date,renderSeries:(_,datum)=>shortenLifecycleLabels(datum.label)}:void 0,isInProgress:!isStickiness&&incompletenessOffsetFromEnd<0,isArea:display===types.Qb.ActionsAreaGraph,incompletenessOffsetFromEnd:incompletenessOffsetFromEnd,legend:legend,alertLines:alertThresholdLines,onClick:!showPersonsModal||(0,lib_utils.dm)(formula)||isDataWarehouseSeries?void 0:payload=>{var _ref3,_dataset$action$days$,_ref4,_dataset$label;let{index,points}=payload,dataset=points.referencePoint.dataset;if(!dataset)return;let day=null!==(_ref3=null!==(_dataset$action$days$=dataset.action?.days?.[index])&&void 0!==_dataset$action$days$?_dataset$action$days$:dataset?.days?.[index])&&void 0!==_ref3?_ref3:"",label=null!==(_ref4=null!==(_dataset$label=dataset?.label)&&void 0!==_dataset$label?_dataset$label:dataset?.labels?.[index])&&void 0!==_ref4?_ref4:"",title=isStickiness?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{value:label||"",disablePopover:!0})," stickiness on day ",day]}):label=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[label," on"," ",(0,jsx_runtime.jsx)(DateDisplay.q,{interval:interval||"day",date:day?.toString()||""})]});(0,PersonsModal.Yp)({title,query:datasetToActorsQuery({dataset,query:querySource,day}),additionalSelect:isLifecycle||isStickiness?{}:{value_at_data_point:"event_count",matched_recordings:"matched_recordings"},orderBy:isLifecycle||isStickiness?void 0:["event_count DESC, actor_id DESC"]})}}):(0,jsx_runtime.jsx)(EmptyStates.dV,{heading:context?.emptyStateHeading,detail:context?.emptyStateDetail})}var ActionsPie=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/trends/viz/ActionsPie.scss"),ActionsPie_default=__webpack_require__.n(ActionsPie),ActionsPie_options={};ActionsPie_options.insert="head",ActionsPie_options.singleton=!1,injectStylesIntoStyleTag_default()(ActionsPie_default(),ActionsPie_options),ActionsPie_default().locals;var aggregationAxisFormat=__webpack_require__("./frontend/src/scenes/insights/aggregationAxisFormat.ts"),PieChart=__webpack_require__("./frontend/src/scenes/insights/views/LineGraph/PieChart.tsx");function ActionsPie_ActionsPie(_ref){let{inSharedMode,showPersonsModal=!0,context}=_ref,[data,setData]=(0,react.useState)(null),[total,setTotal]=(0,react.useState)(0),{cohorts}=(0,index_esm.useValues)(cohortsModel.Q),{formatPropertyValueForDisplay}=(0,index_esm.useValues)(propertyDefinitionsModel.IP),{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{indexedResults,labelGroupType,trendsFilter,formula,showValuesOnSeries,showLabelOnSeries,supportsPercentStackView,showPercentStackView,pieChartVizOptions,isDataWarehouseSeries,querySource,breakdownFilter,hiddenLegendIndexes,getTrendsColor}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),renderingMetadata=context?.chartRenderingMetadata?.[types.Qb.ActionsPie],showAggregation=!pieChartVizOptions?.hideAggregation;(0,react.useEffect)(()=>{indexedResults&&function(){let days=indexedResults.length>0?indexedResults[0].days:[],colorList=indexedResults.map(getTrendsColor);setData([{id:0,labels:indexedResults.map(item=>item.label),data:indexedResults.map(item=>item.aggregated_value),actions:indexedResults.map(item=>item.action),breakdownValues:indexedResults.map(item=>item.breakdown_value),breakdownLabels:indexedResults.map(item=>(0,insights_utils.Cq)(item.breakdown_value,breakdownFilter,cohorts,formatPropertyValueForDisplay)),compareLabels:indexedResults.map(item=>item.compare_label),personsValues:indexedResults.map(item=>item.persons),days,backgroundColor:colorList,borderColor:colorList}]),setTotal(indexedResults.reduce((prev,item,i)=>prev+(hiddenLegendIndexes?.includes(i)?0:item.aggregated_value),0))}()},[indexedResults,hiddenLegendIndexes]);let onClick=renderingMetadata?.onSegmentClick||(!showPersonsModal||formula?void 0:payload=>{let{points,index}=payload,dataset=points.referencePoint.dataset,label=dataset.labels?.[index];(0,PersonsModal.Yp)({title:label||"",query:datasetToActorsQuery({dataset,query:querySource,index}),additionalSelect:{value_at_data_point:"event_count",matched_recordings:"matched_recordings"},orderBy:["event_count DESC, actor_id DESC"]})});return data?data[0]&&data[0].labels?(0,jsx_runtime.jsx)("div",{className:"ActionsPie",children:(0,jsx_runtime.jsxs)("div",{className:"ActionsPie__component",children:[(0,jsx_runtime.jsx)("div",{className:"ActionsPie__chart",children:(0,jsx_runtime.jsx)(PieChart.u,{"data-attr":"trend-pie-graph",hiddenLegendIndexes:hiddenLegendIndexes,type:types.KU.Pie,datasets:data,labels:data[0].labels,labelGroupType:labelGroupType,inSharedMode:!!inSharedMode,showPersonsModal:showPersonsModal,trendsFilter:trendsFilter,formula:formula,showValuesOnSeries:showValuesOnSeries,showLabelOnSeries:showLabelOnSeries,supportsPercentStackView:supportsPercentStackView,showPercentStackView:showPercentStackView,onClick:isDataWarehouseSeries?void 0:onClick,disableHoverOffset:pieChartVizOptions?.disableHoverOffset})}),showAggregation&&(0,jsx_runtime.jsx)("div",{className:"text-7xl text-center font-bold m-0",children:(0,aggregationAxisFormat.nO)(trendsFilter,total)})]})}):(0,jsx_runtime.jsx)("p",{className:"text-center mt-16",children:"We couldn't find any matching actions."}):null}function TrendInsight(_ref){let{view,context,embedded,inSharedMode}=_ref,{insightMode}=(0,index_esm.useValues)(insightSceneLogic.T),{insightProps,showPersonsModal:insightLogicShowPersonsModal}=(0,index_esm.useValues)(insightLogic.zm),showPersonsModal=insightLogicShowPersonsModal&&!inSharedMode,{display,series,breakdownFilter,hasBreakdownMore,breakdownValuesLoading}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),{updateBreakdownFilter}=(0,index_esm.useActions)((0,trendsDataLogic.i)(insightProps));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[series&&(0,jsx_runtime.jsx)("div",{className:embedded?"InsightCard__viz":`TrendsInsight TrendsInsight--${display}`,children:(()=>{if(!display||display===types.Qb.ActionsLineGraph||display===types.Qb.ActionsLineGraphCumulative||display===types.Qb.ActionsAreaGraph||display===types.Qb.ActionsBar)return(0,jsx_runtime.jsx)(ActionsLineGraph,{showPersonsModal:showPersonsModal,context:context,inCardView:embedded,inSharedMode:inSharedMode});if(display===types.Qb.BoldNumber)return(0,jsx_runtime.jsx)(BoldNumber.O,{showPersonsModal:showPersonsModal,context:context,inCardView:embedded,inSharedMode:inSharedMode});if(display===types.Qb.ActionsTable){let ActionsTable=InsightsTable.z;return(0,jsx_runtime.jsx)(ActionsTable,{embedded:!0,filterKey:`trends_${view}`,canEditSeriesNameInline:insightMode===types.LO.Edit,isMainInsightView:!0})}return display===types.Qb.ActionsPie?(0,jsx_runtime.jsx)(ActionsPie_ActionsPie,{showPersonsModal:showPersonsModal,context:context,inCardView:embedded,inSharedMode:inSharedMode}):display===types.Qb.ActionsBarValue?(0,jsx_runtime.jsx)(ActionsHorizontalBar,{showPersonsModal:showPersonsModal,context:context,inCardView:embedded,inSharedMode:inSharedMode}):display===types.Qb.WorldMap?(0,jsx_runtime.jsx)(WorldMap.bm,{showPersonsModal:showPersonsModal,context:context,inCardView:embedded,inSharedMode:inSharedMode}):void 0})()}),!embedded&&display!==types.Qb.WorldMap&&breakdownFilter&&hasBreakdownMore&&(0,jsx_runtime.jsx)("div",{className:"p-4",children:(0,jsx_runtime.jsxs)("div",{className:"text-muted",children:["Breakdown limited to ",breakdownFilter.breakdown_limit||25," - more available",(0,jsx_runtime.jsxs)(src.Jp,{onClick:()=>updateBreakdownFilter({...breakdownFilter,breakdown_limit:2*(breakdownFilter.breakdown_limit||25)}),loading:breakdownValuesLoading,size:"xsmall",type:"secondary",className:"inline-block ml-2",children:["Set to ",2*(breakdownFilter.breakdown_limit||25)]})]})})]})}function ChartFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{display}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{isTrends,isSingleSeries,formula,breakdownFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),trendsOnlyDisabledReason=isTrends?void 0:"This type is only available in Trends.",options=[{title:"Time series",options:[{value:types.Qb.ActionsLineGraph,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrends,{}),label:"Line chart"},{value:types.Qb.ActionsBar,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{}),label:"Bar chart"},{value:types.Qb.ActionsAreaGraph,icon:(0,jsx_runtime.jsx)(icons.Ii,{}),label:"Area chart"}]},{title:"Cumulative time series",options:[{value:types.Qb.ActionsLineGraphCumulative,icon:(0,jsx_runtime.jsx)(icons.rp,{}),label:"Line chart (cumulative)",labelInMenu:"Line chart",disabledReason:trendsOnlyDisabledReason}]},{title:"Total value",options:[{value:types.Qb.BoldNumber,icon:(0,jsx_runtime.jsx)(icons.hQ,{}),label:"Number",disabledReason:trendsOnlyDisabledReason||(isSingleSeries?void 0:"This type currently only supports insights with one series, and this insight has multiple series.")},{value:types.Qb.ActionsPie,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPieChart,{}),label:"Pie chart",disabledReason:trendsOnlyDisabledReason},{value:types.Qb.ActionsBarValue,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{className:"rotate-90"}),label:"Bar chart",disabledReason:trendsOnlyDisabledReason},{value:types.Qb.ActionsTable,icon:(0,jsx_runtime.jsx)(icons.p$,{}),label:"Table"},{value:types.Qb.WorldMap,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGlobe,{}),label:"World map",tooltip:"Visualize data by country.",disabledReason:trendsOnlyDisabledReason||(formula?"This type isn't available, because it doesn't support formulas.":breakdownFilter?.breakdown&&"$geoip_country_code"!==breakdownFilter.breakdown&&"$geoip_country_name"!==breakdownFilter.breakdown?"This type isn't available, because there's a breakdown other than by Country Code or Country Name properties.":void 0)}]}];return(0,jsx_runtime.jsx)(src.Yv,{value:display||types.Qb.ActionsLineGraph,onChange:value=>{updateInsightFilter({display:value})},dropdownPlacement:"bottom-end",optionTooltipPlacement:"left",dropdownMatchSelectWidth:!1,"data-attr":"chart-filter",options:options,size:"small"},"2")}var CompareFilter=__webpack_require__("./frontend/src/lib/components/CompareFilter/CompareFilter.tsx"),IntervalFilter=__webpack_require__("./frontend/src/lib/components/IntervalFilter/index.ts"),smoothings=__webpack_require__("./frontend/src/lib/components/SmoothingFilter/smoothings.ts");function SmoothingFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{isTrends,interval,trendsFilter}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));if(!isTrends||!interval)return null;let{smoothingIntervals}=trendsFilter||{},options=smoothings.T[interval].map(_ref=>{let{value,label}=_ref;return{value,label:value===smoothingIntervals?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconPulse,{className:"mr-1.5 text-muted"}),label]}):label,labelInMenu:label}});return options.length?(0,jsx_runtime.jsx)(src.Yv,{value:smoothingIntervals||1,dropdownMatchSelectWidth:!1,onChange:key=>{updateInsightFilter({smoothingIntervals:key})},"data-attr":"smoothing-filter",options:options,size:"small"},interval):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}var LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts");function chooseFormativeElementValue(formativeElement,trendsFilter){return"prefix"===formativeElement?trendsFilter?.aggregationAxisPrefix||"":"postfix"===formativeElement&&trendsFilter?.aggregationAxisPostfix||""}function CustomUnitModal(_ref){let{isOpen,onSave,formativeElement,trendsFilter,onClose,overlayRef}=_ref,[localFormativeElementValue,setLocalFormativeElementValue]=(0,react.useState)(chooseFormativeElementValue(formativeElement,trendsFilter));return((0,react.useEffect)(()=>{setLocalFormativeElementValue(chooseFormativeElementValue(formativeElement,trendsFilter))},[formativeElement]),null===formativeElement)?null:(0,jsx_runtime.jsx)(LemonModal.f,{overlayRef:overlayRef,isOpen:isOpen,onClose:onClose,forceAbovePopovers:!0,title:`Custom ${formativeElement}`,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary","data-attr":"custom-prefix-cancel",onClick:onClose,children:"Cancel"}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",onClick:()=>onSave({[formativeElement]:localFormativeElementValue}),children:"Apply"})]}),children:(0,jsx_runtime.jsx)(LemonField.D.Pure,{label:`${(0,lib_utils.fm)(formativeElement)}:`,help:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["With a ",formativeElement,' of "',(0,jsx_runtime.jsx)("strong",{children:localFormativeElementValue||"$"}),'", 123.45 will be displayed as "',(0,jsx_runtime.jsxs)("strong",{children:["prefix"===formativeElement?localFormativeElementValue||"$":"","123.45","postfix"===formativeElement?localFormativeElementValue||"$":""]}),'"']}),children:(0,jsx_runtime.jsx)(LemonInput.D,{value:localFormativeElementValue,onChange:setLocalFormativeElementValue,autoFocus:!0})})})}var useKeyboardHotkeys=__webpack_require__("./frontend/src/lib/hooks/useKeyboardHotkeys.tsx"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts");let aggregationDisplayMap=aggregationAxisFormat.uq.reduce((acc,option)=>(acc[option.value]=option.label,acc),{});function UnitPicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{trendsFilter,display}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{reportAxisUnitsChanged}=(0,index_esm.useActions)(eventUsageLogic.vx),[isVisible,setIsVisible]=(0,react.useState)(!1),[localAxisFormat,setLocalAxisFormat]=(0,react.useState)(trendsFilter?.aggregationAxisFormat||void 0),[customUnitModal,setCustomUnitModal]=(0,react.useState)(null),customUnitModalRef=(0,react.useRef)(null);(0,useKeyboardHotkeys.l)({escape:{action:function(){setCustomUnitModal(null),setIsVisible(!1)}}},[]);let handleChange=_ref=>{let{format,prefix,postfix}=_ref;setLocalAxisFormat(format),updateInsightFilter({aggregationAxisFormat:format,aggregationAxisPrefix:prefix,aggregationAxisPostfix:postfix}),reportAxisUnitsChanged({format,prefix,postfix,display,unitIsSet:!!prefix||!!postfix||format&&"numeric"!==format}),setIsVisible(!1),setCustomUnitModal(null)},displayValue=(0,react.useMemo)(()=>{let displayValue="None";return localAxisFormat&&(displayValue=aggregationDisplayMap[localAxisFormat]),trendsFilter?.aggregationAxisPrefix?.length&&(displayValue=`Prefix: ${trendsFilter?.aggregationAxisPrefix}`),trendsFilter?.aggregationAxisPostfix?.length&&(displayValue=`Postfix: ${trendsFilter?.aggregationAxisPostfix}`),displayValue},[localAxisFormat,trendsFilter]);return(0,jsx_runtime.jsxs)("div",{className:"flex-1 mb-2.5 mx-2",children:[(0,jsx_runtime.jsx)(CustomUnitModal,{formativeElement:customUnitModal,isOpen:null!==customUnitModal,onSave:handleChange,trendsFilter:trendsFilter,onClose:()=>setCustomUnitModal(null),overlayRef:ref=>customUnitModalRef.current=ref}),(0,jsx_runtime.jsx)(LemonButton.$,{onClick:()=>setIsVisible(!isVisible),size:"small",type:"secondary","data-attr":"chart-aggregation-axis-format",fullWidth:!0,dropdown:{onClickOutside:()=>setIsVisible(!1),additionalRefs:[customUnitModalRef],visible:isVisible,overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[aggregationAxisFormat.uq.map((_ref2,index)=>{let{value,label}=_ref2;return(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>handleChange({format:value}),active:value===localAxisFormat,fullWidth:!0,children:label},index)}),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsxs)(LemonButton.J,{onClick:()=>setCustomUnitModal("prefix"),active:!!trendsFilter?.aggregationAxisPrefix,fullWidth:!0,children:["Custom prefix",trendsFilter?.aggregationAxisPrefix?`: ${trendsFilter?.aggregationAxisPrefix}...`:"..."]}),(0,jsx_runtime.jsxs)(LemonButton.J,{onClick:()=>setCustomUnitModal("postfix"),active:!!trendsFilter?.aggregationAxisPostfix,fullWidth:!0,children:["Custom postfix",trendsFilter?.aggregationAxisPostfix?`: ${trendsFilter?.aggregationAxisPostfix}...`:"..."]})]})]}),placement:"bottom-start",actionable:!0,closeOnClickInside:!1},children:displayValue})]})}var LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/index.ts");function PercentStackViewFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{showPercentStackView}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,trendsDataLogic.i)(insightProps));return(0,jsx_runtime.jsx)(LemonCheckbox.H,{className:"p-1 px-2",checked:!!showPercentStackView,onChange:checked=>{updateInsightFilter({showPercentStackView:checked})},label:(0,jsx_runtime.jsx)("span",{className:"font-normal",children:"Show as % of total"}),size:"small"})}var ResultCustomizationByPicker=__webpack_require__("./frontend/src/scenes/insights/EditorFilters/ResultCustomizationByPicker.tsx");function ScalePicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{yAxisScaleType}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(src.P4,{className:"pb-2 px-2",onChange:value=>updateInsightFilter({yAxisScaleType:value}),value:yAxisScaleType||"linear",options:[{value:"linear",label:"Linear"},{value:"log10",label:"Logarithmic"}],size:"small",fullWidth:!0})}function ShowAlertThresholdLinesFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{showAlertThresholdLines}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(src.Hw,{className:"p-1 px-2",onChange:()=>{updateInsightFilter({showAlertThresholdLines:!showAlertThresholdLines})},checked:!!showAlertThresholdLines,label:(0,jsx_runtime.jsx)("span",{className:"font-normal",children:"Show alert threshold lines"}),size:"small"})}function ShowLegendFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{showLegend}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(src.Hw,{className:"p-1 px-2",onChange:()=>{updateInsightFilter({showLegend:!showLegend})},checked:!!showLegend,label:(0,jsx_runtime.jsx)("span",{className:"font-normal",children:"Show legend"}),size:"small"})}function ValueOnSeriesFilter(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{showValuesOnSeries}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(LemonCheckbox.H,{className:"p-1 px-2",checked:!!showValuesOnSeries,onChange:()=>{updateInsightFilter({showValuesOnSeries:!showValuesOnSeries})},label:(0,jsx_runtime.jsx)("span",{className:"font-normal",children:"Show values on series"}),size:"small"})}var DateFilter=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx");function InsightDateFilter(_ref){var _dateRange$date_to,_dateRange$date_from;let{disabled}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{isTrends,dateRange}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateDateRange}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsx)(DateFilter.f,{dateTo:null!==(_dateRange$date_to=dateRange?.date_to)&&void 0!==_dateRange$date_to?_dateRange$date_to:void 0,dateFrom:null!==(_dateRange$date_from=dateRange?.date_from)&&void 0!==_dateRange$date_from?_dateRange$date_from:"-7d",allowTimePrecision:!0,disabled:disabled,onChange:(date_from,date_to,explicit_date)=>{updateDateRange({date_from,date_to,explicitDate:explicit_date})},dateOptions:lib_utils.bE,allowedRollingDateOptions:isTrends?["hours","days","weeks","months","years"]:void 0,makeLabel:key=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCalendar,{})," ",key,"All time"==key&&(0,jsx_runtime.jsx)(src.u,{title:"Only events dated after 2015 will be shown",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"info-indicator"})})]})})}function RetentionCumulativeCheckbox(){let{insightProps,canEditInsight}=(0,index_esm.useValues)(insightLogic.zm),{retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),cumulativeRetention=retentionFilter?.cumulative||!1;return canEditInsight?(0,jsx_runtime.jsx)(src.f4,{onChange:cumulative=>{updateInsightFilter({cumulative})},checked:cumulativeRetention,label:(0,jsx_runtime.jsxs)("span",{className:"font-normal",children:["Rolling retention",(0,jsx_runtime.jsx)(src.u,{title:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Rolling, or unbounded, retention includes any subsequent time period, instead of only the next period. For example, if a user is comes back on day 7, they are counted in all previous retention periods."}),children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"w-4 info-indicator"})})]}),bordered:!0,size:"small"}):null}function RetentionMeanCheckbox(){let{insightProps,canEditInsight}=(0,index_esm.useValues)(insightLogic.zm),{retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),showMean=retentionFilter?.showMean||!1;return canEditInsight?(0,jsx_runtime.jsx)(src.f4,{onChange:showMean=>{updateInsightFilter({showMean})},checked:showMean,label:(0,jsx_runtime.jsx)("span",{className:"font-normal",children:"Show mean across cohorts"}),bordered:!0,size:"small"}):null}function RetentionReferencePicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),{retentionReference}=retentionFilter||{};return(0,jsx_runtime.jsx)(src.Yv,{className:"w-60",size:"small",value:retentionReference||"total",onChange:retentionReference=>{updateInsightFilter({retentionReference})},options:[{value:"total",labelInMenu:"Overall cohort",label:"% Overall cohort"},{value:"previous",labelInMenu:"Relative to previous period",label:"% Relative to previous period"}]})}function RetentionDatePicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{dateRange,retentionFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateDateRange}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),period=retentionFilter?.period,date_to=dateRange?.date_to,yearSuffix=date_to&&(0,dayjs.Bv)(date_to).year()!==(0,dayjs.Bv)().year()?", YYYY":"";return(0,jsx_runtime.jsx)("span",{className:"flex inline-flex items-center pl-2",children:(0,jsx_runtime.jsx)(src.he,{value:date_to?(0,dayjs.Bv)(date_to):void 0,onChange:date_to=>{updateDateRange({date_to:date_to&&(0,dayjs.Bv)(date_to).toISOString()})},granularity:"Hour"===period?"hour":"day",placeholder:"Today",clearable:!0,buttonProps:{tooltip:"Cohorts up to this end date",type:"secondary",sideIcon:null,size:"small"},format:"Hour"===period?`MMM D${yearSuffix}, h A`:`MMM D${yearSuffix}`})})}let NUMBER_PRESETS=new Set([5,15,25,50,90]),BIN_OPTIONS=[{label:"Auto bins",value:constants.hB,display:!0},...Array.from(Array.from(Array(91).keys()),v=>({label:`${v} bins`,value:v,display:NUMBER_PRESETS.has(v)}))];function FunnelBinsPicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{funnelsFilter,numericBinCount}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),[visible,setVisible]=(0,react.useState)(!1),setBinCount=binCount=>{updateInsightFilter({binCount:binCount&&binCount!==constants.hB?binCount:void 0})},preferredOptions=BIN_OPTIONS.filter(o=>o.display).map(bin=>({value:bin.value,label:bin.label,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{})})),selectedValue=funnelsFilter?.binCount||constants.hB,selectedOption=BIN_OPTIONS.find(o=>o.value===selectedValue),overlay=(0,jsx_runtime.jsxs)("div",{className:"space-y-px",onClick:e=>e.stopPropagation(),children:[preferredOptions.map(bin=>(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,active:bin.value===selectedValue,onClick:()=>{setVisible(!1),setBinCount(bin.value)},children:bin.label},bin.value)),(0,jsx_runtime.jsx)(src.DF,{type:"number",className:"funnel-bins-custom-picker",min:1,max:90,value:numericBinCount,onChange:count=>{let parsedCount="string"==typeof count?parseInt(count):count;parsedCount&&setBinCount(parsedCount)},suffix:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"bins"})})]});return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.Qw,{"data-attr":"funnel-bin-filter",matchWidth:!0,visible:visible,closeOnClickInside:!1,onClickOutside:()=>setVisible(!1),overlay:overlay,className:"w-32",placement:"bottom-end",children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",type:"secondary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGraph,{}),onClick:()=>setVisible(!0),children:selectedOption?.label})})})}function FunnelDisplayLayoutPicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{funnelsFilter}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,funnelDataLogic.l)(insightProps)),options=[{title:"Graph Display Options",options:[{value:constants.xp.vertical,icon:(0,jsx_runtime.jsx)(icons.SE,{}),label:"Left to right"},{value:constants.xp.horizontal,icon:(0,jsx_runtime.jsx)(icons.Mr,{}),label:"Top to bottom"}]}];return(0,jsx_runtime.jsx)(src.Yv,{value:funnelsFilter?.layout||constants.xp.vertical,onChange:layout=>layout&&updateInsightFilter({layout}),dropdownMatchSelectWidth:!1,"data-attr":"funnel-bar-layout-selector",options:options,size:"small"})}function PathStepPicker(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{pathsFilter}=(0,index_esm.useValues)((0,pathsDataLogic.e)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,pathsDataLogic.e)(insightProps)),{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),{stepLimit}=pathsFilter||{},MAX=hasAvailableFeature(types.P$.PATHS_ADVANCED)?20:5,options=Array.from(Array.from(Array.from(Array(MAX+1).keys()).slice(2)),v=>({label:`${v} Steps`,value:v}));return(0,jsx_runtime.jsx)(src.Yv,{size:"small",value:stepLimit||pathsDataLogic._,onChange:count=>updateInsightFilter({stepLimit:count}),options:options})}var index_module=__webpack_require__("./node_modules/.pnpm/use-debounce@9.0.3_react@18.2.0/node_modules/use-debounce/dist/index.module.js");function InsightDisplayConfig(){let{insightProps,canEditInsight}=(0,index_esm.useValues)(insightLogic.zm),{isTrends,isFunnels,isRetention,isPaths,isStickiness,isLifecycle,supportsDisplay,display,breakdownFilter,trendsFilter,hasLegend,showLegend,supportsValueOnSeries,showPercentStackView,supportsPercentStackView,supportsResultCustomizationBy,yAxisScaleType,isNonTimeSeriesDisplay,compareFilter,supportsCompare}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{isTrendsFunnel,isStepsFunnel,isTimeToConvertFunnel,isEmptyFunnel}=(0,index_esm.useValues)((0,funnelDataLogic.l)(insightProps)),{hasInsightColors}=(0,index_esm.useValues)((0,resultCustomizationsModalLogic.W)(insightProps)),{updateCompareFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),showCompare=isTrends&&display!==types.Qb.ActionsAreaGraph||isStickiness,showInterval=isTrendsFunnel||isLifecycle||(isTrends||isStickiness)&&!(display&&constants.si.includes(display)),showSmoothing=isTrends&&!(0,utils.AV)(breakdownFilter)&&(!display||display===types.Qb.ActionsLineGraph),{showValuesOnSeries,mightContainFractionalNumbers}=(0,index_esm.useValues)((0,trendsDataLogic.i)(insightProps)),advancedOptions=[...supportsValueOnSeries||supportsPercentStackView||hasLegend||supportsResultCustomizationBy?[{title:"Display",items:[...supportsValueOnSeries?[{label:()=>(0,jsx_runtime.jsx)(ValueOnSeriesFilter,{})}]:[],...supportsPercentStackView?[{label:()=>(0,jsx_runtime.jsx)(PercentStackViewFilter,{})}]:[],...hasLegend?[{label:()=>(0,jsx_runtime.jsx)(ShowLegendFilter,{})}]:[],{label:()=>(0,jsx_runtime.jsx)(ShowAlertThresholdLinesFilter,{})}]}]:[],...supportsResultCustomizationBy&&hasInsightColors?[{title:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("h5",{className:"mx-2 my-1",children:["Color customization by"," ",(0,jsx_runtime.jsx)(src.u,{title:"You can customize the appearance of individual results in your insights. This can be done based on the result's name (e.g., customize the breakdown value 'pizza' for the first series) or based on the result's rank (e.g., customize the first dataset in the results).",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"relative top-0.5 text-lg text-muted"})})]})}),items:[{label:()=>(0,jsx_runtime.jsx)(ResultCustomizationByPicker.r,{})}]}]:[],...!showPercentStackView&&isTrends?[{title:(0,aggregationAxisFormat.qn)(display||types.Qb.ActionsLineGraph),items:[{label:()=>(0,jsx_runtime.jsx)(UnitPicker,{})}]}]:[],...!isNonTimeSeriesDisplay&&isTrends?[{title:"Y-axis scale",items:[{label:()=>(0,jsx_runtime.jsx)(ScalePicker,{})}]}]:[],...mightContainFractionalNumbers&&isTrends?[{title:"Decimal places",items:[{label:()=>(0,jsx_runtime.jsx)(DecimalPrecisionInput,{})}]}]:[]],advancedOptionsCount=(supportsValueOnSeries&&showValuesOnSeries?1:0)+(showPercentStackView?1:0)+(!showPercentStackView&&isTrends&&trendsFilter?.aggregationAxisFormat&&"numeric"!==trendsFilter.aggregationAxisFormat?1:0)+(hasLegend&&showLegend?1:0)+(yAxisScaleType&&"linear"!==yAxisScaleType?1:0);return(0,jsx_runtime.jsxs)("div",{className:"InsightDisplayConfig flex justify-between items-center flex-wrap gap-2","data-attr":"insight-filters",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-x-2 flex-wrap gap-y-2",children:[!isRetention&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(InsightDateFilter,{disabled:isFunnels&&!!isEmptyFunnel})}),showInterval&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(IntervalFilter.$,{})}),showSmoothing&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(SmoothingFilter,{})}),!!isRetention&&(0,jsx_runtime.jsxs)(ConfigFilter,{children:[(0,jsx_runtime.jsx)(RetentionDatePicker,{}),(0,jsx_runtime.jsx)(RetentionReferencePicker,{}),(0,jsx_runtime.jsx)(RetentionMeanCheckbox,{}),(0,jsx_runtime.jsx)(RetentionCumulativeCheckbox,{})]}),!!isPaths&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(PathStepPicker,{})}),showCompare&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(CompareFilter.m,{compareFilter:compareFilter,updateCompareFilter:updateCompareFilter,disabled:!canEditInsight||!supportsCompare})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-x-2 flex-wrap",children:[advancedOptions.length>0&&(0,jsx_runtime.jsx)(LemonMenu.d,{items:advancedOptions,closeOnClickInside:!1,children:(0,jsx_runtime.jsx)(src.Jp,{size:"small",children:(0,jsx_runtime.jsxs)("span",{className:"font-medium whitespace-nowrap",children:["Options",advancedOptionsCount?(0,jsx_runtime.jsxs)("span",{className:"ml-0.5 text-muted ligatures-none",children:["(",advancedOptionsCount,")"]}):null]})})}),supportsDisplay&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(ChartFilter,{})}),!!isStepsFunnel&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(FunnelDisplayLayoutPicker,{})}),!!isTimeToConvertFunnel&&(0,jsx_runtime.jsx)(ConfigFilter,{children:(0,jsx_runtime.jsx)(FunnelBinsPicker,{})})]})]})}function ConfigFilter(_ref){let{children}=_ref;return(0,jsx_runtime.jsx)("span",{className:"space-x-2 flex items-center text-sm",children:children})}function DecimalPrecisionInput(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{trendsFilter}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps)),{updateInsightFilter}=(0,index_esm.useActions)((0,insightVizDataLogic.Z)(insightProps)),reportChange=(0,index_module.y1)(()=>{posthog_js_dist_module.ZP.capture("decimal places changed",{decimal_places:trendsFilter?.decimalPlaces})},500);return(0,jsx_runtime.jsx)(src.DF,{type:"number",size:"small",step:1,min:0,max:9,defaultValue:lib_utils.z9,value:trendsFilter?.decimalPlaces,onChange:value=>{updateInsightFilter({decimalPlaces:value}),reportChange()},className:"mx-2 mb-1.5"})}var preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx");function ComputationTimeWithRefresh(_ref){let{disableRefresh}=_ref,{lastRefresh,response}=(0,index_esm.useValues)(dataNodeLogic.M),{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{getInsightRefreshButtonDisabledReason}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightProps)),{loadData}=(0,index_esm.useActions)((0,insightDataLogic.S)(insightProps)),disabledReason=getInsightRefreshButtonDisabledReason(),{user}=(0,index_esm.useValues)(userLogic.userLogic),{isDev}=(0,index_esm.useValues)(preflightLogic.preflightLogic),canBypassRefreshDisabled=user?.is_staff||user?.is_impersonated||isDev;return(!function(milliseconds){let[,setTick]=(0,react.useState)(0);(0,react.useEffect)(()=>{let intervalId=setInterval(()=>setTick(state=>state+1),15e3);return()=>clearInterval(intervalId)})}(0),response&&(response.result||response.results))?(0,jsx_runtime.jsxs)("div",{className:"flex items-center text-muted-alt z-10",children:["Computed ",lastRefresh?(0,dayjs.Bv)(lastRefresh).fromNow():"a while ago",!disableRefresh&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"px-1",children:"•"}),(0,jsx_runtime.jsx)(src.u,{title:canBypassRefreshDisabled&&disabledReason?`${disabledReason} (you can bypass this due to dev env / staff permissions)`:void 0,children:(0,jsx_runtime.jsx)(src.rU,{onClick:()=>loadData(!0),className:disabledReason?"opacity-50":"",disabledReason:canBypassRefreshDisabled?"":disabledReason,children:"Refresh"})})]})]}):null}let InsightResultMetadata=_ref=>{let{disableLastComputation,disableLastComputationRefresh}=_ref,{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{samplingFactor}=(0,index_esm.useValues)((0,insightVizDataLogic.Z)(insightProps));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[!disableLastComputation&&(0,jsx_runtime.jsx)(ComputationTimeWithRefresh,{disableRefresh:disableLastComputationRefresh}),samplingFactor?(0,jsx_runtime.jsxs)("span",{className:"text-muted-alt",children:[!disableLastComputation&&(0,jsx_runtime.jsx)("span",{className:"mx-1",children:"•"}),"Results calculated from ",100*samplingFactor,"% of users"]}):null]})};var ResultCustomizationsModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/ResultCustomizationsModal.scss"),ResultCustomizationsModal_default=__webpack_require__.n(ResultCustomizationsModal),ResultCustomizationsModal_options={};ResultCustomizationsModal_options.insert="head",ResultCustomizationsModal_options.singleton=!1,injectStylesIntoStyleTag_default()(ResultCustomizationsModal_default(),ResultCustomizationsModal_options),ResultCustomizationsModal_default().locals;var assert=__webpack_require__("./node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js"),assert_default=__webpack_require__.n(assert),dataThemeLogic=__webpack_require__("./frontend/src/scenes/dataThemeLogic.tsx");function ResultCustomizationsModal_ResultCustomizationsModal(){let{insightProps}=(0,index_esm.useValues)(insightLogic.zm),{modalVisible,dataset,colorToken,resultCustomizationBy}=(0,index_esm.useValues)((0,resultCustomizationsModalLogic.W)(insightProps)),{closeModal,setColorToken,save}=(0,index_esm.useActions)((0,resultCustomizationsModalLogic.W)(insightProps)),{isTrends,isFunnels,querySource}=(0,index_esm.useValues)(insightVizDataLogic.Z),{getTheme}=(0,index_esm.useValues)(dataThemeLogic.Q),theme=getTheme(querySource?.dataColorTheme);return null==dataset||null==theme?null:(0,jsx_runtime.jsxs)(src.fQ,{"data-attr":"legend-entry-modal",isOpen:modalVisible,title:"Customize result color",width:520,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:closeModal,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:save,children:"Save customizations"})]}),onClose:closeModal,children:[(0,jsx_runtime.jsxs)("p",{children:["Query results can be customized to provide a more"," ",(0,jsx_runtime.jsx)("strong",{children:"meaningful appearance for you and your team members"}),". The customizations are also shown on dashboards."]}),isTrends&&(0,jsx_runtime.jsx)(TrendsInfo,{dataset:dataset,resultCustomizationBy:resultCustomizationBy}),isFunnels&&(0,jsx_runtime.jsx)(FunnelsInfo,{dataset:dataset}),(0,jsx_runtime.jsx)("h3",{className:"l4 mt-2 mb-2",children:"Color"}),(0,jsx_runtime.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.keys(theme).map(key=>(0,jsx_runtime.jsx)(ColorGlyphButton,{colorToken:key,selected:key===colorToken,onClick:e=>{e.preventDefault(),e.stopPropagation(),setColorToken(key)}},key))})]})}function TrendsInfo(_ref){let{dataset,resultCustomizationBy}=_ref,{cohorts}=(0,index_esm.useValues)(cohortsModel.Q),{formatPropertyValueForDisplay}=(0,index_esm.useValues)(propertyDefinitionsModel.IP),{breakdownFilter}=(0,index_esm.useValues)(insightVizDataLogic.Z);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dataset.breakdown_value?(0,jsx_runtime.jsxs)("p",{className:"mb-2",children:["You are customizing the appearance of series"," ",(0,jsx_runtime.jsx)("b",{children:(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:dataset.action,allowWrap:!0,showSingleName:!0})})," ","for the breakdown"," ",(0,jsx_runtime.jsx)("b",{children:(0,insights_utils.Cq)(dataset.breakdown_value,breakdownFilter,cohorts,formatPropertyValueForDisplay)}),"."]}):(0,jsx_runtime.jsxs)("p",{className:"mb-2",children:["You are customizing the appearance of series"," ",(0,jsx_runtime.jsx)("b",{children:(0,jsx_runtime.jsx)(EntityFilterInfo.c,{filter:dataset.action,allowWrap:!0,showSingleName:!0})}),"."]}),(0,jsx_runtime.jsxs)("p",{children:["Results are assigned by"," ",resultCustomizationBy===schema.Ru.Position?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["their ",(0,jsx_runtime.jsx)("strong",{children:"rank"})," in the dataset"]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["their ",(0,jsx_runtime.jsx)("strong",{children:"name"})," in the dataset"]}),". You can change this in insight settings."]})]})}function FunnelsInfo(_ref2){let{dataset}=_ref2;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["You are customizing the appearance of the"," ",dataset.breakdown_value?.[0]==="Baseline"?(0,jsx_runtime.jsx)("b",{children:"Baseline"}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("b",{children:dataset.breakdown_value?.[0]})," breakdown"]}),"."]})}function ColorGlyphButton(_ref3){let{colorToken,selected,onClick}=_ref3,{getTheme}=(0,index_esm.useValues)(dataThemeLogic.Q),{querySource}=(0,index_esm.useValues)(insightVizDataLogic.Z),theme=getTheme(querySource?.dataColorTheme),color=theme?.[colorToken];return(0,jsx_runtime.jsx)(src.Jp,{type:selected?"secondary":"tertiary",className:"ResultCustomizationsModal__ColorGlyphButton",onClick:onClick,tooltip:function(color){let{name,group}=function(color){let{r:r1,g:g1,b:b1}=(0,lib_utils.$W)(color),minDistance=null,minColor=null;for(let referenceColor in referenceColors){let{r:r2,g:g2,b:b2}=(0,lib_utils.$W)(referenceColor),distance=Math.sqrt((r2-r1)**2+(g2-g1)**2+(b2-b1)**2);(null===minDistance||distance{if(insightDataLoading)return(0,jsx_runtime.jsx)("div",{className:"flex flex-col flex-1 justify-center items-center p-2",children:(0,jsx_runtime.jsx)(EmptyStates.dU,{queryId:queryId,insightProps:insightProps},queryId)});if(validationError)return(0,jsx_runtime.jsx)(EmptyStates._f,{query:query,detail:validationError});if(activeView===types.dw.FUNNELS){if(!isFunnelWithEnoughSteps)return(0,jsx_runtime.jsx)(EmptyStates.zy,{actionable:!embedded&&insightMode===types.LO.Edit});if(!hasFunnelResults&&!erroredQueryId&&!insightDataLoading)return(0,jsx_runtime.jsx)(EmptyStates.dV,{heading:context?.emptyStateHeading,detail:context?.emptyStateDetail})}return erroredQueryId?(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query,queryId:erroredQueryId}):timedOutQueryId?(0,jsx_runtime.jsx)(EmptyStates.Oj,{queryId:timedOutQueryId}):null})();function renderActiveView(){switch(activeView){case types.dw.TRENDS:return(0,jsx_runtime.jsx)(TrendInsight,{view:types.dw.TRENDS,context:context,embedded:embedded,inSharedMode:inSharedMode});case types.dw.STICKINESS:return(0,jsx_runtime.jsx)(TrendInsight,{view:types.dw.STICKINESS,context:context,embedded:embedded,inSharedMode:inSharedMode});case types.dw.LIFECYCLE:return(0,jsx_runtime.jsx)(TrendInsight,{view:types.dw.LIFECYCLE,context:context,embedded:embedded,inSharedMode:inSharedMode});case types.dw.FUNNELS:return(0,jsx_runtime.jsx)(Funnel_Funnel,{inCardView:embedded,inSharedMode:inSharedMode,showPersonsModal:!inSharedMode});case types.dw.RETENTION:return(0,jsx_runtime.jsx)(RetentionContainer,{context:context,vizSpecificOptions:vizSpecificOptions?.[types.dw.RETENTION],inCardView:embedded,inSharedMode:inSharedMode});case types.dw.PATHS:return(0,jsx_runtime.jsx)(Paths_Paths,{});default:return null}}let showComputationMetadata=!disableLastComputation||!!samplingFactor;return theme?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)(`InsightVizDisplay InsightVizDisplay--type-${activeView.toLowerCase()} ph-no-capture`,!embedded&&"border rounded bg-bg-light"),"data-attr":"insights-graph",children:[disableHeader?null:(0,jsx_runtime.jsx)(InsightDisplayConfig,{}),showingResults&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[!embedded&&(isFunnels||isPaths||showComputationMetadata)&&(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 flex-wrap-reverse border-b",children:[(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-2",children:showComputationMetadata&&(0,jsx_runtime.jsx)(InsightResultMetadata,{disableLastComputation:disableLastComputation,disableLastComputationRefresh:disableLastComputationRefresh})}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[isPaths&&(0,jsx_runtime.jsx)(PathCanvasLabel,{}),isFunnels&&(0,jsx_runtime.jsx)(FunnelCanvasLabel,{})]})]}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("InsightVizDisplay__content",supportsDisplay&&showLegend&&"InsightVizDisplay__content--with-legend"),children:BlockingEmptyState||(supportsDisplay&&showLegend?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"InsightVizDisplay__content__left",children:renderActiveView()}),(0,jsx_runtime.jsx)("div",{className:"InsightVizDisplay__content__right",children:(0,jsx_runtime.jsx)(InsightLegend.y,{})})]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:renderActiveView()}))})]})]}),(0,jsx_runtime.jsx)(ResultCustomizationsModal_ResultCustomizationsModal,{}),isFunnels&&null===erroredQueryId&&null===timedOutQueryId&&isFunnelWithEnoughSteps&&hasFunnelResults&&funnelsFilter?.funnelVizType===types.Ui.Steps&&!disableTable?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h2",{className:"font-semibold text-lg my-4 mx-0",children:"Detailed results"}),(0,jsx_runtime.jsx)(FunnelStepsTable,{})]}):hasDetailedResultsTable&&!disableTable?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[exportContext&&(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between my-4 mx-0",children:[(0,jsx_runtime.jsx)("h2",{className:"font-semibold text-lg m-0",children:"Detailed results"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Export this table",placement:"left",children:(0,jsx_runtime.jsx)(ExportButton.j,{type:"secondary",items:[{export_format:types.P5.CSV,export_context:exportContext},{export_format:types.P5.XLSX,export_context:exportContext}]})})]}),(0,jsx_runtime.jsx)(InsightsTable.z,{isLegend:!0,filterKey:(0,sharedUtils.bk)("new")(insightProps),canEditSeriesNameInline:!trendsFilter?.formula&&insightMode===types.LO.Edit,canCheckUncheckSeries:canEditInsight})]}):null,!disableCorrelationTable&&activeView===types.dw.FUNNELS&&(0,jsx_runtime.jsx)(FunnelCorrelation_FunnelCorrelation,{})]}):null}let insightVizDataNodeKey=insightProps=>`InsightViz.${(0,sharedUtils.bk)("new")(insightProps)}`,insightVizDataCollectionId=(props,fallback)=>{var _ref,_ref2,_props$dataNodeCollec;return null!==(_ref=null!==(_ref2=null!==(_props$dataNodeCollec=props?.dataNodeCollectionId)&&void 0!==_props$dataNodeCollec?_props$dataNodeCollec:props?.dashboardId?.toString())&&void 0!==_ref2?_ref2:props?.dashboardItemId)&&void 0!==_ref?_ref:fallback},uniqueNode=0;function InsightViz_InsightViz_InsightViz(_ref3){var _query$showHeader,_query$showTable,_query$showCorrelatio,_query$showLastComput,_query$showLastComput2,_query$showFilters,_query$showResults,_query$embedded;let{uniqueKey,query,setQuery,context,readOnly,embedded,inSharedMode,filtersOverride,variablesOverride}=_ref3,[key]=(0,react.useState)(()=>`InsightViz.${uniqueKey||uniqueNode++}`),insightProps=context?.insightProps||{dashboardItemId:`new-AdHoc.${key}`,query,setQuery,dataNodeCollectionId:key,filtersOverride,variablesOverride};!insightProps.setQuery&&setQuery&&(insightProps.setQuery=setQuery);let vizKey=insightVizDataNodeKey(insightProps),dataNodeLogicProps={query:query.source,key:vizKey,cachedResults:(0,InsightViz_utils.VB)(insightProps.cachedInsight,query.source),doNotLoad:insightProps.doNotLoad,onData:insightProps.onData,loadPriority:insightProps.loadPriority,dataNodeCollectionId:insightVizDataCollectionId(insightProps,vizKey),filtersOverride,variablesOverride},{insightMode}=(0,index_esm.useValues)(insightSceneLogic.T),isFunnels=(0,utils.Wl)(query.source),isHorizontalAlways=(0,useFeatureFlag.y)("INSIGHT_HORIZONTAL_CONTROLS"),showIfFull=!!query.full,disableHeader=embedded||!(null!==(_query$showHeader=query.showHeader)&&void 0!==_query$showHeader?_query$showHeader:showIfFull),disableTable=embedded||!(null!==(_query$showTable=query.showTable)&&void 0!==_query$showTable?_query$showTable:showIfFull),disableCorrelationTable=embedded||!(null!==(_query$showCorrelatio=query.showCorrelationTable)&&void 0!==_query$showCorrelatio?_query$showCorrelatio:showIfFull),disableLastComputation=embedded||!(null!==(_query$showLastComput=query.showLastComputation)&&void 0!==_query$showLastComput?_query$showLastComput:showIfFull),disableLastComputationRefresh=embedded||!(null!==(_query$showLastComput2=query.showLastComputationRefresh)&&void 0!==_query$showLastComput2?_query$showLastComput2:showIfFull),showingFilters=null!==(_query$showFilters=query.showFilters)&&void 0!==_query$showFilters?_query$showFilters:insightMode===types.LO.Edit,showingResults=null===(_query$showResults=query.showResults)||void 0===_query$showResults||_query$showResults,isEmbedded=embedded||null!==(_query$embedded=query.embedded)&&void 0!==_query$embedded&&_query$embedded,display=(0,jsx_runtime.jsx)(InsightVizDisplay,{insightMode:insightMode,context:context,disableHeader:disableHeader,disableTable:disableTable,disableCorrelationTable:disableCorrelationTable,disableLastComputation:disableLastComputation,disableLastComputationRefresh:disableLastComputationRefresh,showingResults:showingResults,embedded:isEmbedded,inSharedMode:inSharedMode});return(0,jsx_runtime.jsx)(ErrorBoundary.S,{tags:{feature:"InsightViz"},children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:insightLogic.zm,props:insightProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dataNodeLogic.M,props:dataNodeLogicProps,children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:insightVizDataLogic.Z,props:insightProps,children:(0,jsx_runtime.jsxs)("div",{className:isEmbedded?"InsightCard__viz":(0,clsx_m.default)("InsightViz",{"InsightViz--horizontal":isFunnels||isHorizontalAlways}),children:[!readOnly&&(0,jsx_runtime.jsx)(EditorFilters_EditorFilters,{query:query.source,showing:showingFilters,embedded:isEmbedded}),isEmbedded?display:(0,jsx_runtime.jsx)("div",{className:"flex-1 h-full overflow-auto",children:display})]})})})})})}},"./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>AndOrFilterSelect});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function AndOrFilterSelect(_ref){let{onChange,value,topLevelFilter,prefix="Match",suffix=["filter in this group","filters in this group"],disabledReason}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:"flex items-center font-medium",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span",{className:"ml-2",children:prefix}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Yv,{className:"mx-2",size:"small",value:value,onChange:type=>onChange(type),disabledReason:disabledReason,options:[{label:"all",value:_types__WEBPACK_IMPORTED_MODULE_1__.J2.And,labelInMenu:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(SelectOption,{title:"All",description:"Every single filter must match",value:_types__WEBPACK_IMPORTED_MODULE_1__.J2.And,selectedValue:value})},{label:"any",value:_types__WEBPACK_IMPORTED_MODULE_1__.J2.Or,labelInMenu:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(SelectOption,{title:"Any",description:"One or more filters must match",value:_types__WEBPACK_IMPORTED_MODULE_1__.J2.Or,selectedValue:value})}],optionTooltipPlacement:topLevelFilter?"bottom-end":"bottom-start",dropdownMatchSelectWidth:!1}),value===_types__WEBPACK_IMPORTED_MODULE_1__.J2.Or?suffix[0]:suffix[1]]})}let SelectOption=_ref2=>{let{title,description,value,selectedValue}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:"flex p-1 items-center",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:`flex shrink-0 font-bold w-10 h-10 mr-3 justify-center items-center rounded text-xs ${value===selectedValue?"bg-primary text-white":"bg-bg-3000 text-primary-alt"}`,children:value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"font-bold",children:title}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"font-normal",children:description})]})]})}},"./frontend/src/queries/nodes/InsightViz/resultCustomizationsModalLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>resultCustomizationsModalLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_funnels_funnelDataLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/funnels/funnelDataLogic.ts"),scenes_insights_EditorFilters_ResultCustomizationByPicker__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/EditorFilters/ResultCustomizationByPicker.tsx"),scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/insights/insightVizDataLogic.ts"),scenes_insights_sharedUtils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),scenes_insights_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/utils.tsx"),scenes_trends_trendsDataLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/trends/trendsDataLogic.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/schema.ts");let resultCustomizationsModalLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)((0,scenes_insights_sharedUtils__WEBPACK_IMPORTED_MODULE_6__.bk)("new")),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","insights","views","InsightsTable","resultCustomizationsModalLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(props=>({values:[scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_5__.Z,["isTrends","isFunnels","insightFilter"],(0,scenes_trends_trendsDataLogic__WEBPACK_IMPORTED_MODULE_8__.i)(props),["resultCustomizationBy as resultCustomizationByRaw","resultCustomizations as trendsResultCustomizations","getTrendsColorToken"],(0,scenes_funnels_funnelDataLogic__WEBPACK_IMPORTED_MODULE_3__.l)(props),["resultCustomizations as funnelsResultCustomizations","getFunnelsColorToken"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h,["featureFlags"]],actions:[scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_5__.Z,["updateInsightFilter"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({openModal:dataset=>({dataset}),closeModal:!0,setColorToken:token=>({token}),save:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({dataset:[null,{openModal:(_,_ref)=>{let{dataset}=_ref;return dataset},closeModal:()=>null}],localColorToken:[null,{setColorToken:(_,_ref2)=>{let{token}=_ref2;return token},closeModal:()=>null}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({hasInsightColors:[s=>[s.featureFlags],featureFlags=>!!featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_1__.y8.INSIGHT_COLORS]],modalVisible:[s=>[s.dataset],dataset=>null!==dataset],colorToken:[s=>[s.localColorToken,s.colorTokenFromQuery],(localColorToken,colorTokenFromQuery)=>localColorToken||colorTokenFromQuery],colorTokenFromQuery:[s=>[s.isTrends,s.isFunnels,s.getTrendsColorToken,s.getFunnelsColorToken,s.dataset],(isTrends,isFunnels,getTrendsColorToken,getFunnelsColorToken,dataset)=>dataset?isTrends?getTrendsColorToken(dataset):isFunnels?getFunnelsColorToken(dataset):null:null],resultCustomizationBy:[s=>[s.resultCustomizationByRaw],resultCustomizationByRaw=>resultCustomizationByRaw||scenes_insights_EditorFilters_ResultCustomizationByPicker__WEBPACK_IMPORTED_MODULE_4__.j],resultCustomizations:[s=>[s.isTrends,s.isFunnels,s.trendsResultCustomizations,s.funnelsResultCustomizations],(isTrends,isFunnels,trendsResultCustomizations,funnelsResultCustomizations)=>isTrends?trendsResultCustomizations:isFunnels?funnelsResultCustomizations:null]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref3=>{let{actions,values}=_ref3;return{save:()=>{if(null==values.localColorToken||null==values.dataset){actions.closeModal();return}if(values.isTrends){let resultCustomizationKey=(0,scenes_insights_utils__WEBPACK_IMPORTED_MODULE_7__.Xs)(values.resultCustomizationBy,values.dataset);actions.updateInsightFilter({resultCustomizations:{...values.trendsResultCustomizations,[resultCustomizationKey]:{assignmentBy:values.resultCustomizationBy,color:values.localColorToken}}})}if(values.isFunnels){let resultCustomizationKey=(0,scenes_insights_utils__WEBPACK_IMPORTED_MODULE_7__.dI)(values.dataset);actions.updateInsightFilter({resultCustomizations:{...values.funnelsResultCustomizations,[resultCustomizationKey]:{assignmentBy:_queries_schema__WEBPACK_IMPORTED_MODULE_9__.Ru.Value,color:values.localColorToken}}})}actions.closeModal()}}})])},"./frontend/src/queries/nodes/InsightViz/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{xp:()=>getAllEventNames,VB:()=>getCachedResults,tB:()=>getDefaultQuery,ob:()=>getQueryBasedDashboard,Q0:()=>getQueryBasedInsightModel,a2:()=>getQueryFromInsightLike,WX:()=>queryFromFilters,bV:()=>queryFromKind});var fast_deep_equal=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal_default=__webpack_require__.n(fast_deep_equal),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),examples=__webpack_require__("./frontend/src/queries/examples.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let trendsQueryDefault={kind:schema.OH.TrendsQuery,series:[{kind:schema.OH.EventsNode,name:"$pageview",event:"$pageview",math:types.vN.TotalCount}],trendsFilter:{}},funnelsQueryDefault={kind:schema.OH.FunnelsQuery,series:[{kind:schema.OH.EventsNode,name:"$pageview",event:"$pageview"}],funnelsFilter:{funnelVizType:types.Ui.Steps}},retentionQueryDefault={kind:schema.OH.RetentionQuery,retentionFilter:{period:types.xW.Day,totalIntervals:11,targetEntity:{id:"$pageview",name:"$pageview",type:"events"},returningEntity:{id:"$pageview",name:"$pageview",type:"events"},retentionType:"retention_first_time"}},pathsQueryDefault={kind:schema.OH.PathsQuery,pathsFilter:{includeEventTypes:[types.cB.PageView]}},stickinessQueryDefault={kind:schema.OH.StickinessQuery,series:[{kind:schema.OH.EventsNode,name:"$pageview",event:"$pageview",math:types.vN.UniqueUsers}],stickinessFilter:{}},lifecycleQueryDefault={kind:schema.OH.LifecycleQuery,series:[{kind:schema.OH.EventsNode,name:"$pageview",event:"$pageview"}]},nodeKindToDefaultQuery={[schema.OH.TrendsQuery]:trendsQueryDefault,[schema.OH.FunnelsQuery]:funnelsQueryDefault,[schema.OH.RetentionQuery]:retentionQueryDefault,[schema.OH.PathsQuery]:pathsQueryDefault,[schema.OH.StickinessQuery]:stickinessQueryDefault,[schema.OH.LifecycleQuery]:lifecycleQueryDefault};var filtersToQueryNode=__webpack_require__("./frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts");let getAllEventNames=(query,allActions)=>{if(!(0,queries_utils.B8)(query))return[];let allEvents=query.series.flatMap(e=>e.kind==schema.OH.EventsNode?e.event:e.kind==schema.OH.ActionsNode?(0,utils.Nc)(e.id,allActions):void 0);return allEvents.some(e=>null===e)?[]:Array.from(new Set(allEvents.filter(e=>!!e)))},getCachedResults=(cachedInsight,query)=>{let cachedQueryNode;if(cachedInsight&&cachedInsight.query&&(cachedQueryNode=cachedInsight.query,"source"in cachedInsight.query&&(cachedQueryNode=cachedInsight.query.source),fast_deep_equal_default()(cachedQueryNode,query)))return cachedInsight};function getQueryBasedInsightModel(insight){let{filters,...baseInsight}=insight;return{...baseInsight,query:getQueryFromInsightLike(insight)}}function getQueryFromInsightLike(insight){return insight.query?insight.query:insight.filters&&Object.keys(insight.filters).filter(k=>"filter_test_accounts"!=k).length>0?{kind:schema.OH.InsightVizNode,source:(0,filtersToQueryNode.wK)(insight.filters)}:null}let queryFromFilters=filters=>({kind:schema.OH.InsightVizNode,source:(0,filtersToQueryNode.wK)(filters)}),queryFromKind=(kind,filterTestAccountsDefault)=>({kind:schema.OH.InsightVizNode,source:{...nodeKindToDefaultQuery[kind],...filterTestAccountsDefault?{filterTestAccounts:!0}:{}}}),getDefaultQuery=(insightType,filterTestAccountsDefault)=>{if([types.dw.SQL,types.dw.JSON,types.dw.HOG].includes(insightType)){if(insightType===types.dw.JSON)return examples.$R.TotalEventsTable;if(insightType===types.dw.SQL)return examples.$R.DataVisualization;if(insightType===types.dw.HOG)return examples.$R.Hoggonacci}else{if(insightType===types.dw.TRENDS)return queryFromKind(schema.OH.TrendsQuery,filterTestAccountsDefault);if(insightType===types.dw.FUNNELS)return queryFromKind(schema.OH.FunnelsQuery,filterTestAccountsDefault);if(insightType===types.dw.RETENTION)return queryFromKind(schema.OH.RetentionQuery,filterTestAccountsDefault);if(insightType===types.dw.PATHS)return queryFromKind(schema.OH.PathsQuery,filterTestAccountsDefault);else if(insightType===types.dw.STICKINESS)return queryFromKind(schema.OH.StickinessQuery,filterTestAccountsDefault);else if(insightType===types.dw.LIFECYCLE)return queryFromKind(schema.OH.LifecycleQuery,filterTestAccountsDefault)}throw Error("encountered unexpected type for view")},getQueryBasedDashboard=dashboard=>null==dashboard?null:{...dashboard,tiles:dashboard.tiles?.map(tile=>({...tile,...null!=tile.insight?{insight:getQueryBasedInsightModel(tile.insight)}:{}}))}},"./frontend/src/queries/query.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Uu:()=>hogqlQuery,Vp:()=>function queryExportContext(query,methodOptions,refresh){return(0,_utils__WEBPACK_IMPORTED_MODULE_6__.KN)(query)||(0,_utils__WEBPACK_IMPORTED_MODULE_6__.TC)(query)||(0,_utils__WEBPACK_IMPORTED_MODULE_6__.A_)(query)?queryExportContext(query.source,methodOptions,refresh):(0,_utils__WEBPACK_IMPORTED_MODULE_6__.cK)(query)?{path:getPersonsEndpoint(query)}:{source:query}},iM:()=>pollForResults,jr:()=>performQuery,rY:()=>getPersonsEndpoint});var lib_api__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),_schema__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/schema.ts"),_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/utils.ts");let SYNC_ONLY_QUERY_KINDS=["HogQuery","HogQLMetadata","HogQLAutocomplete","DatabaseSchemaQuery","ErrorTrackingQuery"];async function pollForResults(queryId,methodOptions,onPoll){let pollStart=performance.now(),currentDelay=300;for(;performance.now()-pollStart<606e3;){await (0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.gw)(currentDelay,methodOptions?.signal),currentDelay=Math.min(1.25*currentDelay,3e3);try{let statusResponse=(await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.queryStatus.get(queryId,!0)).query_status;if(statusResponse.complete)return statusResponse;onPoll&&onPoll(statusResponse)}catch(e){throw e.detail=e.data?.query_status?.error_message,e}}throw Error("Query timed out")}async function executeQuery(queryNode,methodOptions,refresh,queryId,setPollResponse,filtersOverride,variablesOverride){let pollOnly=arguments.length>7&&void 0!==arguments[7]&&arguments[7],isAsyncQuery=methodOptions?.async!==!1&&!SYNC_ONLY_QUERY_KINDS.includes(queryNode.kind)&&!!lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h.findMounted()?.values.featureFlags?.[lib_constants__WEBPACK_IMPORTED_MODULE_1__.y8.QUERY_ASYNC];if(pollOnly){if(!isAsyncQuery)throw Error("pollOnly is only supported for async queries");if(!queryId)throw Error("pollOnly requires a queryId")}else{let response=await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.query(queryNode,methodOptions,queryId,refresh&&isAsyncQuery?"force_async":isAsyncQuery?"async":refresh,filtersOverride,variablesOverride);if(!(0,_utils__WEBPACK_IMPORTED_MODULE_6__.Hx)(response))return response;if(response.query_status.complete)return response.results;queryId=response.query_status.id}let statusResponse=await pollForResults(queryId,methodOptions,setPollResponse);return statusResponse.results}async function performQuery(queryNode,methodOptions,refresh,queryId,setPollResponse,filtersOverride,variablesOverride){let response,pollOnly=arguments.length>7&&void 0!==arguments[7]&&arguments[7],logParams={},startTime=performance.now();try{return(0,_utils__WEBPACK_IMPORTED_MODULE_6__.cK)(queryNode)?response=await lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.get(getPersonsEndpoint(queryNode),methodOptions):(response=await executeQuery(queryNode,methodOptions,refresh,queryId,setPollResponse,filtersOverride,variablesOverride,pollOnly),(0,_utils__WEBPACK_IMPORTED_MODULE_6__.Vf)(queryNode)&&response&&"object"==typeof response&&(logParams.clickhouse_sql=response?.clickhouse)),posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("query completed",{query:queryNode,queryId,duration:performance.now()-startTime,...logParams}),response}catch(e){throw posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("query failed",{query:queryNode,queryId,duration:performance.now()-startTime,...logParams}),e}}function getPersonsEndpoint(query){let params={properties:[...query.fixedProperties||[],...query.properties||[]],...query.search?{search:query.search}:{},...query.distinctId?{distinct_id:query.distinctId}:{},...query.limit?{limit:query.limit}:{},...query.offset?{offset:query.offset}:{}};return query.cohort?lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.cohorts.determineListUrl(query.cohort,params):lib_api__WEBPACK_IMPORTED_MODULE_0__.ZP.persons.determineListUrl(params)}async function hogqlQuery(queryString,values){return await performQuery({kind:_schema__WEBPACK_IMPORTED_MODULE_5__.OH.HogQLQuery,query:queryString,values})}},"./frontend/src/queries/schema.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$V:()=>insightActorsQueryOptionsResponseKeys,AF:()=>STICKINESS_FILTER_PROPERTIES,F5:()=>CustomChannelField,GI:()=>WebStatsBreakdown,IG:()=>AlertConditionType,KC:()=>AssistantEventType,Lm:()=>SessionAttributionGroupBy,OH:()=>NodeKind,PP:()=>AssistantGenerationStatusType,Ru:()=>ResultCustomizationBy,Z9:()=>AlertState,aV:()=>InsightThresholdType,fS:()=>FunnelCorrelationResultsType,k:()=>DefaultChannelTypes,oU:()=>HogLanguage,pj:()=>AssistantMessageType,q7:()=>AlertCalculationInterval,sk:()=>ExperimentSignificanceCode,tt:()=>TRENDS_FILTER_PROPERTIES,wk:()=>CustomChannelOperator}),__webpack_require__("./frontend/src/types.ts");let NodeKind=function(NodeKind){return NodeKind.EventsNode="EventsNode",NodeKind.ActionsNode="ActionsNode",NodeKind.DataWarehouseNode="DataWarehouseNode",NodeKind.EventsQuery="EventsQuery",NodeKind.PersonsNode="PersonsNode",NodeKind.HogQuery="HogQuery",NodeKind.HogQLQuery="HogQLQuery",NodeKind.HogQLMetadata="HogQLMetadata",NodeKind.HogQLAutocomplete="HogQLAutocomplete",NodeKind.ActorsQuery="ActorsQuery",NodeKind.FunnelsActorsQuery="FunnelsActorsQuery",NodeKind.FunnelCorrelationActorsQuery="FunnelCorrelationActorsQuery",NodeKind.SessionsTimelineQuery="SessionsTimelineQuery",NodeKind.RecordingsQuery="RecordingsQuery",NodeKind.SessionAttributionExplorerQuery="SessionAttributionExplorerQuery",NodeKind.ErrorTrackingQuery="ErrorTrackingQuery",NodeKind.DataTableNode="DataTableNode",NodeKind.DataVisualizationNode="DataVisualizationNode",NodeKind.SavedInsightNode="SavedInsightNode",NodeKind.InsightVizNode="InsightVizNode",NodeKind.TrendsQuery="TrendsQuery",NodeKind.FunnelsQuery="FunnelsQuery",NodeKind.RetentionQuery="RetentionQuery",NodeKind.PathsQuery="PathsQuery",NodeKind.StickinessQuery="StickinessQuery",NodeKind.LifecycleQuery="LifecycleQuery",NodeKind.InsightActorsQuery="InsightActorsQuery",NodeKind.InsightActorsQueryOptions="InsightActorsQueryOptions",NodeKind.FunnelCorrelationQuery="FunnelCorrelationQuery",NodeKind.WebOverviewQuery="WebOverviewQuery",NodeKind.WebStatsTableQuery="WebStatsTableQuery",NodeKind.WebExternalClicksTableQuery="WebExternalClicksTableQuery",NodeKind.WebGoalsQuery="WebGoalsQuery",NodeKind.ExperimentFunnelsQuery="ExperimentFunnelsQuery",NodeKind.ExperimentTrendsQuery="ExperimentTrendsQuery",NodeKind.DatabaseSchemaQuery="DatabaseSchemaQuery",NodeKind.SuggestedQuestionsQuery="SuggestedQuestionsQuery",NodeKind.TeamTaxonomyQuery="TeamTaxonomyQuery",NodeKind.EventTaxonomyQuery="EventTaxonomyQuery",NodeKind.ActorsPropertyTaxonomyQuery="ActorsPropertyTaxonomyQuery",NodeKind}({}),HogLanguage=function(HogLanguage){return HogLanguage.hog="hog",HogLanguage.hogJson="hogJson",HogLanguage.hogQL="hogQL",HogLanguage.hogQLExpr="hogQLExpr",HogLanguage.hogTemplate="hogTemplate",HogLanguage}({}),ResultCustomizationBy=function(ResultCustomizationBy){return ResultCustomizationBy.Value="value",ResultCustomizationBy.Position="position",ResultCustomizationBy}({}),TRENDS_FILTER_PROPERTIES=new Set(["smoothingIntervals","formula","display","showLegend","breakdown_histogram_bin_count","aggregationAxisFormat","aggregationAxisPrefix","aggregationAxisPostfix","decimalPlaces","showValuesOnSeries","showLabelsOnSeries","showPercentStackView","yAxisScaleType","hiddenLegendIndexes"]),STICKINESS_FILTER_PROPERTIES=new Set(["display","showLegend","showValuesOnSeries","hiddenLegendIndexes"]),WebStatsBreakdown=function(WebStatsBreakdown){return WebStatsBreakdown.Page="Page",WebStatsBreakdown.InitialPage="InitialPage",WebStatsBreakdown.ExitPage="ExitPage",WebStatsBreakdown.ExitClick="ExitClick",WebStatsBreakdown.InitialChannelType="InitialChannelType",WebStatsBreakdown.InitialReferringDomain="InitialReferringDomain",WebStatsBreakdown.InitialUTMSource="InitialUTMSource",WebStatsBreakdown.InitialUTMCampaign="InitialUTMCampaign",WebStatsBreakdown.InitialUTMMedium="InitialUTMMedium",WebStatsBreakdown.InitialUTMTerm="InitialUTMTerm",WebStatsBreakdown.InitialUTMContent="InitialUTMContent",WebStatsBreakdown.InitialUTMSourceMediumCampaign="InitialUTMSourceMediumCampaign",WebStatsBreakdown.Browser="Browser",WebStatsBreakdown.OS="OS",WebStatsBreakdown.Viewport="Viewport",WebStatsBreakdown.DeviceType="DeviceType",WebStatsBreakdown.Country="Country",WebStatsBreakdown.Region="Region",WebStatsBreakdown.City="City",WebStatsBreakdown.Timezone="Timezone",WebStatsBreakdown.Language="Language",WebStatsBreakdown}({}),SessionAttributionGroupBy=function(SessionAttributionGroupBy){return SessionAttributionGroupBy.ChannelType="ChannelType",SessionAttributionGroupBy.Medium="Medium",SessionAttributionGroupBy.Source="Source",SessionAttributionGroupBy.Campaign="Campaign",SessionAttributionGroupBy.AdIds="AdIds",SessionAttributionGroupBy.ReferringDomain="ReferringDomain",SessionAttributionGroupBy.InitialURL="InitialURL",SessionAttributionGroupBy}({}),ExperimentSignificanceCode=function(ExperimentSignificanceCode){return ExperimentSignificanceCode.Significant="significant",ExperimentSignificanceCode.NotEnoughExposure="not_enough_exposure",ExperimentSignificanceCode.LowWinProbability="low_win_probability",ExperimentSignificanceCode.HighLoss="high_loss",ExperimentSignificanceCode.HighPValue="high_p_value",ExperimentSignificanceCode}({}),FunnelCorrelationResultsType=function(FunnelCorrelationResultsType){return FunnelCorrelationResultsType.Events="events",FunnelCorrelationResultsType.Properties="properties",FunnelCorrelationResultsType.EventWithProperties="event_with_properties",FunnelCorrelationResultsType}({}),insightActorsQueryOptionsResponseKeys=["day","status","interval","breakdown","breakdowns","series","compare"],InsightThresholdType=function(InsightThresholdType){return InsightThresholdType.ABSOLUTE="absolute",InsightThresholdType.PERCENTAGE="percentage",InsightThresholdType}({}),AlertConditionType=function(AlertConditionType){return AlertConditionType.ABSOLUTE_VALUE="absolute_value",AlertConditionType.RELATIVE_INCREASE="relative_increase",AlertConditionType.RELATIVE_DECREASE="relative_decrease",AlertConditionType}({}),AlertState=function(AlertState){return AlertState.FIRING="Firing",AlertState.NOT_FIRING="Not firing",AlertState.ERRORED="Errored",AlertState.SNOOZED="Snoozed",AlertState}({}),AlertCalculationInterval=function(AlertCalculationInterval){return AlertCalculationInterval.HOURLY="hourly",AlertCalculationInterval.DAILY="daily",AlertCalculationInterval.WEEKLY="weekly",AlertCalculationInterval.MONTHLY="monthly",AlertCalculationInterval}({}),AssistantMessageType=function(AssistantMessageType){return AssistantMessageType.Human="human",AssistantMessageType.Assistant="ai",AssistantMessageType.Reasoning="ai/reasoning",AssistantMessageType.Visualization="ai/viz",AssistantMessageType.Failure="ai/failure",AssistantMessageType.Router="ai/router",AssistantMessageType}({}),AssistantEventType=function(AssistantEventType){return AssistantEventType.Status="status",AssistantEventType.Message="message",AssistantEventType.Conversation="conversation",AssistantEventType}({}),AssistantGenerationStatusType=function(AssistantGenerationStatusType){return AssistantGenerationStatusType.Acknowledged="ack",AssistantGenerationStatusType.GenerationError="generation_error",AssistantGenerationStatusType}({}),CustomChannelField=function(CustomChannelField){return CustomChannelField.UTMSource="utm_source",CustomChannelField.UTMMedium="utm_medium",CustomChannelField.UTMCampaign="utm_campaign",CustomChannelField.ReferringDomain="referring_domain",CustomChannelField}({}),CustomChannelOperator=function(CustomChannelOperator){return CustomChannelOperator.Exact="exact",CustomChannelOperator.IsNot="is_not",CustomChannelOperator.IsSet="is_set",CustomChannelOperator.IsNotSet="is_not_set",CustomChannelOperator.IContains="icontains",CustomChannelOperator.NotIContains="not_icontains",CustomChannelOperator.Regex="regex",CustomChannelOperator.NotRegex="not_regex",CustomChannelOperator}({}),DefaultChannelTypes=function(DefaultChannelTypes){return DefaultChannelTypes.CrossNetwork="Cross Network",DefaultChannelTypes.PaidSearch="Paid Search",DefaultChannelTypes.PaidSocial="Paid Social",DefaultChannelTypes.PaidVideo="Paid Video",DefaultChannelTypes.PaidShopping="Paid Shopping",DefaultChannelTypes.PaidUnknown="Paid Unknown",DefaultChannelTypes.Direct="Direct",DefaultChannelTypes.OrganicSearch="Organic Search",DefaultChannelTypes.OrganicSocial="Organic Social",DefaultChannelTypes.OrganicVideo="Organic Video",DefaultChannelTypes.OrganicShopping="Organic Shopping",DefaultChannelTypes.Push="Push",DefaultChannelTypes.SMS="SMS",DefaultChannelTypes.Audio="Audio",DefaultChannelTypes.Email="Email",DefaultChannelTypes.Referral="Referral",DefaultChannelTypes.Affiliate="Affiliate",DefaultChannelTypes.Unknown="Unknown",DefaultChannelTypes}({})},"./frontend/src/queries/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AU:()=>escapePropertyAsHogQlIdentifier,AV:()=>isValidBreakdown,A_:()=>isDataVisualizationNode,B8:()=>isInsightQueryWithSeries,CN:()=>isInsightQueryWithBreakdown,DM:()=>isInsightQueryWithCompare,E0:()=>isSavedInsightNode,GD:()=>isHogQuery,Hx:()=>isAsyncResponse,I5:()=>isRetentionQuery,Ii:()=>isErrorTrackingQuery,K9:()=>filterForQuery,KJ:()=>containsHogQLQuery,KN:()=>isInsightVizNode,Km:()=>getBreakdown,Ku:()=>isWebStatsTableQuery,L3:()=>dateRangeFor,LL:()=>getShowValuesOnSeries,NR:()=>getShowLegend,NS:()=>isActorsQuery,Qp:()=>isPathsQuery,R_:()=>taxonomicEventFilterToHogQL,Rh:()=>filterKeyForQuery,SO:()=>taxonomicPersonFilterToHogQL,Sy:()=>isSessionAttributionExplorerQuery,TC:()=>isDataTableNode,Th:()=>getResultCustomizationBy,Tw:()=>isHogQlAggregation,VU:()=>isActionsNode,Vf:()=>isHogQLQuery,Vr:()=>isLifecycleQuery,Wl:()=>isFunnelsQuery,Yg:()=>isInsightQueryNode,ZS:()=>getInterval,_x:()=>isWebExternalClicksQuery,a5:()=>isInsightActorsQuery,a7:()=>isInsightQueryWithDisplay,ay:()=>getShowPercentStackView,cK:()=>isPersonsNode,cT:()=>isEventsNode,gU:()=>getSeries,gV:()=>isNodeWithSource,go:()=>trimQuotes,hX:()=>getShowLabelsOnSeries,hr:()=>getShowAlertThresholdLines,kX:()=>isTrendsQuery,lC:()=>getCompareFilter,n1:()=>nodeKindToFilterProperty,nI:()=>getDisplay,oX:()=>isDataWarehouseNode,ou:()=>supportsPercentStackView,pT:()=>getFormula,rz:()=>isEventsQuery,vD:()=>isWebOverviewQuery,vy:()=>isStickinessQuery,wd:()=>isQueryForGroup,yL:()=>isWebGoalsQuery,zP:()=>hogql,ze:()=>getYAxisScaleType});var lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/dayjs.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),_queries_schema__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/schema.ts"),_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/types.ts");function isNodeWithSource(node){return!!node&&(isDataTableNode(node)||isDataVisualizationNode(node)||isInsightVizNode(node))}function isEventsNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.EventsNode}function isEventsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.EventsQuery}function isActionsNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.ActionsNode}function isDataWarehouseNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.DataWarehouseNode}function isPersonsNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.PersonsNode}function isActorsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.ActorsQuery}function isInsightActorsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.InsightActorsQuery}function isDataTableNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.DataTableNode}function isDataVisualizationNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.DataVisualizationNode}function isSavedInsightNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.SavedInsightNode}function isInsightVizNode(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.InsightVizNode}function isHogQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.HogQuery}function isHogQLQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.HogQLQuery}function isWebOverviewQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.WebOverviewQuery}function isWebStatsTableQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.WebStatsTableQuery}function isWebExternalClicksQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.WebExternalClicksTableQuery}function isWebGoalsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.WebGoalsQuery}function isSessionAttributionExplorerQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.SessionAttributionExplorerQuery}function isErrorTrackingQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.ErrorTrackingQuery}function containsHogQLQuery(node){return!!node&&(isHogQLQuery(node)||isNodeWithSource(node)&&isHogQLQuery(node.source))}function isTrendsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.TrendsQuery}function isFunnelsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.FunnelsQuery}function isRetentionQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.RetentionQuery}function isPathsQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.PathsQuery}function isStickinessQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.StickinessQuery}function isLifecycleQuery(node){return node?.kind===_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.LifecycleQuery}function isInsightQueryWithDisplay(node){return isTrendsQuery(node)||isStickinessQuery(node)}function isInsightQueryWithBreakdown(node){return isTrendsQuery(node)||isFunnelsQuery(node)}function isInsightQueryWithCompare(node){return isTrendsQuery(node)||isStickinessQuery(node)}function isQueryForGroup(query){return isActorsQuery(query)&&isInsightActorsQuery(query.source)&&isRetentionQuery(query.source.source)&&void 0!==query.source.source.aggregation_group_type_index}function isAsyncResponse(response){return"query_status"in response&&response.query_status}function isInsightQueryWithSeries(node){return isTrendsQuery(node)||isFunnelsQuery(node)||isStickinessQuery(node)||isLifecycleQuery(node)}function isInsightQueryNode(node){return isTrendsQuery(node)||isFunnelsQuery(node)||isRetentionQuery(node)||isPathsQuery(node)||isStickinessQuery(node)||isLifecycleQuery(node)}function dateRangeFor(node){return isInsightVizNode(node)?node.source.dateRange:isInsightQueryNode(node)?node.dateRange:void(isActionsNode(node)||isEventsNode(node)||isPersonsNode(node)||isDataTableNode(node))}let getInterval=query=>{if(isInsightQueryWithSeries(query))return query.interval},getDisplay=query=>isStickinessQuery(query)?query.stickinessFilter?.display:isTrendsQuery(query)?query.trendsFilter?.display:void 0,getFormula=query=>{if(isTrendsQuery(query))return query.trendsFilter?.formula},getSeries=query=>{if(isInsightQueryWithSeries(query))return query.series},getBreakdown=query=>{if(isInsightQueryWithBreakdown(query))return query.breakdownFilter},getCompareFilter=query=>{if(isInsightQueryWithCompare(query))return query.compareFilter},getShowLegend=query=>isStickinessQuery(query)?query.stickinessFilter?.showLegend:isTrendsQuery(query)?query.trendsFilter?.showLegend:isLifecycleQuery(query)?query.lifecycleFilter?.showLegend:void 0,getShowAlertThresholdLines=query=>{if(isTrendsQuery(query))return query.trendsFilter?.showAlertThresholdLines},getShowLabelsOnSeries=query=>{if(isTrendsQuery(query))return query.trendsFilter?.showLabelsOnSeries},getShowValuesOnSeries=query=>isLifecycleQuery(query)?query.lifecycleFilter?.showValuesOnSeries:isStickinessQuery(query)?query.stickinessFilter?.showValuesOnSeries:isTrendsQuery(query)?query.trendsFilter?.showValuesOnSeries:void 0,getYAxisScaleType=query=>{if(isTrendsQuery(query))return query.trendsFilter?.yAxisScaleType},getResultCustomizationBy=query=>{if(isTrendsQuery(query))return query.trendsFilter?.resultCustomizationBy},supportsPercentStackView=q=>isTrendsQuery(q)&&lib_constants__WEBPACK_IMPORTED_MODULE_1__.oA.includes(getDisplay(q)||_types__WEBPACK_IMPORTED_MODULE_5__.Qb.ActionsLineGraph),getShowPercentStackView=query=>supportsPercentStackView(query)&&query?.trendsFilter?.showPercentStackView,nodeKindToFilterProperty={[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.TrendsQuery]:"trendsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.FunnelsQuery]:"funnelsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.RetentionQuery]:"retentionFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.PathsQuery]:"pathsFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.StickinessQuery]:"stickinessFilter",[_queries_schema__WEBPACK_IMPORTED_MODULE_4__.OH.LifecycleQuery]:"lifecycleFilter"};function filterKeyForQuery(node){return nodeKindToFilterProperty[node.kind]}function filterForQuery(node){let filterProperty=nodeKindToFilterProperty[node.kind];return node[filterProperty]}function isQuoted(identifier){return identifier.startsWith('"')&&identifier.endsWith('"')||identifier.startsWith("`")&&identifier.endsWith("`")}function trimQuotes(identifier){return isQuoted(identifier)?identifier.slice(1,-1):identifier}function escapePropertyAsHogQlIdentifier(identifier){return identifier.match(/^[A-Za-z_$][A-Za-z0-9_$]*$/)||isQuoted(identifier)?identifier:identifier.includes('"')?`\`${identifier}\``:`"${identifier}"`}function taxonomicEventFilterToHogQL(groupType,value){return groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.EventProperties?`properties.${escapePropertyAsHogQlIdentifier(String(value))}`:groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.PersonProperties?`person.properties.${escapePropertyAsHogQlIdentifier(String(value))}`:groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.EventFeatureFlags?`properties.${escapePropertyAsHogQlIdentifier(String(value))}`:groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.HogQLExpression&&value?String(value):null}function taxonomicPersonFilterToHogQL(groupType,value){return groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.PersonProperties?`properties.${escapePropertyAsHogQlIdentifier(String(value))}`:groupType===lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.HogQLExpression&&value?String(value):null}function isHogQlAggregation(hogQl){return hogQl.includes("count(")||hogQl.includes("any(")||hogQl.includes("sum(")||hogQl.includes("avg(")||hogQl.includes("min(")||hogQl.includes("max(")}function hogql(strings){for(var _len=arguments.length,values=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)values[_key-1]=arguments[_key];return strings.reduce((acc,str,i)=>acc+str+(i0))}hogql.identifier=function(identifier){return{__hogql_identifier:!0,identifier}}},"./frontend/src/scenes/App.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>App});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),useThemedHtml=__webpack_require__("./frontend/src/lib/hooks/useThemedHtml.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),apiStatusLogic=__webpack_require__("./frontend/src/lib/logic/apiStatusLogic.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),react_toastify_esm=__webpack_require__("./node_modules/.pnpm/react-toastify@8.2.0_react-dom@18.2.0_react@18.2.0/node_modules/react-toastify/dist/react-toastify.esm.js"),scenes=__webpack_require__("./frontend/src/scenes/scenes.ts"),sceneTypes=__webpack_require__("./frontend/src/scenes/sceneTypes.ts");let appScenes={[sceneTypes.x.Error404]:()=>({default:scenes.DD[sceneTypes.x.Error404].component}),[sceneTypes.x.ErrorNetwork]:()=>({default:scenes.DD[sceneTypes.x.ErrorNetwork].component}),[sceneTypes.x.ErrorProjectUnavailable]:()=>({default:scenes.DD[sceneTypes.x.ErrorProjectUnavailable].component}),[sceneTypes.x.Dashboards]:()=>__webpack_require__.e(47988).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/dashboard/dashboards/Dashboards.tsx")),[sceneTypes.x.Dashboard]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/dashboard/Dashboard.tsx")),[sceneTypes.x.Insight]:()=>__webpack_require__.e(56818).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/insights/InsightScene.tsx")),[sceneTypes.x.WebAnalytics]:()=>__webpack_require__.e(33876).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/web-analytics/WebAnalyticsScene.tsx")),[sceneTypes.x.Cohort]:()=>__webpack_require__.e(80801).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/cohorts/Cohort.tsx")),[sceneTypes.x.DataManagement]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-management/DataManagementScene.tsx")),[sceneTypes.x.Activity]:()=>__webpack_require__.e(71073).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/activity/ActivityScene.tsx")),[sceneTypes.x.EventDefinition]:()=>__webpack_require__.e(7215).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-management/definition/DefinitionView.tsx")),[sceneTypes.x.EventDefinitionEdit]:()=>__webpack_require__.e(17066).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-management/definition/DefinitionEdit.tsx")),[sceneTypes.x.PropertyDefinition]:()=>__webpack_require__.e(7215).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-management/definition/DefinitionView.tsx")),[sceneTypes.x.PropertyDefinitionEdit]:()=>__webpack_require__.e(17066).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-management/definition/DefinitionEdit.tsx")),[sceneTypes.x.Replay]:()=>__webpack_require__.e(39134).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/session-recordings/SessionRecordings.tsx")),[sceneTypes.x.ReplaySingle]:()=>__webpack_require__.e(82429).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/session-recordings/detail/SessionRecordingDetail.tsx")),[sceneTypes.x.ReplayPlaylist]:()=>__webpack_require__.e(79166).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.tsx")),[sceneTypes.x.ReplayFilePlayback]:()=>__webpack_require__.e(50297).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene.tsx")),[sceneTypes.x.PersonsManagement]:()=>__webpack_require__.e(72154).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/persons-management/PersonsManagementScene.tsx")),[sceneTypes.x.Person]:()=>__webpack_require__.e(13442).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/persons/PersonScene.tsx")),[sceneTypes.x.PipelineNodeNew]:()=>Promise.all([__webpack_require__.e(33502),__webpack_require__.e(56626),__webpack_require__.e(30885),__webpack_require__.e(19745)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/pipeline/PipelineNodeNew.tsx")),[sceneTypes.x.Pipeline]:()=>__webpack_require__.e(49284).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/pipeline/Pipeline.tsx")),[sceneTypes.x.PipelineNode]:()=>Promise.all([__webpack_require__.e(33502),__webpack_require__.e(30885),__webpack_require__.e(76282)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/pipeline/PipelineNode.tsx")),[sceneTypes.x.Group]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/groups/Group.tsx")),[sceneTypes.x.Action]:()=>__webpack_require__.e(61121).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/actions/Action.tsx")),[sceneTypes.x.Experiments]:()=>__webpack_require__.e(70163).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/experiments/Experiments.tsx")),[sceneTypes.x.ExperimentsSavedMetrics]:()=>__webpack_require__.e(59189).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/experiments/SavedMetrics/SavedMetrics.tsx")),[sceneTypes.x.ExperimentsSavedMetric]:()=>__webpack_require__.e(16801).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/experiments/SavedMetrics/SavedMetric.tsx")),[sceneTypes.x.Experiment]:()=>__webpack_require__.e(67474).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/experiments/Experiment.tsx")),[sceneTypes.x.FeatureFlags]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/feature-flags/FeatureFlags.tsx")),[sceneTypes.x.FeatureManagement]:()=>__webpack_require__.e(13474).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/feature-flags/FeatureManagement.tsx")),[sceneTypes.x.FeatureFlag]:()=>__webpack_require__.e(73221).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/feature-flags/FeatureFlag.tsx")),[sceneTypes.x.EarlyAccessFeatures]:()=>__webpack_require__.e(79617).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/early-access-features/EarlyAccessFeatures.tsx")),[sceneTypes.x.EarlyAccessFeature]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx")),[sceneTypes.x.ErrorTracking]:()=>Promise.all([__webpack_require__.e(61473),__webpack_require__.e(61406)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/error-tracking/ErrorTrackingScene.tsx")),[sceneTypes.x.ErrorTrackingConfiguration]:()=>__webpack_require__.e(76368).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/error-tracking/ErrorTrackingConfigurationScene.tsx")),[sceneTypes.x.ErrorTrackingIssue]:()=>Promise.all([__webpack_require__.e(61473),__webpack_require__.e(45419)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/error-tracking/ErrorTrackingIssueScene.tsx")),[sceneTypes.x.Surveys]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/surveys/Surveys.tsx")),[sceneTypes.x.Survey]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/surveys/Survey.tsx")),[sceneTypes.x.CustomCss]:()=>__webpack_require__.e(17170).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/themes/CustomCssScene.tsx")),[sceneTypes.x.SurveyTemplates]:()=>__webpack_require__.e(65982).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/surveys/SurveyTemplates.tsx")),[sceneTypes.x.DataWarehouse]:()=>__webpack_require__.e(89448).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-warehouse/external/DataWarehouseExternalScene.tsx")),[sceneTypes.x.SQLEditor]:()=>Promise.all([__webpack_require__.e(58453),__webpack_require__.e(23162)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-warehouse/editor/EditorScene.tsx")),[sceneTypes.x.DataWarehouseTable]:()=>Promise.all([__webpack_require__.e(56626),__webpack_require__.e(50769)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-warehouse/new/NewSourceWizard.tsx")),[sceneTypes.x.DataWarehouseExternal]:()=>__webpack_require__.e(89448).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-warehouse/external/DataWarehouseExternalScene.tsx")),[sceneTypes.x.DataWarehouseRedirect]:()=>__webpack_require__.e(93836).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/data-warehouse/redirect/DataWarehouseRedirectScene.tsx")),[sceneTypes.x.OrganizationCreateFirst]:()=>__webpack_require__.e(83082).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/organization/Create/index.tsx")),[sceneTypes.x.OrganizationCreationConfirm]:()=>__webpack_require__.e(13077).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/organization/ConfirmOrganization/ConfirmOrganization.tsx")),[sceneTypes.x.ProjectHomepage]:()=>__webpack_require__.e(90853).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/project-homepage/ProjectHomepage.tsx")),[sceneTypes.x.Max]:()=>__webpack_require__.e(98095).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/max/Max.tsx")),[sceneTypes.x.ProjectCreateFirst]:()=>__webpack_require__.e(99203).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/project/Create/index.tsx")),[sceneTypes.x.SystemStatus]:()=>__webpack_require__.e(62983).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/instance/SystemStatus/index.tsx")),[sceneTypes.x.ToolbarLaunch]:()=>__webpack_require__.e(35305).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/toolbar-launch/ToolbarLaunch.tsx")),[sceneTypes.x.Site]:()=>__webpack_require__.e(87519).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/sites/Site.tsx")),[sceneTypes.x.AsyncMigrations]:()=>__webpack_require__.e(90891).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/instance/AsyncMigrations/AsyncMigrations.tsx")),[sceneTypes.x.DeadLetterQueue]:()=>__webpack_require__.e(22682).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/instance/DeadLetterQueue/DeadLetterQueue.tsx")),[sceneTypes.x.PreflightCheck]:()=>__webpack_require__.e(49793).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/PreflightCheck/PreflightCheck.tsx")),[sceneTypes.x.Signup]:()=>__webpack_require__.e(92437).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/signup/SignupContainer.tsx")),[sceneTypes.x.InviteSignup]:()=>__webpack_require__.e(81896).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/InviteSignup.tsx")),[sceneTypes.x.Billing]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/billing/Billing.tsx")),[sceneTypes.x.BillingAuthorizationStatus]:()=>__webpack_require__.e(76410).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/billing/AuthorizationStatus.tsx")),[sceneTypes.x.Login]:()=>__webpack_require__.e(64353).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/Login.tsx")),[sceneTypes.x.Login2FA]:()=>__webpack_require__.e(39453).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/Login2FA.tsx")),[sceneTypes.x.SavedInsights]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/saved-insights/SavedInsights.tsx")),[sceneTypes.x.PasswordReset]:()=>__webpack_require__.e(99954).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/PasswordReset.tsx")),[sceneTypes.x.PasswordResetComplete]:()=>__webpack_require__.e(87057).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/PasswordResetComplete.tsx")),[sceneTypes.x.Unsubscribe]:()=>__webpack_require__.e(14929).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/Unsubscribe/Unsubscribe.tsx")),[sceneTypes.x.IntegrationsRedirect]:()=>__webpack_require__.e(1157).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/IntegrationsRedirect/IntegrationsRedirect.tsx")),[sceneTypes.x.DebugQuery]:()=>__webpack_require__.e(34551).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/debug/DebugScene.tsx")),[sceneTypes.x.DebugHog]:()=>__webpack_require__.e(38895).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/debug/hog/HogRepl.tsx")),[sceneTypes.x.VerifyEmail]:()=>__webpack_require__.e(88754).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.tsx")),[sceneTypes.x.Notebooks]:()=>__webpack_require__.e(12567).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/notebooks/NotebooksScene.tsx")),[sceneTypes.x.Notebook]:()=>__webpack_require__.e(43496).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/notebooks/NotebookScene.tsx")),[sceneTypes.x.Canvas]:()=>__webpack_require__.e(81469).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/notebooks/NotebookCanvasScene.tsx")),[sceneTypes.x.Products]:()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/products/Products.tsx")),[sceneTypes.x.Onboarding]:()=>Promise.all([__webpack_require__.e(56626),__webpack_require__.e(75643)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/onboarding/Onboarding.tsx")),[sceneTypes.x.Settings]:()=>__webpack_require__.e(96866).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/settings/SettingsScene.tsx")),[sceneTypes.x.MoveToPostHogCloud]:()=>__webpack_require__.e(91302).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/moveToPostHogCloud/MoveToPostHogCloud.tsx")),[sceneTypes.x.Heatmaps]:()=>Promise.all([__webpack_require__.e(75576),__webpack_require__.e(12951)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/heatmaps/HeatmapsScene.tsx")),[sceneTypes.x.SessionAttributionExplorer]:()=>__webpack_require__.e(35538).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene.tsx")),[sceneTypes.x.MessagingProviders]:()=>Promise.all([__webpack_require__.e(33502),__webpack_require__.e(76668)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/messaging/Providers.tsx")),[sceneTypes.x.MessagingBroadcasts]:()=>Promise.all([__webpack_require__.e(33502),__webpack_require__.e(41031)]).then(__webpack_require__.bind(__webpack_require__,"./frontend/src/scenes/messaging/Broadcasts.tsx"))};var organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),sceneLogic=__webpack_require__("./frontend/src/scenes/sceneLogic.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),ErrorBoundary=__webpack_require__("./frontend/src/layout/ErrorBoundary/index.ts"),GlobalModals=__webpack_require__("./frontend/src/layout/GlobalModals.tsx"),breadcrumbsLogic=__webpack_require__("./frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.tsx"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Navigation=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/Navigation.scss"),Navigation_default=__webpack_require__.n(Navigation),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Navigation_default(),options),Navigation_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function BillingAlertsV2(){let{billingAlert}=(0,index_esm.useValues)(billingLogic.kr),{reportBillingAlertShown,reportBillingAlertActionClicked}=(0,index_esm.useActions)(billingLogic.kr),{currentLocation}=(0,index_esm.useValues)(lib.router),[alertHidden,setAlertHidden]=(0,react.useState)(!1);if((0,react.useEffect)(()=>{billingAlert?.pathName&¤tLocation.pathname!==billingAlert?.pathName?setAlertHidden(!0):setAlertHidden(!1),billingAlert&&reportBillingAlertShown(billingAlert)},[billingAlert,currentLocation]),!billingAlert||alertHidden)return null;let showButton=billingAlert.action||billingAlert.contactSupport||currentLocation.pathname!==urls.j.organizationBilling(),buttonProps=billingAlert.action?billingAlert.action:billingAlert.contactSupport?{to:"mailto:sales@posthog.com",children:billingAlert.buttonCTA||"Contact support",onClick:()=>reportBillingAlertActionClicked(billingAlert)}:{to:urls.j.organizationBilling(),children:"Manage billing",onClick:()=>reportBillingAlertActionClicked(billingAlert)};return(0,jsx_runtime.jsx)("div",{className:"my-4",children:(0,jsx_runtime.jsxs)(LemonBanner.V,{type:billingAlert.status,action:showButton?buttonProps:void 0,onClose:"error"!==billingAlert.status?()=>setAlertHidden(!0):billingAlert.onClose?()=>billingAlert.onClose?.():void 0,dismissKey:billingAlert.dismissKey,children:[(0,jsx_runtime.jsx)("b",{children:billingAlert.title}),(0,jsx_runtime.jsx)("br",{}),billingAlert.message]})})}var CommandBar=__webpack_require__("./frontend/src/lib/components/CommandBar/CommandBar.tsx"),FlaggedFeature=__webpack_require__("./frontend/src/lib/components/FlaggedFeature.tsx"),navigationLogic=__webpack_require__("./frontend/src/layout/navigation/navigationLogic.ts"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),verifyEmailLogic=__webpack_require__("./frontend/src/scenes/authentication/signup/verify-email/verifyEmailLogic.ts"),inviteLogic=__webpack_require__("./frontend/src/scenes/settings/organization/inviteLogic.ts"),types=__webpack_require__("./frontend/src/types.ts");function CountDown(_ref){let{datetime,callback}=_ref,[now,setNow]=(0,react.useState)((0,dayjs.Bv)()),duration=dayjs.Bv.duration(datetime.diff(now)),pastCountdown=0>duration.seconds(),countdown=pastCountdown?"Expired":duration.hours()>0?duration.format("HH:mm:ss"):duration.format("mm:ss");return(0,react.useEffect)(()=>{let interval=setInterval(()=>setNow((0,dayjs.Bv)()),1e3);return()=>clearInterval(interval)},[]),(0,react.useEffect)(()=>{pastCountdown&&callback?.()},[pastCountdown]),(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:countdown})}function ProjectNotice(){let{projectNoticeVariant}=(0,index_esm.useValues)(navigationLogic.f),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{logout,loadUser}=(0,index_esm.useActions)(userLogic.userLogic),{user,userLoading}=(0,index_esm.useValues)(userLogic.userLogic),{closeProjectNotice}=(0,index_esm.useActions)(navigationLogic.f),{showInviteModal}=(0,index_esm.useActions)(inviteLogic.n),{requestVerificationLink}=(0,index_esm.useActions)(verifyEmailLogic.C);if(!projectNoticeVariant)return null;let altTeamForIngestion=currentOrganization?.teams?.find(team=>!team.is_demo&&!team.ingested_event),NOTICES={demo_project:{message:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["This is a demo project with dummy data.",altTeamForIngestion&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[" ","When you're ready, head on over to the"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.project(altTeamForIngestion.id,urls.j.products()),"data-attr":"demo-project-alt-team-ingestion_link",children:"onboarding wizard"})," ","to get started with your own data."]})]})},real_project_with_no_events:{message:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["This project has no events yet. Go to the"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.onboarding(types.Md.PRODUCT_ANALYTICS),"data-attr":"real_project_with_no_events-ingestion_link",children:"onboarding wizard"})," ","or grab your project\xa0API\xa0key/HTML\xa0snippet from"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.settings(),"data-attr":"real_project_with_no_events-settings",children:"Project Settings"})," ","to get things moving"]}),action:{to:urls.j.onboarding(types.Md.PRODUCT_ANALYTICS),"data-attr":"demo-warning-cta",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),children:"Go to wizard"},closeable:!0},invite_teammates:{message:"Get more out of PostHog by\xa0inviting your team for\xa0free",action:{"data-attr":"invite-warning-cta",onClick:showInviteModal,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),children:"Invite team members"},closeable:!0},unverified_email:{message:"Please verify your email address.",action:{"data-attr":"unverified-email-cta",onClick:()=>user&&requestVerificationLink(user.uuid),children:"Send verification email"},type:"warning"},is_impersonated:{message:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["You are currently logged in as a customer."," ",user?.is_impersonated_until&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Expires in ",(0,jsx_runtime.jsx)(CountDown,{datetime:(0,dayjs.Bv)(user.is_impersonated_until),callback:loadUser}),userLoading?(0,jsx_runtime.jsx)(src.$j,{}):(0,jsx_runtime.jsx)(Link.r,{className:"ml-2",onClick:()=>loadUser(),children:"Refresh"})]})]}),type:"warning",action:{"data-attr":"stop-impersonation-cta",onClick:()=>logout(),children:"Log out"}},internet_connection_issue:{message:"PostHog is having trouble connecting to the server. Please check your connection.",type:"warning",action:{"data-attr":"reload-page",onClick:()=>window.location.reload(),children:"Reload page"}}},relevantNotice=NOTICES[projectNoticeVariant];return(0,jsx_runtime.jsx)(LemonBanner.V,{type:relevantNotice.type||"info",className:"my-4",action:relevantNotice.action,onClose:relevantNotice.closeable?()=>closeProjectNotice(projectNoticeVariant):void 0,children:relevantNotice.message})}var teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),ProjectSwitcher=__webpack_require__("./frontend/src/layout/navigation/ProjectSwitcher.tsx"),AccountPopover=__webpack_require__("./frontend/src/layout/navigation/TopBar/AccountPopover.tsx");function MinimalNavigation(){var _currentOrganization$,_currentTeam$name;let{user}=(0,index_esm.useValues)(userLogic.userLogic),{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{isAccountPopoverOpen,isProjectSwitcherShown}=(0,index_esm.useValues)(navigationLogic.f),{closeAccountPopover,toggleAccountPopover,toggleProjectSwitcher,hideProjectSwitcher}=(0,index_esm.useActions)(navigationLogic.f);return(0,jsx_runtime.jsxs)("nav",{className:"flex items-center justify-between gap-2 p-2 border-b",children:[(0,jsx_runtime.jsx)("span",{className:"flex-1",children:(0,jsx_runtime.jsx)(src.Jp,{noPadding:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconLogomark,{className:"text-3xl"}),to:urls.j.projectHomepage()})}),null!==(_currentOrganization$=currentOrganization?.teams?.length)&&void 0!==_currentOrganization$&&_currentOrganization$?(0,jsx_runtime.jsx)(src.J2,{overlay:(0,jsx_runtime.jsx)(ProjectSwitcher.C,{onClickInside:hideProjectSwitcher}),visible:isProjectSwitcherShown,onClickOutside:hideProjectSwitcher,placement:"bottom",children:(0,jsx_runtime.jsx)(src.Jp,{type:"tertiary",icon:(0,jsx_runtime.jsx)(src.BR,{name:currentTeam?.name}),onClick:toggleProjectSwitcher,children:null!==(_currentTeam$name=currentTeam?.name)&&void 0!==_currentTeam$name?_currentTeam$name:"Current project"})}):null,(0,jsx_runtime.jsx)(src.J2,{overlay:(0,jsx_runtime.jsx)(AccountPopover.D,{}),visible:isAccountPopoverOpen,onClickOutside:closeAccountPopover,placement:"bottom",children:(0,jsx_runtime.jsx)(src.Jp,{type:"tertiary",icon:(0,jsx_runtime.jsx)(src.YY,{user:user,size:"md"}),onClick:toggleAccountPopover,children:user?.first_name||user?.email})})]})}var commandBarLogic=__webpack_require__("./frontend/src/lib/components/CommandBar/commandBarLogic.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),useFeatureFlag=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),dist_module=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js");let NOTICES=[{identifier:sceneTypes.x.DataManagement,description:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("b",{children:"Annotations"})," have moved here!",(0,jsx_runtime.jsx)("br",{}),"You can now find them in ",(0,jsx_runtime.jsx)("b",{children:"Data Management"})]}),placement:"bottom-end",flagSuffix:"annotations-2023-10-30"},{identifier:sceneTypes.x.PersonsManagement,description:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("b",{children:"Cohorts"})," have moved here!",(0,jsx_runtime.jsx)("br",{}),"You can now find them in ",(0,jsx_runtime.jsx)("b",{children:"People"})]}),placement:"top-end",flagSuffix:"cohorts-2023-10-30"}];function SidebarChangeNoticeContent(_ref){let{notices,onAcknowledged}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-1",onClick:onAcknowledged,children:[(0,jsx_runtime.jsx)("div",{className:"flex-1",children:notices.map((notice,i)=>(0,jsx_runtime.jsxs)(react.Fragment,{children:[notice.description,i{var _notices$0$placement;let content;let{identifier,shortTitle,title,forceTooltipOnHover,tag,onClick,sideAction,...rest}=_ref,{activeScene}=(0,index_esm.useValues)(sceneLogic.k),{sceneBreadcrumbKeys}=(0,index_esm.useValues)(breadcrumbsLogic.E),{hideNavOnMobile}=(0,index_esm.useActions)(navigation_3000_navigationLogic.f),{isNavCollapsed}=(0,index_esm.useValues)(navigation_3000_navigationLogic.f),isUsingNewNav=(0,useFeatureFlag.y)("POSTHOG_3000_NAV"),[hasBeenClicked,setHasBeenClicked]=(0,react.useState)(!1),here=activeScene===identifier||sceneBreadcrumbKeys.includes(identifier),isNavCollapsedActually=isNavCollapsed||isUsingNewNav;isUsingNewNav||(rest.active=here),isNavCollapsedActually?rest.sideIcon=null:(content=shortTitle||title,tag&&(content=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"grow",children:content}),(0,jsx_runtime.jsx)(src.oe,{type:"alpha"===tag?"completion":"beta"===tag?"warning":"success",size:"small",className:"ml-2",children:tag.toUpperCase()})]})),sideAction&&(rest.sideAction={...sideAction,divider:!0,"data-attr":`menu-item-${sideAction.identifier.toLowerCase()}`},rest.sideIcon=null));let buttonContent=(0,jsx_runtime.jsx)(LemonButton.J,{ref:ref,"data-attr":`menu-item-${identifier.toString().toLowerCase()}`,onMouseEnter:()=>setHasBeenClicked(!1),onClick:e=>{rest.to&&hideNavOnMobile(),setHasBeenClicked(!0),onClick?.(e)},className:(0,clsx_m.default)("NavbarButton",isUsingNewNav&&here&&"NavbarButton--here"),fullWidth:!0,type:"secondary",status:"alt",...rest,children:content}),[notices,onAcknowledged]=function(_ref2){let{identifier}=_ref2,{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),[noticeAcknowledged,setNoticeAcknowledged]=(0,react.useState)(!1),notices=NOTICES.filter(notice=>notice.identifier===identifier).filter(notice=>featureFlags[`sidebar-notice-${notice.flagSuffix}`]);return[noticeAcknowledged?[]:notices,()=>{notices.forEach(change=>{dist_module.ZP.capture("sidebar notice acknowledged",{change:change.flagSuffix,$set:{[`sidebar_notice/${change.flagSuffix}`]:!0}}),setNoticeAcknowledged(!0)})}]}({identifier});return(0,jsx_runtime.jsx)("li",{className:"w-full",children:notices.length?(0,jsx_runtime.jsx)(Tooltip.u,{title:(0,jsx_runtime.jsx)(SidebarChangeNoticeContent,{notices:notices,onAcknowledged:onAcknowledged}),placement:null!==(_notices$0$placement=notices[0].placement)&&void 0!==_notices$0$placement?_notices$0$placement:"right",delayMs:0,visible:!0,children:buttonContent}):(0,jsx_runtime.jsx)(Tooltip.u,{title:forceTooltipOnHover||isNavCollapsedActually?here?`${title} (you are here)`:title:null,placement:"right",delayMs:0,visible:!hasBeenClicked&&void 0,children:buttonContent})})});function DebugNotice(){let[debugInfo,setDebugInfo]=(0,react.useState)(),[noticeHidden,setNoticeHidden]=(0,react.useState)(!1),{isNavCollapsed}=(0,index_esm.useValues)(navigation_3000_navigationLogic.f);return((0,react.useEffect)(()=>{let bottomNotice=document.getElementById("bottom-notice"),bottomNoticeRevision=document.getElementById("bottom-notice-revision")?.textContent,bottomNoticeBranch=document.getElementById("bottom-notice-branch")?.textContent;return bottomNotice&&bottomNoticeRevision&&bottomNoticeBranch&&(setDebugInfo({branch:bottomNoticeBranch||"unknown",revision:bottomNoticeRevision||"unknown"}),bottomNotice.remove()),()=>{}},[]),!debugInfo||noticeHidden)?null:isNavCollapsed?(0,jsx_runtime.jsx)(NavbarButton,{identifier:"debug-notice",icon:(0,jsx_runtime.jsx)(icons.$M,{className:"text-primary"}),title:(0,jsx_runtime.jsxs)("div",{className:"font-mono",children:[(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)("strong",{children:"DEBUG mode!"})}),(0,jsx_runtime.jsxs)("div",{children:["Branch: ",(0,jsx_runtime.jsx)("b",{children:debugInfo.branch})]}),(0,jsx_runtime.jsxs)("div",{children:["Revision: ",(0,jsx_runtime.jsx)("b",{children:debugInfo.revision})]}),(0,jsx_runtime.jsx)("div",{className:"italic",children:"Click to hide"})]}),onClick:()=>setNoticeHidden(!0)}):(0,jsx_runtime.jsxs)("div",{className:"border rounded bg-bg-3000 overflow-hidden mb-1.5 w-full font-mono max-w-60 text-[13px]",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 px-2 h-8 border-l-4 border-brand-blue justify-between",children:[(0,jsx_runtime.jsx)("b",{children:"DEBUG mode"}),(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{}),tooltip:"Dismiss",size:"small",noPadding:!0,onClick:()=>setNoticeHidden(!0)})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 px-2 h-8 border-l-4 border-brand-red",title:`Branch: ${debugInfo.branch}`,children:[(0,jsx_runtime.jsx)(icons.$M,{className:"text-lg"}),(0,jsx_runtime.jsx)("b",{className:"min-w-0 flex-1 truncate",children:debugInfo.branch})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 px-2 h-8 border-l-4 border-brand-yellow",title:`Revision: ${debugInfo.revision}`,children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCode,{className:"text-lg"}),(0,jsx_runtime.jsx)("b",{className:"min-w-0 flex-1 truncate",children:debugInfo.revision})]})]})}NavbarButton.displayName="NavbarButton";var Resizer=__webpack_require__("./frontend/src/lib/components/Resizer/Resizer.tsx"),ScrollableShadows=__webpack_require__("./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx"),Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/index.ts"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),themeLogic=__webpack_require__("./frontend/src/layout/navigation-3000/themeLogic.ts"),KeyboardShortcut=__webpack_require__("./frontend/src/layout/navigation-3000/components/KeyboardShortcut.tsx");function Navbar(){let{theme}=(0,index_esm.useValues)(themeLogic.b),{user}=(0,index_esm.useValues)(userLogic.userLogic),{isAccountPopoverOpen,systemStatusHealthy}=(0,index_esm.useValues)(navigationLogic.f),{closeAccountPopover,toggleAccountPopover}=(0,index_esm.useActions)(navigationLogic.f),{isNavShown,isSidebarShown,activeNavbarItemId,navbarItems,mobileLayout}=(0,index_esm.useValues)(navigation_3000_navigationLogic.f),{toggleNavCollapsed,hideNavOnMobile,showSidebar,hideSidebar}=(0,index_esm.useActions)(navigation_3000_navigationLogic.f),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),{toggleSearchBar}=(0,index_esm.useActions)(commandBarLogic.e),containerRef=(0,react.useRef)(null);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("nav",{className:(0,clsx_m.default)("Navbar3000",!isNavShown&&"Navbar3000--hidden"),ref:containerRef,children:[(0,jsx_runtime.jsxs)("div",{className:"Navbar3000__content",style:theme?.sidebarStyle,children:[(0,jsx_runtime.jsx)(ScrollableShadows.D,{innerClassName:"Navbar3000__top",direction:"vertical",children:navbarItems.map((section,index)=>(0,jsx_runtime.jsx)("ul",{children:section.map(item=>item.featureFlag&&!featureFlags[item.featureFlag]?null:(0,jsx_runtime.jsx)(NavbarButton,{title:item.label,identifier:item.identifier,icon:item.icon,sideAction:item.sideAction,tag:item.tag,to:"to"in item?item.to:void 0,onClick:"logic"in item?()=>{activeNavbarItemId!==item.identifier||isSidebarShown?showSidebar(item.identifier):hideSidebar()}:void 0,active:activeNavbarItemId===item.identifier&&isSidebarShown},item.identifier))},index))}),(0,jsx_runtime.jsx)("div",{className:"Navbar3000__bottom",children:(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsx)(DebugNotice,{}),(0,jsx_runtime.jsx)(NavbarButton,{identifier:"search-button",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconSearch,{}),shortTitle:"Search",title:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,jsx_runtime.jsxs)("span",{children:["For search, press ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,k:!0})]}),(0,jsx_runtime.jsxs)("span",{children:["For commands, press ",(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,shift:!0,k:!0})]})]}),forceTooltipOnHover:!0,sideIcon:(0,jsx_runtime.jsx)(KeyboardShortcut.e,{command:!0,k:!0}),onClick:toggleSearchBar}),(0,jsx_runtime.jsx)(NavbarButton,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconToolbar,{}),identifier:sceneTypes.x.ToolbarLaunch,title:"Toolbar",to:urls.j.toolbarLaunch()}),(0,jsx_runtime.jsx)(NavbarButton,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconGear,{}),identifier:sceneTypes.x.Settings,title:"Settings",to:urls.j.settings("project")}),systemStatusHealthy?null:(0,jsx_runtime.jsx)(NavbarButton,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconWarning,{}),identifier:sceneTypes.x.Settings,title:"System issue!",to:urls.j.instanceStatus()}),(0,jsx_runtime.jsx)(Popover.J2,{overlay:(0,jsx_runtime.jsx)(AccountPopover.D,{}),visible:isAccountPopoverOpen,onClickOutside:closeAccountPopover,placement:"right-end",className:"min-w-70",children:(0,jsx_runtime.jsx)(NavbarButton,{icon:(0,jsx_runtime.jsx)(ProfilePicture.Y,{user:user,size:"md"}),identifier:"me",title:`Hi${user?.first_name?`, ${user?.first_name}`:""}!`,shortTitle:user?.first_name||user?.email,onClick:toggleAccountPopover})})]})})]}),!mobileLayout&&(0,jsx_runtime.jsx)(Resizer.w,{logicKey:"navbar",placement:"right",containerRef:containerRef,closeThreshold:100,onToggleClosed:shouldBeClosed=>toggleNavCollapsed(shouldBeClosed),onDoubleClick:()=>toggleNavCollapsed()})]}),mobileLayout&&(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("Navbar3000__overlay",!isNavShown&&"Navbar3000--hidden"),onClick:()=>hideNavOnMobile()})]})}var Sidebar=__webpack_require__("./frontend/src/layout/navigation-3000/components/Sidebar.tsx"),TopBar=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/components/TopBar.scss"),TopBar_default=__webpack_require__.n(TopBar),TopBar_options={};TopBar_options.insert="head",TopBar_options.singleton=!1,injectStylesIntoStyleTag_default()(TopBar_default(),TopBar_options),TopBar_default().locals;var EditableField=__webpack_require__("./frontend/src/lib/components/EditableField/EditableField.tsx"),sidePanelStateLogic=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),metalyticsLogic=__webpack_require__("./frontend/src/lib/components/Metalytics/metalyticsLogic.ts");function MetalyticsSummary(){var _viewCount$views,_viewCount$users;let{instanceId,viewCount,viewCountLoading}=(0,index_esm.useValues)(metalyticsLogic.W),safeViewCount=null!==(_viewCount$views=viewCount?.views)&&void 0!==_viewCount$views?_viewCount$views:0,safeUniqueUsers=null!==(_viewCount$users=viewCount?.users)&&void 0!==_viewCount$users?_viewCount$users:0,{openSidePanel}=(0,index_esm.useActions)(sidePanelStateLogic.f);return!instanceId||viewCountLoading?null:(0,jsx_runtime.jsxs)("span",{className:"relative inline-flex",children:[(0,jsx_runtime.jsx)(src.Jp,{loading:viewCountLoading,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPulse,{}),size:"small",onClick:()=>openSidePanel(types.H$.Activity,"metalytics"),tooltip:`${safeUniqueUsers} PostHog members have viewed this a total of ${safeViewCount} times. Click to see more.`}),(0,jsx_runtime.jsx)(src.Mo.Number,{count:safeViewCount,size:"small",position:"top-right",showZero:!1,status:"primary",maxDigits:3})]})}var Popover_Popover=__webpack_require__("./frontend/src/lib/lemon-ui/Popover/Popover.tsx");function TopBar_TopBar(){let{mobileLayout}=(0,index_esm.useValues)(navigationLogic.f),{showNavOnMobile}=(0,index_esm.useActions)(navigation_3000_navigationLogic.f),{breadcrumbs,renameState}=(0,index_esm.useValues)(breadcrumbsLogic.E),{setActionsContainer}=(0,index_esm.useActions)(breadcrumbsLogic.E),[compactionRate,setCompactionRate]=(0,react.useState)(0),effectiveCompactionRate=mobileLayout?0:compactionRate,isOnboarding=lib.router.values.location.pathname.includes("/onboarding/");return(0,react.useLayoutEffect)(()=>{function handleScroll(){let mainElement=document.getElementsByTagName("main")[0],mainScrollTop=mainElement.scrollTop,compactionDistance=Math.min(mainElement.scrollHeight-mainElement.clientHeight,44),newCompactionRate=compactionDistance>0?Math.min(mainScrollTop/compactionDistance,1):0;if(setCompactionRate(newCompactionRate),renameState&&(newCompactionRate>.5&&compactionRate<=.5||newCompactionRate<=.5&&compactionRate>.5)){let[source,target]=newCompactionRate>.5?["large","small"]:["small","large"],sourceEl=document.querySelector(`input[name="item-name-${source}"]`),targetEl=document.querySelector(`input[name="item-name-${target}"]`);sourceEl&&targetEl&&(targetEl.focus(),targetEl.setSelectionRange(sourceEl.selectionStart||0,sourceEl.selectionEnd||0))}}let main=document.getElementsByTagName("main")[0];return main.addEventListener("scroll",handleScroll),()=>main.removeEventListener("scroll",handleScroll)},[compactionRate]),breadcrumbs.length?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("TopBar3000",0===effectiveCompactionRate&&"TopBar3000--full",1===effectiveCompactionRate&&"TopBar3000--compact"),style:{"--breadcrumbs-compaction-rate":effectiveCompactionRate},children:(0,jsx_runtime.jsxs)("div",{className:"TopBar3000__content",children:[mobileLayout&&(0,jsx_runtime.jsx)(src.Jp,{size:"small",onClick:()=>showNavOnMobile(),icon:(0,jsx_runtime.jsx)(icons.dc,{}),className:"TopBar3000__hamburger"}),(0,jsx_runtime.jsxs)("div",{className:"TopBar3000__breadcrumbs",children:[breadcrumbs.length>1&&(0,jsx_runtime.jsxs)("div",{className:"TopBar3000__trail",children:[breadcrumbs.slice(0,-1).map(breadcrumb=>(0,jsx_runtime.jsxs)(react.Fragment,{children:[(0,jsx_runtime.jsx)(Breadcrumb,{breadcrumb:breadcrumb}),(0,jsx_runtime.jsx)("div",{className:"TopBar3000__separator"})]},joinBreadcrumbKey(breadcrumb.key))),(0,jsx_runtime.jsx)(Breadcrumb,{breadcrumb:breadcrumbs[breadcrumbs.length-1],here:!0,isOnboarding:isOnboarding})]}),(0,jsx_runtime.jsx)(Here,{breadcrumb:breadcrumbs[breadcrumbs.length-1],isOnboarding:isOnboarding})]}),(0,jsx_runtime.jsx)(FlaggedFeature.P,{flag:"metalytics",children:(0,jsx_runtime.jsx)("div",{className:"shrink-1",children:(0,jsx_runtime.jsx)(MetalyticsSummary,{})})}),(0,jsx_runtime.jsx)("div",{className:"TopBar3000__actions border-danger",ref:setActionsContainer})]})}):null}function Breadcrumb(_ref){let nameElement,{breadcrumb,here,isOnboarding}=_ref,{renameState}=(0,index_esm.useValues)(breadcrumbsLogic.E),{tentativelyRename,finishRenaming}=(0,index_esm.useActions)(breadcrumbsLogic.E),[popoverShown,setPopoverShown]=(0,react.useState)(!1),joinedKey=joinBreadcrumbKey(breadcrumb.key),breadcrumbName=isOnboarding&&here?"Onboarding":breadcrumb.name;nameElement=breadcrumb.symbol?breadcrumb.symbol:null!=breadcrumb.name&&breadcrumb.onRename?(0,jsx_runtime.jsx)(EditableField.f,{name:"item-name-small",value:renameState&&renameState[0]===joinedKey?renameState[1]:breadcrumbName,onChange:newName=>tentativelyRename(joinedKey,newName),onSave:newName=>{breadcrumb.onRename?.(newName)},mode:renameState&&renameState[0]===joinedKey?"edit":"view",onModeToggle:newMode=>{"edit"===newMode?tentativelyRename(joinedKey,breadcrumbName):finishRenaming(),setPopoverShown(!1)},placeholder:"Unnamed",compactButtons:"xsmall",editingIndication:"underlined"}):(0,jsx_runtime.jsxs)("span",{className:"flex items-center gap-1.5",children:[breadcrumbName||(0,jsx_runtime.jsx)("i",{children:"Unnamed"}),"tag"in breadcrumb&&breadcrumb.tag&&(0,jsx_runtime.jsx)(src.oe,{size:"small",children:breadcrumb.tag})]});let Component=breadcrumb.path?Link.r:"div",breadcrumbContent=(0,jsx_runtime.jsxs)(Component,{className:(0,clsx_m.default)("TopBar3000__breadcrumb",popoverShown&&"TopBar3000__breadcrumb--open",(breadcrumb.path||breadcrumb.popover)&&"TopBar3000__breadcrumb--actionable",here&&"TopBar3000__breadcrumb--here"),onClick:()=>{breadcrumb.popover&&setPopoverShown(!popoverShown)},"data-attr":`breadcrumb-${joinedKey}`,to:breadcrumb.path,children:[nameElement,breadcrumb.popover&&!breadcrumb.symbol&&(0,jsx_runtime.jsx)(posthog_icons_es.IconChevronDown,{})]});return breadcrumb.popover?(0,jsx_runtime.jsx)(Popover_Popover.J2,{...breadcrumb.popover,visible:popoverShown,onClickOutside:()=>{popoverShown&&setPopoverShown(!1)},onClickInside:()=>{popoverShown&&setPopoverShown(!1)},children:breadcrumbContent}):breadcrumbContent}function Here(_ref2){let{breadcrumb,isOnboarding}=_ref2,{renameState}=(0,index_esm.useValues)(breadcrumbsLogic.E),{tentativelyRename,finishRenaming}=(0,index_esm.useActions)(breadcrumbsLogic.E),joinedKey=joinBreadcrumbKey(breadcrumb.key),hereName=isOnboarding?"Onboarding":breadcrumb.name;return(0,jsx_runtime.jsx)("h1",{className:"TopBar3000__here","data-attr":"top-bar-name",children:null==breadcrumb.name?(0,jsx_runtime.jsx)(src.yW,{className:"w-40 h-4"}):breadcrumb.onRename?(0,jsx_runtime.jsx)(EditableField.f,{name:"item-name-large",value:renameState&&renameState[0]===joinedKey?renameState[1]:hereName,onChange:newName=>{tentativelyRename(joinedKey,newName),breadcrumb.forceEditMode&&breadcrumb.onRename?.(newName)},onSave:newName=>{breadcrumb.onRename?.(newName)},mode:breadcrumb.forceEditMode||renameState&&renameState[0]===joinedKey?"edit":"view",onModeToggle:breadcrumb.forceEditMode?void 0:newMode=>{"edit"===newMode?tentativelyRename(joinedKey,hereName):finishRenaming()},placeholder:"Unnamed",compactButtons:"xsmall",editingIndication:"underlined",autoFocus:!0}):(0,jsx_runtime.jsx)("span",{children:hereName})})}function joinBreadcrumbKey(key){return Array.isArray(key)?key.map(String).join(":"):String(key)}var SidePanel=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx");function Navigation_Navigation(_ref){let{children,sceneConfig}=_ref,{theme}=(0,index_esm.useValues)(themeLogic.b),{mobileLayout}=(0,index_esm.useValues)(navigationLogic.f),{activeNavbarItem,mode}=(0,index_esm.useValues)(navigation_3000_navigationLogic.f);return"full"!==mode?(0,jsx_runtime.jsxs)("div",{className:"Navigation3000 flex-col",style:theme?.mainStyle,children:["minimal"===mode?(0,jsx_runtime.jsx)(MinimalNavigation,{}):null,(0,jsx_runtime.jsx)("main",{children:children})]}):(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("Navigation3000",mobileLayout&&"Navigation3000--mobile"),style:theme?.mainStyle,children:[(0,jsx_runtime.jsx)(Navbar,{}),(0,jsx_runtime.jsx)(FlaggedFeature.P,{flag:constants.y8.POSTHOG_3000_NAV,children:activeNavbarItem&&(0,jsx_runtime.jsx)(Sidebar.Y,{navbarItem:activeNavbarItem},activeNavbarItem.identifier)}),(0,jsx_runtime.jsxs)("main",{children:[sceneConfig?.layout!=="app-raw-no-header"&&(0,jsx_runtime.jsx)(TopBar_TopBar,{}),(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("Navigation3000__scene",sceneConfig?.layout==="app-raw"&&"Navigation3000__scene--raw",sceneConfig?.layout==="app-raw-no-header"&&"Navigation3000__scene--raw-no-header",sceneConfig?.layout==="app-canvas"&&"Navigation3000__scene--canvas"),children:[!sceneConfig?.hideBillingNotice&&(0,jsx_runtime.jsx)(BillingAlertsV2,{}),!sceneConfig?.hideProjectNotice&&(0,jsx_runtime.jsx)(ProjectNotice,{}),children]})]}),(0,jsx_runtime.jsx)(SidePanel.W,{}),(0,jsx_runtime.jsx)(CommandBar.X,{})]})}var actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx");window.process=constants.TH;let appLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","App"]),(0,index_esm.connect)([teamLogic.H,organizationLogic.p,actionsModel.D,cohortsModel.Q]),(0,index_esm.actions)({enableDelayedSpinner:!0,ignoreFeatureFlags:!0}),(0,index_esm.reducers)({showingDelayedSpinner:[!1,{enableDelayedSpinner:()=>!0}],featureFlagsTimedOut:[!1,{ignoreFeatureFlags:()=>!0}]}),(0,index_esm.selectors)({showApp:[s=>[userLogic.userLogic.selectors.userLoading,userLogic.userLogic.selectors.user,featureFlagLogic.h.selectors.receivedFeatureFlags,s.featureFlagsTimedOut,preflightLogic.preflightLogic.selectors.preflightLoading,preflightLogic.preflightLogic.selectors.preflight],(userLoading,user,receivedFeatureFlags,featureFlagsTimedOut,preflightLoading,preflight)=>(!userLoading||user)&&(receivedFeatureFlags||featureFlagsTimedOut)&&(!preflightLoading||preflight)]}),(0,index_esm.events)(_ref=>{let{actions,cache}=_ref;return{afterMount:()=>{cache.spinnerTimeout=window.setTimeout(()=>actions.enableDelayedSpinner(),1e3),cache.featureFlagTimeout=window.setTimeout(()=>actions.ignoreFeatureFlags(),3e3)},beforeUnmount:()=>{window.clearTimeout(cache.spinnerTimeout),window.clearTimeout(cache.featureFlagTimeout)}}})]);function App(){let{showApp,showingDelayedSpinner}=(0,index_esm.useValues)(appLogic);return((0,index_esm.useMountedLogic)((0,sceneLogic.k)({scenes:appScenes})),(0,index_esm.useMountedLogic)(apiStatusLogic.W),(0,useThemedHtml.F)(),showApp)?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LoadedSceneLogics,{}),(0,jsx_runtime.jsx)(AppScene,{})]}):(0,jsx_runtime.jsx)(Spinner.t,{sceneLevel:!0,visible:showingDelayedSpinner})}function LoadedSceneLogic(_ref2){let{scene}=_ref2;if(!scene.logic)throw Error("Loading scene without a logic");return(0,index_esm.useMountedLogic)(scene.logic(scene.paramsToProps?.(scene.sceneParams))),null}function LoadedSceneLogics(){let{loadedScenes}=(0,index_esm.useValues)(sceneLogic.k);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:Object.entries(loadedScenes).filter(_ref3=>{let[,{logic}]=_ref3;return!!logic}).map(_ref4=>{let[key,loadedScene]=_ref4;return(0,jsx_runtime.jsx)(LoadedSceneLogic,{scene:loadedScene},key)})})}function AppScene(){let sceneElement;(0,index_esm.useMountedLogic)(breadcrumbsLogic.E);let{user}=(0,index_esm.useValues)(userLogic.userLogic),{activeScene,activeLoadedScene,sceneParams,params,loadedScenes,sceneConfig}=(0,index_esm.useValues)(sceneLogic.k),{showingDelayedSpinner}=(0,index_esm.useValues)(appLogic),{isDarkModeOn}=(0,index_esm.useValues)(themeLogic.b),toastContainer=(0,jsx_runtime.jsx)(react_toastify_esm.Ix,{autoClose:6e3,transition:react_toastify_esm.Mi,closeOnClick:!1,draggable:!1,closeButton:(0,jsx_runtime.jsx)(LemonToast.ty,{}),position:"bottom-right",theme:isDarkModeOn?"dark":"light"});if(activeScene&&activeScene in loadedScenes){let{component:SceneComponent}=loadedScenes[activeScene];sceneElement=(0,jsx_runtime.jsx)(SceneComponent,{user:user,...params})}else sceneElement=(0,jsx_runtime.jsx)(Spinner.t,{sceneLevel:!0,visible:showingDelayedSpinner});let wrappedSceneElement=(0,jsx_runtime.jsx)(ErrorBoundary.S,{tags:{feature:activeScene},children:activeLoadedScene?.logic?(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:activeLoadedScene.logic,props:activeLoadedScene.paramsToProps?.(sceneParams)||{},children:sceneElement}):sceneElement},activeScene);return user?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Navigation_Navigation,{sceneConfig:sceneConfig,children:wrappedSceneElement}),toastContainer,(0,jsx_runtime.jsx)(GlobalModals.B,{})]}):sceneConfig?.onlyUnauthenticated||sceneConfig?.allowUnauthenticated?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[wrappedSceneElement,toastContainer]}):null}},"./frontend/src/scenes/PreflightCheck/preflightLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{preflightLogic:()=>preflightLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/urls.ts");let preflightLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","PreflightCheck","preflightLogic"]),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({preflight:[null,{loadPreflight:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get("_preflight/");return response}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({registerInstrumentationProps:!0,setPreflightMode:(mode,noReload)=>({mode,noReload}),handlePreflightFinished:!0,setChecksManuallyExpanded:expanded=>({expanded}),revalidatePreflight:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({preflightMode:[null,{setPreflightMode:(_,_ref)=>{let{mode}=_ref;return mode}}],areChecksManuallyExpanded:[null,{setChecksManuallyExpanded:(_,_ref2)=>{let{expanded}=_ref2;return expanded}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({checks:[s=>[s.preflight,s.preflightMode],(preflight,preflightMode)=>{let preflightItems=[{id:"database",name:"Application database \xb7 Postgres",status:preflight?.db?"validated":"error"},{id:"clickhouse",name:"Analytics database \xb7 ClickHouse",status:preflight?.clickhouse?"validated":"error"},{id:"kafka",name:"Queue \xb7 Kafka",status:preflight?.kafka?"validated":"error"},{id:"backend",name:"Backend server \xb7 Django",status:preflight?.django?"validated":"error"},{id:"redis",name:"Cache \xb7 Redis",status:preflight?.redis?"validated":"experimentation"===preflightMode?"warning":"error",caption:preflight?.redis||"experimentation"!==preflightMode?void 0:"Required in production environments"},{id:"celery",name:"Background jobs \xb7 Celery",status:preflight?.celery?"validated":"experimentation"===preflightMode?"warning":"error",caption:preflight?.celery||"experimentation"!==preflightMode?void 0:"Required in production environments"},{id:"plugins",name:"Plugin server \xb7 Node",status:preflight?.plugins?"validated":"experimentation"===preflightMode?"warning":"error",caption:preflight?.plugins||"experimentation"!==preflightMode?void 0:"Required in production environments"},{id:"frontend",name:"Frontend build \xb7 Webpack",status:"validated"},{id:"tls",name:"SSL/TLS certificate",status:"https:"===window.location.protocol?"validated":"experimentation"===preflightMode?"optional":"warning",caption:"https:"!==window.location.protocol&&"experimentation"===preflightMode?"Not required for experimentation mode":"Set up before ingesting real user data"}];return(preflight?.object_storage||preflight?.is_debug)&&preflightItems.push({id:"object_storage",name:"Object Storage",status:preflight?.object_storage?"validated":"warning",caption:preflight?.object_storage?void 0:"Some features will not work without object storage"}),preflightItems}],checksSummary:[s=>[s.checks],checks=>{let statusCounts={};if(checks.length>0)for(let check of checks)statusCounts[check.status]=(statusCounts[check.status]||0)+1;let summaryString="",summaryStatus="validated";return statusCounts.validated&&(summaryString+=`${statusCounts.validated} successful, `),statusCounts.warning&&(summaryString+=`${statusCounts.warning} warning${statusCounts.warning>1?"s":""}, `,summaryStatus="warning"),statusCounts.error&&(summaryString+=`${statusCounts.error} error${statusCounts.error>1?"s":""}, `,summaryStatus="error"),statusCounts.optional&&(summaryString+=`${statusCounts.optional} optional, `),{summaryString:summaryString.slice(0,-2),summaryStatus:summaryStatus}}],areChecksExpanded:[s=>[s.checksSummary,s.areChecksManuallyExpanded],(checksSummary,areChecksManuallyExpanded)=>null!=areChecksManuallyExpanded?areChecksManuallyExpanded:checksSummary?.summaryStatus!=="validated"],socialAuthAvailable:[s=>[s.preflight],preflight=>!!(preflight&&Object.values(preflight.available_social_auth_providers).filter(i=>i).length)],objectStorageAvailable:[s=>[s.preflight],preflight=>!!(preflight&&preflight.object_storage)],realm:[s=>[s.preflight],preflight=>preflight?preflight.realm:null],siteUrlMisconfigured:[s=>[s.preflight],preflight=>!1],configOptions:[s=>[s.preflight],preflight=>preflight?[{key:"site_url",label:"Site URL"}].map(config=>({key:config.key,metric:config.label,value:preflight[config.key]})):[]],isCloudOrDev:[s=>[s.preflight],preflight=>preflight?.cloud||preflight?.is_debug],isCloud:[s=>[s.preflight],preflight=>preflight?.cloud],isDev:[s=>[s.preflight],preflight=>preflight?.is_debug],disableNavigationHooks:[s=>[s.preflight],preflight=>preflight?.dev_disable_navigation_hooks]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref3=>{let{values,actions}=_ref3;return{handlePreflightFinished:()=>{kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_6__.j.signup())},loadPreflightSuccess:()=>{actions.registerInstrumentationProps(),actions.setChecksManuallyExpanded(values.areChecksManuallyExpanded||null)},registerInstrumentationProps:async(_,breakpoint)=>{if(await breakpoint(100),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP&&values.preflight){let appContext=(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_4__.Fj)();posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.register({realm:values.realm,email_service_available:values.preflight.email_service_available,slack_service_available:values.preflight.slack_service?.available,commit_sha:appContext?.commit_sha}),values.preflight.site_url&&posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.group("instance",values.preflight.site_url,{site_url:values.preflight.site_url})}},setPreflightMode:async _ref4=>{let{mode,noReload}=_ref4;mode&&!noReload&&actions.loadPreflight()},revalidatePreflight:()=>{let tlsCheckResult=values.checks.find(check=>"tls"===check.id);"warning"===tlsCheckResult.status?window.location.reload():actions.loadPreflight()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.events)(_ref5=>{let{actions,values}=_ref5;return{afterMount:()=>{let appContext=(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_4__.Fj)(),preflight=appContext?.preflight;preflight?actions.loadPreflightSuccess(preflight):values.preflight||actions.loadPreflight()}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)(_ref6=>{let{values}=_ref6;return{setPreflightMode:()=>["/preflight",{mode:values.preflightMode}]}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref7=>{let{actions,values}=_ref7;return{"/preflight":(_,_ref8)=>{let{mode}=_ref8;values.preflightMode!==mode&&actions.setPreflightMode(null!=mode?mode:null,!0)}}})])},"./frontend/src/scenes/actions/EventName.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>LemonEventName});var lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_components_TaxonomicPopover_TaxonomicPopover__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function LemonEventName(_ref){let{value,onChange,disabled,placeholder="Select an event",allEventsOption}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_components_TaxonomicPopover_TaxonomicPopover__WEBPACK_IMPORTED_MODULE_2__.b,{groupType:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.Events,onChange:onChange,disabled:disabled,value:value,type:"secondary",placeholder:placeholder,"data-attr":"event-name-box",renderValue:v=>null!==v?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__.T,{value:v,disablePopover:!0,type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.Events}):null,allowClear:"clear"===allEventsOption,excludedProperties:"explicit"!==allEventsOption?{events:[null]}:void 0,size:"small"})}},"./frontend/src/scenes/actions/NewActionButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>NewActionButton});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_components_AuthorizedUrlList_AuthorizedUrlList__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/AuthorizedUrlList/AuthorizedUrlList.tsx"),lib_components_AuthorizedUrlList_authorizedUrlListLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/AuthorizedUrlList/authorizedUrlListLogic.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function NewActionButton(_ref){let{onSelectOption}=_ref,[visible,setVisible]=(0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(!1),[appUrlsVisible,setAppUrlsVisible]=(0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(!1);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"primary",onClick:()=>setVisible(!0),"data-attr":"create-action",children:"New action"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.fQ,{isOpen:visible,onClose:()=>{setVisible(!1),setAppUrlsVisible(!1)},title:"Create new action",footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:[appUrlsVisible&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"secondary",onClick:()=>setAppUrlsVisible(!1),children:"Back"},"back-button"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"secondary",onClick:()=>{setVisible(!1),setAppUrlsVisible(!1)},children:"Cancel"},"cancel-button")]}),children:appUrlsVisible?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"max-w-160",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_components_AuthorizedUrlList_AuthorizedUrlList__WEBPACK_IMPORTED_MODULE_3__.t,{type:lib_components_AuthorizedUrlList_authorizedUrlListLogic__WEBPACK_IMPORTED_MODULE_4__.uw.TOOLBAR_URLS})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"space-y-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"secondary",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconSearch,{}),onClick:()=>setAppUrlsVisible(!0),size:"large",fullWidth:!0,center:!0,"data-attr":"new-action-inspect",children:"Inspect element on your site"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_5__.J,{type:"secondary",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconPencil,{}),onClick:()=>{onSelectOption?.(),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.createAction())},size:"large",fullWidth:!0,center:!0,"data-attr":"new-action-pageview",children:"From event or pageview"})]})})]})}},"./frontend/src/scenes/actions/actionsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J:()=>actionsFuse,M:()=>actionsLogic});var fuse_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_data_management_DataManagementScene__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/data-management/DataManagementScene.tsx"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/urls.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_models_actionsModel__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/models/actionsModel.ts");let actionsFuse=new fuse_js__WEBPACK_IMPORTED_MODULE_8__.Z([],{keys:[{name:"name",weight:2},"description","tags"],threshold:.3,ignoreLocation:!0,includeMatches:!0}),actionsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","actions","actionsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[(0,_models_actionsModel__WEBPACK_IMPORTED_MODULE_7__.D)({params:"include_count=1"}),["actions","actionsLoading"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_6__.userLogic,["user"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h,["featureFlags"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setFilterType:filterType=>({filterType}),setSearchTerm:searchTerm=>({searchTerm})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({filterType:["all",{persist:!0},{setFilterType:(_,_ref)=>{let{filterType}=_ref;return filterType}}],searchTerm:["",{setSearchTerm:(_,_ref2)=>{let{searchTerm}=_ref2;return searchTerm}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({actionsFiltered:[s=>[s.actions,s.filterType,s.searchTerm,s.user],(actions,filterType,searchTerm,user)=>{let data=actions;return searchTerm&&(data=actionsFuse.search(searchTerm).map(result=>result.item)),"me"===filterType&&(data=data.filter(item=>item.created_by?.uuid===user?.uuid)),data}],breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_4__.x.DataManagement,name:"Data management",path:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.eventDefinitions()},{key:scenes_data_management_DataManagementScene__WEBPACK_IMPORTED_MODULE_3__.DataManagementTab.Actions,name:"Actions",path:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.actions()}]],shouldShowEmptyState:[s=>[s.actionsFiltered,s.actionsLoading,s.searchTerm],(actionsFiltered,actionsLoading,searchTerm)=>0==actionsFiltered.length&&!actionsLoading&&!searchTerm.length]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_1__.Vt)({actions:actions=>{actionsFuse.setCollection(actions)}})])},"./frontend/src/scenes/activity/explore/createActionFromEvent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H8:()=>elementsToAction,YG:()=>createActionFromEvent});var kea_router__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_actionUtils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/actionUtils.ts"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function elementsToAction(elements){return{href:elements[0].href,text:elements[0].text,...elements[0].href||elements[0].text?"":{selector:function recurseSelector(elements,parts,index){let element=elements[index];return element.attr_id?`[id="${element.attr_id}"] > ${parts}`:(parts=index>0?element.tag_name+" > "+parts:element.tag_name,10!==index&&elements[index+1])?recurseSelector(elements,parts,index+1):parts}(elements,"",0)}}}async function createActionFromEvent(teamId,event,increment,dataAttributes){let action,recurse=arguments.length>4&&void 0!==arguments[4]?arguments[4]:createActionFromEvent,actionData={name:"",steps:[{event:event.event,..."$pageview"===event.event||"$autocapture"===event.event?{url:event.properties.$current_url,url_matching:"exact"}:{},...event.elements?.length>0?elementsToAction(event.elements):{}}]};if("$autocapture"===event.event){if(actionData.name=(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.Sh)(event),dataAttributes?.length>0&&event.elements.length>0)for(let i=0;i0&&!lib_actionUtils__WEBPACK_IMPORTED_MODULE_1__.OK.includes(element.tag_name)){let clickedTagName=event.elements[0].tag_name;selector=`${selector} > ${clickedTagName||"*"}`}actionData.steps?.[0]&&(actionData.steps[0].selector=selector);break}}}else"$pageview"===event.event?actionData.name=`Pageview on ${new URL(event.properties.$current_url).pathname}`:actionData.name=`${event.event} event`;increment&&(actionData.name=actionData.name+" "+increment),"submit"===event.properties.$event_type&&actionData.steps?.length&&(actionData.steps[0].properties=[{key:"$event_type",value:"submit",type:_types__WEBPACK_IMPORTED_MODULE_7__.FT.Event,operator:_types__WEBPACK_IMPORTED_MODULE_7__.WV.Exact}]);try{action=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.actions.create(actionData)}catch(response){if("validation_error"===response.type&&"unique"===response.code&&increment<30)return recurse(teamId,event,increment+1,dataAttributes,recurse);lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.error((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["Couldn't create this action. You can try"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_4__.r,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_6__.j.createAction(),children:"manually creating an action instead."})]}));return}action.id&&(kea_router__WEBPACK_IMPORTED_MODULE_0__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_6__.j.action(action.id)),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_3__.UJ.success("Action created"))}},"./frontend/src/scenes/activity/explore/defaults.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{w:()=>getDefaultEventsSceneQuery});var _queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/queries/nodes/DataTable/utils.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/queries/schema.ts");let getDefaultEventsSceneQuery=properties=>({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.DataTableNode,full:!0,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery,select:(0,_queries_nodes_DataTable_utils__WEBPACK_IMPORTED_MODULE_0__.Qi)(_queries_schema__WEBPACK_IMPORTED_MODULE_1__.OH.EventsQuery),orderBy:["timestamp DESC"],after:"-24h",...properties?{properties}:{}},propertiesViaUrl:!0,showSavedQueries:!0,showPersistentColumnConfigurator:!0})},"./frontend/src/scenes/activity/live/liveEventsTableLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>liveEventsTableLogic});var _microsoft_fetch_event_source__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/@microsoft+fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/fetch.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_utils_apiHost__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/apiHost.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ERROR_TOAST_ID="live-stream-error",liveEventsTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","activity","live-events","liveEventsTableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_2__.H,["currentTeam"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(()=>({addEvents:events=>({events}),clearEvents:!0,setFilters:filters=>({filters}),updateEventsConnection:!0,pauseStream:!0,resumeStream:!0,setCurEventProperties:curEventProperties=>({curEventProperties}),setClientSideFilters:clientSideFilters=>({clientSideFilters}),pollStats:!0,setStats:stats=>({stats}),addEventHost:eventHost=>({eventHost})})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({events:[[],{addEvents:(state,_ref)=>{let{events}=_ref,newState=[...events,...state];return newState.length>500?newState.slice(0,400):newState},clearEvents:()=>[]}],filters:[{eventType:null},{setFilters:(state,_ref2)=>{let{filters}=_ref2;return{...state,...filters}}}],clientSideFilters:[{},{setClientSideFilters:(_,_ref3)=>{let{clientSideFilters}=_ref3;return clientSideFilters}}],streamPaused:[!1,{pauseStream:()=>!0,resumeStream:()=>!1}],curEventProperties:[[],{setCurEventProperties:(_,_ref4)=>{let{curEventProperties}=_ref4;return curEventProperties}}],stats:[{users_on_product:null},{setStats:(_,_ref5)=>{let{stats}=_ref5;return stats}}],lastBatchTimestamp:[null,{addEvents:(state,_ref6)=>{let{events}=_ref6;return events.length>0?performance.now():state}}],eventHosts:[[],{addEventHost:(state,_ref7)=>{let{eventHost}=_ref7;return state.includes(eventHost)?state:[...state,eventHost]}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)(_ref8=>{let{selectors}=_ref8;return{eventCount:[()=>[selectors.events],events=>events.length],filteredEvents:[s=>[s.events,s.clientSideFilters],(events,clientSideFilters)=>events.filter(event=>Object.entries(clientSideFilters).every(_ref9=>{let[key,value]=_ref9;return event[key]===value}))]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref10=>{let{actions,values,cache,props}=_ref10;return{setFilters:()=>{actions.clearEvents(),actions.updateEventsConnection()},updateEventsConnection:async()=>{if(cache.eventSourceController&&cache.eventSourceController.abort(),values.streamPaused||!values.currentTeam)return;let{eventType}=values.filters,url=new URL(`${(0,lib_utils_apiHost__WEBPACK_IMPORTED_MODULE_4__.K)()}/events`);eventType&&url.searchParams.append("eventType",eventType),cache.batch=[],cache.eventSourceController=new AbortController,await (0,_microsoft_fetch_event_source__WEBPACK_IMPORTED_MODULE_5__.L)(url.toString(),{headers:{Authorization:`Bearer ${values.currentTeam.live_events_token}`},signal:cache.eventSourceController.signal,onmessage:event=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.dismiss(ERROR_TOAST_ID);let eventData=JSON.parse(event.data);cache.batch.push(eventData),(cache.batch.length>=10||performance.now()-(values.lastBatchTimestamp||0)>300)&&(actions.addEvents(cache.batch),cache.batch.length=0)},onerror:error=>{!cache.hasShownLiveStreamErrorToast&&props.showLiveStreamErrorToast&&(console.error("Failed to poll events. You likely have no events coming in.",error),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(`No live events found. Continuing to retry in the background…`,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.$j,{}),toastId:ERROR_TOAST_ID,autoClose:!1}),cache.hasShownLiveStreamErrorToast=!0)}})},pauseStream:()=>{cache.eventSourceController&&cache.eventSourceController.abort()},resumeStream:()=>{actions.updateEventsConnection()},pollStats:async()=>{try{if(!values.currentTeam)return;let response=await fetch(`${(0,lib_utils_apiHost__WEBPACK_IMPORTED_MODULE_4__.K)()}/stats`,{headers:{Authorization:`Bearer ${values.currentTeam.live_events_token}`}}),data=await response.json();actions.setStats(data)}catch(error){console.error("Failed to poll stats:",error)}},addEvents:_ref11=>{let{events}=_ref11;if(events.length>0){let event=events[0],eventUrl=event.properties?.$current_url;if(eventUrl){let eventHost=new URL(eventUrl).host,eventProtocol=new URL(eventUrl).protocol;actions.addEventHost(`${eventProtocol}//${eventHost}`)}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.events)(_ref12=>{let{actions,cache}=_ref12;return{afterMount:()=>{actions.updateEventsConnection(),cache.statsInterval=setInterval(()=>{actions.pollStats()},1500)},beforeUnmount:()=>{cache.eventSourceController&&cache.eventSourceController.abort(),cache.statsInterval&&clearInterval(cache.statsInterval)}}})])},"./frontend/src/scenes/annotations/AnnotationModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>AnnotationModal,i:()=>NewAnnotationButton});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/types.ts"),_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/annotations/annotationModalLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function NewAnnotationButton(){let{openModalToCreateAnnotation}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.bE);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary","data-attr":"create-annotation",onClick:()=>openModalToCreateAnnotation(),children:"New annotation"})}function AnnotationModal(_ref){let{overlayRef,contentRef}=_ref,{isModalOpen,existingModalAnnotation,annotationModal,isAnnotationModalSubmitting,onSavedInsight,timezone}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.bE),{closeModal,deleteAnnotation,submitAnnotationModal}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.bE);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.fQ,{overlayRef:overlayRef,contentRef:contentRef,isOpen:isModalOpen,onClose:closeModal,title:existingModalAnnotation?"Edit annotation":"New annotation",description:"Use annotations to add context to insights and dashboards.",footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"flex items-center gap-2",children:existingModalAnnotation&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{form:"annotation-modal-form",type:"secondary",status:"danger",onClick:()=>{deleteAnnotation(existingModalAnnotation),closeModal()},"data-attr":"delete-annotation",children:"Delete annotation"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{form:"annotation-modal-form",type:"secondary",onClick:closeModal,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{form:"annotation-modal-form",htmlType:"submit",type:"primary",loading:isAnnotationModalSubmitting,"data-attr":"create-annotation-submit",children:existingModalAnnotation?"Edit":"Create"})]})]}),width:512,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(kea_forms__WEBPACK_IMPORTED_MODULE_2__.Form,{logic:_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.bE,formKey:"annotationModal",id:"annotation-modal-form",enableFormOnSubmit:!0,className:"space-y-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"flex gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_3__.D,{name:"dateMarker",label:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("span",{children:["Date\xa0and\xa0time (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.settings("project","date-and-time"),target:"_blank",children:(0,lib_utils__WEBPACK_IMPORTED_MODULE_4__.ig)(timezone)}),")"]}),className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.he,{granularity:"minute"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_3__.D,{name:"scope",label:"Scope",className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Yv,{options:[{value:_types__WEBPACK_IMPORTED_MODULE_6__.dc.Insight,label:_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.B3[_types__WEBPACK_IMPORTED_MODULE_6__.dc.Insight],tooltip:existingModalAnnotation?.insight_name?existingModalAnnotation.insight_name:existingModalAnnotation?.insight_derived_name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("i",{children:existingModalAnnotation.insight_derived_name}):void 0,disabledReason:!onSavedInsight&&"You need to save the insight first."||(existingModalAnnotation?!existingModalAnnotation?.dashboard_item&&"To select this scope, open this annotation on the target insight":void 0),sideIcon:existingModalAnnotation?.insight_short_id?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.insightView(existingModalAnnotation?.insight_short_id),target:"_blank",targetBlankIcon:!0}):null},{value:_types__WEBPACK_IMPORTED_MODULE_6__.dc.Dashboard,label:_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.B3[_types__WEBPACK_IMPORTED_MODULE_6__.dc.Dashboard],tooltip:existingModalAnnotation?.dashboard_name,disabledReason:!annotationModal.dashboardId&&"To select this scope, open this annotation on the target dashboard"||existingModalAnnotation?.scope===_types__WEBPACK_IMPORTED_MODULE_6__.dc.Dashboard&&"Already scoped to dashboard"||(existingModalAnnotation&&existingModalAnnotation?.dashboard_name?annotationModal.dashboardId!=existingModalAnnotation.dashboard_id&&`To select this scope, open this annotation on the ${existingModalAnnotation?.dashboard_name} dashboard`:void 0),sideIcon:existingModalAnnotation?.dashboard_id&&existingModalAnnotation?.scope!==_types__WEBPACK_IMPORTED_MODULE_6__.dc.Dashboard&&existingModalAnnotation.dashboard_id!==annotationModal.dashboardId?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_5__.j.dashboard(existingModalAnnotation?.dashboard_id),target:"_blank",targetBlankIcon:!0}):null},{value:_types__WEBPACK_IMPORTED_MODULE_6__.dc.Project,label:_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.B3[_types__WEBPACK_IMPORTED_MODULE_6__.dc.Project]},{value:_types__WEBPACK_IMPORTED_MODULE_6__.dc.Organization,label:_annotationModalLogic__WEBPACK_IMPORTED_MODULE_7__.B3[_types__WEBPACK_IMPORTED_MODULE_6__.dc.Organization]}],fullWidth:!0})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_3__.D,{name:"content",label:"Content",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__._V,{placeholder:"What's this annotation about?",onPressCmdEnter:submitAnnotationModal,"data-attr":"create-annotation-input",maxLength:400})})]})})}},"./frontend/src/scenes/annotations/annotationModalLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B3:()=>annotationScopeToName,bE:()=>annotationModalLogic,nO:()=>annotationScopeToLevel,yD:()=>ANNOTATION_DAYJS_FORMAT});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_dayjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_models_annotationsModel__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/models/annotationsModel.ts"),_types__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/types.ts");let ANNOTATION_DAYJS_FORMAT="MMMM\xa0DD,\xa0YYYY h:mm\xa0A",annotationScopeToName={[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Insight]:"Insight",[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Dashboard]:"Dashboard",[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Project]:"Project",[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Organization]:"Organization"},annotationScopeToLevel={[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Insight]:0,[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Dashboard]:1,[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Project]:2,[_types__WEBPACK_IMPORTED_MODULE_10__.dc.Organization]:3},annotationModalLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","annotations","annotationModalLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_models_annotationsModel__WEBPACK_IMPORTED_MODULE_9__.AT,["loadAnnotationsNext","loadAnnotationsSuccess","replaceAnnotation","appendAnnotations","deleteAnnotation"]],values:[_models_annotationsModel__WEBPACK_IMPORTED_MODULE_9__.AT,["annotations","annotationsLoading","next","loadingNext"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["timezone"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["user"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({openModalToCreateAnnotation:(initialDate,insightId,dashboardId)=>({initialDate,insightId,dashboardId}),openModalToEditAnnotation:(annotation,insightId,dashboardId)=>({annotation,insightId,dashboardId}),closeModal:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(()=>({isModalOpen:[!1,{openModalToCreateAnnotation:()=>!0,openModalToEditAnnotation:()=>!0,closeModal:()=>!1}],existingModalAnnotation:[null,{openModalToCreateAnnotation:()=>null,openModalToEditAnnotation:(_,_ref)=>{let{annotation}=_ref;return annotation}}],onSavedInsight:[!1,{openModalToCreateAnnotation:(_,_ref2)=>{let{insightId}=_ref2;return!!insightId},openModalToEditAnnotation:(_,_ref3)=>{let{insightId}=_ref3;return!!insightId}}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref4=>{let{cache,actions,values}=_ref4;return{openModalToEditAnnotation:_ref5=>{let{annotation:{date_marker,scope,content},insightId,dashboardId}=_ref5;actions.setAnnotationModalValues({dateMarker:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_4__.Bv)(date_marker).tz(values.timezone),scope,content}),insightId&&actions.setAnnotationModalValue("dashboardItemId",insightId),dashboardId&&actions.setAnnotationModalValue("dashboardId",dashboardId)},openModalToCreateAnnotation:_ref6=>{let{initialDate,insightId,dashboardId}=_ref6;actions.resetAnnotationModal(),initialDate&&actions.setAnnotationModalValue("dateMarker",initialDate),insightId&&actions.setAnnotationModalValue("dashboardItemId",insightId),dashboardId&&actions.setAnnotationModalValue("dashboardId",dashboardId)},loadAnnotationsSuccess:_ref7=>{let{rawAnnotations}=_ref7;if(!values.isModalOpen&&cache.annotationToShowId){let annotation=rawAnnotations.find(a=>a.id===cache.annotationToShowId);if(!annotation)return;actions.openModalToEditAnnotation((0,_models_annotationsModel__WEBPACK_IMPORTED_MODULE_9__.vH)(annotation,scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H.values.timezone)),delete cache.annotationToShowId}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({shouldShowEmptyState:[s=>[s.annotations,s.annotationsLoading],(annotations,annotationsLoading)=>0===annotations.length&&!annotationsLoading]})),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref8=>{let{actions,values}=_ref8;return{annotationModal:{defaults:{dateMarker:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_4__.Bv)().tz(values.timezone),content:"",scope:_types__WEBPACK_IMPORTED_MODULE_10__.dc.Project,dashboardItemId:null,dashboardId:null},errors:_ref9=>{let{content}=_ref9;return{content:content?.trim()?null:"An annotation must have text content."}},submit:async data=>{let{dateMarker,content,scope,dashboardItemId,dashboardId}=data;if(values.existingModalAnnotation){let updatedAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.annotations.update(values.existingModalAnnotation.id,{date_marker:dateMarker.toISOString(),content,scope,dashboard_item:dashboardItemId,dashboard_id:values.existingModalAnnotation.dashboard_id});actions.replaceAnnotation(updatedAnnotation)}else{let createdAnnotation=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.annotations.create({date_marker:dateMarker.toISOString(),content,scope,dashboard_item:dashboardItemId,dashboard_id:dashboardId});actions.appendAnnotations([createdAnnotation])}actions.closeModal()}}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref10=>{let{values,actions,cache}=_ref10;return{[scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.annotation(":id")]:_ref11=>{let{id}=_ref11;cache.annotationToShowId=parseInt(id);let annotation=values.annotations.find(a=>a.id===cache.annotationToShowId);annotation&&actions.openModalToEditAnnotation(annotation)}}})])},"./frontend/src/scenes/authentication/loginLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>loginLogic,w:()=>handleLoginRedirect});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts");function handleLoginRedirect(){let nextURL="/";try{let nextPath=kea_router__WEBPACK_IMPORTED_MODULE_3__.router.values.searchParams.next||"/",url=new URL(nextPath.startsWith("/")?location.origin+nextPath:nextPath);("http:"===url.protocol||"https:"===url.protocol)&&(nextURL=url.pathname+url.search+(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.encodeParams)(kea_router__WEBPACK_IMPORTED_MODULE_3__.router.values.hashParams,"#"))}catch(e){}kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.replace(nextURL)}let loginLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","authentication","loginLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__.preflightLogic,["preflight"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setGeneralError:(code,detail)=>({code,detail}),clearGeneralError:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({generalError:[null,{setGeneralError:(_,error)=>error,clearGeneralError:()=>null}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(()=>({precheckResponse:[{status:"pending"},{precheck:async(_ref,breakpoint)=>{let{email}=_ref;if(!email)return{status:"pending"};breakpoint();let response=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/login/precheck",{email});return{status:"completed",...response}}}]})),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref2=>{let{actions,values}=_ref2;return{login:{defaults:{email:"",password:""},errors:_ref3=>{let{email,password}=_ref3;return{email:email?void 0:"Please enter your email to continue",password:password?void 0:"Please enter your password to continue"}},submit:async(_ref4,breakpoint)=>{let{email,password}=_ref4;breakpoint();try{return await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/login",{email,password})}catch(e){let{code}=e,{detail}=e;if("2fa_required"===code)throw kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.login2FA()),e;throw"invalid_credentials"===code&&values.preflight?.cloud&&(detail+=" Make sure you have selected the right data region."),actions.setGeneralError(code,detail),e}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)({submitLoginSuccess:()=>{handleLoginRedirect(),window.location.reload()}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref5=>{let{actions}=_ref5;return{"/login":(_,_ref6)=>{let{error_code,error_detail,email}=_ref6;error_code&&(actions.setGeneralError(error_code,error_detail),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.replace("/login",{})),email&&(actions.setLoginValue("email",email),actions.precheck({email}))}}})])},"./frontend/src/scenes/authentication/signup/verify-email/verifyEmailLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>verifyEmailLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx");let verifyEmailLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","authentication","verifyEmailLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setView:view=>({view}),setUuid:uuid=>({uuid}),requestVerificationLink:uuid=>({uuid}),validateEmailTokenSuccess:response=>({response})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{actions}=_ref;return{validatedEmailToken:[null,{validateEmailToken:async(_ref2,breakpoint)=>{let{uuid,token}=_ref2;try{return await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/users/verify_email/",{token,uuid}),actions.setView("success"),await breakpoint(2e3),window.location.href="/",{success:!0,token,uuid}}catch(e){return actions.setView("invalid"),{success:!1,errorCode:e.code,errorDetail:e.detail}}}}],newlyRequestedVerificationLink:[null,{requestVerificationLink:async _ref3=>{let{uuid}=_ref3;try{return await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/users/request_email_verification/",{uuid}),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.success("A new verification link has been sent to the associated email address. Please check your inbox."),!0}catch(e){if("throttled"===e.code)return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error("You have requested a new verification link too many times. Please try again later."),!1;return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error("Requesting verification link failed. Please try again later or contact support."),!1}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({view:[null,{setView:(_,_ref4)=>{let{view}=_ref4;return view}}],uuid:[null,{setUuid:(_,_ref5)=>{let{uuid}=_ref5;return uuid}}]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref6=>{let{actions}=_ref6;return{"/verify_email/:uuid":_ref7=>{let{uuid}=_ref7;uuid&&(actions.setUuid(uuid),actions.setView("pending"))},"/verify_email/:uuid/:token":_ref8=>{let{uuid,token}=_ref8;token&&uuid&&(actions.setUuid(uuid),actions.setView("verify"),actions.validateEmailToken({uuid,token}))},"/verify_email":()=>{actions.setView("invalid")}}})])},"./frontend/src/scenes/authentication/twoFactorLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>twoFactorLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/organization/membersLogic.tsx"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let twoFactorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","authentication","loginLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_7__.preflightLogic,["preflight"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__.h,["featureFlags"],scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["user"]],actions:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["loadUser"],scenes_organization_membersLogic__WEBPACK_IMPORTED_MODULE_6__.m,["loadAllMembers"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setGeneralError:(code,detail)=>({code,detail}),clearGeneralError:!0,loadStatus:!0,generateBackupCodes:!0,disable2FA:!0,openTwoFactorSetupModal:forceOpen=>({forceOpen}),closeTwoFactorSetupModal:!0,toggleDisable2FAModal:open1=>({open:open1}),toggleBackupCodesModal:open1=>({open:open1})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({isTwoFactorSetupModalOpen:[!1,{openTwoFactorSetupModal:()=>!0,closeTwoFactorSetupModal:()=>!1}],forceOpenTwoFactorSetupModal:[!1,{openTwoFactorSetupModal:(_,_ref)=>{let{forceOpen}=_ref;return!!forceOpen},closeTwoFactorSetupModal:()=>!1}],isDisable2FAModalOpen:[!1,{toggleDisable2FAModal:(_,_ref2)=>{let{open:open1}=_ref2;return open1}}],isBackupCodesModalOpen:[!1,{toggleBackupCodesModal:(_,_ref3)=>{let{open:open1}=_ref3;return open1}}],generalError:[null,{setGeneralError:(_,error)=>error,clearGeneralError:()=>null}],status:[null,{loadStatusSuccess:(_,_ref4)=>{let{status}=_ref4;return status},generateBackupCodesSuccess:(state,_ref5)=>{let{generatingCodes}=_ref5;return state?{...state,backup_codes:generatingCodes?.backup_codes||state.backup_codes}:null}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({is2FAEnabled:[s=>[s.status],status=>!!status?.is_enabled]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(()=>({startSetup:[{},{openTwoFactorSetupModal:async(_,breakpoint)=>(breakpoint(),await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.get("api/users/@me/two_factor_start_setup/"),{status:"completed"})}],status:[null,{loadStatus:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.get("api/users/@me/two_factor_status/")}],generatingCodes:[null,{generateBackupCodes:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/users/@me/two_factor_backup_codes/")}]})),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref6=>{let{actions}=_ref6;return{token:{defaults:{token:null},errors:_ref7=>{let{token}=_ref7;return{token:token?void 0:"Please enter a token to continue"}},submit:async(_ref8,breakpoint)=>{let{token}=_ref8;breakpoint();try{return await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/users/@me/two_factor_validate/",{token})}catch(e){let{code,detail}=e;throw actions.setGeneralError(code,detail),e}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref9=>{let{props,actions}=_ref9;return{submitTokenSuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("2FA method added successfully"),actions.loadStatus(),props.onSuccess?.()},disable2FA:async()=>{try{await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/users/@me/two_factor_disable/"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("2FA disabled successfully"),actions.loadStatus(),actions.loadUser(),actions.loadAllMembers()}catch(e){let{code,detail}=e;throw actions.setGeneralError(code,detail),e}},generateBackupCodesSuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Backup codes generated successfully")},closeTwoFactorSetupModal:()=>{actions.resetToken()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref10=>{let{actions,values}=_ref10;actions.loadStatus(),values.user&&values.user.organization?.enforce_2fa&&!values.user.is_2fa_enabled&&actions.openTwoFactorSetupModal(!0)})])},"./frontend/src/scenes/billing/Billing.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Billing:()=>Billing_Billing,scene:()=>scene});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),Billing=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/Billing.scss"),Billing_default=__webpack_require__.n(Billing),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(Billing_default(),options),Billing_default().locals;var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonLabel=__webpack_require__("./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.tsx"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),BillingUpgradeCTA=__webpack_require__("./frontend/src/lib/components/BillingUpgradeCTA.tsx"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),bundle_esm=__webpack_require__("./node_modules/.pnpm/use-resize-observer@8.0.0_react-dom@18.2.0_react@18.2.0/node_modules/use-resize-observer/dist/bundle.esm.js"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),billingProductLogic=__webpack_require__("./frontend/src/scenes/billing/billingProductLogic.ts"),paymentEntryLogic=__webpack_require__("./frontend/src/scenes/billing/paymentEntryLogic.ts"),PlanComparison=__webpack_require__("./frontend/src/scenes/billing/PlanComparison.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let BillingCTAHero=_ref=>{let{product}=_ref,{width,ref:billingHeroRef}=(0,bundle_esm.Z)(),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),{showPaymentEntryModal}=(0,index_esm.useActions)(paymentEntryLogic.j),{redirectPath}=(0,index_esm.useValues)(billingLogic.kr),{isPlanComparisonModalOpen,billingProductLoading}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product})),{toggleIsPlanComparisonModalOpen,setBillingProductLoading}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product}));return(0,jsx_runtime.jsxs)("div",{className:"flex relative justify-between items-center rounded-lg bg-mark",ref:billingHeroRef,children:[(0,jsx_runtime.jsxs)("div",{className:"p-4",children:[(0,jsx_runtime.jsx)("h1",{className:"mb-0",children:"Get the whole hog."}),(0,jsx_runtime.jsx)("h1",{className:"text-danger",children:"Only pay for what you use."}),(0,jsx_runtime.jsxs)("div",{className:"mt-2 mb-0 max-w-xl",children:[(0,jsx_runtime.jsx)("p",{children:"PostHog comes with all product features on every plan."}),(0,jsx_runtime.jsx)("p",{children:"Add your credit card to remove usage limits and unlock all platform features. Set billing limits as low as $0 to control your spend."}),(0,jsx_runtime.jsx)("p",{className:"italic",children:"P.S. You still keep the monthly free allotment for every product!"})]}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-start space-x-2",children:["test"==featureFlags[constants.y8.BILLING_PAYMENT_ENTRY_IN_APP]?(0,jsx_runtime.jsx)(BillingUpgradeCTA.y,{className:"mt-4 inline-block",type:"primary",status:"alt","data-attr":"billing-page-core-upgrade-cta",disableClientSideRouting:!0,loading:!!billingProductLoading,onClick:showPaymentEntryModal,children:"Upgrade now"}):(0,jsx_runtime.jsx)(BillingUpgradeCTA.y,{className:"mt-4 inline-block",to:`/api/billing/activate?products=all_products:&redirect_path=${redirectPath}`,type:"primary",status:"alt","data-attr":"billing-page-core-upgrade-cta",disableClientSideRouting:!0,loading:!!billingProductLoading,onClick:()=>setBillingProductLoading(product.type),children:"Upgrade now"}),(0,jsx_runtime.jsx)(src.Jp,{className:"mt-4 inline-block",onClick:()=>toggleIsPlanComparisonModalOpen(),type:"primary",children:"Compare plans"})]})]}),width&&width>500&&(0,jsx_runtime.jsx)("div",{className:"shrink-0 relative w-50 pt-4 overflow-hidden",children:(0,jsx_runtime.jsx)(hedgehogs.BlushingHog,{className:"w-50 h-50 -my-5"})}),(0,jsx_runtime.jsx)(PlanComparison.S0,{product:product,title:"Compare our plans",includeAddons:!1,modalOpen:isPlanComparisonModalOpen,onClose:()=>toggleIsPlanComparisonModalOpen()})]})};var BillingProduct=__webpack_require__("./frontend/src/scenes/billing/BillingProduct.tsx"),CreditCTAHero=__webpack_require__("./frontend/src/scenes/billing/CreditCTAHero.tsx"),react_stripe_umd=__webpack_require__("./node_modules/.pnpm/@stripe+react-stripe-js@2.8.0_@stripe+stripe-js@4.5.0_react-dom@18.2.0_react@18.2.0/node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js");let stripeJs=async()=>await __webpack_require__.e(19431).then(__webpack_require__.bind(__webpack_require__,"./node_modules/.pnpm/@stripe+stripe-js@4.5.0/node_modules/@stripe/stripe-js/lib/index.mjs")),PaymentForm=()=>{let{error,isLoading}=(0,index_esm.useValues)(paymentEntryLogic.j),{setError,hidePaymentEntryModal,pollAuthorizationStatus,setLoading}=(0,index_esm.useActions)(paymentEntryLogic.j),stripe=(0,react_stripe_umd.useStripe)(),elements=(0,react_stripe_umd.useElements)(),handleSubmit=async event=>{if(event.preventDefault(),!stripe||!elements)return;setLoading(!0);let result=await stripe.confirmPayment({elements,confirmParams:{return_url:`${window.location.origin}/billing/authorization_status`},redirect:"if_required"});result.error?(setLoading(!1),setError(result.error.message)):pollAuthorizationStatus(result.paymentIntent.id)};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(react_stripe_umd.PaymentElement,{}),(0,jsx_runtime.jsx)("p",{className:"text-xs text-muted mt-0.5",children:"Your card will not be charged but we place a $0.50 hold on it to verify your card that will be released in 7 days."}),error&&(0,jsx_runtime.jsx)("div",{className:"error",children:error}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-end space-x-2 mt-2",children:[(0,jsx_runtime.jsx)(src.Jp,{disabled:isLoading,type:"secondary",onClick:hidePaymentEntryModal,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{loading:isLoading,type:"primary",onClick:event=>void handleSubmit(event),children:"Submit"})]})]})},PaymentEntryModal=_ref=>{let{redirectPath=urls.j.organizationBilling()}=_ref,{clientSecret,paymentEntryModalOpen}=(0,index_esm.useValues)(paymentEntryLogic.j),{hidePaymentEntryModal,initiateAuthorization}=(0,index_esm.useActions)(paymentEntryLogic.j),[stripePromise,setStripePromise]=(0,react.useState)(null);return(0,react.useEffect)(()=>{if(paymentEntryModalOpen&&!stripePromise){let loadStripeJs=async()=>{let{loadStripe}=await stripeJs(),publicKey=window.STRIPE_PUBLIC_KEY;setStripePromise(await loadStripe(publicKey))};loadStripeJs()}},[paymentEntryModalOpen,stripePromise]),(0,react.useEffect)(()=>{paymentEntryModalOpen&&initiateAuthorization(redirectPath)},[paymentEntryModalOpen,initiateAuthorization,redirectPath]),(0,jsx_runtime.jsx)(src.fQ,{onClose:hidePaymentEntryModal,width:"max(44vw)",isOpen:paymentEntryModalOpen,title:"Add your payment details to subscribe",description:"",children:(0,jsx_runtime.jsx)("div",{children:clientSecret?(0,jsx_runtime.jsx)(react_stripe_umd.Elements,{stripe:stripePromise,options:{clientSecret},children:(0,jsx_runtime.jsx)(PaymentForm,{})}):(0,jsx_runtime.jsxs)("div",{className:"min-h-80 flex flex-col justify-center items-center",children:[(0,jsx_runtime.jsx)("p",{className:"text-muted text-md mt-4",children:"We're contacting the Hedgehogs for approval."}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,jsx_runtime.jsx)("div",{className:"text-4xl",children:(0,jsx_runtime.jsx)(src.$j,{})}),(0,jsx_runtime.jsx)(hedgehogs.WavingHog,{className:"w-18 h-18"})]})]})})})},UnsubscribeCard=_ref=>{let{product}=_ref,{reportSurveyShown,setSurveyResponse}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product})),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw);return(0,jsx_runtime.jsx)("div",{className:"p-5 gap-4 flex",children:(0,jsx_runtime.jsxs)("div",{className:"",children:[(0,jsx_runtime.jsx)("h3",{children:"Need to take a break?"}),(0,jsx_runtime.jsx)("p",{className:"mb-2",children:"Downgrade to the free plan at any time. You'll lose access to platform features and usage limits will apply immediately."}),(0,jsx_runtime.jsxs)("p",{className:"",children:["Need to control your costs? Learn about ways to"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/billing/estimating-usage-costs#how-to-reduce-your-posthog-costs?utm_source=app-unsubscribe",target:"_blank",children:"reduce your bill"})," ","or"," ",(0,jsx_runtime.jsx)(src.rU,{to:"",onClick:()=>openSupportForm({target_area:"billing",isEmailFormOpen:!0}),children:"chat with support."})," ","Check out more about our pricing on our"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/pricing",target:"_blank",children:"pricing page"}),"."]}),(0,jsx_runtime.jsx)(src.Jp,{status:"danger",type:"secondary",size:"small",onClick:()=>{setSurveyResponse("$survey_response_1",product.type),reportSurveyShown(constants.E1,product.type)},children:"Downgrade to free plan"})]})})},scene={component:Billing_Billing,logic:billingLogic.kr};function Billing_Billing(){let{billing,billingLoading,isOnboarding,showLicenseDirectInput,isActivateLicenseSubmitting,billingError}=(0,index_esm.useValues)(billingLogic.kr),{reportBillingShown}=(0,index_esm.useActions)(billingLogic.kr),{preflight,isCloudOrDev}=(0,index_esm.useValues)(preflightLogic.preflightLogic),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw);preflight&&!isCloudOrDev&&kea_router_lib.router.actions.push(urls.j.default()),(0,react.useEffect)(()=>{billing&&reportBillingShown()},[!!billing]);let{ref,size}=(0,useResizeObserver.S)({0:"small",1e3:"medium"});if(!billing&&billingLoading)return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(Spinner.t,{sceneLevel:!0})});if(!billing&&!billingLoading)return(0,jsx_runtime.jsx)("div",{className:"space-y-4",children:(0,jsx_runtime.jsxs)(LemonBanner.V,{type:"error",children:["There was an issue retrieving your current billing information. If this message persists, please ",preflight?.cloud?(0,jsx_runtime.jsx)(src.rU,{onClick:()=>openSupportForm({kind:"bug",target_area:"billing"}),children:"submit a bug report"}):(0,jsx_runtime.jsx)(src.rU,{to:"mailto:sales@posthog.com",children:"contact sales@posthog.com"}),"."]})});let products=billing?.products,platformAndSupportProduct=products?.find(product=>"platform_and_support"===product.type);return(0,jsx_runtime.jsxs)("div",{ref:ref,children:[(0,jsx_runtime.jsx)(PaymentEntryModal,{}),showLicenseDirectInput&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(lib.Form,{logic:billingLogic.kr,formKey:"activateLicense",enableFormOnSubmit:!0,className:"space-y-4",children:[(0,jsx_runtime.jsx)(lib.Field,{name:"license",label:"Activate license key",children:(0,jsx_runtime.jsx)(src.DF,{fullWidth:!0,autoFocus:!0})}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",htmlType:"submit",loading:isActivateLicenseSubmitting,fullWidth:!0,center:!0,children:"Activate license key"})]})}),billingError&&(0,jsx_runtime.jsx)(LemonBanner.V,{type:billingError.status,className:"mb-2",action:billingError.action,children:billingError.message}),billing?.trial?(0,jsx_runtime.jsxs)(LemonBanner.V,{type:"info",className:"mb-2",children:["You are currently on a free trial for ",(0,jsx_runtime.jsxs)("b",{children:[(0,utils.wR)(billing.trial.target)," plan"]})," until"," ",(0,jsx_runtime.jsx)("b",{children:(0,dayjs.Bv)(billing.trial.expires_at).format("LL")}),". At the end of the trial"," ","autosubscribe"===billing.trial.type?"you will be automatically subscribed to the plan.":"you will be asked to subscribe. If you choose not to, you will lose access to the features."]}):null,!billing?.has_active_subscription&&platformAndSupportProduct&&(0,jsx_runtime.jsx)("div",{className:"mb-4",children:(0,jsx_runtime.jsx)(BillingCTAHero,{product:platformAndSupportProduct})}),(0,jsx_runtime.jsx)(CreditCTAHero.p,{}),(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("flex justify-between",{"flex-col gap-4":"small"===size,"flex-row":"small"!==size}),children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("flex flex-wrap gap-6 w-fit mb-4",{"flex-col items-stretch":"small"===size,"items-center":"small"!==size}),children:!isOnboarding&&billing?.billing_period&&(0,jsx_runtime.jsx)("div",{className:"flex-1 pt-2",children:(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[billing?.has_active_subscription&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-row gap-10 items-end",children:[(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(LemonLabel.H,{info:`This is the current amount you have been billed for this ${billing.billing_period.interval} so far. This number updates once daily.`,children:"Current bill total"}),(0,jsx_runtime.jsx)("div",{className:"font-bold text-6xl",children:billing.discount_percent?(0,utils.Cp)(billing.current_total_amount_usd_after_discount):(0,utils.Cp)(billing.current_total_amount_usd)})]}),billing?.discount_amount_usd&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(LemonLabel.H,{info:`The total credits remaining in your account. ${billing?.amount_off_expires_at?"Your credits expire on "+billing?.amount_off_expires_at?.format("LL"):null}`,className:"text-muted",children:"Available credits"}),(0,jsx_runtime.jsx)("div",{className:"font-semibold text-2xl text-muted",children:(0,utils.Cp)(billing?.discount_amount_usd,0)})]}),billing?.discount_percent&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(LemonLabel.H,{info:"The discount applied to your current bill, reflected in the total amount.",className:"text-muted",children:"Applied discount"}),(0,jsx_runtime.jsxs)("div",{className:"font-semibold text-2xl text-muted",children:[billing.discount_percent,"%"]})]})]})}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("p",{className:"ml-0 mb-0",children:[billing?.has_active_subscription?"Billing period":"Cycle",":"," ",(0,jsx_runtime.jsx)("b",{children:billing.billing_period.current_period_start.format("LL")})," to"," ",(0,jsx_runtime.jsx)("b",{children:billing.billing_period.current_period_end.format("LL")})," (",billing.billing_period.current_period_end.diff((0,dayjs.Bv)(),"days")," days remaining)"]}),!billing.has_active_subscription&&(0,jsx_runtime.jsx)("p",{className:"italic ml-0 text-muted mb-0",children:"Monthly free allocation resets at the end of the cycle."})]})]})})}),!isOnboarding&&billing?.customer_id&&billing?.stripe_portal_url&&(0,jsx_runtime.jsx)("div",{className:"w-fit",children:(0,jsx_runtime.jsx)(src.Jp,{type:"primary",htmlType:"submit",to:billing.stripe_portal_url,disableClientSideRouting:!0,targetBlank:!0,center:!0,"data-attr":"manage-billing",children:billing.has_active_subscription?"Manage card details and invoices":"View past invoices"})})]})}),(0,jsx_runtime.jsx)(src.p2,{className:"mt-6 mb-8"}),(0,jsx_runtime.jsx)("div",{className:"flex justify-between mt-4",children:(0,jsx_runtime.jsx)("h2",{children:"Products"})}),products?.filter(product=>!product.inclusion_only||product.plans.some(plan=>!plan.included_if))?.map(x=>jsx_runtime.jsx("div",{children:jsx_runtime.jsx(BillingProduct.LB,{product:x})},x.type)),(0,jsx_runtime.jsx)("div",{children:billing?.subscription_level=="paid"&&platformAndSupportProduct?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.p2,{}),(0,jsx_runtime.jsx)(UnsubscribeCard,{product:platformAndSupportProduct})]}):null})]})}},"./frontend/src/scenes/billing/BillingGauge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V:()=>BillingGauge_BillingGauge});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),BillingGauge=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/BillingGauge.scss"),BillingGauge_default=__webpack_require__.n(BillingGauge),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(BillingGauge_default(),options),BillingGauge_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let BillingGaugeItem=_ref=>{let{item,maxValue,isWithinUsageLimit}=_ref,width=`${item.value/maxValue*100}%`;return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)(`BillingGaugeItem BillingGaugeItem--${item.type}`,{"BillingGaugeItem--within-usage-limit":isWithinUsageLimit},"absolute top-0 left-0 bottom-0 h-2"),style:{"--billing-gauge-item-width":width},children:[(0,jsx_runtime.jsx)("div",{className:"absolute right-0 w-px h-full bg-bg-light"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:item.prefix?`${item.prefix}${item.value.toLocaleString()}`:item.value.toLocaleString(),placement:"right",children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("BillingGaugeItem__info",{"BillingGaugeItem__info--bottom":!item.top}),children:[(0,jsx_runtime.jsx)("b",{children:item.text}),(0,jsx_runtime.jsx)("div",{children:item.prefix?`${item.prefix}${(0,utils.JP)(item.value)}`:(0,utils.JP)(item.value)})]})})]})};function BillingGauge_BillingGauge(_ref2){let{items,product}=_ref2,maxValue=(0,react.useMemo)(()=>1.3*Math.max(100,...items.map(item=>item.value)),[items]),isWithinUsageLimit=product.percentage_usage<=1;return(0,jsx_runtime.jsx)("div",{className:"relative h-2 bg-border-light my-16",children:items.map((item,i)=>(0,jsx_runtime.jsx)(BillingGaugeItem,{item:item,maxValue:maxValue,isWithinUsageLimit:isWithinUsageLimit},i))})}},"./frontend/src/scenes/billing/BillingPopup.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>openBillingPopupModal});var lib_lemon_ui_LemonDialog__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/index.ts"),_Billing__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/scenes/billing/Billing.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function openBillingPopupModal(){let{title="Unlock premium features",description}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lib_lemon_ui_LemonDialog__WEBPACK_IMPORTED_MODULE_0__.d.open({title:title,description:description,content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Billing__WEBPACK_IMPORTED_MODULE_1__.Billing,{}),width:800,primaryButton:{children:"Maybe later...",type:"secondary"}})}},"./frontend/src/scenes/billing/BillingProduct.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{LB:()=>BillingProduct,F9:()=>FeatureFlagUsageNotice,Fk:()=>getTierDescription});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),BillingUpgradeCTA=__webpack_require__("./frontend/src/lib/components/BillingUpgradeCTA.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Products=__webpack_require__("./frontend/src/scenes/products/Products.tsx"),types=__webpack_require__("./frontend/src/types.ts"),billing_utils=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),BillingGauge=__webpack_require__("./frontend/src/scenes/billing/BillingGauge.tsx"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),billingProductLogic=__webpack_require__("./frontend/src/scenes/billing/billingProductLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let BillingLimit=_ref=>{let{product}=_ref,limitInputRef=(0,react.useRef)(null),{billing,billingLoading}=(0,index_esm.useValues)(billingLogic.kr),{isEditingBillingLimit,customLimitUsd,hasCustomLimitSet,currentAndUpgradePlans}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product,billingLimitInputRef:limitInputRef})),{setIsEditingBillingLimit,setBillingLimitInput,submitBillingLimitInput}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product})),initialBillingLimit=currentAndUpgradePlans?.currentPlan?.initial_billing_limit;return billing?.billing_period?.interval!=="month"||!product.subscribed||product.inclusion_only?null:(0,jsx_runtime.jsx)(lib.Form,{formKey:"billingLimitInput",props:{product:product},logic:billingProductLogic.cD,enableFormOnSubmit:!0,children:(0,jsx_runtime.jsxs)("div",{className:"border-t border-border p-8","data-attr":`billing-limit-input-wrapper-${product.type}`,children:[(0,jsx_runtime.jsx)("h4",{className:"mb-2",children:"Billing limit"}),(0,jsx_runtime.jsx)("div",{className:"flex",children:isEditingBillingLimit?(0,jsx_runtime.jsxs)("div",{className:"flex items-start justify-start gap-2.5",children:[(0,jsx_runtime.jsx)(LemonField.D,{name:"input",className:"max-w-52",children:_ref2=>{let{value,onChange,error}=_ref2;return(0,jsx_runtime.jsx)(src.DF,{inputRef:limitInputRef,type:"number",fullWidth:!1,status:error?"danger":"default",value:value,"data-attr":`billing-limit-input-${product.type}`,onChange:onChange,prefix:(0,jsx_runtime.jsx)("b",{children:"$"}),disabled:billingLoading,min:0,step:10,suffix:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["/ ",billing?.billing_period?.interval]}),size:"small"})}}),(0,jsx_runtime.jsx)(src.Jp,{loading:billingLoading,type:"primary",size:"small",htmlType:"submit","data-attr":`save-billing-limit-${product.type}`,children:"Save"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{setIsEditingBillingLimit(!1)},disabled:billingLoading,type:"secondary",size:"small",children:"Cancel"}),hasCustomLimitSet?(0,jsx_runtime.jsx)(src.Jp,{status:"danger",size:"small","data-attr":`remove-billing-limit-${product.type}`,tooltip:"Remove billing limit",onClick:()=>{setBillingLimitInput(null),submitBillingLimitInput()},children:"Remove limit"}):null]}):(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[hasCustomLimitSet?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[customLimitUsd===initialBillingLimit?(0,jsx_runtime.jsx)(Tooltip.u,{title:"Initial limits protect you from accidentally incurring large unexpected charges. Some features may stop working and data may be dropped if your usage exceeds your limit.",children:(0,jsx_runtime.jsxs)("span",{className:"text-sm","data-attr":`default-billing-limit-${product.type}`,children:["This product has a default initial billing limit of"," ",(0,jsx_runtime.jsxs)("b",{children:["$",initialBillingLimit]}),"."]})}):(0,jsx_runtime.jsx)(Tooltip.u,{title:"Set a billing limit to control your recurring costs. Some features may stop working and data may be dropped if your usage exceeds your limit.",children:(0,jsx_runtime.jsxs)("span",{className:"text-sm","data-attr":`billing-limit-set-${product.type}`,children:["You have a ",(0,jsx_runtime.jsxs)("b",{children:["$",customLimitUsd?.toLocaleString()]})," billing limit set for ",product?.name?.toLowerCase(),"."]})}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>setIsEditingBillingLimit(!0),status:"danger",size:"small",children:"Edit limit"})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{className:"text-sm","data-attr":`billing-limit-not-set-${product.type}`,children:["You do not have a billing limit set for ",product?.name?.toLowerCase(),"."]}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>setIsEditingBillingLimit(!0),status:"danger",size:"small",children:"Set a billing limit"})]})," "]})})]})})};var supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts");let BillingProductAddonActions=_ref=>{let content,{addon,productRef}=_ref,{billing,redirectPath,billingError,timeTotalInSeconds,timeRemainingInSeconds}=(0,index_esm.useValues)(billingLogic.kr),{currentAndUpgradePlans,billingProductLoading,trialLoading}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product:addon,productRef})),{toggleIsPricingModalOpen,reportSurveyShown,setSurveyResponse,initiateProductUpgrade,setTrialModalOpen,activateTrial,cancelTrial}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product:addon})),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),upgradePlan=currentAndUpgradePlans?.upgradePlan,{prorationAmount,isProrated}=(0,react.useMemo)(()=>(0,billing_utils.MG)({timeRemainingInSeconds,timeTotalInSeconds,amountUsd:upgradePlan?.unit_amount_usd,hasActiveSubscription:billing?.has_active_subscription}),[billing?.has_active_subscription,upgradePlan,timeRemainingInSeconds,timeTotalInSeconds]),trialExperiment=featureFlags[constants.y8.BILLING_TRIAL_FLOW],handleTrialActivation=()=>{"modal"===trialExperiment?setTrialModalOpen(!0):"control"===trialExperiment?activateTrial():initiateProductUpgrade(addon,currentAndUpgradePlans?.upgradePlan,redirectPath)};return addon.subscribed&&!addon.inclusion_only?content=addon.contact_support?null:(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,onClick:()=>{setSurveyResponse("$survey_response_1",addon.type),reportSurveyShown(constants.E1,addon.type)},children:"Remove add-on"})}):addon.included_with_main_product?content=(0,jsx_runtime.jsx)(src.oe,{type:"completion",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}),children:"Included with plan"}):billing?.trial&&billing?.trial?.target===addon.type?content=(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-end justify-end",children:[(0,jsx_runtime.jsx)(src.u,{title:(0,jsx_runtime.jsxs)("p",{children:["You are currently on a free trial for ",(0,jsx_runtime.jsx)("b",{children:(0,utils.wR)(billing?.trial?.target||"")})," ","until ",(0,jsx_runtime.jsx)("b",{children:(0,dayjs.Bv)(billing?.trial?.expires_at).format("LL")}),". At the end of the trial"," ",billing?.trial?.type==="autosubscribe"?"you will be automatically subscribed to the plan.":"you will be asked to subscribe. If you choose not to, you will lose access to the features."]}),children:(0,jsx_runtime.jsx)(src.oe,{type:"completion",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}),children:"You're on a trial for this add-on"})}),"enterprise"!==addon.type&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",size:"small",onClick:cancelTrial,loading:trialLoading,className:"mt-1",children:"Cancel trial"})]}):addon.contact_support?content=(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",to:"https://posthog.com/talk-to-a-human",children:"Contact support"}):billing?.trial||(content=(()=>{let showPricing=currentAndUpgradePlans?.upgradePlan?.flat_rate,isTrialEligible=addon.trial&&!!trialExperiment;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[showPricing?(0,jsx_runtime.jsx)("h4",{className:"leading-5 font-bold mb-0 space-x-0.5",children:isTrialEligible?(0,jsx_runtime.jsxs)("span",{children:[addon.trial?.length," day free trial"]}):(0,jsx_runtime.jsx)("span",{children:formatFlatRate(Number(upgradePlan?.unit_amount_usd),upgradePlan?.unit)})}):(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:toggleIsPricingModalOpen,children:"View pricing"}),!addon.inclusion_only&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),size:"small",disableClientSideRouting:!0,disabledReason:billingError&&billingError.message||billing?.subscription_level==="free"&&"Upgrade to add add-ons",loading:billingProductLoading===addon.type,onClick:isTrialEligible?handleTrialActivation:()=>initiateProductUpgrade(addon,currentAndUpgradePlans?.upgradePlan,""),children:isTrialEligible?"Start trial":"Add"})]})})()),(0,jsx_runtime.jsxs)("div",{className:"min-w-64",children:[(0,jsx_runtime.jsx)("div",{className:"ml-4 mt-2 self-center flex items-center justify-end gap-x-3 whitespace-nowrap",children:content}),addon.inclusion_only||addon.contact_support||billing?.trial||addon.subscribed||addon.included_with_main_product?null:addon.trial&&trialExperiment?(0,jsx_runtime.jsxs)("p",{className:"mt-2 text-xs text-muted text-right",children:["You'll have ",addon.trial.length," days to try it out. Then you'll be charged"," ",formatFlatRate(Number(upgradePlan?.unit_amount_usd),upgradePlan?.unit),"."]}):isProrated?(0,jsx_runtime.jsxs)("p",{className:"mt-2 text-xs text-muted text-right",children:["Pay ~$",prorationAmount," today (prorated) and",(0,jsx_runtime.jsx)("br",{}),formatFlatRate(Number(upgradePlan?.unit_amount_usd),upgradePlan?.unit)," every month thereafter."]}):null]})};var ProductPricingModal=__webpack_require__("./frontend/src/scenes/billing/ProductPricingModal.tsx"),UnsubscribeSurveyModal=__webpack_require__("./frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx");let formatFlatRate=(flatRate,unit)=>unit?(0,jsx_runtime.jsxs)("span",{className:"space-x-0.5",children:[(0,jsx_runtime.jsx)("span",{children:(0,utils.Cp)(flatRate)}),(0,jsx_runtime.jsx)("span",{children:"/"}),(0,jsx_runtime.jsx)("span",{children:unit})]}):`$${flatRate}`,BillingProductAddon=_ref=>{let{addon}=_ref,productRef=(0,react.useRef)(null),{billing}=(0,index_esm.useValues)(billingLogic.kr),{isPricingModalOpen,currentAndUpgradePlans,surveyID,trialModalOpen,trialLoading}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product:addon,productRef})),{toggleIsPricingModalOpen,setTrialModalOpen,activateTrial}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product:addon})),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw),upgradePlan=currentAndUpgradePlans?.upgradePlan,productType={plural:`${addon.unit}s`,singular:addon.unit},tierDisplayOptions=[{label:`Per ${productType.singular}`,value:"individual"}];billing?.has_active_subscription&&tierDisplayOptions.push({label:"Current bill",value:"total"});let addonFeatures=currentAndUpgradePlans?.upgradePlan?.features||currentAndUpgradePlans?.currentPlan?.features||addon.features?.filter(feature=>feature.name!==addon.name),is_enhanced_persons_og_customer="enhanced_persons"===addon.type&&addon.plans?.find(plan=>"addon-20240404-og-customers"===plan.plan_key);return(0,jsx_runtime.jsxs)("div",{className:"bg-bg-3000 rounded p-6 flex flex-col",ref:productRef,"data-attr":`billing-product-addon-${addon.type}`,children:[(0,jsx_runtime.jsxs)("div",{className:"sm:flex justify-between gap-x-4",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-x-4",children:[(0,jsx_runtime.jsx)("div",{className:"w-8",children:(0,Products.getProductIcon)(addon.name,addon.icon_key,"text-2xl")}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-x-2 items-center mt-0 mb-2 ",children:[(0,jsx_runtime.jsx)("h4",{className:"leading-5 mb-1 font-bold",children:addon.name}),addon.inclusion_only?(0,jsx_runtime.jsx)("div",{className:"flex gap-x-2",children:(0,jsx_runtime.jsx)(src.u,{title:"Automatically included with your plan. Used based on whether you capture person profiles with your events.",children:(0,jsx_runtime.jsx)(src.oe,{type:"muted",children:"Config option"})})}):addon.subscribed&&(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.oe,{type:"primary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}),children:"Subscribed"})})]}),(0,jsx_runtime.jsxs)("p",{className:"ml-0 mb-0",children:[addon.description," ",addon.docs_url&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.rU,{to:addon.docs_url,children:"Read the docs"})," for more information."]})]}),is_enhanced_persons_og_customer&&(0,jsx_runtime.jsx)("p",{className:"mt-2 mb-0",children:(0,jsx_runtime.jsxs)(src.rU,{to:"https://posthog.com/changelog/2024#person-profiles-launched-posthog-now-up-to-80percent-cheaper",className:"italic",target:"_blank",targetBlankIcon:!0,children:["Why is this here?"," "]})})]})]}),(0,jsx_runtime.jsx)(BillingProductAddonActions,{productRef:productRef,addon:addon})]}),(0,jsx_runtime.jsx)("div",{className:"mt-3 ml-11",children:addonFeatures?.length>2&&(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("p",{className:"ml-0 mb-2 max-w-200",children:"Features included:"}),(0,jsx_runtime.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-4",children:addonFeatures.filter(feature=>!feature.entitlement_only).map((feature,index)=>(0,jsx_runtime.jsxs)("div",{className:"flex gap-x-2 items-center mb-2",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:"text-success"}),(0,jsx_runtime.jsx)(src.u,{title:feature.description,children:(0,jsx_runtime.jsxs)("b",{children:[feature.name,feature.note?": "+feature.note:""]})},feature.key)]},"addon-features-"+addon.type+index))})]})}),(0,jsx_runtime.jsx)(ProductPricingModal.S,{modalOpen:isPricingModalOpen,onClose:toggleIsPricingModalOpen,product:addon,planKey:addon.subscribed?currentAndUpgradePlans?.currentPlan?.plan_key:currentAndUpgradePlans?.upgradePlan?.plan_key}),surveyID&&(0,jsx_runtime.jsx)(UnsubscribeSurveyModal.f,{product:addon}),(0,jsx_runtime.jsxs)(src.fQ,{isOpen:trialModalOpen,onClose:()=>setTrialModalOpen(!1),title:`Start your ${addon.name} trial`,description:`You'll have ${addon.trial?.length} days to try it out before being charged.`,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setTrialModalOpen(!1),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:activateTrial,loading:trialLoading,children:"Start trial"})]}),children:[(0,jsx_runtime.jsx)("p",{className:"mb-1.5",children:"Here's some stuff about the trial:"}),(0,jsx_runtime.jsxs)("ul",{className:"space-y-0.5",children:[(0,jsx_runtime.jsxs)("li",{className:"ml-2",children:["\uD83C\uDF89 It's ",(0,jsx_runtime.jsx)("b",{children:"free!"})]}),(0,jsx_runtime.jsxs)("li",{className:"ml-2",children:["\uD83D\uDCC5 The trial is for ",(0,jsx_runtime.jsxs)("b",{children:[addon.trial?.length," days"]})]}),(0,jsx_runtime.jsxs)("li",{className:"ml-2",children:["\uD83D\uDE80 You'll get access to ",(0,jsx_runtime.jsx)("b",{children:"all the features"})," of the plan immediately"]}),(0,jsx_runtime.jsx)("li",{className:"ml-2",children:"\uD83D\uDCE7 3 days before the trial ends, you'll be emailed a reminder that you'll be charged"}),(0,jsx_runtime.jsx)("li",{className:"ml-2",children:"\uD83D\uDEAB If you don't want to be charged, you can cancel anytime before the trial ends"}),(0,jsx_runtime.jsxs)("li",{className:"ml-2",children:["\uD83D\uDCB5 At the end of the trial, you'll be be subscribed and charged"," ",formatFlatRate(Number(upgradePlan?.unit_amount_usd),upgradePlan?.unit)]}),(0,jsx_runtime.jsxs)("li",{className:"ml-2",children:["☎️ If you have any questions, you can"," ",(0,jsx_runtime.jsx)(src.rU,{onClick:()=>{setTrialModalOpen(!1),openSupportForm({kind:"support",target_area:"billing"})},className:"cursor-pointer",children:"contact us"})]})]})]})]})};function Subrows(props){return(0,jsx_runtime.jsx)("div",{className:"px-2 pt-4 pb-6",children:(0,jsx_runtime.jsx)(src.g3,{dataSource:props.rows,columns:props.columns,embedded:!0,showHeader:!0})})}let BillingProductPricingTable=_ref=>{let{product}=_ref,{billing}=(0,index_esm.useValues)(billingLogic.kr),tableColumns=[{title:`Priced per ${product.unit}`,dataIndex:"volume",render:(_,item)=>(0,jsx_runtime.jsx)("h4",{className:"font-bold mb-0",children:item.volume})},{title:"Price",dataIndex:"basePrice"},{title:"Current Usage",dataIndex:"usage"},{title:"Total",dataIndex:"total",render:(_,item)=>(0,jsx_runtime.jsx)("span",{className:"font-bold mb-0 text-text-3000",children:item.total})},{title:"Projected Total",dataIndex:"projectedTotal"}],subscribedAddons=product.addons?.filter(addon=>addon.tiers&&addon.tiers?.length>0&&(addon.subscribed||addon.inclusion_only)),tableTierData=product.tiers&&product.tiers.length>0?product.tiers?.map((tier,i)=>{var _subscribedAddons$map;let subrows={rows:subscribedAddons?.length>0?[{productName:"Base price",usage:utils.JP(tier.current_usage),price:`$${tier.unit_amount_usd}`,total:`$${tier.current_amount_usd||"0.00"}`,projectedTotal:`$${parseFloat("None"===tier.projected_amount_usd?"0":tier.projected_amount_usd||"0").toFixed(2)}`},...null!==(_subscribedAddons$map=subscribedAddons?.map(addon=>({productName:addon.name,usage:utils.JP(addon.tiers?.[i]?.current_usage||0),price:`$${addon.tiers?.[i]?.unit_amount_usd||"0.00"}`,total:`$${addon.tiers?.[i]?.current_amount_usd||"0.00"}`,projectedTotal:`$${parseFloat(addon.tiers?.[i]?.projected_amount_usd==="None"?"0":addon.tiers?.[i]?.projected_amount_usd||"0").toFixed(2)}`})))&&void 0!==_subscribedAddons$map?_subscribedAddons$map:[]]:[],columns:[{title:"",dataIndex:"icon",render:()=>jsx_runtime.jsx(posthog_icons_es.IconArrowRightDown,{className:"transform -rotate-90 scale-x-[-1] text-base text-muted"})},{title:"Product name",dataIndex:"productName"},{title:"Price",dataIndex:"price"},{title:"Current Usage",dataIndex:"usage"},{title:"Total",dataIndex:"total"},{title:"Projected Total",dataIndex:"projectedTotal"}]},totalForTier=parseFloat(tier.current_amount_usd||"")+(product.addons?.reduce((acc,addon)=>acc+parseFloat(addon.tiers?.[i]?.current_amount_usd||""),0)||0),projectedTotalForTier=(parseFloat(tier.projected_amount_usd||"")||0)+product.addons?.reduce((acc,addon)=>acc+(parseFloat(addon.tiers?.[i]?.projected_amount_usd||"")||0),0),tierData={volume:product.tiers?getTierDescription(product.tiers,i,product,billing?.billing_period?.interval||""):"",basePrice:"0"!==tier.unit_amount_usd?`$${tier.unit_amount_usd}${subscribedAddons?.length>0?" + addons":""}`:"Free",usage:utils.JP(tier.current_usage),total:`$${totalForTier.toFixed(2)||"0.00"}`,projectedTotal:`$${projectedTotalForTier.toFixed(2)||"0.00"}`,subrows:subrows};return tierData}).concat([{volume:"Total",basePrice:"",usage:"",total:`$${product.current_amount_usd||"0.00"}`,projectedTotal:`$${product.projected_amount_usd||"0.00"}`,subrows:{rows:[],columns:[]}}]):void 0;return billing?.discount_percent&&parseFloat(product.projected_amount_usd||"")&&tableTierData?.push({volume:"Total after discount",basePrice:"",usage:"",total:`$${(parseInt(product.current_amount_usd||"0")*(1-billing?.discount_percent/100)).toFixed(2)||"0.00"}`,projectedTotal:`$${(parseInt(product.projected_amount_usd||"0")-parseInt(product.projected_amount_usd||"0")*(billing?.discount_percent/100)).toFixed(2)||"0.00"}`,subrows:{rows:[],columns:[]}}),(0,jsx_runtime.jsx)("div",{className:"pl-16 pb-8",children:product.tiered&&tableTierData?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.g3,{stealth:!0,embedded:!0,size:"small",uppercaseHeader:!1,columns:tableColumns,dataSource:tableTierData,expandable:{expandedRowRender:function renderExpand(row){return row.subrows?.rows?.length?(0,jsx_runtime.jsx)(Subrows,{...row.subrows}):null},rowExpandable:row=>!!row.subrows?.rows?.length}}),(0,jsx_runtime.jsx)(FeatureFlagUsageNotice,{product:product}),(0,jsx_runtime.jsx)(src.Vp,{type:"warning",className:"text-sm pt-2",children:"Tier breakdowns are updated once daily and may differ from the gauge above."})]}):(0,jsx_runtime.jsx)(src.g3,{stealth:!0,embedded:!0,size:"small",uppercaseHeader:!1,columns:[{title:"",dataIndex:"name"},{title:"Total",dataIndex:"total"}],dataSource:[{name:product.name,total:product.unit_amount_usd}]})})};var PlanComparison=__webpack_require__("./frontend/src/scenes/billing/PlanComparison.tsx");let getTierDescription=(tiers,i,product,interval)=>0===i?`First ${(0,billing_utils.nz)(tiers[i].up_to)} ${product.unit}s / ${interval}`:tiers[i].up_to?`${(0,billing_utils.nz)(tiers?.[i-1].up_to||null)} - ${(0,billing_utils.nz)(tiers[i].up_to)}`:`> ${(0,billing_utils.nz)(tiers?.[i-1].up_to||null)}`,BillingProduct=_ref=>{let{product}=_ref,productRef=(0,react.useRef)(null),{billing,redirectPath,isUnlicensedDebug,billingError}=(0,index_esm.useValues)(billingLogic.kr),{hasCustomLimitSet,showTierBreakdown,billingGaugeItems,isPricingModalOpen,isPlanComparisonModalOpen,currentAndUpgradePlans,surveyID,billingProductLoading}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product})),{setShowTierBreakdown,toggleIsPricingModalOpen,toggleIsPlanComparisonModalOpen,reportSurveyShown,setSurveyResponse,setBillingProductLoading}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product,productRef})),{reportBillingUpgradeClicked}=(0,index_esm.useActions)(eventUsageLogic.vx),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),{upgradePlan,currentPlan,downgradePlan}=currentAndUpgradePlans,additionalFeaturesOnUpgradedPlan=upgradePlan?upgradePlan?.features?.filter(feature=>!currentPlan?.features?.some(currentPlanFeature=>currentPlanFeature.name===feature.name)):currentPlan?.features?.filter(feature=>!downgradePlan?.features?.some(downgradePlanFeature=>downgradePlanFeature.name===feature.name))||[],upgradeToPlanKey=upgradePlan?.plan_key,currentPlanKey=currentPlan?.plan_key,showUpgradeCard=(upgradePlan?.product_key!=="platform_and_support"||product?.addons?.length===0)&&upgradePlan&&billing?.subscription_level==="custom",{ref,size}=(0,useResizeObserver.S)({0:"small",700:"medium"}),isTemporaryFreeProduct=!product.tiered&&!product.free_allocation&&!product.inclusion_only||product.tiered&&product.tiers?.length===1&&"0"===product.tiers[0].unit_amount_usd;return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex flex-wrap max-w-300 pb-8",{"flex-col pb-4":"small"===size}),ref:ref,"data-attr":`billing-product-${product.type}`,children:[(0,jsx_runtime.jsxs)("div",{className:"border border-border rounded w-full bg-bg-light",ref:productRef,children:[(0,jsx_runtime.jsx)("div",{className:"border-b border-border rounded-t bg-bg-3000 p-4",children:(0,jsx_runtime.jsxs)("div",{className:"flex gap-4 items-center justify-between",children:[(0,Products.getProductIcon)(product.name,product.icon_key,"text-2xl"),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("h3",{className:"font-bold mb-0 flex items-center gap-x-2",children:[product.name," ",isTemporaryFreeProduct&&(0,jsx_runtime.jsx)(src.oe,{type:"highlight",children:"included with your plan"})]}),(0,jsx_runtime.jsx)("div",{children:product.description})]}),(0,jsx_runtime.jsxs)("div",{className:"flex grow justify-end gap-x-2 items-center",children:[product.docs_url&&(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDocument,{}),size:"small",to:product.docs_url,className:"justify-end",tooltip:"Read the docs"}),product.contact_support?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[product.subscribed&&(0,jsx_runtime.jsx)("p",{className:"m-0",children:"Need to manage your plan?"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",to:"mailto:sales@posthog.com?subject=Enterprise%20plan%20request",children:"Get in touch"})]}):product.subscribed&&(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,to:"https://posthog.com/docs/billing/estimating-usage-costs#how-to-reduce-your-posthog-costs",children:"Learn how to reduce your bill"}),billing?.subscription_level==="custom"&&(product.plans?.length>0?(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,onClick:()=>{setSurveyResponse("$survey_response_1",product.type),reportSurveyShown(constants.E1,product.type)},children:"Unsubscribe"}):(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,to:"mailto:sales@posthog.com?subject=Custom%20plan%20unsubscribe%20request",children:"Contact support to unsubscribe"}))]})}),surveyID&&(0,jsx_runtime.jsx)(UnsubscribeSurveyModal.f,{product:product})]})]})}),(0,jsx_runtime.jsxs)("div",{className:"px-8 pb-8 sm:pb-0",children:[product.percentage_usage>1&&(0,jsx_runtime.jsxs)(LemonBanner.V,{className:"mt-6",type:"error",children:["You have exceeded the ",hasCustomLimitSet?"billing limit":"free tier limit"," for this product."]}),(0,jsx_runtime.jsx)("div",{className:"sm:flex w-full items-center gap-x-8",children:product.contact_support&&(!product.subscribed||isUnlicensedDebug)?(0,jsx_runtime.jsxs)("div",{className:"py-8",children:[!billing?.has_active_subscription&&(0,jsx_runtime.jsxs)("p",{className:"ml-0",children:["Every product subsciption comes with free platform features such as"," ",(0,jsx_runtime.jsx)("b",{children:"Multiple projects, Integrations, Apps, and more"}),". Subscribe to one of the products above to get instant access."]}),(0,jsx_runtime.jsxs)("p",{className:"m-0",children:["Need additional platform and support (aka enterprise) features like ",(0,jsx_runtime.jsx)("b",{children:"SAML SSO"}),","," ",(0,jsx_runtime.jsx)("b",{children:"advanced permissioning"}),", and more?"," ",(0,jsx_runtime.jsx)(src.rU,{to:"mailto:sales@posthog.com?subject=Enterprise%20plan%20request",children:"Get in touch"})," ","for a quick chat."]})]}):!isUnlicensedDebug&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:isTemporaryFreeProduct?(0,jsx_runtime.jsxs)("div",{className:"grow",children:[(0,jsx_runtime.jsxs)("div",{className:"grow",children:[(0,jsx_runtime.jsx)(BillingGauge.V,{items:billingGaugeItems,product:product}),(0,jsx_runtime.jsx)(FeatureFlagUsageNotice,{product:product})]}),product.type==types.Md.DATA_WAREHOUSE&&["free-20240530-beta-users-initial","free-20240813-beta-users-initial"].includes(currentPlan?.plan_key||"")&&new DatesetShowTierBreakdown(!showTierBreakdown)}),(0,jsx_runtime.jsxs)("div",{className:"grow",children:[(0,jsx_runtime.jsx)(BillingGauge.V,{items:billingGaugeItems,product:product}),!product.subscribed&&(0,jsx_runtime.jsx)(FeatureFlagUsageNotice,{product:product})]})]}),product.subscribed?(0,jsx_runtime.jsxs)("div",{className:"flex justify-end gap-8 flex-wrap items-end shrink-0",children:[(0,jsx_runtime.jsx)(Tooltip.u,{title:`The current ${billing?.discount_percent?"discounted ":""}amount you have been billed for this ${billing?.billing_period?.interval} so far. This number updates once daily.`,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center",children:[(0,jsx_runtime.jsx)("div",{className:"font-bold text-3xl leading-7",children:(0,utils.Cp)(parseFloat(product.current_amount_usd||"0")*(1-(billing?.discount_percent?billing.discount_percent/100:0)))}),(0,jsx_runtime.jsxs)("span",{className:"text-xs text-muted",children:[(0,utils.fm)(billing?.billing_period?.interval||""),"-to-date"]})]})}),product.tiers&&(0,jsx_runtime.jsx)(Tooltip.u,{title:`This is roughly calculated based on your current bill${billing?.discount_percent?", discounts on your account,":""} and the remaining time left in this billing period. This number updates once daily.`,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center justify-end",children:[(0,jsx_runtime.jsx)("div",{className:"font-bold text-muted text-lg leading-5",children:(0,utils.Cp)(parseFloat(product.projected_amount_usd||"0")*(1-(billing?.discount_percent?billing.discount_percent/100:0)))}),(0,jsx_runtime.jsx)("span",{className:"text-xs text-muted",children:"Projected"})]})})]}):null]}):product.current_amount_usd?(0,jsx_runtime.jsx)("div",{className:"my-8",children:(0,jsx_runtime.jsx)(Tooltip.u,{title:`The current amount you will be billed for this ${billing?.billing_period?.interval}.`,children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-col items-center",children:[(0,jsx_runtime.jsx)("div",{className:"font-bold text-3xl leading-7",children:(0,utils.Cp)(product.current_amount_usd)}),(0,jsx_runtime.jsxs)("span",{className:"text-xs text-muted",children:["per ",billing?.billing_period?.interval||"period"]})]})})}):null})}),product.price_description?(0,jsx_runtime.jsx)(LemonBanner.V,{type:"info",children:(0,jsx_runtime.jsx)("span",{dangerouslySetInnerHTML:{__html:product.price_description}})}):null,showTierBreakdown&&(0,jsx_runtime.jsx)(BillingProductPricingTable,{product:product}),product.addons?.length>0&&(0,jsx_runtime.jsxs)("div",{className:"pb-8",children:[(0,jsx_runtime.jsx)("h4",{className:"my-4",children:"Add-ons"}),billing?.subscription_level=="free"&&(0,jsx_runtime.jsx)(LemonBanner.V,{type:"warning",className:"text-sm mb-4",hideIcon:!0,children:(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center",children:[(0,jsx_runtime.jsx)("div",{children:"Add-ons are only available on paid plans. Upgrade to access these features."}),(0,jsx_runtime.jsx)(src.Jp,{className:"shrink-0",to:`/api/billing/activate?products=all_products:&redirect_path=${redirectPath}&intent_product=${product.type}`,type:"primary",status:"alt",disableClientSideRouting:!0,loading:!!billingProductLoading,onClick:()=>setBillingProductLoading(product.type),children:"Upgrade now"})]})}),(0,jsx_runtime.jsx)("div",{className:"gap-y-4 flex flex-col",children:product.addons.filter(addon=>!addon.inclusion_only||!featureFlags[constants.y8.PERSONLESS_EVENTS_NOT_SUPPORTED]).map((addon,i)=>(0,jsx_runtime.jsx)(BillingProductAddon,{addon:addon},i))})]})]}),!isTemporaryFreeProduct&&(0,jsx_runtime.jsx)(BillingLimit,{product:product}),showUpgradeCard&&(0,jsx_runtime.jsxs)("div",{"data-attr":`upgrade-card-${product.type}`,className:`border-t border-border p-8 flex justify-between ${upgradePlan?"bg-warning-highlight":"bg-success-highlight"}`,children:[(0,jsx_runtime.jsxs)("div",{children:[currentPlan&&(0,jsx_runtime.jsxs)("h4",{className:`${upgradePlan?"text-warning-dark":"text-success"}`,children:["You're on the ",currentPlan.name," plan for ",product.name,"."]}),additionalFeaturesOnUpgradedPlan?.length>0?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("p",{className:"ml-0 max-w-200",children:"Subscribe to get sweet features such as:"}),(0,jsx_runtime.jsxs)("div",{children:[additionalFeaturesOnUpgradedPlan?.map((feature,i)=>i<3&&jsx_runtime.jsxs("div",{className:"flex gap-x-2 items-center mb-2",children:[jsx_runtime.jsx(posthog_icons_es.IconCheckCircle,{className:"text-success"}),jsx_runtime.jsx(Tooltip.u,{title:feature.description,children:jsx_runtime.jsxs("b",{children:[feature.name," "]})},feature.key)]},"additional-features-"+product.type+i)),!billing?.has_active_subscription&&(0,jsx_runtime.jsxs)("div",{className:"flex gap-x-2 items-center mb-2",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:"text-success"}),(0,jsx_runtime.jsx)(Tooltip.u,{title:"Multiple projects, Feature flags, Experiments, Integrations, Apps, and more",children:(0,jsx_runtime.jsx)("b",{children:"Upgraded platform features"})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex gap-x-2 items-center mb-2",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:"text-success"}),(0,jsx_runtime.jsx)(src.rU,{onClick:()=>toggleIsPlanComparisonModalOpen(),children:(0,jsx_runtime.jsx)("b",{children:"And more..."})})]})]})]}):(0,jsx_runtime.jsxs)("p",{className:"ml-0 max-w-200",children:["You've got access to all the features we offer for ",product.name,"."]}),upgradePlan?.tiers?.[0]?.unit_amount_usd&&0===parseInt(upgradePlan?.tiers?.[0].unit_amount_usd)&&(0,jsx_runtime.jsxs)("p",{className:"ml-0 mb-0 mt-4",children:[(0,jsx_runtime.jsxs)("b",{children:["First ",(0,billing_utils.i7)(upgradePlan?.tiers?.[0].up_to,null)," ",product.unit,"s free"]}),", then just $",upgradePlan?.tiers?.[1]?.unit_amount_usd," per ",product.unit," and"," ",(0,jsx_runtime.jsx)(src.rU,{onClick:()=>toggleIsPlanComparisonModalOpen(),children:"volume discounts"}),"."]})]}),upgradePlan&&(0,jsx_runtime.jsx)("div",{className:"ml-4",children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-wrap gap-x-2 gap-y-2",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>toggleIsPlanComparisonModalOpen(),className:"grow",center:!0,children:"Compare plans"}),upgradePlan.contact_support?(0,jsx_runtime.jsx)(src.Jp,{type:"primary",to:"mailto:sales@posthog.com?subject=Enterprise%20plan%20request",children:"Get in touch"}):"has_subscription"!==upgradePlan.included_if&&!upgradePlan.unit_amount_usd&&(0,jsx_runtime.jsx)(BillingUpgradeCTA.y,{"data-attr":`${product.type}-upgrade-cta`,to:(0,billing_utils.Y_)({product,redirectPath,includeAddons:!1}),type:"primary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),disableClientSideRouting:!0,loading:billingProductLoading===product.type,disabledReason:billingError&&billingError.message,onClick:()=>{reportBillingUpgradeClicked(product.type),setBillingProductLoading(product.type)},className:"grow",center:!0,children:"Subscribe"})]})}),(0,jsx_runtime.jsx)(PlanComparison.S0,{product:product,includeAddons:!1,modalOpen:isPlanComparisonModalOpen,onClose:()=>toggleIsPlanComparisonModalOpen()})]})]}),(0,jsx_runtime.jsx)(ProductPricingModal.S,{modalOpen:isPricingModalOpen,onClose:toggleIsPricingModalOpen,product:product,planKey:product.subscribed?currentPlanKey:upgradeToPlanKey})]})},FeatureFlagUsageNotice=_ref2=>{let{product}=_ref2;return"feature_flags"===product.type?(0,jsx_runtime.jsxs)("p",{className:"mt-4 ml-0 text-sm text-muted italic",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{className:"mr-1"}),"Questions? Here's"," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/feature-flags/common-questions#billing--usage",className:"italic",children:"how we calculate usage"})," ","for feature flags."]}):null}},"./frontend/src/scenes/billing/CreditCTAHero.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,p:()=>CreditCTAHero});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_hedgehogs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),use_resize_observer__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/use-resize-observer@8.0.0_react-dom@18.2.0_react@18.2.0/node_modules/use-resize-observer/dist/bundle.esm.js"),_billingLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),_PurchaseCreditsModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/billing/PurchaseCreditsModal.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD=500,CreditCTAHero=()=>{let{width,ref:heroRef}=(0,use_resize_observer__WEBPACK_IMPORTED_MODULE_9__.Z)(),{featureFlags}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_5__.h),{creditOverview,isPurchaseCreditsModalOpen,isCreditCTAHeroDismissed,computedDiscount}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_billingLogic__WEBPACK_IMPORTED_MODULE_6__.kr),{showPurchaseCreditsModal,toggleCreditCTAHeroDismissed}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(_billingLogic__WEBPACK_IMPORTED_MODULE_6__.kr),isEligible=creditOverview.eligible||featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_4__.y8.SELF_SERVE_CREDIT_OVERRIDE];if("paid"===creditOverview.status||!isEligible)return null;if(isCreditCTAHeroDismissed)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"absolute top-0 right-0 z-10",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"cursor-pointer bg-mark rounded-lg pr-3 pl-2 py-1 hover:bg-mark-light transition-colors group",onClick:()=>toggleCreditCTAHeroDismissed(!1),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_components_hedgehogs__WEBPACK_IMPORTED_MODULE_3__.BurningMoneyHog,{className:"w-8 h-8 group-hover:animate-bounce",style:{animationDuration:"0.75s"}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("span",{children:["Get ",100*computedDiscount,"% off"]})]})})});let estimatedMonthlyCreditAmountUsd=creditOverview?.estimated_monthly_credit_amount_usd||DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"flex relative justify-between items-start rounded-lg bg-bg-light border mb-2 gap-2",ref:heroRef,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"absolute top-2 right-2 z-10",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconX,{className:"w-4 h-4"}),size:"small",onClick:()=>toggleCreditCTAHeroDismissed(!0),"aria-label":"Close"})}),width&&width>500&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div",{className:"shrink-0 relative pt-4 overflow-hidden",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lib_components_hedgehogs__WEBPACK_IMPORTED_MODULE_3__.BurningMoneyHog,{className:"w-40 h-40"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"p-4 flex-1",children:[isEligible&&"pending"===creditOverview.status&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("h1",{className:"mb-0",children:"We're applying your credits"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p",{className:"mt-2 mb-0 max-w-xl",children:["Your credits will be ready within 24 hours of payment."," ","send_invoice"===creditOverview.collection_method?"You'll receive an email with a link to pay the invoice. Please make sure to pay that as soon as possible so we can apply the credits to your account.":"We'll will charge your card on file and we'll email you if there are any issues!"]}),creditOverview.invoice_url&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"primary",onClick:()=>creditOverview.invoice_url&&window.open(creditOverview.invoice_url,"_blank"),className:"mt-4",children:"View invoice"})]}),isEligible&&(!creditOverview||"none"===creditOverview.status)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("h2",{className:"mb-0",children:["Stop burning money."," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("span",{className:"text-success-light",children:["Prepay and save ",100*computedDiscount,"%"]})," over the next 12 months."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p",{className:"mt-2 mb-0 max-w-xl",children:["Based on your usage, your monthly bill is forecasted to be an average of"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("strong",{children:["$",estimatedMonthlyCreditAmountUsd.toFixed(0),"/month"]})," over the next year."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p",{className:"mt-2 mb-0 max-w-xl",children:["This qualifies you for a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("strong",{children:[100*computedDiscount,"% discount"]})," by pre-purchasing usage credits. Which gives you a net savings of"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("strong",{children:["$",Math.round(estimatedMonthlyCreditAmountUsd*computedDiscount*12).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})," ","over the next year."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"primary",status:"alt",onClick:()=>showPurchaseCreditsModal(!0),className:"mt-4",children:"Learn more"}),creditOverview.estimated_monthly_credit_amount_usd>1&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.p2,{className:"my-4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div",{className:"mt-2 flex justify-between items-center gap-2 w-full",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p",{className:"mb-2 flex-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("strong",{children:"Also available:"})," Our Enterprise tier offers dedicated support in a private Slack channel, personalized training, and most importantly, free merch."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"primary",to:"mailto:sales@posthog.com?subject=Let's talk enterprise!",children:"Talk to sales"})]})]})]})]}),isPurchaseCreditsModalOpen&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_PurchaseCreditsModal__WEBPACK_IMPORTED_MODULE_7__.B,{})]})}},"./frontend/src/scenes/billing/PlanComparison.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{mo:()=>PlanComparison_PlanComparison,S0:()=>PlanComparisonModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PlanComparison=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/PlanComparison.scss"),PlanComparison_default=__webpack_require__.n(PlanComparison),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PlanComparison_default(),options),PlanComparison_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),BillingUpgradeCTA=__webpack_require__("./frontend/src/lib/components/BillingUpgradeCTA.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),Products=__webpack_require__("./frontend/src/scenes/products/Products.tsx"),bundle_esm=__webpack_require__("./node_modules/.pnpm/use-resize-observer@8.0.0_react-dom@18.2.0_react@18.2.0/node_modules/use-resize-observer/dist/bundle.esm.js"),billing_utils=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),billingProductLogic=__webpack_require__("./frontend/src/scenes/billing/billingProductLogic.ts"),UnsubscribeSurveyModal=__webpack_require__("./frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function PlanIcon(_ref){let{feature,className,timeDenominator}=_ref;return(0,jsx_runtime.jsx)("div",{className:"flex items-center text-xs text-muted",children:feature?feature.limit?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconWarning,{className:(0,clsx_m.default)("text-warning mx-4 shrink-0",className)}),feature.limit&&`${(0,billing_utils.i7)(feature.limit,null)} ${feature.unit&&feature.unit}${timeDenominator?`/${timeDenominator}`:""}`,feature.note]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{className:(0,clsx_m.default)("text-success mx-4 shrink-0",className)}),feature.note]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(posthog_icons_es.IconX,{className:(0,clsx_m.default)("text-danger mx-4",className)})})})}let PricingTiers=_ref2=>{let{plan,product}=_ref2,{width,ref:tiersRef}=(0,bundle_esm.Z)(),tiers=plan?.tiers,allTierPrices=tiers?.map(tier=>parseFloat(tier.unit_amount_usd)),sigFigs=allTierPrices?.map(price=>price?.toString().split(".")[1]?.length).sort((a,b)=>b-a)[0];return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:tiers?tiers?.map((tier,i)=>jsx_runtime.jsxs("div",{className:clsx_m.default("flex",width&&width<100?"flex-col mb-2":"justify-between items-center"),ref:tiersRef,children:[jsx_runtime.jsx("span",{className:"text-xs",children:billing_utils.i7(tier.up_to,tiers[i-1]?.up_to,!0,product.unit)}),jsx_runtime.jsx("span",{className:"font-bold",children:0===i&&0===parseFloat(tier.unit_amount_usd)?"Free":`$${parseFloat(tier.unit_amount_usd).toFixed(sigFigs)}`})]},`${plan.plan_key}-${product.type}-${tier.up_to}`)):product?.free_allocation?(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex",width&&width<100?"flex-col mb-2":" justify-between items-center"),ref:tiersRef,children:[(0,jsx_runtime.jsxs)("span",{className:"text-xs",children:["Up to ",(0,billing_utils.i7)(product?.free_allocation,null)," ",product?.unit,"s/mo"]}),(0,jsx_runtime.jsx)("span",{className:"font-bold",children:"Free"})]},`${plan.plan_key}-${product.type}-tiers`):null})},PlanComparison_PlanComparison=_ref3=>{let{product,includeAddons=!1}=_ref3,{billing,redirectPath,timeRemainingInSeconds,timeTotalInSeconds}=(0,index_esm.useValues)(billingLogic.kr),{width,ref:planComparisonRef}=(0,bundle_esm.Z)(),{reportBillingUpgradeClicked,reportBillingDowngradeClicked}=(0,index_esm.useActions)(eventUsageLogic.vx),{surveyID,comparisonModalHighlightedFeatureKey,billingProductLoading}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product})),{reportSurveyShown,setSurveyResponse,setBillingProductLoading}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product})),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),plans=product.plans?.filter(plan=>!plan.included_if||"has_subscription"==plan.included_if||plan.current_plan);if(plans?.length===0)return null;let currentPlanIndex=plans.findIndex(plan=>plan.current_plan),fullyFeaturedPlan=plans[plans.length-1],ctaAction=billing?.subscription_level==="custom"?"Subscribe":"Upgrade",upgradeButtons=plans?.map((plan,i)=>jsx_runtime.jsxs("td",{className:"PlanTable__td__upgradeButton",children:[jsx_runtime.jsx(BillingUpgradeCTA.y,{to:plan.contact_support?"mailto:sales@posthog.com?subject=Enterprise%20plan%20request":i=currentPlanIndex?"default":"alt",fullWidth:!0,center:!0,disableClientSideRouting:!plan.contact_support,disabledReason:"has_subscription"==plan.included_if&&i>=currentPlanIndex?billing?.has_active_subscription?"Unsubscribe from all products to remove":null:plan.current_plan?"Current plan":void 0,onClick:()=>{plan.current_plan||(setBillingProductLoading(product.type),i=currentPlanIndex&&!billing?.has_active_subscription?ctaAction:plan.free_allocation&&!plan.tiers?"Select":ctaAction}),!plan.current_plan&&!plan.free_allocation&&includeAddons&&product.addons?.length>0&&jsx_runtime.jsx("p",{className:"text-center ml-0 mt-2 mb-0",children:jsx_runtime.jsx(src.rU,{to:`/api/billing/activate?products=all_products:&redirect_path=${redirectPath}`,className:"text-muted text-xs",disableClientSideRouting:!0,children:"or subscribe without addons"})})]},`${plan.plan_key}-cta`));return(0,jsx_runtime.jsxs)("table",{className:"PlanComparison w-full table-fixed",ref:planComparisonRef,children:[(0,jsx_runtime.jsx)("thead",{children:(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{}),plans?.map(plan=>jsx_runtime.jsx("td",{children:jsx_runtime.jsx("h3",{className:"font-bold",children:plan.name})},`plan-type-${plan.plan_key}`))]})}),(0,jsx_runtime.jsxs)("tbody",{children:[(0,jsx_runtime.jsxs)("tr",{className:"PlanTable__tr__border",children:[(0,jsx_runtime.jsxs)("td",{className:"font-bold",children:["Monthly ",product.tiered&&"base "," price"]}),plans?.map(plan=>{let{prorationAmount,isProrated}=billing_utils.MG({timeRemainingInSeconds,timeTotalInSeconds,amountUsd:plan.unit_amount_usd,hasActiveSubscription:billing?.has_active_subscription});return jsx_runtime.jsxs("td",{className:"text-sm font-medium",children:[plan.free_allocation&&!plan.tiers?"Free forever":plan.unit_amount_usd?`$${parseFloat(plan.unit_amount_usd).toFixed(0)} per month`:plan.contact_support?"Custom":"has_subscription"==plan.included_if?billing?.subscription_level==="custom"?"Free, included with any product subscription":"Usage-based - starting at $0":"$0 per month",isProrated&&jsx_runtime.jsxs("p",{className:"text-xxs text-muted font-normal italic mt-2",children:["Pay ~$",prorationAmount," today",isProrated&&" (prorated)"," and"," ",isProrated&&`$${parseInt(plan.unit_amount_usd||"0")} `,"every month thereafter."]})]},`${plan.plan_key}-basePrice`)})]}),product.tiered&&(0,jsx_runtime.jsxs)("tr",{className:"PlanTable__tr__border",children:[(0,jsx_runtime.jsxs)("th",{scope:"row",children:[includeAddons&&product.addons?.length>0&&(0,jsx_runtime.jsx)("p",{className:"ml-0",children:(0,jsx_runtime.jsx)("span",{className:"font-bold",children:product.name})}),(0,jsx_runtime.jsxs)("p",{className:"ml-0 text-xs mt-1",children:["Priced per ",product.unit]})]}),plans?.map(plan=>jsx_runtime.jsx("td",{children:jsx_runtime.jsx(PricingTiers,{plan:plan,product:product})},`${plan.plan_key}-tiers-td`))]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{}),upgradeButtons]}),includeAddons&&product.addons.length>0&&(0,jsx_runtime.jsx)("tr",{children:(0,jsx_runtime.jsx)("th",{colSpan:1,className:"PlanTable__th__section rounded text-left",children:(0,jsx_runtime.jsx)("h3",{className:"mt-6 mb-6",children:"Available add-ons:"})})}),includeAddons&&product.addons?.filter(addon=>!addon.inclusion_only||!featureFlags[constants.y8.PERSONLESS_EVENTS_NOT_SUPPORTED]).map(addon=>addon.tiered?jsx_runtime.jsxs("tr",{className:"PlanTable__tr__border",children:[jsx_runtime.jsxs("th",{scope:"row",children:[jsx_runtime.jsxs("p",{className:"ml-0",children:[jsx_runtime.jsx(Tooltip.u,{title:addon.description,children:jsx_runtime.jsx("span",{className:"font-bold cursor-default",children:addon.name})}),jsx_runtime.jsx(Tooltip.u,{title:addon.inclusion_only?"Automatically charged based on SDK config options and usage.":"If subscribed, charged on all usage.",children:jsx_runtime.jsx(src.oe,{type:addon.inclusion_only?"option":"primary",className:"ml-2",children:addon.inclusion_only?"config":"add-on"})})]}),jsx_runtime.jsxs("p",{className:"ml-0 text-xs text-muted mt-1",children:["Priced per ",addon.unit]})]}),plans?.map((plan,i)=>addon.inclusion_only?plan.free_allocation&&!plan.tiers?jsx_runtime.jsx("td",{children:jsx_runtime.jsx(PricingTiers,{plan:plan,product:product})},`${addon.name}-free-tiers-td`):jsx_runtime.jsx("td",{children:jsx_runtime.jsx(AddonPlanTiers,{plan:addon.plans?.[i],addon:addon})},`${addon.type}-tiers-td`):plan.free_allocation&&!plan.tiers?jsx_runtime.jsx("td",{children:jsx_runtime.jsx("p",{className:"text-muted text-xs",children:"Not available on this plan."})},`${addon.name}-free-tiers-td`):jsx_runtime.jsx("td",{children:jsx_runtime.jsx(AddonPlanTiers,{plan:addon.plans?.[0],addon:addon})},`${addon.type}-tiers-td`))]},addon.name+"pricing-row"):null),(0,jsx_runtime.jsx)("tr",{children:(0,jsx_runtime.jsx)("th",{colSpan:1,className:"PlanTable__th__section rounded text-left",children:(0,jsx_runtime.jsxs)("h3",{className:"mt-6 mb-2",children:["platform_and_support"===product.type?"Platform":"Product"," features:"]})})}),fullyFeaturedPlan?.features?.map((feature,i)=>jsx_runtime.jsxs("tr",{className:clsx_m.default(i!=fullyFeaturedPlan?.features?.length-1||billing?.has_active_subscription?"":"PlanTable__tr__border"),children:[jsx_runtime.jsx("th",{className:clsx_m.default("PlanTable__th__feature",width&&width<600&&"PlanTable__th__feature--reduced_padding",i==fullyFeaturedPlan?.features?.length-1&&"PlanTable__th__last-feature"),children:jsx_runtime.jsx(Tooltip.u,{title:feature.description,children:jsx_runtime.jsx("div",{className:comparisonModalHighlightedFeatureKey===feature.key?"border-b-2 border-danger-lighter px-1 pb-1 w-max":void 0,children:jsx_runtime.jsx("span",{children:feature.name})})})}),plans?.map(plan=>jsx_runtime.jsx("td",{children:jsx_runtime.jsx(PlanIcon,{feature:plan.features?.find(thisPlanFeature=>feature.key===thisPlanFeature.key),className:"text-base"})},`${plan.plan_key}-${feature.key}`))]},`tr-${feature.key}`)),!billing?.has_active_subscription&&!product.inclusion_only&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("tr",{children:(0,jsx_runtime.jsx)("th",{colSpan:1,className:"PlanTable__th__section rounded text-left",children:(0,jsx_runtime.jsx)("h3",{className:"mt-6 mb-2",children:(0,jsx_runtime.jsx)(Tooltip.u,{title:"Organizations with any paid subscription get access to additional features.",children:(0,jsx_runtime.jsx)("span",{children:"Included platform features:"})})})})}),billing?.products.filter(product=>product.inclusion_only).map(includedProduct=>{let includedPlans=includedProduct.plans.filter(plan=>"has_subscription"==plan.included_if||plan.current_plan);return jsx_runtime.jsxs(react.Fragment,{children:[jsx_runtime.jsx("tr",{children:jsx_runtime.jsx("th",{colSpan:3,className:"PlanTable__th__section bg-bg-3000 justify-left rounded text-left mb-2",children:jsx_runtime.jsxs("div",{className:"flex items-center gap-x-2 my-2",children:[Products.getProductIcon(includedProduct.name,includedProduct.icon_key,"text-2xl"),jsx_runtime.jsx(Tooltip.u,{title:includedProduct.description,children:jsx_runtime.jsx("span",{className:"font-bold",children:includedProduct.name})})]})})}),includedPlans.find(plan=>"has_subscription"==plan.included_if)?.features?.map((feature,i)=>jsx_runtime.jsxs("tr",{children:[jsx_runtime.jsx("th",{className:clsx_m.default("text-muted PlanTable__th__feature",width&&width<600&&"PlanTable__th__feature--reduced_padding",i==(includedPlans.find(plan=>"has_subscription"==plan.included_if)?.features?.length||0)-1?"PlanTable__th__last-feature":""),children:jsx_runtime.jsx(Tooltip.u,{title:feature.description,children:jsx_runtime.jsx("span",{children:feature.name})})}),includedPlans?.map(plan=>jsx_runtime.jsxs(react.Fragment,{children:[includedPlans?.length===1&&jsx_runtime.jsx("td",{children:jsx_runtime.jsx(PlanIcon,{feature:void 0,className:"text-base"})}),jsx_runtime.jsx("td",{children:jsx_runtime.jsx(PlanIcon,{feature:plan.features?.find(thisPlanFeature=>feature.key===thisPlanFeature.key),className:"text-base"})})]},`${plan.plan_key}-${feature.key}`))]},`tr-${feature.key}`))]},`inclusion-only-product-features-${includedProduct.type}`)})]})]}),surveyID&&(0,jsx_runtime.jsx)(UnsubscribeSurveyModal.f,{product:product})]})},PlanComparisonModal=_ref4=>{let{product,title,includeAddons=!1,modalOpen,onClose}=_ref4;return(0,jsx_runtime.jsx)(src.fQ,{isOpen:modalOpen,onClose:onClose,children:(0,jsx_runtime.jsx)("div",{className:"PlanComparisonModal flex w-full h-full justify-center p-6",children:(0,jsx_runtime.jsxs)("div",{className:"text-left bg-bg-light rounded relative w-full",children:[title?(0,jsx_runtime.jsx)("h2",{children:title}):(0,jsx_runtime.jsxs)("h2",{children:[product.name," plans"]}),(0,jsx_runtime.jsx)(PlanComparison_PlanComparison,{product:product,includeAddons:includeAddons})]})})})},AddonPlanTiers=_ref5=>{let{plan,addon}=_ref5,[showTiers,setShowTiers]=(0,react.useState)(!1);return showTiers?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(PricingTiers,{plan:plan,product:addon}),(0,jsx_runtime.jsx)("p",{className:"mb-0",children:(0,jsx_runtime.jsx)(src.rU,{onClick:()=>setShowTiers(!1),className:"text-xs",children:"Hide volume discounts"})})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("p",{className:"mb-1",children:[(0,jsx_runtime.jsxs)("b",{children:["First ",(0,billing_utils.i7)(plan?.tiers?.[0].up_to||0,null)," ",addon.unit,"s free"]}),", then just $",plan?.tiers?.[1].unit_amount_usd,"."]}),(0,jsx_runtime.jsx)("p",{className:"mb-0",children:(0,jsx_runtime.jsx)(src.rU,{onClick:()=>setShowTiers(!0),className:"text-xs",children:"Show volume discounts"})})]})}},"./frontend/src/scenes/billing/ProductPricingModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>ProductPricingModal});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/utils.tsx"),_BillingProduct__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/billing/BillingProduct.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ProductPricingModal=_ref=>{let{product,planKey,modalOpen,onClose}=_ref;if(!planKey)return null;let tiers=product?.plans?.find(plan=>plan.plan_key===planKey)?.tiers;if(!product||!tiers)return null;let isFirstTierFree=0===parseFloat(tiers[0]?.unit_amount_usd),numberOfSigFigs=tiers.map(tier=>tier.unit_amount_usd?.split(".")[1]?.length).sort((a,b)=>b-a)[0];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.fQ,{isOpen:modalOpen,onClose:onClose,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"flex items-center w-full h-full justify-center p-8",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:"text-left bg-bg-light rounded relative w-full",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("h5",{className:"text-gray mb-1",children:[(0,lib_utils__WEBPACK_IMPORTED_MODULE_1__.fm)(product.name)," pricing, starting at"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p",{className:"mb-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("span",{className:"font-bold text-base",children:["$",parseFloat(isFirstTierFree?tiers?.[1]?.unit_amount_usd:tiers?.[0]?.unit_amount_usd).toFixed(numberOfSigFigs)]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("span",{className:"text-gray",children:["/",product.unit]})]}),isFirstTierFree&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p",{className:"text-gray",children:[(0,_BillingProduct__WEBPACK_IMPORTED_MODULE_2__.Fk)(tiers,0,product,"month")," free"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("h4",{className:"font-bold",children:"Volume discounts"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"",children:tiers.map((tier,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:"flex justify-between border-b border-border border-dashed py-1 gap-x-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p",{className:"col-span-1 mb-0",children:(0,_BillingProduct__WEBPACK_IMPORTED_MODULE_2__.Fk)(tiers,i,product,"month")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p",{className:"font-bold mb-0 ",children:isFirstTierFree&&0===i?"Free":`$${parseFloat(tier.unit_amount_usd).toFixed(numberOfSigFigs)}`})]},`tiers-modal-${product.name}-tier-${i}`))})]})]})})})}},"./frontend/src/scenes/billing/PurchaseCreditsModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>PurchaseCreditsModal});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonRadio__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRadio/index.ts"),_BillingGauge__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/billing/BillingGauge.tsx"),_billingLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),_CreditCTAHero__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/billing/CreditCTAHero.tsx"),_types__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/billing/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let PurchaseCreditsModal=()=>{let{showPurchaseCreditsModal,submitCreditForm}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(_billingLogic__WEBPACK_IMPORTED_MODULE_8__.kr),{creditOverview,isCreditFormSubmitting,creditForm,creditDiscount}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useValues)(_billingLogic__WEBPACK_IMPORTED_MODULE_8__.kr),{openSupportForm}=(0,kea__WEBPACK_IMPORTED_MODULE_2__.useActions)(lib_components_Support_supportLogic__WEBPACK_IMPORTED_MODULE_4__.Pw),creditInputValue=+creditForm.creditInput||0,estimatedMonthlyCreditAmountUsd=creditOverview.estimated_monthly_credit_amount_usd||_CreditCTAHero__WEBPACK_IMPORTED_MODULE_9__.N;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.fQ,{onClose:()=>showPurchaseCreditsModal(!1),width:"max(44vw)",title:"Prepay for usage credits and get a discount",footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"secondary",onClick:()=>showPurchaseCreditsModal(!1),disabled:isCreditFormSubmitting,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.Jp,{type:"primary",onClick:()=>submitCreditForm(),loading:isCreditFormSubmitting,children:["Buy"," ",creditForm.creditInput?`$${Math.round(creditInputValue-creditInputValue*creditDiscount).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})}`:""," ","credits"]})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(kea_forms__WEBPACK_IMPORTED_MODULE_3__.Form,{formKey:"creditForm",logic:_billingLogic__WEBPACK_IMPORTED_MODULE_8__.kr,enableFormOnSubmit:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{className:"flex flex-col gap-3.5",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"mb-0",children:"We're giving you the option to buy usage credits in advance at discount of up to 30%."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("p",{className:"mb-0",children:["Based on your usage, we think you'll use"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("b",{children:["$",(+estimatedMonthlyCreditAmountUsd).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})," ","of credits per month, for a total of"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("b",{children:["$",(12*+estimatedMonthlyCreditAmountUsd).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})," ","credits for the year."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_5__.D,{name:"creditInput",label:"How many credits do you want to purchase?",help:"Credits are dispersed monthly and roll over to the next month. If you use more than the available credits in any month, you'll pay for the usage at the standard rate. Credits expire after 1 year from purchase.",children:_ref=>{let{value,onChange,error}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div",{className:"max-w-40",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.DF,{type:"number",fullWidth:!1,status:error?"danger":"default",value:value,"data-attr":"credit-input",onChange:onChange,prefix:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("b",{children:"$"}),min:0,step:10,suffix:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:"/ year"}),size:"small"})})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_BillingGauge__WEBPACK_IMPORTED_MODULE_7__.V,{items:[{type:_types__WEBPACK_IMPORTED_MODULE_10__.b.FreeTier,text:creditInputValue>=3e3&&creditInputValue<2e4?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{className:"text-success"})," 10% off"]}):"10% off",value:3e3,prefix:"$",top:!0},{type:_types__WEBPACK_IMPORTED_MODULE_10__.b.FreeTier,text:creditInputValue>=2e4&&creditInputValue<6e4?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{className:"text-success"})," 20% off"]}):"20% off",value:2e4,prefix:"$",top:!0},{type:_types__WEBPACK_IMPORTED_MODULE_10__.b.FreeTier,text:creditInputValue>=6e4&&creditInputValue<1e5?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{className:"text-success"})," 25% off"]}):"25% off",prefix:"$",value:6e4,top:!0},{type:_types__WEBPACK_IMPORTED_MODULE_10__.b.FreeTier,text:creditInputValue>=1e5?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCheckCircle,{className:"text-success"})," 35% off"]}):"35% off",prefix:"$",value:1e5,top:!0},{type:_types__WEBPACK_IMPORTED_MODULE_10__.b.CurrentUsage,text:"Credits purchased",prefix:"$",value:creditInputValue,top:!1}],product:{percentage_usage:.3}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"mb-1 text-md font-semibold",children:"Payment details"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"mb-0",children:"Choose how you'd like to pay for your credits."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_5__.D,{name:"collectionMethod",children:_ref2=>{let{value,onChange}=_ref2;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonRadio__WEBPACK_IMPORTED_MODULE_6__._,{value:value,onChange:onChange,options:[{value:"charge_automatically",label:creditOverview.cc_last_four?`Pay with credit card on file (**** ${creditOverview.cc_last_four})`:"Pay with credit card on file"},{value:"send_invoice",label:creditOverview.email?`Send me an invoice to ${creditOverview.email}`:"Send me an invoice"}]})}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.p2,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"mb-1 text-md font-semibold",children:"Summary"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{className:"mb-0",children:"Here's a summary of what you'll pay."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.g3,{showHeader:!1,columns:[{title:"",dataIndex:"item"},{title:"",dataIndex:"value"}],dataSource:[{item:"Credits you'll receive",value:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("span",{className:"flex space-x-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("span",{className:"line-through",children:["$",creditInputValue.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("span",{className:"italic",children:["$",100*creditDiscount,"% off"]})]})},{item:"Discount",value:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("span",{className:"text-success-light",children:["-$",Math.round(creditInputValue*creditDiscount).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})},{item:"Due today",value:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("span",{className:"font-semibold",children:["$",Math.round(creditInputValue-creditInputValue*creditDiscount).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})}]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{className:"flex gap-2",children:["Have questions?"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_1__.rU,{onClick:()=>{showPurchaseCreditsModal(!1),openSupportForm({kind:"support",target_area:"billing"})},children:"Get support"})]})]})})})}},"./frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>UnsubscribeSurveyModal_UnsubscribeSurveyModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),UnsubscribeSurveyModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/UnsubscribeSurveyModal.scss"),UnsubscribeSurveyModal_default=__webpack_require__.n(UnsubscribeSurveyModal),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(UnsubscribeSurveyModal_default(),options),UnsubscribeSurveyModal_default().locals;var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),Hogfetti=__webpack_require__("./frontend/src/lib/components/Hogfetti/Hogfetti.tsx"),supportLogic=__webpack_require__("./frontend/src/lib/components/Support/supportLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),billingLogic=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),billingProductLogic=__webpack_require__("./frontend/src/scenes/billing/billingProductLogic.ts"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),getAppContext=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),constants=__webpack_require__("./frontend/src/scenes/pipeline/destinations/constants.ts"),destinationsLogic=__webpack_require__("./frontend/src/scenes/pipeline/destinations/destinationsLogic.tsx"),HogFunctionIcon=__webpack_require__("./frontend/src/scenes/pipeline/hogfunctions/HogFunctionIcon.tsx"),pipelineAccessLogic=__webpack_require__("./frontend/src/scenes/pipeline/pipelineAccessLogic.tsx"),types=__webpack_require__("./frontend/src/scenes/pipeline/types.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),src_types=__webpack_require__("./frontend/src/types.ts"),utils=__webpack_require__("./frontend/src/scenes/pipeline/utils.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let exportsUnsubscribeTableLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","pipeline","ExportsUnsubscribeTableLogic"]),(0,index_esm.connect)(()=>({values:[pipelineAccessLogic.g,["canConfigurePlugins"],userLogic.userLogic,["user"],(0,destinationsLogic.w)({types:constants.SO}),["paidHogFunctions"]],actions:[(0,destinationsLogic.w)({types:constants.SO}),["toggleNodeHogFunction"]]})),(0,index_esm.actions)({disablePlugin:id=>({id}),pauseBatchExport:id=>({id}),disableHogFunction:id=>({id})}),(0,lib.loaders)(_ref=>{let{values}=_ref;return{pluginConfigsToDisable:[{},{loadPluginConfigs:async()=>{let res=await api.ZP.get("api/organizations/@current/plugins/exports_unsubscribe_configs");return Object.fromEntries(res.map(pluginConfig=>[pluginConfig.id,pluginConfig]))},disablePlugin:async _ref2=>{let{id}=_ref2;if(!values.canConfigurePlugins)return values.pluginConfigsToDisable;let response=await api.ZP.update(`api/plugin_config/${id}`,{enabled:!1,deleted:!0});return{...values.pluginConfigsToDisable,[id]:response}}}],batchExportConfigs:[{},{loadBatchExportConfigs:async()=>{let res=await api.ZP.loadPaginatedResults("api/organizations/@current/batch_exports");return Object.fromEntries(res.filter(batchExportConfig=>!batchExportConfig.paused).map(batchExportConfig=>[batchExportConfig.id,batchExportConfig]))},pauseBatchExport:async _ref3=>{let{id}=_ref3;return await api.ZP.create(`api/organizations/@current/batch_exports/${id}/pause`),{...values.batchExportConfigs,[id]:{...values.batchExportConfigs[id],paused:!0}}}}]}}),(0,index_esm.selectors)({loading:[s=>[s.batchExportConfigsLoading,s.pluginConfigsToDisableLoading],(batchExportsLoading,pluginConfigsLoading)=>batchExportsLoading||pluginConfigsLoading],unsubscribeDisabledReason:[s=>[s.loading,s.pluginConfigsToDisable,s.batchExportConfigs],(loading,pluginConfigsToDisable,batchExportConfigs)=>loading?"Loading...":Object.values(pluginConfigsToDisable).some(pluginConfig=>pluginConfig.enabled)?"All apps above must be disabled first":Object.values(batchExportConfigs).some(batchExportConfig=>!batchExportConfig.paused)?"All batch exports must be disabled first":null],itemsToDisable:[s=>[s.pluginConfigsToDisable,s.batchExportConfigs,s.paidHogFunctions],(pluginConfigsToDisable,batchExportConfigs,paidHogFunctions)=>{let pluginConfigs=Object.values(pluginConfigsToDisable).map(pluginConfig=>({plugin_config_id:pluginConfig.id,team_id:pluginConfig.team_id,name:pluginConfig.name,description:pluginConfig.description,icon:(0,jsx_runtime.jsx)(utils.Wf,{plugin:pluginConfig.plugin_info,imageSize:"small"}),disabled:!pluginConfig.enabled,url:urls.j.pipelineNode(src_types.We.Destination,pluginConfig.id)})),batchExports=Object.values(batchExportConfigs).map(batchExportConfig=>({batch_export_id:batchExportConfig.id,team_id:batchExportConfig.team_id,name:batchExportConfig.name,description:batchExportConfig.destination.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{style:{fontSize:30}}),disabled:batchExportConfig.paused,url:urls.j.pipelineNode(src_types.We.Destination,batchExportConfig.id)})),hogFunctions=paidHogFunctions.map(hogFunction=>({hog_function_id:hogFunction.id,team_id:(0,getAppContext.ev)(),name:hogFunction.name,description:hogFunction.description,icon:(0,jsx_runtime.jsx)(HogFunctionIcon._,{src:hogFunction.icon_url,size:"small"}),disabled:!1,url:urls.j.pipelineNode(src_types.We.Destination,`hog-${hogFunction.id}`)}));return[...pluginConfigs,...batchExports,...hogFunctions]}]}),(0,index_esm.listeners)(_ref4=>{let{actions,values}=_ref4;return{disableHogFunction:_ref5=>{var _values$paidHogFuncti;let{id}=_ref5,hogFunction=(null!==(_values$paidHogFuncti=values.paidHogFunctions)&&void 0!==_values$paidHogFuncti?_values$paidHogFuncti:[]).find(f=>f.id===id);hogFunction&&actions.toggleNodeHogFunction({name:hogFunction.name,enabled:!0,stage:src_types.We.Destination,interval:"realtime",backend:types.b.HogFunction,id,hog_function:hogFunction},!1)}}}),(0,index_esm.afterMount)(_ref6=>{let{actions}=_ref6;actions.loadPluginConfigs(),actions.loadBatchExportConfigs()})]);function ExportsUnsubscribeTable(){let{loading,itemsToDisable}=(0,index_esm.useValues)(exportsUnsubscribeTableLogic),{disablePlugin,pauseBatchExport,disableHogFunction}=(0,index_esm.useActions)(exportsUnsubscribeTableLogic),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p);return currentOrganization?(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:itemsToDisable,size:"small",loading:loading,columns:[{width:0,render:function RenderAppInfo(_,item){return item.icon}},{title:"App name",render:function RenderPluginName(_,item){return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(LemonTableLink.i,{to:item.url,title:item.name,description:item.description})})}},{title:"Project",render:function RenderTeam(_,item){return currentOrganization.teams.find(team=>team.id===item.team_id)?.name}},{title:"",render:function RenderPluginDisable(_,item){return(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:()=>{void 0!==item.plugin_config_id?disablePlugin(item.plugin_config_id):void 0!==item.batch_export_id?pauseBatchExport(item.batch_export_id):void 0!==item.hog_function_id&&disableHogFunction(item.hog_function_id)},disabledReason:item.disabled?"Already disabled":null,icon:item.disabled?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}):void 0,children:item.disabled?"Disabled":"Disable"})}}]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{})}let UnsubscribeSurveyModal_UnsubscribeSurveyModal=_ref=>{let{product}=_ref,{trigger,HogfettiComponent}=(0,Hogfetti.Z)(),{surveyID,surveyResponse,isAddonProduct,unsubscribeModalStep,unsubscribeReasonQuestions}=(0,index_esm.useValues)((0,billingProductLogic.cD)({product,hogfettiTrigger:trigger})),{setSurveyResponse,toggleSurveyReason,reportSurveyDismissed,setUnsubscribeModalStep,resetUnsubscribeModalStep,setHedgehogSatisfied,triggerMoreHedgehogs}=(0,index_esm.useActions)((0,billingProductLogic.cD)({product})),{deactivateProduct,resetUnsubscribeError}=(0,index_esm.useActions)(billingLogic.kr),{unsubscribeError,billingLoading,billing}=(0,index_esm.useValues)(billingLogic.kr),{unsubscribeDisabledReason,itemsToDisable}=(0,index_esm.useValues)(exportsUnsubscribeTableLogic),{openSupportForm}=(0,index_esm.useActions)(supportLogic.Pw),[randomizedReasons]=(0,react.useState)(billingProductLogic.G),textAreaNotEmpty=surveyResponse.$survey_response?.length>0,includesPipelinesAddon="data_pipelines"==product.type||"product_analytics"==product.type&&product?.addons?.filter(addon=>"data_pipelines"===addon.type)[0]?.subscribed||billing?.subscription_level==="paid"&&!isAddonProduct,action="Unsubscribe",actionVerb="unsubscribing";return billing?.subscription_level==="paid"&&(action=isAddonProduct?"Remove addon":"Downgrade",actionVerb=isAddonProduct?"removing this addon":"downgrading"),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(HogfettiComponent,{}),(0,jsx_runtime.jsx)(src.fQ,{onClose:()=>{reportSurveyDismissed(surveyID),resetUnsubscribeError(),resetUnsubscribeModalStep()},width:"max(44vw)",title:isAddonProduct?action:"platform_and_support"===product.type?`${action} your plan`:`${action} from ${product.name}`,footer:1===unsubscribeModalStep?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>{reportSurveyDismissed(surveyID)},children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:textAreaNotEmpty?"primary":"secondary",disabledReason:0===surveyResponse.$survey_response_2.length?"Please select a reason":textAreaNotEmpty?includesPipelinesAddon?unsubscribeDisabledReason:void 0:"Please share your feedback",onClick:()=>{surveyResponse.$survey_response_2.includes("Not enough hedgehogs")?(setUnsubscribeModalStep(2),triggerMoreHedgehogs()):deactivateProduct(billing?.subscription_level!=="paid"||isAddonProduct?product.type:"all_products")},loading:billingLoading,children:action})]}):null,children:1===unsubscribeModalStep?(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-3.5",children:[unsubscribeError&&(0,jsx_runtime.jsx)(src.Vp,{type:"error",children:(0,jsx_runtime.jsxs)("p",{children:[unsubscribeError.detail," ",unsubscribeError.link]})}),isAddonProduct?(0,jsx_runtime.jsx)("p",{className:"mb-0",children:"We're sorry to see you go! Please note, you'll lose access to the addon features immediately."}):(0,jsx_runtime.jsxs)("p",{className:"mb-0",children:["We're sorry to see you go! Please note, you'll lose access to platform features and usage limits will apply immediately. And if you have any outstanding invoices, they will be billed immediately."," ",(0,jsx_runtime.jsx)(src.rU,{to:billing?.stripe_portal_url,target:"_blank",children:"View invoices"})]}),(0,jsx_runtime.jsxs)(src.HQ,{children:[billing?.subscription_level==="paid"?`Why are you ${actionVerb}?`:`Why are you ${actionVerb} from ${product.name}?`," ",(0,jsx_runtime.jsx)("i",{className:"text-muted",children:"(you can select multiple)"}),(0,jsx_runtime.jsx)(src.u,{title:"Required",children:(0,jsx_runtime.jsx)("span",{className:"text-danger",children:"*"})})]}),(0,jsx_runtime.jsx)("div",{className:"grid grid-cols-2 gap-2",children:randomizedReasons.map(reason=>(0,jsx_runtime.jsx)(src.Hw,{bordered:!0,label:reason.reason,dataAttr:`unsubscribe-reason-${reason.reason.toLowerCase().replace(" ","-")}`,checked:surveyResponse.$survey_response_2.includes(reason.reason),onChange:()=>toggleSurveyReason(reason.reason),className:"w-full",labelClassName:"w-full"},reason.reason))}),surveyResponse.$survey_response_2.length>0&&(0,jsx_runtime.jsx)(src._V,{"data-attr":"unsubscribe-reason-survey-textarea",placeholder:unsubscribeReasonQuestions,value:surveyResponse.$survey_response,onChange:value=>{setSurveyResponse("$survey_response",value)}}),(0,jsx_runtime.jsx)(src.Vp,{type:"info",children:(0,jsx_runtime.jsxs)("p",{children:["Are you looking to control your costs? Learn about ways to ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/billing/estimating-usage-costs#how-to-reduce-your-posthog-costs",target:"_blank",onClick:()=>{reportSurveyDismissed(surveyID)},children:"reduce your bill"}),`${"session_replay"!==product.type?" or ":", "}`,(0,jsx_runtime.jsx)(src.rU,{to:"",target:"_blank",onClick:()=>{reportSurveyDismissed(surveyID),openSupportForm({target_area:"billing",isEmailFormOpen:!0})},children:"chat with support"}),"session_replay"===product.type&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[", or ",(0,jsx_runtime.jsx)(src.rU,{to:"mailto:sales@posthog.com?subject=Joining%session%replay%controls%20beta",target:"_blank",onClick:()=>{reportSurveyDismissed(surveyID)},children:"join our beta"})," for tuning recording volume with sampling and minimum duration."]}),"."]})}),includesPipelinesAddon&&itemsToDisable.length>0?(0,jsx_runtime.jsxs)("div",{className:"mt-6",children:[(0,jsx_runtime.jsx)("h3",{className:"mt-2 mb-2 mr-8",children:"Important: Disable remaining export apps"}),(0,jsx_runtime.jsx)("p",{children:"To avoid unexpected impact on your data, you must explicitly disable the following apps and exports before unsubscribing:"}),(0,jsx_runtime.jsx)(ExportsUnsubscribeTable,{})]}):null]}):(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,jsx_runtime.jsxs)("div",{className:"text-center",children:[(0,jsx_runtime.jsx)("h3",{className:"text-lg mb-2",children:"How about now? Was that enough hedgehogs?"}),(0,jsx_runtime.jsx)("p",{className:"text-muted mb-4",children:"Look at all these adorable hedgehogs dancing just for you! \uD83E\uDD94✨"}),(0,jsx_runtime.jsx)("div",{className:"flex justify-center items-center",children:(0,jsx_runtime.jsx)(hedgehogs.HeartHog,{width:"100",height:"100"})})]}),(0,jsx_runtime.jsx)("div",{className:"flex gap-2 justify-center",children:(0,jsx_runtime.jsx)(src.rU,{onClick:triggerMoreHedgehogs,disabled:billingLoading,children:"Still not enough! More hedgehogs! \uD83E\uDD94"})}),(0,jsx_runtime.jsx)(src.p2,{}),(0,jsx_runtime.jsxs)("div",{className:"space-y-2 flex flex-col items-center justify-center",children:[(0,jsx_runtime.jsxs)(src.Jp,{type:"primary",loading:billingLoading,onClick:()=>{setHedgehogSatisfied(!0),deactivateProduct(billing?.subscription_level!=="paid"||isAddonProduct?product.type:"all_products")},children:["Never enough, proceed with ",action]}),(0,jsx_runtime.jsx)(src.Jp,{type:"tertiary",disabled:billingLoading,onClick:()=>{resetUnsubscribeModalStep(),reportSurveyDismissed(surveyID)},children:"You convinced me to stay! \uD83D\uDC95"})]})]})})]})}},"./frontend/src/scenes/billing/billing-utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{MG:()=>getProration,Y_:()=>getUpgradeProductLink,i7:()=>convertLargeNumberToWords,nz:()=>summarizeUsage,x:()=>getProrationMessage,zu:()=>convertAmountToUsage}),__webpack_require__("./frontend/src/lib/dayjs.ts");let summarizeUsage=usage=>null===usage?"":usage<1e3?`${usage}`:1e3>Math.round(usage/1e3)?`${Math.round(usage/1e3)} thousand`:`${Math.round(usage/1e6)} million`,convertAmountToUsage=(amount,productAndAddonTiers,discountPercent)=>{let previousTier;if(!amount||!productAndAddonTiers||0===productAndAddonTiers.length)return 0;let tiers=productAndAddonTiers[0].map((tier,index)=>{let allAddonsTiers=productAndAddonTiers.slice(1),totalAmount=parseFloat(tier.unit_amount_usd),flatFee=parseFloat(tier.flat_amount_usd||"0");for(let addonTiers of allAddonsTiers)totalAmount+=parseFloat(addonTiers[index].unit_amount_usd),flatFee+=parseFloat(addonTiers[index].flat_amount_usd||"0");return{...tier,unit_amount_usd:totalAmount.toString(),flat_amount_usd:flatFee.toString()}}),remainingAmount=parseFloat(amount),usage=0;if(0===remainingAmount)return 0===parseFloat(tiers[0].unit_amount_usd)&&tiers[0].up_to||0;discountPercent&&(remainingAmount/=1-discountPercent/100);let allTiersZero=tiers.every(tier=>!parseFloat(tier.unit_amount_usd));if(allTiersZero)return tiers[0].up_to||0;for(let tier of tiers){if(remainingAmount<=0)break;let tierUsageMax=tier.up_to?tier.up_to-(previousTier?.up_to||0):1/0,amountFloatUsd=parseFloat(tier.unit_amount_usd),tierFlatFee=parseFloat(tier.flat_amount_usd||"0"),usageThisTier=Math.min(remainingAmount/amountFloatUsd,tierUsageMax);usage+=usageThisTier,remainingAmount-=amountFloatUsd*usageThisTier,tierFlatFee&&(remainingAmount-=tierFlatFee),previousTier=tier}return Math.round(usage)},getUpgradeProductLink=_ref=>{let{product,redirectPath,includeAddons=!0}=_ref,url="/api/billing/activate?";if(redirectPath&&(url+=`redirect_path=${redirectPath}&`),url+=`products=all_products:&intent_product=${product.type},`,includeAddons&&product.addons?.length)for(let addon of product.addons)addon.plans?.[0]?.plan_key&&!addon.inclusion_only&&(url+=`${addon.type}:${addon.plans[0].plan_key},`);return url.slice(0,-1)},convertLargeNumberToWords=function(num,previousNum){let multipleTiers=arguments.length>2&&void 0!==arguments[2]&&arguments[2],productType=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null===num&&previousNum)return`${convertLargeNumberToWords(previousNum,null)} +`;if(null===num)return"";let denominator=1;num>=1e6?denominator=1e6:num>=1e3&&(denominator=1e3);let prevDenominator=1;return previousNum&&previousNum>=1e6?prevDenominator=1e6:previousNum&&previousNum>=1e3&&(prevDenominator=1e3),`${previousNum?`${((previousNum+1)/prevDenominator).toFixed(0)}-`:multipleTiers?"First ":""}${(num/denominator).toFixed(0)}${1e6===denominator?" million":1e3===denominator?"k":""}${!previousNum&&multipleTiers?` ${productType}s/mo`:""}`},getProration=_ref2=>{let{timeRemainingInSeconds,timeTotalInSeconds,amountUsd,hasActiveSubscription}=_ref2;if(0===timeTotalInSeconds)return{isProrated:!1,prorationAmount:"0.00"};let prorationAmount=amountUsd?parseInt(amountUsd)*(timeRemainingInSeconds/timeTotalInSeconds):0;return{isProrated:!!hasActiveSubscription&&!!amountUsd&&prorationAmount!==parseInt(amountUsd||""),prorationAmount:prorationAmount.toFixed(2)}},getProrationMessage=(prorationAmount,unitAmountUsd)=>`Pay ~$${prorationAmount} today (prorated) and $${parseInt(unitAmountUsd||"0")} every month thereafter.`},"./frontend/src/scenes/billing/billingLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{kr:()=>billingLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_dayjs__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/dayjs.ts"),lib_lemon_ui_LemonBanner_lemonBannerLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/lemonBannerLogic.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./frontend/src/types.ts"),_CreditCTAHero__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./frontend/src/scenes/billing/CreditCTAHero.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let BillingAPIErrorCodes=function(BillingAPIErrorCodes){return BillingAPIErrorCodes.OPEN_INVOICES_ERROR="open_invoices_error",BillingAPIErrorCodes.NO_ACTIVE_PAYMENT_METHOD_ERROR="no_active_payment_method_error",BillingAPIErrorCodes.COULD_NOT_PAY_INVOICES_ERROR="could_not_pay_invoices_error",BillingAPIErrorCodes}({}),parseBillingResponse=data=>(data.billing_period&&(data.billing_period={current_period_start:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(data.billing_period.current_period_start),current_period_end:(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(data.billing_period.current_period_end),interval:data.billing_period.interval}),data.free_trial_until=data.free_trial_until?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(data.free_trial_until):void 0,data.amount_off_expires_at=data.amount_off_expires_at?(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(data.amount_off_expires_at):void 0,data.amount_off_expires_at&&data.billing_period&&data.amount_off_expires_at.isBefore(data.billing_period.current_period_end)&&data.amount_off_expires_at.isAfter(data.billing_period.current_period_start)&&(data.amount_off_expires_at=data.billing_period.current_period_end),data),billingLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","billing","billingLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setProductSpecificAlert:productSpecificAlert=>({productSpecificAlert}),setScrollToProductKey:scrollToProductKey=>({scrollToProductKey}),setShowLicenseDirectInput:show=>({show}),reportBillingAlertShown:alertConfig=>({alertConfig}),reportBillingAlertActionClicked:alertConfig=>({alertConfig}),reportCreditsFormSubmitted:creditInput=>({creditInput}),reportCreditsModalShown:!0,reportBillingShown:!0,registerInstrumentationProps:!0,reportCreditsCTAShown:creditOverview=>({creditOverview}),setRedirectPath:!0,setIsOnboarding:!0,determineBillingAlert:!0,setUnsubscribeError:error=>({error}),resetUnsubscribeError:!0,setBillingAlert:billingAlert=>({billingAlert}),showPurchaseCreditsModal:isOpen=>({isOpen}),toggleCreditCTAHeroDismissed:isDismissed=>({isDismissed}),setComputedDiscount:discount=>({discount})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_9__.h,["featureFlags"],scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_13__.preflightLogic,["preflight"]],actions:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_14__.userLogic,["loadUser"],lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_11__.vx,["reportProductUnsubscribed"],(0,lib_lemon_ui_LemonBanner_lemonBannerLogic__WEBPACK_IMPORTED_MODULE_8__.A)({dismissKey:"usage-limit-exceeded"}),["resetDismissKey as resetUsageLimitExceededKey"],(0,lib_lemon_ui_LemonBanner_lemonBannerLogic__WEBPACK_IMPORTED_MODULE_8__.A)({dismissKey:"usage-limit-approaching"}),["resetDismissKey as resetUsageLimitApproachingKey"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({billingAlert:[null,{setBillingAlert:(_,_ref)=>{let{billingAlert}=_ref;return billingAlert}}],scrollToProductKey:[null,{setScrollToProductKey:(_,_ref2)=>{let{scrollToProductKey}=_ref2;return scrollToProductKey}}],productSpecificAlert:[null,{setProductSpecificAlert:(_,_ref3)=>{let{productSpecificAlert}=_ref3;return productSpecificAlert}}],showLicenseDirectInput:[!1,{setShowLicenseDirectInput:(_,_ref4)=>{let{show}=_ref4;return show}}],redirectPath:["",{setRedirectPath:()=>window.location.pathname.includes("/onboarding")?window.location.pathname+window.location.search:""}],isOnboarding:[!1,{setIsOnboarding:()=>window.location.pathname.includes("/onboarding")}],unsubscribeError:[null,{resetUnsubscribeError:()=>null,setUnsubscribeError:(_,_ref5)=>{let{error}=_ref5;return error}}],timeRemainingInSeconds:[0,{loadBillingSuccess:(_,_ref6)=>{let{billing}=_ref6;if(!billing?.billing_period)return 0;let currentTime=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(),periodEnd=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(billing.billing_period.current_period_end);return periodEnd.diff(currentTime,"second")}}],timeTotalInSeconds:[0,{loadBillingSuccess:(_,_ref7)=>{let{billing}=_ref7;if(!billing?.billing_period)return 0;let periodStart=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(billing.billing_period.current_period_start),periodEnd=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(billing.billing_period.current_period_end);return periodEnd.diff(periodStart,"second")}}],isPurchaseCreditsModalOpen:[!1,{showPurchaseCreditsModal:(_,_ref8)=>{let{isOpen}=_ref8;return isOpen}}],isCreditCTAHeroDismissed:[!1,{persist:!0},{toggleCreditCTAHeroDismissed:(_,_ref9)=>{let{isDismissed}=_ref9;return isDismissed}}],computedDiscount:[0,{setComputedDiscount:(_,_ref10)=>{let{discount}=_ref10;return discount}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(_ref11=>{let{actions,values}=_ref11;return{billing:[null,{loadBilling:async()=>{let skipForecasting=values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_6__.y8.BILLING_SKIP_FORECASTING],response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.get("api/billing"+(skipForecasting?"?include_forecasting=false":""));return parseBillingResponse(response)},updateBillingLimits:async limits=>{try{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.update("api/billing",{custom_limits_usd:limits});return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Billing limits updated"),parseBillingResponse(response)}catch(error){throw _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("There was an error updating your billing limits. Please try again or contact support."),error}},deactivateProduct:async key=>{let currentURL=new URL(window.location.href);currentURL.searchParams.delete("upgraded"),currentURL.searchParams.delete("products"),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.push(currentURL.pathname+currentURL.search),actions.resetUnsubscribeError();try{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.getResponse("api/billing/deactivate?products="+key),jsonRes=await (0,lib_api__WEBPACK_IMPORTED_MODULE_5__.$6)(response);return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("You have been unsubscribed. We're sad to see you go. May the hedgehogs be ever in your favor."),actions.reportProductUnsubscribed(key),parseBillingResponse(jsonRes)}catch(error){return error.code?error.code===BillingAPIErrorCodes.OPEN_INVOICES_ERROR?actions.setUnsubscribeError({detail:error.detail,link:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:values.billing?.stripe_portal_url,target:"_blank",children:"View invoices"})}):error.code===BillingAPIErrorCodes.NO_ACTIVE_PAYMENT_METHOD_ERROR?actions.setUnsubscribeError({detail:error.detail}):error.code===BillingAPIErrorCodes.COULD_NOT_PAY_INVOICES_ERROR&&actions.setUnsubscribeError({detail:error.detail,link:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:error.link||values.billing?.stripe_portal_url,target:"_blank",children:error.link?"View invoice":"View invoices"})}):actions.setUnsubscribeError({detail:"string"==typeof error.detail?error.detail:"We encountered a problem. Please try again or submit a support ticket."}),console.error(error),values.billing}}}],billingError:[null,{getInvoices:async()=>{try{let res=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.getResponse("api/billing/get_invoices?status=open"),jsonRes=await (0,lib_api__WEBPACK_IMPORTED_MODULE_5__.$6)(res),numOpenInvoices=jsonRes.count;if(numOpenInvoices>0){let viewInvoicesButton={to:1==numOpenInvoices&&jsonRes.link?jsonRes.link:values.billing?.stripe_portal_url,children:`View invoice${numOpenInvoices>1?"s":""}`,targetBlank:!0};return{status:"warning",message:`You have ${numOpenInvoices} open invoice${numOpenInvoices>1?"s":""}. Please pay ${numOpenInvoices>1?"them":"it"} before adding items to your subscription.`,action:viewInvoicesButton}}}catch(error){console.error(error)}return null}}],creditOverview:[{eligible:!1,estimated_monthly_credit_amount_usd:_CreditCTAHero__WEBPACK_IMPORTED_MODULE_16__.N,status:"none",invoice_url:null,collection_method:null,cc_last_four:null,email:null},{loadCreditOverview:async()=>{if(values.billing?.has_active_subscription){let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.get("api/billing/credits/overview");return values.creditForm.creditInput||actions.setCreditFormValue("creditInput",Math.round(12*(response.estimated_monthly_credit_amount_usd||_CreditCTAHero__WEBPACK_IMPORTED_MODULE_16__.N))),response.eligible&&"none"===response.status&&actions.reportCreditsCTAShown(response),response}return{eligible:!1,estimated_monthly_credit_amount_usd:_CreditCTAHero__WEBPACK_IMPORTED_MODULE_16__.N,status:"none",invoice_url:null,collection_method:null,cc_last_four:null,email:null}}}],products:[[],{loadProducts:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.get("api/billing/available_products");return response}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({upgradeLink:[s=>[s.preflight],()=>"/organization/billing"],isUnlicensedDebug:[s=>[s.preflight,s.billing],(preflight,billing)=>!!preflight?.is_debug&&!billing?.billing_period],projectedTotalAmountUsdWithBillingLimits:[s=>[s.billing],billing=>{if(!billing)return 0;let projectedTotal=0;for(let product of billing.products||[]){let billingLimit=billing?.custom_limits_usd?.[product.type]||product.usage_key&&billing?.custom_limits_usd?.[product.usage_key]||0;projectedTotal+=Math.min(parseFloat(product.projected_amount_usd||"0"),billingLimit)}return projectedTotal}],supportPlans:[s=>[s.billing],billing=>{var _platformAndSupportPr;let platformAndSupportProduct=billing?.products?.find(product=>product.type==_types__WEBPACK_IMPORTED_MODULE_15__.Md.PLATFORM_AND_SUPPORT);if(!platformAndSupportProduct?.plans)return[];let addonPlans=platformAndSupportProduct?.addons?.map(addon=>addon.plans).flat(),insertionIndex=Math.max(0,(null!==(_platformAndSupportPr=platformAndSupportProduct?.plans?.length)&&void 0!==_platformAndSupportPr?_platformAndSupportPr:1)-1),allPlans=platformAndSupportProduct?.plans?.slice(0)||[];return allPlans.splice(insertionIndex,0,...addonPlans),allPlans}],hasSupportAddonPlan:[s=>[s.billing],billing=>!!billing?.products?.find(product=>product.type==_types__WEBPACK_IMPORTED_MODULE_15__.Md.PLATFORM_AND_SUPPORT)?.addons.find(addon=>addon.plans.find(plan=>plan.current_plan))],creditDiscount:[s=>[s.computedDiscount],computedDiscount=>computedDiscount||0]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref12=>{let{actions,values}=_ref12;return{activateLicense:{defaults:{license:""},errors:_ref13=>{let{license}=_ref13;return{license:license?void 0:"Please enter your license key"}},submit:async(_ref14,breakpoint)=>{let{license}=_ref14;await breakpoint(500);try{await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.update("api/billing/license",{license}),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace(`/${values.isOnboarding?"ingestion":"organization"}/billing?success=true`),setTimeout(()=>{window.location.reload()},100)}catch(e){throw actions.setActivateLicenseManualErrors({license:e.detail||"License could not be activated. Please contact support."}),e}}},creditForm:{defaults:{creditInput:"",collectionMethod:"charge_automatically"},submit:async _ref15=>{let{creditInput,collectionMethod}=_ref15;await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.create("api/billing/credits/purchase",{annual_amount_usd:+Math.round(+creditInput-+creditInput*values.creditDiscount),discount_percent:100*values.computedDiscount,collection_method:collectionMethod}),actions.showPurchaseCreditsModal(!1),actions.loadCreditOverview(),actions.reportCreditsFormSubmitted(+creditInput),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.open({title:"Your credit purchase has been submitted",width:536,content:"send_invoice"===collectionMethod?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("p",{className:"mb-4",children:"The invoice for your credits has been created and it will be emailed to the email on file."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("p",{children:"Once the invoice is paid we will apply the credits to your account. Until the invoice is paid you will be charged for usage as normal."})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)("p",{children:["Your card will be charged soon and the credits will be applied to your account. Please make sure your"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:values.billing?.stripe_portal_url,target:"_blank",children:"card on file"})," ","is up to date. You will receive an email when the credits are applied."]})})})},errors:_ref16=>{let{creditInput,collectionMethod}=_ref16;return{creditInput:creditInput?3333>+creditInput?"Please enter a credit amount of at least $3,333":void 0:"Please enter the amount of credits you want to purchase",collectionMethod:collectionMethod?void 0:"Please select a collection method"}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref17=>{let{actions,values}=_ref17;return{reportBillingShown:()=>{posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("billing v2 shown")},reportBillingAlertShown:_ref18=>{let{alertConfig}=_ref18;posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("billing alert shown",{...alertConfig})},reportBillingAlertActionClicked:_ref19=>{let{alertConfig}=_ref19;posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("billing alert action clicked",{...alertConfig})},reportCreditsModalShown:()=>{posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("credits modal shown")},reportCreditsFormSubmitted:_ref20=>{let{creditInput}=_ref20;posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("credits modal credit form submitted",{credit_amount_usd:creditInput})},reportCreditsCTAShown:_ref21=>{let{creditOverview}=_ref21;posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("credits cta shown",{eligible:creditOverview.eligible,status:creditOverview.status,estimated_monthly_credit_amount_usd:creditOverview.estimated_monthly_credit_amount_usd||_CreditCTAHero__WEBPACK_IMPORTED_MODULE_16__.N})},toggleCreditCTAHeroDismissed:_ref22=>{let{isDismissed}=_ref22;isDismissed&&posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.capture("credits cta hero dismissed")},loadBillingSuccess:()=>{kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.location.pathname.includes("/organization/billing")&&kea_router__WEBPACK_IMPORTED_MODULE_4__.router.values.searchParams.success&&(actions.loadUser(),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace("/organization/billing")),actions.registerInstrumentationProps(),actions.determineBillingAlert(),actions.loadCreditOverview()},determineBillingAlert:()=>{if(values.productSpecificAlert){actions.setBillingAlert(values.productSpecificAlert);return}if(!values.billing||!values.preflight?.cloud)return;if(values.billing.free_trial_until&&values.billing.free_trial_until.isAfter((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)())){let remainingDays=values.billing.free_trial_until.diff((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(),"days"),remainingHours=values.billing.free_trial_until.diff((0,lib_dayjs__WEBPACK_IMPORTED_MODULE_7__.Bv)(),"hours");if(remainingHours>72)return;actions.setBillingAlert({status:"info",title:`Your free trial will end in ${remainingHours<24?(0,lib_utils__WEBPACK_IMPORTED_MODULE_10__.Zi)(remainingHours,"hour"):(0,lib_utils__WEBPACK_IMPORTED_MODULE_10__.Zi)(remainingDays,"day")}.`,message:"Setup billing now to ensure you don't lose access to premium features."});return}if(values.billing.deactivated){actions.setBillingAlert({status:"error",title:"Your organization has been temporarily suspended.",message:"Please contact support to reactivate it.",contactSupport:!0});return}let productOverLimit=values.billing.products?.find(x=>x.percentage_usage>1&&x.usage_key);if(productOverLimit){actions.setBillingAlert({status:"error",title:"Usage limit exceeded",message:`You have exceeded the usage limit for ${productOverLimit.name}. Please ${productOverLimit.subscribed?"increase your billing limit":"upgrade your plan"} - or ${"Data warehouse"===productOverLimit.name?"data will not be synced":"data loss may occur"}.`,dismissKey:"usage-limit-exceeded"});return}actions.resetUsageLimitExceededKey();let productApproachingLimit=values.billing.products?.find(x=>x.percentage_usage>.85);if(productApproachingLimit){actions.setBillingAlert({status:"info",title:"You will soon hit your usage limit",message:`You have currently used ${parseFloat((100*productApproachingLimit.percentage_usage).toFixed(2))}% of your ${productApproachingLimit.usage_key&&productApproachingLimit.usage_key.toLowerCase()} allocation.`,dismissKey:"usage-limit-approaching"});return}actions.resetUsageLimitApproachingKey()},setCreditFormValue:_ref23=>{let{name,value}=_ref23;if("creditInput"===name||name?.[0]==="creditInput"){let spend=+value,discount=0;spend>=1e5?discount=.35:spend>=6e4?discount=.25:spend>=2e4?discount=.2:spend>=3e3&&(discount=.1),actions.setComputedDiscount(discount)}},registerInstrumentationProps:async(_,breakpoint)=>{if(await breakpoint(100),posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP&&values.billing){let payload={has_billing_plan:!!values.billing.has_active_subscription,free_trial_until:values.billing.free_trial_until?.toISOString(),customer_deactivated:values.billing.deactivated,current_total_amount_usd:values.billing.current_total_amount_usd};if(values.billing.custom_limits_usd)for(let product of Object.keys(values.billing.custom_limits_usd))payload[`custom_limits_usd.${product}`]=values.billing.custom_limits_usd[product];if(values.billing.products)for(let product of values.billing.products){let type=product.type.toLowerCase();payload[`percentage_usage.${type}`]=product.percentage_usage,payload[`current_amount_usd.${type}`]=product.current_amount_usd,payload[`unit_amount_usd.${type}`]=product.unit_amount_usd,payload[`usage_limit.${type}`]=product.usage_limit,payload[`current_usage.${type}`]=product.current_usage,payload[`projected_usage.${type}`]=product.projected_usage,payload[`free_allocation.${type}`]=product.free_allocation}values.billing.billing_period&&(payload.billing_period_start=values.billing.billing_period.current_period_start,payload.billing_period_end=values.billing.billing_period.current_period_end),posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.register(payload)}},showPurchaseCreditsModal:_ref24=>{let{isOpen}=_ref24;isOpen&&actions.reportCreditsModalShown()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref25=>{let{actions}=_ref25;actions.loadBilling(),actions.getInvoices()}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.urlToAction)(_ref26=>{let{actions}=_ref26;return{"/*/billing":(_params,_search,hash)=>{if(hash.license&&(actions.setShowLicenseDirectInput(!0),actions.setActivateLicenseValues({license:hash.license}),actions.submitActivateLicense()),_search.products){let products=_search.products.split(",");actions.setScrollToProductKey(products[0])}_search.billing_error&&actions.setBillingAlert({status:"error",title:"Error",message:_search.billing_error}),actions.setRedirectPath(),actions.setIsOnboarding()},"*":()=>{actions.setRedirectPath(),actions.setIsOnboarding()}}})])},"./frontend/src/scenes/billing/billingProductLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>UNSUBSCRIBE_REASONS,cD:()=>billingProductLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),_billing_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),_billingLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/billing/types.ts");let UNSUBSCRIBE_REASONS=[{reason:"Too expensive",question:"What will you be using instead?"},{reason:"Not getting enough value",question:"What prevented you from getting more value out of PostHog?"},{reason:"Not using the product",question:"Why are you not using the product?"},{reason:"Found a better alternative",question:"What service will you be moving to?"},{reason:"Poor customer support",question:"Please provide details on your support experience."},{reason:"Too difficult to use",question:"What was difficult to use?"},{reason:"Not enough hedgehogs",question:"How many hedgehogs do you need? (but really why are you leaving)"},{reason:"Other (let us know below!)",question:"Why are you leaving?"}],billingProductLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.product.type),(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","billing","billingProductLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_billingLogic__WEBPACK_IMPORTED_MODULE_7__.kr,["billing","isUnlicensedDebug","scrollToProductKey","unsubscribeError"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]],actions:[_billingLogic__WEBPACK_IMPORTED_MODULE_7__.kr,["updateBillingLimits","updateBillingLimitsSuccess","loadBilling","loadBillingSuccess","deactivateProduct","setProductSpecificAlert","setScrollToProductKey","deactivateProductSuccess"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setIsEditingBillingLimit:isEditingBillingLimit=>({isEditingBillingLimit}),setBillingLimitInput:billingLimitInput=>({billingLimitInput}),billingLoaded:!0,setShowTierBreakdown:showTierBreakdown=>({showTierBreakdown}),toggleIsPricingModalOpen:!0,toggleIsPlanComparisonModalOpen:highlightedFeatureKey=>({highlightedFeatureKey}),setSurveyResponse:(key,value)=>({key,value}),toggleSurveyReason:reason=>({reason}),reportSurveyShown:(surveyID,productType)=>({surveyID,productType}),reportSurveySent:(surveyID,surveyResponse)=>({surveyID,surveyResponse}),reportSurveyDismissed:surveyID=>({surveyID}),setSurveyID:surveyID=>({surveyID}),setBillingProductLoading:productKey=>({productKey}),initiateProductUpgrade:(product,plan,redirectPath)=>({plan,product,redirectPath}),handleProductUpgrade:(products,redirectPath)=>({products,redirectPath}),activateTrial:!0,cancelTrial:!0,setTrialModalOpen:isOpen=>({isOpen}),setTrialLoading:loading=>({loading}),setUnsubscribeModalStep:step=>({step}),resetUnsubscribeModalStep:!0,setHedgehogSatisfied:satisfied=>({satisfied}),triggerMoreHedgehogs:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({billingLimitInput:[{input:500},{setBillingLimitInput:(_,_ref)=>{let{billingLimitInput}=_ref;return{input:billingLimitInput}}}],isEditingBillingLimit:[!1,{setIsEditingBillingLimit:(_,_ref2)=>{let{isEditingBillingLimit}=_ref2;return isEditingBillingLimit}}],showTierBreakdown:[!1,{setShowTierBreakdown:(_,_ref3)=>{let{showTierBreakdown}=_ref3;return showTierBreakdown}}],isPricingModalOpen:[!1,{toggleIsPricingModalOpen:state=>!state}],isPlanComparisonModalOpen:[!1,{toggleIsPlanComparisonModalOpen:state=>!state}],surveyResponse:[{$survey_response_2:[],$survey_response:""},{setSurveyResponse:(state,_ref4)=>{let{key,value}=_ref4;return{...state,[key]:value}},toggleSurveyReason:(state,_ref5)=>{let{reason}=_ref5,reasons=state.$survey_response_2.includes(reason)?state.$survey_response_2.filter(r=>r!==reason):[...state.$survey_response_2,reason];return{...state,$survey_response_2:reasons}}}],unsubscribeReasonSurvey:[null,{setUnsubscribeReasonSurvey:(_,_ref6)=>{let{survey}=_ref6;return survey}}],surveyID:["",{setSurveyID:(_,_ref7)=>{let{surveyID}=_ref7;return surveyID}}],billingProductLoading:[null,{setBillingProductLoading:(_,_ref8)=>{let{productKey}=_ref8;return productKey}}],comparisonModalHighlightedFeatureKey:[null,{toggleIsPlanComparisonModalOpen:(_,_ref9)=>{let{highlightedFeatureKey}=_ref9;return highlightedFeatureKey||null}}],trialModalOpen:[!1,{setTrialModalOpen:(_,_ref10)=>{let{isOpen}=_ref10;return isOpen}}],trialLoading:[!1,{setTrialLoading:(_,_ref11)=>{let{loading}=_ref11;return loading}}],unsubscribeModalStep:[1,{setUnsubscribeModalStep:(_,_ref12)=>{let{step}=_ref12;return step},resetUnsubscribeModalStep:()=>1}],hedgehogSatisfied:[!1,{setHedgehogSatisfied:(_,_ref13)=>{let{satisfied}=_ref13;return satisfied}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)(_ref14=>{let{values}=_ref14;return{customLimitUsd:[(s,p)=>[s.billing,p.product],(billing,product)=>{var _billing$custom_limit;let customLimit=billing?.custom_limits_usd?.[product.type];return 0===customLimit||customLimit?customLimit:product.usage_key&&null!==(_billing$custom_limit=billing?.custom_limits_usd?.[product.usage_key])&&void 0!==_billing$custom_limit?_billing$custom_limit:null}],hasCustomLimitSet:[s=>[s.customLimitUsd],customLimitUsd=>(!!customLimitUsd||0===customLimitUsd)&&customLimitUsd>=0],currentAndUpgradePlans:[(_s,p)=>[p.product],product=>{let currentPlanIndex=product.plans.findIndex(plan=>plan.current_plan),currentPlan=currentPlanIndex>=0?product.plans?.[currentPlanIndex]:null,upgradePlan=values.isUnlicensedDebug?product.plans?.[product.plans.length-1]:product.plans?.[currentPlanIndex+1],downgradePlan=product.plans?.[currentPlanIndex-1];return{currentPlan,upgradePlan,downgradePlan}}],freeTier:[(_s,p)=>[p.product],product=>(product.subscribed&&product.tiered?product.tiers?.[0]?.unit_amount_usd==="0"?product.tiers?.[0]?.up_to:0:product.free_allocation)||0],billingLimitAsUsage:[(s,p)=>[s.billing,p.product,s.isEditingBillingLimit,s.billingLimitInput,s.customLimitUsd],(billing,product,isEditingBillingLimit,billingLimitInput,customLimitUsd)=>{let addonTiers=product.addons?.filter(addon=>addon.subscribed)?.map(addon=>addon.tiers),productAndAddonTiers=[product.tiers,...addonTiers].filter(Boolean);return product.tiers?isEditingBillingLimit?(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(`${billingLimitInput.input}`,productAndAddonTiers,billing?.discount_percent):(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(customLimitUsd?`${customLimitUsd}`:"",productAndAddonTiers,billing?.discount_percent):0}],billingGaugeItems:[(s,p)=>[p.product,s.billing,s.freeTier,s.billingLimitAsUsage],(product,billing,freeTier,billingLimitAsUsage)=>[billingLimitAsUsage&&billing?.discount_percent!==100?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.BillingLimit,text:"Billing limit",top:!0,value:billingLimitAsUsage||0}:void 0,freeTier?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.FreeTier,text:"Free tier limit",value:freeTier,top:!0}:void 0,product.projected_usage&&product.projected_usage>(product.current_usage||0)?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.ProjectedUsage,text:"Projected",value:product.projected_usage||0,top:!1}:void 0,{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.CurrentUsage,text:"Current",value:product.current_usage||0,top:!1}].filter(Boolean)],isAddonProduct:[(s,p)=>[s.billing,p.product],(billing,product)=>!!billing?.products?.some(p=>p.addons?.some(addon=>addon.type===product?.type))],unsubscribeReasonQuestions:[s=>[s.surveyResponse],surveyResponse=>surveyResponse.$survey_response_2.map(reason=>{let reasonObject=UNSUBSCRIBE_REASONS.find(r=>r.reason===reason);return reasonObject?.question}).join(" ").concat(" (required)")]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref15=>{let{actions,values,props}=_ref15;return{updateBillingLimitsSuccess:()=>{actions.billingLoaded()},billingLoaded:()=>{actions.setIsEditingBillingLimit(!1),actions.setBillingLimitInput(values.hasCustomLimitSet?values.customLimitUsd:function(product){let projectedAmount=parseInt(product.projected_amount_usd||"0");return product.tiers&&projectedAmount?1.5*projectedAmount:500}(props.product))},reportSurveyShown:_ref16=>{let{surveyID}=_ref16;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey shown",{$survey_id:surveyID}),actions.setSurveyID(surveyID)},reportSurveySent:_ref17=>{let{surveyID,surveyResponse}=_ref17;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey sent",{$survey_id:surveyID,...surveyResponse}),actions.setSurveyID("")},reportSurveyDismissed:_ref18=>{let{surveyID}=_ref18;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey dismissed",{$survey_id:surveyID}),actions.setSurveyID("")},deactivateProductSuccess:async(_,breakpoint)=>{!values.unsubscribeError&&values.surveyID&&(actions.reportSurveySent(values.surveyID,values.surveyResponse),await breakpoint(400),document.getElementsByClassName("Navigation3000__scene")[0].scrollIntoView())},setScrollToProductKey:_ref19=>{let{scrollToProductKey}=_ref19;scrollToProductKey&&values.isAddonProduct&&scrollToProductKey===props.product.type&&setTimeout(()=>{props.productRef?.current&&props.productRef?.current.scrollIntoView({behavior:"smooth",block:"center"})},0)},initiateProductUpgrade:_ref20=>{let{plan,product,redirectPath}=_ref20;actions.setBillingProductLoading(product.type);let products=`${product.type}:${plan?.plan_key}`;actions.handleProductUpgrade(products,redirectPath)},handleProductUpgrade:_ref21=>{let{products,redirectPath}=_ref21;window.location.href=`/api/billing/activate?products=${products}${redirectPath&&`&redirect_path=${redirectPath}`}`},activateTrial:async(_,breakpoint)=>{actions.setTrialLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/billing/trials/activate",{type:"autosubscribe",target:props.product.type}),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Your trial has been activated!")}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("There was an error activating your trial. Please try again or contact support.")}finally{await breakpoint(400),window.location.reload(),actions.setTrialLoading(!1),actions.setTrialModalOpen(!1)}},cancelTrial:async()=>{actions.setTrialLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/billing/trials/cancel"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Your trial has been cancelled!")}catch(e){console.error(e),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("There was an error cancelling your trial. Please try again or contact support.")}finally{actions.loadBilling(),window.location.reload(),actions.setTrialLoading(!1)}},triggerMoreHedgehogs:async(_,breakpoint)=>{for(let i=0;i<5;i++)props.hogfettiTrigger?.(),await breakpoint(200)}}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref22=>{let{actions,props,values}=_ref22;return{billingLimitInput:{errors:_ref23=>{let{input}=_ref23;return{input:null===input||Number.isInteger(input)?input>25e3?"Please enter a number less than 25,000":void 0:"Please enter a whole number"}},submit:async _ref24=>{let{input}=_ref24,addonTiers="addons"in props.product?props.product.addons?.filter(addon=>addon.subscribed)?.map(addon=>addon.tiers):[],productAndAddonTiers=[props.product.tiers,...addonTiers].filter(Boolean),newAmountAsUsage=props.product.tiers?(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(`${input}`,productAndAddonTiers,values.billing?.discount_percent):0;if(props.product.current_usage&&newAmountAsUsageactions.updateBillingLimits({[props.product.type]:input})},secondaryButton:{children:"I changed my mind"}});return}if(props.product.projected_usage&&newAmountAsUsageactions.updateBillingLimits({[props.product.type]:input})},secondaryButton:{children:"I changed my mind"}});return}actions.updateBillingLimits({[props.product.type]:input})},options:{alwaysShowErrors:!0}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.events)(_ref25=>{let{actions,values}=_ref25;return{afterMount:()=>{actions.setScrollToProductKey(values.scrollToProductKey),actions.billingLoaded()}}})])},"./frontend/src/scenes/billing/paymentEntryLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>paymentEntryLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/urls.ts");let paymentEntryLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)({path:["scenes","billing","PaymentEntryLogic"],actions:{setClientSecret:clientSecret=>({clientSecret}),setLoading:loading=>({loading}),setError:error=>({error}),initiateAuthorization:redirectPath=>({redirectPath}),pollAuthorizationStatus:paymentIntentId=>({paymentIntentId}),setAuthorizationStatus:status=>({status}),showPaymentEntryModal:!0,hidePaymentEntryModal:!0,setRedirectPath:redirectPath=>({redirectPath})},reducers:{clientSecret:[null,{setClientSecret:(_,_ref)=>{let{clientSecret}=_ref;return clientSecret}}],isLoading:[!1,{setLoading:(_,_ref2)=>{let{loading}=_ref2;return loading}}],error:[null,{setError:(_,_ref3)=>{let{error}=_ref3;return error}}],authorizationStatus:[null,{setAuthorizationStatus:(_,_ref4)=>{let{status}=_ref4;return status}}],paymentEntryModalOpen:[!1,{showPaymentEntryModal:()=>!0,hidePaymentEntryModal:()=>!1}],redirectPath:[null,{setRedirectPath:(_,_ref5)=>{let{redirectPath}=_ref5;return redirectPath}}]},listeners:_ref6=>{let{actions,values}=_ref6;return{initiateAuthorization:async _ref7=>{let{redirectPath}=_ref7;actions.setLoading(!0),actions.setError(null);try{let response=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.create("api/billing/activate/authorize");actions.setClientSecret(response.clientSecret),actions.setRedirectPath(redirectPath),actions.setLoading(!1)}catch(error){actions.setError("Failed to initialize payment")}},pollAuthorizationStatus:async _ref8=>{let{paymentIntentId}=_ref8,attempts=0,poll=async()=>{try{let urlParams=new URLSearchParams(window.location.search),searchPaymentIntentId=urlParams.get("payment_intent"),response=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.create("api/billing/activate/authorize/status",{payment_intent_id:paymentIntentId||searchPaymentIntentId}),status=response.status;if(actions.setAuthorizationStatus(status),"success"===status){values.redirectPath?window.location.pathname=values.redirectPath:window.location.pathname=scenes_urls__WEBPACK_IMPORTED_MODULE_2__.j.organizationBilling();return}if("failed"===status){actions.setError("Payment failed");return}++attempts<30?setTimeout(()=>void poll(),2e3):actions.setError("Payment status check timed out")}catch(error){actions.setError("Failed to check payment status")}finally{actions.setLoading(!1),actions.setAuthorizationStatus(null),actions.setClientSecret(null),actions.setRedirectPath(null)}};await poll()}}}})},"./frontend/src/scenes/billing/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>BillingGaugeItemKind});let BillingGaugeItemKind=function(BillingGaugeItemKind){return BillingGaugeItemKind.FreeTier="free_tier",BillingGaugeItemKind.CurrentUsage="current_usage",BillingGaugeItemKind.ProjectedUsage="projected_usage",BillingGaugeItemKind.BillingLimit="billing_limit",BillingGaugeItemKind}({})},"./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>CohortCriteriaRowBuilder_CohortCriteriaRowBuilder,r:()=>LogicalRowDivider});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CohortCriteriaRowBuilder=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.scss"),CohortCriteriaRowBuilder_default=__webpack_require__.n(CohortCriteriaRowBuilder),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CohortCriteriaRowBuilder_default(),options),CohortCriteriaRowBuilder_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),cohortEditLogic=__webpack_require__("./frontend/src/scenes/cohorts/cohortEditLogic.ts"),constants=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),types=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),cohortUtils=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),src_types=__webpack_require__("./frontend/src/types.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CohortCriteriaRowBuilder_CohortCriteriaRowBuilder(_ref){let{id,type,groupIndex,index,logicalOperator,criteria,hideDeleteIcon=!1,onChangeType}=_ref,{setCriteria,duplicateFilter,removeFilter}=(0,index_esm.useActions)((0,cohortEditLogic.B)({id})),rowShape=constants.ng[type],renderFieldComponent=(_field,i)=>{var _field$fieldKey;return(0,jsx_runtime.jsx)("div",{children:constants.fM[_field.type]({fieldKey:_field.fieldKey,criteria,..._field.type===types.vA.Text?{value:_field.defaultValue}:{},..._field.groupTypeFieldKey?{groupTypeFieldKey:_field.groupTypeFieldKey}:{},onChange:newCriteria=>setCriteria(newCriteria,groupIndex,index),groupIndex,index})},null!==(_field$fieldKey=_field.fieldKey)&&void 0!==_field$fieldKey?_field$fieldKey:i)};return(0,jsx_runtime.jsxs)("div",{className:"CohortCriteriaRow",children:[0!==index&&(0,jsx_runtime.jsx)(LogicalRowDivider,{logicalOperator:logicalOperator}),(0,jsx_runtime.jsx)(lib.Field,{name:"id",template:_ref2=>{let{error,kids}=_ref2;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria",error&&"CohortCriteriaRow__Criteria--error"),children:[kids,error&&(0,jsx_runtime.jsx)(LemonBanner.V,{className:"my-2",type:"error",children:error})]})})},children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-nowrap items-center mb-1",children:[(0,jsx_runtime.jsx)(lib.Field,{name:"value",template:_ref3=>{let{error,kids}=_ref3;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria__Field",error&&"CohortCriteriaRow__Criteria__Field--error"),children:kids})})},children:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{children:constants.fM[types.vA.Behavioral]({fieldKey:"value",criteria,onChange:newCriteria=>{var _newCriteria$value;setCriteria((0,cohortUtils.d5)(newCriteria,!0),groupIndex,index),onChangeType?.(null!==(_newCriteria$value=newCriteria.value)&&void 0!==_newCriteria$value?_newCriteria$value:src_types.G2.PerformEvent)}})})})}),(0,jsx_runtime.jsx)("div",{className:"CohortCriteriaRow__inline-divider"}),(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCopy,{}),onClick:()=>duplicateFilter(groupIndex,index)}),!hideDeleteIcon&&(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),onClick:()=>removeFilter(groupIndex,index)})]}),(0,jsx_runtime.jsxs)("div",{className:"flex",children:[(0,jsx_runtime.jsx)("span",{className:"CohortCriteriaRow__Criteria__arrow",children:"↳"}),(0,jsx_runtime.jsx)("div",{className:"flex flex-wrap items-center min-w-0",children:rowShape.fields.map((field,i)=>!field.hide&&(field.fieldKey?(0,jsx_runtime.jsx)(lib.Field,{name:field.fieldKey,template:_ref4=>{let{error,kids}=_ref4;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria__Field",error&&"CohortCriteriaRow__Criteria__Field--error"),children:kids})})},children:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:renderFieldComponent(field,i)})},i):(0,jsx_runtime.jsx)("div",{className:"CohortCriteriaRow__Criteria__Field",children:renderFieldComponent(field,i)},i)))})]})]})})]})}function LogicalRowDivider(_ref5){let{logicalOperator}=_ref5;return(0,jsx_runtime.jsx)(src.p2,{className:"logical-row-divider my-4",label:logicalOperator})}},"./frontend/src/scenes/cohorts/CohortFilters/CohortField.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PY:()=>CohortEventFiltersField,s:()=>CohortNumberField,Lb:()=>CohortPersonPropertiesValuesField,af:()=>CohortRelativeAndExactTimeField,Y4:()=>CohortSelectorField,C$:()=>CohortTaxonomicField,J_:()=>CohortTextField});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CohortField=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortField.scss"),CohortField_default=__webpack_require__.n(CohortField),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CohortField_default(),options),CohortField_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),DateFilter=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx"),PropertyValue=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx"),PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TaxonomicPopover=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),constants=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),CohortFilters_types=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),cohortUtils=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),src_types=__webpack_require__("./frontend/src/types.ts");let cohortFieldLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","cohorts","CohortFilters","cohortFieldLogic"]),(0,index_esm.key)(props=>`${props.cohortFilterLogicKey}`),(0,index_esm.props)({}),(0,index_esm.connect)({values:[groupsModel.$,["groupTypes","aggregationLabel"],userLogic.userLogic,["hasAvailableFeature"]]}),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.fieldKey&&!(0,utils.h0)(props.criteria,oldProps.criteria)&&actions.onChange(props.criteria)}),(0,index_esm.actions)({onChange:newField=>({newField})}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{value:[(0,cohortUtils.Nz)(props.criteria,props.fieldKey),{onChange:(_,_ref3)=>{let{newField}=_ref3;return(0,cohortUtils.Nz)({...props.criteria,...newField},props.fieldKey)}}]}}),(0,index_esm.selectors)({hasBehavioralCohortFiltering:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(src_types.P$.BEHAVIORAL_COHORT_FILTERING)],fieldOptionGroups:[s=>[(_,props)=>props.fieldOptionGroupTypes,s.groupTypes,s.aggregationLabel,s.hasBehavioralCohortFiltering],(fieldOptionGroupTypes,groupTypes,aggregationLabel,hasBehavioralCohortFiltering)=>{var _fieldOptionGroupType;let fieldOptions=hasBehavioralCohortFiltering?{...constants.FN,...constants.Dx}:constants.FN,allGroups={...fieldOptions,[CohortFilters_types.Wy.Actors]:{label:"Actors",type:CohortFilters_types.Wy.Actors,values:{[src_types.MK.Person]:{label:"Persons"},...Object.fromEntries(Array.from(groupTypes.values()).map(type=>[`${src_types.MK.GroupPrefix}_${type.group_type_index}`,{label:aggregationLabel(type.group_type_index).plural}]).filter(Boolean))}}};return[...null!==(_fieldOptionGroupType=fieldOptionGroupTypes?.map(type=>allGroups[type]))&&void 0!==_fieldOptionGroupType?_fieldOptionGroupType:[]]}],currentOption:[s=>[s.fieldOptionGroups,s.value],(fieldOptionGroups,value)=>value&&"string"==typeof value?fieldOptionGroups.reduce((accumulator,group)=>({...accumulator,...group.values}),{})?.[value]:null],calculatedValueLoading:[(s,p)=>[s.value,p.criteria,p.fieldKey,cohortsModel.Q.selectors.cohortsLoading,actionsModel.D.selectors.actionsLoading],(value,criteria,fieldKey,cohortsModelLoading,actionsModelLoading)=>taxonomicGroupType=>criteria.type===CohortFilters_types.y4.Cohort&&"value_property"===fieldKey&&"number"==typeof value&&cohortsModelLoading||taxonomicGroupType===types.t.Actions&&"number"==typeof value&&actionsModelLoading],calculatedValue:[(s,p)=>[s.value,p.criteria,p.fieldKey,cohortsModel.Q.selectors.cohortsLoading,actionsModel.D.selectors.actionsLoading],(value,criteria,fieldKey,cohortsModelLoading,actionsModelLoading)=>taxonomicGroupType=>{var _cohortsModel$findMou,_actionsModel$findMou;return criteria.type===CohortFilters_types.y4.Cohort&&"value_property"===fieldKey&&"number"==typeof value?cohortsModelLoading?"Loading...":null!==(_cohortsModel$findMou=cohortsModel.Q.findMounted()?.values?.cohortsById?.[value]?.name)&&void 0!==_cohortsModel$findMou?_cohortsModel$findMou:`Cohort ${value}`:taxonomicGroupType===types.t.Actions&&"number"==typeof value?actionsModelLoading?"Loading...":null!==(_actionsModel$findMou=actionsModel.D.findMounted()?.values?.actionsById?.[value]?.name)&&void 0!==_actionsModel$findMou?_actionsModel$findMou:`Action ${value}`:value}]}),(0,index_esm.listeners)(_ref4=>{let{props}=_ref4;return{onChange:_ref5=>{let{newField}=_ref5;props.onChange?.(cohortUtils.K7(newField))}}})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let uniqueMemoizedIndex=0,useCohortFieldLogic=props=>{let cohortFilterLogicKey=(0,react.useMemo)(()=>props.cohortFilterLogicKey||`cohort-filter-${uniqueMemoizedIndex++}`,[props.cohortFilterLogicKey]);return{logic:cohortFieldLogic({...props,cohortFilterLogicKey})}};function CohortSelectorField(_ref){let{fieldKey,cohortFilterLogicKey,criteria,fieldOptionGroupTypes,placeholder,onChange:_onChange}=_ref,{logic}=useCohortFieldLogic({fieldKey,cohortFilterLogicKey,criteria,fieldOptionGroupTypes,onChange:_onChange}),{fieldOptionGroups,currentOption,value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(LemonButton.$,{type:"secondary",sideIcon:void 0,"data-attr":`cohort-selector-field-${fieldKey}`,dropdown:{className:"Popover__CohortField",placement:"bottom-start",overlay:(0,jsx_runtime.jsx)("div",{className:"CohortField__dropdown",children:fieldOptionGroups.map((_ref2,i)=>{let{label,type:groupKey,values}=_ref2;return 0!=Object.keys(values).length?(0,jsx_runtime.jsxs)("div",{children:[0!==i&&(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)("h5",{children:label}),Object.entries(values).map(_ref3=>{let[_value,option]=_ref3;return(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{onChange({[fieldKey]:_value})},active:_value==value,fullWidth:!0,"data-attr":`cohort-${groupKey}-${_value}-type`,children:option.label},_value)})]},i):null})})},children:(0,jsx_runtime.jsx)("span",{className:"font-medium",children:currentOption?.label||(0,jsx_runtime.jsx)("span",{className:"text-muted",children:placeholder})})})}function CohortTaxonomicField(_ref4){let{fieldKey,groupTypeFieldKey="event_type",cohortFilterLogicKey,criteria,taxonomicGroupTypes=[types.t.Events,types.t.Actions],placeholder="Choose event",onChange:_onChange}=_ref4,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{calculatedValue,calculatedValueLoading}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic),groupType=criteria[groupTypeFieldKey];return(0,jsx_runtime.jsx)(TaxonomicPopover.b,{className:"CohortField",groupType:groupType,loading:calculatedValueLoading(groupType),value:calculatedValue(groupType),onChange:(v,g)=>{onChange({[fieldKey]:v,[groupTypeFieldKey]:g})},excludedProperties:{[types.t.Events]:[null]},groupTypes:taxonomicGroupTypes,placeholder:placeholder,"data-attr":`cohort-taxonomic-field-${fieldKey}`,renderValue:value=>value?(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{value:value,type:groupType}):(0,jsx_runtime.jsx)("span",{className:"text-muted",children:placeholder})})}function CohortPersonPropertiesValuesField(_ref5){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange,propertyKey,operator}=_ref5,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(PropertyValue.O,{operator:operator||src_types.WV.Exact,propertyKey:propertyKey,type:src_types.FT.Person,value:value,onSet:newValue=>{onChange({[fieldKey]:newValue})},placeholder:"Enter value..."})}function CohortEventFiltersField(_ref6){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange,groupIndex,index}=_ref6,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic),componentRef=(0,react.useRef)(null),valueExists=(value||[]).length>0;return(0,react.useEffect)(()=>{let parent=componentRef.current?.closest(".CohortCriteriaRow__Criteria__Field");parent&&(valueExists?parent.classList.add("basis-full"):parent.classList.remove("basis-full"))},[componentRef,value]),(0,jsx_runtime.jsx)("div",{ref:componentRef,children:(0,jsx_runtime.jsx)(PropertyFilters.t,{propertyFilters:value||[],taxonomicGroupTypes:[types.t.EventProperties,types.t.EventFeatureFlags,types.t.Elements,types.t.HogQLExpression],onChange:newValue=>{onChange({[fieldKey]:newValue})},pageKey:`${fieldKey}-${groupIndex}-${index}`,eventNames:criteria?.key?[criteria?.key]:[],disablePopover:!0,hasRowOperator:!!valueExists,sendAllKeyUpdates:!0})})}function CohortRelativeAndExactTimeField(_ref7){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}=_ref7,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(DateFilter.f,{dateFrom:String(value),onChange:fromDate=>{onChange({[fieldKey]:fromDate})},max:1e3,isFixedDateMode:!0,allowedRollingDateOptions:["days","weeks","months","years"],showCustom:!0,dateOptions:[{key:"Last 7 days",values:["-7d"],getFormattedDate:date=>(0,utils.p6)(date.subtract(7,"d")),defaultInterval:"day"},{key:"Last 30 days",values:["-30d"],getFormattedDate:date=>(0,utils.p6)(date.subtract(14,"d")),defaultInterval:"day"}],size:"medium",makeLabel:(_,startOfRange)=>(0,jsx_runtime.jsxs)("span",{className:"hide-when-small",children:["Matches all values after ",startOfRange," if evaluated today."]})})}function CohortTextField(_ref8){let{value}=_ref8;return(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("CohortField","CohortField__CohortTextField"),children:value})}function CohortNumberField(_ref9){let{fieldKey,cohortFilterLogicKey,criteria,onChange:_onChange}=_ref9,{logic}=useCohortFieldLogic({fieldKey,cohortFilterLogicKey,criteria,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(LemonInput.D,{type:"number",value:null!=value?value:void 0,onChange:nextNumber=>{onChange({[fieldKey]:nextNumber})},min:1,step:1,className:(0,clsx_m.default)("CohortField","CohortField__CohortNumberField")})}},"./frontend/src/scenes/cohorts/CohortFilters/constants.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Dx:()=>SCALE_FIELD_VALUES,FN:()=>FIELD_VALUES,GK:()=>COHORT_TYPE_OPTIONS,Gp:()=>COHORT_EVENT_TYPES_WITH_EXPLICIT_DATETIME,Z9:()=>NEW_CRITERIA,eC:()=>NEW_CRITERIA_GROUP,fM:()=>renderField,hJ:()=>CRITERIA_VALIDATIONS,ng:()=>ROWS,x_:()=>BEHAVIORAL_TYPE_TO_LABEL,yK:()=>NEW_COHORT});var lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/CohortField.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let FIELD_VALUES={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation]:{label:"Event Aggregation",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.vN.TotalCount]:{label:"Total count"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers]:{label:"Unique users"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.WeeklyActiveUsers]:{label:"Weekly active users"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.MonthlyActiveUsers]:{label:"Monthly active users"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation]:{label:"Property Aggregation",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Average]:{label:"Average"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Sum]:{label:"Sum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Minimum]:{label:"Minimum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Maximum]:{label:"Maximum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Median]:{label:"Median"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P90]:{label:"90th percentile"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P95]:{label:"95th percentile"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P99]:{label:"99th percentile"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors]:{label:"Actors",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.MK.Person]:{label:"Persons"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral]:{label:"Behavioral",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{label:"Completed event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{label:"Did not complete event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{label:"Completed an event multiple times"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral]:{label:"Person Properties",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty]:{label:"Have the property"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotHaveProperty]:{label:"Do not have the property"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral]:{label:"Cohorts",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort]:{label:"In cohort"},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.NotInCohort]:{label:"Not in cohort"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]:{label:"Lifecycle",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral,values:{}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits]:{label:"Units",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day]:{label:"days"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Week]:{label:"weeks"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Month]:{label:"months"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Year]:{label:"years"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators]:{label:"Date Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.kR.BeforeTheLast]:{label:"before the last"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Between]:{label:"between"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.NotBetween]:{label:"not between"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.OnTheDate]:{label:"on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.NotOnTheDate]:{label:"not on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Since]:{label:"since"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Before]:{label:"before"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.IsSet]:{label:"is set"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators]:{label:"Date Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateExact]:{label:"on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateAfter]:{label:"since"},[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateBefore]:{label:"before"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators]:{label:"Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact]:{label:"equals"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNot]:{label:"does not equal"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IContains]:{label:"contains"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotIContains]:{label:"does not contain"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Regex]:{label:"matches regex"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotRegex]:{label:"does not match regex"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThan]:{label:"greater than"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThanOrEqual]:{label:"greater than or equal to"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThan]:{label:"less than"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThanOrEqual]:{label:"less than or equal to"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsSet]:{label:"is set"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNotSet]:{label:"is not set"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Between]:{label:"between"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotBetween]:{label:"not between"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Minimum]:{label:"minimum"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Maximum]:{label:"maximum"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators]:{label:"Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact]:{label:"exactly"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThanOrEqual]:{label:"at least"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThanOrEqual]:{label:"at most"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions]:{label:"Value Options",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.MostRecent]:{label:"most recent value"},[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.Previous]:{label:"previous value"},[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.OnDate]:{label:"value on the date"}}}},SCALE_FIELD_VALUES={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral]:{label:"Behavioral",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{label:"Completed event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{label:"Did not complete event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{label:"Completed an event multiple times"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents]:{label:"Completed a sequence of events"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformSequenceEvents]:{label:"Did not complete a sequence of events"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]:{label:"Lifecycle",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime]:{label:"Completed an event for the first time"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly]:{label:"Completed an event regularly"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent]:{label:"Stopped doing an event"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain]:{label:"Started doing an event again"}}}},ROWS={[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,negation:!0,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"operator_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"times after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"followed by"},{fieldKey:"seq_event",groupTypeFieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"within"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the initial event"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformSequenceEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents,negation:!0,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"followed by"},{fieldKey:"seq_event",groupTypeFieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"within"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the initial event"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty,negation:!1,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotHaveProperty]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty,negation:!0,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort,negation:!1,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId,defaultValue:"id",hide:!0},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.NotInCohort]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort,negation:!0,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId,defaultValue:"id",hide:!0},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"operator_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"times per"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:1},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"period for at least"},{fieldKey:"min_periods",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:3},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the last"},{fieldKey:"total_periods",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"periods"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"but had done it in the"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"prior to now"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"but had not done it in the"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"prior to now"}]}},COHORT_EVENT_TYPES_WITH_EXPLICIT_DATETIME=Object.entries(ROWS).filter(_ref=>{let[_,row]=_ref;return row.fields.some(field=>field.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime)}).map(_ref2=>{let[eventType,_]=_ref2;return eventType}),renderField={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Behavioral]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Aggregation]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Actors]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.DateOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Value]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text]:function _renderField(p){var _p$value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.J_,{...p,value:String(null!==(_p$value=p?.value)&&void 0!==_p$value?_p$value:"")})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Actions],placeholder:"Choose event or action"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.PersonProperties],placeholder:"Choose person property"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.PY,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues]:function _renderField(p){var _p$criteria$operator;return p.criteria.operator&&[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNotSet].includes(p.criteria.operator)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Lb,{...p,propertyKey:p.criteria.key,operator:null!==(_p$criteria$operator=p.criteria.operator)&&void 0!==_p$criteria$operator?_p$criteria$operator:void 0})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.s,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.s,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Cohorts],placeholder:"Choose cohort"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.af,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType]:function _renderField(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId]:function _renderField(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{})}},CRITERIA_VALIDATIONS={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventsAndActions,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventFilters,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyPersonProperties,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyPersonPropertyValues,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventType,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number]:d=>Number(d)>1?void 0:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyNumber,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyNumberTicker,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyTimeUnit,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyMathOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyMathOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyRelativeAndExactTime,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyCohortId,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyCohortValues,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Value]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyValue,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.DateOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyDateOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Actors]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyActors,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Aggregation]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyAggregation,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Behavioral]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyBehavioral},COHORT_TYPE_OPTIONS=[{value:lib_constants__WEBPACK_IMPORTED_MODULE_1__.ow.Static,label:"Static \xb7 Updated manually"},{value:lib_constants__WEBPACK_IMPORTED_MODULE_1__.ow.Dynamic,label:"Dynamic \xb7 Updates automatically"}],NEW_CRITERIA={type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,event_type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,explicit_datetime:"-30d"},NEW_CRITERIA_GROUP={id:Math.random().toString().substr(2,5),type:_types__WEBPACK_IMPORTED_MODULE_4__.J2.Or,values:[NEW_CRITERIA]},NEW_COHORT={id:"new",groups:[{id:Math.random().toString().substr(2,5),matchType:lib_constants__WEBPACK_IMPORTED_MODULE_1__.pt,properties:[]}],filters:{properties:{id:Math.random().toString().substr(2,5),type:_types__WEBPACK_IMPORTED_MODULE_4__.J2.Or,values:[NEW_CRITERIA_GROUP]}}},BEHAVIORAL_TYPE_TO_LABEL={...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral].values,...SCALE_FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral].values,...SCALE_FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral].values}},"./frontend/src/scenes/cohorts/CohortFilters/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rx:()=>CohortClientErrors,Wy:()=>FieldOptionsType,vA:()=>FilterType,y4:()=>BehavioralFilterKey});let FilterType=function(FilterType){return FilterType.Behavioral="behavioral",FilterType.Aggregation="aggregation",FilterType.Actors="actors",FilterType.TimeUnit="timeUnit",FilterType.DateOperator="dateOperator",FilterType.MathOperator="mathOperator",FilterType.EventsAndActionsMathOperator="eventsAndActionsMathOperator",FilterType.Value="value",FilterType.Text="text",FilterType.EventsAndActions="eventsAndActions",FilterType.RelativeAndExactTime="relativeAndExactTime",FilterType.EventFilters="eventFilters",FilterType.PersonProperties="personProperties",FilterType.PersonPropertyValues="personPropertyValues",FilterType.EventType="eventType",FilterType.Number="number",FilterType.NumberTicker="numberTicker",FilterType.CohortValues="cohortValues",FilterType.CohortId="cohortId",FilterType}({}),FieldOptionsType=function(FieldOptionsType){return FieldOptionsType.EventAggregation="eventAggregation",FieldOptionsType.PropertyAggregation="propertyAggregation",FieldOptionsType.Actors="actors",FieldOptionsType.EventBehavioral="eventBehavioral",FieldOptionsType.PersonPropertyBehavioral="personPropertyBehavioral",FieldOptionsType.CohortBehavioral="cohortBehavioral",FieldOptionsType.LifecycleBehavioral="lifecycleBehavioral",FieldOptionsType.TimeUnits="timeUnits",FieldOptionsType.DateOperators="dateOperators",FieldOptionsType.SingleFieldDateOperators="singleFieldDateOperators",FieldOptionsType.MathOperators="mathOperators",FieldOptionsType.ValueOptions="valueOptions",FieldOptionsType.EventsAndActionsMathOperators="eventsAndActionsMathOperators",FieldOptionsType}({}),BehavioralFilterKey=function(BehavioralFilterKey){return BehavioralFilterKey.Behavioral="behavioral",BehavioralFilterKey.Cohort="cohort",BehavioralFilterKey.Person="person",BehavioralFilterKey}({}),CohortClientErrors=function(CohortClientErrors){return CohortClientErrors.NegationCriteriaMissingOther="Negation criteria can only be used when matching all criteria (AND), and must be accompanied by at least one positive matching criteria.",CohortClientErrors.NegationCriteriaCancel="These criteria cancel each other out, and would result in no matching persons.",CohortClientErrors.PeriodTimeMismatch="The lower bound period value must not be greater than the upper bound value.",CohortClientErrors.SequentialTimeMismatch="The lower bound period sequential time value must not be greater than the upper bound time value.",CohortClientErrors.EmptyEventsAndActions="Event or action cannot be empty.",CohortClientErrors.EmptyEventFilters="Event filters cannot be empty.",CohortClientErrors.EmptyPersonProperties="Person property name cannot be empty.",CohortClientErrors.EmptyPersonPropertyValues="Person property value cannot be empty",CohortClientErrors.EmptyEventType="Event type cannot be empty.",CohortClientErrors.EmptyNumber="Period values must be at least 1 day and cannot be empty.",CohortClientErrors.EmptyNumberTicker="Number cannot be empty.",CohortClientErrors.EmptyTimeUnit="Time interval cannot be empty.",CohortClientErrors.EmptyRelativeAndExactTime="Time value cannot be empty.",CohortClientErrors.EmptyMathOperator="Math operator cannot be empty.",CohortClientErrors.EmptyCohortId="Cohort id cannot be empty.",CohortClientErrors.EmptyCohortValues="Cohort value cannot be empty.",CohortClientErrors.EmptyValue="Event property value selector cannot be empty.",CohortClientErrors.EmptyDateOperator="Date cannot be empty or invalid.",CohortClientErrors.EmptyActors="Actors selector cannot be empty.",CohortClientErrors.EmptyAggregation="Aggregation selector cannot be empty.",CohortClientErrors.EmptyBehavioral="Behavioral selector cannot be empty.",CohortClientErrors}({})},"./frontend/src/scenes/cohorts/cohortEditLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>cohortEditLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/models/cohortsModel.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./frontend/src/types.ts");let cohortEditLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.id||"new"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","cohorts","cohortLogicEdit"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({actions:[lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx,["reportExperimentExposureCohortEdited"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({saveCohort:function(){let cohortParams=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{cohortParams}},setCohort:cohort=>({cohort}),deleteCohort:!0,fetchCohort:id=>({id}),setCohortMissing:!0,onCriteriaChange:(newGroup,id)=>({newGroup,id}),setPollTimeout:pollTimeout=>({pollTimeout}),checkIfFinishedCalculating:cohort=>({cohort}),setOuterGroupsType:type=>({type}),setInnerGroupType:(type,groupIndex)=>({type,groupIndex}),duplicateFilter:(groupIndex,criteriaIndex)=>({groupIndex,criteriaIndex}),addFilter:groupIndex=>({groupIndex}),removeFilter:(groupIndex,criteriaIndex)=>({groupIndex,criteriaIndex}),setCriteria:(newCriteria,groupIndex,criteriaIndex)=>({newCriteria,groupIndex,criteriaIndex}),setQuery:query=>({query}),duplicateCohort:asStatic=>({asStatic})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref=>{let{props}=_ref;return{cohort:[scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,{setOuterGroupsType:(state,_ref2)=>{let{type}=_ref2;return{...state,filters:{properties:{...state.filters.properties,type}}}},setInnerGroupType:(state,_ref3)=>{let{type,groupIndex}=_ref3;return(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>groupList.map((group,groupI)=>groupI===groupIndex?{...group,type}:group))},duplicateFilter:(state,_ref4)=>{let{groupIndex,criteriaIndex}=_ref4;return void 0!==criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList.slice(0,criteriaIndex),criteriaList[criteriaIndex],...criteriaList.slice(criteriaIndex)],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList.slice(0,groupIndex),groupList[groupIndex],...groupList.slice(groupIndex)])},addFilter:(state,_ref5)=>{let{groupIndex}=_ref5;return void 0!==groupIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList,scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.Z9],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList,scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.eC])},removeFilter:(state,_ref6)=>{let{groupIndex,criteriaIndex}=_ref6;return void 0!==criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList.slice(0,criteriaIndex),...criteriaList.slice(criteriaIndex+1)],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList.slice(0,groupIndex),...groupList.slice(groupIndex+1)])},setCriteria:(state,_ref7)=>{let{newCriteria,groupIndex,criteriaIndex}=_ref7;return(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>criteriaList.map((oldCriteria,criteriaI)=>(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.tz)(oldCriteria)?oldCriteria:criteriaI===criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.d5)({...oldCriteria,...newCriteria}):oldCriteria),groupIndex)}}],cohortMissing:[!1,{setCohortMissing:()=>!0}],pollTimeout:[null,{setPollTimeout:(_,_ref8)=>{let{pollTimeout}=_ref8;return pollTimeout}}],query:[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.DataTableNode,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.ActorsQuery,fixedProperties:[{type:_types__WEBPACK_IMPORTED_MODULE_15__.FT.Cohort,key:"id",value:parseInt(String(props.id))}]},full:!0,showPropertyFilter:!1,showEventFilter:!1},{setQuery:(state,_ref9)=>{let{query}=_ref9;return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_14__.TC)(query)?query:state}}]}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref10=>{let{actions}=_ref10;return{cohort:{defaults:scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,errors:_ref11=>{let{id,name,csv,is_static,filters}=_ref11;return{name:name?void 0:"Cohort name cannot be empty",csv:is_static&&"new"===id&&!csv?"You need to upload a CSV file":null,filters:{properties:{values:is_static?void 0:filters.properties.values.map(scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.yn)}}}},submit:cohort=>{actions.saveCohort(cohort)}}}}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref12=>{let{actions,values,key}=_ref12;return{cohort:[scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,{setCohort:_ref13=>{let{cohort}=_ref13;return(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)},fetchCohort:async(_ref14,breakpoint)=>{let{id}=_ref14;try{let cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.get(id);return breakpoint(),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),actions.checkIfFinishedCalculating(cohort),(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)}catch(error){return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to fetch cohort"),actions.setCohortMissing(),values.cohort}},saveCohort:async(_ref15,breakpoint)=>{let{cohortParams}=_ref15,cohort={...cohortParams},existingCohort=values.cohort,cohortFormData=(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.A2)(cohort);try{"new"!==cohort.id?(cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.update(cohort.id,cohortFormData),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),cohort.experiment_set&&cohort.experiment_set.length>0&&actions.reportExperimentExposureCohortEdited(existingCohort,cohort)):(cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.create(cohortFormData),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.cohortCreated(cohort))}catch(error){return breakpoint(),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to save cohort"),values.cohort}return cohort.is_calculating=!0,breakpoint(),delete cohort.csv,actions.setCohort(cohort),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.success("Cohort saved. Please wait up to a few minutes for it to be calculated",{toastId:`cohort-saved-${key}`}),actions.checkIfFinishedCalculating(cohort),(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)},onCriteriaChange:_ref16=>{let{newGroup,id}=_ref16,cohort={...values.cohort},index=cohort.groups.findIndex(group=>group.id===id);return newGroup.matchType?cohort.groups[index]={id:cohort.groups[index].id,matchType:lib_constants__WEBPACK_IMPORTED_MODULE_5__.Cd,...newGroup}:cohort.groups[index]={...cohort.groups[index],...newGroup},(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)}}],duplicatedCohort:[null,{duplicateCohort:async(_ref17,breakpoint)=>{let cohort,{asStatic}=_ref17;try{if(await breakpoint(200),asStatic)cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.duplicate(values.cohort.id);else{let data={...values.cohort};data.name+=" (dynamic copy)",cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.create(data)}return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.success("Cohort duplicated. Please wait up to a few minutes for it to be calculated",{toastId:`cohort-duplicated-${cohort.id}`,button:{label:"View cohort",action:()=>{kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohort(cohort.id))}}}),cohort}catch(error){return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to duplicate cohort"),null}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref18=>{let{actions,values}=_ref18;return{deleteCohort:()=>{_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.findMounted()?.actions.deleteCohort({id:values.cohort.id,name:values.cohort.name}),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohorts())},submitCohort:()=>{values.cohortHasErrors&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error("There was an error submiting this cohort. Make sure the cohort filters are correct.")},checkIfFinishedCalculating:async(_ref19,breakpoint)=>{let{cohort}=_ref19;cohort.is_calculating?actions.setPollTimeout(window.setTimeout(async()=>{let newCohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.get(cohort.id);breakpoint(),actions.checkIfFinishedCalculating(newCohort)},1e3)):(actions.setCohort(cohort),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_10__.T.findMounted({syncWithUrl:!0})?.actions.loadCohorts(),values.pollTimeout&&(clearTimeout(values.pollTimeout),actions.setPollTimeout(null)))}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.actionToUrl)(_ref20=>{let{values}=_ref20;return{saveCohortSuccess:()=>scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohort(values.cohort.id)}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref21=>{let{actions,props}=_ref21;props.id&&"new"!==props.id?actions.fetchCohort(props.id):actions.setCohort(scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref22=>{let{values}=_ref22;values.pollTimeout&&clearTimeout(values.pollTimeout)})])},"./frontend/src/scenes/cohorts/cohortUtils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A2:()=>createCohortFormData,K7:()=>cleanBehavioralTypeCriteria,KE:()=>applyAllNestedCriteria,MY:()=>COHORT_MATCHING_DAYS,Nz:()=>resolveCohortFieldValue,VC:()=>criteriaToHumanSentence,d5:()=>cleanCriteria,et:()=>criteriaToBehavioralFilterType,fQ:()=>applyAllCriteriaGroup,tz:()=>isCohortCriteriaGroup,yn:()=>validateGroup});var fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__),lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts");__webpack_require__("./frontend/src/lib/constants.tsx");var lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),_types__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function cleanBehavioralTypeCriteria(criteria){let type;return[_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformMultipleEvents,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents,_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventFirstTime,_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral),[_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort,_types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort),[_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person),{...criteria,...type?{type}:{}}}function isCohortCriteriaGroup(criteria){return!!criteria&&void 0!==criteria.type&&void 0!==criteria.values}function createCohortFormData(cohort){var _cohort$description;let rawCohort={...cohort.name?{name:cohort.name}:{},description:null!==(_cohort$description=cohort.description)&&void 0!==_cohort$description?_cohort$description:"",...cohort.csv?{csv:cohort.csv}:{},...cohort.is_static?{is_static:cohort.is_static}:{},filters:JSON.stringify(cohort.is_static?{properties:{}}:{properties:{...applyAllCriteriaGroup(applyAllNestedCriteria(cohort,criteriaList=>criteriaList.map(c=>({...c,..."value_property"in c?{value:c.value_property}:{},value_property:void 0}))),groupList=>groupList.map(g=>({...g,id:void 0}))).filters.properties,id:void 0}})},cohortFormData=new FormData;for(let[itemKey,value]of Object.entries(rawCohort))cohortFormData.append(itemKey,value);return cohortFormData}function validateGroup(group){if(!isCohortCriteriaGroup(group))return{};let criteria=group.values.filter(g=>!isCohortCriteriaGroup(g)).map((c,index)=>({...c,index})),negatedCriteria=criteria.filter(c=>!!c.negation),negatedCriteriaIndices=new Set(negatedCriteria.map(c=>c.index));if(group.type!==_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length>0||group.type===_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length===criteria.length){let errorMsg=`${negatedCriteria.map(c=>`'${scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.x_[criteriaToBehavioralFilterType(c)].label}'`).join(", ")} ${negatedCriteria.length>1?"are":"is a"} negative cohort criteria. ${scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaMissingOther}`;return{id:errorMsg,values:criteria.map(c=>({value:negatedCriteriaIndices.has(c.index)?errorMsg:void 0}))}}let negatedFailingCriteriaIndices=new Set;if(negatedCriteria.forEach(negatedC=>{let baseCriteria={...negatedC};criteria.forEach(c=>{baseCriteria.index!==c.index&&fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default()(cleanCriteria(baseCriteria),Object.assign({},cleanCriteria(c),{negation:!c.negation}))&&(negatedFailingCriteriaIndices.add(c.index),negatedFailingCriteriaIndices.add(baseCriteria.index))})}),group.type===_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length>0&&negatedFailingCriteriaIndices.size>0)return{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaCancel,values:criteria.map(c=>({value:negatedFailingCriteriaIndices.has(c.index)?scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaCancel:void 0}))};let regularEventCriteria=criteria.filter(c=>c.value===_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly);if(regularEventCriteria.length>0&®ularEventCriteria.every(c=>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.min_periods)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.total_periods)))return{values:criteria.map(c=>{var _c$min_periods,_c$total_periods;return c.value===_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly&&(null!==(_c$min_periods=c.min_periods)&&void 0!==_c$min_periods?_c$min_periods:0)>(null!==(_c$total_periods=c.total_periods)&&void 0!==_c$total_periods?_c$total_periods:0)?{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch,min_periods:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch,total_periods:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch}:{}})};let sequentialTimeCriteria=criteria.filter(c=>[_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents].includes(c.value));return sequentialTimeCriteria.length>0&&sequentialTimeCriteria.every(c=>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.seq_time_value)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.time_value)&&void 0!==c.time_interval&&void 0!==c.seq_time_interval)?{values:criteria.map(c=>{var _c$seq_time_value,_c$seq_time_interval,_c$time_value,_c$time_interval;return[_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents].includes(c.value)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.ow)(Number(null!==(_c$seq_time_value=c.seq_time_value)&&void 0!==_c$seq_time_value?_c$seq_time_value:0),null!==(_c$seq_time_interval=c.seq_time_interval)&&void 0!==_c$seq_time_interval?_c$seq_time_interval:_types__WEBPACK_IMPORTED_MODULE_6__.Xy.Day)>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.ow)(Number(null!==(_c$time_value=c.time_value)&&void 0!==_c$time_value?_c$time_value:0),null!==(_c$time_interval=c.time_interval)&&void 0!==_c$time_interval?_c$time_interval:_types__WEBPACK_IMPORTED_MODULE_6__.Xy.Day)?{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch,seq_time_value:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch,time_value:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch}:{}})}:{values:criteria.map(c=>{let behavioralFilterType=criteriaToBehavioralFilterType(c),requiredFields=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[behavioralFilterType].fields.filter(f=>!!f.fieldKey);[_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty].includes(behavioralFilterType)&&"operator"in c&&c.operator&&[_types__WEBPACK_IMPORTED_MODULE_6__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_6__.WV.IsNotSet].includes(c.operator)&&(requiredFields=requiredFields.filter(f=>"value_property"!==f.fieldKey)),requiredFields=requiredFields.filter(f=>"event_filters"!==f.fieldKey);let eventFilterError=c?.event_filters&&c.event_filters.length>0&&c.event_filters.some(prop=>prop?.type!==_types__WEBPACK_IMPORTED_MODULE_6__.FT.HogQL&&(0,lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_1__.t_)(prop))?scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.EmptyEventFilters:void 0,criteriaErrors=Object.fromEntries(requiredFields.map(_ref=>{let{fieldKey,type}=_ref;return[fieldKey,(Array.isArray(c[fieldKey])?c[fieldKey].length>0:void 0!==c[fieldKey]&&null!==c[fieldKey]&&""!==c[fieldKey])?void 0:scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.hJ?.[type](c[fieldKey])]})),allErrors={...criteriaErrors,event_filters:eventFilterError},consolidatedErrors=Object.values(allErrors).filter(e=>!!e).join(" ");return{...(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Ae)(allErrors)?{}:{id:consolidatedErrors},...allErrors}})}}function criteriaToBehavioralFilterType(criteria){var _criteria$value;if(criteria.negation){if(criteria.value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents;if(criteria.value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformedEvent;if(criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty;if(criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort)return _types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort}return null!==(_criteria$value=criteria.value)&&void 0!==_criteria$value?_criteria$value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent}function resolveCohortFieldValue(criteria,fieldKey){var _criteria$fieldKey;return"value"===fieldKey?criteriaToBehavioralFilterType(criteria):null!==(_criteria$fieldKey=criteria?.[fieldKey])&&void 0!==_criteria$fieldKey?_criteria$fieldKey:null}function applyAllCriteriaGroup(oldCohort,fn){return{...oldCohort,filters:{properties:{...oldCohort.filters.properties,values:fn(oldCohort.filters.properties.values)}}}}function applyAllNestedCriteria(oldCohort,fn,groupIndex){var _oldCohort$filters$pr;return{...oldCohort,filters:{properties:{...oldCohort.filters.properties,values:null!==(_oldCohort$filters$pr=oldCohort.filters.properties.values?.map((group,groupI)=>(void 0===groupIndex||groupI===groupIndex)&&isCohortCriteriaGroup(group)?{...group,values:fn(group.values)}:group))&&void 0!==_oldCohort$filters$pr?_oldCohort$filters$pr:[]}}}}function cleanCriteria(criteria){let shouldPurge=arguments.length>1&&void 0!==arguments[1]&&arguments[1],populatedCriteria={},{fields,...apiProps}=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[criteriaToBehavioralFilterType(criteria)];return Object.entries(apiProps).forEach(_ref2=>{var _criteria$key;let[key,defaultValue]=_ref2,nextValue=null!==(_criteria$key=criteria[key])&&void 0!==_criteria$key?_criteria$key:defaultValue;shouldPurge?populatedCriteria[key]=defaultValue:null!=nextValue?populatedCriteria[key]=nextValue:populatedCriteria[key]=void 0}),fields.forEach(_ref3=>{var _criteria$fieldKey2;let{fieldKey,defaultValue}=_ref3,nextValue=fieldKey?null!==(_criteria$fieldKey2=criteria[fieldKey])&&void 0!==_criteria$fieldKey2?_criteria$fieldKey2:defaultValue:null;fieldKey&&shouldPurge?populatedCriteria[fieldKey]=defaultValue:fieldKey&&null!=nextValue?populatedCriteria[fieldKey]=nextValue:fieldKey&&(populatedCriteria[fieldKey]=void 0)}),{...populatedCriteria,...function(type,value){let negation=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformedEvent||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort||value===_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,negation:!0}:{type,value,negation:!1}}(populatedCriteria.type,populatedCriteria.value,populatedCriteria.negation)}}function criteriaToHumanSentence(criteria,cohortsById,actionsById){let words=[],data=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[criteriaToBehavioralFilterType(criteria)];return data?(data.fields.forEach(_ref4=>{let{type,fieldKey,defaultValue,hide}=_ref4;if(!hide){if(type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.Text)words.push(defaultValue);else if(fieldKey){var _cohortsById$value$na,_actionsById$value$na;let value=criteria[fieldKey];type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.CohortValues?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:null!==(_cohortsById$value$na=cohortsById?.[value]?.name)&&void 0!==_cohortsById$value$na?_cohortsById$value$na:`Cohort ${value}`})):type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.EventsAndActions&&"number"==typeof value?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:null!==(_actionsById$value$na=actionsById?.[value]?.name)&&void 0!==_actionsById$value$na?_actionsById$value$na:`Action ${value}`})):type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.EventFilters&&(criteria.event_filters?.length||0)>0?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:"with filters"})):words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:value}))}}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:words})):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{})}let COHORT_MATCHING_DAYS={1:"day",7:"week",14:"2 weeks",30:"month"}},"./frontend/src/scenes/comments/commentsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>commentsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx");let commentsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(()=>["scenes","notebooks","Notebook","commentsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>`${props.scope}-${props.item_id||""}`),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadComments:!0,maybeLoadComments:!0,setComposedComment:content=>({content}),sendComposedContent:!0,deleteComment:comment=>({comment}),setEditingComment:comment=>({comment}),setReplyingComment:commentId=>({commentId}),setItemContext:(context,callback)=>({context,callback}),clearItemContext:!0,persistEditedComment:!0,setComposerRef:ref=>({ref}),focusComposer:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({replyingCommentId:[null,{setReplyingComment:(_,_ref)=>{let{commentId}=_ref;return commentId},sendComposedContentSuccess:()=>null}],itemContext:[null,{setItemContext:(_,itemContext)=>itemContext.context?itemContext:null,sendComposedContentSuccess:()=>null}],editingComment:[null,{setEditingComment:(_,_ref2)=>{let{comment}=_ref2;return comment},persistEditedCommentSuccess:()=>null}],composedComment:["",{persist:!0},{setComposedComment:(_,_ref3)=>{let{content}=_ref3;return content},sendComposedContentSuccess:()=>""}],composerRef:[null,{setComposerRef:(_,_ref4)=>{let{ref}=_ref4;return ref}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref5=>{let{props,values,actions}=_ref5;return{comments:[null,{loadComments:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.list({scope:props.scope,item_id:props.item_id});return response.results},sendComposedContent:async()=>{var _values$comments,_values$replyingComme;let existingComments=null!==(_values$comments=values.comments)&&void 0!==_values$comments?_values$comments:[],newComment=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.create({content:values.composedComment,scope:props.scope,item_id:props.item_id,item_context:values.itemContext?.context,source_comment:null!==(_values$replyingComme=values.replyingCommentId)&&void 0!==_values$replyingComme?_values$replyingComme:void 0});return values.itemContext?.callback?.({sent:!0}),[...existingComments,newComment]},persistEditedComment:async()=>{var _values$comments2;let editedComment=values.editingComment;if(!editedComment)return values.comments;let existingComments=null!==(_values$comments2=values.comments)&&void 0!==_values$comments2?_values$comments2:[],updatedComment=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.update(editedComment.id,{content:editedComment.content});return[...existingComments.filter(c=>c.id!==editedComment.id),updatedComment]},deleteComment:async _ref6=>{var _values$comments$filt2;let{comment}=_ref6;return await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:"projects/@current/comments",object:{name:"Comment",id:comment.id},callback:isUndo=>{if(isUndo){var _values$comments$filt;actions.loadCommentsSuccess([...null!==(_values$comments$filt=values.comments?.filter(c=>c.id!==comment.id))&&void 0!==_values$comments$filt?_values$comments$filt:[],comment])}}}),null!==(_values$comments$filt2=values.comments?.filter(c=>c.id!==comment.id))&&void 0!==_values$comments$filt2?_values$comments$filt2:null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{values,actions}=_ref7;return{setReplyingComment:()=>{actions.clearItemContext()},clearItemContext:()=>{values.itemContext?.callback?.({sent:!1}),actions.setItemContext(null)},setItemContext:_ref8=>{let{context}=_ref8;context&&values.composerRef?.focus()},focusComposer:()=>{values.composerRef?.focus()},maybeLoadComments:()=>{values.comments||values.commentsLoading||actions.loadComments()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({key:[()=>[(_,props)=>props],props=>`${props.scope}-${props.item_id||""}`],sortedComments:[s=>[s.comments],comments=>{var _comments$sort;return null!==(_comments$sort=comments?.sort((a,b)=>a.created_at>b.created_at?1:-1))&&void 0!==_comments$sort?_comments$sort:[]}],commentsWithReplies:[s=>[s.sortedComments],sortedComments=>{let commentsById={};for(let comment of null!=sortedComments?sortedComments:[]){var _comment$source_comme,_comment$source_comme2,_comment$source_comme3;let commentsWithReplies=commentsById[null!==(_comment$source_comme=comment.source_comment)&&void 0!==_comment$source_comme?_comment$source_comme:comment.id];commentsWithReplies||(commentsById[null!==(_comment$source_comme2=comment.source_comment)&&void 0!==_comment$source_comme2?_comment$source_comme2:comment.id]=commentsWithReplies={id:null!==(_comment$source_comme3=comment.source_comment)&&void 0!==_comment$source_comme3?_comment$source_comme3:comment.id,comment:void 0,replies:[]}),commentsWithReplies.id===comment.id?commentsWithReplies.comment=comment:commentsWithReplies.replies.push(comment)}return Object.values(commentsById)}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref9=>{let{actions}=_ref9;return{replyingCommentId:value=>{value&&actions.focusComposer()}}})])},"./frontend/src/scenes/dashboard/Dashboard.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Dashboard:()=>Dashboard,scene:()=>scene});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),NotFound=__webpack_require__("./frontend/src/lib/components/NotFound/index.tsx"),useKeyboardHotkeys=__webpack_require__("./frontend/src/lib/hooks/useKeyboardHotkeys.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),DateFilter=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx"),PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),src_types=__webpack_require__("./frontend/src/types.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardEditBar(){let{dashboard,temporaryFilters,dashboardMode}=(0,index_esm.useValues)(dashboardLogic.BM),{setDates,setProperties,setDashboardMode}=(0,index_esm.useActions)(dashboardLogic.BM),{groupsTaxonomicTypes}=(0,index_esm.useValues)(groupsModel.$);return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex gap-2 items-center justify-between flex-wrap border",dashboardMode===src_types.MN.Edit?"-m-1.5 p-1.5 border-border-bold border-dashed rounded-lg":"border-transparent"),children:[(0,jsx_runtime.jsx)(DateFilter.f,{showCustom:!0,dateFrom:temporaryFilters.date_from,dateTo:temporaryFilters.date_to,onChange:(from_date,to_date)=>{dashboardMode!==src_types.MN.Edit&&setDashboardMode(src_types.MN.Edit,null),setDates(from_date,to_date)},makeLabel:key=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCalendar,{}),(0,jsx_runtime.jsxs)("span",{className:"hide-when-small",children:[" ",key]})]})}),(0,jsx_runtime.jsx)(PropertyFilters.t,{onChange:properties=>{dashboardMode!==src_types.MN.Edit&&setDashboardMode(src_types.MN.Edit,null),setProperties(properties)},pageKey:"dashboard_"+dashboard?.id,propertyFilters:temporaryFilters.properties,taxonomicGroupTypes:[types.t.EventProperties,types.t.PersonProperties,types.t.EventFeatureFlags,...groupsTaxonomicTypes,types.t.Cohorts,types.t.Elements,types.t.HogQLExpression]})]})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DashboardItems=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardItems.scss"),DashboardItems_default=__webpack_require__.n(DashboardItems),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DashboardItems_default(),options),DashboardItems_default().locals;var InsightCard=__webpack_require__("./frontend/src/lib/components/Cards/InsightCard/index.tsx"),TextCard=__webpack_require__("./frontend/src/lib/components/Cards/TextCard/TextCard.tsx"),useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react_grid_layout=__webpack_require__("./node_modules/.pnpm/react-grid-layout@1.3.4_react-dom@18.2.0_react@18.2.0/node_modules/react-grid-layout/index.js"),insightsModel=__webpack_require__("./frontend/src/models/insightsModel.tsx");function DashboardItems_DashboardItems(){let{dashboard,tiles,layouts,dashboardMode,placement,isRefreshingQueued,isRefreshing,highlightedInsightId,refreshStatus,canEditDashboard,itemsLoading,temporaryVariables}=(0,index_esm.useValues)(dashboardLogic.BM),{updateLayouts,updateContainerWidth,updateTileColor,removeTile,duplicateTile,refreshDashboardItem,moveToDashboard,setDashboardMode}=(0,index_esm.useActions)(dashboardLogic.BM),{duplicateInsight,renameInsight}=(0,index_esm.useActions)(insightsModel.U),[resizingItem,setResizingItem]=(0,react.useState)(null),isDragging=(0,react.useRef)(!1),dragEndTimeout=(0,react.useRef)(null),className=(0,clsx_m.default)({"dashboard-view-mode":dashboardMode!==src_types.MN.Edit,"dashboard-edit-mode":dashboardMode===src_types.MN.Edit}),{width:gridWrapperWidth,ref:gridWrapperRef}=(0,useResizeObserver.y)(),canResizeWidth=!gridWrapperWidth||gridWrapperWidth>dashboardLogic.j$.sm;return(0,jsx_runtime.jsx)("div",{className:"dashboard-items-wrapper",ref:gridWrapperRef,children:gridWrapperWidth&&(0,jsx_runtime.jsx)(react_grid_layout.Responsive,{width:gridWrapperWidth,className:className,draggableHandle:".CardMeta,.TextCard__body",isDraggable:dashboardMode===src_types.MN.Edit,isResizable:dashboardMode===src_types.MN.Edit,layouts:layouts,rowHeight:80,margin:[16,16],containerPadding:[0,0],onLayoutChange:(_,newLayouts)=>{dashboardMode===src_types.MN.Edit&&updateLayouts(newLayouts)},onWidthChange:(containerWidth,_,newCols)=>{updateContainerWidth(containerWidth,newCols)},breakpoints:dashboardLogic.j$,resizeHandles:canResizeWidth?["s","e","se"]:["s"],cols:dashboardLogic.cH,onResize:(_layout,_oldItem,newItem)=>{resizingItem&&resizingItem.w===newItem.w&&resizingItem.h===newItem.h||setResizingItem(newItem)},onResizeStop:()=>{setResizingItem(null)},onDrag:()=>{isDragging.current=!0,dragEndTimeout.current&&window.clearTimeout(dragEndTimeout.current)},onDragStop:()=>{dragEndTimeout.current&&window.clearTimeout(dragEndTimeout.current),dragEndTimeout.current=window.setTimeout(()=>{isDragging.current=!1},250)},draggableCancel:"a,table,button,.Popover",children:tiles?.map(tile=>{let{insight,text}=tile,smLayout=layouts.sm?.find(l=>l.i==tile.id.toString()),commonTileProps={dashboardId:dashboard?.id,showResizeHandles:dashboardMode===src_types.MN.Edit,canResizeWidth:canResizeWidth,showEditingControls:[src_types.F4.Dashboard,src_types.F4.ProjectHomepage].includes(placement),moreButtons:canEditDashboard?jsx_runtime.jsx(LemonButton.J,{onClick:()=>setDashboardMode(src_types.MN.Edit,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Edit layout (E)"}):null,moveToDashboard:_ref=>{let{id,name}=_ref;if(!dashboard)throw Error("must be on a dashboard to move this tile");moveToDashboard(tile,dashboard.id,id,name)},removeFromDashboard:()=>removeTile(tile)};return insight?jsx_runtime.jsx(InsightCard.L,{insight:insight,loadingQueued:isRefreshingQueued(insight.short_id),loading:isRefreshing(insight.short_id),apiErrored:refreshStatus[insight.short_id]?.error||!1,highlighted:highlightedInsightId&&insight.short_id===highlightedInsightId,updateColor:color=>updateTileColor(tile.id,color),ribbonColor:tile.color,refresh:()=>refreshDashboardItem({tile}),refreshEnabled:!itemsLoading,rename:()=>renameInsight(insight),duplicate:()=>duplicateInsight(insight),showDetailsControls:placement!=src_types.F4.Export,placement:placement,loadPriority:smLayout?1e3*smLayout.y+smLayout.x:void 0,variablesOverride:temporaryVariables,...commonTileProps},tile.id):text?jsx_runtime.jsx(TextCard.WV,{textTile:tile,duplicate:()=>duplicateTile(tile),...commonTileProps},tile.id):void 0})})})}var dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),usePageVisibility=__webpack_require__("./frontend/src/lib/hooks/usePageVisibility.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx"),LemonRadio=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRadio/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx");let LastRefreshText=()=>{let{newestRefreshed}=(0,index_esm.useValues)(dashboardLogic.BM);return(0,jsx_runtime.jsxs)("span",{children:["Last updated ",newestRefreshed?(0,dayjs.Bv)(newestRefreshed).fromNow():"a while ago"]})},INTERVAL_OPTIONS=[...Array.from([1800,3600],value=>({label:(0,utils.C7)(value),value:value}))];function DashboardReloadAction(){let{itemsLoading,autoRefresh,refreshMetrics,blockRefresh,oldestClientRefreshAllowed}=(0,index_esm.useValues)(dashboardLogic.BM),{refreshAllDashboardItemsManual,setAutoRefresh,setPageVisibility}=(0,index_esm.useActions)(dashboardLogic.BM);(0,usePageVisibility.d)(pageIsVisible=>{setPageVisibility(pageIsVisible)});let options=INTERVAL_OPTIONS.map(option=>({...option,disabledReason:autoRefresh.enabled?void 0:"Enable auto refresh to set the interval"}));return(0,jsx_runtime.jsxs)("div",{className:"relative",children:[(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>refreshAllDashboardItemsManual(),type:"secondary",icon:itemsLoading?(0,jsx_runtime.jsx)(Spinner.$,{textColored:!0}):blockRefresh?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheck,{}):(0,jsx_runtime.jsx)(icons.tr,{}),size:"small","data-attr":"dashboard-items-action-refresh",disabledReason:blockRefresh?`Next bulk refresh possible ${(0,dayjs.Bv)(oldestClientRefreshAllowed).fromNow()}`:itemsLoading?"Refreshing...":"",sideAction:{"data-attr":"dashboard-items-action-refresh-dropdown",dropdown:{closeOnClickInside:!1,placement:"bottom-end",overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{label:()=>(0,jsx_runtime.jsx)(src.f4,{onChange:checked=>setAutoRefresh(checked,autoRefresh.interval),label:"Auto refresh while on page",checked:autoRefresh.enabled,fullWidth:!0,className:"mt-1 mb-2"})},{title:"Refresh interval",items:[{label:()=>(0,jsx_runtime.jsx)(LemonRadio._,{value:autoRefresh.interval,options:options,onChange:value=>{setAutoRefresh(!0,value)},className:"mx-2 mb-1"})}]}]})}},children:(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("dashboard-items-action-refresh-text"),children:itemsLoading?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:refreshMetrics.total?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refreshed ",refreshMetrics.completed," out of ",refreshMetrics.total]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Refreshing..."})}):(0,jsx_runtime.jsx)(LastRefreshText,{})})}),(0,jsx_runtime.jsx)(src.Mo,{size:"small",content:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(icons.tr,{className:"mr-0"})," ",(0,utils.C7)(autoRefresh.interval)]}),visible:autoRefresh.enabled,position:"top-right",status:"muted"})]})}var dataThemeLogic=__webpack_require__("./frontend/src/scenes/dataThemeLogic.tsx"),EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),DashboardHeader=__webpack_require__("./frontend/src/scenes/dashboard/DashboardHeader.tsx"),EmptyDashboardComponent=__webpack_require__("./frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx");let scene={component:DashboardScene,logic:dashboardLogic.BM,paramsToProps:_ref=>{let{params:{id,placement}}=_ref;return{id:parseInt(id),placement}}};function Dashboard(){let{id,dashboard,placement,themes}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,index_esm.useMountedLogic)((0,dataThemeLogic.Q)({themes})),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dashboardLogic.BM,props:{id:parseInt(id),placement,dashboard},children:(0,jsx_runtime.jsx)(DashboardScene,{})})}function DashboardScene(){let{placement,dashboard,canEditDashboard,tiles,itemsLoading,dashboardMode,dashboardFailedToLoad}=(0,index_esm.useValues)(dashboardLogic.BM),{setDashboardMode,reportDashboardViewed,abortAnyRunningQuery}=(0,index_esm.useActions)(dashboardLogic.BM);return((0,react.useEffect)(()=>(reportDashboardViewed(),()=>{abortAnyRunningQuery()}),[]),(0,useKeyboardHotkeys.l)(placement==src_types.F4.Dashboard?{e:{action:()=>setDashboardMode(dashboardMode===src_types.MN.Edit?null:src_types.MN.Edit,eventUsageLogic.GU.Hotkey),disabled:!canEditDashboard||null!==dashboardMode&&dashboardMode!==src_types.MN.Edit},f:{action:()=>setDashboardMode(dashboardMode===src_types.MN.Fullscreen?null:src_types.MN.Fullscreen,eventUsageLogic.GU.Hotkey),disabled:null!==dashboardMode&&dashboardMode!==src_types.MN.Fullscreen},escape:{action:()=>setDashboardMode(null,eventUsageLogic.GU.Hotkey),disabled:dashboardMode!==src_types.MN.Edit}}:{},[setDashboardMode,dashboardMode,placement]),dashboard||itemsLoading||dashboardFailedToLoad)?(0,jsx_runtime.jsxs)("div",{className:"dashboard",children:[placement==src_types.F4.Dashboard&&(0,jsx_runtime.jsx)(DashboardHeader.x,{}),dashboardFailedToLoad?(0,jsx_runtime.jsx)(EmptyStates.jC,{title:"There was an error loading this dashboard"}):tiles&&0!==tiles.length?(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-start justify-between flex-wrap",children:[![src_types.F4.Public,src_types.F4.Export,src_types.F4.FeatureFlag].includes(placement)&&dashboard&&(0,jsx_runtime.jsx)(DashboardEditBar,{}),placement===src_types.F4.FeatureFlag&&dashboard?.id&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",size:"small",to:urls.j.dashboard(dashboard.id),children:"Edit dashboard"}),placement!==src_types.F4.Export&&(0,jsx_runtime.jsx)("div",{className:"flex shrink-0 space-x-4 dashoard-items-actions",children:(0,jsx_runtime.jsx)("div",{className:`left-item ${placement===src_types.F4.Public?"text-right":""}`,children:[src_types.F4.Public].includes(placement)?(0,jsx_runtime.jsx)(LastRefreshText,{}):dashboardMode!==src_types.MN.Edit?(0,jsx_runtime.jsx)(DashboardReloadAction,{}):null})})]}),(0,jsx_runtime.jsx)(Variables.B,{}),(0,jsx_runtime.jsx)(DashboardItems_DashboardItems,{})]}):(0,jsx_runtime.jsx)(EmptyDashboardComponent.l,{loading:itemsLoading,canEdit:canEditDashboard})]}):(0,jsx_runtime.jsx)(NotFound.T,{object:"dashboard"})}},"./frontend/src/scenes/dashboard/DashboardCollaborators.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>DASHBOARD_RESTRICTION_OPTIONS,o:()=>DashboardCollaboration});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_components_PayGateMini_PayGateMini__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),lib_components_UserSelectItem__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/UserSelectItem.tsx"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_hooks_useFeatureFlag__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonInputSelect_LemonInputSelect__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx"),lib_lemon_ui_LemonSelect__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),lib_lemon_ui_ProfilePicture__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/scenes/urls.ts"),_layout_navigation_3000_sidepanel_sidePanelStateLogic__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./frontend/src/types.ts"),_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardCollaboratorsLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let DASHBOARD_RESTRICTION_OPTIONS=[{value:lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.EveryoneInProjectCanEdit,label:"Everyone in the project can edit",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconUnlock,{})},{value:lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.OnlyCollaboratorsCanEdit,label:"Only those invited to this dashboard can edit",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLock,{})}];function DashboardCollaboration(_ref){let{dashboardId}=_ref,{dashboard,dashboardLoading,canEditDashboard,canRestrictDashboard}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__.BM),{triggerDashboardUpdate}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__.BM),{allCollaborators,explicitCollaboratorsLoading,addableMembers,explicitCollaboratorsToBeAdded}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)((0,_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__.B)({dashboardId})),{deleteExplicitCollaborator,setExplicitCollaboratorsToBeAdded,addExplicitCollaborators}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)((0,_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__.B)({dashboardId})),{push}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(kea_router__WEBPACK_IMPORTED_MODULE_2__.router),{openSidePanel}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_layout_navigation_3000_sidepanel_sidePanelStateLogic__WEBPACK_IMPORTED_MODULE_15__.f),newAccessControl=(0,lib_hooks_useFeatureFlag__WEBPACK_IMPORTED_MODULE_6__.y)("ROLE_BASED_ACCESS_CONTROL");return dashboard?newAccessControl?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h3",{children:"Access control"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__.V,{type:"info",className:"mb-4",children:"Permissions have moved! We're rolling out our new access control system. Click below to open it."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{type:"primary",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenSidebar,{}),onClick:()=>{openSidePanel(_types__WEBPACK_IMPORTED_MODULE_16__.H$.AccessControl),push(scenes_urls__WEBPACK_IMPORTED_MODULE_14__.j.dashboard(dashboard.id))},children:"Open access control"})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(lib_components_PayGateMini_PayGateMini__WEBPACK_IMPORTED_MODULE_3__.E,{feature:_types__WEBPACK_IMPORTED_MODULE_16__.P$.ADVANCED_PERMISSIONS,children:[(!canEditDashboard||!canRestrictDashboard)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__.V,{type:"info",className:"mb-4",children:canEditDashboard?"You aren't allowed to change the restriction level – only the dashboard owner and project admins can.":"You aren't allowed to change sharing settings – only dashboard collaborators with edit settings can."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonSelect__WEBPACK_IMPORTED_MODULE_10__.Yv,{value:dashboard.effective_restriction_level,onChange:newValue=>triggerDashboardUpdate({restriction_level:newValue}),options:DASHBOARD_RESTRICTION_OPTIONS,loading:dashboardLoading,fullWidth:!0,disabled:!canRestrictDashboard}),dashboard.restriction_level>lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.EveryoneInProjectCanEdit&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"mt-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h5",{children:"Collaborators"}),canEditDashboard&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div",{className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonInputSelect_LemonInputSelect__WEBPACK_IMPORTED_MODULE_9__.n,{placeholder:"Search for team members to add…",value:explicitCollaboratorsToBeAdded,loading:explicitCollaboratorsLoading,onChange:newValues=>setExplicitCollaboratorsToBeAdded(newValues),mode:"multiple","data-attr":"subscribed-emails",options:(0,lib_components_UserSelectItem__WEBPACK_IMPORTED_MODULE_4__.W)(addableMembers,"uuid")})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{type:"primary",loading:explicitCollaboratorsLoading,disabled:0===explicitCollaboratorsToBeAdded.length,onClick:()=>addExplicitCollaborators(),children:"Add"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h5",{className:"mt-4",children:"Project members with access"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div",{className:"mt-2 pb-2 rounded overflow-y-auto max-h-80",children:allCollaborators.map(collaborator=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(CollaboratorRow,{collaborator:collaborator,deleteCollaborator:canEditDashboard?deleteExplicitCollaborator:void 0},collaborator.user.uuid))})]})]}):null}function CollaboratorRow(_ref2){let{collaborator,deleteCollaborator}=_ref2,{user,level}=collaborator,wasInvited=level<=lib_constants__WEBPACK_IMPORTED_MODULE_5__.kH.CanEdit,privilegeLevelName=lib_constants__WEBPACK_IMPORTED_MODULE_5__.KN[level];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex items-center justify-between mt-2 pl-2 h-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_ProfilePicture__WEBPACK_IMPORTED_MODULE_11__.Y,{user:user,size:"md",showName:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_12__.u,{title:wasInvited?null:`${user.first_name||"This person"} ${level===lib_constants__WEBPACK_IMPORTED_MODULE_5__.kH._Owner?"created the dashboard":"is a project administrator"}`,placement:"left",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("span",{className:"rounded bg-primary-alt-highlight p-1",children:privilegeLevelName}),deleteCollaborator&&wasInvited&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrash,{}),onClick:()=>deleteCollaborator(user.uuid),tooltip:wasInvited?"Remove invited collaborator":null,size:"small"})]})})]})}},"./frontend/src/scenes/dashboard/DashboardHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>DASHBOARD_CANNOT_EDIT_MESSAGE,x:()=>DashboardHeader});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_forms_lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),dashboardsModel=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let getTileBody=(dashboard,textTileId)=>{let dashboardTiles=dashboard.tiles,matchedTile=dashboardTiles?.find(tt=>tt.id===textTileId);return matchedTile?.text?.body||""},textCardModalLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","dashboard","dashboardTextTileModal","logic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>`textCardModalLogic-${props.dashboard.id}-${props.textTileId}`),(0,index_esm.connect)({actions:[dashboardsModel.h,["updateDashboard"]]}),(0,index_esm.listeners)(_ref=>{let{props,actions}=_ref;return{submitTextTileFailure:error=>{props.dashboard&&props.textTileId&&src.UJ.error(`Could not save text: ${error.error} (${JSON.stringify(error.errors)})`),actions.resetTextTile(),props?.onClose?.()},submitTextTileSuccess:()=>{actions.resetTextTile(),props?.onClose?.()}}}),(0,kea_forms_lib.forms)(_ref2=>{let{props,actions}=_ref2;return{textTile:{defaults:{body:props.textTileId&&"new"!==props.textTileId?getTileBody(props.dashboard,props.textTileId):""},errors:_ref3=>{let{body}=_ref3;return{body:body?null:"This card would be empty! Type something first"}},submit:formValues=>{let textTiles=(props.dashboard.tiles||[]).map(t=>({id:t.id,text:t.text}));if("new"===props.textTileId)actions.updateDashboard({id:props.dashboard.id,tiles:[{text:formValues}]});else{let updatedTiles=[...textTiles].reduce((acc,tile)=>(tile.id===props.textTileId&&tile.text&&(tile.text.body=formValues.body,acc.push(tile)),acc),[]);actions.updateDashboard({id:props.dashboard.id,tiles:updatedTiles})}}}}})]);var LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),LemonTextArea=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function TextCardModal(_ref){let{isOpen,onClose,dashboard,textTileId}=_ref,modalLogic=textCardModalLogic({dashboard,textTileId:null!=textTileId?textTileId:"new",onClose}),{isTextTileSubmitting,textTileValidationErrors}=(0,index_esm.useValues)(modalLogic),{submitTextTile,resetTextTile}=(0,index_esm.useActions)(modalLogic),handleClose=()=>{resetTextTile(),onClose()};return(0,jsx_runtime.jsx)(LemonModal.f,{closable:!0,isOpen:isOpen,title:"",onClose:handleClose,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{disabledReason:isTextTileSubmitting?"Cannot cancel card creation in progress":null,type:"secondary",onClick:handleClose,children:"Cancel"}),(0,jsx_runtime.jsx)(LemonButton.J,{disabledReason:textTileValidationErrors.body,loading:isTextTileSubmitting,form:"text-tile-form",htmlType:"submit",type:"primary",onClick:submitTextTile,"data-attr":"new"===textTileId?"save-new-text-tile":"edit-text-tile-text",children:"Save"})]}),children:(0,jsx_runtime.jsx)(kea_forms_lib.Form,{logic:textCardModalLogic,props:{dashboard,textTileId},formKey:"textTile",id:"text-tile-form",className:"",enableFormOnSubmit:!0,children:(0,jsx_runtime.jsx)(kea_forms_lib.Field,{name:"body",label:"",children:(0,jsx_runtime.jsx)(LemonTextArea.X,{"data-attr":"text-card-edit-area"})})})})}var EditableField=__webpack_require__("./frontend/src/lib/components/EditableField/EditableField.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function FullScreen(_ref){let{onExit}=_ref,selector=".layout-top-content";return(0,react.useEffect)(()=>{let myClasses=window.document.querySelectorAll(selector);for(let i=0;i{null===window.document.fullscreenElement&&onExit?.()};try{document.body.requestFullscreen().then(()=>{window.addEventListener("fullscreenchange",handler,!1)})}catch{}try{window.dispatchEvent(new window.Event("scroll")),window.dispatchEvent(new window.Event("resize"))}catch{}return()=>{let elements=window.document.querySelectorAll(selector);for(let i=0;isetDashboardMode(null,eventUsageLogic.GU.Browser)}),dashboard&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SubscriptionsModal.r,{isOpen:showSubscriptions,closeModal:()=>push(urls.j.dashboard(dashboard.id)),dashboardId:dashboard.id,subscriptionId:subscriptionId}),(0,jsx_runtime.jsx)(SharingModal.PA,{title:"Dashboard permissions & sharing",isOpen:dashboardMode===types.MN.Sharing,closeModal:()=>push(urls.j.dashboard(dashboard.id)),dashboardId:dashboard.id}),canEditDashboard&&(0,jsx_runtime.jsx)(TextCardModal,{isOpen:showTextTileModal,onClose:()=>push(urls.j.dashboard(dashboard.id)),dashboard:dashboard,textTileId:textTileId}),canEditDashboard&&(0,jsx_runtime.jsx)(DeleteDashboardModal.y,{}),canEditDashboard&&(0,jsx_runtime.jsx)(DuplicateDashboardModal.i,{})]}),(0,jsx_runtime.jsx)(PageHeader.m,{buttons:dashboardMode===types.MN.Edit?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-edit-mode-discard",type:"secondary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderDiscardChanges),tabIndex:9,children:"Cancel"}),(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-edit-mode-save",type:"primary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderSaveDashboard),tabIndex:10,disabledReason:dashboardLoading?"Wait for dashboard to finish loading":canEditDashboard?void 0:"Not privileged to edit this dashboard",children:"Save"})]}):dashboardMode===types.MN.Fullscreen?(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderExitFullscreen),"data-attr":"dashboard-exit-presentation-mode",disabled:dashboardLoading,children:"Exit full screen"}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(More.T,{"data-attr":"dashboard-three-dots-options-menu",overlay:dashboard?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dashboard.created_by&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex p-2 text-muted-alt",children:["Created by"," ",dashboard.created_by.first_name||dashboard.created_by.email||"-"," ","on ",(0,utils.bo)(dashboard.created_at)]}),(0,jsx_runtime.jsx)(LemonDivider.p,{})]}),canEditDashboard&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>setDashboardMode(types.MN.Edit,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Edit layout (E)"}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>setDashboardMode(types.MN.Fullscreen,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Go full screen (F)"}),canEditDashboard&&(dashboard.pinned?(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>unpinDashboard(dashboard.id,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Unpin dashboard"}):(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>pinDashboard(dashboard.id,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Pin dashboard"})),(0,jsx_runtime.jsx)(SubscriptionsModal.T,{dashboardId:dashboard.id}),(0,jsx_runtime.jsx)(ExportButton.j,{fullWidth:!0,items:exportOptions}),user?.is_staff&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{asDashboardTemplate&&(setDashboardTemplate(asDashboardTemplate),openDashboardTemplateEditor())},fullWidth:!0,children:"Save as template"}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{showDuplicateDashboardModal(dashboard.id,dashboard.name)},fullWidth:!0,children:"Duplicate dashboard"}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>createNotebookFromDashboard(dashboard),fullWidth:!0,children:"Create notebook from dashboard"}),canEditDashboard&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{showDeleteDashboardModal(dashboard.id)},status:"danger",fullWidth:!0,children:"Delete dashboard"})]}):void 0}),(0,jsx_runtime.jsx)(LemonDivider.p,{vertical:!0}),dashboard&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(CollaboratorBubbles,{dashboard:dashboard,onClick:()=>push(urls.j.dashboardSharing(dashboard.id))}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary","data-attr":"dashboard-share-button",onClick:()=>push(urls.j.dashboardSharing(dashboard.id)),children:"Share"})]}),dashboard?(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.insightNew(void 0,dashboard.id),type:"primary","data-attr":"dashboard-add-graph-header",disabledReason:canEditDashboard?null:DASHBOARD_CANNOT_EDIT_MESSAGE,sideAction:{dropdown:{placement:"bottom-end",overlay:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,onClick:()=>{push(urls.j.dashboardTextTile(dashboard.id,"new"))},"data-attr":"add-text-tile-to-dashboard",children:"Add text card"})})},disabled:!1,"data-attr":"dashboard-add-dropdown"},children:"Add insight"}):null]}),caption:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dashboard&&!!(canEditDashboard||dashboard.description)&&(0,jsx_runtime.jsx)(EditableField.f,{multiline:!0,name:"description",markdown:!0,value:dashboard.description,placeholder:"Description (optional)",onSave:value=>updateDashboard({id:dashboard.id,description:value,allowUndo:!0}),saveOnBlur:!0,compactButtons:!0,mode:canEditDashboard?void 0:"view"}),dashboard?.tags&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:canEditDashboard?(0,jsx_runtime.jsx)(ObjectTags.D,{tags:dashboard.tags,onChange:tags=>triggerDashboardUpdate({tags}),saving:dashboardLoading,tagsAvailable:tags.filter(tag=>!dashboard.tags?.includes(tag)),className:"mt-2"}):dashboard.tags.length?(0,jsx_runtime.jsx)(ObjectTags.D,{tags:dashboard.tags,saving:dashboardLoading,staticOnly:!0,className:"mt-2"}):null})]}),delimited:!0}),(0,jsx_runtime.jsx)(DashboardTemplateEditor.v,{})]}):null}function CollaboratorBubbles(_ref){let{dashboard,onClick}=_ref,{allCollaborators}=(0,index_esm.useValues)((0,dashboardCollaboratorsLogic.B)({dashboardId:dashboard.id}));if(!dashboard)return null;let effectiveRestrictionLevelOption=DashboardCollaborators.R[dashboard.effective_restriction_level],tooltipParts=[];return(0,LemonSelect.u7)(effectiveRestrictionLevelOption)&&"string"==typeof effectiveRestrictionLevelOption?.title&&tooltipParts.push(effectiveRestrictionLevelOption.title),dashboard.is_shared&&tooltipParts.push("Shared publicly"),(0,jsx_runtime.jsx)(ProfileBubbles.r,{people:allCollaborators.map(collaborator=>({email:collaborator.user.email,name:collaborator.user.first_name,title:`${collaborator.user.first_name} <${collaborator.user.email}> (${constants.KN[collaborator.level]})`})),tooltip:tooltipParts.join(" • "),onClick:onClick})}},"./frontend/src/scenes/dashboard/DashboardTemplateChooser.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>DashboardTemplateChooser_DashboardTemplateChooser});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DashboardTemplateChooser=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardTemplateChooser.scss"),DashboardTemplateChooser_default=__webpack_require__.n(DashboardTemplateChooser),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DashboardTemplateChooser_default(),options),DashboardTemplateChooser_default().locals;var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),colors=__webpack_require__("./frontend/src/lib/colors.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function FallbackCoverImage(_ref){let{src,alt,index,className="",imageClassName=""}=_ref,[hasError,setHasError]=(0,react.useState)(!1);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:hasError||!src?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full",className),style:{background:(0,colors._r)(index)}}):(0,jsx_runtime.jsx)("img",{className:(0,clsx_m.default)("object-cover w-full",imageClassName),src:src,alt:alt,onError:()=>{setHasError(!0)}})})}var Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts");let blank_dashboard_hog=__webpack_require__.p+"images/blank-dashboard-hog.be6aa4a293f4321162c6fa6f77094861.png";var dashboardTemplatesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),types=__webpack_require__("./frontend/src/types.ts");function DashboardTemplateChooser_DashboardTemplateChooser(_ref){let{scope="default",onItemClick,redirectAfterCreation=!0,availabilityContexts}=_ref,templatesLogic=(0,dashboardTemplatesLogic.R)({scope}),{allTemplates,allTemplatesLoading}=(0,index_esm.useValues)(templatesLogic),{isLoading,newDashboardModalVisible}=(0,index_esm.useValues)(newDashboardLogic.Z),{setActiveDashboardTemplate,createDashboardFromTemplate,addDashboard,setIsLoading,showVariableSelectModal}=(0,index_esm.useActions)(newDashboardLogic.Z);return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsxs)("div",{className:"DashboardTemplateChooser",children:[!availabilityContexts||availabilityContexts.includes(types.FB.GENERAL)?(0,jsx_runtime.jsx)(TemplateItem,{template:{template_name:"Blank dashboard",dashboard_description:"Create a blank dashboard",image_url:blank_dashboard_hog},onClick:()=>{isLoading||(setIsLoading(!0),addDashboard({name:"New Dashboard",show:!0}))},index:0,"data-attr":"create-dashboard-blank"}):null,allTemplatesLoading?(0,jsx_runtime.jsx)(Spinner.$,{className:"text-6xl"}):allTemplates.filter(template=>!availabilityContexts||availabilityContexts.some(context=>template.availability_contexts?.includes(context))).map((template,index)=>(0,jsx_runtime.jsx)(TemplateItem,{template:template,onClick:()=>{isLoading||(setIsLoading(!0),0===(template.variables||[]).length?(null===template.variables&&(template.variables=[]),createDashboardFromTemplate(template,template.variables||[],redirectAfterCreation)):newDashboardModalVisible?setActiveDashboardTemplate(template):showVariableSelectModal(template),onItemClick?.(template))},index:index+1,"data-attr":"create-dashboard-from-template"},index))]})})}function TemplateItem(_ref2){var _template$dashboard_d;let{template,onClick,index,"data-attr":dataAttr}=_ref2,[isHovering,setIsHovering]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)("div",{className:"cursor-pointer border rounded TemplateItem flex flex-col transition-all",onClick:onClick,onMouseEnter:()=>setIsHovering(!0),onMouseLeave:()=>setIsHovering(!1),"data-attr":dataAttr,children:[(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("transition-all w-full overflow-hidden",isHovering?"h-4 min-h-4":"h-30 min-h-30"),children:(0,jsx_runtime.jsx)(FallbackCoverImage,{src:template?.image_url,alt:"cover photo",index:index,imageClassName:"h-30"})}),(0,jsx_runtime.jsx)("h5",{className:"px-2 mb-1",children:template?.template_name}),(0,jsx_runtime.jsx)("div",{className:"flex gap-x-1 px-2 mb-1",children:template.tags?.map((tag,index)=>jsx_runtime.jsx(src.oe,{type:"option",children:tag},index))}),(0,jsx_runtime.jsx)("div",{className:"px-2 py-1 overflow-y-auto grow",children:(0,jsx_runtime.jsx)("p",{className:(0,clsx_m.default)("text-muted-alt text-xs",isHovering?"":"line-clamp-2"),children:null!==(_template$dashboard_d=template?.dashboard_description)&&void 0!==_template$dashboard_d?_template$dashboard_d:" "})})]})}},"./frontend/src/scenes/dashboard/DashboardTemplateEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>DashboardTemplateEditor});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardTemplateEditorLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardTemplateEditor(_ref){let{inline=!1}=_ref,{closeDashboardTemplateEditor,createDashboardTemplate,updateDashboardTemplate,setEditorValue,updateValidationErrors}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__.X),{isOpenNewDashboardTemplateModal,editorValue,validationErrors,templateSchema,id}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__.X);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.fQ,{title:id?"Edit dashboard template":"New dashboard template",isOpen:isOpenNewDashboardTemplateModal,width:1e3,onClose:()=>{closeDashboardTemplateEditor()},inline:inline,footer:id?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary","data-attr":"update-dashboard-template-button",onClick:()=>{updateDashboardTemplate({id})},disabledReason:validationErrors.length?`There are ${validationErrors.length} errors to resolve: ${validationErrors.map(e=>" "+e)}`:void 0,children:"Update template"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary","data-attr":"create-dashboard-template-button",onClick:()=>{createDashboardTemplate()},disabledReason:validationErrors.length?`There are ${validationErrors.length} errors to resolve:${validationErrors.map(e=>" "+e)}`:void 0,children:"Create new template"}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_2__.p,{className:"border",language:"json",value:editorValue,onChange:v=>{setEditorValue(null!=v?v:"")},onValidate:markers=>{updateValidationErrors(markers)},path:id?`dashboard-templates/${id}.json`:"dashboard-templates/new.json",schema:templateSchema,height:600})})}},"./frontend/src/scenes/dashboard/DeleteDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>DeleteDashboardModal});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/dashboard/deleteDashboardLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DeleteDashboardModal(){let{hideDeleteDashboardModal}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r),{isDeleteDashboardSubmitting,deleteDashboardModalVisible}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__.f,{title:"Delete dashboard",onClose:hideDeleteDashboardModal,isOpen:deleteDashboardModalVisible,footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"delete-dashboard-form",type:"secondary","data-attr":"dashboard-delete",disabled:isDeleteDashboardSubmitting,onClick:hideDeleteDashboardModal,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"delete-dashboard-form",htmlType:"submit",type:"secondary",status:"danger","data-attr":"dashboard-delete-submit",loading:isDeleteDashboardSubmitting,disabled:isDeleteDashboardSubmitting,children:"Delete dashboard"})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(kea_forms__WEBPACK_IMPORTED_MODULE_1__.Form,{logic:scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r,formKey:"deleteDashboard",id:"delete-dashboard-form",enableFormOnSubmit:!0,className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"deleteInsights",help:"This will only delete insights if they're not on any other dashboards.",children:_ref=>{let{value,onChange}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__.H,{"data-attr":"delete-dashboard-insights-checkbox",checked:value,label:"Delete this dashboard's insights",onChange:onChange})}})})})}},"./frontend/src/scenes/dashboard/DuplicateDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>DuplicateDashboardModal});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DuplicateDashboardModal(){let{hideDuplicateDashboardModal,duplicateAndGoToDashboard}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T),{isDuplicateDashboardSubmitting,duplicateDashboardModalVisible}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__.f,{title:"Duplicate dashboard",onClose:hideDuplicateDashboardModal,isOpen:duplicateDashboardModalVisible,footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"new-dashboard-form",type:"secondary","data-attr":"dashboard-cancel",disabled:isDuplicateDashboardSubmitting,onClick:hideDuplicateDashboardModal,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"new-dashboard-form",type:"secondary","data-attr":"dashboard-submit-and-go",disabled:isDuplicateDashboardSubmitting,onClick:duplicateAndGoToDashboard,children:"Duplicate and go to dashboard"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"duplicate-dashboard-form",htmlType:"submit",type:"primary","data-attr":"duplicate-dashboard-submit",loading:isDuplicateDashboardSubmitting,disabled:isDuplicateDashboardSubmitting,children:"Duplicate"})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(kea_forms__WEBPACK_IMPORTED_MODULE_1__.Form,{logic:scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T,formKey:"duplicateDashboard",id:"duplicate-dashboard-form",enableFormOnSubmit:!0,className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"duplicateTiles",help:"Choose whether to duplicate this dashboard's insights and text or attach them to the new dashboard.",children:_ref=>{let{value,onChange}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__.H,{checked:value,label:"Duplicate this dashboard's tiles",onChange:onChange})}})})})}},"./frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>EmptyDashboardComponent_EmptyDashboardComponent});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),EmptyDashboardComponent=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/EmptyDashboardComponent.scss"),EmptyDashboardComponent_default=__webpack_require__.n(EmptyDashboardComponent),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(EmptyDashboardComponent_default(),options),EmptyDashboardComponent_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),DashboardHeader=__webpack_require__("./frontend/src/scenes/dashboard/DashboardHeader.tsx"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SkeletonCard(_ref){let{children,active}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"border rounded p-10 h-full space-y-4 flex-1 flex flex-col justify-between",children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[(0,jsx_runtime.jsx)(LemonSkeleton.y,{className:"w-1/3 h-4",active:active}),(0,jsx_runtime.jsx)(LemonSkeleton.y,{className:"w-1/2 h-4",active:active})]}),children]})}function SkeletonCardOne(_ref2){let{active}=_ref2;return(0,jsx_runtime.jsx)(SkeletonCard,{active:active,children:(0,jsx_runtime.jsx)("div",{className:"flex justify-center flex-1 items-end gap-10",children:[100,66,33].map(height=>(0,jsx_runtime.jsx)("div",{className:"border border-border-light rounded overflow-hidden flex flex-col justify-end w-[15%] h-[80%]",children:(0,jsx_runtime.jsx)("div",{style:{height:`${height}%`},children:(0,jsx_runtime.jsx)(LemonSkeleton.y,{active:active,className:"h-full w-full"})})},height))})})}let SkeletonBars=react.memo(function(_ref3){let{active}=_ref3;return(0,jsx_runtime.jsx)("div",{className:"flex items-end gap-1 flex-1",children:Array(8).fill(0).map((_,index)=>(0,jsx_runtime.jsx)("div",{className:"w-[12.5%]",style:{height:`${60*Math.random()+10}%`},children:(0,jsx_runtime.jsx)(LemonSkeleton.y,{active:active,className:"h-full w-full"})},index))})});function SkeletonCardTwo(_ref4){let{active}=_ref4;return(0,jsx_runtime.jsx)(SkeletonCard,{active:active,children:(0,jsx_runtime.jsx)(SkeletonBars,{active:active})})}function EmptyDashboardComponent_EmptyDashboardComponent(_ref5){let{loading,canEdit}=_ref5,{dashboard}=(0,index_esm.useValues)(dashboardLogic.BM);return(0,jsx_runtime.jsxs)("div",{className:"EmptyDashboard",children:[!loading&&(0,jsx_runtime.jsxs)("div",{className:"EmptyDashboard__cta",children:[(0,jsx_runtime.jsx)("h3",{className:"l3",children:"Dashboard empty"}),(0,jsx_runtime.jsx)("p",{children:"This dashboard sure would look better with some graphs!"}),(0,jsx_runtime.jsx)("div",{className:"mt-4 text-center",children:(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-add-graph-header",to:urls.j.insightNew(void 0,dashboard?.id),type:"primary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),center:!0,fullWidth:!0,disabledReason:canEdit?null:DashboardHeader.o,children:"Add insight"})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 h-[30rem]",children:[(0,jsx_runtime.jsx)(SkeletonCardOne,{active:loading}),(0,jsx_runtime.jsx)(SkeletonCardTwo,{active:loading})]}),(0,jsx_runtime.jsx)("div",{className:"EmptyDashboard__fade",children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 h-[30rem]",children:[(0,jsx_runtime.jsx)(SkeletonCardOne,{active:loading}),(0,jsx_runtime.jsx)(SkeletonCardTwo,{active:loading})]})})]})}},"./frontend/src/scenes/dashboard/NewDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>NewDashboardModal});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),dashboardTemplatesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),DashboardTemplateChooser=__webpack_require__("./frontend/src/scenes/dashboard/DashboardTemplateChooser.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),ActionFilter=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx"),types=__webpack_require__("./frontend/src/types.ts"),dashboardTemplateVariablesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardTemplateVariablesLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardTemplateVariables(){let{activeDashboardTemplate}=(0,index_esm.useValues)(newDashboardLogic.Z),theDashboardTemplateVariablesLogic=(0,dashboardTemplateVariablesLogic.y)({variables:activeDashboardTemplate?.variables||[]}),{variables}=(0,index_esm.useValues)(theDashboardTemplateVariablesLogic),{setVariable,setVariables}=(0,index_esm.useActions)(theDashboardTemplateVariablesLogic);return(0,react.useEffect)(()=>{setVariables(activeDashboardTemplate?.variables||[])},[activeDashboardTemplate]),(0,jsx_runtime.jsx)("div",{className:"mb-4 DashboardTemplateVariables max-w-192",children:variables.map((variable,index)=>(0,jsx_runtime.jsxs)("div",{className:"mb-6",children:[(0,jsx_runtime.jsxs)("div",{className:"mb-2",children:[(0,jsx_runtime.jsx)(src.HQ,{showOptional:!variable.required,info:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:variable.description}),children:variable.name}),(0,jsx_runtime.jsx)("p",{className:"text-sm text-muted",children:variable.description})]}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ActionFilter.T,{filters:{insight:types.dw.TRENDS,events:[variable.default]},setFilters:filters=>{setVariable(variable.name,filters)},typeKey:"variable_"+variable.name,hideDeleteBtn:!0,hideRename:!0,hideDuplicate:!0,entitiesLimit:1})})]},index))})}function NewDashboardModal(){let builtLogic=(0,index_esm.useMountedLogic)(newDashboardLogic.Z),{hideNewDashboardModal,clearActiveDashboardTemplate,createDashboardFromTemplate}=(0,index_esm.useActions)(newDashboardLogic.Z),{newDashboardModalVisible,activeDashboardTemplate,variableSelectModalVisible}=(0,index_esm.useValues)(newDashboardLogic.Z),{variables}=(0,index_esm.useValues)(dashboardTemplateVariablesLogic.y),templatesLogic=(0,dashboardTemplatesLogic.R)({scope:builtLogic.props.featureFlagId?"feature_flag":"default"}),{templateFilter}=(0,index_esm.useValues)(templatesLogic),{setTemplateFilter}=(0,index_esm.useActions)(templatesLogic),_dashboardTemplateChooser=builtLogic.props.featureFlagId?(0,jsx_runtime.jsx)(DashboardTemplateChooser.g,{scope:"feature_flag"}):(0,jsx_runtime.jsx)(DashboardTemplateChooser.g,{});return(0,jsx_runtime.jsx)(LemonModal.f,{onClose:hideNewDashboardModal,isOpen:newDashboardModalVisible,title:activeDashboardTemplate?"Choose your events":"Create a dashboard","data-attr":"new-dashboard-chooser",description:activeDashboardTemplate?(0,jsx_runtime.jsxs)("p",{children:["The ",(0,jsx_runtime.jsx)("i",{children:activeDashboardTemplate.template_name})," template requires you to choose"," ",(0,utils.Zi)((activeDashboardTemplate.variables||[]).length,"event","events",!0),"."]}):(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,jsx_runtime.jsx)("div",{children:"Choose a template or start with a blank slate"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Filter templates",onChange:setTemplateFilter,value:templateFilter,fullWidth:!0})})]}),footer:activeDashboardTemplate?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[variableSelectModalVisible?(0,jsx_runtime.jsx)("div",{}):(0,jsx_runtime.jsx)(src.Jp,{onClick:clearActiveDashboardTemplate,type:"secondary",children:"Back"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{activeDashboardTemplate&&createDashboardFromTemplate(activeDashboardTemplate,variables)},type:"primary",children:"Create"})]}):null,children:(0,jsx_runtime.jsx)("div",{className:"NewDashboardModal",children:activeDashboardTemplate?(0,jsx_runtime.jsx)(DashboardTemplateVariables,{}):_dashboardTemplateChooser})})}},"./frontend/src/scenes/dashboard/dashboardCollaboratorsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>dashboardCollaboratorsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),scenes_settings_environment_teamMembersLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/settings/environment/teamMembersLogic.tsx"),_dashboardLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx");let dashboardCollaboratorsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.dashboardId),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","dashboard","dashboardCollaboratorsLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(props=>({values:[scenes_settings_environment_teamMembersLogic__WEBPACK_IMPORTED_MODULE_4__.A,["admins","plainMembers","allMembers","allMembersLoading"],(0,_dashboardLogic__WEBPACK_IMPORTED_MODULE_5__.BM)({id:props.dashboardId}),["dashboard"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteExplicitCollaborator:userUuid=>({userUuid}),setExplicitCollaboratorsToBeAdded:userUuids=>({userUuids}),addExplicitCollaborators:!0}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values,props,actions}=_ref;return{explicitCollaborators:[[],{loadExplicitCollaborators:async()=>{let collaborators=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.list(props.dashboardId);return collaborators.sort((a,b)=>a.user.first_name.localeCompare(b.user.first_name)),collaborators},addExplicitCollaborators:async()=>{let{explicitCollaboratorsToBeAdded,explicitCollaborators}=values;actions.setExplicitCollaboratorsToBeAdded([]);let newCollaborators=await Promise.all(explicitCollaboratorsToBeAdded.map(async userUuid=>await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.create(props.dashboardId,userUuid,lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH.CanEdit))),allCollaborators=[...explicitCollaborators,...newCollaborators];return allCollaborators.sort((a,b)=>a.user.first_name.localeCompare(b.user.first_name)),allCollaborators},deleteExplicitCollaborator:async _ref2=>{let{userUuid}=_ref2;return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.delete(props.dashboardId,userUuid),values.explicitCollaborators.filter(collaborator=>collaborator.user.uuid!==userUuid)}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({explicitCollaboratorsToBeAdded:[[],{setExplicitCollaboratorsToBeAdded:(_,_ref3)=>{let{userUuids}=_ref3;return userUuids}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({allCollaborators:[s=>[s.explicitCollaborators,s.admins,s.allMembers,s.dashboard],(explicitCollaborators,admins,allMembers,dashboard)=>{let allCollaborators=[],dashboardCreatorUuid=dashboard?.created_by?.uuid,baseCollaborators=dashboard?.effective_restriction_level===lib_constants__WEBPACK_IMPORTED_MODULE_3__.V7.EveryoneInProjectCanEdit?allMembers:admins;return allCollaborators.push(...explicitCollaborators.filter(collaborator=>!baseCollaborators.find(baseCollaborator=>baseCollaborator.user.uuid===collaborator.user.uuid)).map(explicitCollaborator=>({...explicitCollaborator,level:explicitCollaborator.user.uuid===dashboardCreatorUuid?lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._Owner:explicitCollaborator.level}))),allCollaborators.push(...baseCollaborators.map(baseCollaborator=>({user:baseCollaborator.user,level:baseCollaborator.user.uuid===dashboardCreatorUuid?lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._Owner:lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._ProjectAdmin}))),allCollaborators.sort((a,b)=>a.level===b.level?a.user.first_name.localeCompare(b.user.first_name):b.level-a.level),allCollaborators}],addableMembers:[s=>[s.allCollaborators,s.plainMembers],(allCollaborators,plainMembers)=>{let addableMembers=[];for(let plainMember of plainMembers)allCollaborators.some(collaborator=>collaborator.user.uuid===plainMember.user.uuid)||addableMembers.push(plainMember.user);return addableMembers.sort((a,b)=>a.first_name.localeCompare(b.first_name)),addableMembers}],addableMembersLoading:[s=>[s.explicitCollaboratorsLoading,s.allMembersLoading],(explicitCollaboratorsLoading,allMembersLoading)=>explicitCollaboratorsLoading||allMembersLoading]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.events)(_ref4=>{let{actions}=_ref4;return{afterMount:()=>{actions.loadExplicitCollaborators()}}})])},"./frontend/src/scenes/dashboard/dashboardLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j$:()=>BREAKPOINTS,cH:()=>BREAKPOINT_COLUMN_COUNTS,BM:()=>dashboardLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),internalMetrics=__webpack_require__("./frontend/src/lib/internalMetrics.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),lodash_uniqby=__webpack_require__("./node_modules/.pnpm/lodash.uniqby@4.7.0/node_modules/lodash.uniqby/index.js"),lodash_uniqby_default=__webpack_require__.n(lodash_uniqby),InsightViz_utils=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let sortTilesByLayout=(tiles,col)=>[...tiles].sort((a,b)=>{var _a$layouts$col$x,_a$layouts$col$y,_b$layouts$col$x,_b$layouts$col$y;let ax=null!==(_a$layouts$col$x=a.layouts[col]?.x)&&void 0!==_a$layouts$col$x?_a$layouts$col$x:0,ay=null!==(_a$layouts$col$y=a.layouts[col]?.y)&&void 0!==_a$layouts$col$y?_a$layouts$col$y:0,bx=null!==(_b$layouts$col$x=b.layouts[col]?.x)&&void 0!==_b$layouts$col$x?_b$layouts$col$x:0,by=null!==(_b$layouts$col$y=b.layouts[col]?.y)&&void 0!==_b$layouts$col$y?_b$layouts$col$y:0;return ayby||ay==by&&ax>bx?1:0}),calculateLayouts=tiles=>{let referenceOrder;let allLayouts={};for(let breakpoint of Object.keys(BREAKPOINT_COLUMN_COUNTS)){let sortedDashboardTiles;let columnCount=BREAKPOINT_COLUMN_COUNTS[breakpoint];void 0===referenceOrder?referenceOrder=(sortedDashboardTiles=sortTilesByLayout(tiles,breakpoint)).map(tile=>tile.id):sortedDashboardTiles=tiles.sort((a,b)=>(referenceOrder?.indexOf(a.id)||0)-(referenceOrder?.indexOf(b.id)||0));let layouts=(sortedDashboardTiles||[]).map(tile=>{let query=tile.insight?(0,InsightViz_utils.Q0)(tile.insight):null,minW=3,minH=3,defaultW=6,defaultH=5;tile.text?(minW=1,minH=1,defaultH=2):(0,queries_utils.Wl)(query)?(minW=4,minH=4):(0,queries_utils.I5)(query)?(minW=6,minH=7,defaultW=6,defaultH=7):(0,queries_utils.Qp)(query)?(minW=columnCount,minH=7,defaultW=columnCount,defaultH=7):(0,queries_utils.kX)(query)&&query.trendsFilter?.display===types.Qb.BoldNumber&&(minW=2,minH=2),"xs"===breakpoint&&(minW=1,defaultW=1);let layout=tile.layouts&&tile.layouts[breakpoint],{x,y,w,h}=layout||{},realW=Math.min(w||defaultW,columnCount),realH=h||defaultH;return{i:tile.id?.toString(),x:Number.isInteger(x)&&x+realW-1{let{y}=_ref;return y!==1/0}),dirtyLayouts=layouts?.filter(_ref2=>{let{y}=_ref2;return y===1/0}),lowestPoints=Array.from(Array(columnCount)).map(()=>-1);for(let{x,y,w,h}of cleanLayouts)for(let i=x;i<=x+w-1;i++)lowestPoints[i]=Math.max(lowestPoints[i],y+h-1);for(let{i,w,h,minW,minH}of dirtyLayouts){let segmentCount=columnCount-w+1,lowestSegments=Array.from(Array(segmentCount)).map(()=>-1);for(let k=0;k{let promise=task().then(result=>{results.push(result)}).catch(error=>{console.error("Error executing task:",error)}).finally(()=>{activePromises.delete(promise)});activePromises.add(promise),await promise};for(;remainingTasks.length>0||activePromises.size>0;)activePromises.size0?startTask(remainingTasks.shift()):await Promise.race(activePromises);return results}let layoutsByTile=layouts=>{let itemLayouts={};return Object.entries(layouts).forEach(_ref=>{let[col,layout]=_ref;layout.forEach(layoutItem=>{itemLayouts[layoutItem.i]||(itemLayouts[layoutItem.i]={}),itemLayouts[layoutItem.i][col]=layoutItem})}),itemLayouts};async function getSingleInsight(currentTeamId,insight,dashboardId,queryId,refresh,methodOptions,filtersOverride,variablesOverride){let apiUrl=`api/environments/${currentTeamId}/insights/${insight.id}/?${(0,utils.oZ)({refresh,from_dashboard:dashboardId,client_query_id:queryId,session_id:(0,internalMetrics.U8)(),...filtersOverride?{filters_override:filtersOverride}:{},...variablesOverride?{variables_override:variablesOverride}:{}})}`,insightResponse=await api.ZP.getResponse(apiUrl,methodOptions),legacyInsight=await (0,api.$6)(insightResponse);return null!==legacyInsight?(0,InsightViz_utils.Q0)(legacyInsight):null}let dashboardLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","dashboard","dashboardLogic"]),(0,index_esm.connect)(()=>({values:[teamLogic.H,["currentTeamId"],featureFlagLogic.h,["featureFlags"],variableDataLogic.p,["variables"]],logic:[dashboardsModel.h,insightsModel.U,eventUsageLogic.vx]})),(0,index_esm.props)({}),(0,index_esm.key)(props=>{if("number"!=typeof props.id)throw Error("Must init dashboardLogic with a numeric ID key");return props.id}),(0,index_esm.actions)(_ref2=>{let{values}=_ref2;return{loadDashboard:payload=>payload,triggerDashboardUpdate:payload=>({payload}),setDashboardMode:(mode,source)=>({mode,source}),updateLayouts:layouts=>({layouts}),updateContainerWidth:(containerWidth,columns)=>({containerWidth,columns}),updateTileColor:(tileId,color)=>({tileId,color}),removeTile:tile=>({tile}),refreshDashboardItem:payload=>payload,refreshAllDashboardItems:payload=>payload,refreshAllDashboardItemsManual:!0,resetInterval:!0,updateAndRefreshDashboard:!0,setDates:(date_from,date_to)=>({date_from,date_to}),setProperties:properties=>({properties}),setFiltersAndLayoutsAndVariables:(filters,variables)=>({filters,variables}),setAutoRefresh:(enabled,interval)=>({enabled,interval}),setRefreshStatus:function(shortId){let loading=arguments.length>1&&void 0!==arguments[1]&&arguments[1],queued=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{shortId,loading,queued}},setRefreshStatuses:function(shortIds){let loading=arguments.length>1&&void 0!==arguments[1]&&arguments[1],queued=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{shortIds,loading,queued}},setPageVisibility:visible=>({visible}),setRefreshError:shortId=>({shortId}),reportDashboardViewed:!0,setShouldReportOnAPILoad:shouldReport=>({shouldReport}),setSubscriptionMode:(enabled,id)=>({enabled,id}),moveToDashboard:(tile,fromDashboard,toDashboard,toDashboardName,allowUndo)=>({tile,fromDashboard,toDashboard,toDashboardName,allowUndo:void 0===allowUndo||allowUndo}),setTextTileId:textTileId=>({textTileId}),duplicateTile:tile=>({tile}),loadingDashboardItemsStarted:(action,dashboardQueryId)=>({action,dashboardQueryId}),setInitialLoadResponseBytes:responseBytes=>({responseBytes}),abortQuery:payload=>payload,abortAnyRunningQuery:!0,updateFiltersAndLayoutsAndVariables:!0,overrideVariableValue:(variableId,value)=>({variableId,value,allVariables:values.variables}),resetVariables:()=>({variables:values.insightVariables})}}),(0,lib.loaders)(_ref3=>{let{actions,props,values}=_ref3;return{dashboard:[null,{loadDashboard:async(_ref4,breakpoint)=>{let{refresh,action}=_ref4,dashboardQueryId=(0,utils.Vj)();actions.loadingDashboardItemsStarted(action,dashboardQueryId),await breakpoint(200);try{let apiUrl=values.apiUrl(refresh||"async","preview"===action?values.temporaryFilters:void 0,"preview"===action?values.temporaryVariables:void 0),dashboardResponse=await api.ZP.getResponse(apiUrl),dashboard=await (0,api.$6)(dashboardResponse);if(actions.setInitialLoadResponseBytes((0,insights_utils.Rl)(dashboardResponse)),"preview"===action&&dashboard){let editModeTileLayouts={};values.dashboard?.tiles.forEach(tile=>{editModeTileLayouts[tile.id]=tile.layouts});let tilesWithPreviousLayouts=dashboard.tiles.map(tile=>({...tile,layouts:editModeTileLayouts?.[tile.id]}));return(0,InsightViz_utils.ob)({...dashboard,tiles:tilesWithPreviousLayouts})}return(0,InsightViz_utils.ob)(dashboard)}catch(error){if(404===error.status)return null;throw error}},updateFiltersAndLayoutsAndVariables:async(_,breakpoint)=>{actions.abortAnyRunningQuery();try{let layoutsToUpdate=(values.dashboard?.tiles||[]).map(tile=>({id:tile.id,layouts:tile.layouts}));breakpoint();let dashboard=await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{filters:values.filters,variables:values.insightVariables,tiles:layoutsToUpdate});return(0,InsightViz_utils.ob)(dashboard)}catch(e){return LemonToast.UJ.error("Could not update dashboard: "+String(e)),values.dashboard}},updateTileColor:async _ref5=>{let{tileId,color}=_ref5;await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[{id:tileId,color}]});let matchingTile=values.tiles.find(tile=>tile.id===tileId);return matchingTile&&(matchingTile.color=color),values.dashboard},removeTile:async _ref6=>{let{tile}=_ref6;try{return await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[{id:tile.id,deleted:!0}]}),dashboardsModel.h.actions.tileRemovedFromDashboard({tile:tile,dashboardId:props.id}),{...values.dashboard,tiles:values.tiles.filter(t=>t.id!==tile.id)}}catch(e){return LemonToast.UJ.error("Could not remove tile from dashboard: "+String(e)),values.dashboard}},setDashboardMode:async _ref7=>{let{mode,source}=_ref7;if(null===mode&&source===eventUsageLogic.GU.DashboardHeaderDiscardChanges&&values.dashboard?.tiles){let restoredTiles=values.dashboard?.tiles?.map(tile=>({...tile,layouts:values.dashboardLayouts?.[tile.id]}));values.dashboard.tiles=restoredTiles}return values.dashboard},duplicateTile:async _ref8=>{let{tile}=_ref8;try{let newTile={...tile};delete newTile.id,newTile.text&&(newTile.text={body:newTile.text.body});let dashboard=await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[newTile]});return(0,InsightViz_utils.ob)(dashboard)}catch(e){return LemonToast.UJ.error("Could not duplicate tile: "+String(e)),values.dashboard}},moveToDashboard:async _ref9=>{let{tile,fromDashboard,toDashboard}=_ref9;if(!tile||fromDashboard===toDashboard||fromDashboard!==props.id)return values.dashboard;let dashboard=await api.ZP.update(`api/environments/${teamLogic.H.values.currentTeamId}/dashboards/${props.id}/move_tile`,{tile,toDashboard});return(0,InsightViz_utils.ob)(dashboard)}}]}}),(0,index_esm.reducers)(_ref10=>{let{props}=_ref10;return{_dashboardLoading:[!1,{loadDashboard:()=>!0,loadDashboardSuccess:()=>!1,loadDashboardFailure:()=>!1}],pageVisibility:[!0,{setPageVisibility:(_,_ref11)=>{let{visible}=_ref11;return visible}}],dashboardFailedToLoad:[!1,{loadDashboardSuccess:()=>!1,loadDashboardFailure:()=>!0}],dashboardLayouts:[{},{loadDashboardSuccess:(state,_ref12)=>{let{dashboard,payload}=_ref12;if(payload?.action==="preview")return state;let tileIdToLayouts={};return dashboard?.tiles.forEach(tile=>{tileIdToLayouts[tile.id]=tile.layouts}),tileIdToLayouts}}],temporaryVariables:[{},{overrideVariableValue:(state,_ref13)=>{let{variableId,value,allVariables}=_ref13,foundExistingVar=allVariables.find(n=>n.id===variableId);return foundExistingVar?{...state,[variableId]:{code_name:foundExistingVar.code_name,variableId:foundExistingVar.id,value}}:state},resetVariables:(_,_ref14)=>{let{variables}=_ref14;return{...variables}},loadDashboardSuccess:(state,_ref15)=>{var _dashboard$variables;let{dashboard,payload}=_ref15;return dashboard?{...state,...payload?.action==="preview"?{}:null!==(_dashboard$variables=dashboard.variables)&&void 0!==_dashboard$variables?_dashboard$variables:{}}:state}}],insightVariables:[{},{setFiltersAndLayoutsAndVariables:(state,_ref16)=>{let{variables}=_ref16;return{...state,...variables}},loadDashboardSuccess:(state,_ref17)=>{var _dashboard$variables2;let{dashboard,payload}=_ref17;return dashboard?{...state,...payload?.action==="preview"?{}:null!==(_dashboard$variables2=dashboard.variables)&&void 0!==_dashboard$variables2?_dashboard$variables2:{}}:state}}],temporaryFilters:[{date_from:null,date_to:null,properties:null},{setDates:(state,_ref18)=>{let{date_from,date_to}=_ref18;return{...state,date_from:date_from||null,date_to:date_to||null}},setProperties:(state,_ref19)=>{let{properties}=_ref19;return{...state,properties:properties||null}},loadDashboardSuccess:(state,_ref20)=>{let{dashboard}=_ref20;return dashboard?{...state,date_from:dashboard?.filters.date_from||null,date_to:dashboard?.filters.date_to||null,properties:dashboard?.filters.properties||[]}:state}}],filters:[{date_from:null,date_to:null,properties:null},{setFiltersAndLayoutsAndVariables:(state,_ref21)=>{let{filters}=_ref21;return{...state,...filters}},loadDashboardSuccess:(state,_ref22)=>{let{dashboard,payload}=_ref22;return dashboard?{...state,...payload?.action==="preview"?{}:{date_from:dashboard?.filters.date_from||null,date_to:dashboard?.filters.date_to||null,properties:dashboard?.filters.properties||[]}}:state}}],dashboard:[null,{updateLayouts:(state,_ref23)=>{let{layouts}=_ref23,itemLayouts=layoutsByTile(layouts);return{...state,tiles:state?.tiles?.map(tile=>({...tile,layouts:itemLayouts[tile.id]}))}},[dashboardsModel.h.actionTypes.tileMovedToDashboard]:(state,_ref24)=>{let{tile,dashboardId}=_ref24;return state?.id===dashboardId?{...state,tiles:[...state.tiles,tile]}:state},[dashboardsModel.h.actionTypes.updateDashboardInsight]:(state,_ref25)=>{let{insight,extraDashboardIds}=_ref25,targetDashboards=(insight.dashboard_tiles||[]).map(tile=>tile.dashboard_id).concat(extraDashboardIds||[]);if(!targetDashboards.includes(props.id))return state;if(state){let tileIndex=state.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===insight.short_id),newTiles=state.tiles.slice();return tileIndex>=0&&(insight.dashboards?.includes(props.id)?newTiles[tileIndex]={...newTiles[tileIndex],insight:insight}:insight.dashboards?.includes(props.id)||newTiles.splice(tileIndex,1)),{...state,tiles:newTiles.filter(t=>!t.deleted||!t.insight?.deleted)}}return null},[dashboardsModel.h.actionTypes.updateDashboardSuccess]:(state,_ref26)=>{let{dashboard}=_ref26;return state&&dashboard&&state.id===dashboard.id?dashboard:state},[insightsModel.U.actionTypes.renameInsightSuccess]:(state,_ref27)=>{let{item}=_ref27,tileIndex=state?.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===item.short_id),tiles=state?.tiles.slice(0);return void 0!==tileIndex&&-1!==tileIndex&&tiles?(tiles[tileIndex]={...tiles[tileIndex],insight:{...tiles[tileIndex].insight,name:item.name,last_modified_at:item.last_modified_at}},{...state,tiles}):state}}],loadTimer:[null,{loadDashboard:()=>new Date}],dashboardLoadTimerData:[{dashboardQueryId:"",action:"",startTime:0,responseBytes:0},{loadingDashboardItemsStarted:(_,_ref28)=>{let{action,dashboardQueryId}=_ref28;return{action,dashboardQueryId,startTime:performance.now(),responseBytes:0}},setInitialLoadResponseBytes:(state,_ref29)=>{let{responseBytes}=_ref29;return{...state,responseBytes}}}],refreshStatus:[{},{setRefreshStatus:(state,_ref30)=>{let{shortId,loading,queued}=_ref30;return{...state,[shortId]:loading?{loading:!0,queued:!0,timer:new Date}:queued?{loading:!1,queued:!0,timer:null}:{refreshed:!0,timer:state[shortId]?.timer||null}}},setRefreshStatuses:(state,_ref31)=>{let{shortIds,loading,queued}=_ref31;return Object.fromEntries(shortIds.map(shortId=>[shortId,loading?{loading:!0,queued:!0,timer:new Date}:queued?{loading:!1,queued:!0,timer:null}:{refreshed:!0,timer:state[shortId]?.timer||null}]))},setRefreshError:(state,_ref32)=>{let{shortId}=_ref32;return{...state,[shortId]:{error:!0,timer:state[shortId]?.timer||null}}},refreshAllDashboardItems:()=>({}),abortQuery:()=>({})}],columns:[null,{updateContainerWidth:(_,_ref33)=>{let{columns}=_ref33;return columns}}],containerWidth:[null,{updateContainerWidth:(_,_ref34)=>{let{containerWidth}=_ref34;return containerWidth}}],dashboardMode:[null,{setDashboardMode:(_,_ref35)=>{let{mode}=_ref35;return mode}}],autoRefresh:[{interval:1800,enabled:!1},{persist:!0,prefix:"2_"},{setAutoRefresh:(_,_ref36)=>{let{enabled,interval}=_ref36;return{enabled,interval}}}],shouldReportOnAPILoad:[!1,{setShouldReportOnAPILoad:(_,_ref37)=>{let{shouldReport}=_ref37;return shouldReport}}],showSubscriptions:[!1,{setSubscriptionMode:(_,_ref38)=>{let{enabled}=_ref38;return enabled}}],subscriptionId:[null,{setSubscriptionMode:(_,_ref39)=>{let{id}=_ref39;return id||null}}],showTextTileModal:[!1,{setTextTileId:(_,_ref40)=>{let{textTileId}=_ref40;return!!textTileId}}],textTileId:[null,{setTextTileId:(_,_ref41)=>{let{textTileId}=_ref41;return textTileId}}]}}),(0,index_esm.selectors)(()=>({dashboardVariables:[s=>[s.dashboard,s.variables,s.temporaryVariables],(dashboard,allVariables,temporaryVariables)=>{let dataVizNodes=dashboard.tiles.map(n=>n.insight?.query).filter(n=>n?.kind===schema.OH.DataVisualizationNode).filter(n=>!!n),hogQLVariables=dataVizNodes.map(n=>n.source.variables).filter(n=>!!n).flatMap(n=>Object.values(n)),uniqueVars=lodash_uniqby_default()(hogQLVariables,n=>n.variableId);return uniqueVars.map(v=>{var _ref42;let foundVar=allVariables.find(n=>n.id===v.variableId);if(!foundVar)return null;let overridenValue=temporaryVariables[v.variableId]?.value,resultVar={...foundVar,value:null!==(_ref42=null!=overridenValue?overridenValue:v.value)&&void 0!==_ref42?_ref42:foundVar.value};return resultVar}).filter(n=>!!n)}],asDashboardTemplate:[s=>[s.dashboard],dashboard=>dashboard?{template_name:dashboard.name,dashboard_description:dashboard.description,dashboard_filters:dashboard.filters,tags:dashboard.tags||[],tiles:dashboard.tiles.map(tile=>{if(tile.text)return{type:"TEXT",body:tile.text.body,layouts:tile.layouts,color:tile.color};if(tile.insight)return{type:"INSIGHT",name:tile.insight.name,description:tile.insight.description||"",query:tile.insight.query,layouts:tile.layouts,color:tile.color};throw Error("Unknown tile type")}),variables:[]}:void 0],placement:[()=>[(_,props)=>props.placement],placement=>placement||types.F4.Dashboard],apiUrl:[()=>[(_,props)=>props.id],id=>(refresh,filtersOverride,variablesOverride)=>`api/environments/${teamLogic.H.values.currentTeamId}/dashboards/${id}/?${(0,utils.oZ)({refresh,filters_override:filtersOverride,variables_override:variablesOverride})}`],tiles:[s=>[s.dashboard],dashboard=>dashboard?.tiles?.filter(t=>!t.deleted)||[]],insightTiles:[s=>[s.tiles],tiles=>tiles.filter(t=>!!t.insight).filter(i=>!i.insight?.deleted)],textTiles:[s=>[s.tiles],tiles=>tiles.filter(t=>!!t.text)],itemsLoading:[s=>[s._dashboardLoading,s.refreshStatus],(dashboardLoading,refreshStatus)=>dashboardLoading||Object.values(refreshStatus).some(s=>s.loading||s.queued)],isRefreshingQueued:[s=>[s.refreshStatus],refreshStatus=>id=>!!refreshStatus[id]?.queued],isRefreshing:[s=>[s.refreshStatus],refreshStatus=>id=>!!refreshStatus[id]?.loading],highlightedInsightId:[()=>[kea_router_lib.router.selectors.searchParams],searchParams=>searchParams.highlightInsightId],sortedDates:[s=>[s.insightTiles],insightTiles=>{if(!insightTiles||!insightTiles.length)return[];let validDates=insightTiles.map(i=>(0,dayjs.Bv)(i.insight?.last_refresh)).filter(date=>date.isValid());return(0,insights_utils.XT)(validDates)}],newestRefreshed:[s=>[s.sortedDates,s.pageVisibility],sortedDates=>sortedDates.length?sortedDates[sortedDates.length-1]:null],sortedClientRefreshAllowed:[s=>[s.insightTiles],insightTiles=>{if(!insightTiles||!insightTiles.length)return[];let validDates=insightTiles.filter(i=>!!i.insight?.cache_target_age||!!i.insight?.next_allowed_client_refresh).map(i=>{var _i$insight$cache_targ;return(0,dayjs.Bv)(null!==(_i$insight$cache_targ=i.insight?.cache_target_age)&&void 0!==_i$insight$cache_targ?_i$insight$cache_targ:i.insight?.next_allowed_client_refresh)}).filter(date=>date.isValid());return(0,insights_utils.XT)(validDates)}],oldestClientRefreshAllowed:[s=>[s.sortedClientRefreshAllowed],sortedClientRefreshAllowed=>sortedClientRefreshAllowed.length?sortedClientRefreshAllowed[0]:null],blockRefresh:[s=>[s.newestRefreshed,s.placement,s.oldestClientRefreshAllowed,s.pageVisibility],(newestRefreshed,placement,oldestClientRefreshAllowed)=>!!newestRefreshed&&placement!==types.F4.FeatureFlag&&oldestClientRefreshAllowed?.isAfter(dayjs.zO())],canEditDashboard:[s=>[s.dashboard],dashboard=>!!dashboard&&dashboard.effective_privilege_level>=constants.kH.CanEdit],canRestrictDashboard:[s=>[s.dashboard,userLogic.userLogic.selectors.user,teamLogic.H.selectors.currentTeam],(dashboard,user,currentTeam)=>!!dashboard&&!!user&&(user.uuid===dashboard.created_by?.uuid||!!currentTeam?.effective_membership_level&¤tTeam.effective_membership_level>=constants.Dk.Admin)],sizeKey:[s=>[s.columns],columns=>{let[size]=Object.entries(BREAKPOINT_COLUMN_COUNTS).find(_ref43=>{let[,value]=_ref43;return value===columns})||[];return size}],layouts:[s=>[s.tiles],tiles=>calculateLayouts(tiles)],layout:[s=>[s.layouts,s.sizeKey],(layouts,sizeKey)=>sizeKey?layouts[sizeKey]:void 0],layoutForItem:[s=>[s.layout],layout=>{let layoutForItem={};if(layout)for(let obj of layout)layoutForItem[obj.i]=obj;return layoutForItem}],refreshMetrics:[s=>[s.refreshStatus],refreshStatus=>{var _Object$keys$length,_Object$values$filter;let total=null!==(_Object$keys$length=Object.keys(refreshStatus).length)&&void 0!==_Object$keys$length?_Object$keys$length:0;return{completed:total-(null!==(_Object$values$filter=Object.values(refreshStatus).filter(s=>s.loading||s.queued).length)&&void 0!==_Object$values$filter?_Object$values$filter:0),total}}],breadcrumbs:[s=>[s.dashboard,s._dashboardLoading,s.dashboardFailedToLoad],(dashboard,dashboardLoading,dashboardFailedToLoad)=>[{key:sceneTypes.x.Dashboards,name:"Dashboards",path:urls.j.dashboards()},{key:[sceneTypes.x.Dashboard,dashboard?.id||"new"],name:dashboard?.id?dashboard.name:dashboardFailedToLoad?"Could not load":dashboardLoading?null:"Not found",onRename:async name=>{dashboard&&await dashboardsModel.h.asyncActions.updateDashboard({id:dashboard.id,name,allowUndo:!0})}}]],[sidepanel_types.f]:[s=>[s.dashboard],dashboard=>dashboard?{activity_scope:types.jc.DASHBOARD,activity_item_id:`${dashboard.id}`,access_control_resource:"dashboard",access_control_resource_id:`${dashboard.id}`}:null],sortTilesByLayout:[s=>[s.layoutForItem],layoutForItem=>tiles=>[...tiles].sort((a,b)=>{var _layoutForItem$a$id$x,_layoutForItem$a$id$y,_layoutForItem$b$id$x,_layoutForItem$b$id$y;let ax=null!==(_layoutForItem$a$id$x=layoutForItem[a.id]?.x)&&void 0!==_layoutForItem$a$id$x?_layoutForItem$a$id$x:0,ay=null!==(_layoutForItem$a$id$y=layoutForItem[a.id]?.y)&&void 0!==_layoutForItem$a$id$y?_layoutForItem$a$id$y:0,bx=null!==(_layoutForItem$b$id$x=layoutForItem[b.id]?.x)&&void 0!==_layoutForItem$b$id$x?_layoutForItem$b$id$x:0,by=null!==(_layoutForItem$b$id$y=layoutForItem[b.id]?.y)&&void 0!==_layoutForItem$b$id$y?_layoutForItem$b$id$y:0;return ayby||ay==by&&ax>bx?1:0})]})),(0,index_esm.events)(_ref44=>{let{actions,cache,props}=_ref44;return{afterMount:()=>{props.id&&(props.dashboard?actions.loadDashboardSuccess(props.dashboard):actions.loadDashboard({refresh:"lazy_async",action:"initial_load"}))},beforeUnmount:()=>{cache.autoRefreshInterval&&(window.clearInterval(cache.autoRefreshInterval),cache.autoRefreshInterval=null)}}}),(0,index_esm.sharedListeners)(_ref45=>{let{values,props}=_ref45;return{reportRefreshTiming:_ref46=>{let{shortId}=_ref46,refreshStatus=values.refreshStatus[shortId];if(refreshStatus?.timer){let loadingMilliseconds=new Date().getTime()-refreshStatus.timer.getTime();eventUsageLogic.vx.actions.reportInsightRefreshTime(loadingMilliseconds,shortId)}},reportLoadTiming:()=>{if(values.loadTimer){let loadingMilliseconds=new Date().getTime()-values.loadTimer.getTime();eventUsageLogic.vx.actions.reportDashboardLoadingTime(loadingMilliseconds,props.id)}}}}),(0,index_esm.listeners)(_ref47=>{let{actions,values,cache,props,sharedListeners}=_ref47;return{updateFiltersAndLayoutsAndVariablesSuccess:()=>{actions.loadDashboard({action:"update"})},setRefreshError:sharedListeners.reportRefreshTiming,setRefreshStatuses:sharedListeners.reportRefreshTiming,setRefreshStatus:sharedListeners.reportRefreshTiming,loadDashboardFailure:()=>{let{action,dashboardQueryId,startTime}=values.dashboardLoadTimerData;eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",status:"failure",action,primary_interaction_id:dashboardQueryId,time_to_see_data_ms:Math.floor(performance.now()-startTime)})},[insightsModel.U.actionTypes.duplicateInsightSuccess]:()=>{actions.loadDashboard({action:"update"})},[dashboardsModel.h.actionTypes.tileAddedToDashboard]:_ref48=>{let{dashboardId}=_ref48;dashboardId===props.id&&actions.loadDashboard({action:"update"})},[dashboardsModel.h.actionTypes.updateDashboardInsight]:_ref49=>{let{insight,extraDashboardIds}=_ref49,targetDashboards=(insight.dashboard_tiles||[]).map(tile=>tile.dashboard_id).concat(extraDashboardIds||[]);if(!targetDashboards.includes(props.id))return;let tileIndex=values.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===insight.short_id);-1===tileIndex&&actions.loadDashboard({action:"update"})},moveToDashboardSuccess:_ref50=>{let{payload}=_ref50;if(payload?.toDashboard===void 0||payload?.tile===void 0)return;let updatedTile={...payload.tile};void 0!==updatedTile.insight&&null!==updatedTile.insight&&(updatedTile.insight.dashboards=payload.tile.insight?.dashboards?.filter(d=>d!==payload.fromDashboard)||[],updatedTile.insight.dashboards.push(payload.toDashboard)),updatedTile&&(dashboardsModel.h.actions.tileMovedToDashboard(updatedTile,payload.toDashboard),LemonToast.UJ.success((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Insight moved to"," ",(0,jsx_runtime.jsx)("b",{children:(0,jsx_runtime.jsx)(Link.r,{to:urls.j.dashboard(payload?.toDashboard),children:payload?.toDashboardName})})]})))},triggerDashboardUpdate:_ref51=>{let{payload}=_ref51;values.dashboard&&dashboardsModel.h.actions.updateDashboard({id:values.dashboard.id,...payload})},refreshAllDashboardItemsManual:()=>{actions.resetInterval(),actions.loadDashboard({action:"refresh"})},refreshDashboardItem:async(_ref52,breakpoint)=>{let{tile}=_ref52,dashboardId=props.id,insight=tile.insight;if(insight){actions.setRefreshStatus(insight.short_id,!0,!0);try{breakpoint();let refreshedInsight=await getSingleInsight(values.currentTeamId,insight,dashboardId,(0,utils.Vj)(),"force_async",void 0,void 0,values.temporaryVariables);dashboardsModel.h.actions.updateDashboardInsight(refreshedInsight),tile.insight=refreshedInsight,actions.refreshAllDashboardItems({tiles:[tile],action:REFRESH_DASHBOARD_ITEM_ACTION})}catch(e){actions.setRefreshError(insight.short_id)}}},refreshAllDashboardItems:async(_ref53,breakpoint)=>{let{tiles,action,dashboardQueryId=(0,utils.Vj)()}=_ref53,dashboardId=props.id,insightsToRefresh=(tiles||values.insightTiles||[]).filter(t=>{if(t.insight?.query_status)return!0}).map(t=>t.insight).filter(i=>!!i);if(0===insightsToRefresh.length){let dashboard=values.dashboard;if(dashboard&&action!==REFRESH_DASHBOARD_ITEM_ACTION){let{action,dashboardQueryId,startTime,responseBytes}=values.dashboardLoadTimerData,lastRefresh=(0,insights_utils.jQ)(dashboard.tiles.map(tile=>tile.insight?.last_refresh||null));eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",action,status:"success",primary_interaction_id:dashboardQueryId,time_to_see_data_ms:Math.floor(performance.now()-startTime),api_response_bytes:responseBytes,insights_fetched:dashboard.tiles.length,insights_fetched_cached:dashboard.tiles.reduce((acc,curr)=>acc+(curr.is_cached?1:0),0),min_last_refresh:lastRefresh[0],max_last_refresh:lastRefresh[lastRefresh.length-1]})}return}let cancelled=!1;actions.setRefreshStatuses(insightsToRefresh.map(item=>item.short_id),!1,!0),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},refreshStartTime=performance.now(),refreshesFinished=0,fetchItemFunctions=insightsToRefresh.map(insight=>async()=>{let queryId=insight?.query_status?.id,queryStartTime=performance.now();try{if(breakpoint(),queryId){await (0,query.iM)(queryId,methodOptions);let currentTeamId=values.currentTeamId,polledInsight=await getSingleInsight(currentTeamId,insight,dashboardId,queryId,"force_cache",methodOptions,"preview"===action?values.temporaryFilters:void 0,"preview"===action?values.temporaryVariables:void 0);"preview"===action&&polledInsight.dashboard_tiles&&(polledInsight.dashboards=[dashboardId]),dashboardsModel.h.actions.updateDashboardInsight(polledInsight),actions.setRefreshStatus(insight.short_id)}}catch(e){(0,index_esm.isBreakpoint)(e)?cancelled=!0:(0,utils.sd)(e)?(!cancelled&&queryId&&actions.abortQuery({dashboardQueryId:dashboardQueryId,queryId,queryStartTime}),(0,utils.N)(e)&&(cancelled=!0)):actions.setRefreshError(insight.short_id)}if(refreshesFinished+=1,!cancelled&&refreshesFinished===insightsToRefresh.length){let payload={team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",action,status:"success",primary_interaction_id:dashboardQueryId,api_response_bytes:0,time_to_see_data_ms:Math.floor(performance.now()-refreshStartTime),insights_fetched:insightsToRefresh.length,insights_fetched_cached:0};eventUsageLogic.vx.actions.reportTimeToSeeData(payload)}});await runWithLimit(fetchItemFunctions,2),eventUsageLogic.vx.actions.reportDashboardRefreshed(dashboardId,values.newestRefreshed)},setFiltersAndLayoutsAndVariables:_ref54=>{let{filters:{date_from,date_to}}=_ref54;actions.updateFiltersAndLayoutsAndVariables(),eventUsageLogic.vx.actions.reportDashboardDateRangeChanged(date_from,date_to),eventUsageLogic.vx.actions.reportDashboardPropertiesChanged()},setDashboardMode:async _ref55=>{let{mode,source}=_ref55;if(mode===types.MN.Edit)(0,utils.O3)(),LemonToast.UJ.info("Now editing the dashboard – save to persist changes");else if(null===mode){if(source===eventUsageLogic.GU.DashboardHeaderDiscardChanges){var _values$filters$date_,_values$filters$date_2,_values$filters$prope;actions.setDates(null!==(_values$filters$date_=values.filters.date_from)&&void 0!==_values$filters$date_?_values$filters$date_:null,null!==(_values$filters$date_2=values.filters.date_to)&&void 0!==_values$filters$date_2?_values$filters$date_2:null),actions.setProperties(null!==(_values$filters$prope=values.filters.properties)&&void 0!==_values$filters$prope?_values$filters$prope:null),actions.resetVariables()}else source===eventUsageLogic.GU.DashboardHeaderSaveDashboard&&actions.setFiltersAndLayoutsAndVariables(values.temporaryFilters,values.temporaryVariables)}mode&&eventUsageLogic.vx.actions.reportDashboardModeToggled(mode,source)},setAutoRefresh:()=>{actions.resetInterval()},resetInterval:()=>{cache.autoRefreshInterval&&(window.clearInterval(cache.autoRefreshInterval),cache.autoRefreshInterval=null),values.autoRefresh.enabled&&(!values.itemsLoading&&values.newestRefreshed&&values.newestRefreshed.isBefore((0,dayjs.zO)().subtract(values.autoRefresh.interval,"seconds"))&&actions.loadDashboard({action:"refresh"}),cache.autoRefreshInterval=window.setInterval(()=>{actions.loadDashboard({action:"refresh"})},1e3*values.autoRefresh.interval))},loadDashboardSuccess:function(){if(sharedListeners.reportLoadTiming(...arguments),!values.dashboard)return;let{action,dashboardQueryId}=values.dashboardLoadTimerData;actions.refreshAllDashboardItems({action,dashboardQueryId}),values.shouldReportOnAPILoad&&(actions.setShouldReportOnAPILoad(!1),actions.reportDashboardViewed())},reportDashboardViewed:async(_,breakpoint)=>{let{dashboard,newestRefreshed}=values;dashboard?(eventUsageLogic.vx.actions.reportDashboardViewed(dashboard,newestRefreshed),await breakpoint(1e4),(kea_router_lib.router.values.location.pathname===urls.j.dashboard(dashboard.id)||kea_router_lib.router.values.location.pathname===urls.j.projectHomepage()||kea_router_lib.router.values.location.pathname.startsWith(urls.j.sharedDashboard("")))&&eventUsageLogic.vx.actions.reportDashboardViewed(dashboard,newestRefreshed,10)):actions.setShouldReportOnAPILoad(!0)},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)},abortQuery:async _ref56=>{let{dashboardQueryId,queryId,queryStartTime}=_ref56,{currentTeamId}=values;await api.ZP.create(`api/environments/${currentTeamId}/insights/cancel`,{client_query_id:dashboardQueryId}),eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"insight_load",context:"dashboard",primary_interaction_id:dashboardQueryId,query_id:queryId,status:"cancelled",time_to_see_data_ms:Math.floor(performance.now()-queryStartTime),insights_fetched:0,insights_fetched_cached:0})},setProperties:()=>{actions.loadDashboard({action:"preview"})},setDates:()=>{actions.loadDashboard({action:"preview"})},overrideVariableValue:()=>{actions.setDashboardMode(types.MN.Edit,null),actions.loadDashboard({action:"preview"})}}}),(0,kea_router_lib.urlToAction)(_ref57=>{let{values,actions}=_ref57;return{"/dashboard/:id/subscriptions(/:subscriptionId)":_ref58=>{let{subscriptionId}=_ref58,id=subscriptionId?"new"==subscriptionId?subscriptionId:parseInt(subscriptionId,10):void 0;actions.setSubscriptionMode(!0,id),actions.setTextTileId(null),actions.setDashboardMode(null,null)},"/dashboard/:id":()=>{actions.setSubscriptionMode(!1,void 0),actions.setTextTileId(null),values.dashboardMode===types.MN.Sharing&&actions.setDashboardMode(null,null)},"/dashboard/:id/sharing":()=>{actions.setSubscriptionMode(!1,void 0),actions.setTextTileId(null),actions.setDashboardMode(types.MN.Sharing,null)},"/dashboard/:id/text-tiles/:textTileId":_ref59=>{let{textTileId}=_ref59;actions.setSubscriptionMode(!1,void 0),actions.setDashboardMode(null,null),actions.setTextTileId(void 0===textTileId?"new":"new"!==textTileId?Number(textTileId):"new")}}})])},"./frontend/src/scenes/dashboard/dashboardTemplateEditorLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>dashboardTemplateEditorLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx");let dashboardTemplateEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","dashboard","dashboardTemplateEditorLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({logic:[_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R],values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setEditorValue:value=>({value}),setDashboardTemplate:dashboardTemplate=>({dashboardTemplate}),clear:!0,setDashboardTemplateId:id=>({id}),openDashboardTemplateEditor:!0,closeDashboardTemplateEditor:!0,updateValidationErrors:markers=>({markers})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({editorValue:["",{setEditorValue:(_,_ref)=>{let{value}=_ref;return value},clear:()=>""}],dashboardTemplate:[null,{clear:()=>null,setDashboardTemplate:(_,_ref2)=>{let{dashboardTemplate}=_ref2;return dashboardTemplate}}],validationErrors:[[],{updateValidationErrors:(_,_ref3)=>{let{markers}=_ref3;return markers&&0!==markers.length?markers.map(marker=>marker.message):[]},clear:()=>[]}],id:[null,{setDashboardTemplateId:(_,_ref4)=>{let{id}=_ref4;return id},clear:()=>null}],isOpenNewDashboardTemplateModal:[!1,{openDashboardTemplateEditor:()=>!0,closeDashboardTemplateEditor:()=>!1}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref5=>{let{values}=_ref5;return{dashboardTemplate:[void 0,{createDashboardTemplate:async()=>{if(!values.dashboardTemplate){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to create dashboard template");return}let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.create(values.dashboardTemplate);return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template created"),response},getDashboardTemplate:async id=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.get(id);return response},updateDashboardTemplate:async _ref6=>{let{id,dashboardTemplateUpdates}=_ref6,response=null;if(dashboardTemplateUpdates)response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.update(id,dashboardTemplateUpdates);else if(values.dashboardTemplate)response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.update(id,values.dashboardTemplate);else{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to update dashboard template");return}return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template updated"),response},deleteDashboardTemplate:async id=>(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.delete(id),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template deleted"),null)}],templateSchema:[null,{getTemplateSchema:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.getSchema()}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref7=>{let{values,actions}=_ref7;return{createDashboardTemplateSuccess:async()=>{actions.closeDashboardTemplateEditor(),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},updateDashboardTemplateSuccess:async()=>{actions.closeDashboardTemplateEditor(),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},deleteDashboardTemplateSuccess:async()=>{_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},closeDashboardTemplateEditor:()=>{actions.clear()},setDashboardTemplateId:_ref8=>{let{id}=_ref8;id&&actions.getDashboardTemplate(id)},getDashboardTemplateSuccess:async _ref9=>{let{dashboardTemplate}=_ref9;dashboardTemplate&&actions.setEditorValue(JSON.stringify(dashboardTemplate))},setEditorValue:async(_ref10,breakpoint)=>{let{value}=_ref10;if(await breakpoint(500),0==values.validationErrors.length&&value?.length)try{let dashboardTemplate=JSON.parse(value);actions.setDashboardTemplate(dashboardTemplate)}catch(error){console.error("error",error),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to parse dashboard template")}},updateValidationErrors:async _ref11=>{let{markers}=_ref11;markers?.length||actions.setEditorValue(values.editorValue)},setDashboardTemplate:async _ref12=>{let{dashboardTemplate}=_ref12;dashboardTemplate&&actions.setEditorValue(JSON.stringify(dashboardTemplate,null,4))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref13=>{let{actions}=_ref13;actions.getTemplateSchema()})])},"./frontend/src/scenes/dashboard/dashboardTemplateVariablesLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>dashboardTemplateVariablesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_IframedToolbarBrowser_iframedToolbarBrowserLogic__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/IframedToolbarBrowser/iframedToolbarBrowserLogic.ts"),lib_components_IframedToolbarBrowser_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/IframedToolbarBrowser/utils.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts");let FALLBACK_EVENT={id:"$pageview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS},dashboardTemplateVariablesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","DashboardTemplateVariablesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({variables:[]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[lib_components_IframedToolbarBrowser_iframedToolbarBrowserLogic__WEBPACK_IMPORTED_MODULE_1__.R,["toolbarMessageReceived","disableElementSelector"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setVariables:variables=>({variables}),setVariable:(variableName,filterGroup)=>({variable_name:variableName,filterGroup}),setVariableFromAction:(variableName,action)=>({variableName,action}),setVariableForPageview:(variableName,url)=>({variableName,url}),setVariableForScreenview:variableName=>({variableName}),setActiveVariableIndex:index=>({index}),incrementActiveVariableIndex:!0,possiblyIncrementActiveVariableIndex:!0,resetVariable:variableId=>({variableId}),goToNextUntouchedActiveVariableIndex:!0,setIsCurrentlySelectingElement:isSelecting=>({isSelecting}),setActiveVariableCustomEventName:customEventName=>({customEventName}),maybeResetActiveVariableCustomEventName:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({variables:[[],{setVariables:(_,_ref)=>{let{variables}=_ref;return variables.map(v=>v.default&&!(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Qr)(v.default)?v:{...v,default:FALLBACK_EVENT})},setVariable:(state,_ref2)=>{let{variable_name:variableName,filterGroup}=_ref2,typeWithContents=Object.keys(filterGroup).filter(group=>(filterGroup[group]||[])?.length>0)?.[0];return typeWithContents?state.map(v=>v.name===variableName&&filterGroup?.[typeWithContents]?.length&&filterGroup?.[typeWithContents]?.[0]?{...v,default:filterGroup[typeWithContents]?.[0]||{},touched:!0}:{...v}):state},resetVariable:(state,_ref3)=>{let{variableId}=_ref3;return state.map(v=>v.id===variableId?{...v,default:FALLBACK_EVENT,touched:!1}:{...v})}}],activeVariableIndex:[0,{setActiveVariableIndex:(_,_ref4)=>{let{index}=_ref4;return index},incrementActiveVariableIndex:state=>state+1}],activeVariableCustomEventName:[null,{setActiveVariableCustomEventName:(_,_ref5)=>{let{customEventName}=_ref5;return customEventName}}],isCurrentlySelectingElement:[!1,{setIsCurrentlySelectingElement:(_,_ref6)=>{let{isSelecting}=_ref6;return isSelecting}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({activeVariable:[s=>[s.variables,s.activeVariableIndex],(variables,activeVariableIndex)=>variables[activeVariableIndex]],allVariablesAreTouched:[s=>[s.variables],variables=>variables.every(v=>v.touched)],hasTouchedAnyVariable:[s=>[s.variables],variables=>variables.some(v=>v.touched)]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{actions,props,values}=_ref7;return{possiblyIncrementActiveVariableIndex:()=>{props.variables.length>0&&values.activeVariableIndex{let nextIndex=values.variables.findIndex((v,i)=>!v.touched&&i>values.activeVariableIndex);if(-1!==nextIndex){actions.setActiveVariableIndex(nextIndex);return}-1==nextIndex&&-1==(nextIndex=values.variables.findIndex(v=>!v.touched))&&(nextIndex=values.activeVariableIndex),actions.setActiveVariableIndex(nextIndex)},setVariableFromAction:_ref8=>{let{variableName,action}=_ref8,originalVariableName=variableName.replace(/\s-\s\d+/g,""),step={id:action.id.toString(),math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,name:action.name,custom_name:originalVariableName,order:0,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.ACTIONS,selector:action.steps?.[0]?.selector,href:action.steps?.[0]?.href,url:action.steps?.[0]?.url};actions.setVariable(originalVariableName,{actions:[step]}),actions.setIsCurrentlySelectingElement(!1)},setVariableForPageview:_ref9=>{let{variableName,url}=_ref9,step={id:"$pageview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS,order:0,name:"$pageview",custom_name:variableName,properties:[{key:"$current_url",value:url,operator:"icontains",type:"event"}]};actions.setVariable(variableName,{events:[step]}),actions.setIsCurrentlySelectingElement(!1)},setVariableForScreenview:_ref10=>{let{variableName}=_ref10,step={id:"$screenview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS,order:0,name:"$screenview",custom_name:variableName};actions.setVariable(variableName,{events:[step]}),actions.setIsCurrentlySelectingElement(!1)},toolbarMessageReceived:_ref11=>{let{type,payload}=_ref11;type===lib_components_IframedToolbarBrowser_utils__WEBPACK_IMPORTED_MODULE_2__.TH.PH_NEW_ACTION_CREATED&&(actions.setVariableFromAction(payload.action.name,payload.action),actions.disableElementSelector())},maybeResetActiveVariableCustomEventName:()=>{values.activeVariable?.touched&&values.activeVariable?.default?.custom_event?values.activeVariable?.default?.custom_event&&actions.setActiveVariableCustomEventName(values.activeVariable.default.id):actions.setActiveVariableCustomEventName(null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref12,oldProps)=>{let{actions,props}=_ref12;props.variables!==oldProps.variables&&actions.setVariables(props.variables)})])},"./frontend/src/scenes/dashboard/dashboards/dashboardsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NS:()=>DashboardsTab,dJ:()=>dashboardsLogic});var fuse_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let DashboardsTab=function(DashboardsTab){return DashboardsTab.Dashboards="dashboards",DashboardsTab.Templates="templates",DashboardsTab}({}),DEFAULT_SORTING={columnKey:"name",order:1},DEFAULT_FILTERS={search:"",createdBy:"All users",pinned:!1,shared:!1},dashboardsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","dashboardsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_4__.userLogic,["user"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setCurrentTab:tab=>({tab}),setFilters:filters=>({filters}),tableSortingChanged:sorting=>({sorting})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({tableSorting:[DEFAULT_SORTING,{persist:!0},{tableSortingChanged:(_,_ref)=>{let{sorting}=_ref;return sorting||DEFAULT_SORTING}}],currentTab:[DashboardsTab.Dashboards,{setCurrentTab:(_,_ref2)=>{let{tab}=_ref2;return tab}}],filters:[DEFAULT_FILTERS,{setFilters:(state,_ref3)=>{let{filters}=_ref3;return(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.hO)({...state||{},...filters})}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({isFiltering:[s=>[s.filters],filters=>Object.keys(filters).some(key=>filters[key]!==DEFAULT_FILTERS[key])],dashboards:[s=>[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__.h.selectors.nameSortedDashboards,s.filters,s.fuse],(dashboards,filters,fuse)=>{let haystack=dashboards;return filters.search&&(haystack=fuse.search(filters.search).map(result=>result.item)),filters.pinned&&(haystack=haystack.filter(d=>d.pinned)),filters.shared&&(haystack=haystack.filter(d=>d.is_shared)),"All users"!==filters.createdBy&&(haystack=haystack.filter(d=>d.created_by?.uuid===filters.createdBy)),haystack}],fuse:[()=>[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__.h.selectors.nameSortedDashboards],dashboards=>new fuse_js__WEBPACK_IMPORTED_MODULE_6__.Z(dashboards,{keys:["key","name","description","tags"],threshold:.3})]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.actionToUrl)(_ref4=>{let{values}=_ref4;return{setCurrentTab:()=>{let tab=values.currentTab===DashboardsTab.Dashboards?void 0:values.currentTab;kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.searchParams.tab!==tab&&kea_router__WEBPACK_IMPORTED_MODULE_1__.router.actions.push(kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.location.pathname,{...kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.searchParams,tab})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.urlToAction)(_ref5=>{let{actions}=_ref5;return{"/dashboard":(_,searchParams)=>{let tab=searchParams.tab||DashboardsTab.Dashboards;actions.setCurrentTab(tab)}}})])},"./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>dashboardTemplatesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts");let dashboardTemplatesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","dashboards","templates","dashboardTemplatesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(_ref=>{let{scope}=_ref;return null!=scope?scope:"unknown"}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setTemplates:allTemplates=>({allTemplates}),setTemplateFilter:search=>({search})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({templateFilter:["",{setTemplateFilter:(_,_ref2)=>{let{search}=_ref2;return search}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{props,values}=_ref3;return{allTemplates:[[],{getAllTemplates:async()=>{let params={scope:"default"!==props.scope?props.scope:void 0,search:values.templateFilter.length>2?values.templateFilter:void 0},page=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboardTemplates.list(params);return page.results}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref4=>{let{actions}=_ref4;return{setTemplateFilter:async(_,breakpoint)=>{await breakpoint(100),actions.getAllTemplates()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref5=>{let{actions}=_ref5;actions.getAllTemplates()})])},"./frontend/src/scenes/dashboard/deleteDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>deleteDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let defaultFormValues={dashboardId:null,deleteInsights:!1},deleteDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","deleteDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({showDeleteDashboardModal:id=>({id}),hideDeleteDashboardModal:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({deleteDashboardModalVisible:[!1,{showDeleteDashboardModal:()=>!0,hideDeleteDashboardModal:()=>!1}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(()=>({deleteDashboard:{defaults:defaultFormValues,errors:()=>({}),submit:async _ref=>{let{dashboardId,deleteInsights}=_ref;_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actions.deleteDashboard({id:dashboardId,deleteInsights})}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{actions}=_ref2;return{showDeleteDashboardModal:_ref3=>{let{id}=_ref3;actions.setDeleteDashboardValues({dashboardId:id})},hideDeleteDashboardModal:()=>{actions.resetDeleteDashboard()},[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actionTypes.deleteDashboardSuccess]:()=>{actions.hideDeleteDashboardModal(),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname!==scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards()&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards())}}})])},"./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>duplicateDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),_models_insightsModel__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/models/insightsModel.tsx");let defaultFormValues={dashboardId:null,duplicateTiles:!1,dashboardName:void 0,show:!1},duplicateDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","duplicateDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_models_insightsModel__WEBPACK_IMPORTED_MODULE_5__.U,["insightsAddedToDashboard"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({showDuplicateDashboardModal:(id,name)=>({id,name}),hideDuplicateDashboardModal:!0,duplicateAndGoToDashboard:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({duplicateDashboardModalVisible:[!1,{showDuplicateDashboardModal:()=>!0,hideDuplicateDashboardModal:()=>!1}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(()=>({duplicateDashboard:{defaults:defaultFormValues,errors:()=>({}),submit:async _ref=>{let{dashboardId,dashboardName,show,duplicateTiles}=_ref;dashboardId&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actions.duplicateDashboard({id:dashboardId,name:dashboardName,show,duplicateTiles})}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{actions}=_ref2;return{hideDuplicateDashboardModal:()=>{actions.resetDuplicateDashboard()},[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actionTypes.duplicateDashboardSuccess]:_ref3=>{let{dashboard,payload}=_ref3;if(actions.hideDuplicateDashboardModal(),!payload?.duplicateTiles){let insightsOnDuplicatedDashboard=dashboard.tiles.map(t=>t.insight?.id).filter(id=>!!id);actions.insightsAddedToDashboard({dashboardId:dashboard.id,insightIds:insightsOnDuplicatedDashboard})}payload?.show?kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboard(dashboard.id)):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname!==scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards()&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards())},duplicateAndGoToDashboard:()=>{actions.setDuplicateDashboardValue("show",!0),actions.submitDuplicateDashboard()},showDuplicateDashboardModal:_ref4=>{let{id,name}=_ref4;actions.setDuplicateDashboardValues({dashboardId:id,dashboardName:name})}}})])},"./frontend/src/scenes/dashboard/newDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>newDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts"),_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/queries/utils.ts");let defaultFormValues={name:"",description:"",show:!1,useTemplate:"",restrictionLevel:lib_constants__WEBPACK_IMPORTED_MODULE_4__.V7.EveryoneInProjectCanEdit},newDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(_ref=>{let{featureFlagId}=_ref;return null!=featureFlagId?featureFlagId:"new"}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","newDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({logic:[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h],values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setIsLoading:isLoading=>({isLoading}),showNewDashboardModal:!0,showVariableSelectModal:template=>({template}),hideNewDashboardModal:!0,addDashboard:form=>({form}),setActiveDashboardTemplate:template=>({template}),clearActiveDashboardTemplate:!0,createDashboardFromTemplate:function(template,variables,redirectAfterCreation){let creationContext=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{template,variables,redirectAfterCreation,creationContext}},submitNewDashboardSuccessWithResult:(result,variables)=>({result,variables})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({isLoading:[!1,{setIsLoading:(_,_ref2)=>{let{isLoading}=_ref2;return isLoading},hideNewDashboardModal:()=>!1,submitNewDashboardSuccess:()=>!1,submitNewDashboardFailure:()=>!1,clearActiveDashboardTemplate:()=>!1}],newDashboardModalVisible:[!1,{showNewDashboardModal:()=>!0,showVariableSelectModal:()=>!0,hideNewDashboardModal:()=>!1}],variableSelectModalVisible:[!1,{showVariableSelectModal:()=>!0,hideNewDashboardModal:()=>!1}],activeDashboardTemplate:[null,{setActiveDashboardTemplate:(_,_ref3)=>{let{template}=_ref3;return template},clearActiveDashboardTemplate:()=>null}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref4=>{let{actions}=_ref4;return{newDashboard:{defaults:defaultFormValues,errors:_ref5=>{let{name,restrictionLevel}=_ref5;return{name:name?null:"Please give your dashboard a name.",restrictionLevel:restrictionLevel?null:"Restriction level needs to be specified."}},submit:async(_ref6,breakpoint)=>{let{name,description,useTemplate,restrictionLevel,show}=_ref6;actions.setIsLoading(!0);try{let result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H.values.currentTeamId}/dashboards/`,{name:name,description:description,use_template:useTemplate,restriction_level:restrictionLevel});actions.hideNewDashboardModal(),actions.resetNewDashboard();let queryBasedDashboard=(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result);queryBasedDashboard&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h.actions.addDashboardSuccess(queryBasedDashboard),actions.submitNewDashboardSuccessWithResult(result),show&&(breakpoint(),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dashboard(result.id)))}catch(e){if(!(0,kea__WEBPACK_IMPORTED_MODULE_0__.isBreakpoint)(e)){let message=e.code&&e.detail?`${e.code}: ${e.detail}`:e;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.error(`Could not create dashboard: ${message}`)}}actions.setIsLoading(!1)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref7=>{let{props}=_ref7;return{isFeatureFlagDashboard:[()=>[],()=>props.featureFlagId]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref8=>{let{actions}=_ref8;return{addDashboard:_ref9=>{let{form}=_ref9;actions.resetNewDashboard(),actions.setNewDashboardValues({...defaultFormValues,...form}),actions.submitNewDashboard()},showNewDashboardModal:()=>{actions.resetNewDashboard()},hideNewDashboardModal:()=>{actions.clearActiveDashboardTemplate(),actions.resetNewDashboard()},createDashboardFromTemplate:async _ref10=>{let{template,variables,redirectAfterCreation=!0,creationContext=null}=_ref10;actions.setIsLoading(!0);let tiles=template.tiles.map(tile=>{let isQueryBased="query"in tile&&null!=tile.query,queryKind=isQueryBased?(0,_queries_utils__WEBPACK_IMPORTED_MODULE_14__.KN)(tile.query)?tile.query?.source.kind:tile.query?.kind:null;return function applyTemplate(obj,variables,queryKind){if("string"==typeof obj&&obj.startsWith("{")&&obj.endsWith("}")){let variableId=obj.substring(1,obj.length-1),variable=variables.find(variable=>variable.id===variableId);if(variable&&variable.default){let isEventVariable="event"===variable.type;if(queryKind&&isEventVariable){let mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.None;return queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.TrendsQuery?mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.All:queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.StickinessQuery?mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.ActorsOnly:queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.FunnelsQuery&&(mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.FunnelsOnly),queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.RetentionQuery?(0,_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__.d6)(variable.default):(0,_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__.pE)(variable.default,!0,mathAvailability)}return variable.default}return obj}if(Array.isArray(obj))return obj.map(item=>applyTemplate(item,variables,queryKind));if("object"==typeof obj&&null!==obj){let newObject={};for(let[key,value]of Object.entries(obj))newObject[key]=applyTemplate(value,variables,queryKind);return newObject}return obj}(tile,variables,queryKind)}),dashboardJSON={...template,tiles};try{let result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H.values.currentTeamId}/dashboards/create_from_template_json`,{template:dashboardJSON,creation_context:creationContext});actions.hideNewDashboardModal(),actions.resetNewDashboard();let queryBasedDashboard=(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result);queryBasedDashboard&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h.actions.addDashboardSuccess(queryBasedDashboard),actions.submitNewDashboardSuccessWithResult(result,variables),redirectAfterCreation&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dashboard(result.id))}catch(e){if(!(0,kea__WEBPACK_IMPORTED_MODULE_0__.isBreakpoint)(e)){let message=e.code&&e.detail?`${e.code}: ${e.detail}`:e;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.error(`Could not create dashboard: ${message}`)}}actions.setIsLoading(!1)},showVariableSelectModal:_ref11=>{let{template}=_ref11;actions.setActiveDashboardTemplate(template)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref12=>{let{actions}=_ref12;return{"/dashboard":(_,_searchParams,hashParams)=>{"newDashboard"in hashParams&&actions.showNewDashboardModal()}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)({hideNewDashboardModal:()=>{let hashParams=kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.hashParams;return delete hashParams.newDashboard,[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams,hashParams]},showNewDashboardModal:()=>{let hashParams=kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.hashParams;return hashParams.newDashboard="modal",[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams,hashParams]}})])},"./frontend/src/scenes/data-management/DataManagementScene.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DataManagementScene:()=>DataManagementScene,DataManagementTab:()=>DataManagementTab,scene:()=>scene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),ActivityLog=__webpack_require__("./frontend/src/lib/components/ActivityLog/ActivityLog.tsx"),PageHeader=__webpack_require__("./frontend/src/lib/components/PageHeader.tsx"),TitleWithIcon=__webpack_require__("./frontend/src/lib/components/TitleWithIcon.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx");__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");var NewActionButton=__webpack_require__("./frontend/src/scenes/actions/NewActionButton.tsx"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),ProductIntroduction=__webpack_require__("./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),columnUtils=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/columnUtils.tsx"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),AnnotationModal=__webpack_require__("./frontend/src/scenes/annotations/AnnotationModal.tsx"),annotationModalLogic=__webpack_require__("./frontend/src/scenes/annotations/annotationModalLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"),sceneTypes=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),api=__webpack_require__("./frontend/src/lib/api.ts"),ObjectTags=__webpack_require__("./frontend/src/lib/components/ObjectTags/ObjectTags.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),deleteWithUndo=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),actionsLogic=__webpack_require__("./frontend/src/scenes/actions/actionsLogic.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),TaxonomicFilter_types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TZLabel=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),DefinitionHeader=__webpack_require__("./frontend/src/scenes/data-management/events/DefinitionHeader.tsx"),EventDefinitionProperties=__webpack_require__("./frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx"),eventDefinitionsTableLogic=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts");let eventTypeOptions=[{value:types.uW.Event,label:"All events","data-attr":"event-type-option-event"},{value:types.uW.EventCustom,label:"Custom events","data-attr":"event-type-option-event-custom"},{value:types.uW.EventPostHog,label:"PostHog events","data-attr":"event-type-option-event-posthog"}];var Sparkline=__webpack_require__("./frontend/src/lib/components/Sparkline.tsx"),ViewRecordingButton=__webpack_require__("./frontend/src/lib/components/ViewRecordingButton.tsx"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts");let ingestionWarningsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","data-management","ingestion-warnings","ingestionWarningsLogic"]),(0,index_esm.connect)({values:[teamLogic.H,["timezone"],projectLogic.K,["currentProjectId"]]}),(0,kea_loaders_lib.loaders)(_ref=>{let{values}=_ref;return{data:[[],{loadData:async()=>{let{results}=await api.ZP.get(`api/projects/${values.currentProjectId}/ingestion_warnings`);return results}}]}}),(0,index_esm.selectors)({breadcrumbs:[()=>[],()=>[{key:sceneTypes.x.DataManagement,name:"Data management",path:urls.j.eventDefinitions()},{key:DataManagementTab.IngestionWarnings,name:"Ingestion warnings",path:urls.j.ingestionWarnings()}]],dates:[()=>[],()=>(0,utils.w6)(0,30).map(i=>(0,dayjs.Bv)().subtract(i,"days").format("D MMM YYYY")).reverse()],summaryDatasets:[s=>[s.data,s.timezone],(data,timezone)=>{let summaryDatasets={};return data.forEach(summary=>{let result=Array(30).fill(0);for(let spark of summary.sparkline){let date=(0,dayjs.fp)(spark[1],timezone),dayIndex=(0,dayjs.Bv)().diff(date,"days");result[dayIndex]=spark[0]}summaryDatasets[summary.type]=result.reverse()}),summaryDatasets}]}),(0,index_esm.afterMount)(_ref2=>{let{actions}=_ref2;actions.loadData()})]),WARNING_TYPE_TO_DESCRIPTION={cannot_merge_already_identified:"Refused to merge an already identified user",cannot_merge_with_illegal_distinct_id:"Refused to merge with an illegal distinct id",skipping_event_invalid_uuid:"Refused to process event with invalid uuid",ignored_invalid_timestamp:"Ignored an invalid timestamp, event was still ingested",event_timestamp_in_future:"An event was sent more than 23 hours in the future",ingestion_capacity_overflow:"Event ingestion has overflowed capacity",message_size_too_large:"Discarded event exceeding 1MB limit",replay_timestamp_invalid:"Replay event timestamp is invalid",replay_timestamp_too_far:"Replay event timestamp was too far in the future",replay_message_too_large:"Replay data was dropped because it was too large to ingest"},WARNING_TYPE_RENDERER={cannot_merge_already_identified:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to merge already identified person"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.sourcePersonDistinctId),children:details.sourcePersonDistinctId})," ","into"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.targetPersonDistinctId),children:details.targetPersonDistinctId})," ","via an $identify or $create_alias call (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")."]})},cannot_merge_with_illegal_distinct_id:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to merge an illegal distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.illegalDistinctId),children:details.illegalDistinctId})," with"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.otherDistinctId),children:details.otherDistinctId})," via an $identify or $create_alias call (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")."]})},skipping_event_invalid_uuid:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to process event with invalid uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),"."]})},ignored_invalid_timestamp:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Used server timestamp when ingesting event due to invalid input:",(0,jsx_runtime.jsxs)("ul",{children:[details.eventUuid?(0,jsx_runtime.jsxs)("li",{children:["Event UUID: ",details.eventUuid]}):"",details.field?(0,jsx_runtime.jsxs)("li",{children:["Invalid field: ",details.field]}):"",details.value?(0,jsx_runtime.jsxs)("li",{children:["Invalid value: ",details.value]}):"",details.reason?(0,jsx_runtime.jsxs)("li",{children:["Error: ",details.reason]}):""]})]})},event_timestamp_in_future:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["The event timestamp computed too far in the future, so the capture time was used instead. Event values:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["Computed timestamp: ",details.result]}),details.eventUuid?(0,jsx_runtime.jsxs)("li",{children:["Event UUID: ",details.eventUuid]}):"",details.timestamp?(0,jsx_runtime.jsxs)("li",{children:["Client provided timestamp: ",details.timestamp]}):"",details.sentAt?(0,jsx_runtime.jsxs)("li",{children:["Client provided sent_at: ",details.sentAt]}):"",details.offset?(0,jsx_runtime.jsxs)("li",{children:["Client provided time offset: ",details.offset]}):"",(0,jsx_runtime.jsxs)("li",{children:["PostHog server capture time: ",details.now]})]})]})},ingestion_capacity_overflow:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Event ingestion has overflowed capacity for distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.overflowDistinctId),children:details.overflowDistinctId}),". Events will still be processed, but are likely to be delayed longer than usual."]})},message_size_too_large:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Discarded event for distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.distinctId),children:details.distinctId})," that exceeded 1MB in size after processing (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")"]})},replay_timestamp_invalid:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Session replay data dropped due to invalid timestamp:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["invalid timestamp: ",details.timestamp]}),(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]})]}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"skewed-timestamp-view-recording"})})]})},replay_timestamp_too_far:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id,daysFromNow:warning.details.daysFromNow};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["The session replay data timestamp was too different from the capture time, so the data was dropped. Event values:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["invalid timestamp: ",details.timestamp]}),(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]}),(0,jsx_runtime.jsxs)("li",{children:["skew: ",details.daysFromNow," days"]})]}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"skewed-timestamp-view-recording"})})]})},replay_message_too_large:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Session replay data dropped due to its size, this can cause playback problems:",(0,jsx_runtime.jsx)("ul",{children:(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]})}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"message-too-large-view-recording"})})]})}};function RenderNestedWarnings(warningSummary){return(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:warningSummary.warnings,columns:[{title:"Description",key:"description",render:function Render(_,warning){let renderer=WARNING_TYPE_RENDERER[warning.type];return renderer?renderer(warning):(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(warning.details,null,2)})}},{title:"Time",dataIndex:"timestamp",render:function Render(_,warning){return(0,jsx_runtime.jsx)(TZLabel.w,{time:warning.timestamp,showSeconds:!0})},align:"right"}],embedded:!0,showHeader:!1,pagination:{pageSize:20}})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PropertyDefinitionsTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-management/properties/PropertyDefinitionsTable.scss"),PropertyDefinitionsTable_default=__webpack_require__.n(PropertyDefinitionsTable),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PropertyDefinitionsTable_default(),options),PropertyDefinitionsTable_default().locals;var propertyDefinitionsTableLogic=__webpack_require__("./frontend/src/scenes/data-management/properties/propertyDefinitionsTableLogic.ts");let DataManagementTab=function(DataManagementTab){return DataManagementTab.Actions="actions",DataManagementTab.EventDefinitions="events",DataManagementTab.PropertyDefinitions="properties",DataManagementTab.Annotations="annotations",DataManagementTab.History="history",DataManagementTab.IngestionWarnings="warnings",DataManagementTab}({}),tabs={[DataManagementTab.EventDefinitions]:{url:urls.j.eventDefinitions(),label:"Events",content:(0,jsx_runtime.jsx)(function(){var _eventDefinitions$pag,_eventDefinitions$cou;let{eventDefinitions,eventDefinitionsLoading,filters}=(0,index_esm.useValues)(eventDefinitionsTableLogic.qh),{loadEventDefinitions,setFilters}=(0,index_esm.useActions)(eventDefinitionsTableLogic.qh),{hasTagging}=(0,index_esm.useValues)(organizationLogic.p),columns=[{key:"icon",width:0,render:function Render(_,definition){return(0,jsx_runtime.jsx)("span",{className:"text-xl text-muted",children:(0,DefinitionHeader.Kw)(definition)})}},{title:"Name",key:"name",render:function Render(_,definition){return(0,jsx_runtime.jsx)(DefinitionHeader.JH,{definition:definition,to:urls.j.eventDefinition(definition.id),taxonomicGroupType:TaxonomicFilter_types.t.Events})},sorter:!0},{title:"Last seen",key:"last_seen_at",className:"definition-column-last_seen_at",render:function Render(_,definition){return definition.last_seen_at?(0,jsx_runtime.jsx)(TZLabel.w,{time:definition.last_seen_at}):null},sorter:!0},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,definition){var _definition$tags;return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:null!==(_definition$tags=definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[],{key:"actions",width:0,render:function RenderActions(_,definition){return(0,jsx_runtime.jsx)(More.T,{"data-attr":`event-definitions-table-more-button-${definition.name}`,overlay:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.Jp,{to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:definition.name,type:"events",order:0,name:definition.name}]}]}}),fullWidth:!0,sideIcon:(0,jsx_runtime.jsx)(icons.Ud,{}),"data-attr":"event-definitions-table-view-recordings",children:"View recordings"})})})}}];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsxs)(LemonBanner.V,{className:"mb-4",type:"info",children:["Looking for"," ","event_custom"===filters.event_type?"custom ":"event_posthog"===filters.event_type?"PostHog ":"","event usage statistics?"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightNewHogQL("SELECT event, count()\nFROM events\nWHERE {filters}\n"+("event_custom"===filters.event_type?"AND event NOT LIKE '$%'\n":"event_posthog"===filters.event_type?"AND event LIKE '$%'\n":"")+"GROUP BY event\nORDER BY count() DESC",{dateRange:{date_from:"-24h"}}),children:"Query with SQL"})]}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2 mb-4",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for events",onChange:v=>setFilters({event:v||""}),value:filters.event}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{children:"Type:"}),(0,jsx_runtime.jsx)(src.Yv,{value:filters.event_type,options:eventTypeOptions,"data-attr":"event-type-filter",dropdownMatchSelectWidth:!1,onChange:value=>{setFilters({event_type:value})},size:"small"})]})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,"data-attr":"events-definition-table",loading:eventDefinitionsLoading,rowKey:"id",pagination:{controlled:!0,currentPage:null!==(_eventDefinitions$pag=eventDefinitions?.page)&&void 0!==_eventDefinitions$pag?_eventDefinitions$pag:1,entryCount:null!==(_eventDefinitions$cou=eventDefinitions?.count)&&void 0!==_eventDefinitions$cou?_eventDefinitions$cou:0,pageSize:constants.H$,onForward:eventDefinitions.next?()=>{loadEventDefinitions(eventDefinitions.next)}:void 0,onBackward:eventDefinitions.previous?()=>{loadEventDefinitions(eventDefinitions.previous)}:void 0},onSort:newSorting=>setFilters({ordering:newSorting?`${-1===newSorting.order?"-":""}${newSorting.columnKey}`:void 0}),expandable:{expandedRowRender:function RenderPropertiesTable(definition){return(0,jsx_runtime.jsx)("div",{className:"p-4",children:(0,jsx_runtime.jsx)(EventDefinitionProperties.Q,{definition:definition})})},rowExpandable:()=>!0,noIndent:!0},dataSource:eventDefinitions.results,useURLForSorting:!1,emptyState:"No event definitions",nouns:["event","events"]})]})},{})},[DataManagementTab.Actions]:{url:urls.j.actions(),label:(0,jsx_runtime.jsx)(TitleWithIcon.H,{icon:(0,jsx_runtime.jsx)(Tooltip.u,{title:"Actions consist of one or more events that you have decided to put into a deliberately-labeled bucket. They're used in insights and dashboards.",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{})}),children:"Actions"}),buttons:(0,jsx_runtime.jsx)(NewActionButton.O,{}),content:(0,jsx_runtime.jsx)(function(){let{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{actionsLoading}=(0,index_esm.useValues)((0,actionsModel.D)({params:"include_count=1"})),{loadActions,pinAction,unpinAction}=(0,index_esm.useActions)(actionsModel.D),{filterType,searchTerm,actionsFiltered,shouldShowEmptyState}=(0,index_esm.useValues)(actionsLogic.M),{setFilterType,setSearchTerm}=(0,index_esm.useActions)(actionsLogic.M),{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),{updateHasSeenProductIntroFor}=(0,index_esm.useActions)(userLogic.userLogic),tryInInsightsUrl=action=>{let query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.TrendsQuery,series:[{id:action.id,name:action.name||void 0,kind:schema.OH.ActionsNode}],interval:"day",trendsFilter:{display:types.Qb.ActionsLineGraph}}};return urls.j.insightNew(void 0,void 0,query)},columns=[{width:0,title:"Pinned",dataIndex:"pinned_at",sorter:(a,b)=>(b.pinned_at?new Date(b.pinned_at).getTime():0)-(a.pinned_at?new Date(a.pinned_at).getTime():0),render:function Render(pinned,action){return(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",onClick:pinned?()=>unpinAction(action):()=>pinAction(action),tooltip:pinned?"Unpin action":"Pin action",icon:pinned?(0,jsx_runtime.jsx)(posthog_icons_es.IconPinFilled,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconPin,{})})}},{title:"Name",dataIndex:"name",width:"25%",sorter:(a,b)=>(a.name||"").localeCompare(b.name||""),render:function RenderName(_,action,index){return(0,jsx_runtime.jsx)(LemonTableLink.i,{"data-attr":"action-link-"+index,to:urls.j.action(action.id),title:action.name||(0,jsx_runtime.jsx)("i",{children:"Unnamed"}),description:action.description})}},{title:"Type",key:"type",render:function RenderType(_,action){return(0,jsx_runtime.jsx)("span",{children:action.steps?.length?action.steps.map((step,index)=>(0,jsx_runtime.jsx)("div",{children:(()=>{let url=(0,utils.VV)(step.url||"");switch(url=url.slice(0,40)+(url.length>40?"...":""),step.event){case"$autocapture":return"Autocapture";case"$pageview":switch(step.url_matching){case"regex":return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL matches regex ",(0,jsx_runtime.jsx)("strong",{children:url})]});case"exact":return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL matches exactly ",(0,jsx_runtime.jsx)("strong",{children:url})]});default:return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL contains ",(0,jsx_runtime.jsx)("strong",{children:url})]})}case"":case null:case void 0:return"Any event";default:return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Event: ",(0,jsx_runtime.jsx)("strong",{children:step.event})]})}})()},index)):(0,jsx_runtime.jsx)("i",{children:"Empty – set this action up"})})}},...hasAvailableFeature(types.P$.TAGGING)?[{title:"Tags",dataIndex:"tags",width:250,key:"tags",render:function renderTags(tags){return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:tags,staticOnly:!0})}}]:[],(0,columnUtils.JB)(),(0,columnUtils.rw)(),...currentTeam?.slack_incoming_webhook?[{title:"Webhook",dataIndex:"post_to_slack",sorter:(a,b)=>Number(a.post_to_slack)-Number(b.post_to_slack),render:function RenderActions(post_to_slack){return post_to_slack?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}):null}}]:[],{width:0,render:function RenderActions(_,action){return(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.action(action.id),fullWidth:!0,children:"Edit"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.duplicateAction(action),fullWidth:!0,children:"Duplicate"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:action.id,type:"actions",order:0,name:action.name}]}]}}),sideIcon:(0,jsx_runtime.jsx)(icons.Ud,{}),fullWidth:!0,"data-attr":"action-table-view-recordings",children:"View recordings"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:tryInInsightsUrl(action),fullWidth:!0,children:"Try out in Insights"}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{status:"danger",onClick:()=>void(0,deleteWithUndo.S)({endpoint:api.ZP.actions.determineDeleteEndpoint(),object:action,callback:loadActions}),fullWidth:!0,children:"Delete action"})]})})}}];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Actions",productKey:types.Md.ACTIONS,thingName:"action",isEmpty:shouldShowEmptyState,description:"Use actions to combine events that you want to have tracked together or to make detailed Autocapture events easier to reuse.",docsURL:"https://posthog.com/docs/data/actions",actionElementOverride:(0,jsx_runtime.jsx)(NewActionButton.O,{onSelectOption:()=>updateHasSeenProductIntroFor(types.Md.ACTIONS,!0)})}),shouldShowEmptyState&&"me"===filterType||!shouldShowEmptyState?(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-4",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for actions",onChange:setSearchTerm,value:searchTerm}),(0,jsx_runtime.jsx)(src.P4,{value:filterType,onChange:setFilterType,options:[{value:"all",label:"All actions"},{value:"me",label:"My actions"}]})]}):null,(!shouldShowEmptyState||"me"===filterType)&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,loading:actionsLoading,rowKey:"id",pagination:{pageSize:100},"data-attr":"actions-table",dataSource:actionsFiltered,defaultSorting:{columnKey:"created_by",order:-1},emptyState:"No results. Create a new action?"})})]})},{})},[DataManagementTab.PropertyDefinitions]:{url:urls.j.propertyDefinitions(),label:(0,jsx_runtime.jsx)(TitleWithIcon.H,{icon:(0,jsx_runtime.jsx)(Tooltip.u,{title:"Properties are additional data sent along with an event capture. Use properties to understand additional information about events and the actors that generate them.",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{})}),children:"Properties"}),content:(0,jsx_runtime.jsx)(function(){var _filters$group_type_i,_propertyDefinitions$,_propertyDefinitions$2;let{propertyDefinitions,propertyDefinitionsLoading,filters,propertyTypeOptions}=(0,index_esm.useValues)(propertyDefinitionsTableLogic.T),{loadPropertyDefinitions,setFilters,setPropertyType}=(0,index_esm.useActions)(propertyDefinitionsTableLogic.T),{hasTagging}=(0,index_esm.useValues)(organizationLogic.p),columns=[{key:"icon",width:0,render:function Render(_,definition){return(0,jsx_runtime.jsx)("span",{className:"text-xl text-muted",children:(0,DefinitionHeader.Jf)(definition)})}},{title:"Name",key:"name",render:function Render(_,definition){return(0,jsx_runtime.jsx)(DefinitionHeader.JH,{definition:definition,to:urls.j.propertyDefinition(definition.id),taxonomicGroupType:TaxonomicFilter_types.t.EventProperties})},sorter:(a,b)=>a.name.localeCompare(b.name)},{title:"Type",key:"type",render:function RenderType(_,definition){return definition.property_type?(0,jsx_runtime.jsx)(src.oe,{type:"success",className:"uppercase",children:definition.property_type}):(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"—"})}},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,definition){var _definition$tags;return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:null!==(_definition$tags=definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[]];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsxs)(LemonBanner.V,{className:"mb-4",type:"info",children:["Looking for ","person"===filters.type?"person ":"","property usage statistics?"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightNewHogQL("SELECT arrayJoin(JSONExtractKeys(properties)) AS property_key, count()\n"+("person"===filters.type?"FROM persons\n":"FROM events\n")+("person"===filters.type?"":"WHERE {filters}\n")+"GROUP BY property_key\nORDER BY count() DESC",{dateRange:{date_from:"-24h"}}),children:"Query with SQL"})]}),(0,jsx_runtime.jsxs)("div",{className:"flex mb-4 gap-2 flex-wrap",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for properties",onChange:e=>setFilters({property:e||""}),value:filters.property}),(0,jsx_runtime.jsx)(src.Yv,{options:propertyTypeOptions,value:`${filters.type}::${null!==(_filters$group_type_i=filters.group_type_index)&&void 0!==_filters$group_type_i?_filters$group_type_i:""}`,onSelect:setPropertyType})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,className:"event-properties-definition-table","data-attr":"event-properties-definition-table",loading:propertyDefinitionsLoading,rowKey:"id",pagination:{controlled:!0,currentPage:null!==(_propertyDefinitions$=propertyDefinitions?.page)&&void 0!==_propertyDefinitions$?_propertyDefinitions$:1,entryCount:null!==(_propertyDefinitions$2=propertyDefinitions?.count)&&void 0!==_propertyDefinitions$2?_propertyDefinitions$2:0,pageSize:constants.ld,onForward:propertyDefinitions.next?()=>{loadPropertyDefinitions(propertyDefinitions.next)}:void 0,onBackward:propertyDefinitions.previous?()=>{loadPropertyDefinitions(propertyDefinitions.previous)}:void 0},dataSource:propertyDefinitions.results,emptyState:"No property definitions",nouns:["property","properties"]})]})},{})},[DataManagementTab.Annotations]:{url:urls.j.annotations(),content:(0,jsx_runtime.jsx)(function(){let{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{annotations,annotationsLoading,next,loadingNext,timezone,shouldShowEmptyState}=(0,index_esm.useValues)(annotationModalLogic.bE),{loadAnnotationsNext,openModalToCreateAnnotation}=(0,index_esm.useActions)(annotationModalLogic.bE),columns=[{title:"Annotation",key:"annotation",width:"30%",render:function RenderAnnotation(_,annotation){return(0,jsx_runtime.jsx)("div",{className:"ph-no-capture font-semibold",children:(0,jsx_runtime.jsx)(src.rU,{subtle:!0,to:urls.j.annotation(annotation.id),children:annotation.content})})}},{title:`Date and time (${(0,utils.ig)(timezone)})`,dataIndex:"date_marker",render:function RenderDateMarker(_,annotation){return annotation.date_marker?.format(annotationModalLogic.yD)||""},sorter:(a,b)=>a.date_marker?.diff(b.date_marker)||1},{title:"Scope",key:"scope",render:function RenderType(_,annotation){let scopeName=annotationModalLogic.B3[annotation.scope],tooltip=annotation.scope===types.dc.Insight?`This annotation only applies to the "${annotation.insight_name}" insight`:annotation.scope===types.dc.Dashboard?`This annotation applies to all insights on the ${annotation.dashboard_name} dashboard`:annotation.scope===types.dc.Project?`This annotation applies to all insights in the ${currentTeam?.name} project`:`This annotation applies to all insights in the ${currentOrganization?.name} organization`;return(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltip,placement:"right",children:(0,jsx_runtime.jsx)(LemonTag.o,{className:"uppercase",children:annotation.scope===types.dc.Insight?(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightView(annotation.insight_short_id),className:"flex items-center",target:"_blank",targetBlankIcon:!0,children:scopeName}):scopeName})})},sorter:(a,b)=>annotationModalLogic.nO[a.scope]-annotationModalLogic.nO[b.scope]},{title:"Created\xa0by",dataIndex:"created_by",render:function Render(_,item){let{created_by,creation_type}=item;return(0,jsx_runtime.jsx)("div",{className:"flex flex-row items-center",children:(0,jsx_runtime.jsx)(ProfilePicture.Y,{user:"GIT"===creation_type?{first_name:"GitHub Actions"}:created_by,showName:!0,size:"md",type:"GIT"===creation_type?"bot":"person"})})},sorter:(a,b)=>(a.created_by?.first_name||a.created_by?.email||"").localeCompare(b.created_by?.first_name||b.created_by?.email||"")},(0,columnUtils.rw)(),{key:"actions",width:0,render:function RenderActions(_,annotation){return(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{}),size:"small",to:urls.j.annotation(annotation.id)})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("p",{children:"Annotations allow you to mark when certain changes happened so you can easily see how they impacted your metrics."}),(0,jsx_runtime.jsxs)("div",{"data-attr":"annotations-content",children:[(0,jsx_runtime.jsx)("div",{className:"mt-4",children:(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Annotations",productKey:types.Md.ANNOTATIONS,thingName:"annotation",description:"Annotations allow you to mark when certain changes happened so you can easily see how they impacted your metrics.",docsURL:"https://posthog.com/docs/data/annotations",action:()=>openModalToCreateAnnotation(),isEmpty:0===annotations.length&&!annotationsLoading,customHog:hedgehogs.MicrophoneHog})}),!shouldShowEmptyState&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonTable.g,{"data-attr":"annotations-table",rowKey:"id",dataSource:annotations,columns:columns,defaultSorting:{columnKey:"date_marker",order:-1},noSortingCancellation:!0,loading:annotationsLoading,emptyState:"No annotations yet"}),next&&(0,jsx_runtime.jsx)("div",{className:"flex justify-center mt-6",children:(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",loading:loadingNext,onClick:()=>{loadAnnotationsNext()},children:"Load more annotations"})})]})]}),(0,jsx_runtime.jsx)(AnnotationModal.h,{})]})},{}),label:"Annotations",buttons:(0,jsx_runtime.jsx)(AnnotationModal.i,{})},[DataManagementTab.History]:{url:urls.j.dataManagementHistory(),label:"History",content:(0,jsx_runtime.jsx)(ActivityLog.D,{scope:types.jc.DATA_MANAGEMENT,caption:"Only actions taken in the UI are captured in History. Automatic creation of definitions by ingestion is not shown here."})},[DataManagementTab.IngestionWarnings]:{url:urls.j.ingestionWarnings(),label:"Ingestion warnings",content:(0,jsx_runtime.jsx)(function(){let{data,dataLoading,summaryDatasets,dates}=(0,index_esm.useValues)(ingestionWarningsLogic);return(0,jsx_runtime.jsx)("div",{"data-attr":"manage-events-table",children:data.length>0||dataLoading?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"mb-4",children:"Data ingestion related warnings from past 30 days."}),(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:data,loading:dataLoading,columns:[{title:"Warning",dataIndex:"type",render:function Render(_,summary){let type=WARNING_TYPE_TO_DESCRIPTION[summary.type]||summary.type;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[type," (",(0,jsx_runtime.jsx)(Link.r,{to:`https://posthog.com/manual/data-management#${type.toLowerCase().replace(",","").split(" ").join("-")}`,children:"docs)"})]})}},{title:"Graph",render:function Render(_,summary){return(0,jsx_runtime.jsx)(Sparkline.b,{className:"h-8",labels:dates,data:summaryDatasets[summary.type]})}},{title:"Events",dataIndex:"count",align:"right",sorter:(a,b)=>a.count-b.count},{title:"Last Seen",dataIndex:"lastSeen",render:function Render(_,summary){return(0,jsx_runtime.jsx)(TZLabel.w,{time:summary.lastSeen,showSeconds:!0})},align:"right",sorter:(a,b)=>new Date(a.lastSeen)>new Date(b.lastSeen)?1:-1}],expandable:{expandedRowRender:RenderNestedWarnings},defaultSorting:{columnKey:"lastSeen",order:-1},noSortingCancellation:!0})]}):(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Ingestion warnings",thingName:"ingestion warning",productKey:types.Md.INGESTION_WARNINGS,isEmpty:!0,description:"Nice! You've had no ingestion warnings in the past 30 days. If we detect any issues with your data, we'll show them here.",docsURL:"https://posthog.com/docs/data/data-management#ingestion-warnings",customHog:hedgehogs.ReadingHog})})},{})}},dataManagementSceneLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","events","dataManagementSceneLogic"]),(0,index_esm.connect)({values:[featureFlagLogic.h,["featureFlags"]]}),(0,index_esm.actions)({setTab:tab=>({tab})}),(0,index_esm.reducers)({tab:[DataManagementTab.EventDefinitions,{setTab:(_,_ref)=>{let{tab}=_ref;return tab}}]}),(0,index_esm.selectors)({breadcrumbs:[s=>[s.tab],tab=>[{key:sceneTypes.x.DataManagement,name:"Data management",path:tabs.events.url},{key:tab,name:(0,utils.fm)(tab),path:tabs[tab].url}]],showWarningsTab:[s=>[s.featureFlags],featureFlags=>!!featureFlags[constants.y8.INGESTION_WARNINGS_ENABLED]],enabledTabs:[s=>[s.showWarningsTab],showWarningsTab=>{let allTabs=Object.keys(tabs);return allTabs.filter(x=>x!==DataManagementTab.IngestionWarnings||showWarningsTab)}]}),(0,lib.actionToUrl)(()=>({setTab:_ref2=>{let{tab}=_ref2,tabUrl=tabs[tab]?.url||tabs.events.url;if((0,lib.combineUrl)(tabUrl).pathname!==lib.router.values.location.pathname)return tabUrl}})),(0,lib.urlToAction)(_ref3=>{let{actions,values}=_ref3;return Object.fromEntries(Object.entries(tabs).map(_ref4=>{let[key,tab]=_ref4;return[tab.url,()=>{values.tab!==key&&actions.setTab(key)}]}))})]);function DataManagementScene(){let{enabledTabs,tab}=(0,index_esm.useValues)(dataManagementSceneLogic),{setTab}=(0,index_esm.useActions)(dataManagementSceneLogic),lemonTabs=enabledTabs.map(key=>({key:key,label:(0,jsx_runtime.jsx)("span",{"data-attr":`data-management-${key}-tab`,children:tabs[key].label}),content:tabs[key].content}));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(PageHeader.m,{caption:"Use data management to organize events that come into PostHog. Reduce noise, clarify usage, and help collaborators get the most value from your data.",tabbedPage:!0,buttons:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:tabs[tab].buttons})}),(0,jsx_runtime.jsx)(LemonTabs.T,{activeKey:tab,onChange:t=>setTab(t),tabs:lemonTabs})]})}let scene={component:DataManagementScene,logic:dataManagementSceneLogic}},"./frontend/src/scenes/data-management/database/DatabaseTable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>DatabaseTable});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonButton_More__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts"),scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts"),scenes_data_warehouse_viewLinkLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let nonEditableSchemaTypes=["lazy_table","virtual_table","field_traverser","expression","view","materialized_view"],editSchemaOptions={integer:"Integer",float:"Float",string:"String",datetime:"DateTime",date:"Date",boolean:"Boolean",array:"Array",json:"JSON"},editSchemaOptionsAsArray=Object.keys(editSchemaOptions).map(n=>({value:n,label:editSchemaOptions[n]})),isNonEditableSchemaType=schemaType=>"string"==typeof schemaType&&nonEditableSchemaTypes.includes(schemaType),JoinsMoreMenu=_ref=>{let{tableName,fieldName}=_ref,{currentProjectId}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_projectLogic__WEBPACK_IMPORTED_MODULE_11__.K),{toggleEditJoinModal}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_viewLinkLogic__WEBPACK_IMPORTED_MODULE_10__.t),{joins,joinsLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__.F),{loadJoins}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__.F),{loadDatabase}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__.M),join=joins.find(n=>n.source_table_name===tableName&&n.field_name===fieldName),overlay=(0,react__WEBPACK_IMPORTED_MODULE_7__.useCallback)(()=>joinsLoading||!join?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.$j,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{fullWidth:!0,onClick:()=>void toggleEditJoinModal(join),children:"Edit"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{status:"danger",fullWidth:!0,onClick:()=>{(0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_6__.S)({endpoint:`projects/${currentProjectId}/warehouse_view_link`,object:{id:join.id,name:`${join.field_name} on ${join.source_table_name}`},callback:()=>{loadDatabase(),loadJoins()}})},children:"Delete"})]}),[joinsLoading,join]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonButton_More__WEBPACK_IMPORTED_MODULE_2__.T,{overlay:overlay()})};function DatabaseTable(_ref2){var _tables$find$fields;let{table,tables,inEditSchemaMode,schemaOnChange}=_ref2,dataSource=Object.values(null!==(_tables$find$fields=tables.find(_ref3=>{let{name}=_ref3;return name===table})?.fields)&&void 0!==_tables$find$fields?_tables$find$fields:{}),{dataWarehouseTables,databaseLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__.M);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_3__.g,{dataSource:dataSource,loading:databaseLoading,disableTableWhileLoading:!1,columns:[{title:"Column",key:"key",dataIndex:"name",render:function RenderColumn(column){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:column})}},{title:"Type",key:"type",dataIndex:"type",render:function RenderType(_,_ref4){let{name,type,schema_valid}=_ref4;return inEditSchemaMode&&!isNonEditableSchemaType(type)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Yv,{options:editSchemaOptionsAsArray,value:type,onChange:newValue=>{schemaOnChange&&schemaOnChange(name,newValue)}}):"virtual_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Virtual Table"}):"lazy_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Reference"}):"field_traverser"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Expression"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:schema_valid?"default":"danger",className:"uppercase",children:type})}},{title:"Info",key:"info",dataIndex:"type",render:function RenderInfo(type,field){return"virtual_table"===type||"view"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Fields: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.fields.join(", ")})]}):"lazy_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["To table: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:String(field.table)})]}):"field_traverser"===type&&Array.isArray(field.chain)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.chain.join(".")}):"events"==table&&"json"==type&&"properties"==field.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__.r,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_12__.j.propertyDefinitions("event"),children:"Manage event properties"}):"persons"==table&&"json"==type&&"properties"==field.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__.r,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_12__.j.propertyDefinitions("person"),children:"Manage person properties"}):field.schema_valid||inEditSchemaMode?"":(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.name})," can't be parsed as a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.type}),". It will not be queryable until this is fixed."]})}},{width:0,dataIndex:"type",render:function RenderActions(_,data){if("view"===data.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(JoinsMoreMenu,{tableName:table,fieldName:data.name});if("lazy_table"===data.type&&data.table){let isJoiningTableExternalTable=!!dataWarehouseTables.find(n=>n.name===data.table),isSourceExternalTable=!!dataWarehouseTables.find(n=>n.name===table);if(isJoiningTableExternalTable||isSourceExternalTable)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(JoinsMoreMenu,{tableName:table,fieldName:data.name})}return null}}]})}},"./frontend/src/scenes/data-management/database/databaseTableListLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>databaseTableListLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),_queries_query__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/schema.ts");let databaseTableListLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-management","database","databaseTableListLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setSearchTerm:searchTerm=>({searchTerm})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({database:[null,{loadDatabase:async()=>await (0,_queries_query__WEBPACK_IMPORTED_MODULE_2__.jr)({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_3__.OH.DatabaseSchemaQuery})}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({searchTerm:["",{setSearchTerm:(_,_ref)=>{let{searchTerm}=_ref;return searchTerm}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({filteredTables:[s=>[s.database,s.searchTerm],(database,searchTerm)=>database&&database.tables?Object.values(database.tables).filter(_ref2=>{let{name}=_ref2;return name.toLowerCase().includes(searchTerm.toLowerCase())}).sort((a,b)=>a.name.localeCompare(b.name)):[]],allTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables):[]],allTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],posthogTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"posthog"===n.type):[]],posthogTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"posthog"===n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],dataWarehouseTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type):[]],dataWarehouseTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type||"view"==n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],dataWarehouseTablesMapById:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type||"view"==n.type).reduce((acc,cur)=>(acc[cur.id]=database.tables[cur.name],acc),{}):{}],views:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type):[]],viewsMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],viewsMapById:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type).reduce((acc,cur)=>(acc[cur.id]=database.tables[cur.name],acc),{}):{}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref3=>{let{actions}=_ref3;actions.loadDatabase()})])},"./frontend/src/scenes/data-management/events/DefinitionHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JH:()=>DefinitionHeader,Jf:()=>getPropertyDefinitionIcon,Kw:()=>getEventDefinitionIcon});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonTable_LemonTableLink__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function getPropertyDefinitionIcon(definition){return lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.event_properties[definition.name]?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})}):definition.verified?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Verified event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})})}function getEventDefinitionIcon(definition){return"$pageview"===definition.name||"$screen"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Pageview",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconEye,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"})}):"$pageleave"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLeave,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"})}):"$autocapture"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBolt,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"}):definition.name&&definition.verified?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Custom event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCursor,{className:"taxonomy-icon taxonomy-icon-muted"})}):definition.name&&lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLogomark,{className:"taxonomy-icon taxonomy-icon-muted"})}):null===definition.value?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"All events",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_2__.bK,{className:"taxonomy-icon taxonomy-icon-built-in"})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Custom event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCursor,{className:"taxonomy-icon taxonomy-icon-muted"})})}function DefinitionHeader(_ref){var _definition$name;let{to,definition,taxonomicGroupType}=_ref,description=definition.description||lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.NV(definition.name,taxonomicGroupType)?.description;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonTable_LemonTableLink__WEBPACK_IMPORTED_MODULE_3__.i,{to:to,description:description,title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_1__.T,{value:null!==(_definition$name=definition.name)&&void 0!==_definition$name?_definition$name:"",disablePopover:!0,disableIcon:!0,type:taxonomicGroupType}),definition.verified&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:`${lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]?"PostHog":"Verified"} event`,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBadge,{className:" text-success text-xl"})})}),!!lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBadge,{className:"text-success text-xl"})})]})})}},"./frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>EventDefinitionProperties});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_ObjectTags_ObjectTags__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/ObjectTags/ObjectTags.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts"),scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_DefinitionHeader__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/data-management/events/DefinitionHeader.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function EventDefinitionProperties(_ref){var _eventPropertiesCache,_eventPropertiesCache2,_eventPropertiesCache3;let{definition}=_ref,{loadPropertiesForEvent}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.qh),{eventPropertiesCacheMap,eventDefinitionPropertiesLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.qh),{hasTagging}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_8__.p);(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(()=>{loadPropertiesForEvent(definition)},[]);let columns=[{title:"Property",key:"property",render:function Render(_,_definition){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_DefinitionHeader__WEBPACK_IMPORTED_MODULE_10__.JH,{definition:_definition,to:scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.propertyDefinition(_definition.id),taxonomicGroupType:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_3__.t.EventProperties})}},{title:"Type",key:"type",render:function Render(_,_definition){var _definition$property_;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.oe,{type:"muted",children:null!==(_definition$property_=_definition.property_type)&&void 0!==_definition$property_?_definition$property_:"-"})}},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,_definition){var _definition$tags;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_components_ObjectTags_ObjectTags__WEBPACK_IMPORTED_MODULE_2__.D,{tags:null!==(_definition$tags=_definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[],{title:"Example",key:"example",align:"right",render:function Render(_,_definition){var _definition$example;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.oe,{className:"font-mono",type:"muted",children:null!==(_definition$example=_definition.example)&&void 0!==_definition$example?_definition$example:"-"})}}];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("h3",{children:"Top properties"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{children:"Please note that description and tags are shared across events. PostHog properties are excluded from this list."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_5__.g,{id:`event-properties-definition-table-${definition.id}`,"data-attr":"event-properties-definition-nested-table",columns:columns,dataSource:null!==(_eventPropertiesCache=eventPropertiesCacheMap?.[definition.id]?.results)&&void 0!==_eventPropertiesCache?_eventPropertiesCache:[],emptyState:"This event has no properties",nouns:["property definition","property definitions"],pagination:{controlled:!0,pageSize:lib_constants__WEBPACK_IMPORTED_MODULE_4__.N6,currentPage:null!==(_eventPropertiesCache2=eventPropertiesCacheMap?.[definition.id]?.page)&&void 0!==_eventPropertiesCache2?_eventPropertiesCache2:1,entryCount:null!==(_eventPropertiesCache3=eventPropertiesCacheMap?.[definition.id]?.count)&&void 0!==_eventPropertiesCache3?_eventPropertiesCache3:0,onForward:eventPropertiesCacheMap?.[definition.id]?.next?()=>{loadPropertiesForEvent(definition,eventPropertiesCacheMap[definition.id].next)}:void 0,onBackward:eventPropertiesCacheMap?.[definition.id]?.previous?()=>{loadPropertiesForEvent(definition,eventPropertiesCacheMap[definition.id].previous)}:void 0},loading:eventDefinitionPropertiesLoading.includes(definition.id)})]})}},"./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{oq:()=>normalizePropertyDefinitionEndpointUrl,qh:()=>eventDefinitionsTableLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_taxonomy__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");function cleanFilters(filter){return{event:"",properties:[],event_type:_types__WEBPACK_IMPORTED_MODULE_9__.uW.Event,ordering:"event",...filter}}function normalizePropertyDefinitionEndpointUrl(url){let searchParams=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},full=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return full||url?lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({...url?(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams:{},...searchParams}):null}function normalizeEventDefinitionEndpointUrl(_ref){let{url,searchParams={},full=!1,eventTypeFilter=_types__WEBPACK_IMPORTED_MODULE_9__.uW.Event}=_ref;if(!full&&!url)return null;let params={...url?{...(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams,event_type:eventTypeFilter}:{},...searchParams};return lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.eventDefinitions.determineListEndpoint(params)}let eventDefinitionsTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","data-management","events","eventDefinitionsTableLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key||"scene"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadEventDefinitions:function(){let url=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{url}},loadEventExample:definition=>({definition}),loadPropertiesForEvent:function(definition){let url=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return{definition,url}},setFilters:filters=>({filters}),setLocalEventDefinition:definition=>({definition}),setLocalPropertyDefinition:(event,definition)=>({event,definition}),setEventDefinitionPropertiesLoading:ids=>({ids})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({filters:[cleanFilters({}),{setFilters:(state,_ref2)=>{var _convertPropertyGroup;let{filters}=_ref2;return{...state,...filters,properties:null!==(_convertPropertyGroup=(0,lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_4__.Y4)(filters.properties))&&void 0!==_convertPropertyGroup?_convertPropertyGroup:[]}}}],eventDefinitionPropertiesLoading:[[],{setEventDefinitionPropertiesLoading:(_,_ref3)=>{let{ids}=_ref3;return null!=ids?ids:[]}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref4=>{let{values,cache,actions}=_ref4;return{eventDefinitions:[{count:0,next:void 0,current:void 0,previous:void 0,results:[]},{loadEventDefinitions:async(_ref5,breakpoint)=>{var _cache$apiCache,_cache$apiCache2,_combineUrl$searchPar;let{url:_url}=_ref5,url=normalizeEventDefinitionEndpointUrl({url:_url,eventTypeFilter:values.filters.event_type});if(url&&url in(null!==(_cache$apiCache=cache.apiCache)&&void 0!==_cache$apiCache?_cache$apiCache:{}))return cache.apiCache[url];url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.eventDefinitions.determineListEndpoint({event_type:values.filters.event_type})),await breakpoint(200),cache.eventsStartTime=performance.now();let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);return breakpoint(),cache.apiCache={...null!==(_cache$apiCache2=cache.apiCache)&&void 0!==_cache$apiCache2?_cache$apiCache2:{},[url]:{...response,previous:normalizeEventDefinitionEndpointUrl({url:response.previous,eventTypeFilter:values.filters.event_type}),next:normalizeEventDefinitionEndpointUrl({url:response.next,eventTypeFilter:values.filters.event_type}),current:url,page:Math.floor((null!==(_combineUrl$searchPar=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams.offset)&&void 0!==_combineUrl$searchPar?_combineUrl$searchPar:0)/lib_constants__WEBPACK_IMPORTED_MODULE_5__.H$)+1}},cache.apiCache[url]},setLocalEventDefinition:_ref6=>{var _cache$apiCache3;let{definition}=_ref6;return values.eventDefinitions.current?(cache.apiCache={...null!==(_cache$apiCache3=cache.apiCache)&&void 0!==_cache$apiCache3?_cache$apiCache3:{},[values.eventDefinitions.current]:{...values.eventDefinitions,results:values.eventDefinitions.results.map(d=>d.id===definition.id?definition:d)}},cache.apiCache[values.eventDefinitions.current]):values.eventDefinitions}}],eventPropertiesCacheMap:[{},{loadPropertiesForEvent:async(_ref7,breakpoint)=>{var _cache$apiCache4,_cache$apiCache5,_cache$apiCache7,_combineUrl$searchPar2,_await$api$get$result,_cache$apiCache6;let exampleEventProperties;let{definition,url}=_ref7;if(url&&url in(null!==(_cache$apiCache4=cache.apiCache)&&void 0!==_cache$apiCache4?_cache$apiCache4:{}))return{...values.eventPropertiesCacheMap,[definition.id]:cache.apiCache[url]};url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({event_names:[definition.name],excluded_properties:lib_taxonomy__WEBPACK_IMPORTED_MODULE_6__.t_,filter_by_event_names:!0,is_feature_flag:!1,limit:lib_constants__WEBPACK_IMPORTED_MODULE_5__.N6})),actions.setEventDefinitionPropertiesLoading(Array.from([...values.eventDefinitionPropertiesLoading,definition.id])),cache.propertiesStartTime=performance.now();let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);breakpoint();let exampleUrl=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.events.determineListEndpoint({event:definition.name},1);exampleUrl&&exampleUrl in(null!==(_cache$apiCache5=cache.apiCache)&&void 0!==_cache$apiCache5?_cache$apiCache5:{})?exampleEventProperties=cache.apiCache[exampleUrl]:(exampleEventProperties=null!==(_await$api$get$result=(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(exampleUrl))?.results?.[0].properties)&&void 0!==_await$api$get$result?_await$api$get$result:{},cache.apiCache={...null!==(_cache$apiCache6=cache.apiCache)&&void 0!==_cache$apiCache6?_cache$apiCache6:{},[exampleUrl]:exampleEventProperties});let currentUrl=`${normalizePropertyDefinitionEndpointUrl(url)}`;return cache.apiCache={...null!==(_cache$apiCache7=cache.apiCache)&&void 0!==_cache$apiCache7?_cache$apiCache7:{},[currentUrl]:{count:response.count,previous:normalizePropertyDefinitionEndpointUrl(response.previous),next:normalizePropertyDefinitionEndpointUrl(response.next),current:currentUrl,page:Math.floor((null!==(_combineUrl$searchPar2=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(currentUrl).searchParams.offset)&&void 0!==_combineUrl$searchPar2?_combineUrl$searchPar2:0)/lib_constants__WEBPACK_IMPORTED_MODULE_5__.N6)+1,results:response.results.map(prop=>({...prop,example:exampleEventProperties?.[prop.name]?.toString()}))}},actions.setEventDefinitionPropertiesLoading(values.eventDefinitionPropertiesLoading.filter(loadingId=>loadingId!=definition.id)),{...values.eventPropertiesCacheMap,[definition.id]:cache.apiCache[currentUrl]}},setLocalPropertyDefinition:_ref8=>{var _cache$apiCache8;let{event,definition}=_ref8;if(!values.eventPropertiesCacheMap?.[event.id]?.current)return values.eventPropertiesCacheMap;let eventCacheKey=values.eventPropertiesCacheMap[event.id].current;return cache.apiCache={...null!==(_cache$apiCache8=cache.apiCache)&&void 0!==_cache$apiCache8?_cache$apiCache8:{},[eventCacheKey]:{...values.eventPropertiesCacheMap[event.id],results:values.eventPropertiesCacheMap[event.id].results.map(p=>p.id===definition.id?definition:p)}},{...values.eventPropertiesCacheMap,[event.id]:cache.apiCache[eventCacheKey]}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref9=>{let{cache}=_ref9;return{apiCache:[()=>[],()=>cache.apiCache]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref10=>{let{actions,values,cache}=_ref10;return{setFilters:async()=>{actions.loadEventDefinitions(normalizeEventDefinitionEndpointUrl({url:values.eventDefinitions.current,searchParams:{search:values.filters.event,ordering:values.filters.ordering},full:!0,eventTypeFilter:values.filters.event_type}))},loadEventDefinitionsSuccess:()=>{void 0!==cache.eventsStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageLoadSucceeded(performance.now()-cache.eventsStartTime,values.eventDefinitions.results.length),cache.eventsStartTime=void 0)},loadEventDefinitionsFailure:_ref11=>{let{error}=_ref11;void 0!==cache.eventsStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageLoadFailed(performance.now()-cache.eventsStartTime,null!=error?error:"There was an unknown error fetching event definitions."),cache.eventsStartTime=void 0)},loadPropertiesForEventSuccess:()=>{void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded(performance.now()-cache.propertiesStartTime),cache.propertiesStartTime=void 0)},loadPropertiesForEventFailure:_ref12=>{let{error}=_ref12;void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed(performance.now()-cache.propertiesStartTime,null!=error?error:"There was an unknown error fetching nested property definitions."),cache.propertiesStartTime=void 0)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref13=>{let{actions,values}=_ref13;return{"/data-management/events":(_,searchParams)=>{(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.h0)(cleanFilters(values.filters),cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams))?values.eventDefinitions.results.length||values.eventDefinitionsLoading||actions.loadEventDefinitions():actions.setFilters(searchParams)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)(_ref14=>{let{values}=_ref14;return{setFilters:()=>{let nextValues=cleanFilters(values.filters),urlValues=cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams);if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.h0)(nextValues,urlValues))return[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,nextValues]}}})])},"./frontend/src/scenes/data-management/properties/propertyDefinitionsTableLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>propertyDefinitionsTableLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_groupsModel__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/models/groupsModel.ts");function cleanFilters(filter){return{property:"",type:"event",group_type_index:null,...filter}}let propertyDefinitionsTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-management","properties","propertyDefinitionsTableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key||"scene"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[_models_groupsModel__WEBPACK_IMPORTED_MODULE_9__.$,["groupTypes","aggregationLabel"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadPropertyDefinitions:function(){let url=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{url}},setFilters:filters=>({filters}),setHoveredDefinition:definitionKey=>({definitionKey}),setOpenedDefinition:id=>({id}),setLocalPropertyDefinition:definition=>({definition}),setPropertyType:propertyType=>({propertyType})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({filters:[{property:"",type:"event"},{setFilters:(state,_ref)=>{let{filters}=_ref;return{...state,...filters}}}],hoveredDefinition:[null,{setHoveredDefinition:(_,_ref2)=>{let{definitionKey}=_ref2;return definitionKey}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({propertyTypeOptions:[s=>[s.groupTypes,s.aggregationLabel],(groupTypes,aggregationLabel)=>{let groupChoices=Array.from(groupTypes.values()).map(type=>({label:`${(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.fm)(aggregationLabel(type.group_type_index).singular)} properties`,value:`group::${type.group_type_index}`}));return[{label:"Event properties",value:"event::"},{label:"Person properties",value:"person::"}].concat(groupChoices)}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{values,cache}=_ref3;return{propertyDefinitions:[{count:0,next:void 0,current:void 0,previous:void 0,results:[]},{loadPropertyDefinitions:async(_ref4,breakpoint)=>{var _cache$apiCache,_cache$apiCache2,_combineUrl$searchPar;let{url}=_ref4;if(url&&url in(null!==(_cache$apiCache=cache.apiCache)&&void 0!==_cache$apiCache?_cache$apiCache:{}))return cache.apiCache[url];url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({})),cache.propertiesStartTime=performance.now(),await breakpoint(200);let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);breakpoint();let currentUrl=`${(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(url)}`;return cache.apiCache={...null!==(_cache$apiCache2=cache.apiCache)&&void 0!==_cache$apiCache2?_cache$apiCache2:{},[currentUrl]:{...response,previous:(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(response.previous),next:(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(response.next),current:currentUrl,page:Math.floor((null!==(_combineUrl$searchPar=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams.offset)&&void 0!==_combineUrl$searchPar?_combineUrl$searchPar:0)/lib_constants__WEBPACK_IMPORTED_MODULE_4__.ld)+1}},cache.apiCache[url]},setLocalPropertyDefinition:_ref5=>{var _cache$apiCache3;let{definition}=_ref5;return values.propertyDefinitions.current?(cache.apiCache={...null!==(_cache$apiCache3=cache.apiCache)&&void 0!==_cache$apiCache3?_cache$apiCache3:{},[values.propertyDefinitions.current]:{...values.propertyDefinitions,results:values.propertyDefinitions.results.map(d=>d.id===definition.id?definition:d)}},cache.apiCache[values.propertyDefinitions.current]):values.propertyDefinitions}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref6=>{let{actions,values,cache}=_ref6;return{setFilters:async(_,breakpoint)=>{await breakpoint(500),actions.loadPropertyDefinitions((0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(values.propertyDefinitions.current,{offset:0,search:values.filters.property,type:values.filters.type,group_type_index:values.filters.group_type_index},!0))},loadPropertyDefinitionsSuccess:()=>{void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__.vx.findMounted()?.actions.reportDataManagementEventPropertyDefinitionsPageLoadSucceeded(performance.now()-cache.propertiesStartTime,values.propertyDefinitions.results.length),cache.propertiesStartTime=void 0)},loadPropertyDefinitionsFailure:_ref7=>{let{error}=_ref7;void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__.vx.findMounted()?.actions.reportDataManagementEventPropertyDefinitionsPageLoadFailed(performance.now()-cache.propertiesStartTime,null!=error?error:"There was an unknown error fetching property definitions."),cache.propertiesStartTime=void 0)},setPropertyType:_ref8=>{let{propertyType}=_ref8,[type,index]=propertyType.split("::");actions.setFilters({type:type,group_type_index:index?+index:null})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref9=>{let{actions,values}=_ref9;return{[scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.propertyDefinitions()]:(_,searchParams)=>{!values.propertyDefinitionsLoading&&((0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.h0)(cleanFilters(values.filters),cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams))?values.propertyDefinitions.results.length||actions.loadPropertyDefinitions():actions.setFilters(searchParams))}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)(_ref10=>{let{values}=_ref10;return{setFilters:()=>{let nextValues=cleanFilters(values.filters),urlValues=cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams);if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.h0)(nextValues,urlValues))return[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,function(filter){return{property:""!==filter.property?filter.property:void 0,type:"event"!==filter.type?filter.type:void 0,group_type_index:null!==filter.group_type_index?filter.group_type_index:void 0}}(nextValues)]}}})])},"./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{YS:()=>ViewLinkKeyLabel,WI:()=>ViewLinkModal_ViewLinkModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ViewLinkModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-warehouse/ViewLinkModal.scss"),ViewLinkModal_default=__webpack_require__.n(ViewLinkModal),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ViewLinkModal_default(),options),ViewLinkModal_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),CodeSnippet=__webpack_require__("./frontend/src/lib/components/CodeSnippet/index.ts"),HogQLDropdown=__webpack_require__("./frontend/src/lib/components/HogQLDropdown/HogQLDropdown.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ViewLinkModal_ViewLinkModal(){let{isJoinTableModalOpen}=(0,index_esm.useValues)(viewLinkLogic.t),{toggleJoinTableModal}=(0,index_esm.useActions)(viewLinkLogic.t);return(0,jsx_runtime.jsx)(src.fQ,{title:"Join tables",description:(0,jsx_runtime.jsxs)("span",{children:["Define a join between two tables or views. ",(0,jsx_runtime.jsx)("b",{children:"All"})," fields from the joined table or view will be accessible in queries at the top level without needing to explicitly join the view."]}),isOpen:isJoinTableModalOpen,onClose:toggleJoinTableModal,width:700,children:(0,jsx_runtime.jsx)(ViewLinkForm,{})})}function ViewLinkForm(){let{tableOptions,selectedJoiningTableName,selectedSourceTableName,sourceTableKeys,joiningTableKeys,sqlCodeSnippet,error,fieldName,isNewJoin,selectedSourceKey,selectedJoiningKey,sourceIsUsingHogQLExpression,joiningIsUsingHogQLExpression,isViewLinkSubmitting,experimentsOptimized,experimentsTimestampKey}=(0,index_esm.useValues)(viewLinkLogic.t),{selectJoiningTable,toggleJoinTableModal,selectSourceTable,setFieldName,selectSourceKey,selectJoiningKey,setExperimentsOptimized,selectExperimentsTimestampKey}=(0,index_esm.useActions)(viewLinkLogic.t),[advancedSettingsExpanded,setAdvancedSettingsExpanded]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)(lib.Form,{logic:viewLinkLogic.t,formKey:"viewLink",enableFormOnSubmit:!0,children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full justify-between items-center",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row w-full justify-between",children:[(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Table"}),(0,jsx_runtime.jsx)("div",{className:"text-wrap break-all",children:isNewJoin?(0,jsx_runtime.jsx)(lib.Field,{name:"source_table_name",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,options:tableOptions,onSelect:selectSourceTable,placeholder:"Select a table"})}):null!=selectedSourceTableName?selectedSourceTableName:""})]}),(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Joining Table"}),(0,jsx_runtime.jsx)(lib.Field,{name:"joining_table_name",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,options:tableOptions,onSelect:selectJoiningTable,placeholder:"Select a table"})})]})]}),(0,jsx_runtime.jsxs)("div",{className:"mt-4 flex flex-row justify-between items-center w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Table Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"source_table_key",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectSourceKey,value:sourceIsUsingHogQLExpression?"":null!=selectedSourceKey?selectedSourceKey:void 0,disabledReason:selectedSourceTableName?"":"Select a table to choose join key",options:[...sourceTableKeys,{value:"",label:(0,jsx_runtime.jsx)("span",{children:"HogQL Expression"})}],placeholder:"Select a key"}),sourceIsUsingHogQLExpression&&(0,jsx_runtime.jsx)(HogQLDropdown.I,{className:"mt-2",hogQLValue:null!=selectedSourceKey?selectedSourceKey:"",onHogQLValueChange:selectSourceKey,tableName:null!=selectedSourceTableName?selectedSourceTableName:""})]})})]}),(0,jsx_runtime.jsx)("div",{className:"mt-5",children:(0,jsx_runtime.jsx)(icons._S,{})}),(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Joining Table Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"joining_table_key",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectJoiningKey,value:joiningIsUsingHogQLExpression?"":null!=selectedJoiningKey?selectedJoiningKey:void 0,disabledReason:selectedJoiningTableName?"":"Select a table to choose join key",options:[...joiningTableKeys,{value:"",label:(0,jsx_runtime.jsx)("span",{children:"HogQL Expression"})}],placeholder:"Select a key"}),joiningIsUsingHogQLExpression&&(0,jsx_runtime.jsx)(HogQLDropdown.I,{className:"mt-2",hogQLValue:null!=selectedJoiningKey?selectedJoiningKey:"",onHogQLValueChange:selectJoiningKey,tableName:null!=selectedJoiningTableName?selectedJoiningTableName:""})]})})]})]}),"events"===selectedJoiningTableName&&(0,jsx_runtime.jsxs)("div",{className:"w-full mt-2",children:[(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsxs)("div",{className:"mt-4 flex flex-row justify-between w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"mr-4",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Optimize for Experiments"}),(0,jsx_runtime.jsx)(lib.Field,{name:"experiments_optimized",children:(0,jsx_runtime.jsx)(src.Hw,{className:"mt-2",checked:experimentsOptimized,onChange:checked=>setExperimentsOptimized(checked),fullWidth:!0,label:"Limit join to most recent matching event based on\xa0timestamp"})})]}),(0,jsx_runtime.jsxs)("div",{className:"w-60 shrink-0",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Timestamp Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"experiments_timestamp_key",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectExperimentsTimestampKey,value:null!=experimentsTimestampKey?experimentsTimestampKey:void 0,options:sourceTableKeys,placeholder:"Select a key"})})]})]})]}),sqlCodeSnippet&&(0,jsx_runtime.jsxs)("div",{className:"w-full mt-2",children:[(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,onClick:()=>setAdvancedSettingsExpanded(!advancedSettingsExpanded),sideIcon:advancedSettingsExpanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h3",{className:"l4 mt-2",children:"Advanced settings"}),(0,jsx_runtime.jsx)("div",{className:"text-muted mb-2 font-medium",children:"Customize how the fields are accessed"})]})})]}),sqlCodeSnippet&&advancedSettingsExpanded&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"mt-3 flex flex-row justify-between items-center w-full",children:(0,jsx_runtime.jsxs)("div",{className:"w-full",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Field Name"}),(0,jsx_runtime.jsx)(lib.Field,{name:"field_name",hint:`Pick a field name to access ${selectedJoiningTableName} from ${selectedSourceTableName}`,children:(0,jsx_runtime.jsx)(src.DF,{value:fieldName,onChange:fieldName=>setFieldName(fieldName),placeholder:"Field name"})})]})}),(0,jsx_runtime.jsx)("div",{className:"mt-4 flex w-full",children:(0,jsx_runtime.jsx)(CodeSnippet.O,{className:"w-full",language:CodeSnippet.S.SQL,children:sqlCodeSnippet})})]}),error&&(0,jsx_runtime.jsx)("div",{className:"flex w-full",children:(0,jsx_runtime.jsx)("div",{className:"text-danger flex text-sm overflow-auto",children:(0,jsx_runtime.jsx)("span",{children:error})})})]}),(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-end w-full",children:[(0,jsx_runtime.jsx)(src.Jp,{className:"mr-3",type:"secondary",onClick:toggleJoinTableModal,children:"Close"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",htmlType:"submit",loading:isViewLinkSubmitting,children:"Save"})]})]})}function ViewLinkKeyLabel(_ref){let{column}=_ref;return(0,jsx_runtime.jsxs)("span",{children:[column.name," ",(0,jsx_runtime.jsx)(src.oe,{type:"success",className:"uppercase",children:column.type})]})}},"./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>editorSceneLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let editorSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","editor","editorSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setSidebarOverlayOpen:isOpen=>({isOpen}),selectSchema:schema=>({schema})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({sidebarOverlayOpen:[!1,{setSidebarOverlayOpen:(_,_ref)=>{let{isOpen}=_ref;return isOpen},selectSchema:(_,_ref2)=>{let{schema}=_ref2;return null!==schema}}],selectedSchema:[null,{selectSchema:(_,_ref3)=>{let{schema}=_ref3;return schema}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({sidebarOverlayTreeItems:[s=>[s.selectedSchema],selectedSchema=>null===selectedSchema?[]:"fields"in selectedSchema?Object.values(selectedSchema.fields).map(field=>({name:field.name,type:field.type})):"columns"in selectedSchema?Object.values(selectedSchema.columns).map(column=>({name:column.name,type:column.type})):[]]})])},"./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cc:()=>dataNodeKey,tg:()=>multitabEditorLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/monaco/codeEditorLogic.tsx"),scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/InsightViz.tsx"),_queries_query__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/schema.ts"),_external_dataWarehouseExternalSceneLogic__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseExternalSceneLogic.ts"),_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dataNodeKey=(0,_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_10__.gG)({dashboardItemId:_external_dataWarehouseExternalSceneLogic__WEBPACK_IMPORTED_MODULE_13__.H,cachedInsight:null,doNotLoad:!0}),editorModelsStateKey=key=>`${key}/editorModelQueries`,activeModelStateKey=key=>`${key}/activeModelUri`,activeModelVariablesStateKey=key=>`${key}/activeModelVariables`,multitabEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["data-warehouse","editor","multitabEditorLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({actions:[_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__.$,["loadDataWarehouseSavedQueriesSuccess","deleteDataWarehouseSavedQuerySuccess","createDataWarehouseSavedQuerySuccess","runDataWarehouseSavedQuery"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setQueryInput:queryInput=>({queryInput}),updateState:!0,runQuery:(queryOverride,switchTab)=>({queryOverride,switchTab}),setActiveQuery:query=>({query}),setTabs:tabs=>({tabs}),addTab:tab=>({tab}),createTab:(query,view)=>({query,view}),deleteTab:tab=>({tab}),removeTab:tab=>({tab}),selectTab:tab=>({tab}),setLocalState:(key,value)=>({key,value}),initialize:!0,saveAsView:!0,saveAsViewSubmit:name=>({name}),saveAsInsight:!0,saveAsInsightSubmit:name=>({name}),setCacheLoading:loading=>({loading}),setError:error=>({error}),setIsValidView:isValidView=>({isValidView}),setSourceQuery:sourceQuery=>({sourceQuery}),setMetadata:metadata=>({metadata}),editView:(query,view)=>({query,view})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;!oldProps.monaco&&!oldProps.editor&&props.monaco&&props.editor&&actions.initialize()}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)(_ref2=>{let{props}=_ref2;return{cacheLoading:[!0,{setCacheLoading:(_,_ref3)=>{let{loading}=_ref3;return loading}}],sourceQuery:[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.DataVisualizationNode,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.HogQLQuery,query:""}},{setSourceQuery:(_,_ref4)=>{let{sourceQuery}=_ref4;return sourceQuery}}],queryInput:["",{setQueryInput:(_,_ref5)=>{let{queryInput}=_ref5;return queryInput}}],activeQuery:[null,{setActiveQuery:(_,_ref6)=>{let{query}=_ref6;return query}}],activeModelUri:[null,{selectTab:(_,_ref7)=>{let{tab}=_ref7;return tab}}],editingView:[null,{selectTab:(_,_ref8)=>{var _tab$view;let{tab}=_ref8;return null!==(_tab$view=tab.view)&&void 0!==_tab$view?_tab$view:null}}],allTabs:[[],{addTab:(state,_ref9)=>{let{tab}=_ref9,newTabs=[...state,tab];return newTabs},removeTab:(state,_ref10)=>{let{tab:tabToRemove}=_ref10,newModels=state.filter(tab=>tab.uri.toString()!==tabToRemove.uri.toString());return newModels},setTabs:(_,_ref11)=>{let{tabs}=_ref11;return tabs}}],error:[null,{setError:(_,_ref12)=>{let{error}=_ref12;return error}}],isValidView:[!1,{setIsValidView:(_,_ref13)=>{let{isValidView}=_ref13;return isValidView}}],metadata:[null,{setMetadata:(_,_ref14)=>{let{metadata}=_ref14;return metadata}}],editorKey:[props.key]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref15=>{let{values,props,actions,asyncActions}=_ref15;return{editView:_ref16=>{let{query,view}=_ref16,maybeExistingTab=values.allTabs.find(tab=>tab.view?.id===view.id);maybeExistingTab?actions.selectTab(maybeExistingTab):actions.createTab(query,view)},createTab:_ref17=>{let{query="",view}=_ref17,mountedCodeEditorLogic=lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc.findMounted(),currentModelCount=1,allNumbers=values.allTabs.map(tab=>parseInt(tab.uri.path.split("/").pop()||"0"));for(;allNumbers.includes(currentModelCount);)currentModelCount++;if(props.monaco){let uri=props.monaco.Uri.parse(currentModelCount.toString()),model=props.monaco.editor.createModel(query,"hogQL",uri);props.editor?.setModel(model),mountedCodeEditorLogic&&(0,lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__.Z)(model,mountedCodeEditorLogic),actions.addTab({uri,view}),actions.selectTab({uri,view});let queries=values.allTabs.map(tab=>({query:props.monaco?.editor.getModel(tab.uri)?.getValue()||"",path:tab.uri.path.split("/").pop(),view:uri.path===tab.uri.path?view:tab.view}));actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},selectTab:_ref18=>{let{tab}=_ref18;if(props.monaco){let model=props.monaco.editor.getModel(tab.uri);props.editor?.setModel(model)}let path=tab.uri.path.split("/").pop();path&&actions.setLocalState(activeModelStateKey(props.key),path)},deleteTab:_ref19=>{let{tab:tabToRemove}=_ref19;if(props.monaco){let model=props.monaco.editor.getModel(tabToRemove.uri);if(tabToRemove.uri.toString()===values.activeModelUri?.uri.toString()){let indexOfModel=values.allTabs.findIndex(tab=>tab.uri.toString()===tabToRemove.uri.toString()),nextModel=values.allTabs[indexOfModel+1]||values.allTabs[indexOfModel-1]||values.allTabs[0];actions.selectTab(nextModel)}model?.dispose(),actions.removeTab(tabToRemove);let queries=values.allTabs.map(tab=>({query:props.monaco?.editor.getModel(tab.uri)?.getValue()||"",path:tab.uri.path.split("/").pop(),view:tab.view}));actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},setLocalState:_ref20=>{let{key,value}=_ref20;localStorage.setItem(key,value)},initialize:()=>{var _values$sourceQuery$s;let allModelQueries=localStorage.getItem(editorModelsStateKey(props.key)),activeModelUri=localStorage.getItem(activeModelStateKey(props.key)),activeModelVariablesString=localStorage.getItem(activeModelVariablesStateKey(props.key)),activeModelVariables=activeModelVariablesString&&"undefined"!=activeModelVariablesString?JSON.parse(activeModelVariablesString):{},mountedCodeEditorLogic=lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc.findMounted()||(0,lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc)({key:props.key,query:null!==(_values$sourceQuery$s=values.sourceQuery?.source.query)&&void 0!==_values$sourceQuery$s?_values$sourceQuery$s:"",language:"hogQL"});if(allModelQueries){props.monaco?.editor.getModels().forEach(model=>{model.dispose()});let models=JSON.parse(allModelQueries||"[]"),newModels=[];if(models.forEach(model=>{if(props.monaco){let uri=props.monaco.Uri.parse(model.path),newModel=props.monaco.editor.createModel(model.query,"hogQL",uri);props.editor?.setModel(newModel),newModels.push({uri,view:model.view}),mountedCodeEditorLogic&&(0,lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__.Z)(newModel,mountedCodeEditorLogic)}}),actions.setTabs(newModels),activeModelUri){let uri=props.monaco?.Uri.parse(activeModelUri),activeModel=props.monaco?.editor.getModels().find(model=>model.uri.path===uri?.path);activeModel&&props.editor?.setModel(activeModel);let val=activeModel?.getValue();val&&(actions.setSourceQuery({...values.sourceQuery,source:{...values.sourceQuery.source,variables:activeModelVariables}}),actions.setQueryInput(val),actions.runQuery());let activeView=newModels.find(tab=>tab.uri.path.split("/").pop()===activeModelUri)?.view;uri&&actions.selectTab({uri,view:activeView})}else newModels.length&&actions.selectTab({uri:newModels[0].uri})}else{let model=props.editor?.getModel();model&&actions.createTab()}actions.setCacheLoading(!1)},setQueryInput:()=>{actions.updateState()},updateState:async(_,breakpoint)=>{await breakpoint(100);let queries=values.allTabs.map(model=>({query:props.monaco?.editor.getModel(model.uri)?.getValue()||"",path:model.uri.path.split("/").pop(),view:model.view}));localStorage.setItem(editorModelsStateKey(props.key),JSON.stringify(queries))},setSourceQuery:_ref21=>{let{sourceQuery}=_ref21;localStorage.setItem(activeModelVariablesStateKey(props.key),JSON.stringify(sourceQuery.source.variables))},runQuery:_ref22=>{let{queryOverride,switchTab}=_ref22,query=queryOverride||values.queryInput;actions.setSourceQuery({...values.sourceQuery,source:{...values.sourceQuery.source,query}}),(0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__.M)({key:dataNodeKey,query:{...values.sourceQuery.source,query},autoLoad:!1}).actions.loadData(!switchTab)},saveAsView:async()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Save as view",initialValues:{viewName:""},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"viewName",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{placeholder:"Please enter the name of the view",autoFocus:!0})}),errors:{viewName:name=>name?void 0:"You must enter a name"},onSubmit:async _ref23=>{let{viewName}=_ref23;await asyncActions.saveAsViewSubmit(viewName)},shouldAwaitSubmit:!0})},saveAsViewSubmit:async _ref24=>{var _logic$values$respons;let{name}=_ref24,query=values.sourceQuery.source,logic=(0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__.M)({key:dataNodeKey,query}),types=null!==(_logic$values$respons=logic.values.response?.types)&&void 0!==_logic$values$respons?_logic$values$respons:[];await _saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__.$.asyncActions.createDataWarehouseSavedQuery({name,query,types})},saveAsInsight:async()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Save as new insight",initialValues:{name:""},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"name",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{"data-attr":"insight-name",placeholder:"Please enter the new name",autoFocus:!0})}),errors:{name:name=>name?void 0:"You must enter a name"},onSubmit:async _ref25=>{let{name}=_ref25;return actions.saveAsInsightSubmit(name)}})},saveAsInsightSubmit:async _ref26=>{let{name}=_ref26,insight=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_7__.L.create({name,query:values.sourceQuery,saved:!0});_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.info(`You're now viewing ${insight.name||insight.derived_name||name}`),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.insightView(insight.short_id))},loadDataWarehouseSavedQueriesSuccess:_ref27=>{let{dataWarehouseSavedQueries}=_ref27,newTabs=values.allTabs.map(tab=>({...tab,view:dataWarehouseSavedQueries.find(v=>v.id===tab.view?.id)}));actions.setTabs(newTabs),actions.updateState()},deleteDataWarehouseSavedQuerySuccess:_ref28=>{let{payload:viewId}=_ref28,tabToRemove=values.allTabs.find(tab=>tab.view?.id===viewId);tabToRemove&&actions.deleteTab(tabToRemove),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View deleted")},createDataWarehouseSavedQuerySuccess:_ref29=>{let{dataWarehouseSavedQueries,payload:view}=_ref29,newView=view&&dataWarehouseSavedQueries.find(v=>v.name===view.name);if(newView){let newTabs=values.allTabs.map(tab=>({...tab,view:tab.uri.path===values.activeModelUri?.uri.path?newView:tab.view})),newTab=newTabs.find(tab=>tab.uri.path===values.activeModelUri?.uri.path);actions.setTabs(newTabs),newTab&&actions.selectTab(newTab),actions.updateState()}},updateDataWarehouseSavedQuerySuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View updated")}}}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_3__.Vt)(_ref30=>{let{props,actions,values}=_ref30;return{activeModelUri:activeModelUri=>{if(props.monaco){let _model=props.monaco.editor.getModel(activeModelUri.uri),val=_model?.getValue();actions.setQueryInput(null!=val?val:""),actions.runQuery(void 0,!0)}},allTabs:()=>{let activeTab=values.allTabs.find(tab=>tab.uri.path===values.activeModelUri?.uri.path);activeTab&&actions.selectTab(activeTab)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({exportContext:[s=>[s.sourceQuery],sourceQuery=>({...(0,_queries_query__WEBPACK_IMPORTED_MODULE_11__.Vp)(sourceQuery.source,void 0,void 0),filename:"export"})],isEditingMaterializedView:[s=>[s.editingView],editingView=>!!editingView?.status]})])},"./frontend/src/scenes/data-warehouse/external/DataWarehouseTables.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>DataWarehouseTables,f:()=>DatabaseTableTreeWithItems});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),DatabaseTableTree=__webpack_require__("./frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),insightDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Query=__webpack_require__("./frontend/src/queries/Query/Query.tsx"),sourceWizardLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),dataWarehouseSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),ViewLinkModal=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),kea_forms_lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),DatabaseTable=__webpack_require__("./frontend/src/scenes/data-management/database/DatabaseTable.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function TableData(){let{selectedRow:table,isEditingSavedQuery,inEditSchemaMode,editSchemaIsLoading}=(0,index_esm.useValues)(dataWarehouseSceneLogic.M),{setIsEditingSavedQuery,toggleEditSchemaMode,updateSelectedSchema,saveSchema,cancelEditSchema}=(0,index_esm.useActions)(dataWarehouseSceneLogic.M),isExternalTable=table?.type==="data_warehouse",isManuallyLinkedTable=isExternalTable&&!table.source;return(0,jsx_runtime.jsx)("div",{className:"border rounded p-3 bg-bg-light",children:table?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-between items-center gap-2",children:[(0,jsx_runtime.jsxs)("h2",{className:"flex-1 text-wrap break-all leading-4",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})," ",table.name]}),isEditingSavedQuery&&(0,jsx_runtime.jsx)("div",{className:"flex flex-row gap-2 justify-between",children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setIsEditingSavedQuery(!1),children:"Cancel"})}),inEditSchemaMode&&(0,jsx_runtime.jsxs)("div",{className:"flex flex-row gap-2 justify-between",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"primary",loading:editSchemaIsLoading,onClick:()=>{saveSchema()},children:"Save schema"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",disabledReason:editSchemaIsLoading&&"Schema is saving...",onClick:()=>{cancelEditSchema()},children:"Cancel edit"})]}),!inEditSchemaMode&&!isEditingSavedQuery&&(0,jsx_runtime.jsx)("div",{className:"flex flex-row gap-2 justify-between",children:isManuallyLinkedTable&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>{toggleEditSchemaMode()},children:"Edit schema"})})]}),"data_warehouse"==table.type&&(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[table.source&&table.schema&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"Last Synced At"}),(0,jsx_runtime.jsx)("span",{children:table.schema.last_synced_at?(0,utils.bo)(table.schema.last_synced_at,"MMMM DD, YYYY","h:mm A"):"Not yet synced"})]}),!table.source&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"Files URL pattern"}),(0,jsx_runtime.jsx)("span",{className:"break-all",children:table.url_pattern}),(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"File format"}),(0,jsx_runtime.jsx)("span",{children:table.format})]})]}),!isEditingSavedQuery&&(0,jsx_runtime.jsxs)("div",{className:"mt-2",children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary",children:"Columns"}),(0,jsx_runtime.jsx)(DatabaseTable.B,{table:table.name,tables:[table],inEditSchemaMode:inEditSchemaMode,schemaOnChange:(key,type)=>updateSelectedSchema(key,type)})]})]}):(0,jsx_runtime.jsx)("div",{className:"px-4 py-3 h-100 col-span-2 flex justify-center items-center"})})}function DeleteTableModal(_ref){let subject,{table,isOpen,setIsOpen,onDelete}=_ref;return subject="view"===table.type?"view":"table",(0,jsx_runtime.jsx)(src.fQ,{title:`Delete ${subject}?`,onClose:()=>setIsOpen(!1),footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setIsOpen(!1),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"danger",onClick:()=>onDelete(),children:`Delete ${table.name}`})]}),isOpen:isOpen,children:(0,jsx_runtime.jsxs)("p",{children:[(0,kea_forms_lib.capitalizeFirstLetter)(subject)," deletion ",(0,jsx_runtime.jsx)("b",{children:"cannot be undone"}),". All"," ","view"===table.type?"joins":"views and joins"," related to this ",subject," will be deleted"]})})}let DataWarehouseTables=_ref=>{let{insightProps}=_ref,{query}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightProps)),{setQuery:setInsightQuery}=(0,index_esm.useActions)((0,insightDataLogic.S)(insightProps));return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:insightLogic.zm,props:insightProps,children:(0,jsx_runtime.jsx)("div",{className:"Insight",children:(0,jsx_runtime.jsx)(Query.A,{query:query,setQuery:setInsightQuery,readOnly:!1,context:{showOpenEditorButton:!1,showQueryEditor:!1,showQueryHelp:!1,insightProps}})})})})},DatabaseTableTreeWithItems=_ref2=>{let{inline,collapsible=!0}=_ref2,{dataWarehouseTablesBySourceType,posthogTables,databaseLoading,nonMaterializedViews,materializedViews,views,selectedRow,schemaModalIsOpen,dataWarehouseSavedQueriesLoading}=(0,index_esm.useValues)(dataWarehouseSceneLogic.M),{selectRow,deleteDataWarehouseSavedQuery,deleteDataWarehouseTable,toggleSchemaModal}=(0,index_esm.useActions)(dataWarehouseSceneLogic.M),[collapsed,setCollapsed]=(0,react.useState)(!1),{toggleJoinTableModal,selectSourceTable}=(0,index_esm.useActions)(viewLinkLogic.t),[isDeleteModalOpen,setIsDeleteModalOpen]=(0,react.useState)(!1),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),deleteButton=table=>table&&("view"===table.type||"materialized_view"===table.type)?(0,jsx_runtime.jsx)(src.Jp,{"data-attr":"schema-list-item-delete",status:"danger",onClick:()=>{selectRow(table),setIsDeleteModalOpen(!0)},fullWidth:!0,children:"Delete"}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),dropdownOverlay=table=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{(0,copyToClipboard.v)(table.name,table.name)},fullWidth:!0,"data-attr":"schema-list-item-copy",children:"Copy table name"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{selectRow(table),toggleSchemaModal()},"data-attr":"schema-list-item-schema",fullWidth:!0,children:"View table schema"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{selectSourceTable(table.name),toggleJoinTableModal()},"data-attr":"schema-list-item-join",fullWidth:!0,children:"Add join"}),("view"==table.type||"materialized_view"==table.type)&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{lib.router.actions.push(urls.j.dataWarehouseView(table.id))},"data-attr":"schema-list-item-edit",fullWidth:!0,children:"Edit view definition"}),featureFlags[constants.y8.DATA_MODELING]&&"view"===table.type&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{runDataWarehouseSavedQuery(table.id)},"data-attr":"schema-list-item-materialize",fullWidth:!0,children:"Materialize"}),featureFlags[constants.y8.DATA_MODELING]&&"materialized_view"===table.type&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{runDataWarehouseSavedQuery(table.id)},"data-attr":"schema-list-item-run",fullWidth:!0,children:"Run"}),deleteButton(table)]}),treeItems=()=>{if(inline){let items=[{name:"External",items:Object.keys(dataWarehouseTablesBySourceType).map(source_type=>{var _SOURCE_DETAILS$label;return{name:null!==(_SOURCE_DETAILS$label=sourceWizardLogic.l2[source_type]?.label)&&void 0!==_SOURCE_DETAILS$label?_SOURCE_DETAILS$label:source_type,items:dataWarehouseTablesBySourceType[source_type].map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))}))}}),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No tables found"}),isLoading:databaseLoading},{name:"PostHog",items:posthogTables.map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),isLoading:databaseLoading},{name:"Views",items:(featureFlags[constants.y8.DATA_MODELING]?nonMaterializedViews:views).map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading},...featureFlags[constants.y8.DATA_MODELING]?[{name:"Materialized views",items:materializedViews.map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No materialized views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading}]:[]];return items}let items=[{name:"External",items:Object.keys(dataWarehouseTablesBySourceType).map(source_type=>({name:source_type,items:dataWarehouseTablesBySourceType[source_type].map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No tables found"}),isLoading:databaseLoading},{name:"PostHog",items:posthogTables.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})})),isLoading:databaseLoading},{name:"Views",items:nonMaterializedViews.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconBrackets,{})})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading},...featureFlags[constants.y8.DATA_MODELING]?[{name:"Materialized views",items:materializedViews.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconBrackets,{})})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No materialized views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading}]:[]];return items};return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.clsx)("bg-bg-light rounded space-y-px border p-2 overflow-y-auto",collapsed?"":"min-w-80 flex-1"),children:[collapsed?(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),onClick:()=>setCollapsed(!1)}):collapsible?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{size:"xsmall",onClick:()=>setCollapsed(!0),fullWidth:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),className:"font-normal",children:(0,jsx_runtime.jsx)("span",{className:"uppercase text-muted-alt tracking-wider",children:"Sources"})}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{onSelectRow:selectRow,items:treeItems(),selectedRow:selectedRow})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"text-muted-alt tracking-wider font-normal",children:"Sources"}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{onSelectRow:selectRow,items:treeItems(),selectedRow:selectedRow})]}),(0,jsx_runtime.jsx)(src.fQ,{width:"50rem",isOpen:!!selectedRow&&schemaModalIsOpen,onClose:()=>{selectRow(null),toggleSchemaModal()},title:"Table Schema",children:(0,jsx_runtime.jsx)(TableData,{})}),(0,jsx_runtime.jsx)(ViewLinkModal.WI,{}),selectedRow&&(0,jsx_runtime.jsx)(DeleteTableModal,{table:selectedRow,isOpen:isDeleteModalOpen,setIsOpen:setIsDeleteModalOpen,onDelete:()=>{selectedRow&&("view"===selectedRow.type||"materialized_view"===selectedRow.type?deleteDataWarehouseSavedQuery(selectedRow.id):deleteDataWarehouseTable(selectedRow.id))}})]})}},"./frontend/src/scenes/data-warehouse/external/dataWarehouseExternalSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>DATAWAREHOUSE_EDITOR_ITEM_ID,r:()=>dataWarehouseExternalSceneLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/insights/insightSceneLogic.tsx"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/schema.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");let DATAWAREHOUSE_EDITOR_ITEM_ID="new-SQL",dataWarehouseExternalSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(()=>["scenes","data-warehouse","external","dataWarehouseExternalSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A,["viewsMapById","database","databaseLoading"]],actions:[scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T,["setSceneState"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A,["loadDatabase","loadDatabaseSuccess"]],logic:[(0,scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S)({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({loadView:id=>({id}),setViewLoading:viewLoading=>({viewLoading})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)(()=>({breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_6__.x.DataWarehouse,name:"Explore",path:scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse()}]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({viewLoading:[!1,{loadView:()=>!0,setViewLoading:(_,_ref)=>{let{viewLoading}=_ref;return viewLoading}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{values,actions}=_ref2;return{loadDatabaseSuccess:()=>{kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname.includes("/data-warehouse/view")&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname)},loadView:async _ref3=>{let{id}=_ref3;id&&id in values.viewsMapById?scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S.findMounted({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})?.actions.setQuery({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_8__.OH.DataVisualizationNode,source:values.viewsMapById[id].query}):(await scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A.asyncActions.loadDatabase(),id&&id in values.viewsMapById?scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S.findMounted({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})?.actions.setQuery({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_8__.OH.DataVisualizationNode,source:values.viewsMapById[id].query}):(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Error retrieving view"),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse()))),actions.setViewLoading(!1)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref4=>{let{actions}=_ref4;return{"/data-warehouse":()=>{scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T.actions.setSceneState(String("new-dataWarehouse"),_types__WEBPACK_IMPORTED_MODULE_9__.LO.Edit,void 0,void 0,void 0,void 0,void 0,void 0)},"/data-warehouse/view/:id":_ref5=>{let{id}=_ref5;scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T.actions.setSceneState(String("new-dataWarehouse"),_types__WEBPACK_IMPORTED_MODULE_9__.LO.Edit,void 0,void 0,void 0,void 0,void 0,void 0),id&&actions.loadView(id)}}})])},"./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>dataWarehouseJoinsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");let dataWarehouseJoinsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","external","dataWarehouseJoinsLogic"]),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({joins:[[],{loadJoins:async()=>{let joins=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dataWarehouseViewLinks.list();return joins.results}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["allTablesMap"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({personTableJoins:[s=>[s.joins],joins=>joins.filter(join=>"persons"===join.source_table_name)],tablesJoinedToPersons:[s=>[s.allTablesMap,s.personTableJoins],(allTablesMap,personTableJoins)=>personTableJoins.map(join=>{let table=allTablesMap[join.joining_table_name];return{table,join}})],columnsJoinedToPersons:[s=>[s.tablesJoinedToPersons],tablesJoinedToPersons=>tablesJoinedToPersons.reduce((acc,_ref)=>{let{table,join}=_ref;return table&&acc.push(...Object.values(table.fields).map(column=>({id:`${join.field_name}.${column.name}`,name:`${join.field_name}: ${column.name}`,table:join.field_name,property_type:(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.fm)(column.type)}))),acc},[])]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;actions.loadJoins()})])},"./frontend/src/scenes/data-warehouse/new/dataWarehouseTableLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>dataWarehouseTableLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NEW_WAREHOUSE_TABLE={id:"",name:"",url_pattern:"",format:"Parquet",credential:{access_key:"",access_secret:""}},dataWarehouseTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","data-warehouse","tableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({editingTable:editing=>({editing}),updateTargetingFlagFilters:(index,properties)=>({index,properties}),addConditionSet:!0,removeConditionSet:index=>({index}),launchTable:!0,stopTable:!0,archiveTable:!0,setDataTableQuery:query=>({query})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(_ref=>{let{props}=_ref;return{table:{loadTable:async()=>props.id&&"new"!==props.id?await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.get(props.id):{...NEW_WAREHOUSE_TABLE},createTable:async tablePayload=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.create({...tablePayload}),updateTable:async tablePayload=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.update(props.id,tablePayload)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{createTableSuccess:async _ref3=>{let{table}=_ref3;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["Table ",table.name," created"]})),actions.loadDatabase(),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse())},updateTableSuccess:async _ref4=>{let{table}=_ref4;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["Table ",table.name," updated"]})),actions.editingTable(!1),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse())}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({isEditingTable:[!1,{editingTable:(_,_ref5)=>{let{editing}=_ref5;return editing}}],dataTableQuery:[null,{setDataTableQuery:(_,_ref6)=>{let{query}=_ref6;return query}}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref7=>{let{actions,props}=_ref7;return{table:{defaults:{...NEW_WAREHOUSE_TABLE},errors:_ref8=>{let{name,url_pattern,credential,format}=_ref8;return url_pattern?.startsWith("s3://")?{url_pattern:"Please use the https version of your bucket url e.g. https://your-org.s3.amazonaws.com/airbyte/stripe/invoices/*.pqt"}:{name:!name&&"Please enter a name.",url_pattern:!url_pattern&&"Please enter a url pattern.",credential:{access_secret:!credential.access_secret&&"Please enter an access secret.",access_key:!credential.access_key&&"Please enter an access key."},format:!format&&"Please enter the format of your files."}},submit:async tablePayload=>{props.id&&"new"!==props.id?actions.updateTable(tablePayload):actions.createTable(tablePayload)}}}})])},"./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HM:()=>getErrorsForFields,So:()=>sourceWizardLogic,l2:()=>SOURCE_DETAILS});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/types.ts"),_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts"),_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/data-warehouse/new/dataWarehouseTableLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let getHubspotRedirectUri=()=>`${window.location.origin}/data-warehouse/hubspot/redirect`,SOURCE_DETAILS={Stripe:{name:"Stripe",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Enter your Stripe credentials to automatically pull your Stripe data into the PostHog Data warehouse.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("br",{}),"You can find your account ID"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:"https://dashboard.stripe.com/settings/user",target:"_blank",children:"in your Stripe dashboard"}),", and create a secret key"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:"https://dashboard.stripe.com/apikeys",target:"_blank",children:"here"}),"."]}),{}),fields:[{name:"account_id",label:"Account id",type:"text",required:!1,placeholder:"acct_..."},{name:"client_secret",label:"Client secret",type:"password",required:!0,placeholder:"sk_live_..."}]},Hubspot:{name:"Hubspot",fields:[],caption:"Succesfully authenticated with Hubspot. Please continue here to complete the source setup",oauthPayload:["code"]},Postgres:{name:"Postgres",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Postgres credentials to automatically pull your Postgres data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"5432"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"postgres"},{name:"user",label:"User",type:"text",required:!0,placeholder:"postgres"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},MySQL:{name:"MySQL",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your MySQL/MariaDB credentials to automatically pull your MySQL data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"3306"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"mysql"},{name:"user",label:"User",type:"text",required:!0,placeholder:"mysql"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"},{type:"select",name:"use_ssl",label:"Use SSL?",defaultValue:"1",required:!0,options:[{value:"1",label:"Yes"},{value:"0",label:"No"}]},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},MSSQL:{name:"MSSQL",label:"Azure SQL Server",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your MS SQL Server/Azure SQL Server credentials to automatically pull your SQL data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"1433"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"msdb"},{name:"user",label:"User",type:"text",required:!0,placeholder:"sa"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"dbo"},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},Snowflake:{name:"Snowflake",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Snowflake credentials to automatically pull your Snowflake data into the PostHog Data warehouse."}),fields:[{name:"account_id",label:"Account id",type:"text",required:!0,placeholder:""},{name:"database",label:"Database",type:"text",required:!0,placeholder:"snowflake_sample_data"},{name:"warehouse",label:"Warehouse",type:"text",required:!0,placeholder:"COMPUTE_WAREHOUSE"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Username",type:"text",required:!0,placeholder:"User1"},{name:"private_key",label:"Private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Passphrase",type:"password",required:!1,placeholder:""}]}]},{name:"role",label:"Role (optional)",type:"text",required:!1,placeholder:"ACCOUNTADMIN"},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"}]},Zendesk:{name:"Zendesk",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Zendesk API key to automatically pull your Zendesk support data into the PostHog Data warehouse."}),fields:[{name:"subdomain",label:"Zendesk subdomain",type:"text",required:!0,placeholder:""},{name:"api_key",label:"API key",type:"text",required:!0,placeholder:""},{name:"email_address",label:"Zendesk email address",type:"email",required:!0,placeholder:""}]},Salesforce:{name:"Salesforce",fields:[{name:"integration_id",label:"Salesforce account",type:"oauth",required:!0}],caption:"Select an existing Salesforce account to link to PostHog or create a new connection"},Vitally:{name:"Vitally",fields:[{name:"secret_token",label:"Secret token",type:"text",required:!0,placeholder:"sk_live_..."},{type:"select",name:"region",label:"Vitally region",required:!0,defaultValue:"EU",options:[{label:"EU",value:"EU"},{label:"US",value:"US",fields:[{name:"subdomain",label:"Vitally subdomain",type:"text",required:!0,placeholder:""}]}]}],caption:""},BigQuery:{name:"BigQuery",fields:[{type:"file-upload",name:"key_file",label:"Google Cloud JSON key file",fileFormat:".json",required:!0},{type:"text",name:"dataset_id",label:"Dataset ID",required:!0,placeholder:""},{type:"switch-group",name:"temporary-dataset",label:"Use a different dataset for the temporary tables?",caption:"We have to create and delete temporary tables when querying your data, this is a requirement of querying large BigQuery tables. We can use a different dataset if you'd like to limit the permissions available to the service account provided.",default:!1,fields:[{type:"text",name:"temporary_dataset_id",label:"Dataset ID for temporary tables",required:!0,placeholder:""}]}],caption:""},Chargebee:{name:"Chargebee",fields:[{name:"api_key",label:"API key",type:"text",required:!0,placeholder:""},{type:"text",name:"site_name",label:"Site name (subdomain)",required:!0,placeholder:""}],caption:""}},buildKeaFormDefaultFromSourceDetails=sourceDetails=>{let fieldDefaults=(field,obj)=>{if("switch-group"===field.type){obj[field.name]={},obj[field.name].enabled=field.default,field.fields.forEach(f=>fieldDefaults(f,obj[field.name]));return}if("select"===field.type){let hasOptionFields=!!field.options.filter(n=>{var _n$fields$length;return(null!==(_n$fields$length=n.fields?.length)&&void 0!==_n$fields$length?_n$fields$length:0)>0}).length;hasOptionFields?(obj[field.name]={},obj[field.name].selection=field.defaultValue,field.options.flatMap(n=>{var _n$fields;return null!==(_n$fields=n.fields)&&void 0!==_n$fields?_n$fields:[]}).forEach(f=>fieldDefaults(f,obj[field.name]))):obj[field.name]=field.defaultValue;return}obj[field.name]=""},sourceDetailsKeys=Object.keys(sourceDetails),formDefault=sourceDetailsKeys.reduce((defaults,cur)=>{let fields=sourceDetails[cur].fields;return fields.forEach(f=>fieldDefaults(f,defaults.payload)),defaults},{prefix:"",payload:{}});return formDefault},manualLinkSourceMap={aws:"S3","google-cloud":"Google Cloud Storage","cloudflare-r2":"Cloudflare R2",azure:"Azure"},sourceWizardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","data-warehouse","external","sourceWizardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({selectConnector:connector=>({connector}),toggleManualLinkFormVisible:visible=>({visible}),handleRedirect:(kind,searchParams)=>({kind,searchParams}),onClear:!0,onBack:!0,onNext:!0,onSubmit:!0,setDatabaseSchemas:schemas=>({schemas}),toggleSchemaShouldSync:(schema,shouldSync)=>({schema,shouldSync}),updateSchemaSyncType:(schema,syncType,incrementalField,incrementalFieldType)=>({schema,syncType,incrementalField,incrementalFieldType}),clearSource:!0,updateSource:source=>({source}),createSource:!0,setIsLoading:isLoading=>({isLoading}),setSourceId:id=>({sourceId:id}),closeWizard:!0,cancelWizard:!0,setStep:step=>({step}),getDatabaseSchemas:!0,setManualLinkingProvider:provider=>({provider}),openSyncMethodModal:schema=>({schema}),cancelSyncMethodModal:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U,["tableLoading"],_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__.T,["dataWarehouseSources"],scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__.preflightLogic,["preflight"]],actions:[_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U,["resetTable","createTableSuccess"],_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__.T,["loadSources"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H,["addProductIntent"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({manualLinkingProvider:[null,{setManualLinkingProvider:(_,_ref)=>{let{provider}=_ref;return provider}}],selectedConnector:[null,{selectConnector:(_,_ref2)=>{let{connector}=_ref2;return connector}}],isManualLinkFormVisible:[!1,{toggleManualLinkFormVisible:(_,_ref3)=>{let{visible}=_ref3;return visible}}],currentStep:[1,{onNext:state=>state+1,onBack:state=>state-1,onClear:()=>1,setStep:(_,_ref4)=>{let{step}=_ref4;return step}}],databaseSchema:[[],{setDatabaseSchemas:(_,_ref5)=>{let{schemas}=_ref5;return schemas},toggleSchemaShouldSync:(state,_ref6)=>{let{schema,shouldSync}=_ref6,newSchema=state.map(s=>({...s,should_sync:s.table===schema.table?shouldSync:s.should_sync}));return newSchema},updateSchemaSyncType:(state,_ref7)=>{let{schema,syncType,incrementalField,incrementalFieldType}=_ref7,newSchema=state.map(s=>({...s,sync_type:s.table===schema.table?syncType:s.sync_type,incremental_field:s.table===schema.table?incrementalField:s.incremental_field,incremental_field_type:s.table===schema.table?incrementalFieldType:s.incremental_field_type}));return newSchema}}],source:[{payload:{},prefix:""},{updateSource:(state,_ref8)=>{var _source$prefix,_state$payload,_source$payload;let{source}=_ref8;return{prefix:null!==(_source$prefix=source.prefix)&&void 0!==_source$prefix?_source$prefix:state.prefix,payload:{...null!==(_state$payload=state.payload)&&void 0!==_state$payload?_state$payload:{},...null!==(_source$payload=source.payload)&&void 0!==_source$payload?_source$payload:{}}}},clearSource:()=>({payload:{},prefix:""})}],isLoading:[!1,{onNext:()=>!1,setIsLoading:(_,_ref9)=>{let{isLoading}=_ref9;return isLoading}}],sourceId:[null,{setSourceId:(_,_ref10)=>{let{sourceId}=_ref10;return sourceId}}],syncMethodModalOpen:[!1,{openSyncMethodModal:()=>!0,cancelSyncMethodModal:()=>!1}],currentSyncMethodModalSchema:[null,{openSyncMethodModal:(_,_ref11)=>{let{schema}=_ref11;return schema},cancelSyncMethodModal:()=>null,updateSchemaSyncType:(_,_ref12)=>{let{schema,syncType,incrementalField,incrementalFieldType}=_ref12;return{...schema,sync_type:syncType,incremental_field:incrementalField,incremental_field_type:incrementalFieldType}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({isManualLinkingSelected:[s=>[s.selectedConnector],selectedConnector=>!selectedConnector],canGoBack:[s=>[s.currentStep],currentStep=>4!==currentStep],canGoNext:[s=>[s.currentStep,s.isManualLinkingSelected,s.databaseSchema],(currentStep,isManualLinkingSelected,databaseSchema)=>(!isManualLinkingSelected||1!==currentStep)&&(!!isManualLinkingSelected||3!==currentStep||0!==databaseSchema.filter(n=>n.should_sync).length&&0===databaseSchema.filter(n=>n.should_sync&&!n.sync_type).length)],showSkipButton:[s=>[s.currentStep],currentStep=>4===currentStep],nextButtonText:[s=>[s.currentStep,s.isManualLinkingSelected,(_,props)=>props.onComplete],(currentStep,isManualLinkingSelected,onComplete)=>3===currentStep&&isManualLinkingSelected?"Link":3===currentStep?"Import":4===currentStep?onComplete?"Next":"Return to sources":"Next"],breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__.x.DataWarehouse,name:"Data Warehouse",path:scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouse()},{key:[scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__.x.DataWarehouse,"New"],name:"New"}]],showFooter:[s=>[s.selectedConnector,s.isManualLinkFormVisible],(selectedConnector,isManualLinkFormVisible)=>selectedConnector||isManualLinkFormVisible],connectors:[s=>[s.dataWarehouseSources],sources=>Object.values(SOURCE_DETAILS).map(connector=>({...connector,disabledReason:sources&&sources.results.find(source=>source.source_type===connector.name)?"Already linked":null}))],manualConnectors:[()=>[],()=>_types__WEBPACK_IMPORTED_MODULE_10__.zD.map(source=>({name:manualLinkSourceMap[source],type:source}))],addToHubspotButtonUrl:[s=>[s.preflight],preflight=>()=>{let clientId=preflight?.data_warehouse_integrations?.hubspot.client_id;if(!clientId)return null;let params=new URLSearchParams;return params.set("client_id",clientId),params.set("redirect_uri",getHubspotRedirectUri()),params.set("scope","crm.objects.contacts.read crm.objects.companies.read crm.objects.deals.read tickets crm.objects.quotes.read sales-email-read"),`https://app.hubspot.com/oauth/authorize?${params.toString()}`}],modalTitle:[s=>[s.currentStep],currentStep=>1===currentStep?"":2===currentStep?"Link your data source":3===currentStep?"Select tables to import":4===currentStep?"Importing your data...":""],modalCaption:[s=>[s.selectedConnector,s.currentStep],(selectedConnector,currentStep)=>2===currentStep&&selectedConnector?SOURCE_DETAILS[selectedConnector.name]?.caption:4===currentStep?"Sit tight as we import your data! After it's done, you will be able to query it in PostHog.":""],isWrapped:[()=>[(_,props)=>props.onComplete],onComplete=>!!onComplete]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref13=>{let{actions,values,props}=_ref13;return{onBack:()=>{values.currentStep<=1&&actions.onClear()},onClear:()=>{actions.selectConnector(null),actions.resetSourceConnectionDetails(),actions.clearSource(),actions.toggleManualLinkFormVisible(!1),actions.resetTable(),actions.setIsLoading(!1)},onSubmit:()=>{1!==values.currentStep&&(2===values.currentStep&&values.selectedConnector?.name?actions.submitSourceConnectionDetails():2===values.currentStep&&values.isManualLinkFormVisible&&(_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U.actions.submitTable(),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source created",{sourceType:"Manual"})),3===values.currentStep&&values.selectedConnector?.name&&(actions.updateSource({payload:{schemas:values.databaseSchema.map(schema=>({name:schema.table,should_sync:schema.should_sync,sync_type:schema.sync_type,incremental_field:schema.incremental_field,incremental_field_type:schema.incremental_field_type}))}}),actions.setIsLoading(!0),actions.createSource(),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source created",{sourceType:values.selectedConnector.name})),4===values.currentStep&&(props.onComplete?props.onComplete():actions.closeWizard()))},createTableSuccess:()=>{actions.cancelWizard()},closeWizard:()=>{actions.cancelWizard(),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.pipeline(_types__WEBPACK_IMPORTED_MODULE_10__.J9.Sources))},cancelWizard:()=>{actions.onClear(),actions.clearSource(),actions.loadSources(null),actions.resetSourceConnectionDetails()},createSource:async()=>{if(null!==values.selectedConnector)try{let{id}=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.create({...values.source,source_type:values.selectedConnector.name});_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("New Data Resource Created"),actions.setSourceId(id),actions.resetSourceConnectionDetails(),actions.loadSources(null),actions.onNext()}catch(e){var _e$data$message;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(null!==(_e$data$message=e.data?.message)&&void 0!==_e$data$message?_e$data$message:e.message)}finally{actions.setIsLoading(!1)}},handleRedirect:async _ref14=>{let{kind,searchParams}=_ref14;switch(kind){case"hubspot":actions.updateSource({source_type:"Hubspot",payload:{code:searchParams.code,redirect_uri:getHubspotRedirectUri()}});return;case"salesforce":actions.updateSource({source_type:"Salesforce"});break;default:_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Something went wrong.")}},submitSourceConnectionDetailsSuccess:()=>{actions.getDatabaseSchemas()},getDatabaseSchemas:async()=>{var _values$source$payloa,_e$data$message2,_ref15;if(values.selectedConnector){actions.setIsLoading(!0);try{let schemas=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.database_schema(values.selectedConnector.name,null!==(_values$source$payloa=values.source.payload)&&void 0!==_values$source$payloa?_values$source$payloa:{});actions.setDatabaseSchemas(schemas),actions.onNext()}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(null!==(_e$data$message2=e.data?.message)&&void 0!==_e$data$message2?_e$data$message2:e.message),-1!=(null!==(_ref15=e.data?.message)&&void 0!==_ref15?_ref15:"").indexOf("Invalid credentials")&&posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("warehouse credentials invalid",{sourceType:values.selectedConnector.name})}actions.setIsLoading(!1)}},setManualLinkingProvider:()=>{actions.onNext()},selectConnector:()=>{actions.addProductIntent({product_type:_types__WEBPACK_IMPORTED_MODULE_10__.Md.DATA_WAREHOUSE,intent_context:"selected connector"})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref16=>{let{actions}=_ref16;return{"/data-warehouse/:kind/redirect":(_ref17,searchParams)=>{let{kind=""}=_ref17;"hubspot"===kind&&kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouseTable(),{kind,code:searchParams.code}),"salesforce"===kind&&kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouseTable(),{kind})},"/data-warehouse/new":(_,searchParams)=>{"hubspot"==searchParams.kind&&searchParams.code&&(actions.selectConnector(SOURCE_DETAILS.Hubspot),actions.handleRedirect(searchParams.kind,{code:searchParams.code}),actions.setStep(2)),"salesforce"==searchParams.kind&&(actions.selectConnector(SOURCE_DETAILS.Salesforce),actions.handleRedirect(searchParams.kind,{}),actions.setStep(2))}}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref18=>{let{actions,values}=_ref18;return{sourceConnectionDetails:{defaults:buildKeaFormDefaultFromSourceDetails(SOURCE_DETAILS),errors:sourceValues=>{var _values$selectedConne;return getErrorsForFields(null!==(_values$selectedConne=values.selectedConnector?.fields)&&void 0!==_values$selectedConne?_values$selectedConne:[],sourceValues)},submit:async sourceValues=>{if(values.selectedConnector){let payload={...sourceValues,source_type:values.selectedConnector.name};actions.setIsLoading(!0);try{var _values$selectedConne2;await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.source_prefix(payload.source_type,sourceValues.prefix);let payloadKeys=(null!==(_values$selectedConne2=values.selectedConnector?.fields)&&void 0!==_values$selectedConne2?_values$selectedConne2:[]).map(n=>({name:n.name,type:n.type})),fieldPayload={source_type:values.selectedConnector.name};for(let{name,type}of payloadKeys)if("file-upload"===type)try{let loadedFile=await new Promise((resolve,reject)=>{let fileReader=new FileReader;fileReader.onload=e=>resolve(e.target?.result),fileReader.onerror=e=>reject(e),fileReader.readAsText(payload.payload[name][0])}),jsonConfig=JSON.parse(loadedFile);fieldPayload[name]=jsonConfig}catch(e){return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("File is not valid")}else fieldPayload[name]=payload.payload[name];actions.updateSource({...payload,payload:{source_type:values.selectedConnector.name,...fieldPayload}}),actions.setIsLoading(!1)}catch(e){throw e?.data?.message&&actions.setSourceConnectionDetailsManualErrors({prefix:e.data.message}),actions.setIsLoading(!1),e}}}}}})]),getErrorsForFields=(fields,values)=>{var _values$prefix,_values$payload;let errors={payload:{}};/^[a-zA-Z0-9_-]*$/.test(null!==(_values$prefix=values?.prefix)&&void 0!==_values$prefix?_values$prefix:"")||(errors.prefix="Please enter a valid prefix (only letters, numbers, and '_' or '-').");let validateField=(field,valueObj,errorsObj)=>{if("switch-group"===field.type){valueObj[field.name]?.enabled&&(errorsObj[field.name]={},field.fields.forEach(f=>validateField(f,valueObj[field.name],errorsObj[field.name])));return}if("select"===field.type){let hasOptionFields=!!field.options.filter(n=>{var _n$fields$length2;return(null!==(_n$fields$length2=n.fields?.length)&&void 0!==_n$fields$length2?_n$fields$length2:0)>0}).length;if(hasOptionFields){errorsObj[field.name]={};let selection=valueObj[field.name].selection;field.options.find(n=>n.value===selection)?.fields?.forEach(f=>validateField(f,valueObj[field.name],errorsObj[field.name]))}else field.required&&!valueObj[field.name]&&(errorsObj[field.name]=`Please select a ${field.label.toLowerCase()}`);return}field.required&&!valueObj[field.name]&&(errorsObj[field.name]=`Please enter a ${field.label.toLowerCase()}`)};for(let field of fields)validateField(field,null!==(_values$payload=values?.payload)&&void 0!==_values$payload?_values$payload:{},errors.payload);return errors}},"./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>dataWarehouseViewsLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let dataWarehouseViewsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","warehouse","dataWarehouseSavedQueriesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__.userLogic,["user"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["views","databaseLoading"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({runDataWarehouseSavedQuery:viewId=>({viewId})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref=>{let{values}=_ref;return{dataWarehouseSavedQueries:[[],{loadDataWarehouseSavedQueries:async()=>{let savedQueries=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.list();return savedQueries.results},createDataWarehouseSavedQuery:async view=>{var _newView$name;let newView=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.create(view);return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`${null!==(_newView$name=newView.name)&&void 0!==_newView$name?_newView$name:"View"} successfully created`),[...values.dataWarehouseSavedQueries,newView]},deleteDataWarehouseSavedQuery:async viewId=>(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.delete(viewId),values.dataWarehouseSavedQueries.filter(view=>view.id!==viewId)),updateDataWarehouseSavedQuery:async view=>{let newView=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.update(view.id,view);return values.dataWarehouseSavedQueries.map(savedQuery=>savedQuery.id===view.id?newView:savedQuery)}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{createDataWarehouseSavedQuerySuccess:()=>{actions.loadDatabase()},updateDataWarehouseSavedQuerySuccess:()=>{actions.loadDatabase()},runDataWarehouseSavedQuery:async _ref3=>{let{viewId}=_ref3;try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.run(viewId),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Materialization started"),actions.loadDataWarehouseSavedQueries()}catch(error){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Failed to run materialization")}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({shouldShowEmptyState:[s=>[s.views,s.databaseLoading],(views,databaseLoading)=>views?.length==0&&!databaseLoading],dataWarehouseSavedQueryMapById:[s=>[s.dataWarehouseSavedQueries],dataWarehouseSavedQueries=>{var _dataWarehouseSavedQu;return null!==(_dataWarehouseSavedQu=dataWarehouseSavedQueries?.reduce((acc,cur)=>(acc[cur.id]=cur,acc),{}))&&void 0!==_dataWarehouseSavedQu?_dataWarehouseSavedQu:{}}],dataWarehouseSavedQueryMap:[s=>[s.dataWarehouseSavedQueries],dataWarehouseSavedQueries=>{var _dataWarehouseSavedQu2;return null!==(_dataWarehouseSavedQu2=dataWarehouseSavedQueries?.reduce((acc,cur)=>(acc[cur.name]=cur,acc),{}))&&void 0!==_dataWarehouseSavedQu2?_dataWarehouseSavedQu2:{}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.events)(_ref4=>{let{actions}=_ref4;return{afterMount:()=>{actions.loadDataWarehouseSavedQueries()}}})])},"./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>dataWarehouseSceneLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/schema.ts"),_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx");let dataWarehouseSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","warehouse","dataWarehouseSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["database","posthogTables","dataWarehouseTables","databaseLoading","views","viewsMapById"],_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__.$,["dataWarehouseSavedQueryMapById","dataWarehouseSavedQueriesLoading"]],actions:[_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__.$,["deleteDataWarehouseSavedQuery","updateDataWarehouseSavedQuery","updateDataWarehouseSavedQuerySuccess"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["loadDatabase","loadDatabaseSuccess","loadDatabaseFailure"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(_ref=>{let{values}=_ref;return{selectRow:row=>({row}),setIsEditingSavedQuery:isEditingSavedQuery=>({isEditingSavedQuery}),toggleEditSchemaMode:inEditSchemaMode=>({inEditSchemaMode}),updateSelectedSchema:(columnKey,columnType)=>({columnKey,columnType}),saveSchema:!0,setEditSchemaIsLoading:isLoading=>({isLoading}),cancelEditSchema:()=>({database:values.database}),deleteDataWarehouseTable:tableId=>({tableId}),toggleSchemaModal:!0,setEditingView:id=>({id}),updateView:(query,types)=>({query,types})}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({selectedRow:[null,{selectRow:(_,_ref2)=>{let{row}=_ref2;return row},updateSelectedSchema:(state,_ref3)=>{let{columnKey,columnType}=_ref3;if(!state)return state;let newState={...state},column=newState?.fields[columnKey];return column?(column.type=columnType,newState):state},loadDatabaseSuccess:(state,_ref4)=>{let{database}=_ref4;if(!state||!database)return state;let table=Object.values(database.tables).find(n=>n.id===state.id);return table||state},cancelEditSchema:(state,_ref5)=>{let{database}=_ref5;if(!state||!database)return state;let table=Object.values(database.tables).find(n=>n.id===state.id);return table?JSON.parse(JSON.stringify(table)):state}}],schemaUpdates:[{},{updateSelectedSchema:(state,_ref6)=>{let{columnKey,columnType}=_ref6,newState={...state};return newState[columnKey]=columnType,newState},toggleEditSchemaMode:()=>({})}],isEditingSavedQuery:[!1,{setIsEditingSavedQuery:(_,_ref7)=>{let{isEditingSavedQuery}=_ref7;return isEditingSavedQuery}}],inEditSchemaMode:[!1,{toggleEditSchemaMode:(state,_ref8)=>{let{inEditSchemaMode}=_ref8;return void 0!==inEditSchemaMode?inEditSchemaMode:!state}}],editSchemaIsLoading:[!1,{setEditSchemaIsLoading:(_,_ref9)=>{let{isLoading}=_ref9;return isLoading},loadDatabaseSuccess:()=>!1,loadDatabaseFailure:()=>!1}],schemaModalIsOpen:[!1,{toggleSchemaModal:state=>!state}],editingView:[null,{setEditingView:(_,_ref10)=>{let{id}=_ref10;return id}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({dataWarehouseTablesBySourceType:[s=>[s.dataWarehouseTables],dataWarehouseTables=>dataWarehouseTables.reduce((acc,table)=>(table.source?(acc[table.source.source_type]||(acc[table.source.source_type]=[]),acc[table.source.source_type].push(table)):(acc.S3||(acc.S3=[]),acc.S3.push(table)),acc),{})],dataWarehouseTablesAndViews:[s=>[s.dataWarehouseTables,s.views],(dataWarehouseTables,views)=>[...dataWarehouseTables,...views]],nonMaterializedViews:[s=>[s.views,s.dataWarehouseSavedQueryMapById],(views,dataWarehouseSavedQueryMapById)=>views.filter(view=>!dataWarehouseSavedQueryMapById[view.id]?.status).map(view=>({...view,type:"view"}))],materializedViews:[s=>[s.views,s.dataWarehouseSavedQueryMapById],(views,dataWarehouseSavedQueryMapById)=>views.filter(view=>dataWarehouseSavedQueryMapById[view.id]?.status).map(view=>({...view,type:"materialized_view",last_run_at:dataWarehouseSavedQueryMapById[view.id]?.last_run_at,status:dataWarehouseSavedQueryMapById[view.id]?.status}))]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref11=>{let{actions,values}=_ref11;return{deleteDataWarehouseSavedQuery:async tableId=>{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.delete(tableId),actions.selectRow(null),actions.loadDatabase(),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View successfully deleted")},selectRow:()=>{actions.setIsEditingSavedQuery(!1)},updateDataWarehouseSavedQuerySuccess:async _ref12=>{var _payload$name;let{payload}=_ref12;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`${null!==(_payload$name=payload?.name)&&void 0!==_payload$name?_payload$name:"View"} successfully updated`),payload&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_6__.j.dataWarehouseView(payload.id))},saveSchema:async()=>{let schemaUpdates=values.schemaUpdates,tableId=values.selectedRow?.id;if(tableId){if(0===Object.keys(schemaUpdates).length){actions.toggleEditSchemaMode();return}actions.setEditSchemaIsLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.updateSchema(tableId,schemaUpdates),actions.loadDatabase(),values.selectedRow&&posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("source schema saved",{name:values.selectedRow.name,tableType:values.selectedRow.type})}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(e.message),actions.setEditSchemaIsLoading(!1)}}},loadDatabaseSuccess:()=>{values.inEditSchemaMode&&actions.toggleEditSchemaMode()},loadDatabaseFailure:()=>{values.inEditSchemaMode&&actions.toggleEditSchemaMode()},cancelEditSchema:()=>{actions.toggleEditSchemaMode(!1)},deleteDataWarehouseTable:async _ref13=>{let{tableId}=_ref13;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.delete(tableId),actions.selectRow(null),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Table successfully deleted")},toggleSchemaModal:()=>{values.schemaModalIsOpen&&values.selectedRow&&posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("source schema viewed",{name:values.selectedRow.name,tableType:values.selectedRow.type})},updateView:_ref14=>{let{query,types}=_ref14;if(values.editingView){let newViewQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLQuery,query:query},oldView=values.viewsMapById[values.editingView],newView={...oldView,query:newViewQuery,types};actions.updateDataWarehouseSavedQuery(newView)}}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref15=>{let{actions}=_ref15;return{"/data-warehouse/view/:id":_ref16=>{let{id}=_ref16;actions.setEditingView(id)},"/data-warehouse":()=>{actions.setEditingView(null)}}})])},"./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>dataWarehouseSettingsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");__webpack_require__("./frontend/src/types.ts");let dataWarehouseSettingsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","settings","dataWarehouseSettingsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["dataWarehouseTables"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteSource:source=>({source}),reloadSource:source=>({source}),sourceLoadingFinished:source=>({source}),schemaLoadingFinished:schema=>({schema}),abortAnyRunningQuery:!0,deleteSelfManagedTable:tableId=>({tableId}),refreshSelfManagedTableSchema:tableId=>({tableId})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{cache,actions,values}=_ref;return{dataWarehouseSources:[null,{loadSources:async(_,breakpoint)=>{await breakpoint(300),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},res=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.list(methodOptions);return breakpoint(),cache.abortController=null,res},updateSource:async source=>{let updatedSource=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.update(source.id,source);return{...values.dataWarehouseSources,results:values.dataWarehouseSources?.results.map(s=>s.id===updatedSource.id?source:s)||[]}}}],schemas:[null,{updateSchema:async schema=>{var _values$dataWarehouse;let clonedSources=JSON.parse(JSON.stringify(null!==(_values$dataWarehouse=values.dataWarehouseSources?.results)&&void 0!==_values$dataWarehouse?_values$dataWarehouse:[])),sourceIndex=clonedSources.findIndex(n=>n.schemas.find(m=>m.id===schema.id)),schemaIndex=clonedSources[sourceIndex].schemas.findIndex(n=>n.id===schema.id);return clonedSources[sourceIndex].schemas[schemaIndex]=schema,actions.loadSourcesSuccess({...values.dataWarehouseSources,results:clonedSources}),await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSchemas.update(schema.id,schema),actions.loadSources(null),null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref2=>{let{cache}=_ref2;return{dataWarehouseSourcesLoading:[!1,{loadSources:()=>!0,loadSourcesFailure:()=>null!==cache.abortController,loadSourcesSuccess:()=>null!==cache.abortController}],sourceReloadingById:[{},{reloadSource:(state,_ref3)=>{let{source}=_ref3;return{...state,[source.id]:!0}},deleteSource:(state,_ref4)=>{let{source}=_ref4;return{...state,[source.id]:!0}},sourceLoadingFinished:(state,_ref5)=>{let{source}=_ref5;return{...state,[source.id]:!1}}}],schemaReloadingById:[{},{schemaLoadingFinished:(state,_ref6)=>{let{schema}=_ref6;return{...state,[schema.id]:!1}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({selfManagedTables:[s=>[s.dataWarehouseTables],dataWarehouseTables=>dataWarehouseTables.filter(table=>!table.source)]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref7=>{let{actions}=_ref7;return{"/data-warehouse/*":()=>{actions.loadSources(null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref8=>{let{actions,values,cache}=_ref8;return{deleteSelfManagedTable:async _ref9=>{let{tableId}=_ref9;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.delete(tableId),actions.loadDatabase()},refreshSelfManagedTableSchema:async _ref10=>{let{tableId}=_ref10;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.info("Updating schema..."),await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.refreshSchema(tableId),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.success("Schema updated"),actions.loadDatabase()},deleteSource:async _ref11=>{let{source}=_ref11;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.delete(source.id),actions.loadSources(null),actions.sourceLoadingFinished(source),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source deleted",{sourceType:source.source_type})},reloadSource:async _ref12=>{var _values$dataWarehouse2;let{source}=_ref12,clonedSources=JSON.parse(JSON.stringify(null!==(_values$dataWarehouse2=values.dataWarehouseSources?.results)&&void 0!==_values$dataWarehouse2?_values$dataWarehouse2:[])),sourceIndex=clonedSources.findIndex(n=>n.id===source.id);clonedSources[sourceIndex].status="Running",clonedSources[sourceIndex].schemas=clonedSources[sourceIndex].schemas.map(n=>n.should_sync?{...n,status:"Running"}:n),actions.loadSourcesSuccess({...values.dataWarehouseSources,results:clonedSources});try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.reload(source.id),actions.loadSources(null),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source reloaded",{sourceType:source.source_type})}catch(e){e.message?lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error(e.message):lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error("Cant refresh source at this time")}actions.sourceLoadingFinished(source)},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)},updateSchema:schema=>{posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("schema updated",{shouldSync:schema.should_sync,syncType:schema.sync_type})},loadSourcesSuccess:()=>{clearTimeout(cache.refreshTimeout),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("data-warehouse")&&(cache.refreshTimeout=setTimeout(()=>{actions.loadSources(null)},1e4))},loadSourcesFailure:()=>{clearTimeout(cache.refreshTimeout),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("data-warehouse")&&(cache.refreshTimeout=setTimeout(()=>{actions.loadSources(null)},1e4))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref13=>{let{actions}=_ref13;actions.loadSources(null)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref14=>{let{cache}=_ref14;clearTimeout(cache.refreshTimeout)})])},"./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>viewLinkLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts"),_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NEW_VIEW_LINK={id:"new",source_table_name:void 0,joining_table_name:void 0,field_name:void 0},viewLinkLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","viewLinkLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["allTables"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["loadDatabase"],_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_6__.F,["loadJoins"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(_ref=>{let{values}=_ref;return{selectJoiningTable:selectedTableName=>({selectedTableName}),selectSourceTable:selectedTableName=>({selectedTableName}),selectSourceKey:selectedKey=>({selectedKey,sourceTable:values.selectedSourceTable}),selectJoiningKey:selectedKey=>({selectedKey,joiningTable:values.selectedJoiningTable}),toggleJoinTableModal:!0,toggleEditJoinModal:join=>({join}),toggleNewJoinModal:!0,saveViewLink:viewLink=>({viewLink}),deleteViewLink:(table,column)=>({table,column}),setError:error=>({error}),setFieldName:fieldName=>({fieldName}),setExperimentsOptimized:experimentsOptimized=>({experimentsOptimized}),selectExperimentsTimestampKey:experimentsTimestampKey=>({experimentsTimestampKey}),clearModalFields:!0}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({joinToEdit:[null,{submitViewLinkSuccess:()=>null,clearModalFields:()=>null,toggleEditJoinModal:(_,_ref2)=>{let{join}=_ref2;return join}}],isNewJoin:[!1,{submitViewLinkSuccess:()=>!1,toggleJoinTableModal:()=>!1,toggleEditJoinModal:()=>!1,toggleNewJoinModal:()=>!0,clearModalFields:()=>!1}],selectedSourceTableName:[null,{selectSourceTable:(_,_ref3)=>{let{selectedTableName}=_ref3;return selectedTableName},toggleEditJoinModal:(_,_ref4)=>{var _join$source_table_na;let{join}=_ref4;return null!==(_join$source_table_na=join.source_table_name)&&void 0!==_join$source_table_na?_join$source_table_na:null},clearModalFields:()=>null}],selectedJoiningTableName:[null,{selectJoiningTable:(_,_ref5)=>{let{selectedTableName}=_ref5;return selectedTableName},toggleEditJoinModal:(_,_ref6)=>{var _join$joining_table_n;let{join}=_ref6;return null!==(_join$joining_table_n=join.joining_table_name)&&void 0!==_join$joining_table_n?_join$joining_table_n:null},clearModalFields:()=>null}],selectedSourceKey:[null,{selectSourceKey:(_,_ref7)=>{let{selectedKey}=_ref7;return selectedKey},toggleEditJoinModal:(_,_ref8)=>{var _join$source_table_ke;let{join}=_ref8;return null!==(_join$source_table_ke=join.source_table_key)&&void 0!==_join$source_table_ke?_join$source_table_ke:null}}],selectedJoiningKey:[null,{selectJoiningKey:(_,_ref9)=>{let{selectedKey}=_ref9;return selectedKey},toggleEditJoinModal:(_,_ref10)=>{var _join$joining_table_k;let{join}=_ref10;return null!==(_join$joining_table_k=join.joining_table_key)&&void 0!==_join$joining_table_k?_join$joining_table_k:null}}],fieldName:["",{setFieldName:(_,_ref11)=>{let{fieldName}=_ref11;return fieldName},selectJoiningTable:(_,_ref12)=>{let{selectedTableName}=_ref12;return selectedTableName},toggleEditJoinModal:(_,_ref13)=>{var _join$field_name;let{join}=_ref13;return null!==(_join$field_name=join.field_name)&&void 0!==_join$field_name?_join$field_name:""},clearModalFields:()=>""}],experimentsOptimized:[!1,{setExperimentsOptimized:(_,_ref14)=>{let{experimentsOptimized}=_ref14;return experimentsOptimized},toggleEditJoinModal:(_,_ref15)=>{var _join$configuration$e;let{join}=_ref15;return null!==(_join$configuration$e=join.configuration?.experiments_optimized)&&void 0!==_join$configuration$e&&_join$configuration$e},clearModalFields:()=>!1}],experimentsTimestampKey:[null,{selectExperimentsTimestampKey:(_,_ref16)=>{let{experimentsTimestampKey}=_ref16;return experimentsTimestampKey},toggleEditJoinModal:(_,_ref17)=>{var _join$configuration$e2;let{join}=_ref17;return null!==(_join$configuration$e2=join.configuration?.experiments_timestamp_key)&&void 0!==_join$configuration$e2?_join$configuration$e2:null},clearModalFields:()=>null}],isJoinTableModalOpen:[!1,{toggleJoinTableModal:state=>!state,toggleEditJoinModal:()=>!0,toggleNewJoinModal:()=>!0}],error:[null,{setError:(_,_ref18)=>{let{error}=_ref18;return error},clearModalFields:()=>null}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref19=>{let{actions,values}=_ref19;return{viewLink:{defaults:NEW_VIEW_LINK,errors:_ref20=>{let{source_table_name,joining_table_name}=_ref20;return{source_table_name:values.isNewJoin&&!source_table_name?"Must select a table":void 0,joining_table_name:joining_table_name?void 0:"Must select a table"}},submit:async _ref21=>{var _values$selectedSourc,_values$selectedJoini,_values$experimentsTi,_values$selectedSourc2,_values$selectedJoini2,_values$experimentsTi2;let{joining_table_name,source_table_name}=_ref21;if(values.joinToEdit?.id&&values.selectedSourceTable)try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseViewLinks.update(values.joinToEdit.id,{source_table_name:null!=source_table_name?source_table_name:values.selectedSourceTable.name,source_table_key:null!==(_values$selectedSourc=values.selectedSourceKey)&&void 0!==_values$selectedSourc?_values$selectedSourc:void 0,joining_table_name,joining_table_key:null!==(_values$selectedJoini=values.selectedJoiningKey)&&void 0!==_values$selectedJoini?_values$selectedJoini:void 0,field_name:values.fieldName,configuration:{experiments_optimized:values.experimentsOptimized,experiments_timestamp_key:null!==(_values$experimentsTi=values.experimentsTimestampKey)&&void 0!==_values$experimentsTi?_values$experimentsTi:void 0}}),actions.toggleJoinTableModal(),actions.loadJoins(),actions.loadDatabase(),posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("join updated")}catch(error){actions.setError(error.detail)}else if(values.selectedSourceTable)try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseViewLinks.create({source_table_name:null!=source_table_name?source_table_name:values.selectedSourceTable.name,source_table_key:null!==(_values$selectedSourc2=values.selectedSourceKey)&&void 0!==_values$selectedSourc2?_values$selectedSourc2:void 0,joining_table_name,joining_table_key:null!==(_values$selectedJoini2=values.selectedJoiningKey)&&void 0!==_values$selectedJoini2?_values$selectedJoini2:void 0,field_name:values.fieldName,configuration:{experiments_optimized:values.experimentsOptimized,experiments_timestamp_key:null!==(_values$experimentsTi2=values.experimentsTimestampKey)&&void 0!==_values$experimentsTi2?_values$experimentsTi2:void 0}}),actions.toggleJoinTableModal(),actions.loadJoins(),actions.loadDatabase(),posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("join created")}catch(error){actions.setError(error.detail)}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref22=>{let{actions}=_ref22;return{toggleEditJoinModal:_ref23=>{let{join}=_ref23;actions.setViewLinkValues(join)},setExperimentsOptimized:_ref24=>{let{experimentsOptimized}=_ref24;experimentsOptimized||actions.selectExperimentsTimestampKey(null)},selectExperimentsTimestampKey:_ref25=>{let{experimentsTimestampKey}=_ref25;experimentsTimestampKey&&actions.setExperimentsOptimized(!0)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({selectedSourceTable:[s=>[s.selectedSourceTableName,s.allTables],(selectedSourceTableName,tables)=>tables.find(row=>row.name===selectedSourceTableName)],selectedJoiningTable:[s=>[s.selectedJoiningTableName,s.allTables],(selectedJoiningTableName,tables)=>tables.find(row=>row.name===selectedJoiningTableName)],sourceIsUsingHogQLExpression:[s=>[s.selectedSourceKey,s.selectedSourceTable],(sourceKey,sourceTable)=>{var _sourceTable$fields;if(null===sourceKey)return!1;let column=Object.values(null!==(_sourceTable$fields=sourceTable?.fields)&&void 0!==_sourceTable$fields?_sourceTable$fields:{}).find(n=>n.name==sourceKey);return!column}],joiningIsUsingHogQLExpression:[s=>[s.selectedJoiningKey,s.selectedJoiningTable],(joiningKey,joiningTable)=>{var _joiningTable$fields;if(null===joiningKey)return!1;let column=Object.values(null!==(_joiningTable$fields=joiningTable?.fields)&&void 0!==_joiningTable$fields?_joiningTable$fields:{}).find(n=>n.name==joiningKey);return!column}],tableOptions:[s=>[s.allTables],tables=>tables.map(table=>({value:table.name,label:table.name}))],sourceTableKeys:[s=>[s.selectedSourceTable],selectedSourceTable=>selectedSourceTable?Object.values(selectedSourceTable.fields).filter(column=>"view"!==column.type).map(column=>({value:column.name,label:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__.YS,{column:column})})):[]],joiningTableKeys:[s=>[s.selectedJoiningTable],selectedJoiningTable=>selectedJoiningTable?Object.values(selectedJoiningTable.fields).filter(column=>"view"!==column.type).map(column=>({value:column.name,label:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__.YS,{column:column})})):[]],sqlCodeSnippet:[s=>[s.selectedSourceTableName,s.selectedJoiningTableName,s.fieldName],(selectedSourceTableName,joiningTableName,fieldName)=>{if(!selectedSourceTableName||!joiningTableName)return null;let tableAlias=selectedSourceTableName[0];return`SELECT ${tableAlias}.${fieldName||""} FROM ${selectedSourceTableName} ${tableAlias}`}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref26=>{let{actions}=_ref26;return{isJoinTableModalOpen:isOpen=>{isOpen||(actions.clearModalFields(),actions.resetViewLink())}}})])},"./frontend/src/scenes/dataThemeLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>ThemeName,Q:()=>dataThemeLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),_teamLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ThemeName=_ref=>{let{id}=_ref,{themes}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(dataThemeLogic),theme=themes?.find(theme=>theme.id===id);return theme?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span",{children:theme.name}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("span",{className:"italic",children:["No theme found for id: ",id]})},dataThemeLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dataThemeLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[_teamLogic__WEBPACK_IMPORTED_MODULE_3__.H,["currentTeam"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setThemes:themes=>({themes})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref2=>{let{props}=_ref2;return{themes:[props.themes||null,{loadThemes:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dataColorThemes.list()}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({themes:{setThemes:(_,_ref3)=>{let{themes}=_ref3;return themes}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({posthogTheme:[s=>[s.themes],themes=>themes?themes.sort(theme=>theme.id).find(theme=>theme.is_global):null],defaultTheme:[s=>[s.currentTeam,s.themes,s.posthogTheme],(currentTeam,themes,posthogTheme)=>{if(!currentTeam||!themes)return null;let environmentTheme=themes.find(theme=>theme.id===currentTeam.default_data_theme);return environmentTheme||posthogTheme}],getTheme:[s=>[s.themes,s.defaultTheme],(themes,defaultTheme)=>themeId=>{let customTheme;return(Number.isInteger(themeId)&&null!=themes&&(customTheme=themes.find(theme=>theme.id===themeId)),customTheme)?customTheme.colors.reduce((theme,color,index)=>(theme[`preset-${index+1}`]=color,theme),{}):defaultTheme?defaultTheme.colors.reduce((theme,color,index)=>(theme[`preset-${index+1}`]=color,theme),{}):null}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref4=>{let{actions}=_ref4;actions.loadThemes()})])},"./frontend/src/scenes/debug/HogDebug.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>HogDebug});var clsx__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonDivider__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_nodes_DataNode_ElapsedTime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),_queries_nodes_DataNode_Reload__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataNode/Reload.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let uniqueNode=0;function HogQueryEditor(props){var _props$queryKey;let monacoDisposables=(0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)([]);(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>()=>{monacoDisposables.current.forEach(d=>d?.dispose())},[]);let[queryInput,setQueryInput]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(props.query.code);(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>{setQueryInput(props.query?.code)},[props.query?.code]);let[realKey]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(()=>uniqueNode++);function saveQuery(){props.setQuery&&props.setQuery({...props.query,code:queryInput})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{"data-attr":"hogql-query-editor",className:(0,clsx__WEBPACK_IMPORTED_MODULE_10__.default)("flex flex-col rounded space-y-2 w-full p-2 border"),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"relative flex-1 overflow-hidden",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"resize-y overflow-hidden h-[222px]",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{queryKey:null!==(_props$queryKey=props.queryKey)&&void 0!==_props$queryKey?_props$queryKey:`new/${realKey}`,className:"border rounded overflow-hidden h-full",language:"hog",value:queryInput,onChange:v=>setQueryInput(null!=v?v:""),height:"100%",onMount:(editor,monaco)=>{monacoDisposables.current.push(editor.addAction({id:"saveAndRunPostHog",label:"Save and run query",keybindings:[monaco.KeyMod.CtrlCmd|monaco.KeyCode.Enter],run:()=>saveQuery()}))},options:{minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,suggest:{showInlineDetails:!0},quickSuggestionsDelay:300}})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex flex-row",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{onClick:saveQuery,type:"primary",disabledReason:props.setQuery?void 0:"No permission to update",center:!0,fullWidth:!0,"data-attr":"hogql-query-editor-save",children:props.setQuery?"Update and run":"No permission to update"})})})]})})}function HogDebug(_ref){var _response$stdout,_response$results,_response$results2;let{query,setQuery,queryKey,debug}=_ref,dataNodeLogicProps={query,key:queryKey,dataNodeCollectionId:queryKey},{dataLoading,response:_response}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)((0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__.M)(dataNodeLogicProps)),[tab,setTab]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)("results");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(kea__WEBPACK_IMPORTED_MODULE_0__.BindLogic,{logic:_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__.M,props:dataNodeLogicProps,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{className:"space-y-2",children:[setQuery?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(HogQueryEditor,{query:query,setQuery:setQuery,queryKey:queryKey}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonDivider__WEBPACK_IMPORTED_MODULE_2__.p,{className:"my-4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex gap-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_queries_nodes_DataNode_Reload__WEBPACK_IMPORTED_MODULE_8__.L,{})})]}):null,dataLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("h2",{children:"Running query..."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{className:"flex",children:["Time elapsed:\xa0",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_queries_nodes_DataNode_ElapsedTime__WEBPACK_IMPORTED_MODULE_7__.W,{})]})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_3__.T,{tabs:[{label:"Results",key:"results"},{label:"Stdout",key:"stdout"},{label:"Bytecode",key:"coloredBytecode"},{label:"Raw bytecode",key:"bytecode"}],activeKey:tab,onChange:key=>setTab(String(key))}):null,"bytecode"===tab&&debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"json",value:_response?.bytecode?JSON.stringify(_response?.bytecode):"No bytecode returned with response",height:500,path:`debug/${queryKey}/hog-bytecode.json`,options:{wordWrap:"on"}}):"coloredBytecode"===tab&&debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"swift",value:_response?.coloredBytecode&&Array.isArray(_response?.coloredBytecode)?_response?.coloredBytecode.map(a=>a.startsWith("op.")?a:` ${a}`).join("\n"):"No bytecode returned with response",height:500,path:`debug/${queryKey}/hog-bytecode.json`,options:{wordWrap:"on",lineNumbers:nr=>String(nr-1)}}):"stdout"===tab?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"text",value:String(null!==(_response$stdout=_response?.stdout)&&void 0!==_response$stdout?_response$stdout:"No bytecode returned with response"),height:500,path:`debug/${queryKey}/hog-stdout.txt`,options:{wordWrap:"on"}}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"object"==typeof _response?.results?"json":"text",value:"object"==typeof _response?.results?JSON.stringify(null!==(_response$results=_response?.results)&&void 0!==_response$results?_response$results:"",null,2):String(null!==(_response$results2=_response?.results)&&void 0!==_response$results2?_response$results2:""),height:500,path:`debug/${queryKey}/hog-result.json`,options:{wordWrap:"on"}})]})]})})}},"./frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{EarlyAccessFeature:()=>EarlyAccessFeature,PersonList:()=>PersonList,scene:()=>scene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),FlagSelector=__webpack_require__("./frontend/src/lib/components/FlagSelector.tsx"),NotFound=__webpack_require__("./frontend/src/lib/components/NotFound/index.tsx"),PageHeader=__webpack_require__("./frontend/src/lib/components/PageHeader.tsx"),useFeatureFlag=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),LemonDialog=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/index.ts"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),LinkedHogFunctions=__webpack_require__("./frontend/src/scenes/pipeline/hogfunctions/list/LinkedHogFunctions.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Query=__webpack_require__("./frontend/src/queries/Query/Query.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),types=__webpack_require__("./frontend/src/types.ts"),earlyAccessFeatureLogic=__webpack_require__("./frontend/src/scenes/early-access-features/earlyAccessFeatureLogic.ts"),CodeSnippet=__webpack_require__("./frontend/src/lib/components/CodeSnippet/index.ts");let early_access_feature_demo=__webpack_require__.p+"images/early-access-feature-demo.8931b5833f0ea2443173aef331bedf12.png";var preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function InstructionsModal(_ref){let{onClose,visible,flag}=_ref,{preflight}=(0,index_esm.useValues)(preflightLogic.preflightLogic),panels=preflight?.cloud?(0,jsx_runtime.jsx)(src.JL,{className:"mt-2 bg-bg-light",defaultActiveKey:"1",panels:[{key:"1",header:"Option 1: Widget Site App",content:(0,jsx_runtime.jsxs)("div",{children:["Give your users a"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.pipelineNodeNew(types.We.SiteApp,preflight?.region===types.yp.EU?332:574),children:"prebuilt widget"})," ","to opt-in to features",(0,jsx_runtime.jsx)("img",{className:"max-h-full max-w-full mt-2.5",src:early_access_feature_demo})]})},{key:"2",header:"Option 2: Custom implementation",content:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("b",{children:"Opt user in"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureEnrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Opt user out"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureUnenrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Retrieve Previews"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(RetrievePreviewsInstructions,{})})]})}]}):(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("b",{children:"Opt user in"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureEnrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Opt user out"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureUnenrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Retrieve Previews"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(RetrievePreviewsInstructions,{})})]});return(0,jsx_runtime.jsx)(src.fQ,{title:"How to implement opt-in feature flags",isOpen:visible,onClose:onClose,width:640,children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("div",{className:"mb-2",children:"Implement manual release condition toggles to give your users the ability choose which features they want to try"}),panels]})})}function FeatureEnrollInstructions(_ref2){let{flag}=_ref2;return(0,jsx_runtime.jsx)(CodeSnippet.O,{language:CodeSnippet.S.JavaScript,wrap:!0,children:`posthog.updateEarlyAccessFeatureEnrollment("${flag}", true) + or ${"Data warehouse"===productOverLimit.name?"data will not be synced":"data loss may occur"}.`,dismissKey:"usage-limit-exceeded"});return}actions.resetUsageLimitExceededKey();let productApproachingLimit=values.billing.products?.find(x=>x.percentage_usage>.85);if(productApproachingLimit){actions.setBillingAlert({status:"info",title:"You will soon hit your usage limit",message:`You have currently used ${parseFloat((100*productApproachingLimit.percentage_usage).toFixed(2))}% of your ${productApproachingLimit.usage_key&&productApproachingLimit.usage_key.toLowerCase()} allocation.`,dismissKey:"usage-limit-approaching"});return}actions.resetUsageLimitApproachingKey()},setCreditFormValue:_ref23=>{let{name,value}=_ref23;if("creditInput"===name||name?.[0]==="creditInput"){let spend=+value,discount=0;spend>=1e5?discount=.35:spend>=6e4?discount=.25:spend>=2e4?discount=.2:spend>=3e3&&(discount=.1),actions.setComputedDiscount(discount)}},registerInstrumentationProps:async(_,breakpoint)=>{if(await breakpoint(100),posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP&&values.billing){let payload={has_billing_plan:!!values.billing.has_active_subscription,free_trial_until:values.billing.free_trial_until?.toISOString(),customer_deactivated:values.billing.deactivated,current_total_amount_usd:values.billing.current_total_amount_usd};if(values.billing.custom_limits_usd)for(let product of Object.keys(values.billing.custom_limits_usd))payload[`custom_limits_usd.${product}`]=values.billing.custom_limits_usd[product];if(values.billing.products)for(let product of values.billing.products){let type=product.type.toLowerCase();payload[`percentage_usage.${type}`]=product.percentage_usage,payload[`current_amount_usd.${type}`]=product.current_amount_usd,payload[`unit_amount_usd.${type}`]=product.unit_amount_usd,payload[`usage_limit.${type}`]=product.usage_limit,payload[`current_usage.${type}`]=product.current_usage,payload[`projected_usage.${type}`]=product.projected_usage,payload[`free_allocation.${type}`]=product.free_allocation}values.billing.billing_period&&(payload.billing_period_start=values.billing.billing_period.current_period_start,payload.billing_period_end=values.billing.billing_period.current_period_end),posthog_js__WEBPACK_IMPORTED_MODULE_12__.ZP.register(payload)}},showPurchaseCreditsModal:_ref24=>{let{isOpen}=_ref24;isOpen&&actions.reportCreditsModalShown()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref25=>{let{actions}=_ref25;actions.loadBilling(),actions.getInvoices()}),(0,kea_router__WEBPACK_IMPORTED_MODULE_4__.urlToAction)(_ref26=>{let{actions}=_ref26;return{"/*/billing":(_params,_search,hash)=>{if(hash.license&&(actions.setShowLicenseDirectInput(!0),actions.setActivateLicenseValues({license:hash.license}),actions.submitActivateLicense()),_search.products){let products=_search.products.split(",");actions.setScrollToProductKey(products[0])}_search.billing_error&&actions.setBillingAlert({status:"error",title:"Error",message:_search.billing_error}),actions.setRedirectPath(),actions.setIsOnboarding()},"*":()=>{actions.setRedirectPath(),actions.setIsOnboarding()}}})])},"./frontend/src/scenes/billing/billingProductLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>UNSUBSCRIBE_REASONS,cD:()=>billingProductLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),_billing_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/billing/billing-utils.ts"),_billingLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/billing/billingLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/billing/types.ts");let UNSUBSCRIBE_REASONS=[{reason:"Too expensive",question:"What will you be using instead?"},{reason:"Not getting enough value",question:"What prevented you from getting more value out of PostHog?"},{reason:"Not using the product",question:"Why are you not using the product?"},{reason:"Found a better alternative",question:"What service will you be moving to?"},{reason:"Poor customer support",question:"Please provide details on your support experience."},{reason:"Too difficult to use",question:"What was difficult to use?"},{reason:"Not enough hedgehogs",question:"How many hedgehogs do you need? (but really why are you leaving)"},{reason:"Other (let us know below!)",question:"Why are you leaving?"}],billingProductLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.product.type),(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","billing","billingProductLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_billingLogic__WEBPACK_IMPORTED_MODULE_7__.kr,["billing","isUnlicensedDebug","scrollToProductKey","unsubscribeError"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]],actions:[_billingLogic__WEBPACK_IMPORTED_MODULE_7__.kr,["updateBillingLimits","updateBillingLimitsSuccess","loadBilling","loadBillingSuccess","deactivateProduct","setProductSpecificAlert","setScrollToProductKey","deactivateProductSuccess"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setIsEditingBillingLimit:isEditingBillingLimit=>({isEditingBillingLimit}),setBillingLimitInput:billingLimitInput=>({billingLimitInput}),billingLoaded:!0,setShowTierBreakdown:showTierBreakdown=>({showTierBreakdown}),toggleIsPricingModalOpen:!0,toggleIsPlanComparisonModalOpen:highlightedFeatureKey=>({highlightedFeatureKey}),setSurveyResponse:(key,value)=>({key,value}),toggleSurveyReason:reason=>({reason}),reportSurveyShown:(surveyID,productType)=>({surveyID,productType}),reportSurveySent:(surveyID,surveyResponse)=>({surveyID,surveyResponse}),reportSurveyDismissed:surveyID=>({surveyID}),setSurveyID:surveyID=>({surveyID}),setBillingProductLoading:productKey=>({productKey}),initiateProductUpgrade:(product,plan,redirectPath)=>({plan,product,redirectPath}),handleProductUpgrade:(products,redirectPath)=>({products,redirectPath}),activateTrial:!0,cancelTrial:!0,setTrialModalOpen:isOpen=>({isOpen}),setTrialLoading:loading=>({loading}),setUnsubscribeModalStep:step=>({step}),resetUnsubscribeModalStep:!0,setHedgehogSatisfied:satisfied=>({satisfied}),triggerMoreHedgehogs:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({billingLimitInput:[{input:500},{setBillingLimitInput:(_,_ref)=>{let{billingLimitInput}=_ref;return{input:billingLimitInput}}}],isEditingBillingLimit:[!1,{setIsEditingBillingLimit:(_,_ref2)=>{let{isEditingBillingLimit}=_ref2;return isEditingBillingLimit}}],showTierBreakdown:[!1,{setShowTierBreakdown:(_,_ref3)=>{let{showTierBreakdown}=_ref3;return showTierBreakdown}}],isPricingModalOpen:[!1,{toggleIsPricingModalOpen:state=>!state}],isPlanComparisonModalOpen:[!1,{toggleIsPlanComparisonModalOpen:state=>!state}],surveyResponse:[{$survey_response_2:[],$survey_response:""},{setSurveyResponse:(state,_ref4)=>{let{key,value}=_ref4;return{...state,[key]:value}},toggleSurveyReason:(state,_ref5)=>{let{reason}=_ref5,reasons=state.$survey_response_2.includes(reason)?state.$survey_response_2.filter(r=>r!==reason):[...state.$survey_response_2,reason];return{...state,$survey_response_2:reasons}}}],unsubscribeReasonSurvey:[null,{setUnsubscribeReasonSurvey:(_,_ref6)=>{let{survey}=_ref6;return survey}}],surveyID:["",{setSurveyID:(_,_ref7)=>{let{surveyID}=_ref7;return surveyID}}],billingProductLoading:[null,{setBillingProductLoading:(_,_ref8)=>{let{productKey}=_ref8;return productKey}}],comparisonModalHighlightedFeatureKey:[null,{toggleIsPlanComparisonModalOpen:(_,_ref9)=>{let{highlightedFeatureKey}=_ref9;return highlightedFeatureKey||null}}],trialModalOpen:[!1,{setTrialModalOpen:(_,_ref10)=>{let{isOpen}=_ref10;return isOpen}}],trialLoading:[!1,{setTrialLoading:(_,_ref11)=>{let{loading}=_ref11;return loading}}],unsubscribeModalStep:[1,{setUnsubscribeModalStep:(_,_ref12)=>{let{step}=_ref12;return step},resetUnsubscribeModalStep:()=>1}],hedgehogSatisfied:[!1,{setHedgehogSatisfied:(_,_ref13)=>{let{satisfied}=_ref13;return satisfied}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)(_ref14=>{let{values}=_ref14;return{customLimitUsd:[(s,p)=>[s.billing,p.product],(billing,product)=>{var _billing$custom_limit;let customLimit=billing?.custom_limits_usd?.[product.type];return 0===customLimit||customLimit?customLimit:product.usage_key&&null!==(_billing$custom_limit=billing?.custom_limits_usd?.[product.usage_key])&&void 0!==_billing$custom_limit?_billing$custom_limit:null}],hasCustomLimitSet:[s=>[s.customLimitUsd],customLimitUsd=>(!!customLimitUsd||0===customLimitUsd)&&customLimitUsd>=0],currentAndUpgradePlans:[(_s,p)=>[p.product],product=>{let currentPlanIndex=product.plans.findIndex(plan=>plan.current_plan),currentPlan=currentPlanIndex>=0?product.plans?.[currentPlanIndex]:null,upgradePlan=values.isUnlicensedDebug?product.plans?.[product.plans.length-1]:product.plans?.[currentPlanIndex+1],downgradePlan=product.plans?.[currentPlanIndex-1];return{currentPlan,upgradePlan,downgradePlan}}],freeTier:[(_s,p)=>[p.product],product=>(product.subscribed&&product.tiered?product.tiers?.[0]?.unit_amount_usd==="0"?product.tiers?.[0]?.up_to:0:product.free_allocation)||0],billingLimitAsUsage:[(s,p)=>[s.billing,p.product,s.isEditingBillingLimit,s.billingLimitInput,s.customLimitUsd],(billing,product,isEditingBillingLimit,billingLimitInput,customLimitUsd)=>{let addonTiers=product.addons?.filter(addon=>addon.subscribed)?.map(addon=>addon.tiers),productAndAddonTiers=[product.tiers,...addonTiers].filter(Boolean);return product.tiers?isEditingBillingLimit?(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(`${billingLimitInput.input}`,productAndAddonTiers,billing?.discount_percent):(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(customLimitUsd?`${customLimitUsd}`:"",productAndAddonTiers,billing?.discount_percent):0}],billingGaugeItems:[(s,p)=>[p.product,s.billing,s.freeTier,s.billingLimitAsUsage],(product,billing,freeTier,billingLimitAsUsage)=>[billingLimitAsUsage&&billing?.discount_percent!==100?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.BillingLimit,text:"Billing limit",top:!0,value:billingLimitAsUsage||0}:void 0,freeTier?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.FreeTier,text:"Free tier limit",value:freeTier,top:!0}:void 0,product.projected_usage&&product.projected_usage>(product.current_usage||0)?{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.ProjectedUsage,text:"Projected",value:product.projected_usage||0,top:!1}:void 0,{type:_types__WEBPACK_IMPORTED_MODULE_8__.b.CurrentUsage,text:"Current",value:product.current_usage||0,top:!1}].filter(Boolean)],isAddonProduct:[(s,p)=>[s.billing,p.product],(billing,product)=>!!billing?.products?.some(p=>p.addons?.some(addon=>addon.type===product?.type))],unsubscribeReasonQuestions:[s=>[s.surveyResponse],surveyResponse=>surveyResponse.$survey_response_2.map(reason=>{let reasonObject=UNSUBSCRIBE_REASONS.find(r=>r.reason===reason);return reasonObject?.question}).join(" ").concat(" (required)")]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref15=>{let{actions,values,props}=_ref15;return{updateBillingLimitsSuccess:()=>{actions.billingLoaded()},billingLoaded:()=>{actions.setIsEditingBillingLimit(!1),actions.setBillingLimitInput(values.hasCustomLimitSet?values.customLimitUsd:function(product){let projectedAmount=parseInt(product.projected_amount_usd||"0");return product.tiers&&projectedAmount?1.5*projectedAmount:500}(props.product))},reportSurveyShown:_ref16=>{let{surveyID}=_ref16;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey shown",{$survey_id:surveyID}),actions.setSurveyID(surveyID)},reportSurveySent:_ref17=>{let{surveyID,surveyResponse}=_ref17;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey sent",{$survey_id:surveyID,...surveyResponse}),actions.setSurveyID("")},reportSurveyDismissed:_ref18=>{let{surveyID}=_ref18;posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("survey dismissed",{$survey_id:surveyID}),actions.setSurveyID("")},deactivateProductSuccess:async(_,breakpoint)=>{!values.unsubscribeError&&values.surveyID&&(actions.reportSurveySent(values.surveyID,values.surveyResponse),await breakpoint(400),document.getElementsByClassName("Navigation3000__scene")[0].scrollIntoView())},setScrollToProductKey:_ref19=>{let{scrollToProductKey}=_ref19;scrollToProductKey&&values.isAddonProduct&&scrollToProductKey===props.product.type&&setTimeout(()=>{props.productRef?.current&&props.productRef?.current.scrollIntoView({behavior:"smooth",block:"center"})},0)},initiateProductUpgrade:_ref20=>{let{plan,product,redirectPath}=_ref20;actions.setBillingProductLoading(product.type);let products=`${product.type}:${plan?.plan_key}`;actions.handleProductUpgrade(products,redirectPath)},handleProductUpgrade:_ref21=>{let{products,redirectPath}=_ref21;window.location.href=`/api/billing/activate?products=${products}${redirectPath&&`&redirect_path=${redirectPath}`}`},activateTrial:async(_,breakpoint)=>{actions.setTrialLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/billing/trials/activate",{type:"autosubscribe",target:props.product.type}),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Your trial has been activated!")}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("There was an error activating your trial. Please try again or contact support.")}finally{await breakpoint(400),window.location.reload(),actions.setTrialLoading(!1),actions.setTrialModalOpen(!1)}},cancelTrial:async()=>{actions.setTrialLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create("api/billing/trials/cancel"),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Your trial has been cancelled!")}catch(e){console.error(e),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("There was an error cancelling your trial. Please try again or contact support.")}finally{actions.loadBilling(),window.location.reload(),actions.setTrialLoading(!1)}},triggerMoreHedgehogs:async(_,breakpoint)=>{for(let i=0;i<5;i++)props.hogfettiTrigger?.(),await breakpoint(200)}}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref22=>{let{actions,props,values}=_ref22;return{billingLimitInput:{errors:_ref23=>{let{input}=_ref23;return{input:null===input||Number.isInteger(input)?input>25e3?"Please enter a number less than 25,000":void 0:"Please enter a whole number"}},submit:async _ref24=>{let{input}=_ref24,addonTiers="addons"in props.product?props.product.addons?.filter(addon=>addon.subscribed)?.map(addon=>addon.tiers):[],productAndAddonTiers=[props.product.tiers,...addonTiers].filter(Boolean),newAmountAsUsage=props.product.tiers?(0,_billing_utils__WEBPACK_IMPORTED_MODULE_6__.zu)(`${input}`,productAndAddonTiers,values.billing?.discount_percent):0;if(props.product.current_usage&&newAmountAsUsageactions.updateBillingLimits({[props.product.type]:input})},secondaryButton:{children:"I changed my mind"}});return}if(props.product.projected_usage&&newAmountAsUsageactions.updateBillingLimits({[props.product.type]:input})},secondaryButton:{children:"I changed my mind"}});return}actions.updateBillingLimits({[props.product.type]:input})},options:{alwaysShowErrors:!0}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.events)(_ref25=>{let{actions,values}=_ref25;return{afterMount:()=>{actions.setScrollToProductKey(values.scrollToProductKey),actions.billingLoaded()}}})])},"./frontend/src/scenes/billing/paymentEntryLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>paymentEntryLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/urls.ts");let paymentEntryLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)({path:["scenes","billing","PaymentEntryLogic"],actions:{setClientSecret:clientSecret=>({clientSecret}),setLoading:loading=>({loading}),setError:error=>({error}),initiateAuthorization:redirectPath=>({redirectPath}),pollAuthorizationStatus:paymentIntentId=>({paymentIntentId}),setAuthorizationStatus:status=>({status}),showPaymentEntryModal:!0,hidePaymentEntryModal:!0,setRedirectPath:redirectPath=>({redirectPath})},reducers:{clientSecret:[null,{setClientSecret:(_,_ref)=>{let{clientSecret}=_ref;return clientSecret}}],isLoading:[!1,{setLoading:(_,_ref2)=>{let{loading}=_ref2;return loading}}],error:[null,{setError:(_,_ref3)=>{let{error}=_ref3;return error}}],authorizationStatus:[null,{setAuthorizationStatus:(_,_ref4)=>{let{status}=_ref4;return status}}],paymentEntryModalOpen:[!1,{showPaymentEntryModal:()=>!0,hidePaymentEntryModal:()=>!1}],redirectPath:[null,{setRedirectPath:(_,_ref5)=>{let{redirectPath}=_ref5;return redirectPath}}]},listeners:_ref6=>{let{actions,values}=_ref6;return{initiateAuthorization:async _ref7=>{let{redirectPath}=_ref7;actions.setLoading(!0),actions.setError(null);try{let response=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.create("api/billing/activate/authorize");actions.setClientSecret(response.clientSecret),actions.setRedirectPath(redirectPath),actions.setLoading(!1)}catch(error){actions.setError("Failed to initialize payment")}},pollAuthorizationStatus:async _ref8=>{let{paymentIntentId}=_ref8,attempts=0,poll=async()=>{try{let urlParams=new URLSearchParams(window.location.search),searchPaymentIntentId=urlParams.get("payment_intent"),response=await lib_api__WEBPACK_IMPORTED_MODULE_1__.ZP.create("api/billing/activate/authorize/status",{payment_intent_id:paymentIntentId||searchPaymentIntentId}),status=response.status;if(actions.setAuthorizationStatus(status),"success"===status){values.redirectPath?window.location.pathname=values.redirectPath:window.location.pathname=scenes_urls__WEBPACK_IMPORTED_MODULE_2__.j.organizationBilling();return}if("failed"===status){actions.setError("Payment failed");return}++attempts<30?setTimeout(()=>void poll(),2e3):actions.setError("Payment status check timed out")}catch(error){actions.setError("Failed to check payment status")}finally{actions.setLoading(!1),actions.setAuthorizationStatus(null),actions.setClientSecret(null),actions.setRedirectPath(null)}};await poll()}}}})},"./frontend/src/scenes/billing/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>BillingGaugeItemKind});let BillingGaugeItemKind=function(BillingGaugeItemKind){return BillingGaugeItemKind.FreeTier="free_tier",BillingGaugeItemKind.CurrentUsage="current_usage",BillingGaugeItemKind.ProjectedUsage="projected_usage",BillingGaugeItemKind.BillingLimit="billing_limit",BillingGaugeItemKind}({})},"./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>CohortCriteriaRowBuilder_CohortCriteriaRowBuilder,r:()=>LogicalRowDivider});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CohortCriteriaRowBuilder=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.scss"),CohortCriteriaRowBuilder_default=__webpack_require__.n(CohortCriteriaRowBuilder),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CohortCriteriaRowBuilder_default(),options),CohortCriteriaRowBuilder_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),cohortEditLogic=__webpack_require__("./frontend/src/scenes/cohorts/cohortEditLogic.ts"),constants=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),types=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),cohortUtils=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),src_types=__webpack_require__("./frontend/src/types.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function CohortCriteriaRowBuilder_CohortCriteriaRowBuilder(_ref){let{id,type,groupIndex,index,logicalOperator,criteria,hideDeleteIcon=!1,onChangeType}=_ref,{setCriteria,duplicateFilter,removeFilter}=(0,index_esm.useActions)((0,cohortEditLogic.B)({id})),rowShape=constants.ng[type],renderFieldComponent=(_field,i)=>{var _field$fieldKey;return(0,jsx_runtime.jsx)("div",{children:constants.fM[_field.type]({fieldKey:_field.fieldKey,criteria,..._field.type===types.vA.Text?{value:_field.defaultValue}:{},..._field.groupTypeFieldKey?{groupTypeFieldKey:_field.groupTypeFieldKey}:{},onChange:newCriteria=>setCriteria(newCriteria,groupIndex,index),groupIndex,index})},null!==(_field$fieldKey=_field.fieldKey)&&void 0!==_field$fieldKey?_field$fieldKey:i)};return(0,jsx_runtime.jsxs)("div",{className:"CohortCriteriaRow",children:[0!==index&&(0,jsx_runtime.jsx)(LogicalRowDivider,{logicalOperator:logicalOperator}),(0,jsx_runtime.jsx)(lib.Field,{name:"id",template:_ref2=>{let{error,kids}=_ref2;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria",error&&"CohortCriteriaRow__Criteria--error"),children:[kids,error&&(0,jsx_runtime.jsx)(LemonBanner.V,{className:"my-2",type:"error",children:error})]})})},children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-nowrap items-center mb-1",children:[(0,jsx_runtime.jsx)(lib.Field,{name:"value",template:_ref3=>{let{error,kids}=_ref3;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria__Field",error&&"CohortCriteriaRow__Criteria__Field--error"),children:kids})})},children:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{children:constants.fM[types.vA.Behavioral]({fieldKey:"value",criteria,onChange:newCriteria=>{var _newCriteria$value;setCriteria((0,cohortUtils.d5)(newCriteria,!0),groupIndex,index),onChangeType?.(null!==(_newCriteria$value=newCriteria.value)&&void 0!==_newCriteria$value?_newCriteria$value:src_types.G2.PerformEvent)}})})})}),(0,jsx_runtime.jsx)("div",{className:"CohortCriteriaRow__inline-divider"}),(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconCopy,{}),onClick:()=>duplicateFilter(groupIndex,index)}),!hideDeleteIcon&&(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconTrash,{}),onClick:()=>removeFilter(groupIndex,index)})]}),(0,jsx_runtime.jsxs)("div",{className:"flex",children:[(0,jsx_runtime.jsx)("span",{className:"CohortCriteriaRow__Criteria__arrow",children:"↳"}),(0,jsx_runtime.jsx)("div",{className:"flex flex-wrap items-center min-w-0",children:rowShape.fields.map((field,i)=>!field.hide&&(field.fieldKey?(0,jsx_runtime.jsx)(lib.Field,{name:field.fieldKey,template:_ref4=>{let{error,kids}=_ref4;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("CohortCriteriaRow__Criteria__Field",error&&"CohortCriteriaRow__Criteria__Field--error"),children:kids})})},children:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:renderFieldComponent(field,i)})},i):(0,jsx_runtime.jsx)("div",{className:"CohortCriteriaRow__Criteria__Field",children:renderFieldComponent(field,i)},i)))})]})]})})]})}function LogicalRowDivider(_ref5){let{logicalOperator}=_ref5;return(0,jsx_runtime.jsx)(src.p2,{className:"logical-row-divider my-4",label:logicalOperator})}},"./frontend/src/scenes/cohorts/CohortFilters/CohortField.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PY:()=>CohortEventFiltersField,s:()=>CohortNumberField,Lb:()=>CohortPersonPropertiesValuesField,af:()=>CohortRelativeAndExactTimeField,Y4:()=>CohortSelectorField,C$:()=>CohortTaxonomicField,J_:()=>CohortTextField});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),CohortField=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortField.scss"),CohortField_default=__webpack_require__.n(CohortField),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(CohortField_default(),options),CohortField_default().locals;var clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),DateFilter=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx"),PropertyValue=__webpack_require__("./frontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx"),PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),PropertyKeyInfo=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TaxonomicPopover=__webpack_require__("./frontend/src/lib/components/TaxonomicPopover/TaxonomicPopover.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonInput=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInput/LemonInput.tsx"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),constants=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),CohortFilters_types=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),cohortUtils=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),cohortsModel=__webpack_require__("./frontend/src/models/cohortsModel.ts"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),src_types=__webpack_require__("./frontend/src/types.ts");let cohortFieldLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","cohorts","CohortFilters","cohortFieldLogic"]),(0,index_esm.key)(props=>`${props.cohortFilterLogicKey}`),(0,index_esm.props)({}),(0,index_esm.connect)({values:[groupsModel.$,["groupTypes","aggregationLabel"],userLogic.userLogic,["hasAvailableFeature"]]}),(0,index_esm.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;props.fieldKey&&!(0,utils.h0)(props.criteria,oldProps.criteria)&&actions.onChange(props.criteria)}),(0,index_esm.actions)({onChange:newField=>({newField})}),(0,index_esm.reducers)(_ref2=>{let{props}=_ref2;return{value:[(0,cohortUtils.Nz)(props.criteria,props.fieldKey),{onChange:(_,_ref3)=>{let{newField}=_ref3;return(0,cohortUtils.Nz)({...props.criteria,...newField},props.fieldKey)}}]}}),(0,index_esm.selectors)({hasBehavioralCohortFiltering:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(src_types.P$.BEHAVIORAL_COHORT_FILTERING)],fieldOptionGroups:[s=>[(_,props)=>props.fieldOptionGroupTypes,s.groupTypes,s.aggregationLabel,s.hasBehavioralCohortFiltering],(fieldOptionGroupTypes,groupTypes,aggregationLabel,hasBehavioralCohortFiltering)=>{var _fieldOptionGroupType;let fieldOptions=hasBehavioralCohortFiltering?{...constants.FN,...constants.Dx}:constants.FN,allGroups={...fieldOptions,[CohortFilters_types.Wy.Actors]:{label:"Actors",type:CohortFilters_types.Wy.Actors,values:{[src_types.MK.Person]:{label:"Persons"},...Object.fromEntries(Array.from(groupTypes.values()).map(type=>[`${src_types.MK.GroupPrefix}_${type.group_type_index}`,{label:aggregationLabel(type.group_type_index).plural}]).filter(Boolean))}}};return[...null!==(_fieldOptionGroupType=fieldOptionGroupTypes?.map(type=>allGroups[type]))&&void 0!==_fieldOptionGroupType?_fieldOptionGroupType:[]]}],currentOption:[s=>[s.fieldOptionGroups,s.value],(fieldOptionGroups,value)=>value&&"string"==typeof value?fieldOptionGroups.reduce((accumulator,group)=>({...accumulator,...group.values}),{})?.[value]:null],calculatedValueLoading:[(s,p)=>[s.value,p.criteria,p.fieldKey,cohortsModel.Q.selectors.cohortsLoading,actionsModel.D.selectors.actionsLoading],(value,criteria,fieldKey,cohortsModelLoading,actionsModelLoading)=>taxonomicGroupType=>criteria.type===CohortFilters_types.y4.Cohort&&"value_property"===fieldKey&&"number"==typeof value&&cohortsModelLoading||taxonomicGroupType===types.t.Actions&&"number"==typeof value&&actionsModelLoading],calculatedValue:[(s,p)=>[s.value,p.criteria,p.fieldKey,cohortsModel.Q.selectors.cohortsLoading,actionsModel.D.selectors.actionsLoading],(value,criteria,fieldKey,cohortsModelLoading,actionsModelLoading)=>taxonomicGroupType=>{var _cohortsModel$findMou,_actionsModel$findMou;return criteria.type===CohortFilters_types.y4.Cohort&&"value_property"===fieldKey&&"number"==typeof value?cohortsModelLoading?"Loading...":null!==(_cohortsModel$findMou=cohortsModel.Q.findMounted()?.values?.cohortsById?.[value]?.name)&&void 0!==_cohortsModel$findMou?_cohortsModel$findMou:`Cohort ${value}`:taxonomicGroupType===types.t.Actions&&"number"==typeof value?actionsModelLoading?"Loading...":null!==(_actionsModel$findMou=actionsModel.D.findMounted()?.values?.actionsById?.[value]?.name)&&void 0!==_actionsModel$findMou?_actionsModel$findMou:`Action ${value}`:value}]}),(0,index_esm.listeners)(_ref4=>{let{props}=_ref4;return{onChange:_ref5=>{let{newField}=_ref5;props.onChange?.(cohortUtils.K7(newField))}}})]);var jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let uniqueMemoizedIndex=0,useCohortFieldLogic=props=>{let cohortFilterLogicKey=(0,react.useMemo)(()=>props.cohortFilterLogicKey||`cohort-filter-${uniqueMemoizedIndex++}`,[props.cohortFilterLogicKey]);return{logic:cohortFieldLogic({...props,cohortFilterLogicKey})}};function CohortSelectorField(_ref){let{fieldKey,cohortFilterLogicKey,criteria,fieldOptionGroupTypes,placeholder,onChange:_onChange}=_ref,{logic}=useCohortFieldLogic({fieldKey,cohortFilterLogicKey,criteria,fieldOptionGroupTypes,onChange:_onChange}),{fieldOptionGroups,currentOption,value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(LemonButton.$,{type:"secondary",sideIcon:void 0,"data-attr":`cohort-selector-field-${fieldKey}`,dropdown:{className:"Popover__CohortField",placement:"bottom-start",overlay:(0,jsx_runtime.jsx)("div",{className:"CohortField__dropdown",children:fieldOptionGroups.map((_ref2,i)=>{let{label,type:groupKey,values}=_ref2;return 0!=Object.keys(values).length?(0,jsx_runtime.jsxs)("div",{children:[0!==i&&(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)("h5",{children:label}),Object.entries(values).map(_ref3=>{let[_value,option]=_ref3;return(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{onChange({[fieldKey]:_value})},active:_value==value,fullWidth:!0,"data-attr":`cohort-${groupKey}-${_value}-type`,children:option.label},_value)})]},i):null})})},children:(0,jsx_runtime.jsx)("span",{className:"font-medium",children:currentOption?.label||(0,jsx_runtime.jsx)("span",{className:"text-muted",children:placeholder})})})}function CohortTaxonomicField(_ref4){let{fieldKey,groupTypeFieldKey="event_type",cohortFilterLogicKey,criteria,taxonomicGroupTypes=[types.t.Events,types.t.Actions],placeholder="Choose event",onChange:_onChange}=_ref4,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{calculatedValue,calculatedValueLoading}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic),groupType=criteria[groupTypeFieldKey];return(0,jsx_runtime.jsx)(TaxonomicPopover.b,{className:"CohortField",groupType:groupType,loading:calculatedValueLoading(groupType),value:calculatedValue(groupType),onChange:(v,g)=>{onChange({[fieldKey]:v,[groupTypeFieldKey]:g})},excludedProperties:{[types.t.Events]:[null]},groupTypes:taxonomicGroupTypes,placeholder:placeholder,"data-attr":`cohort-taxonomic-field-${fieldKey}`,renderValue:value=>value?(0,jsx_runtime.jsx)(PropertyKeyInfo.T,{value:value,type:groupType}):(0,jsx_runtime.jsx)("span",{className:"text-muted",children:placeholder})})}function CohortPersonPropertiesValuesField(_ref5){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange,propertyKey,operator}=_ref5,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(PropertyValue.O,{operator:operator||src_types.WV.Exact,propertyKey:propertyKey,type:src_types.FT.Person,value:value,onSet:newValue=>{onChange({[fieldKey]:newValue})},placeholder:"Enter value..."})}function CohortEventFiltersField(_ref6){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange,groupIndex,index}=_ref6,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic),componentRef=(0,react.useRef)(null),valueExists=(value||[]).length>0;return(0,react.useEffect)(()=>{let parent=componentRef.current?.closest(".CohortCriteriaRow__Criteria__Field");parent&&(valueExists?parent.classList.add("basis-full"):parent.classList.remove("basis-full"))},[componentRef,value]),(0,jsx_runtime.jsx)("div",{ref:componentRef,children:(0,jsx_runtime.jsx)(PropertyFilters.t,{propertyFilters:value||[],taxonomicGroupTypes:[types.t.EventProperties,types.t.EventFeatureFlags,types.t.Elements,types.t.HogQLExpression],onChange:newValue=>{onChange({[fieldKey]:newValue})},pageKey:`${fieldKey}-${groupIndex}-${index}`,eventNames:criteria?.key?[criteria?.key]:[],disablePopover:!0,hasRowOperator:!!valueExists,sendAllKeyUpdates:!0})})}function CohortRelativeAndExactTimeField(_ref7){let{fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}=_ref7,{logic}=useCohortFieldLogic({fieldKey,criteria,cohortFilterLogicKey,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(DateFilter.f,{dateFrom:String(value),onChange:fromDate=>{onChange({[fieldKey]:fromDate})},max:1e3,isFixedDateMode:!0,allowedRollingDateOptions:["days","weeks","months","years"],showCustom:!0,dateOptions:[{key:"Last 7 days",values:["-7d"],getFormattedDate:date=>(0,utils.p6)(date.subtract(7,"d")),defaultInterval:"day"},{key:"Last 30 days",values:["-30d"],getFormattedDate:date=>(0,utils.p6)(date.subtract(14,"d")),defaultInterval:"day"}],size:"medium",makeLabel:(_,startOfRange)=>(0,jsx_runtime.jsxs)("span",{className:"hide-when-small",children:["Matches all values after ",startOfRange," if evaluated today."]})})}function CohortTextField(_ref8){let{value}=_ref8;return(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("CohortField","CohortField__CohortTextField"),children:value})}function CohortNumberField(_ref9){let{fieldKey,cohortFilterLogicKey,criteria,onChange:_onChange}=_ref9,{logic}=useCohortFieldLogic({fieldKey,cohortFilterLogicKey,criteria,onChange:_onChange}),{value}=(0,index_esm.useValues)(logic),{onChange}=(0,index_esm.useActions)(logic);return(0,jsx_runtime.jsx)(LemonInput.D,{type:"number",value:null!=value?value:void 0,onChange:nextNumber=>{onChange({[fieldKey]:nextNumber})},min:1,step:1,className:(0,clsx_m.default)("CohortField","CohortField__CohortNumberField")})}},"./frontend/src/scenes/cohorts/CohortFilters/constants.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Dx:()=>SCALE_FIELD_VALUES,FN:()=>FIELD_VALUES,GK:()=>COHORT_TYPE_OPTIONS,Gp:()=>COHORT_EVENT_TYPES_WITH_EXPLICIT_DATETIME,Z9:()=>NEW_CRITERIA,eC:()=>NEW_CRITERIA_GROUP,fM:()=>renderField,hJ:()=>CRITERIA_VALIDATIONS,ng:()=>ROWS,x_:()=>BEHAVIORAL_TYPE_TO_LABEL,yK:()=>NEW_COHORT});var lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/CohortField.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let FIELD_VALUES={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation]:{label:"Event Aggregation",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.vN.TotalCount]:{label:"Total count"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers]:{label:"Unique users"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.WeeklyActiveUsers]:{label:"Weekly active users"},[_types__WEBPACK_IMPORTED_MODULE_4__.vN.MonthlyActiveUsers]:{label:"Monthly active users"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation]:{label:"Property Aggregation",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Average]:{label:"Average"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Sum]:{label:"Sum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Minimum]:{label:"Minimum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Maximum]:{label:"Maximum"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.Median]:{label:"Median"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P90]:{label:"90th percentile"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P95]:{label:"95th percentile"},[_types__WEBPACK_IMPORTED_MODULE_4__.O4.P99]:{label:"99th percentile"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors]:{label:"Actors",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.MK.Person]:{label:"Persons"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral]:{label:"Behavioral",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{label:"Completed event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{label:"Did not complete event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{label:"Completed an event multiple times"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral]:{label:"Person Properties",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty]:{label:"Have the property"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotHaveProperty]:{label:"Do not have the property"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral]:{label:"Cohorts",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort]:{label:"In cohort"},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.NotInCohort]:{label:"Not in cohort"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]:{label:"Lifecycle",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral,values:{}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits]:{label:"Units",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day]:{label:"days"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Week]:{label:"weeks"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Month]:{label:"months"},[_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Year]:{label:"years"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators]:{label:"Date Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.kR.BeforeTheLast]:{label:"before the last"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Between]:{label:"between"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.NotBetween]:{label:"not between"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.OnTheDate]:{label:"on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.NotOnTheDate]:{label:"not on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Since]:{label:"since"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.Before]:{label:"before"},[_types__WEBPACK_IMPORTED_MODULE_4__.kR.IsSet]:{label:"is set"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators]:{label:"Date Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateExact]:{label:"on the date"},[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateAfter]:{label:"since"},[_types__WEBPACK_IMPORTED_MODULE_4__.Hh.IsDateBefore]:{label:"before"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators]:{label:"Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact]:{label:"equals"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNot]:{label:"does not equal"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IContains]:{label:"contains"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotIContains]:{label:"does not contain"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Regex]:{label:"matches regex"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotRegex]:{label:"does not match regex"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThan]:{label:"greater than"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThanOrEqual]:{label:"greater than or equal to"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThan]:{label:"less than"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThanOrEqual]:{label:"less than or equal to"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsSet]:{label:"is set"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNotSet]:{label:"is not set"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Between]:{label:"between"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.NotBetween]:{label:"not between"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Minimum]:{label:"minimum"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Maximum]:{label:"maximum"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators]:{label:"Operators",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact]:{label:"exactly"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.GreaterThanOrEqual]:{label:"at least"},[_types__WEBPACK_IMPORTED_MODULE_4__.WV.LessThanOrEqual]:{label:"at most"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions]:{label:"Value Options",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.MostRecent]:{label:"most recent value"},[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.Previous]:{label:"previous value"},[_types__WEBPACK_IMPORTED_MODULE_4__.uJ.OnDate]:{label:"value on the date"}}}},SCALE_FIELD_VALUES={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral]:{label:"Behavioral",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{label:"Completed event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{label:"Did not complete event"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{label:"Completed an event multiple times"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents]:{label:"Completed a sequence of events"},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformSequenceEvents]:{label:"Did not complete a sequence of events"}}},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]:{label:"Lifecycle",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral,values:{[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime]:{label:"Completed an event for the first time"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly]:{label:"Completed an event regularly"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent]:{label:"Stopped doing an event"},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain]:{label:"Started doing an event again"}}}},ROWS={[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformedEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,negation:!0,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformMultipleEvents,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"event_filters",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"operator_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"times after"},{fieldKey:"explicit_datetime",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime,defaultValue:"-30d"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"followed by"},{fieldKey:"seq_event",groupTypeFieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"within"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the initial event"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotPerformSequenceEvents]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformSequenceEvents,negation:!0,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"followed by"},{fieldKey:"seq_event",groupTypeFieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"seq_event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"within"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the initial event"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty,negation:!1,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.G2.NotHaveProperty]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.HaveProperty,negation:!0,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort,negation:!1,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId,defaultValue:"id",hide:!0},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.Vb.NotInCohort]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_4__.Vb.InCohort,negation:!0,fields:[{fieldKey:"key",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId,defaultValue:"id",hide:!0},{fieldKey:"value_property",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventFirstTime,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.PerformEventRegularly,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{fieldKey:"operator",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.WV.Exact},{fieldKey:"operator_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"times per"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:1},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"period for at least"},{fieldKey:"min_periods",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:3},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"of the last"},{fieldKey:"total_periods",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:5},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"periods"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.StopPerformEvent,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"but had done it in the"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"prior to now"}]},[_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain]:{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.NE.StartPerformEventAgain,negation:!1,fields:[{fieldKey:"key",groupTypeFieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions},{fieldKey:"event_type",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType,defaultValue:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,hide:!0},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"in the last"},{fieldKey:"seq_time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"15"},{fieldKey:"seq_time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"but had not done it in the"},{fieldKey:"time_value",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number,defaultValue:"30"},{fieldKey:"time_interval",type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit,defaultValue:_types__WEBPACK_IMPORTED_MODULE_4__.Xy.Day},{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text,defaultValue:"prior to now"}]}},COHORT_EVENT_TYPES_WITH_EXPLICIT_DATETIME=Object.entries(ROWS).filter(_ref=>{let[_,row]=_ref;return row.fields.some(field=>field.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime)}).map(_ref2=>{let[eventType,_]=_ref2;return eventType}),renderField={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Behavioral]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Aggregation]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventAggregation,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PropertyAggregation]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Actors]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.Actors]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.TimeUnits]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.DateOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.DateOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.MathOperators,scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.SingleFieldDateOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventsAndActionsMathOperators]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Value]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Y4,{...p,fieldOptionGroupTypes:[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.ValueOptions]})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Text]:function _renderField(p){var _p$value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.J_,{...p,value:String(null!==(_p$value=p?.value)&&void 0!==_p$value?_p$value:"")})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Actions],placeholder:"Choose event or action"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.PersonProperties],placeholder:"Choose person property"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.PY,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues]:function _renderField(p){var _p$criteria$operator;return p.criteria.operator&&[_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_4__.WV.IsNotSet].includes(p.criteria.operator)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.Lb,{...p,propertyKey:p.criteria.key,operator:null!==(_p$criteria$operator=p.criteria.operator)&&void 0!==_p$criteria$operator?_p$criteria$operator:void 0})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.s,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.s,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.C$,{...p,taxonomicGroupTypes:[lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Cohorts],placeholder:"Choose cohort"})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime]:function _renderField(p){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(scenes_cohorts_CohortFilters_CohortField__WEBPACK_IMPORTED_MODULE_2__.af,{...p})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType]:function _renderField(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{})},[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId]:function _renderField(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{})}},CRITERIA_VALIDATIONS={[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActions]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventsAndActions,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventFilters]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventFilters,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonProperties]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyPersonProperties,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.PersonPropertyValues]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyPersonPropertyValues,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventType]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyEventType,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Number]:d=>Number(d)>1?void 0:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyNumber,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.NumberTicker]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyNumberTicker,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.TimeUnit]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyTimeUnit,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.MathOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyMathOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.EventsAndActionsMathOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyMathOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.RelativeAndExactTime]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyRelativeAndExactTime,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortId]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyCohortId,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.CohortValues]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyCohortValues,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Value]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyValue,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.DateOperator]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyDateOperator,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Actors]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyActors,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Aggregation]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyAggregation,[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.vA.Behavioral]:()=>scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Rx.EmptyBehavioral},COHORT_TYPE_OPTIONS=[{value:lib_constants__WEBPACK_IMPORTED_MODULE_1__.ow.Static,label:"Static \xb7 Updated manually"},{value:lib_constants__WEBPACK_IMPORTED_MODULE_1__.ow.Dynamic,label:"Dynamic \xb7 Updates automatically"}],NEW_CRITERIA={type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_4__.G2.PerformEvent,event_type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_0__.t.Events,explicit_datetime:"-30d"},NEW_CRITERIA_GROUP={id:Math.random().toString().substr(2,5),type:_types__WEBPACK_IMPORTED_MODULE_4__.J2.Or,values:[NEW_CRITERIA]},NEW_COHORT={id:"new",groups:[{id:Math.random().toString().substr(2,5),matchType:lib_constants__WEBPACK_IMPORTED_MODULE_1__.pt,properties:[]}],filters:{properties:{id:Math.random().toString().substr(2,5),type:_types__WEBPACK_IMPORTED_MODULE_4__.J2.Or,values:[NEW_CRITERIA_GROUP]}}},BEHAVIORAL_TYPE_TO_LABEL={...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.PersonPropertyBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.CohortBehavioral].values,...FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral].values,...SCALE_FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.EventBehavioral].values,...SCALE_FIELD_VALUES[scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_3__.Wy.LifecycleBehavioral].values}},"./frontend/src/scenes/cohorts/CohortFilters/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rx:()=>CohortClientErrors,Wy:()=>FieldOptionsType,vA:()=>FilterType,y4:()=>BehavioralFilterKey});let FilterType=function(FilterType){return FilterType.Behavioral="behavioral",FilterType.Aggregation="aggregation",FilterType.Actors="actors",FilterType.TimeUnit="timeUnit",FilterType.DateOperator="dateOperator",FilterType.MathOperator="mathOperator",FilterType.EventsAndActionsMathOperator="eventsAndActionsMathOperator",FilterType.Value="value",FilterType.Text="text",FilterType.EventsAndActions="eventsAndActions",FilterType.RelativeAndExactTime="relativeAndExactTime",FilterType.EventFilters="eventFilters",FilterType.PersonProperties="personProperties",FilterType.PersonPropertyValues="personPropertyValues",FilterType.EventType="eventType",FilterType.Number="number",FilterType.NumberTicker="numberTicker",FilterType.CohortValues="cohortValues",FilterType.CohortId="cohortId",FilterType}({}),FieldOptionsType=function(FieldOptionsType){return FieldOptionsType.EventAggregation="eventAggregation",FieldOptionsType.PropertyAggregation="propertyAggregation",FieldOptionsType.Actors="actors",FieldOptionsType.EventBehavioral="eventBehavioral",FieldOptionsType.PersonPropertyBehavioral="personPropertyBehavioral",FieldOptionsType.CohortBehavioral="cohortBehavioral",FieldOptionsType.LifecycleBehavioral="lifecycleBehavioral",FieldOptionsType.TimeUnits="timeUnits",FieldOptionsType.DateOperators="dateOperators",FieldOptionsType.SingleFieldDateOperators="singleFieldDateOperators",FieldOptionsType.MathOperators="mathOperators",FieldOptionsType.ValueOptions="valueOptions",FieldOptionsType.EventsAndActionsMathOperators="eventsAndActionsMathOperators",FieldOptionsType}({}),BehavioralFilterKey=function(BehavioralFilterKey){return BehavioralFilterKey.Behavioral="behavioral",BehavioralFilterKey.Cohort="cohort",BehavioralFilterKey.Person="person",BehavioralFilterKey}({}),CohortClientErrors=function(CohortClientErrors){return CohortClientErrors.NegationCriteriaMissingOther="Negation criteria can only be used when matching all criteria (AND), and must be accompanied by at least one positive matching criteria.",CohortClientErrors.NegationCriteriaCancel="These criteria cancel each other out, and would result in no matching persons.",CohortClientErrors.PeriodTimeMismatch="The lower bound period value must not be greater than the upper bound value.",CohortClientErrors.SequentialTimeMismatch="The lower bound period sequential time value must not be greater than the upper bound time value.",CohortClientErrors.EmptyEventsAndActions="Event or action cannot be empty.",CohortClientErrors.EmptyEventFilters="Event filters cannot be empty.",CohortClientErrors.EmptyPersonProperties="Person property name cannot be empty.",CohortClientErrors.EmptyPersonPropertyValues="Person property value cannot be empty",CohortClientErrors.EmptyEventType="Event type cannot be empty.",CohortClientErrors.EmptyNumber="Period values must be at least 1 day and cannot be empty.",CohortClientErrors.EmptyNumberTicker="Number cannot be empty.",CohortClientErrors.EmptyTimeUnit="Time interval cannot be empty.",CohortClientErrors.EmptyRelativeAndExactTime="Time value cannot be empty.",CohortClientErrors.EmptyMathOperator="Math operator cannot be empty.",CohortClientErrors.EmptyCohortId="Cohort id cannot be empty.",CohortClientErrors.EmptyCohortValues="Cohort value cannot be empty.",CohortClientErrors.EmptyValue="Event property value selector cannot be empty.",CohortClientErrors.EmptyDateOperator="Date cannot be empty or invalid.",CohortClientErrors.EmptyActors="Actors selector cannot be empty.",CohortClientErrors.EmptyAggregation="Aggregation selector cannot be empty.",CohortClientErrors.EmptyBehavioral="Behavioral selector cannot be empty.",CohortClientErrors}({})},"./frontend/src/scenes/cohorts/cohortEditLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>cohortEditLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/cohorts/cohortUtils.tsx"),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/persons/personsLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/models/cohortsModel.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./frontend/src/types.ts");let cohortEditLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.id||"new"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","cohorts","cohortLogicEdit"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({actions:[lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_7__.vx,["reportExperimentExposureCohortEdited"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({saveCohort:function(){let cohortParams=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{cohortParams}},setCohort:cohort=>({cohort}),deleteCohort:!0,fetchCohort:id=>({id}),setCohortMissing:!0,onCriteriaChange:(newGroup,id)=>({newGroup,id}),setPollTimeout:pollTimeout=>({pollTimeout}),checkIfFinishedCalculating:cohort=>({cohort}),setOuterGroupsType:type=>({type}),setInnerGroupType:(type,groupIndex)=>({type,groupIndex}),duplicateFilter:(groupIndex,criteriaIndex)=>({groupIndex,criteriaIndex}),addFilter:groupIndex=>({groupIndex}),removeFilter:(groupIndex,criteriaIndex)=>({groupIndex,criteriaIndex}),setCriteria:(newCriteria,groupIndex,criteriaIndex)=>({newCriteria,groupIndex,criteriaIndex}),setQuery:query=>({query}),duplicateCohort:asStatic=>({asStatic})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref=>{let{props}=_ref;return{cohort:[scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,{setOuterGroupsType:(state,_ref2)=>{let{type}=_ref2;return{...state,filters:{properties:{...state.filters.properties,type}}}},setInnerGroupType:(state,_ref3)=>{let{type,groupIndex}=_ref3;return(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>groupList.map((group,groupI)=>groupI===groupIndex?{...group,type}:group))},duplicateFilter:(state,_ref4)=>{let{groupIndex,criteriaIndex}=_ref4;return void 0!==criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList.slice(0,criteriaIndex),criteriaList[criteriaIndex],...criteriaList.slice(criteriaIndex)],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList.slice(0,groupIndex),groupList[groupIndex],...groupList.slice(groupIndex)])},addFilter:(state,_ref5)=>{let{groupIndex}=_ref5;return void 0!==groupIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList,scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.Z9],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList,scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.eC])},removeFilter:(state,_ref6)=>{let{groupIndex,criteriaIndex}=_ref6;return void 0!==criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>[...criteriaList.slice(0,criteriaIndex),...criteriaList.slice(criteriaIndex+1)],groupIndex):(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.fQ)(state,groupList=>[...groupList.slice(0,groupIndex),...groupList.slice(groupIndex+1)])},setCriteria:(state,_ref7)=>{let{newCriteria,groupIndex,criteriaIndex}=_ref7;return(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.KE)(state,criteriaList=>criteriaList.map((oldCriteria,criteriaI)=>(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.tz)(oldCriteria)?oldCriteria:criteriaI===criteriaIndex?(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.d5)({...oldCriteria,...newCriteria}):oldCriteria),groupIndex)}}],cohortMissing:[!1,{setCohortMissing:()=>!0}],pollTimeout:[null,{setPollTimeout:(_,_ref8)=>{let{pollTimeout}=_ref8;return pollTimeout}}],query:[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.DataTableNode,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.ActorsQuery,fixedProperties:[{type:_types__WEBPACK_IMPORTED_MODULE_15__.FT.Cohort,key:"id",value:parseInt(String(props.id))}]},full:!0,showPropertyFilter:!1,showEventFilter:!1},{setQuery:(state,_ref9)=>{let{query}=_ref9;return(0,_queries_utils__WEBPACK_IMPORTED_MODULE_14__.TC)(query)?query:state}}]}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref10=>{let{actions}=_ref10;return{cohort:{defaults:scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,errors:_ref11=>{let{id,name,csv,is_static,filters}=_ref11;return{name:name?void 0:"Cohort name cannot be empty",csv:is_static&&"new"===id&&!csv?"You need to upload a CSV file":null,filters:{properties:{values:is_static?void 0:filters.properties.values.map(scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.yn)}}}},submit:cohort=>{actions.saveCohort(cohort)}}}}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref12=>{let{actions,values,key}=_ref12;return{cohort:[scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK,{setCohort:_ref13=>{let{cohort}=_ref13;return(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)},fetchCohort:async(_ref14,breakpoint)=>{let{id}=_ref14;try{let cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.get(id);return breakpoint(),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),actions.checkIfFinishedCalculating(cohort),(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)}catch(error){return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to fetch cohort"),actions.setCohortMissing(),values.cohort}},saveCohort:async(_ref15,breakpoint)=>{let{cohortParams}=_ref15,cohort={...cohortParams},existingCohort=values.cohort,cohortFormData=(0,scenes_cohorts_cohortUtils__WEBPACK_IMPORTED_MODULE_9__.A2)(cohort);try{"new"!==cohort.id?(cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.update(cohort.id,cohortFormData),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),cohort.experiment_set&&cohort.experiment_set.length>0&&actions.reportExperimentExposureCohortEdited(existingCohort,cohort)):(cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.create(cohortFormData),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.cohortCreated(cohort))}catch(error){return breakpoint(),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to save cohort"),values.cohort}return cohort.is_calculating=!0,breakpoint(),delete cohort.csv,actions.setCohort(cohort),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.success("Cohort saved. Please wait up to a few minutes for it to be calculated",{toastId:`cohort-saved-${key}`}),actions.checkIfFinishedCalculating(cohort),(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)},onCriteriaChange:_ref16=>{let{newGroup,id}=_ref16,cohort={...values.cohort},index=cohort.groups.findIndex(group=>group.id===id);return newGroup.matchType?cohort.groups[index]={id:cohort.groups[index].id,matchType:lib_constants__WEBPACK_IMPORTED_MODULE_5__.Cd,...newGroup}:cohort.groups[index]={...cohort.groups[index],...newGroup},(0,_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.k)(cohort)}}],duplicatedCohort:[null,{duplicateCohort:async(_ref17,breakpoint)=>{let cohort,{asStatic}=_ref17;try{if(await breakpoint(200),asStatic)cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.duplicate(values.cohort.id);else{let data={...values.cohort};data.name+=" (dynamic copy)",cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.create(data)}return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.success("Cohort duplicated. Please wait up to a few minutes for it to be calculated",{toastId:`cohort-duplicated-${cohort.id}`,button:{label:"View cohort",action:()=>{kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohort(cohort.id))}}}),cohort}catch(error){return lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error(error.detail||"Failed to duplicate cohort"),null}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref18=>{let{actions,values}=_ref18;return{deleteCohort:()=>{_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.findMounted()?.actions.deleteCohort({id:values.cohort.id,name:values.cohort.name}),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohorts())},submitCohort:()=>{values.cohortHasErrors&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_6__.UJ.error("There was an error submiting this cohort. Make sure the cohort filters are correct.")},checkIfFinishedCalculating:async(_ref19,breakpoint)=>{let{cohort}=_ref19;cohort.is_calculating?actions.setPollTimeout(window.setTimeout(async()=>{let newCohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.cohorts.get(cohort.id);breakpoint(),actions.checkIfFinishedCalculating(newCohort)},1e3)):(actions.setCohort(cohort),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_12__.Q.actions.updateCohort(cohort),scenes_persons_personsLogic__WEBPACK_IMPORTED_MODULE_10__.T.findMounted({syncWithUrl:!0})?.actions.loadCohorts(),values.pollTimeout&&(clearTimeout(values.pollTimeout),actions.setPollTimeout(null)))}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.actionToUrl)(_ref20=>{let{values}=_ref20;return{saveCohortSuccess:()=>scenes_urls__WEBPACK_IMPORTED_MODULE_11__.j.cohort(values.cohort.id)}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref21=>{let{actions,props}=_ref21;props.id&&"new"!==props.id?actions.fetchCohort(props.id):actions.setCohort(scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_8__.yK)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref22=>{let{values}=_ref22;values.pollTimeout&&clearTimeout(values.pollTimeout)})])},"./frontend/src/scenes/cohorts/cohortUtils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A2:()=>createCohortFormData,K7:()=>cleanBehavioralTypeCriteria,KE:()=>applyAllNestedCriteria,MY:()=>COHORT_MATCHING_DAYS,Nz:()=>resolveCohortFieldValue,VC:()=>criteriaToHumanSentence,d5:()=>cleanCriteria,et:()=>criteriaToBehavioralFilterType,fQ:()=>applyAllCriteriaGroup,tz:()=>isCohortCriteriaGroup,yn:()=>validateGroup});var fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"),fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__),lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts");__webpack_require__("./frontend/src/lib/constants.tsx");var lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/constants.tsx"),scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/cohorts/CohortFilters/types.ts"),_types__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function cleanBehavioralTypeCriteria(criteria){let type;return[_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformMultipleEvents,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents,_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventFirstTime,_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral),[_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort,_types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort),[_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty].includes(criteria.value)&&(type=scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person),{...criteria,...type?{type}:{}}}function isCohortCriteriaGroup(criteria){return!!criteria&&void 0!==criteria.type&&void 0!==criteria.values}function createCohortFormData(cohort){var _cohort$description;let rawCohort={...cohort.name?{name:cohort.name}:{},description:null!==(_cohort$description=cohort.description)&&void 0!==_cohort$description?_cohort$description:"",...cohort.csv?{csv:cohort.csv}:{},...cohort.is_static?{is_static:cohort.is_static}:{},filters:JSON.stringify(cohort.is_static?{properties:{}}:{properties:{...applyAllCriteriaGroup(applyAllNestedCriteria(cohort,criteriaList=>criteriaList.map(c=>({...c,..."value_property"in c?{value:c.value_property}:{},value_property:void 0}))),groupList=>groupList.map(g=>({...g,id:void 0}))).filters.properties,id:void 0}})},cohortFormData=new FormData;for(let[itemKey,value]of Object.entries(rawCohort))cohortFormData.append(itemKey,value);return cohortFormData}function validateGroup(group){if(!isCohortCriteriaGroup(group))return{};let criteria=group.values.filter(g=>!isCohortCriteriaGroup(g)).map((c,index)=>({...c,index})),negatedCriteria=criteria.filter(c=>!!c.negation),negatedCriteriaIndices=new Set(negatedCriteria.map(c=>c.index));if(group.type!==_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length>0||group.type===_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length===criteria.length){let errorMsg=`${negatedCriteria.map(c=>`'${scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.x_[criteriaToBehavioralFilterType(c)].label}'`).join(", ")} ${negatedCriteria.length>1?"are":"is a"} negative cohort criteria. ${scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaMissingOther}`;return{id:errorMsg,values:criteria.map(c=>({value:negatedCriteriaIndices.has(c.index)?errorMsg:void 0}))}}let negatedFailingCriteriaIndices=new Set;if(negatedCriteria.forEach(negatedC=>{let baseCriteria={...negatedC};criteria.forEach(c=>{baseCriteria.index!==c.index&&fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default()(cleanCriteria(baseCriteria),Object.assign({},cleanCriteria(c),{negation:!c.negation}))&&(negatedFailingCriteriaIndices.add(c.index),negatedFailingCriteriaIndices.add(baseCriteria.index))})}),group.type===_types__WEBPACK_IMPORTED_MODULE_6__.J2.And&&negatedCriteria.length>0&&negatedFailingCriteriaIndices.size>0)return{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaCancel,values:criteria.map(c=>({value:negatedFailingCriteriaIndices.has(c.index)?scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.NegationCriteriaCancel:void 0}))};let regularEventCriteria=criteria.filter(c=>c.value===_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly);if(regularEventCriteria.length>0&®ularEventCriteria.every(c=>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.min_periods)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.total_periods)))return{values:criteria.map(c=>{var _c$min_periods,_c$total_periods;return c.value===_types__WEBPACK_IMPORTED_MODULE_6__.NE.PerformEventRegularly&&(null!==(_c$min_periods=c.min_periods)&&void 0!==_c$min_periods?_c$min_periods:0)>(null!==(_c$total_periods=c.total_periods)&&void 0!==_c$total_periods?_c$total_periods:0)?{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch,min_periods:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch,total_periods:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.PeriodTimeMismatch}:{}})};let sequentialTimeCriteria=criteria.filter(c=>[_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents].includes(c.value));return sequentialTimeCriteria.length>0&&sequentialTimeCriteria.every(c=>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.seq_time_value)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.kE)(c.time_value)&&void 0!==c.time_interval&&void 0!==c.seq_time_interval)?{values:criteria.map(c=>{var _c$seq_time_value,_c$seq_time_interval,_c$time_value,_c$time_interval;return[_types__WEBPACK_IMPORTED_MODULE_6__.NE.StartPerformEventAgain,_types__WEBPACK_IMPORTED_MODULE_6__.NE.StopPerformEvent,_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents].includes(c.value)&&(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.ow)(Number(null!==(_c$seq_time_value=c.seq_time_value)&&void 0!==_c$seq_time_value?_c$seq_time_value:0),null!==(_c$seq_time_interval=c.seq_time_interval)&&void 0!==_c$seq_time_interval?_c$seq_time_interval:_types__WEBPACK_IMPORTED_MODULE_6__.Xy.Day)>(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.ow)(Number(null!==(_c$time_value=c.time_value)&&void 0!==_c$time_value?_c$time_value:0),null!==(_c$time_interval=c.time_interval)&&void 0!==_c$time_interval?_c$time_interval:_types__WEBPACK_IMPORTED_MODULE_6__.Xy.Day)?{id:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch,seq_time_value:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch,time_value:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.SequentialTimeMismatch}:{}})}:{values:criteria.map(c=>{let behavioralFilterType=criteriaToBehavioralFilterType(c),requiredFields=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[behavioralFilterType].fields.filter(f=>!!f.fieldKey);[_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty].includes(behavioralFilterType)&&"operator"in c&&c.operator&&[_types__WEBPACK_IMPORTED_MODULE_6__.WV.IsSet,_types__WEBPACK_IMPORTED_MODULE_6__.WV.IsNotSet].includes(c.operator)&&(requiredFields=requiredFields.filter(f=>"value_property"!==f.fieldKey)),requiredFields=requiredFields.filter(f=>"event_filters"!==f.fieldKey);let eventFilterError=c?.event_filters&&c.event_filters.length>0&&c.event_filters.some(prop=>prop?.type!==_types__WEBPACK_IMPORTED_MODULE_6__.FT.HogQL&&(0,lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_1__.t_)(prop))?scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.Rx.EmptyEventFilters:void 0,criteriaErrors=Object.fromEntries(requiredFields.map(_ref=>{let{fieldKey,type}=_ref;return[fieldKey,(Array.isArray(c[fieldKey])?c[fieldKey].length>0:void 0!==c[fieldKey]&&null!==c[fieldKey]&&""!==c[fieldKey])?void 0:scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.hJ?.[type](c[fieldKey])]})),allErrors={...criteriaErrors,event_filters:eventFilterError},consolidatedErrors=Object.values(allErrors).filter(e=>!!e).join(" ");return{...(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Ae)(allErrors)?{}:{id:consolidatedErrors},...allErrors}})}}function criteriaToBehavioralFilterType(criteria){var _criteria$value;if(criteria.negation){if(criteria.value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents;if(criteria.value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformedEvent;if(criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person)return _types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty;if(criteria.type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort)return _types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort}return null!==(_criteria$value=criteria.value)&&void 0!==_criteria$value?_criteria$value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent}function resolveCohortFieldValue(criteria,fieldKey){var _criteria$fieldKey;return"value"===fieldKey?criteriaToBehavioralFilterType(criteria):null!==(_criteria$fieldKey=criteria?.[fieldKey])&&void 0!==_criteria$fieldKey?_criteria$fieldKey:null}function applyAllCriteriaGroup(oldCohort,fn){return{...oldCohort,filters:{properties:{...oldCohort.filters.properties,values:fn(oldCohort.filters.properties.values)}}}}function applyAllNestedCriteria(oldCohort,fn,groupIndex){var _oldCohort$filters$pr;return{...oldCohort,filters:{properties:{...oldCohort.filters.properties,values:null!==(_oldCohort$filters$pr=oldCohort.filters.properties.values?.map((group,groupI)=>(void 0===groupIndex||groupI===groupIndex)&&isCohortCriteriaGroup(group)?{...group,values:fn(group.values)}:group))&&void 0!==_oldCohort$filters$pr?_oldCohort$filters$pr:[]}}}}function cleanCriteria(criteria){let shouldPurge=arguments.length>1&&void 0!==arguments[1]&&arguments[1],populatedCriteria={},{fields,...apiProps}=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[criteriaToBehavioralFilterType(criteria)];return Object.entries(apiProps).forEach(_ref2=>{var _criteria$key;let[key,defaultValue]=_ref2,nextValue=null!==(_criteria$key=criteria[key])&&void 0!==_criteria$key?_criteria$key:defaultValue;shouldPurge?populatedCriteria[key]=defaultValue:null!=nextValue?populatedCriteria[key]=nextValue:populatedCriteria[key]=void 0}),fields.forEach(_ref3=>{var _criteria$fieldKey2;let{fieldKey,defaultValue}=_ref3,nextValue=fieldKey?null!==(_criteria$fieldKey2=criteria[fieldKey])&&void 0!==_criteria$fieldKey2?_criteria$fieldKey2:defaultValue:null;fieldKey&&shouldPurge?populatedCriteria[fieldKey]=defaultValue:fieldKey&&null!=nextValue?populatedCriteria[fieldKey]=nextValue:fieldKey&&(populatedCriteria[fieldKey]=void 0)}),{...populatedCriteria,...function(type,value){let negation=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformSequenceEvents||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformSequenceEvents,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotPerformedEvent||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Behavioral,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.PerformEvent,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.Vb.NotInCohort||value===_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Cohort,value:_types__WEBPACK_IMPORTED_MODULE_6__.Vb.InCohort,negation:!0}:value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.NotHaveProperty||value===_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty&&negation?{type:scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.y4.Person,value:_types__WEBPACK_IMPORTED_MODULE_6__.G2.HaveProperty,negation:!0}:{type,value,negation:!1}}(populatedCriteria.type,populatedCriteria.value,populatedCriteria.negation)}}function criteriaToHumanSentence(criteria,cohortsById,actionsById){let words=[],data=scenes_cohorts_CohortFilters_constants__WEBPACK_IMPORTED_MODULE_4__.ng[criteriaToBehavioralFilterType(criteria)];return data?(data.fields.forEach(_ref4=>{let{type,fieldKey,defaultValue,hide}=_ref4;if(!hide){if(type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.Text)words.push(defaultValue);else if(fieldKey){var _cohortsById$value$na,_actionsById$value$na;let value=criteria[fieldKey];type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.CohortValues?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:null!==(_cohortsById$value$na=cohortsById?.[value]?.name)&&void 0!==_cohortsById$value$na?_cohortsById$value$na:`Cohort ${value}`})):type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.EventsAndActions&&"number"==typeof value?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:null!==(_actionsById$value$na=actionsById?.[value]?.name)&&void 0!==_actionsById$value$na?_actionsById$value$na:`Action ${value}`})):type===scenes_cohorts_CohortFilters_types__WEBPACK_IMPORTED_MODULE_5__.vA.EventFilters&&(criteria.event_filters?.length||0)>0?words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:"with filters"})):words.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("pre",{children:value}))}}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:words})):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{})}let COHORT_MATCHING_DAYS={1:"day",7:"week",14:"2 weeks",30:"month"}},"./frontend/src/scenes/comments/commentsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>commentsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx");let commentsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(()=>["scenes","notebooks","Notebook","commentsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>`${props.scope}-${props.item_id||""}`),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadComments:!0,maybeLoadComments:!0,setComposedComment:content=>({content}),sendComposedContent:!0,deleteComment:comment=>({comment}),setEditingComment:comment=>({comment}),setReplyingComment:commentId=>({commentId}),setItemContext:(context,callback)=>({context,callback}),clearItemContext:!0,persistEditedComment:!0,setComposerRef:ref=>({ref}),focusComposer:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({replyingCommentId:[null,{setReplyingComment:(_,_ref)=>{let{commentId}=_ref;return commentId},sendComposedContentSuccess:()=>null}],itemContext:[null,{setItemContext:(_,itemContext)=>itemContext.context?itemContext:null,sendComposedContentSuccess:()=>null}],editingComment:[null,{setEditingComment:(_,_ref2)=>{let{comment}=_ref2;return comment},persistEditedCommentSuccess:()=>null}],composedComment:["",{persist:!0},{setComposedComment:(_,_ref3)=>{let{content}=_ref3;return content},sendComposedContentSuccess:()=>""}],composerRef:[null,{setComposerRef:(_,_ref4)=>{let{ref}=_ref4;return ref}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref5=>{let{props,values,actions}=_ref5;return{comments:[null,{loadComments:async()=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.list({scope:props.scope,item_id:props.item_id});return response.results},sendComposedContent:async()=>{var _values$comments,_values$replyingComme;let existingComments=null!==(_values$comments=values.comments)&&void 0!==_values$comments?_values$comments:[],newComment=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.create({content:values.composedComment,scope:props.scope,item_id:props.item_id,item_context:values.itemContext?.context,source_comment:null!==(_values$replyingComme=values.replyingCommentId)&&void 0!==_values$replyingComme?_values$replyingComme:void 0});return values.itemContext?.callback?.({sent:!0}),[...existingComments,newComment]},persistEditedComment:async()=>{var _values$comments2;let editedComment=values.editingComment;if(!editedComment)return values.comments;let existingComments=null!==(_values$comments2=values.comments)&&void 0!==_values$comments2?_values$comments2:[],updatedComment=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.comments.update(editedComment.id,{content:editedComment.content});return[...existingComments.filter(c=>c.id!==editedComment.id),updatedComment]},deleteComment:async _ref6=>{var _values$comments$filt2;let{comment}=_ref6;return await (0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_4__.S)({endpoint:"projects/@current/comments",object:{name:"Comment",id:comment.id},callback:isUndo=>{if(isUndo){var _values$comments$filt;actions.loadCommentsSuccess([...null!==(_values$comments$filt=values.comments?.filter(c=>c.id!==comment.id))&&void 0!==_values$comments$filt?_values$comments$filt:[],comment])}}}),null!==(_values$comments$filt2=values.comments?.filter(c=>c.id!==comment.id))&&void 0!==_values$comments$filt2?_values$comments$filt2:null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{values,actions}=_ref7;return{setReplyingComment:()=>{actions.clearItemContext()},clearItemContext:()=>{values.itemContext?.callback?.({sent:!1}),actions.setItemContext(null)},setItemContext:_ref8=>{let{context}=_ref8;context&&values.composerRef?.focus()},focusComposer:()=>{values.composerRef?.focus()},maybeLoadComments:()=>{values.comments||values.commentsLoading||actions.loadComments()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({key:[()=>[(_,props)=>props],props=>`${props.scope}-${props.item_id||""}`],sortedComments:[s=>[s.comments],comments=>{var _comments$sort;return null!==(_comments$sort=comments?.sort((a,b)=>a.created_at>b.created_at?1:-1))&&void 0!==_comments$sort?_comments$sort:[]}],commentsWithReplies:[s=>[s.sortedComments],sortedComments=>{let commentsById={};for(let comment of null!=sortedComments?sortedComments:[]){var _comment$source_comme,_comment$source_comme2,_comment$source_comme3;let commentsWithReplies=commentsById[null!==(_comment$source_comme=comment.source_comment)&&void 0!==_comment$source_comme?_comment$source_comme:comment.id];commentsWithReplies||(commentsById[null!==(_comment$source_comme2=comment.source_comment)&&void 0!==_comment$source_comme2?_comment$source_comme2:comment.id]=commentsWithReplies={id:null!==(_comment$source_comme3=comment.source_comment)&&void 0!==_comment$source_comme3?_comment$source_comme3:comment.id,comment:void 0,replies:[]}),commentsWithReplies.id===comment.id?commentsWithReplies.comment=comment:commentsWithReplies.replies.push(comment)}return Object.values(commentsById)}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref9=>{let{actions}=_ref9;return{replyingCommentId:value=>{value&&actions.focusComposer()}}})])},"./frontend/src/scenes/dashboard/Dashboard.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Dashboard:()=>Dashboard,scene:()=>scene});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),NotFound=__webpack_require__("./frontend/src/lib/components/NotFound/index.tsx"),useKeyboardHotkeys=__webpack_require__("./frontend/src/lib/hooks/useKeyboardHotkeys.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),DateFilter=__webpack_require__("./frontend/src/lib/components/DateFilter/DateFilter.tsx"),PropertyFilters=__webpack_require__("./frontend/src/lib/components/PropertyFilters/PropertyFilters.tsx"),types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),groupsModel=__webpack_require__("./frontend/src/models/groupsModel.ts"),src_types=__webpack_require__("./frontend/src/types.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardEditBar(){let{dashboard,temporaryFilters,dashboardMode}=(0,index_esm.useValues)(dashboardLogic.BM),{setDates,setProperties,setDashboardMode}=(0,index_esm.useActions)(dashboardLogic.BM),{groupsTaxonomicTypes}=(0,index_esm.useValues)(groupsModel.$);return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.default)("flex gap-2 items-center justify-between flex-wrap border",dashboardMode===src_types.MN.Edit?"-m-1.5 p-1.5 border-border-bold border-dashed rounded-lg":"border-transparent"),children:[(0,jsx_runtime.jsx)(DateFilter.f,{showCustom:!0,dateFrom:temporaryFilters.date_from,dateTo:temporaryFilters.date_to,onChange:(from_date,to_date)=>{dashboardMode!==src_types.MN.Edit&&setDashboardMode(src_types.MN.Edit,null),setDates(from_date,to_date)},makeLabel:key=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconCalendar,{}),(0,jsx_runtime.jsxs)("span",{className:"hide-when-small",children:[" ",key]})]})}),(0,jsx_runtime.jsx)(PropertyFilters.t,{onChange:properties=>{dashboardMode!==src_types.MN.Edit&&setDashboardMode(src_types.MN.Edit,null),setProperties(properties)},pageKey:"dashboard_"+dashboard?.id,propertyFilters:temporaryFilters.properties,taxonomicGroupTypes:[types.t.EventProperties,types.t.PersonProperties,types.t.EventFeatureFlags,...groupsTaxonomicTypes,types.t.Cohorts,types.t.Elements,types.t.HogQLExpression]})]})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DashboardItems=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardItems.scss"),DashboardItems_default=__webpack_require__.n(DashboardItems),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DashboardItems_default(),options),DashboardItems_default().locals;var InsightCard=__webpack_require__("./frontend/src/lib/components/Cards/InsightCard/index.tsx"),TextCard=__webpack_require__("./frontend/src/lib/components/Cards/TextCard/TextCard.tsx"),useResizeObserver=__webpack_require__("./frontend/src/lib/hooks/useResizeObserver.ts"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),react_grid_layout=__webpack_require__("./node_modules/.pnpm/react-grid-layout@1.3.4_react-dom@18.2.0_react@18.2.0/node_modules/react-grid-layout/index.js"),insightsModel=__webpack_require__("./frontend/src/models/insightsModel.tsx");function DashboardItems_DashboardItems(){let{dashboard,tiles,layouts,dashboardMode,placement,isRefreshingQueued,isRefreshing,highlightedInsightId,refreshStatus,canEditDashboard,itemsLoading,temporaryVariables}=(0,index_esm.useValues)(dashboardLogic.BM),{updateLayouts,updateContainerWidth,updateTileColor,removeTile,duplicateTile,refreshDashboardItem,moveToDashboard,setDashboardMode}=(0,index_esm.useActions)(dashboardLogic.BM),{duplicateInsight,renameInsight}=(0,index_esm.useActions)(insightsModel.U),[resizingItem,setResizingItem]=(0,react.useState)(null),isDragging=(0,react.useRef)(!1),dragEndTimeout=(0,react.useRef)(null),className=(0,clsx_m.default)({"dashboard-view-mode":dashboardMode!==src_types.MN.Edit,"dashboard-edit-mode":dashboardMode===src_types.MN.Edit}),{width:gridWrapperWidth,ref:gridWrapperRef}=(0,useResizeObserver.y)(),canResizeWidth=!gridWrapperWidth||gridWrapperWidth>dashboardLogic.j$.sm;return(0,jsx_runtime.jsx)("div",{className:"dashboard-items-wrapper",ref:gridWrapperRef,children:gridWrapperWidth&&(0,jsx_runtime.jsx)(react_grid_layout.Responsive,{width:gridWrapperWidth,className:className,draggableHandle:".CardMeta,.TextCard__body",isDraggable:dashboardMode===src_types.MN.Edit,isResizable:dashboardMode===src_types.MN.Edit,layouts:layouts,rowHeight:80,margin:[16,16],containerPadding:[0,0],onLayoutChange:(_,newLayouts)=>{dashboardMode===src_types.MN.Edit&&updateLayouts(newLayouts)},onWidthChange:(containerWidth,_,newCols)=>{updateContainerWidth(containerWidth,newCols)},breakpoints:dashboardLogic.j$,resizeHandles:canResizeWidth?["s","e","se"]:["s"],cols:dashboardLogic.cH,onResize:(_layout,_oldItem,newItem)=>{resizingItem&&resizingItem.w===newItem.w&&resizingItem.h===newItem.h||setResizingItem(newItem)},onResizeStop:()=>{setResizingItem(null)},onDrag:()=>{isDragging.current=!0,dragEndTimeout.current&&window.clearTimeout(dragEndTimeout.current)},onDragStop:()=>{dragEndTimeout.current&&window.clearTimeout(dragEndTimeout.current),dragEndTimeout.current=window.setTimeout(()=>{isDragging.current=!1},250)},draggableCancel:"a,table,button,.Popover",children:tiles?.map(tile=>{let{insight,text}=tile,smLayout=layouts.sm?.find(l=>l.i==tile.id.toString()),commonTileProps={dashboardId:dashboard?.id,showResizeHandles:dashboardMode===src_types.MN.Edit,canResizeWidth:canResizeWidth,showEditingControls:[src_types.F4.Dashboard,src_types.F4.ProjectHomepage].includes(placement),moreButtons:canEditDashboard?jsx_runtime.jsx(LemonButton.J,{onClick:()=>setDashboardMode(src_types.MN.Edit,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Edit layout (E)"}):null,moveToDashboard:_ref=>{let{id,name}=_ref;if(!dashboard)throw Error("must be on a dashboard to move this tile");moveToDashboard(tile,dashboard.id,id,name)},removeFromDashboard:()=>removeTile(tile)};return insight?jsx_runtime.jsx(InsightCard.L,{insight:insight,loadingQueued:isRefreshingQueued(insight.short_id),loading:isRefreshing(insight.short_id),apiErrored:refreshStatus[insight.short_id]?.error||!1,highlighted:highlightedInsightId&&insight.short_id===highlightedInsightId,updateColor:color=>updateTileColor(tile.id,color),ribbonColor:tile.color,refresh:()=>refreshDashboardItem({tile}),refreshEnabled:!itemsLoading,rename:()=>renameInsight(insight),duplicate:()=>duplicateInsight(insight),showDetailsControls:placement!=src_types.F4.Export,placement:placement,loadPriority:smLayout?1e3*smLayout.y+smLayout.x:void 0,variablesOverride:temporaryVariables,...commonTileProps},tile.id):text?jsx_runtime.jsx(TextCard.WV,{textTile:tile,duplicate:()=>duplicateTile(tile),...commonTileProps},tile.id):void 0})})})}var dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),usePageVisibility=__webpack_require__("./frontend/src/lib/hooks/usePageVisibility.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonMenu=__webpack_require__("./frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx"),LemonRadio=__webpack_require__("./frontend/src/lib/lemon-ui/LemonRadio/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx");let LastRefreshText=()=>{let{newestRefreshed}=(0,index_esm.useValues)(dashboardLogic.BM);return(0,jsx_runtime.jsxs)("span",{children:["Last updated ",newestRefreshed?(0,dayjs.Bv)(newestRefreshed).fromNow():"a while ago"]})},INTERVAL_OPTIONS=[...Array.from([1800,3600],value=>({label:(0,utils.C7)(value),value:value}))];function DashboardReloadAction(){let{itemsLoading,autoRefresh,refreshMetrics,blockRefresh,oldestClientRefreshAllowed}=(0,index_esm.useValues)(dashboardLogic.BM),{refreshAllDashboardItemsManual,setAutoRefresh,setPageVisibility}=(0,index_esm.useActions)(dashboardLogic.BM);(0,usePageVisibility.d)(pageIsVisible=>{setPageVisibility(pageIsVisible)});let options=INTERVAL_OPTIONS.map(option=>({...option,disabledReason:autoRefresh.enabled?void 0:"Enable auto refresh to set the interval"}));return(0,jsx_runtime.jsxs)("div",{className:"relative",children:[(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>refreshAllDashboardItemsManual(),type:"secondary",icon:itemsLoading?(0,jsx_runtime.jsx)(Spinner.$,{textColored:!0}):blockRefresh?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheck,{}):(0,jsx_runtime.jsx)(icons.tr,{}),size:"small","data-attr":"dashboard-items-action-refresh",disabledReason:blockRefresh?`Next bulk refresh possible ${(0,dayjs.Bv)(oldestClientRefreshAllowed).fromNow()}`:itemsLoading?"Refreshing...":"",sideAction:{"data-attr":"dashboard-items-action-refresh-dropdown",dropdown:{closeOnClickInside:!1,placement:"bottom-end",overlay:(0,jsx_runtime.jsx)(LemonMenu.iy,{items:[{label:()=>(0,jsx_runtime.jsx)(src.f4,{onChange:checked=>setAutoRefresh(checked,autoRefresh.interval),label:"Auto refresh while on page",checked:autoRefresh.enabled,fullWidth:!0,className:"mt-1 mb-2"})},{title:"Refresh interval",items:[{label:()=>(0,jsx_runtime.jsx)(LemonRadio._,{value:autoRefresh.interval,options:options,onChange:value=>{setAutoRefresh(!0,value)},className:"mx-2 mb-1"})}]}]})}},children:(0,jsx_runtime.jsx)("span",{className:(0,clsx_m.default)("dashboard-items-action-refresh-text"),children:itemsLoading?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:refreshMetrics.total?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refreshed ",refreshMetrics.completed," out of ",refreshMetrics.total]}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:"Refreshing..."})}):(0,jsx_runtime.jsx)(LastRefreshText,{})})}),(0,jsx_runtime.jsx)(src.Mo,{size:"small",content:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(icons.tr,{className:"mr-0"})," ",(0,utils.C7)(autoRefresh.interval)]}),visible:autoRefresh.enabled,position:"top-right",status:"muted"})]})}var dataThemeLogic=__webpack_require__("./frontend/src/scenes/dataThemeLogic.tsx"),EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Variables=__webpack_require__("./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.tsx"),DashboardHeader=__webpack_require__("./frontend/src/scenes/dashboard/DashboardHeader.tsx"),EmptyDashboardComponent=__webpack_require__("./frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx");let scene={component:DashboardScene,logic:dashboardLogic.BM,paramsToProps:_ref=>{let{params:{id,placement}}=_ref;return{id:parseInt(id),placement}}};function Dashboard(){let{id,dashboard,placement,themes}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,index_esm.useMountedLogic)((0,dataThemeLogic.Q)({themes})),(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:dashboardLogic.BM,props:{id:parseInt(id),placement,dashboard},children:(0,jsx_runtime.jsx)(DashboardScene,{})})}function DashboardScene(){let{placement,dashboard,canEditDashboard,tiles,itemsLoading,dashboardMode,dashboardFailedToLoad}=(0,index_esm.useValues)(dashboardLogic.BM),{setDashboardMode,reportDashboardViewed,abortAnyRunningQuery}=(0,index_esm.useActions)(dashboardLogic.BM);return((0,react.useEffect)(()=>(reportDashboardViewed(),()=>{abortAnyRunningQuery()}),[]),(0,useKeyboardHotkeys.l)(placement==src_types.F4.Dashboard?{e:{action:()=>setDashboardMode(dashboardMode===src_types.MN.Edit?null:src_types.MN.Edit,eventUsageLogic.GU.Hotkey),disabled:!canEditDashboard||null!==dashboardMode&&dashboardMode!==src_types.MN.Edit},f:{action:()=>setDashboardMode(dashboardMode===src_types.MN.Fullscreen?null:src_types.MN.Fullscreen,eventUsageLogic.GU.Hotkey),disabled:null!==dashboardMode&&dashboardMode!==src_types.MN.Fullscreen},escape:{action:()=>setDashboardMode(null,eventUsageLogic.GU.Hotkey),disabled:dashboardMode!==src_types.MN.Edit}}:{},[setDashboardMode,dashboardMode,placement]),dashboard||itemsLoading||dashboardFailedToLoad)?(0,jsx_runtime.jsxs)("div",{className:"dashboard",children:[placement==src_types.F4.Dashboard&&(0,jsx_runtime.jsx)(DashboardHeader.x,{}),dashboardFailedToLoad?(0,jsx_runtime.jsx)(EmptyStates.jC,{title:"There was an error loading this dashboard"}):tiles&&0!==tiles.length?(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2 items-start justify-between flex-wrap",children:[![src_types.F4.Public,src_types.F4.Export,src_types.F4.FeatureFlag].includes(placement)&&dashboard&&(0,jsx_runtime.jsx)(DashboardEditBar,{}),placement===src_types.F4.FeatureFlag&&dashboard?.id&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",size:"small",to:urls.j.dashboard(dashboard.id),children:"Edit dashboard"}),placement!==src_types.F4.Export&&(0,jsx_runtime.jsx)("div",{className:"flex shrink-0 space-x-4 dashoard-items-actions",children:(0,jsx_runtime.jsx)("div",{className:`left-item ${placement===src_types.F4.Public?"text-right":""}`,children:[src_types.F4.Public].includes(placement)?(0,jsx_runtime.jsx)(LastRefreshText,{}):dashboardMode!==src_types.MN.Edit?(0,jsx_runtime.jsx)(DashboardReloadAction,{}):null})})]}),(0,jsx_runtime.jsx)(Variables.B,{}),(0,jsx_runtime.jsx)(DashboardItems_DashboardItems,{})]}):(0,jsx_runtime.jsx)(EmptyDashboardComponent.l,{loading:itemsLoading,canEdit:canEditDashboard})]}):(0,jsx_runtime.jsx)(NotFound.T,{object:"dashboard"})}},"./frontend/src/scenes/dashboard/DashboardCollaborators.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>DASHBOARD_RESTRICTION_OPTIONS,o:()=>DashboardCollaboration});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_components_PayGateMini_PayGateMini__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/PayGateMini/PayGateMini.tsx"),lib_components_UserSelectItem__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/UserSelectItem.tsx"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_hooks_useFeatureFlag__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonInputSelect_LemonInputSelect__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx"),lib_lemon_ui_LemonSelect__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSelect/index.ts"),lib_lemon_ui_ProfilePicture__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/scenes/urls.ts"),_layout_navigation_3000_sidepanel_sidePanelStateLogic__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./frontend/src/layout/navigation-3000/sidepanel/sidePanelStateLogic.tsx"),_types__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./frontend/src/types.ts"),_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardCollaboratorsLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let DASHBOARD_RESTRICTION_OPTIONS=[{value:lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.EveryoneInProjectCanEdit,label:"Everyone in the project can edit",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconUnlock,{})},{value:lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.OnlyCollaboratorsCanEdit,label:"Only those invited to this dashboard can edit",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLock,{})}];function DashboardCollaboration(_ref){let{dashboardId}=_ref,{dashboard,dashboardLoading,canEditDashboard,canRestrictDashboard}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__.BM),{triggerDashboardUpdate}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_dashboard_dashboardLogic__WEBPACK_IMPORTED_MODULE_13__.BM),{allCollaborators,explicitCollaboratorsLoading,addableMembers,explicitCollaboratorsToBeAdded}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)((0,_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__.B)({dashboardId})),{deleteExplicitCollaborator,setExplicitCollaboratorsToBeAdded,addExplicitCollaborators}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)((0,_dashboardCollaboratorsLogic__WEBPACK_IMPORTED_MODULE_17__.B)({dashboardId})),{push}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(kea_router__WEBPACK_IMPORTED_MODULE_2__.router),{openSidePanel}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_layout_navigation_3000_sidepanel_sidePanelStateLogic__WEBPACK_IMPORTED_MODULE_15__.f),newAccessControl=(0,lib_hooks_useFeatureFlag__WEBPACK_IMPORTED_MODULE_6__.y)("ROLE_BASED_ACCESS_CONTROL");return dashboard?newAccessControl?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h3",{children:"Access control"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__.V,{type:"info",className:"mb-4",children:"Permissions have moved! We're rolling out our new access control system. Click below to open it."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{type:"primary",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconOpenSidebar,{}),onClick:()=>{openSidePanel(_types__WEBPACK_IMPORTED_MODULE_16__.H$.AccessControl),push(scenes_urls__WEBPACK_IMPORTED_MODULE_14__.j.dashboard(dashboard.id))},children:"Open access control"})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(lib_components_PayGateMini_PayGateMini__WEBPACK_IMPORTED_MODULE_3__.E,{feature:_types__WEBPACK_IMPORTED_MODULE_16__.P$.ADVANCED_PERMISSIONS,children:[(!canEditDashboard||!canRestrictDashboard)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonBanner__WEBPACK_IMPORTED_MODULE_7__.V,{type:"info",className:"mb-4",children:canEditDashboard?"You aren't allowed to change the restriction level – only the dashboard owner and project admins can.":"You aren't allowed to change sharing settings – only dashboard collaborators with edit settings can."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonSelect__WEBPACK_IMPORTED_MODULE_10__.Yv,{value:dashboard.effective_restriction_level,onChange:newValue=>triggerDashboardUpdate({restriction_level:newValue}),options:DASHBOARD_RESTRICTION_OPTIONS,loading:dashboardLoading,fullWidth:!0,disabled:!canRestrictDashboard}),dashboard.restriction_level>lib_constants__WEBPACK_IMPORTED_MODULE_5__.V7.EveryoneInProjectCanEdit&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"mt-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h5",{children:"Collaborators"}),canEditDashboard&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div",{className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonInputSelect_LemonInputSelect__WEBPACK_IMPORTED_MODULE_9__.n,{placeholder:"Search for team members to add…",value:explicitCollaboratorsToBeAdded,loading:explicitCollaboratorsLoading,onChange:newValues=>setExplicitCollaboratorsToBeAdded(newValues),mode:"multiple","data-attr":"subscribed-emails",options:(0,lib_components_UserSelectItem__WEBPACK_IMPORTED_MODULE_4__.W)(addableMembers,"uuid")})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{type:"primary",loading:explicitCollaboratorsLoading,disabled:0===explicitCollaboratorsToBeAdded.length,onClick:()=>addExplicitCollaborators(),children:"Add"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h5",{className:"mt-4",children:"Project members with access"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div",{className:"mt-2 pb-2 rounded overflow-y-auto max-h-80",children:allCollaborators.map(collaborator=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(CollaboratorRow,{collaborator:collaborator,deleteCollaborator:canEditDashboard?deleteExplicitCollaborator:void 0},collaborator.user.uuid))})]})]}):null}function CollaboratorRow(_ref2){let{collaborator,deleteCollaborator}=_ref2,{user,level}=collaborator,wasInvited=level<=lib_constants__WEBPACK_IMPORTED_MODULE_5__.kH.CanEdit,privilegeLevelName=lib_constants__WEBPACK_IMPORTED_MODULE_5__.KN[level];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex items-center justify-between mt-2 pl-2 h-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_ProfilePicture__WEBPACK_IMPORTED_MODULE_11__.Y,{user:user,size:"md",showName:!0}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_12__.u,{title:wasInvited?null:`${user.first_name||"This person"} ${level===lib_constants__WEBPACK_IMPORTED_MODULE_5__.kH._Owner?"created the dashboard":"is a project administrator"}`,placement:"left",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("span",{className:"rounded bg-primary-alt-highlight p-1",children:privilegeLevelName}),deleteCollaborator&&wasInvited&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_8__.J,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconTrash,{}),onClick:()=>deleteCollaborator(user.uuid),tooltip:wasInvited?"Remove invited collaborator":null,size:"small"})]})})]})}},"./frontend/src/scenes/dashboard/DashboardHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>DASHBOARD_CANNOT_EDIT_MESSAGE,x:()=>DashboardHeader});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_forms_lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),dashboardsModel=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let getTileBody=(dashboard,textTileId)=>{let dashboardTiles=dashboard.tiles,matchedTile=dashboardTiles?.find(tt=>tt.id===textTileId);return matchedTile?.text?.body||""},textCardModalLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","dashboard","dashboardTextTileModal","logic"]),(0,index_esm.props)({}),(0,index_esm.key)(props=>`textCardModalLogic-${props.dashboard.id}-${props.textTileId}`),(0,index_esm.connect)({actions:[dashboardsModel.h,["updateDashboard"]]}),(0,index_esm.listeners)(_ref=>{let{props,actions}=_ref;return{submitTextTileFailure:error=>{props.dashboard&&props.textTileId&&src.UJ.error(`Could not save text: ${error.error} (${JSON.stringify(error.errors)})`),actions.resetTextTile(),props?.onClose?.()},submitTextTileSuccess:()=>{actions.resetTextTile(),props?.onClose?.()}}}),(0,kea_forms_lib.forms)(_ref2=>{let{props,actions}=_ref2;return{textTile:{defaults:{body:props.textTileId&&"new"!==props.textTileId?getTileBody(props.dashboard,props.textTileId):""},errors:_ref3=>{let{body}=_ref3;return{body:body?null:"This card would be empty! Type something first"}},submit:formValues=>{let textTiles=(props.dashboard.tiles||[]).map(t=>({id:t.id,text:t.text}));if("new"===props.textTileId)actions.updateDashboard({id:props.dashboard.id,tiles:[{text:formValues}]});else{let updatedTiles=[...textTiles].reduce((acc,tile)=>(tile.id===props.textTileId&&tile.text&&(tile.text.body=formValues.body,acc.push(tile)),acc),[]);actions.updateDashboard({id:props.dashboard.id,tiles:updatedTiles})}}}}})]);var LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),LemonTextArea=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTextArea/index.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function TextCardModal(_ref){let{isOpen,onClose,dashboard,textTileId}=_ref,modalLogic=textCardModalLogic({dashboard,textTileId:null!=textTileId?textTileId:"new",onClose}),{isTextTileSubmitting,textTileValidationErrors}=(0,index_esm.useValues)(modalLogic),{submitTextTile,resetTextTile}=(0,index_esm.useActions)(modalLogic),handleClose=()=>{resetTextTile(),onClose()};return(0,jsx_runtime.jsx)(LemonModal.f,{closable:!0,isOpen:isOpen,title:"",onClose:handleClose,footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{disabledReason:isTextTileSubmitting?"Cannot cancel card creation in progress":null,type:"secondary",onClick:handleClose,children:"Cancel"}),(0,jsx_runtime.jsx)(LemonButton.J,{disabledReason:textTileValidationErrors.body,loading:isTextTileSubmitting,form:"text-tile-form",htmlType:"submit",type:"primary",onClick:submitTextTile,"data-attr":"new"===textTileId?"save-new-text-tile":"edit-text-tile-text",children:"Save"})]}),children:(0,jsx_runtime.jsx)(kea_forms_lib.Form,{logic:textCardModalLogic,props:{dashboard,textTileId},formKey:"textTile",id:"text-tile-form",className:"",enableFormOnSubmit:!0,children:(0,jsx_runtime.jsx)(kea_forms_lib.Field,{name:"body",label:"",children:(0,jsx_runtime.jsx)(LemonTextArea.X,{"data-attr":"text-card-edit-area"})})})})}var EditableField=__webpack_require__("./frontend/src/lib/components/EditableField/EditableField.tsx"),ExportButton=__webpack_require__("./frontend/src/lib/components/ExportButton/ExportButton.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");function FullScreen(_ref){let{onExit}=_ref,selector=".layout-top-content";return(0,react.useEffect)(()=>{let myClasses=window.document.querySelectorAll(selector);for(let i=0;i{null===window.document.fullscreenElement&&onExit?.()};try{document.body.requestFullscreen().then(()=>{window.addEventListener("fullscreenchange",handler,!1)})}catch{}try{window.dispatchEvent(new window.Event("scroll")),window.dispatchEvent(new window.Event("resize"))}catch{}return()=>{let elements=window.document.querySelectorAll(selector);for(let i=0;isetDashboardMode(null,eventUsageLogic.GU.Browser)}),dashboard&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(SubscriptionsModal.r,{isOpen:showSubscriptions,closeModal:()=>push(urls.j.dashboard(dashboard.id)),dashboardId:dashboard.id,subscriptionId:subscriptionId}),(0,jsx_runtime.jsx)(SharingModal.PA,{title:"Dashboard permissions & sharing",isOpen:dashboardMode===types.MN.Sharing,closeModal:()=>push(urls.j.dashboard(dashboard.id)),dashboardId:dashboard.id}),canEditDashboard&&(0,jsx_runtime.jsx)(TextCardModal,{isOpen:showTextTileModal,onClose:()=>push(urls.j.dashboard(dashboard.id)),dashboard:dashboard,textTileId:textTileId}),canEditDashboard&&(0,jsx_runtime.jsx)(DeleteDashboardModal.y,{}),canEditDashboard&&(0,jsx_runtime.jsx)(DuplicateDashboardModal.i,{})]}),(0,jsx_runtime.jsx)(PageHeader.m,{buttons:dashboardMode===types.MN.Edit?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-edit-mode-discard",type:"secondary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderDiscardChanges),tabIndex:9,children:"Cancel"}),(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-edit-mode-save",type:"primary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderSaveDashboard),tabIndex:10,disabledReason:dashboardLoading?"Wait for dashboard to finish loading":canEditDashboard?void 0:"Not privileged to edit this dashboard",children:"Save"})]}):dashboardMode===types.MN.Fullscreen?(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary",onClick:()=>setDashboardMode(null,eventUsageLogic.GU.DashboardHeaderExitFullscreen),"data-attr":"dashboard-exit-presentation-mode",disabled:dashboardLoading,children:"Exit full screen"}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(More.T,{"data-attr":"dashboard-three-dots-options-menu",overlay:dashboard?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dashboard.created_by&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex p-2 text-muted-alt",children:["Created by"," ",dashboard.created_by.first_name||dashboard.created_by.email||"-"," ","on ",(0,utils.bo)(dashboard.created_at)]}),(0,jsx_runtime.jsx)(LemonDivider.p,{})]}),canEditDashboard&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>setDashboardMode(types.MN.Edit,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Edit layout (E)"}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>setDashboardMode(types.MN.Fullscreen,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Go full screen (F)"}),canEditDashboard&&(dashboard.pinned?(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>unpinDashboard(dashboard.id,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Unpin dashboard"}):(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>pinDashboard(dashboard.id,eventUsageLogic.GU.MoreDropdown),fullWidth:!0,children:"Pin dashboard"})),(0,jsx_runtime.jsx)(SubscriptionsModal.T,{dashboardId:dashboard.id}),(0,jsx_runtime.jsx)(ExportButton.j,{fullWidth:!0,items:exportOptions}),user?.is_staff&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{asDashboardTemplate&&(setDashboardTemplate(asDashboardTemplate),openDashboardTemplateEditor())},fullWidth:!0,children:"Save as template"}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{showDuplicateDashboardModal(dashboard.id,dashboard.name)},fullWidth:!0,children:"Duplicate dashboard"}),(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>createNotebookFromDashboard(dashboard),fullWidth:!0,children:"Create notebook from dashboard"}),canEditDashboard&&(0,jsx_runtime.jsx)(LemonButton.J,{onClick:()=>{showDeleteDashboardModal(dashboard.id)},status:"danger",fullWidth:!0,children:"Delete dashboard"})]}):void 0}),(0,jsx_runtime.jsx)(LemonDivider.p,{vertical:!0}),dashboard&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(CollaboratorBubbles,{dashboard:dashboard,onClick:()=>push(urls.j.dashboardSharing(dashboard.id))}),(0,jsx_runtime.jsx)(LemonButton.J,{type:"secondary","data-attr":"dashboard-share-button",onClick:()=>push(urls.j.dashboardSharing(dashboard.id)),children:"Share"})]}),dashboard?(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.insightNew(void 0,dashboard.id),type:"primary","data-attr":"dashboard-add-graph-header",disabledReason:canEditDashboard?null:DASHBOARD_CANNOT_EDIT_MESSAGE,sideAction:{dropdown:{placement:"bottom-end",overlay:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(LemonButton.J,{fullWidth:!0,onClick:()=>{push(urls.j.dashboardTextTile(dashboard.id,"new"))},"data-attr":"add-text-tile-to-dashboard",children:"Add text card"})})},disabled:!1,"data-attr":"dashboard-add-dropdown"},children:"Add insight"}):null]}),caption:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dashboard&&!!(canEditDashboard||dashboard.description)&&(0,jsx_runtime.jsx)(EditableField.f,{multiline:!0,name:"description",markdown:!0,value:dashboard.description,placeholder:"Description (optional)",onSave:value=>updateDashboard({id:dashboard.id,description:value,allowUndo:!0}),saveOnBlur:!0,compactButtons:!0,mode:canEditDashboard?void 0:"view"}),dashboard?.tags&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:canEditDashboard?(0,jsx_runtime.jsx)(ObjectTags.D,{tags:dashboard.tags,onChange:tags=>triggerDashboardUpdate({tags}),saving:dashboardLoading,tagsAvailable:tags.filter(tag=>!dashboard.tags?.includes(tag)),className:"mt-2"}):dashboard.tags.length?(0,jsx_runtime.jsx)(ObjectTags.D,{tags:dashboard.tags,saving:dashboardLoading,staticOnly:!0,className:"mt-2"}):null})]}),delimited:!0}),(0,jsx_runtime.jsx)(DashboardTemplateEditor.v,{})]}):null}function CollaboratorBubbles(_ref){let{dashboard,onClick}=_ref,{allCollaborators}=(0,index_esm.useValues)((0,dashboardCollaboratorsLogic.B)({dashboardId:dashboard.id}));if(!dashboard)return null;let effectiveRestrictionLevelOption=DashboardCollaborators.R[dashboard.effective_restriction_level],tooltipParts=[];return(0,LemonSelect.u7)(effectiveRestrictionLevelOption)&&"string"==typeof effectiveRestrictionLevelOption?.title&&tooltipParts.push(effectiveRestrictionLevelOption.title),dashboard.is_shared&&tooltipParts.push("Shared publicly"),(0,jsx_runtime.jsx)(ProfileBubbles.r,{people:allCollaborators.map(collaborator=>({email:collaborator.user.email,name:collaborator.user.first_name,title:`${collaborator.user.first_name} <${collaborator.user.email}> (${constants.KN[collaborator.level]})`})),tooltip:tooltipParts.join(" • "),onClick:onClick})}},"./frontend/src/scenes/dashboard/DashboardTemplateChooser.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>DashboardTemplateChooser_DashboardTemplateChooser});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),DashboardTemplateChooser=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardTemplateChooser.scss"),DashboardTemplateChooser_default=__webpack_require__.n(DashboardTemplateChooser),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(DashboardTemplateChooser_default(),options),DashboardTemplateChooser_default().locals;var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),colors=__webpack_require__("./frontend/src/lib/colors.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function FallbackCoverImage(_ref){let{src,alt,index,className="",imageClassName=""}=_ref,[hasError,setHasError]=(0,react.useState)(!1);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:hasError||!src?(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("w-full h-full",className),style:{background:(0,colors._r)(index)}}):(0,jsx_runtime.jsx)("img",{className:(0,clsx_m.default)("object-cover w-full",imageClassName),src:src,alt:alt,onError:()=>{setHasError(!0)}})})}var Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/index.ts");let blank_dashboard_hog=__webpack_require__.p+"images/blank-dashboard-hog.be6aa4a293f4321162c6fa6f77094861.png";var dashboardTemplatesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),types=__webpack_require__("./frontend/src/types.ts");function DashboardTemplateChooser_DashboardTemplateChooser(_ref){let{scope="default",onItemClick,redirectAfterCreation=!0,availabilityContexts}=_ref,templatesLogic=(0,dashboardTemplatesLogic.R)({scope}),{allTemplates,allTemplatesLoading}=(0,index_esm.useValues)(templatesLogic),{isLoading,newDashboardModalVisible}=(0,index_esm.useValues)(newDashboardLogic.Z),{setActiveDashboardTemplate,createDashboardFromTemplate,addDashboard,setIsLoading,showVariableSelectModal}=(0,index_esm.useActions)(newDashboardLogic.Z);return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsxs)("div",{className:"DashboardTemplateChooser",children:[!availabilityContexts||availabilityContexts.includes(types.FB.GENERAL)?(0,jsx_runtime.jsx)(TemplateItem,{template:{template_name:"Blank dashboard",dashboard_description:"Create a blank dashboard",image_url:blank_dashboard_hog},onClick:()=>{isLoading||(setIsLoading(!0),addDashboard({name:"New Dashboard",show:!0}))},index:0,"data-attr":"create-dashboard-blank"}):null,allTemplatesLoading?(0,jsx_runtime.jsx)(Spinner.$,{className:"text-6xl"}):allTemplates.filter(template=>!availabilityContexts||availabilityContexts.some(context=>template.availability_contexts?.includes(context))).map((template,index)=>(0,jsx_runtime.jsx)(TemplateItem,{template:template,onClick:()=>{isLoading||(setIsLoading(!0),0===(template.variables||[]).length?(null===template.variables&&(template.variables=[]),createDashboardFromTemplate(template,template.variables||[],redirectAfterCreation)):newDashboardModalVisible?setActiveDashboardTemplate(template):showVariableSelectModal(template),onItemClick?.(template))},index:index+1,"data-attr":"create-dashboard-from-template"},index))]})})}function TemplateItem(_ref2){var _template$dashboard_d;let{template,onClick,index,"data-attr":dataAttr}=_ref2,[isHovering,setIsHovering]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)("div",{className:"cursor-pointer border rounded TemplateItem flex flex-col transition-all",onClick:onClick,onMouseEnter:()=>setIsHovering(!0),onMouseLeave:()=>setIsHovering(!1),"data-attr":dataAttr,children:[(0,jsx_runtime.jsx)("div",{className:(0,clsx_m.default)("transition-all w-full overflow-hidden",isHovering?"h-4 min-h-4":"h-30 min-h-30"),children:(0,jsx_runtime.jsx)(FallbackCoverImage,{src:template?.image_url,alt:"cover photo",index:index,imageClassName:"h-30"})}),(0,jsx_runtime.jsx)("h5",{className:"px-2 mb-1",children:template?.template_name}),(0,jsx_runtime.jsx)("div",{className:"flex gap-x-1 px-2 mb-1",children:template.tags?.map((tag,index)=>jsx_runtime.jsx(src.oe,{type:"option",children:tag},index))}),(0,jsx_runtime.jsx)("div",{className:"px-2 py-1 overflow-y-auto grow",children:(0,jsx_runtime.jsx)("p",{className:(0,clsx_m.default)("text-muted-alt text-xs",isHovering?"":"line-clamp-2"),children:null!==(_template$dashboard_d=template?.dashboard_description)&&void 0!==_template$dashboard_d?_template$dashboard_d:" "})})]})}},"./frontend/src/scenes/dashboard/DashboardTemplateEditor.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>DashboardTemplateEditor});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardTemplateEditorLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardTemplateEditor(_ref){let{inline=!1}=_ref,{closeDashboardTemplateEditor,createDashboardTemplate,updateDashboardTemplate,setEditorValue,updateValidationErrors}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__.X),{isOpenNewDashboardTemplateModal,editorValue,validationErrors,templateSchema,id}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(_dashboardTemplateEditorLogic__WEBPACK_IMPORTED_MODULE_3__.X);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.fQ,{title:id?"Edit dashboard template":"New dashboard template",isOpen:isOpenNewDashboardTemplateModal,width:1e3,onClose:()=>{closeDashboardTemplateEditor()},inline:inline,footer:id?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary","data-attr":"update-dashboard-template-button",onClick:()=>{updateDashboardTemplate({id})},disabledReason:validationErrors.length?`There are ${validationErrors.length} errors to resolve: ${validationErrors.map(e=>" "+e)}`:void 0,children:"Update template"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{type:"primary","data-attr":"create-dashboard-template-button",onClick:()=>{createDashboardTemplate()},disabledReason:validationErrors.length?`There are ${validationErrors.length} errors to resolve:${validationErrors.map(e=>" "+e)}`:void 0,children:"Create new template"}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_2__.p,{className:"border",language:"json",value:editorValue,onChange:v=>{setEditorValue(null!=v?v:"")},onValidate:markers=>{updateValidationErrors(markers)},path:id?`dashboard-templates/${id}.json`:"dashboard-templates/new.json",schema:templateSchema,height:600})})}},"./frontend/src/scenes/dashboard/DeleteDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>DeleteDashboardModal});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/dashboard/deleteDashboardLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DeleteDashboardModal(){let{hideDeleteDashboardModal}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r),{isDeleteDashboardSubmitting,deleteDashboardModalVisible}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__.f,{title:"Delete dashboard",onClose:hideDeleteDashboardModal,isOpen:deleteDashboardModalVisible,footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"delete-dashboard-form",type:"secondary","data-attr":"dashboard-delete",disabled:isDeleteDashboardSubmitting,onClick:hideDeleteDashboardModal,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"delete-dashboard-form",htmlType:"submit",type:"secondary",status:"danger","data-attr":"dashboard-delete-submit",loading:isDeleteDashboardSubmitting,disabled:isDeleteDashboardSubmitting,children:"Delete dashboard"})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(kea_forms__WEBPACK_IMPORTED_MODULE_1__.Form,{logic:scenes_dashboard_deleteDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.r,formKey:"deleteDashboard",id:"delete-dashboard-form",enableFormOnSubmit:!0,className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"deleteInsights",help:"This will only delete insights if they're not on any other dashboards.",children:_ref=>{let{value,onChange}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__.H,{"data-attr":"delete-dashboard-insights-checkbox",checked:value,label:"Delete this dashboard's insights",onChange:onChange})}})})})}},"./frontend/src/scenes/dashboard/DuplicateDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>DuplicateDashboardModal});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonCheckbox/index.ts"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DuplicateDashboardModal(){let{hideDuplicateDashboardModal,duplicateAndGoToDashboard}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useActions)(scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T),{isDuplicateDashboardSubmitting,duplicateDashboardModalVisible}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonModal__WEBPACK_IMPORTED_MODULE_5__.f,{title:"Duplicate dashboard",onClose:hideDuplicateDashboardModal,isOpen:duplicateDashboardModalVisible,footer:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"new-dashboard-form",type:"secondary","data-attr":"dashboard-cancel",disabled:isDuplicateDashboardSubmitting,onClick:hideDuplicateDashboardModal,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"new-dashboard-form",type:"secondary","data-attr":"dashboard-submit-and-go",disabled:isDuplicateDashboardSubmitting,onClick:duplicateAndGoToDashboard,children:"Duplicate and go to dashboard"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_2__.J,{form:"duplicate-dashboard-form",htmlType:"submit",type:"primary","data-attr":"duplicate-dashboard-submit",loading:isDuplicateDashboardSubmitting,disabled:isDuplicateDashboardSubmitting,children:"Duplicate"})]}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(kea_forms__WEBPACK_IMPORTED_MODULE_1__.Form,{logic:scenes_dashboard_duplicateDashboardLogic__WEBPACK_IMPORTED_MODULE_6__.T,formKey:"duplicateDashboard",id:"duplicate-dashboard-form",enableFormOnSubmit:!0,className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"duplicateTiles",help:"Choose whether to duplicate this dashboard's insights and text or attach them to the new dashboard.",children:_ref=>{let{value,onChange}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lib_lemon_ui_LemonCheckbox__WEBPACK_IMPORTED_MODULE_3__.H,{checked:value,label:"Duplicate this dashboard's tiles",onChange:onChange})}})})})}},"./frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{l:()=>EmptyDashboardComponent_EmptyDashboardComponent});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),EmptyDashboardComponent=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/EmptyDashboardComponent.scss"),EmptyDashboardComponent_default=__webpack_require__.n(EmptyDashboardComponent),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(EmptyDashboardComponent_default(),options),EmptyDashboardComponent_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonSkeleton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonSkeleton/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),DashboardHeader=__webpack_require__("./frontend/src/scenes/dashboard/DashboardHeader.tsx"),dashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SkeletonCard(_ref){let{children,active}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"border rounded p-10 h-full space-y-4 flex-1 flex flex-col justify-between",children:[(0,jsx_runtime.jsxs)("div",{className:"space-y-4",children:[(0,jsx_runtime.jsx)(LemonSkeleton.y,{className:"w-1/3 h-4",active:active}),(0,jsx_runtime.jsx)(LemonSkeleton.y,{className:"w-1/2 h-4",active:active})]}),children]})}function SkeletonCardOne(_ref2){let{active}=_ref2;return(0,jsx_runtime.jsx)(SkeletonCard,{active:active,children:(0,jsx_runtime.jsx)("div",{className:"flex justify-center flex-1 items-end gap-10",children:[100,66,33].map(height=>(0,jsx_runtime.jsx)("div",{className:"border border-border-light rounded overflow-hidden flex flex-col justify-end w-[15%] h-[80%]",children:(0,jsx_runtime.jsx)("div",{style:{height:`${height}%`},children:(0,jsx_runtime.jsx)(LemonSkeleton.y,{active:active,className:"h-full w-full"})})},height))})})}let SkeletonBars=react.memo(function(_ref3){let{active}=_ref3;return(0,jsx_runtime.jsx)("div",{className:"flex items-end gap-1 flex-1",children:Array(8).fill(0).map((_,index)=>(0,jsx_runtime.jsx)("div",{className:"w-[12.5%]",style:{height:`${60*Math.random()+10}%`},children:(0,jsx_runtime.jsx)(LemonSkeleton.y,{active:active,className:"h-full w-full"})},index))})});function SkeletonCardTwo(_ref4){let{active}=_ref4;return(0,jsx_runtime.jsx)(SkeletonCard,{active:active,children:(0,jsx_runtime.jsx)(SkeletonBars,{active:active})})}function EmptyDashboardComponent_EmptyDashboardComponent(_ref5){let{loading,canEdit}=_ref5,{dashboard}=(0,index_esm.useValues)(dashboardLogic.BM);return(0,jsx_runtime.jsxs)("div",{className:"EmptyDashboard",children:[!loading&&(0,jsx_runtime.jsxs)("div",{className:"EmptyDashboard__cta",children:[(0,jsx_runtime.jsx)("h3",{className:"l3",children:"Dashboard empty"}),(0,jsx_runtime.jsx)("p",{children:"This dashboard sure would look better with some graphs!"}),(0,jsx_runtime.jsx)("div",{className:"mt-4 text-center",children:(0,jsx_runtime.jsx)(LemonButton.J,{"data-attr":"dashboard-add-graph-header",to:urls.j.insightNew(void 0,dashboard?.id),type:"primary",icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPlus,{}),center:!0,fullWidth:!0,disabledReason:canEdit?null:DashboardHeader.o,children:"Add insight"})})]}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 h-[30rem]",children:[(0,jsx_runtime.jsx)(SkeletonCardOne,{active:loading}),(0,jsx_runtime.jsx)(SkeletonCardTwo,{active:loading})]}),(0,jsx_runtime.jsx)("div",{className:"EmptyDashboard__fade",children:(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 h-[30rem]",children:[(0,jsx_runtime.jsx)(SkeletonCardOne,{active:loading}),(0,jsx_runtime.jsx)(SkeletonCardTwo,{active:loading})]})})]})}},"./frontend/src/scenes/dashboard/NewDashboardModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>NewDashboardModal});var src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),LemonModal=__webpack_require__("./frontend/src/lib/lemon-ui/LemonModal/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),dashboardTemplatesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx"),newDashboardLogic=__webpack_require__("./frontend/src/scenes/dashboard/newDashboardLogic.ts"),DashboardTemplateChooser=__webpack_require__("./frontend/src/scenes/dashboard/DashboardTemplateChooser.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),ActionFilter=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.tsx"),types=__webpack_require__("./frontend/src/types.ts"),dashboardTemplateVariablesLogic=__webpack_require__("./frontend/src/scenes/dashboard/dashboardTemplateVariablesLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function DashboardTemplateVariables(){let{activeDashboardTemplate}=(0,index_esm.useValues)(newDashboardLogic.Z),theDashboardTemplateVariablesLogic=(0,dashboardTemplateVariablesLogic.y)({variables:activeDashboardTemplate?.variables||[]}),{variables}=(0,index_esm.useValues)(theDashboardTemplateVariablesLogic),{setVariable,setVariables}=(0,index_esm.useActions)(theDashboardTemplateVariablesLogic);return(0,react.useEffect)(()=>{setVariables(activeDashboardTemplate?.variables||[])},[activeDashboardTemplate]),(0,jsx_runtime.jsx)("div",{className:"mb-4 DashboardTemplateVariables max-w-192",children:variables.map((variable,index)=>(0,jsx_runtime.jsxs)("div",{className:"mb-6",children:[(0,jsx_runtime.jsxs)("div",{className:"mb-2",children:[(0,jsx_runtime.jsx)(src.HQ,{showOptional:!variable.required,info:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:variable.description}),children:variable.name}),(0,jsx_runtime.jsx)("p",{className:"text-sm text-muted",children:variable.description})]}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(ActionFilter.T,{filters:{insight:types.dw.TRENDS,events:[variable.default]},setFilters:filters=>{setVariable(variable.name,filters)},typeKey:"variable_"+variable.name,hideDeleteBtn:!0,hideRename:!0,hideDuplicate:!0,entitiesLimit:1})})]},index))})}function NewDashboardModal(){let builtLogic=(0,index_esm.useMountedLogic)(newDashboardLogic.Z),{hideNewDashboardModal,clearActiveDashboardTemplate,createDashboardFromTemplate}=(0,index_esm.useActions)(newDashboardLogic.Z),{newDashboardModalVisible,activeDashboardTemplate,variableSelectModalVisible}=(0,index_esm.useValues)(newDashboardLogic.Z),{variables}=(0,index_esm.useValues)(dashboardTemplateVariablesLogic.y),templatesLogic=(0,dashboardTemplatesLogic.R)({scope:builtLogic.props.featureFlagId?"feature_flag":"default"}),{templateFilter}=(0,index_esm.useValues)(templatesLogic),{setTemplateFilter}=(0,index_esm.useActions)(templatesLogic),_dashboardTemplateChooser=builtLogic.props.featureFlagId?(0,jsx_runtime.jsx)(DashboardTemplateChooser.g,{scope:"feature_flag"}):(0,jsx_runtime.jsx)(DashboardTemplateChooser.g,{});return(0,jsx_runtime.jsx)(LemonModal.f,{onClose:hideNewDashboardModal,isOpen:newDashboardModalVisible,title:activeDashboardTemplate?"Choose your events":"Create a dashboard","data-attr":"new-dashboard-chooser",description:activeDashboardTemplate?(0,jsx_runtime.jsxs)("p",{children:["The ",(0,jsx_runtime.jsx)("i",{children:activeDashboardTemplate.template_name})," template requires you to choose"," ",(0,utils.Zi)((activeDashboardTemplate.variables||[]).length,"event","events",!0),"."]}):(0,jsx_runtime.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,jsx_runtime.jsx)("div",{children:"Choose a template or start with a blank slate"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Filter templates",onChange:setTemplateFilter,value:templateFilter,fullWidth:!0})})]}),footer:activeDashboardTemplate?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[variableSelectModalVisible?(0,jsx_runtime.jsx)("div",{}):(0,jsx_runtime.jsx)(src.Jp,{onClick:clearActiveDashboardTemplate,type:"secondary",children:"Back"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{activeDashboardTemplate&&createDashboardFromTemplate(activeDashboardTemplate,variables)},type:"primary",children:"Create"})]}):null,children:(0,jsx_runtime.jsx)("div",{className:"NewDashboardModal",children:activeDashboardTemplate?(0,jsx_runtime.jsx)(DashboardTemplateVariables,{}):_dashboardTemplateChooser})})}},"./frontend/src/scenes/dashboard/dashboardCollaboratorsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>dashboardCollaboratorsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),scenes_settings_environment_teamMembersLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/settings/environment/teamMembersLogic.tsx"),_dashboardLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/dashboard/dashboardLogic.tsx");let dashboardCollaboratorsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.dashboardId),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","dashboard","dashboardCollaboratorsLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(props=>({values:[scenes_settings_environment_teamMembersLogic__WEBPACK_IMPORTED_MODULE_4__.A,["admins","plainMembers","allMembers","allMembersLoading"],(0,_dashboardLogic__WEBPACK_IMPORTED_MODULE_5__.BM)({id:props.dashboardId}),["dashboard"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteExplicitCollaborator:userUuid=>({userUuid}),setExplicitCollaboratorsToBeAdded:userUuids=>({userUuids}),addExplicitCollaborators:!0}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{values,props,actions}=_ref;return{explicitCollaborators:[[],{loadExplicitCollaborators:async()=>{let collaborators=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.list(props.dashboardId);return collaborators.sort((a,b)=>a.user.first_name.localeCompare(b.user.first_name)),collaborators},addExplicitCollaborators:async()=>{let{explicitCollaboratorsToBeAdded,explicitCollaborators}=values;actions.setExplicitCollaboratorsToBeAdded([]);let newCollaborators=await Promise.all(explicitCollaboratorsToBeAdded.map(async userUuid=>await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.create(props.dashboardId,userUuid,lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH.CanEdit))),allCollaborators=[...explicitCollaborators,...newCollaborators];return allCollaborators.sort((a,b)=>a.user.first_name.localeCompare(b.user.first_name)),allCollaborators},deleteExplicitCollaborator:async _ref2=>{let{userUuid}=_ref2;return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboards.collaborators.delete(props.dashboardId,userUuid),values.explicitCollaborators.filter(collaborator=>collaborator.user.uuid!==userUuid)}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({explicitCollaboratorsToBeAdded:[[],{setExplicitCollaboratorsToBeAdded:(_,_ref3)=>{let{userUuids}=_ref3;return userUuids}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({allCollaborators:[s=>[s.explicitCollaborators,s.admins,s.allMembers,s.dashboard],(explicitCollaborators,admins,allMembers,dashboard)=>{let allCollaborators=[],dashboardCreatorUuid=dashboard?.created_by?.uuid,baseCollaborators=dashboard?.effective_restriction_level===lib_constants__WEBPACK_IMPORTED_MODULE_3__.V7.EveryoneInProjectCanEdit?allMembers:admins;return allCollaborators.push(...explicitCollaborators.filter(collaborator=>!baseCollaborators.find(baseCollaborator=>baseCollaborator.user.uuid===collaborator.user.uuid)).map(explicitCollaborator=>({...explicitCollaborator,level:explicitCollaborator.user.uuid===dashboardCreatorUuid?lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._Owner:explicitCollaborator.level}))),allCollaborators.push(...baseCollaborators.map(baseCollaborator=>({user:baseCollaborator.user,level:baseCollaborator.user.uuid===dashboardCreatorUuid?lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._Owner:lib_constants__WEBPACK_IMPORTED_MODULE_3__.kH._ProjectAdmin}))),allCollaborators.sort((a,b)=>a.level===b.level?a.user.first_name.localeCompare(b.user.first_name):b.level-a.level),allCollaborators}],addableMembers:[s=>[s.allCollaborators,s.plainMembers],(allCollaborators,plainMembers)=>{let addableMembers=[];for(let plainMember of plainMembers)allCollaborators.some(collaborator=>collaborator.user.uuid===plainMember.user.uuid)||addableMembers.push(plainMember.user);return addableMembers.sort((a,b)=>a.first_name.localeCompare(b.first_name)),addableMembers}],addableMembersLoading:[s=>[s.explicitCollaboratorsLoading,s.allMembersLoading],(explicitCollaboratorsLoading,allMembersLoading)=>explicitCollaboratorsLoading||allMembersLoading]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.events)(_ref4=>{let{actions}=_ref4;return{afterMount:()=>{actions.loadExplicitCollaborators()}}})])},"./frontend/src/scenes/dashboard/dashboardLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j$:()=>BREAKPOINTS,cH:()=>BREAKPOINT_COLUMN_COUNTS,BM:()=>dashboardLogic});var index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),api=__webpack_require__("./frontend/src/lib/api.ts"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),internalMetrics=__webpack_require__("./frontend/src/lib/internalMetrics.ts"),LemonToast=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),eventUsageLogic=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),lodash_uniqby=__webpack_require__("./node_modules/.pnpm/lodash.uniqby@4.7.0/node_modules/lodash.uniqby/index.js"),lodash_uniqby_default=__webpack_require__.n(lodash_uniqby),InsightViz_utils=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),queries_utils=__webpack_require__("./frontend/src/queries/utils.ts"),types=__webpack_require__("./frontend/src/types.ts");let sortTilesByLayout=(tiles,col)=>[...tiles].sort((a,b)=>{var _a$layouts$col$x,_a$layouts$col$y,_b$layouts$col$x,_b$layouts$col$y;let ax=null!==(_a$layouts$col$x=a.layouts[col]?.x)&&void 0!==_a$layouts$col$x?_a$layouts$col$x:0,ay=null!==(_a$layouts$col$y=a.layouts[col]?.y)&&void 0!==_a$layouts$col$y?_a$layouts$col$y:0,bx=null!==(_b$layouts$col$x=b.layouts[col]?.x)&&void 0!==_b$layouts$col$x?_b$layouts$col$x:0,by=null!==(_b$layouts$col$y=b.layouts[col]?.y)&&void 0!==_b$layouts$col$y?_b$layouts$col$y:0;return ayby||ay==by&&ax>bx?1:0}),calculateLayouts=tiles=>{let referenceOrder;let allLayouts={};for(let breakpoint of Object.keys(BREAKPOINT_COLUMN_COUNTS)){let sortedDashboardTiles;let columnCount=BREAKPOINT_COLUMN_COUNTS[breakpoint];void 0===referenceOrder?referenceOrder=(sortedDashboardTiles=sortTilesByLayout(tiles,breakpoint)).map(tile=>tile.id):sortedDashboardTiles=tiles.sort((a,b)=>(referenceOrder?.indexOf(a.id)||0)-(referenceOrder?.indexOf(b.id)||0));let layouts=(sortedDashboardTiles||[]).map(tile=>{let query=tile.insight?(0,InsightViz_utils.Q0)(tile.insight):null,minW=3,minH=3,defaultW=6,defaultH=5;tile.text?(minW=1,minH=1,defaultH=2):(0,queries_utils.Wl)(query)?(minW=4,minH=4):(0,queries_utils.I5)(query)?(minW=6,minH=7,defaultW=6,defaultH=7):(0,queries_utils.Qp)(query)?(minW=columnCount,minH=7,defaultW=columnCount,defaultH=7):(0,queries_utils.kX)(query)&&query.trendsFilter?.display===types.Qb.BoldNumber&&(minW=2,minH=2),"xs"===breakpoint&&(minW=1,defaultW=1);let layout=tile.layouts&&tile.layouts[breakpoint],{x,y,w,h}=layout||{},realW=Math.min(w||defaultW,columnCount),realH=h||defaultH;return{i:tile.id?.toString(),x:Number.isInteger(x)&&x+realW-1{let{y}=_ref;return y!==1/0}),dirtyLayouts=layouts?.filter(_ref2=>{let{y}=_ref2;return y===1/0}),lowestPoints=Array.from(Array(columnCount)).map(()=>-1);for(let{x,y,w,h}of cleanLayouts)for(let i=x;i<=x+w-1;i++)lowestPoints[i]=Math.max(lowestPoints[i],y+h-1);for(let{i,w,h,minW,minH}of dirtyLayouts){let segmentCount=columnCount-w+1,lowestSegments=Array.from(Array(segmentCount)).map(()=>-1);for(let k=0;k{let promise=task().then(result=>{results.push(result)}).catch(error=>{console.error("Error executing task:",error)}).finally(()=>{activePromises.delete(promise)});activePromises.add(promise),await promise};for(;remainingTasks.length>0||activePromises.size>0;)activePromises.size0?startTask(remainingTasks.shift()):await Promise.race(activePromises);return results}let layoutsByTile=layouts=>{let itemLayouts={};return Object.entries(layouts).forEach(_ref=>{let[col,layout]=_ref;layout.forEach(layoutItem=>{itemLayouts[layoutItem.i]||(itemLayouts[layoutItem.i]={}),itemLayouts[layoutItem.i][col]=layoutItem})}),itemLayouts};async function getSingleInsight(currentTeamId,insight,dashboardId,queryId,refresh,methodOptions,filtersOverride,variablesOverride){let apiUrl=`api/environments/${currentTeamId}/insights/${insight.id}/?${(0,utils.oZ)({refresh,from_dashboard:dashboardId,client_query_id:queryId,session_id:(0,internalMetrics.U8)(),...filtersOverride?{filters_override:filtersOverride}:{},...variablesOverride?{variables_override:variablesOverride}:{}})}`,insightResponse=await api.ZP.getResponse(apiUrl,methodOptions),legacyInsight=await (0,api.$6)(insightResponse);return null!==legacyInsight?(0,InsightViz_utils.Q0)(legacyInsight):null}let dashboardLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","dashboard","dashboardLogic"]),(0,index_esm.connect)(()=>({values:[teamLogic.H,["currentTeamId"],featureFlagLogic.h,["featureFlags"],variableDataLogic.p,["variables"]],logic:[dashboardsModel.h,insightsModel.U,eventUsageLogic.vx]})),(0,index_esm.props)({}),(0,index_esm.key)(props=>{if("number"!=typeof props.id)throw Error("Must init dashboardLogic with a numeric ID key");return props.id}),(0,index_esm.actions)(_ref2=>{let{values}=_ref2;return{loadDashboard:payload=>payload,triggerDashboardUpdate:payload=>({payload}),setDashboardMode:(mode,source)=>({mode,source}),updateLayouts:layouts=>({layouts}),updateContainerWidth:(containerWidth,columns)=>({containerWidth,columns}),updateTileColor:(tileId,color)=>({tileId,color}),removeTile:tile=>({tile}),refreshDashboardItem:payload=>payload,refreshAllDashboardItems:payload=>payload,refreshAllDashboardItemsManual:!0,resetInterval:!0,updateAndRefreshDashboard:!0,setDates:(date_from,date_to)=>({date_from,date_to}),setProperties:properties=>({properties}),setFiltersAndLayoutsAndVariables:(filters,variables)=>({filters,variables}),setAutoRefresh:(enabled,interval)=>({enabled,interval}),setRefreshStatus:function(shortId){let loading=arguments.length>1&&void 0!==arguments[1]&&arguments[1],queued=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{shortId,loading,queued}},setRefreshStatuses:function(shortIds){let loading=arguments.length>1&&void 0!==arguments[1]&&arguments[1],queued=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{shortIds,loading,queued}},setPageVisibility:visible=>({visible}),setRefreshError:shortId=>({shortId}),reportDashboardViewed:!0,setShouldReportOnAPILoad:shouldReport=>({shouldReport}),setSubscriptionMode:(enabled,id)=>({enabled,id}),moveToDashboard:(tile,fromDashboard,toDashboard,toDashboardName,allowUndo)=>({tile,fromDashboard,toDashboard,toDashboardName,allowUndo:void 0===allowUndo||allowUndo}),setTextTileId:textTileId=>({textTileId}),duplicateTile:tile=>({tile}),loadingDashboardItemsStarted:(action,dashboardQueryId)=>({action,dashboardQueryId}),setInitialLoadResponseBytes:responseBytes=>({responseBytes}),abortQuery:payload=>payload,abortAnyRunningQuery:!0,updateFiltersAndLayoutsAndVariables:!0,overrideVariableValue:(variableId,value)=>({variableId,value,allVariables:values.variables}),resetVariables:()=>({variables:values.insightVariables})}}),(0,lib.loaders)(_ref3=>{let{actions,props,values}=_ref3;return{dashboard:[null,{loadDashboard:async(_ref4,breakpoint)=>{let{refresh,action}=_ref4,dashboardQueryId=(0,utils.Vj)();actions.loadingDashboardItemsStarted(action,dashboardQueryId),await breakpoint(200);try{let apiUrl=values.apiUrl(refresh||"async","preview"===action?values.temporaryFilters:void 0,"preview"===action?values.temporaryVariables:void 0),dashboardResponse=await api.ZP.getResponse(apiUrl),dashboard=await (0,api.$6)(dashboardResponse);if(actions.setInitialLoadResponseBytes((0,insights_utils.Rl)(dashboardResponse)),"preview"===action&&dashboard){let editModeTileLayouts={};values.dashboard?.tiles.forEach(tile=>{editModeTileLayouts[tile.id]=tile.layouts});let tilesWithPreviousLayouts=dashboard.tiles.map(tile=>({...tile,layouts:editModeTileLayouts?.[tile.id]}));return(0,InsightViz_utils.ob)({...dashboard,tiles:tilesWithPreviousLayouts})}return(0,InsightViz_utils.ob)(dashboard)}catch(error){if(404===error.status)return null;throw error}},updateFiltersAndLayoutsAndVariables:async(_,breakpoint)=>{actions.abortAnyRunningQuery();try{let layoutsToUpdate=(values.dashboard?.tiles||[]).map(tile=>({id:tile.id,layouts:tile.layouts}));breakpoint();let dashboard=await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{filters:values.filters,variables:values.insightVariables,tiles:layoutsToUpdate});return(0,InsightViz_utils.ob)(dashboard)}catch(e){return LemonToast.UJ.error("Could not update dashboard: "+String(e)),values.dashboard}},updateTileColor:async _ref5=>{let{tileId,color}=_ref5;await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[{id:tileId,color}]});let matchingTile=values.tiles.find(tile=>tile.id===tileId);return matchingTile&&(matchingTile.color=color),values.dashboard},removeTile:async _ref6=>{let{tile}=_ref6;try{return await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[{id:tile.id,deleted:!0}]}),dashboardsModel.h.actions.tileRemovedFromDashboard({tile:tile,dashboardId:props.id}),{...values.dashboard,tiles:values.tiles.filter(t=>t.id!==tile.id)}}catch(e){return LemonToast.UJ.error("Could not remove tile from dashboard: "+String(e)),values.dashboard}},setDashboardMode:async _ref7=>{let{mode,source}=_ref7;if(null===mode&&source===eventUsageLogic.GU.DashboardHeaderDiscardChanges&&values.dashboard?.tiles){let restoredTiles=values.dashboard?.tiles?.map(tile=>({...tile,layouts:values.dashboardLayouts?.[tile.id]}));values.dashboard.tiles=restoredTiles}return values.dashboard},duplicateTile:async _ref8=>{let{tile}=_ref8;try{let newTile={...tile};delete newTile.id,newTile.text&&(newTile.text={body:newTile.text.body});let dashboard=await api.ZP.update(`api/environments/${values.currentTeamId}/dashboards/${props.id}`,{tiles:[newTile]});return(0,InsightViz_utils.ob)(dashboard)}catch(e){return LemonToast.UJ.error("Could not duplicate tile: "+String(e)),values.dashboard}},moveToDashboard:async _ref9=>{let{tile,fromDashboard,toDashboard}=_ref9;if(!tile||fromDashboard===toDashboard||fromDashboard!==props.id)return values.dashboard;let dashboard=await api.ZP.update(`api/environments/${teamLogic.H.values.currentTeamId}/dashboards/${props.id}/move_tile`,{tile,toDashboard});return(0,InsightViz_utils.ob)(dashboard)}}]}}),(0,index_esm.reducers)(_ref10=>{let{props}=_ref10;return{_dashboardLoading:[!1,{loadDashboard:()=>!0,loadDashboardSuccess:()=>!1,loadDashboardFailure:()=>!1}],pageVisibility:[!0,{setPageVisibility:(_,_ref11)=>{let{visible}=_ref11;return visible}}],dashboardFailedToLoad:[!1,{loadDashboardSuccess:()=>!1,loadDashboardFailure:()=>!0}],dashboardLayouts:[{},{loadDashboardSuccess:(state,_ref12)=>{let{dashboard,payload}=_ref12;if(payload?.action==="preview")return state;let tileIdToLayouts={};return dashboard?.tiles.forEach(tile=>{tileIdToLayouts[tile.id]=tile.layouts}),tileIdToLayouts}}],temporaryVariables:[{},{overrideVariableValue:(state,_ref13)=>{let{variableId,value,allVariables}=_ref13,foundExistingVar=allVariables.find(n=>n.id===variableId);return foundExistingVar?{...state,[variableId]:{code_name:foundExistingVar.code_name,variableId:foundExistingVar.id,value}}:state},resetVariables:(_,_ref14)=>{let{variables}=_ref14;return{...variables}},loadDashboardSuccess:(state,_ref15)=>{var _dashboard$variables;let{dashboard,payload}=_ref15;return dashboard?{...state,...payload?.action==="preview"?{}:null!==(_dashboard$variables=dashboard.variables)&&void 0!==_dashboard$variables?_dashboard$variables:{}}:state}}],insightVariables:[{},{setFiltersAndLayoutsAndVariables:(state,_ref16)=>{let{variables}=_ref16;return{...state,...variables}},loadDashboardSuccess:(state,_ref17)=>{var _dashboard$variables2;let{dashboard,payload}=_ref17;return dashboard?{...state,...payload?.action==="preview"?{}:null!==(_dashboard$variables2=dashboard.variables)&&void 0!==_dashboard$variables2?_dashboard$variables2:{}}:state}}],temporaryFilters:[{date_from:null,date_to:null,properties:null},{setDates:(state,_ref18)=>{let{date_from,date_to}=_ref18;return{...state,date_from:date_from||null,date_to:date_to||null}},setProperties:(state,_ref19)=>{let{properties}=_ref19;return{...state,properties:properties||null}},loadDashboardSuccess:(state,_ref20)=>{let{dashboard}=_ref20;return dashboard?{...state,date_from:dashboard?.filters.date_from||null,date_to:dashboard?.filters.date_to||null,properties:dashboard?.filters.properties||[]}:state}}],filters:[{date_from:null,date_to:null,properties:null},{setFiltersAndLayoutsAndVariables:(state,_ref21)=>{let{filters}=_ref21;return{...state,...filters}},loadDashboardSuccess:(state,_ref22)=>{let{dashboard,payload}=_ref22;return dashboard?{...state,...payload?.action==="preview"?{}:{date_from:dashboard?.filters.date_from||null,date_to:dashboard?.filters.date_to||null,properties:dashboard?.filters.properties||[]}}:state}}],dashboard:[null,{updateLayouts:(state,_ref23)=>{let{layouts}=_ref23,itemLayouts=layoutsByTile(layouts);return{...state,tiles:state?.tiles?.map(tile=>({...tile,layouts:itemLayouts[tile.id]}))}},[dashboardsModel.h.actionTypes.tileMovedToDashboard]:(state,_ref24)=>{let{tile,dashboardId}=_ref24;return state?.id===dashboardId?{...state,tiles:[...state.tiles,tile]}:state},[dashboardsModel.h.actionTypes.updateDashboardInsight]:(state,_ref25)=>{let{insight,extraDashboardIds}=_ref25,targetDashboards=(insight.dashboard_tiles||[]).map(tile=>tile.dashboard_id).concat(extraDashboardIds||[]);if(!targetDashboards.includes(props.id))return state;if(state){let tileIndex=state.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===insight.short_id),newTiles=state.tiles.slice();return tileIndex>=0&&(insight.dashboards?.includes(props.id)?newTiles[tileIndex]={...newTiles[tileIndex],insight:insight}:insight.dashboards?.includes(props.id)||newTiles.splice(tileIndex,1)),{...state,tiles:newTiles.filter(t=>!t.deleted||!t.insight?.deleted)}}return null},[dashboardsModel.h.actionTypes.updateDashboardSuccess]:(state,_ref26)=>{let{dashboard}=_ref26;return state&&dashboard&&state.id===dashboard.id?dashboard:state},[insightsModel.U.actionTypes.renameInsightSuccess]:(state,_ref27)=>{let{item}=_ref27,tileIndex=state?.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===item.short_id),tiles=state?.tiles.slice(0);return void 0!==tileIndex&&-1!==tileIndex&&tiles?(tiles[tileIndex]={...tiles[tileIndex],insight:{...tiles[tileIndex].insight,name:item.name,last_modified_at:item.last_modified_at}},{...state,tiles}):state}}],loadTimer:[null,{loadDashboard:()=>new Date}],dashboardLoadTimerData:[{dashboardQueryId:"",action:"",startTime:0,responseBytes:0},{loadingDashboardItemsStarted:(_,_ref28)=>{let{action,dashboardQueryId}=_ref28;return{action,dashboardQueryId,startTime:performance.now(),responseBytes:0}},setInitialLoadResponseBytes:(state,_ref29)=>{let{responseBytes}=_ref29;return{...state,responseBytes}}}],refreshStatus:[{},{setRefreshStatus:(state,_ref30)=>{let{shortId,loading,queued}=_ref30;return{...state,[shortId]:loading?{loading:!0,queued:!0,timer:new Date}:queued?{loading:!1,queued:!0,timer:null}:{refreshed:!0,timer:state[shortId]?.timer||null}}},setRefreshStatuses:(state,_ref31)=>{let{shortIds,loading,queued}=_ref31;return Object.fromEntries(shortIds.map(shortId=>[shortId,loading?{loading:!0,queued:!0,timer:new Date}:queued?{loading:!1,queued:!0,timer:null}:{refreshed:!0,timer:state[shortId]?.timer||null}]))},setRefreshError:(state,_ref32)=>{let{shortId}=_ref32;return{...state,[shortId]:{error:!0,timer:state[shortId]?.timer||null}}},refreshAllDashboardItems:()=>({}),abortQuery:()=>({})}],columns:[null,{updateContainerWidth:(_,_ref33)=>{let{columns}=_ref33;return columns}}],containerWidth:[null,{updateContainerWidth:(_,_ref34)=>{let{containerWidth}=_ref34;return containerWidth}}],dashboardMode:[null,{setDashboardMode:(_,_ref35)=>{let{mode}=_ref35;return mode}}],autoRefresh:[{interval:1800,enabled:!1},{persist:!0,prefix:"2_"},{setAutoRefresh:(_,_ref36)=>{let{enabled,interval}=_ref36;return{enabled,interval}}}],shouldReportOnAPILoad:[!1,{setShouldReportOnAPILoad:(_,_ref37)=>{let{shouldReport}=_ref37;return shouldReport}}],showSubscriptions:[!1,{setSubscriptionMode:(_,_ref38)=>{let{enabled}=_ref38;return enabled}}],subscriptionId:[null,{setSubscriptionMode:(_,_ref39)=>{let{id}=_ref39;return id||null}}],showTextTileModal:[!1,{setTextTileId:(_,_ref40)=>{let{textTileId}=_ref40;return!!textTileId}}],textTileId:[null,{setTextTileId:(_,_ref41)=>{let{textTileId}=_ref41;return textTileId}}]}}),(0,index_esm.selectors)(()=>({dashboardVariables:[s=>[s.dashboard,s.variables,s.temporaryVariables],(dashboard,allVariables,temporaryVariables)=>{let dataVizNodes=dashboard.tiles.map(n=>n.insight?.query).filter(n=>n?.kind===schema.OH.DataVisualizationNode).filter(n=>!!n),hogQLVariables=dataVizNodes.map(n=>n.source.variables).filter(n=>!!n).flatMap(n=>Object.values(n)),uniqueVars=lodash_uniqby_default()(hogQLVariables,n=>n.variableId);return uniqueVars.map(v=>{var _ref42;let foundVar=allVariables.find(n=>n.id===v.variableId);if(!foundVar)return null;let overridenValue=temporaryVariables[v.variableId]?.value,resultVar={...foundVar,value:null!==(_ref42=null!=overridenValue?overridenValue:v.value)&&void 0!==_ref42?_ref42:foundVar.value};return resultVar}).filter(n=>!!n)}],asDashboardTemplate:[s=>[s.dashboard],dashboard=>dashboard?{template_name:dashboard.name,dashboard_description:dashboard.description,dashboard_filters:dashboard.filters,tags:dashboard.tags||[],tiles:dashboard.tiles.map(tile=>{if(tile.text)return{type:"TEXT",body:tile.text.body,layouts:tile.layouts,color:tile.color};if(tile.insight)return{type:"INSIGHT",name:tile.insight.name,description:tile.insight.description||"",query:tile.insight.query,layouts:tile.layouts,color:tile.color};throw Error("Unknown tile type")}),variables:[]}:void 0],placement:[()=>[(_,props)=>props.placement],placement=>placement||types.F4.Dashboard],apiUrl:[()=>[(_,props)=>props.id],id=>(refresh,filtersOverride,variablesOverride)=>`api/environments/${teamLogic.H.values.currentTeamId}/dashboards/${id}/?${(0,utils.oZ)({refresh,filters_override:filtersOverride,variables_override:variablesOverride})}`],tiles:[s=>[s.dashboard],dashboard=>dashboard?.tiles?.filter(t=>!t.deleted)||[]],insightTiles:[s=>[s.tiles],tiles=>tiles.filter(t=>!!t.insight).filter(i=>!i.insight?.deleted)],textTiles:[s=>[s.tiles],tiles=>tiles.filter(t=>!!t.text)],itemsLoading:[s=>[s._dashboardLoading,s.refreshStatus],(dashboardLoading,refreshStatus)=>dashboardLoading||Object.values(refreshStatus).some(s=>s.loading||s.queued)],isRefreshingQueued:[s=>[s.refreshStatus],refreshStatus=>id=>!!refreshStatus[id]?.queued],isRefreshing:[s=>[s.refreshStatus],refreshStatus=>id=>!!refreshStatus[id]?.loading],highlightedInsightId:[()=>[kea_router_lib.router.selectors.searchParams],searchParams=>searchParams.highlightInsightId],sortedDates:[s=>[s.insightTiles],insightTiles=>{if(!insightTiles||!insightTiles.length)return[];let validDates=insightTiles.map(i=>(0,dayjs.Bv)(i.insight?.last_refresh)).filter(date=>date.isValid());return(0,insights_utils.XT)(validDates)}],newestRefreshed:[s=>[s.sortedDates,s.pageVisibility],sortedDates=>sortedDates.length?sortedDates[sortedDates.length-1]:null],sortedClientRefreshAllowed:[s=>[s.insightTiles],insightTiles=>{if(!insightTiles||!insightTiles.length)return[];let validDates=insightTiles.filter(i=>!!i.insight?.cache_target_age||!!i.insight?.next_allowed_client_refresh).map(i=>{var _i$insight$cache_targ;return(0,dayjs.Bv)(null!==(_i$insight$cache_targ=i.insight?.cache_target_age)&&void 0!==_i$insight$cache_targ?_i$insight$cache_targ:i.insight?.next_allowed_client_refresh)}).filter(date=>date.isValid());return(0,insights_utils.XT)(validDates)}],oldestClientRefreshAllowed:[s=>[s.sortedClientRefreshAllowed],sortedClientRefreshAllowed=>sortedClientRefreshAllowed.length?sortedClientRefreshAllowed[0]:null],blockRefresh:[s=>[s.newestRefreshed,s.placement,s.oldestClientRefreshAllowed,s.pageVisibility],(newestRefreshed,placement,oldestClientRefreshAllowed)=>!!newestRefreshed&&placement!==types.F4.FeatureFlag&&oldestClientRefreshAllowed?.isAfter(dayjs.zO())],canEditDashboard:[s=>[s.dashboard],dashboard=>!!dashboard&&dashboard.effective_privilege_level>=constants.kH.CanEdit],canRestrictDashboard:[s=>[s.dashboard,userLogic.userLogic.selectors.user,teamLogic.H.selectors.currentTeam],(dashboard,user,currentTeam)=>!!dashboard&&!!user&&(user.uuid===dashboard.created_by?.uuid||!!currentTeam?.effective_membership_level&¤tTeam.effective_membership_level>=constants.Dk.Admin)],sizeKey:[s=>[s.columns],columns=>{let[size]=Object.entries(BREAKPOINT_COLUMN_COUNTS).find(_ref43=>{let[,value]=_ref43;return value===columns})||[];return size}],layouts:[s=>[s.tiles],tiles=>calculateLayouts(tiles)],layout:[s=>[s.layouts,s.sizeKey],(layouts,sizeKey)=>sizeKey?layouts[sizeKey]:void 0],layoutForItem:[s=>[s.layout],layout=>{let layoutForItem={};if(layout)for(let obj of layout)layoutForItem[obj.i]=obj;return layoutForItem}],refreshMetrics:[s=>[s.refreshStatus],refreshStatus=>{var _Object$keys$length,_Object$values$filter;let total=null!==(_Object$keys$length=Object.keys(refreshStatus).length)&&void 0!==_Object$keys$length?_Object$keys$length:0;return{completed:total-(null!==(_Object$values$filter=Object.values(refreshStatus).filter(s=>s.loading||s.queued).length)&&void 0!==_Object$values$filter?_Object$values$filter:0),total}}],breadcrumbs:[s=>[s.dashboard,s._dashboardLoading,s.dashboardFailedToLoad],(dashboard,dashboardLoading,dashboardFailedToLoad)=>[{key:sceneTypes.x.Dashboards,name:"Dashboards",path:urls.j.dashboards()},{key:[sceneTypes.x.Dashboard,dashboard?.id||"new"],name:dashboard?.id?dashboard.name:dashboardFailedToLoad?"Could not load":dashboardLoading?null:"Not found",onRename:async name=>{dashboard&&await dashboardsModel.h.asyncActions.updateDashboard({id:dashboard.id,name,allowUndo:!0})}}]],[sidepanel_types.f]:[s=>[s.dashboard],dashboard=>dashboard?{activity_scope:types.jc.DASHBOARD,activity_item_id:`${dashboard.id}`,access_control_resource:"dashboard",access_control_resource_id:`${dashboard.id}`}:null],sortTilesByLayout:[s=>[s.layoutForItem],layoutForItem=>tiles=>[...tiles].sort((a,b)=>{var _layoutForItem$a$id$x,_layoutForItem$a$id$y,_layoutForItem$b$id$x,_layoutForItem$b$id$y;let ax=null!==(_layoutForItem$a$id$x=layoutForItem[a.id]?.x)&&void 0!==_layoutForItem$a$id$x?_layoutForItem$a$id$x:0,ay=null!==(_layoutForItem$a$id$y=layoutForItem[a.id]?.y)&&void 0!==_layoutForItem$a$id$y?_layoutForItem$a$id$y:0,bx=null!==(_layoutForItem$b$id$x=layoutForItem[b.id]?.x)&&void 0!==_layoutForItem$b$id$x?_layoutForItem$b$id$x:0,by=null!==(_layoutForItem$b$id$y=layoutForItem[b.id]?.y)&&void 0!==_layoutForItem$b$id$y?_layoutForItem$b$id$y:0;return ayby||ay==by&&ax>bx?1:0})]})),(0,index_esm.events)(_ref44=>{let{actions,cache,props}=_ref44;return{afterMount:()=>{props.id&&(props.dashboard?actions.loadDashboardSuccess(props.dashboard):actions.loadDashboard({refresh:"lazy_async",action:"initial_load"}))},beforeUnmount:()=>{cache.autoRefreshInterval&&(window.clearInterval(cache.autoRefreshInterval),cache.autoRefreshInterval=null)}}}),(0,index_esm.sharedListeners)(_ref45=>{let{values,props}=_ref45;return{reportRefreshTiming:_ref46=>{let{shortId}=_ref46,refreshStatus=values.refreshStatus[shortId];if(refreshStatus?.timer){let loadingMilliseconds=new Date().getTime()-refreshStatus.timer.getTime();eventUsageLogic.vx.actions.reportInsightRefreshTime(loadingMilliseconds,shortId)}},reportLoadTiming:()=>{if(values.loadTimer){let loadingMilliseconds=new Date().getTime()-values.loadTimer.getTime();eventUsageLogic.vx.actions.reportDashboardLoadingTime(loadingMilliseconds,props.id)}}}}),(0,index_esm.listeners)(_ref47=>{let{actions,values,cache,props,sharedListeners}=_ref47;return{updateFiltersAndLayoutsAndVariablesSuccess:()=>{actions.loadDashboard({action:"update"})},setRefreshError:sharedListeners.reportRefreshTiming,setRefreshStatuses:sharedListeners.reportRefreshTiming,setRefreshStatus:sharedListeners.reportRefreshTiming,loadDashboardFailure:()=>{let{action,dashboardQueryId,startTime}=values.dashboardLoadTimerData;eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",status:"failure",action,primary_interaction_id:dashboardQueryId,time_to_see_data_ms:Math.floor(performance.now()-startTime)})},[insightsModel.U.actionTypes.duplicateInsightSuccess]:()=>{actions.loadDashboard({action:"update"})},[dashboardsModel.h.actionTypes.tileAddedToDashboard]:_ref48=>{let{dashboardId}=_ref48;dashboardId===props.id&&actions.loadDashboard({action:"update"})},[dashboardsModel.h.actionTypes.updateDashboardInsight]:_ref49=>{let{insight,extraDashboardIds}=_ref49,targetDashboards=(insight.dashboard_tiles||[]).map(tile=>tile.dashboard_id).concat(extraDashboardIds||[]);if(!targetDashboards.includes(props.id))return;let tileIndex=values.tiles.findIndex(t=>!!t.insight&&t.insight.short_id===insight.short_id);-1===tileIndex&&actions.loadDashboard({action:"update"})},moveToDashboardSuccess:_ref50=>{let{payload}=_ref50;if(payload?.toDashboard===void 0||payload?.tile===void 0)return;let updatedTile={...payload.tile};void 0!==updatedTile.insight&&null!==updatedTile.insight&&(updatedTile.insight.dashboards=payload.tile.insight?.dashboards?.filter(d=>d!==payload.fromDashboard)||[],updatedTile.insight.dashboards.push(payload.toDashboard)),updatedTile&&(dashboardsModel.h.actions.tileMovedToDashboard(updatedTile,payload.toDashboard),LemonToast.UJ.success((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Insight moved to"," ",(0,jsx_runtime.jsx)("b",{children:(0,jsx_runtime.jsx)(Link.r,{to:urls.j.dashboard(payload?.toDashboard),children:payload?.toDashboardName})})]})))},triggerDashboardUpdate:_ref51=>{let{payload}=_ref51;values.dashboard&&dashboardsModel.h.actions.updateDashboard({id:values.dashboard.id,...payload})},refreshAllDashboardItemsManual:()=>{actions.resetInterval(),actions.loadDashboard({action:"refresh"})},refreshDashboardItem:async(_ref52,breakpoint)=>{let{tile}=_ref52,dashboardId=props.id,insight=tile.insight;if(insight){actions.setRefreshStatus(insight.short_id,!0,!0);try{breakpoint();let refreshedInsight=await getSingleInsight(values.currentTeamId,insight,dashboardId,(0,utils.Vj)(),"force_async",void 0,void 0,values.temporaryVariables);dashboardsModel.h.actions.updateDashboardInsight(refreshedInsight),tile.insight=refreshedInsight,actions.refreshAllDashboardItems({tiles:[tile],action:REFRESH_DASHBOARD_ITEM_ACTION})}catch(e){actions.setRefreshError(insight.short_id)}}},refreshAllDashboardItems:async(_ref53,breakpoint)=>{let{tiles,action,dashboardQueryId=(0,utils.Vj)()}=_ref53,dashboardId=props.id,insightsToRefresh=(tiles||values.insightTiles||[]).filter(t=>{if(t.insight?.query_status)return!0}).map(t=>t.insight).filter(i=>!!i);if(0===insightsToRefresh.length){let dashboard=values.dashboard;if(dashboard&&action!==REFRESH_DASHBOARD_ITEM_ACTION){let{action,dashboardQueryId,startTime,responseBytes}=values.dashboardLoadTimerData,lastRefresh=(0,insights_utils.jQ)(dashboard.tiles.map(tile=>tile.insight?.last_refresh||null));eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",action,status:"success",primary_interaction_id:dashboardQueryId,time_to_see_data_ms:Math.floor(performance.now()-startTime),api_response_bytes:responseBytes,insights_fetched:dashboard.tiles.length,insights_fetched_cached:dashboard.tiles.reduce((acc,curr)=>acc+(curr.is_cached?1:0),0),min_last_refresh:lastRefresh[0],max_last_refresh:lastRefresh[lastRefresh.length-1]})}return}let cancelled=!1;actions.setRefreshStatuses(insightsToRefresh.map(item=>item.short_id),!1,!0),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},refreshStartTime=performance.now(),refreshesFinished=0,fetchItemFunctions=insightsToRefresh.map(insight=>async()=>{let queryId=insight?.query_status?.id,queryStartTime=performance.now();try{if(breakpoint(),queryId){await (0,query.iM)(queryId,methodOptions);let currentTeamId=values.currentTeamId,polledInsight=await getSingleInsight(currentTeamId,insight,dashboardId,queryId,"force_cache",methodOptions,"preview"===action?values.temporaryFilters:void 0,"preview"===action?values.temporaryVariables:void 0);"preview"===action&&polledInsight.dashboard_tiles&&(polledInsight.dashboards=[dashboardId]),dashboardsModel.h.actions.updateDashboardInsight(polledInsight),actions.setRefreshStatus(insight.short_id)}}catch(e){(0,index_esm.isBreakpoint)(e)?cancelled=!0:(0,utils.sd)(e)?(!cancelled&&queryId&&actions.abortQuery({dashboardQueryId:dashboardQueryId,queryId,queryStartTime}),(0,utils.N)(e)&&(cancelled=!0)):actions.setRefreshError(insight.short_id)}if(refreshesFinished+=1,!cancelled&&refreshesFinished===insightsToRefresh.length){let payload={team_id:values.currentTeamId,type:"dashboard_load",context:"dashboard",action,status:"success",primary_interaction_id:dashboardQueryId,api_response_bytes:0,time_to_see_data_ms:Math.floor(performance.now()-refreshStartTime),insights_fetched:insightsToRefresh.length,insights_fetched_cached:0};eventUsageLogic.vx.actions.reportTimeToSeeData(payload)}});await runWithLimit(fetchItemFunctions,2),eventUsageLogic.vx.actions.reportDashboardRefreshed(dashboardId,values.newestRefreshed)},setFiltersAndLayoutsAndVariables:_ref54=>{let{filters:{date_from,date_to}}=_ref54;actions.updateFiltersAndLayoutsAndVariables(),eventUsageLogic.vx.actions.reportDashboardDateRangeChanged(date_from,date_to),eventUsageLogic.vx.actions.reportDashboardPropertiesChanged()},setDashboardMode:async _ref55=>{let{mode,source}=_ref55;if(mode===types.MN.Edit)(0,utils.O3)(),LemonToast.UJ.info("Now editing the dashboard – save to persist changes");else if(null===mode){if(source===eventUsageLogic.GU.DashboardHeaderDiscardChanges){var _values$filters$date_,_values$filters$date_2,_values$filters$prope;actions.setDates(null!==(_values$filters$date_=values.filters.date_from)&&void 0!==_values$filters$date_?_values$filters$date_:null,null!==(_values$filters$date_2=values.filters.date_to)&&void 0!==_values$filters$date_2?_values$filters$date_2:null),actions.setProperties(null!==(_values$filters$prope=values.filters.properties)&&void 0!==_values$filters$prope?_values$filters$prope:null),actions.resetVariables()}else source===eventUsageLogic.GU.DashboardHeaderSaveDashboard&&actions.setFiltersAndLayoutsAndVariables(values.temporaryFilters,values.temporaryVariables)}mode&&eventUsageLogic.vx.actions.reportDashboardModeToggled(mode,source)},setAutoRefresh:()=>{actions.resetInterval()},resetInterval:()=>{cache.autoRefreshInterval&&(window.clearInterval(cache.autoRefreshInterval),cache.autoRefreshInterval=null),values.autoRefresh.enabled&&(!values.itemsLoading&&values.newestRefreshed&&values.newestRefreshed.isBefore((0,dayjs.zO)().subtract(values.autoRefresh.interval,"seconds"))&&actions.loadDashboard({action:"refresh"}),cache.autoRefreshInterval=window.setInterval(()=>{actions.loadDashboard({action:"refresh"})},1e3*values.autoRefresh.interval))},loadDashboardSuccess:function(){if(sharedListeners.reportLoadTiming(...arguments),!values.dashboard)return;let{action,dashboardQueryId}=values.dashboardLoadTimerData;actions.refreshAllDashboardItems({action,dashboardQueryId}),values.shouldReportOnAPILoad&&(actions.setShouldReportOnAPILoad(!1),actions.reportDashboardViewed())},reportDashboardViewed:async(_,breakpoint)=>{let{dashboard,newestRefreshed}=values;dashboard?(eventUsageLogic.vx.actions.reportDashboardViewed(dashboard,newestRefreshed),await breakpoint(1e4),(kea_router_lib.router.values.location.pathname===urls.j.dashboard(dashboard.id)||kea_router_lib.router.values.location.pathname===urls.j.projectHomepage()||kea_router_lib.router.values.location.pathname.startsWith(urls.j.sharedDashboard("")))&&eventUsageLogic.vx.actions.reportDashboardViewed(dashboard,newestRefreshed,10)):actions.setShouldReportOnAPILoad(!0)},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)},abortQuery:async _ref56=>{let{dashboardQueryId,queryId,queryStartTime}=_ref56,{currentTeamId}=values;await api.ZP.create(`api/environments/${currentTeamId}/insights/cancel`,{client_query_id:dashboardQueryId}),eventUsageLogic.vx.actions.reportTimeToSeeData({team_id:values.currentTeamId,type:"insight_load",context:"dashboard",primary_interaction_id:dashboardQueryId,query_id:queryId,status:"cancelled",time_to_see_data_ms:Math.floor(performance.now()-queryStartTime),insights_fetched:0,insights_fetched_cached:0})},setProperties:()=>{actions.loadDashboard({action:"preview"})},setDates:()=>{actions.loadDashboard({action:"preview"})},overrideVariableValue:()=>{actions.setDashboardMode(types.MN.Edit,null),actions.loadDashboard({action:"preview"})}}}),(0,kea_router_lib.urlToAction)(_ref57=>{let{values,actions}=_ref57;return{"/dashboard/:id/subscriptions(/:subscriptionId)":_ref58=>{let{subscriptionId}=_ref58,id=subscriptionId?"new"==subscriptionId?subscriptionId:parseInt(subscriptionId,10):void 0;actions.setSubscriptionMode(!0,id),actions.setTextTileId(null),actions.setDashboardMode(null,null)},"/dashboard/:id":()=>{actions.setSubscriptionMode(!1,void 0),actions.setTextTileId(null),values.dashboardMode===types.MN.Sharing&&actions.setDashboardMode(null,null)},"/dashboard/:id/sharing":()=>{actions.setSubscriptionMode(!1,void 0),actions.setTextTileId(null),actions.setDashboardMode(types.MN.Sharing,null)},"/dashboard/:id/text-tiles/:textTileId":_ref59=>{let{textTileId}=_ref59;actions.setSubscriptionMode(!1,void 0),actions.setDashboardMode(null,null),actions.setTextTileId(void 0===textTileId?"new":"new"!==textTileId?Number(textTileId):"new")}}})])},"./frontend/src/scenes/dashboard/dashboardTemplateEditorLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>dashboardTemplateEditorLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx");let dashboardTemplateEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","dashboard","dashboardTemplateEditorLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({logic:[_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R],values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_4__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setEditorValue:value=>({value}),setDashboardTemplate:dashboardTemplate=>({dashboardTemplate}),clear:!0,setDashboardTemplateId:id=>({id}),openDashboardTemplateEditor:!0,closeDashboardTemplateEditor:!0,updateValidationErrors:markers=>({markers})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({editorValue:["",{setEditorValue:(_,_ref)=>{let{value}=_ref;return value},clear:()=>""}],dashboardTemplate:[null,{clear:()=>null,setDashboardTemplate:(_,_ref2)=>{let{dashboardTemplate}=_ref2;return dashboardTemplate}}],validationErrors:[[],{updateValidationErrors:(_,_ref3)=>{let{markers}=_ref3;return markers&&0!==markers.length?markers.map(marker=>marker.message):[]},clear:()=>[]}],id:[null,{setDashboardTemplateId:(_,_ref4)=>{let{id}=_ref4;return id},clear:()=>null}],isOpenNewDashboardTemplateModal:[!1,{openDashboardTemplateEditor:()=>!0,closeDashboardTemplateEditor:()=>!1}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref5=>{let{values}=_ref5;return{dashboardTemplate:[void 0,{createDashboardTemplate:async()=>{if(!values.dashboardTemplate){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to create dashboard template");return}let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.create(values.dashboardTemplate);return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template created"),response},getDashboardTemplate:async id=>{let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.get(id);return response},updateDashboardTemplate:async _ref6=>{let{id,dashboardTemplateUpdates}=_ref6,response=null;if(dashboardTemplateUpdates)response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.update(id,dashboardTemplateUpdates);else if(values.dashboardTemplate)response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.update(id,values.dashboardTemplate);else{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to update dashboard template");return}return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template updated"),response},deleteDashboardTemplate:async id=>(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.delete(id),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Dashboard template deleted"),null)}],templateSchema:[null,{getTemplateSchema:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dashboardTemplates.getSchema()}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref7=>{let{values,actions}=_ref7;return{createDashboardTemplateSuccess:async()=>{actions.closeDashboardTemplateEditor(),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},updateDashboardTemplateSuccess:async()=>{actions.closeDashboardTemplateEditor(),_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},deleteDashboardTemplateSuccess:async()=>{_dashboards_templates_dashboardTemplatesLogic__WEBPACK_IMPORTED_MODULE_5__.R.actions.getAllTemplates()},closeDashboardTemplateEditor:()=>{actions.clear()},setDashboardTemplateId:_ref8=>{let{id}=_ref8;id&&actions.getDashboardTemplate(id)},getDashboardTemplateSuccess:async _ref9=>{let{dashboardTemplate}=_ref9;dashboardTemplate&&actions.setEditorValue(JSON.stringify(dashboardTemplate))},setEditorValue:async(_ref10,breakpoint)=>{let{value}=_ref10;if(await breakpoint(500),0==values.validationErrors.length&&value?.length)try{let dashboardTemplate=JSON.parse(value);actions.setDashboardTemplate(dashboardTemplate)}catch(error){console.error("error",error),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Unable to parse dashboard template")}},updateValidationErrors:async _ref11=>{let{markers}=_ref11;markers?.length||actions.setEditorValue(values.editorValue)},setDashboardTemplate:async _ref12=>{let{dashboardTemplate}=_ref12;dashboardTemplate&&actions.setEditorValue(JSON.stringify(dashboardTemplate,null,4))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref13=>{let{actions}=_ref13;actions.getTemplateSchema()})])},"./frontend/src/scenes/dashboard/dashboardTemplateVariablesLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>dashboardTemplateVariablesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_IframedToolbarBrowser_iframedToolbarBrowserLogic__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/IframedToolbarBrowser/iframedToolbarBrowserLogic.ts"),lib_components_IframedToolbarBrowser_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/IframedToolbarBrowser/utils.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/types.ts");let FALLBACK_EVENT={id:"$pageview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS},dashboardTemplateVariablesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","DashboardTemplateVariablesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({variables:[]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[lib_components_IframedToolbarBrowser_iframedToolbarBrowserLogic__WEBPACK_IMPORTED_MODULE_1__.R,["toolbarMessageReceived","disableElementSelector"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setVariables:variables=>({variables}),setVariable:(variableName,filterGroup)=>({variable_name:variableName,filterGroup}),setVariableFromAction:(variableName,action)=>({variableName,action}),setVariableForPageview:(variableName,url)=>({variableName,url}),setVariableForScreenview:variableName=>({variableName}),setActiveVariableIndex:index=>({index}),incrementActiveVariableIndex:!0,possiblyIncrementActiveVariableIndex:!0,resetVariable:variableId=>({variableId}),goToNextUntouchedActiveVariableIndex:!0,setIsCurrentlySelectingElement:isSelecting=>({isSelecting}),setActiveVariableCustomEventName:customEventName=>({customEventName}),maybeResetActiveVariableCustomEventName:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({variables:[[],{setVariables:(_,_ref)=>{let{variables}=_ref;return variables.map(v=>v.default&&!(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Qr)(v.default)?v:{...v,default:FALLBACK_EVENT})},setVariable:(state,_ref2)=>{let{variable_name:variableName,filterGroup}=_ref2,typeWithContents=Object.keys(filterGroup).filter(group=>(filterGroup[group]||[])?.length>0)?.[0];return typeWithContents?state.map(v=>v.name===variableName&&filterGroup?.[typeWithContents]?.length&&filterGroup?.[typeWithContents]?.[0]?{...v,default:filterGroup[typeWithContents]?.[0]||{},touched:!0}:{...v}):state},resetVariable:(state,_ref3)=>{let{variableId}=_ref3;return state.map(v=>v.id===variableId?{...v,default:FALLBACK_EVENT,touched:!1}:{...v})}}],activeVariableIndex:[0,{setActiveVariableIndex:(_,_ref4)=>{let{index}=_ref4;return index},incrementActiveVariableIndex:state=>state+1}],activeVariableCustomEventName:[null,{setActiveVariableCustomEventName:(_,_ref5)=>{let{customEventName}=_ref5;return customEventName}}],isCurrentlySelectingElement:[!1,{setIsCurrentlySelectingElement:(_,_ref6)=>{let{isSelecting}=_ref6;return isSelecting}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({activeVariable:[s=>[s.variables,s.activeVariableIndex],(variables,activeVariableIndex)=>variables[activeVariableIndex]],allVariablesAreTouched:[s=>[s.variables],variables=>variables.every(v=>v.touched)],hasTouchedAnyVariable:[s=>[s.variables],variables=>variables.some(v=>v.touched)]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref7=>{let{actions,props,values}=_ref7;return{possiblyIncrementActiveVariableIndex:()=>{props.variables.length>0&&values.activeVariableIndex{let nextIndex=values.variables.findIndex((v,i)=>!v.touched&&i>values.activeVariableIndex);if(-1!==nextIndex){actions.setActiveVariableIndex(nextIndex);return}-1==nextIndex&&-1==(nextIndex=values.variables.findIndex(v=>!v.touched))&&(nextIndex=values.activeVariableIndex),actions.setActiveVariableIndex(nextIndex)},setVariableFromAction:_ref8=>{let{variableName,action}=_ref8,originalVariableName=variableName.replace(/\s-\s\d+/g,""),step={id:action.id.toString(),math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,name:action.name,custom_name:originalVariableName,order:0,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.ACTIONS,selector:action.steps?.[0]?.selector,href:action.steps?.[0]?.href,url:action.steps?.[0]?.url};actions.setVariable(originalVariableName,{actions:[step]}),actions.setIsCurrentlySelectingElement(!1)},setVariableForPageview:_ref9=>{let{variableName,url}=_ref9,step={id:"$pageview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS,order:0,name:"$pageview",custom_name:variableName,properties:[{key:"$current_url",value:url,operator:"icontains",type:"event"}]};actions.setVariable(variableName,{events:[step]}),actions.setIsCurrentlySelectingElement(!1)},setVariableForScreenview:_ref10=>{let{variableName}=_ref10,step={id:"$screenview",math:_types__WEBPACK_IMPORTED_MODULE_4__.vN.UniqueUsers,type:_types__WEBPACK_IMPORTED_MODULE_4__.DC.EVENTS,order:0,name:"$screenview",custom_name:variableName};actions.setVariable(variableName,{events:[step]}),actions.setIsCurrentlySelectingElement(!1)},toolbarMessageReceived:_ref11=>{let{type,payload}=_ref11;type===lib_components_IframedToolbarBrowser_utils__WEBPACK_IMPORTED_MODULE_2__.TH.PH_NEW_ACTION_CREATED&&(actions.setVariableFromAction(payload.action.name,payload.action),actions.disableElementSelector())},maybeResetActiveVariableCustomEventName:()=>{values.activeVariable?.touched&&values.activeVariable?.default?.custom_event?values.activeVariable?.default?.custom_event&&actions.setActiveVariableCustomEventName(values.activeVariable.default.id):actions.setActiveVariableCustomEventName(null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.propsChanged)((_ref12,oldProps)=>{let{actions,props}=_ref12;props.variables!==oldProps.variables&&actions.setVariables(props.variables)})])},"./frontend/src/scenes/dashboard/dashboards/dashboardsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NS:()=>DashboardsTab,dJ:()=>dashboardsLogic});var fuse_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let DashboardsTab=function(DashboardsTab){return DashboardsTab.Dashboards="dashboards",DashboardsTab.Templates="templates",DashboardsTab}({}),DEFAULT_SORTING={columnKey:"name",order:1},DEFAULT_FILTERS={search:"",createdBy:"All users",pinned:!1,shared:!1},dashboardsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","dashboardsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_4__.userLogic,["user"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_2__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setCurrentTab:tab=>({tab}),setFilters:filters=>({filters}),tableSortingChanged:sorting=>({sorting})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({tableSorting:[DEFAULT_SORTING,{persist:!0},{tableSortingChanged:(_,_ref)=>{let{sorting}=_ref;return sorting||DEFAULT_SORTING}}],currentTab:[DashboardsTab.Dashboards,{setCurrentTab:(_,_ref2)=>{let{tab}=_ref2;return tab}}],filters:[DEFAULT_FILTERS,{setFilters:(state,_ref3)=>{let{filters}=_ref3;return(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.hO)({...state||{},...filters})}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({isFiltering:[s=>[s.filters],filters=>Object.keys(filters).some(key=>filters[key]!==DEFAULT_FILTERS[key])],dashboards:[s=>[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__.h.selectors.nameSortedDashboards,s.filters,s.fuse],(dashboards,filters,fuse)=>{let haystack=dashboards;return filters.search&&(haystack=fuse.search(filters.search).map(result=>result.item)),filters.pinned&&(haystack=haystack.filter(d=>d.pinned)),filters.shared&&(haystack=haystack.filter(d=>d.is_shared)),"All users"!==filters.createdBy&&(haystack=haystack.filter(d=>d.created_by?.uuid===filters.createdBy)),haystack}],fuse:[()=>[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_5__.h.selectors.nameSortedDashboards],dashboards=>new fuse_js__WEBPACK_IMPORTED_MODULE_6__.Z(dashboards,{keys:["key","name","description","tags"],threshold:.3})]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.actionToUrl)(_ref4=>{let{values}=_ref4;return{setCurrentTab:()=>{let tab=values.currentTab===DashboardsTab.Dashboards?void 0:values.currentTab;kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.searchParams.tab!==tab&&kea_router__WEBPACK_IMPORTED_MODULE_1__.router.actions.push(kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.location.pathname,{...kea_router__WEBPACK_IMPORTED_MODULE_1__.router.values.searchParams,tab})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.urlToAction)(_ref5=>{let{actions}=_ref5;return{"/dashboard":(_,searchParams)=>{let tab=searchParams.tab||DashboardsTab.Dashboards;actions.setCurrentTab(tab)}}})])},"./frontend/src/scenes/dashboard/dashboards/templates/dashboardTemplatesLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>dashboardTemplatesLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts");let dashboardTemplatesLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","dashboards","templates","dashboardTemplatesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(_ref=>{let{scope}=_ref;return null!=scope?scope:"unknown"}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setTemplates:allTemplates=>({allTemplates}),setTemplateFilter:search=>({search})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({templateFilter:["",{setTemplateFilter:(_,_ref2)=>{let{search}=_ref2;return search}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{props,values}=_ref3;return{allTemplates:[[],{getAllTemplates:async()=>{let params={scope:"default"!==props.scope?props.scope:void 0,search:values.templateFilter.length>2?values.templateFilter:void 0},page=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dashboardTemplates.list(params);return page.results}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref4=>{let{actions}=_ref4;return{setTemplateFilter:async(_,breakpoint)=>{await breakpoint(100),actions.getAllTemplates()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref5=>{let{actions}=_ref5;actions.getAllTemplates()})])},"./frontend/src/scenes/dashboard/deleteDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>deleteDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx");let defaultFormValues={dashboardId:null,deleteInsights:!1},deleteDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","deleteDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({showDeleteDashboardModal:id=>({id}),hideDeleteDashboardModal:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({deleteDashboardModalVisible:[!1,{showDeleteDashboardModal:()=>!0,hideDeleteDashboardModal:()=>!1}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(()=>({deleteDashboard:{defaults:defaultFormValues,errors:()=>({}),submit:async _ref=>{let{dashboardId,deleteInsights}=_ref;_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actions.deleteDashboard({id:dashboardId,deleteInsights})}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{actions}=_ref2;return{showDeleteDashboardModal:_ref3=>{let{id}=_ref3;actions.setDeleteDashboardValues({dashboardId:id})},hideDeleteDashboardModal:()=>{actions.resetDeleteDashboard()},[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actionTypes.deleteDashboardSuccess]:()=>{actions.hideDeleteDashboardModal(),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname!==scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards()&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards())}}})])},"./frontend/src/scenes/dashboard/duplicateDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>duplicateDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_urls__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),_models_insightsModel__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/models/insightsModel.tsx");let defaultFormValues={dashboardId:null,duplicateTiles:!1,dashboardName:void 0,show:!1},duplicateDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","duplicateDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({actions:[_models_insightsModel__WEBPACK_IMPORTED_MODULE_5__.U,["insightsAddedToDashboard"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({showDuplicateDashboardModal:(id,name)=>({id,name}),hideDuplicateDashboardModal:!0,duplicateAndGoToDashboard:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({duplicateDashboardModalVisible:[!1,{showDuplicateDashboardModal:()=>!0,hideDuplicateDashboardModal:()=>!1}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(()=>({duplicateDashboard:{defaults:defaultFormValues,errors:()=>({}),submit:async _ref=>{let{dashboardId,dashboardName,show,duplicateTiles}=_ref;dashboardId&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actions.duplicateDashboard({id:dashboardId,name:dashboardName,show,duplicateTiles})}}})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{actions}=_ref2;return{hideDuplicateDashboardModal:()=>{actions.resetDuplicateDashboard()},[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_4__.h.actionTypes.duplicateDashboardSuccess]:_ref3=>{let{dashboard,payload}=_ref3;if(actions.hideDuplicateDashboardModal(),!payload?.duplicateTiles){let insightsOnDuplicatedDashboard=dashboard.tiles.map(t=>t.insight?.id).filter(id=>!!id);actions.insightsAddedToDashboard({dashboardId:dashboard.id,insightIds:insightsOnDuplicatedDashboard})}payload?.show?kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboard(dashboard.id)):kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname!==scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards()&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_3__.j.dashboards())},duplicateAndGoToDashboard:()=>{actions.setDuplicateDashboardValue("show",!0),actions.submitDuplicateDashboard()},showDuplicateDashboardModal:_ref4=>{let{id,name}=_ref4;actions.setDuplicateDashboardValues({dashboardId:id,dashboardName:name})}}})])},"./frontend/src/scenes/dashboard/newDashboardLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>newDashboardLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.tsx"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/models/dashboardsModel.tsx"),_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts"),_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/utils.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/queries/schema.ts"),_queries_utils__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/queries/utils.ts");let defaultFormValues={name:"",description:"",show:!1,useTemplate:"",restrictionLevel:lib_constants__WEBPACK_IMPORTED_MODULE_4__.V7.EveryoneInProjectCanEdit},newDashboardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(_ref=>{let{featureFlagId}=_ref;return null!=featureFlagId?featureFlagId:"new"}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dashboard","newDashboardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({logic:[_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h],values:[lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setIsLoading:isLoading=>({isLoading}),showNewDashboardModal:!0,showVariableSelectModal:template=>({template}),hideNewDashboardModal:!0,addDashboard:form=>({form}),setActiveDashboardTemplate:template=>({template}),clearActiveDashboardTemplate:!0,createDashboardFromTemplate:function(template,variables,redirectAfterCreation){let creationContext=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{template,variables,redirectAfterCreation,creationContext}},submitNewDashboardSuccessWithResult:(result,variables)=>({result,variables})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({isLoading:[!1,{setIsLoading:(_,_ref2)=>{let{isLoading}=_ref2;return isLoading},hideNewDashboardModal:()=>!1,submitNewDashboardSuccess:()=>!1,submitNewDashboardFailure:()=>!1,clearActiveDashboardTemplate:()=>!1}],newDashboardModalVisible:[!1,{showNewDashboardModal:()=>!0,showVariableSelectModal:()=>!0,hideNewDashboardModal:()=>!1}],variableSelectModalVisible:[!1,{showVariableSelectModal:()=>!0,hideNewDashboardModal:()=>!1}],activeDashboardTemplate:[null,{setActiveDashboardTemplate:(_,_ref3)=>{let{template}=_ref3;return template},clearActiveDashboardTemplate:()=>null}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref4=>{let{actions}=_ref4;return{newDashboard:{defaults:defaultFormValues,errors:_ref5=>{let{name,restrictionLevel}=_ref5;return{name:name?null:"Please give your dashboard a name.",restrictionLevel:restrictionLevel?null:"Restriction level needs to be specified."}},submit:async(_ref6,breakpoint)=>{let{name,description,useTemplate,restrictionLevel,show}=_ref6;actions.setIsLoading(!0);try{let result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H.values.currentTeamId}/dashboards/`,{name:name,description:description,use_template:useTemplate,restriction_level:restrictionLevel});actions.hideNewDashboardModal(),actions.resetNewDashboard();let queryBasedDashboard=(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result);queryBasedDashboard&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h.actions.addDashboardSuccess(queryBasedDashboard),actions.submitNewDashboardSuccessWithResult(result),show&&(breakpoint(),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dashboard(result.id)))}catch(e){if(!(0,kea__WEBPACK_IMPORTED_MODULE_0__.isBreakpoint)(e)){let message=e.code&&e.detail?`${e.code}: ${e.detail}`:e;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.error(`Could not create dashboard: ${message}`)}}actions.setIsLoading(!1)}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref7=>{let{props}=_ref7;return{isFeatureFlagDashboard:[()=>[],()=>props.featureFlagId]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref8=>{let{actions}=_ref8;return{addDashboard:_ref9=>{let{form}=_ref9;actions.resetNewDashboard(),actions.setNewDashboardValues({...defaultFormValues,...form}),actions.submitNewDashboard()},showNewDashboardModal:()=>{actions.resetNewDashboard()},hideNewDashboardModal:()=>{actions.clearActiveDashboardTemplate(),actions.resetNewDashboard()},createDashboardFromTemplate:async _ref10=>{let{template,variables,redirectAfterCreation=!0,creationContext=null}=_ref10;actions.setIsLoading(!0);let tiles=template.tiles.map(tile=>{let isQueryBased="query"in tile&&null!=tile.query,queryKind=isQueryBased?(0,_queries_utils__WEBPACK_IMPORTED_MODULE_14__.KN)(tile.query)?tile.query?.source.kind:tile.query?.kind:null;return function applyTemplate(obj,variables,queryKind){if("string"==typeof obj&&obj.startsWith("{")&&obj.endsWith("}")){let variableId=obj.substring(1,obj.length-1),variable=variables.find(variable=>variable.id===variableId);if(variable&&variable.default){let isEventVariable="event"===variable.type;if(queryKind&&isEventVariable){let mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.None;return queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.TrendsQuery?mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.All:queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.StickinessQuery?mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.ActorsOnly:queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.FunnelsQuery&&(mathAvailability=scenes_insights_filters_ActionFilter_ActionFilterRow_ActionFilterRow__WEBPACK_IMPORTED_MODULE_7__.Qq.FunnelsOnly),queryKind===_queries_schema__WEBPACK_IMPORTED_MODULE_13__.OH.RetentionQuery?(0,_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__.d6)(variable.default):(0,_queries_nodes_InsightQuery_utils_filtersToQueryNode__WEBPACK_IMPORTED_MODULE_11__.pE)(variable.default,!0,mathAvailability)}return variable.default}return obj}if(Array.isArray(obj))return obj.map(item=>applyTemplate(item,variables,queryKind));if("object"==typeof obj&&null!==obj){let newObject={};for(let[key,value]of Object.entries(obj))newObject[key]=applyTemplate(value,variables,queryKind);return newObject}return obj}(tile,variables,queryKind)}),dashboardJSON={...template,tiles};try{let result=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.create(`api/environments/${scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H.values.currentTeamId}/dashboards/create_from_template_json`,{template:dashboardJSON,creation_context:creationContext});actions.hideNewDashboardModal(),actions.resetNewDashboard();let queryBasedDashboard=(0,_queries_nodes_InsightViz_utils__WEBPACK_IMPORTED_MODULE_12__.ob)(result);queryBasedDashboard&&_models_dashboardsModel__WEBPACK_IMPORTED_MODULE_10__.h.actions.addDashboardSuccess(queryBasedDashboard),actions.submitNewDashboardSuccessWithResult(result,variables),redirectAfterCreation&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dashboard(result.id))}catch(e){if(!(0,kea__WEBPACK_IMPORTED_MODULE_0__.isBreakpoint)(e)){let message=e.code&&e.detail?`${e.code}: ${e.detail}`:e;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.error(`Could not create dashboard: ${message}`)}}actions.setIsLoading(!1)},showVariableSelectModal:_ref11=>{let{template}=_ref11;actions.setActiveDashboardTemplate(template)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref12=>{let{actions}=_ref12;return{"/dashboard":(_,_searchParams,hashParams)=>{"newDashboard"in hashParams&&actions.showNewDashboardModal()}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)({hideNewDashboardModal:()=>{let hashParams=kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.hashParams;return delete hashParams.newDashboard,[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams,hashParams]},showNewDashboardModal:()=>{let hashParams=kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.hashParams;return hashParams.newDashboard="modal",[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams,hashParams]}})])},"./frontend/src/scenes/data-management/DataManagementScene.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DataManagementScene:()=>DataManagementScene,DataManagementTab:()=>DataManagementTab,scene:()=>scene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),ActivityLog=__webpack_require__("./frontend/src/lib/components/ActivityLog/ActivityLog.tsx"),PageHeader=__webpack_require__("./frontend/src/lib/components/PageHeader.tsx"),TitleWithIcon=__webpack_require__("./frontend/src/lib/components/TitleWithIcon.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx");__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");var NewActionButton=__webpack_require__("./frontend/src/scenes/actions/NewActionButton.tsx"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),hedgehogs=__webpack_require__("./frontend/src/lib/components/hedgehogs.tsx"),ProductIntroduction=__webpack_require__("./frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsx"),LemonButton=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),LemonTable=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),columnUtils=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/columnUtils.tsx"),LemonTag=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),organizationLogic=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),types=__webpack_require__("./frontend/src/types.ts"),AnnotationModal=__webpack_require__("./frontend/src/scenes/annotations/AnnotationModal.tsx"),annotationModalLogic=__webpack_require__("./frontend/src/scenes/annotations/annotationModalLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"),sceneTypes=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),api=__webpack_require__("./frontend/src/lib/api.ts"),ObjectTags=__webpack_require__("./frontend/src/lib/components/ObjectTags/ObjectTags.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),More=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),LemonDivider=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),LemonTableLink=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),deleteWithUndo=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),actionsLogic=__webpack_require__("./frontend/src/scenes/actions/actionsLogic.ts"),userLogic=__webpack_require__("./frontend/src/scenes/userLogic.ts"),actionsModel=__webpack_require__("./frontend/src/models/actionsModel.ts"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),TaxonomicFilter_types=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),TZLabel=__webpack_require__("./frontend/src/lib/components/TZLabel/index.tsx"),LemonBanner=__webpack_require__("./frontend/src/lib/lemon-ui/LemonBanner/index.ts"),DefinitionHeader=__webpack_require__("./frontend/src/scenes/data-management/events/DefinitionHeader.tsx"),EventDefinitionProperties=__webpack_require__("./frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx"),eventDefinitionsTableLogic=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts");let eventTypeOptions=[{value:types.uW.Event,label:"All events","data-attr":"event-type-option-event"},{value:types.uW.EventCustom,label:"Custom events","data-attr":"event-type-option-event-custom"},{value:types.uW.EventPostHog,label:"PostHog events","data-attr":"event-type-option-event-posthog"}];var Sparkline=__webpack_require__("./frontend/src/lib/components/Sparkline.tsx"),ViewRecordingButton=__webpack_require__("./frontend/src/lib/components/ViewRecordingButton.tsx"),Link=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),kea_loaders_lib=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),dayjs=__webpack_require__("./frontend/src/lib/dayjs.ts"),projectLogic=__webpack_require__("./frontend/src/scenes/projectLogic.ts");let ingestionWarningsLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","data-management","ingestion-warnings","ingestionWarningsLogic"]),(0,index_esm.connect)({values:[teamLogic.H,["timezone"],projectLogic.K,["currentProjectId"]]}),(0,kea_loaders_lib.loaders)(_ref=>{let{values}=_ref;return{data:[[],{loadData:async()=>{let{results}=await api.ZP.get(`api/projects/${values.currentProjectId}/ingestion_warnings`);return results}}]}}),(0,index_esm.selectors)({breadcrumbs:[()=>[],()=>[{key:sceneTypes.x.DataManagement,name:"Data management",path:urls.j.eventDefinitions()},{key:DataManagementTab.IngestionWarnings,name:"Ingestion warnings",path:urls.j.ingestionWarnings()}]],dates:[()=>[],()=>(0,utils.w6)(0,30).map(i=>(0,dayjs.Bv)().subtract(i,"days").format("D MMM YYYY")).reverse()],summaryDatasets:[s=>[s.data,s.timezone],(data,timezone)=>{let summaryDatasets={};return data.forEach(summary=>{let result=Array(30).fill(0);for(let spark of summary.sparkline){let date=(0,dayjs.fp)(spark[1],timezone),dayIndex=(0,dayjs.Bv)().diff(date,"days");result[dayIndex]=spark[0]}summaryDatasets[summary.type]=result.reverse()}),summaryDatasets}]}),(0,index_esm.afterMount)(_ref2=>{let{actions}=_ref2;actions.loadData()})]),WARNING_TYPE_TO_DESCRIPTION={cannot_merge_already_identified:"Refused to merge an already identified user",cannot_merge_with_illegal_distinct_id:"Refused to merge with an illegal distinct id",skipping_event_invalid_uuid:"Refused to process event with invalid uuid",ignored_invalid_timestamp:"Ignored an invalid timestamp, event was still ingested",event_timestamp_in_future:"An event was sent more than 23 hours in the future",ingestion_capacity_overflow:"Event ingestion has overflowed capacity",message_size_too_large:"Discarded event exceeding 1MB limit",replay_timestamp_invalid:"Replay event timestamp is invalid",replay_timestamp_too_far:"Replay event timestamp was too far in the future",replay_message_too_large:"Replay data was dropped because it was too large to ingest"},WARNING_TYPE_RENDERER={cannot_merge_already_identified:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to merge already identified person"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.sourcePersonDistinctId),children:details.sourcePersonDistinctId})," ","into"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.targetPersonDistinctId),children:details.targetPersonDistinctId})," ","via an $identify or $create_alias call (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")."]})},cannot_merge_with_illegal_distinct_id:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to merge an illegal distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.illegalDistinctId),children:details.illegalDistinctId})," with"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.otherDistinctId),children:details.otherDistinctId})," via an $identify or $create_alias call (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")."]})},skipping_event_invalid_uuid:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Refused to process event with invalid uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),"."]})},ignored_invalid_timestamp:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Used server timestamp when ingesting event due to invalid input:",(0,jsx_runtime.jsxs)("ul",{children:[details.eventUuid?(0,jsx_runtime.jsxs)("li",{children:["Event UUID: ",details.eventUuid]}):"",details.field?(0,jsx_runtime.jsxs)("li",{children:["Invalid field: ",details.field]}):"",details.value?(0,jsx_runtime.jsxs)("li",{children:["Invalid value: ",details.value]}):"",details.reason?(0,jsx_runtime.jsxs)("li",{children:["Error: ",details.reason]}):""]})]})},event_timestamp_in_future:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["The event timestamp computed too far in the future, so the capture time was used instead. Event values:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["Computed timestamp: ",details.result]}),details.eventUuid?(0,jsx_runtime.jsxs)("li",{children:["Event UUID: ",details.eventUuid]}):"",details.timestamp?(0,jsx_runtime.jsxs)("li",{children:["Client provided timestamp: ",details.timestamp]}):"",details.sentAt?(0,jsx_runtime.jsxs)("li",{children:["Client provided sent_at: ",details.sentAt]}):"",details.offset?(0,jsx_runtime.jsxs)("li",{children:["Client provided time offset: ",details.offset]}):"",(0,jsx_runtime.jsxs)("li",{children:["PostHog server capture time: ",details.now]})]})]})},ingestion_capacity_overflow:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Event ingestion has overflowed capacity for distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.overflowDistinctId),children:details.overflowDistinctId}),". Events will still be processed, but are likely to be delayed longer than usual."]})},message_size_too_large:function Render(warning){let details=warning.details;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Discarded event for distinct_id"," ",(0,jsx_runtime.jsx)(Link.r,{to:urls.j.personByDistinctId(details.distinctId),children:details.distinctId})," that exceeded 1MB in size after processing (event uuid: ",(0,jsx_runtime.jsx)("code",{children:details.eventUuid}),")"]})},replay_timestamp_invalid:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Session replay data dropped due to invalid timestamp:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["invalid timestamp: ",details.timestamp]}),(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]})]}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"skewed-timestamp-view-recording"})})]})},replay_timestamp_too_far:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id,daysFromNow:warning.details.daysFromNow};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["The session replay data timestamp was too different from the capture time, so the data was dropped. Event values:",(0,jsx_runtime.jsxs)("ul",{children:[(0,jsx_runtime.jsxs)("li",{children:["invalid timestamp: ",details.timestamp]}),(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]}),(0,jsx_runtime.jsxs)("li",{children:["skew: ",details.daysFromNow," days"]})]}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"skewed-timestamp-view-recording"})})]})},replay_message_too_large:function Render(warning){let details={timestamp:warning.details.timestamp,session_id:warning.details.replayRecord.session_id};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Session replay data dropped due to its size, this can cause playback problems:",(0,jsx_runtime.jsx)("ul",{children:(0,jsx_runtime.jsxs)("li",{children:["session_id: ",details.session_id]})}),(0,jsx_runtime.jsx)("div",{className:"max-w-30 mt-2",children:(0,jsx_runtime.jsx)(ViewRecordingButton.Z,{sessionId:details.session_id,timestamp:details.timestamp,type:"primary",size:"xsmall","data-attr":"message-too-large-view-recording"})})]})}};function RenderNestedWarnings(warningSummary){return(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:warningSummary.warnings,columns:[{title:"Description",key:"description",render:function Render(_,warning){let renderer=WARNING_TYPE_RENDERER[warning.type];return renderer?renderer(warning):(0,jsx_runtime.jsx)("pre",{children:JSON.stringify(warning.details,null,2)})}},{title:"Time",dataIndex:"timestamp",render:function Render(_,warning){return(0,jsx_runtime.jsx)(TZLabel.w,{time:warning.timestamp,showSeconds:!0})},align:"right"}],embedded:!0,showHeader:!1,pagination:{pageSize:20}})}var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PropertyDefinitionsTable=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-management/properties/PropertyDefinitionsTable.scss"),PropertyDefinitionsTable_default=__webpack_require__.n(PropertyDefinitionsTable),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PropertyDefinitionsTable_default(),options),PropertyDefinitionsTable_default().locals;var propertyDefinitionsTableLogic=__webpack_require__("./frontend/src/scenes/data-management/properties/propertyDefinitionsTableLogic.ts");let DataManagementTab=function(DataManagementTab){return DataManagementTab.Actions="actions",DataManagementTab.EventDefinitions="events",DataManagementTab.PropertyDefinitions="properties",DataManagementTab.Annotations="annotations",DataManagementTab.History="history",DataManagementTab.IngestionWarnings="warnings",DataManagementTab}({}),tabs={[DataManagementTab.EventDefinitions]:{url:urls.j.eventDefinitions(),label:"Events",content:(0,jsx_runtime.jsx)(function(){var _eventDefinitions$pag,_eventDefinitions$cou;let{eventDefinitions,eventDefinitionsLoading,filters}=(0,index_esm.useValues)(eventDefinitionsTableLogic.qh),{loadEventDefinitions,setFilters}=(0,index_esm.useActions)(eventDefinitionsTableLogic.qh),{hasTagging}=(0,index_esm.useValues)(organizationLogic.p),columns=[{key:"icon",width:0,render:function Render(_,definition){return(0,jsx_runtime.jsx)("span",{className:"text-xl text-muted",children:(0,DefinitionHeader.Kw)(definition)})}},{title:"Name",key:"name",render:function Render(_,definition){return(0,jsx_runtime.jsx)(DefinitionHeader.JH,{definition:definition,to:urls.j.eventDefinition(definition.id),taxonomicGroupType:TaxonomicFilter_types.t.Events})},sorter:!0},{title:"Last seen",key:"last_seen_at",className:"definition-column-last_seen_at",render:function Render(_,definition){return definition.last_seen_at?(0,jsx_runtime.jsx)(TZLabel.w,{time:definition.last_seen_at}):null},sorter:!0},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,definition){var _definition$tags;return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:null!==(_definition$tags=definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[],{key:"actions",width:0,render:function RenderActions(_,definition){return(0,jsx_runtime.jsx)(More.T,{"data-attr":`event-definitions-table-more-button-${definition.name}`,overlay:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(src.Jp,{to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:definition.name,type:"events",order:0,name:definition.name}]}]}}),fullWidth:!0,sideIcon:(0,jsx_runtime.jsx)(icons.Ud,{}),"data-attr":"event-definitions-table-view-recordings",children:"View recordings"})})})}}];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsxs)(LemonBanner.V,{className:"mb-4",type:"info",children:["Looking for"," ","event_custom"===filters.event_type?"custom ":"event_posthog"===filters.event_type?"PostHog ":"","event usage statistics?"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightNewHogQL("SELECT event, count()\nFROM events\nWHERE {filters}\n"+("event_custom"===filters.event_type?"AND event NOT LIKE '$%'\n":"event_posthog"===filters.event_type?"AND event LIKE '$%'\n":"")+"GROUP BY event\nORDER BY count() DESC",{dateRange:{date_from:"-24h"}}),children:"Query with SQL"})]}),(0,jsx_runtime.jsxs)("div",{className:"flex justify-between items-center gap-2 mb-4",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for events",onChange:v=>setFilters({event:v||""}),value:filters.event}),(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2",children:[(0,jsx_runtime.jsx)("span",{children:"Type:"}),(0,jsx_runtime.jsx)(src.Yv,{value:filters.event_type,options:eventTypeOptions,"data-attr":"event-type-filter",dropdownMatchSelectWidth:!1,onChange:value=>{setFilters({event_type:value})},size:"small"})]})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,"data-attr":"events-definition-table",loading:eventDefinitionsLoading,rowKey:"id",pagination:{controlled:!0,currentPage:null!==(_eventDefinitions$pag=eventDefinitions?.page)&&void 0!==_eventDefinitions$pag?_eventDefinitions$pag:1,entryCount:null!==(_eventDefinitions$cou=eventDefinitions?.count)&&void 0!==_eventDefinitions$cou?_eventDefinitions$cou:0,pageSize:constants.H$,onForward:eventDefinitions.next?()=>{loadEventDefinitions(eventDefinitions.next)}:void 0,onBackward:eventDefinitions.previous?()=>{loadEventDefinitions(eventDefinitions.previous)}:void 0},onSort:newSorting=>setFilters({ordering:newSorting?`${-1===newSorting.order?"-":""}${newSorting.columnKey}`:void 0}),expandable:{expandedRowRender:function RenderPropertiesTable(definition){return(0,jsx_runtime.jsx)("div",{className:"p-4",children:(0,jsx_runtime.jsx)(EventDefinitionProperties.Q,{definition:definition})})},rowExpandable:()=>!0,noIndent:!0},dataSource:eventDefinitions.results,useURLForSorting:!1,emptyState:"No event definitions",nouns:["event","events"]})]})},{})},[DataManagementTab.Actions]:{url:urls.j.actions(),label:(0,jsx_runtime.jsx)(TitleWithIcon.H,{icon:(0,jsx_runtime.jsx)(Tooltip.u,{title:"Actions consist of one or more events that you have decided to put into a deliberately-labeled bucket. They're used in insights and dashboards.",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{})}),children:"Actions"}),buttons:(0,jsx_runtime.jsx)(NewActionButton.O,{}),content:(0,jsx_runtime.jsx)(function(){let{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{actionsLoading}=(0,index_esm.useValues)((0,actionsModel.D)({params:"include_count=1"})),{loadActions,pinAction,unpinAction}=(0,index_esm.useActions)(actionsModel.D),{filterType,searchTerm,actionsFiltered,shouldShowEmptyState}=(0,index_esm.useValues)(actionsLogic.M),{setFilterType,setSearchTerm}=(0,index_esm.useActions)(actionsLogic.M),{hasAvailableFeature}=(0,index_esm.useValues)(userLogic.userLogic),{updateHasSeenProductIntroFor}=(0,index_esm.useActions)(userLogic.userLogic),tryInInsightsUrl=action=>{let query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.TrendsQuery,series:[{id:action.id,name:action.name||void 0,kind:schema.OH.ActionsNode}],interval:"day",trendsFilter:{display:types.Qb.ActionsLineGraph}}};return urls.j.insightNew(void 0,void 0,query)},columns=[{width:0,title:"Pinned",dataIndex:"pinned_at",sorter:(a,b)=>(b.pinned_at?new Date(b.pinned_at).getTime():0)-(a.pinned_at?new Date(a.pinned_at).getTime():0),render:function Render(pinned,action){return(0,jsx_runtime.jsx)(LemonButton.J,{size:"small",onClick:pinned?()=>unpinAction(action):()=>pinAction(action),tooltip:pinned?"Unpin action":"Pin action",icon:pinned?(0,jsx_runtime.jsx)(posthog_icons_es.IconPinFilled,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconPin,{})})}},{title:"Name",dataIndex:"name",width:"25%",sorter:(a,b)=>(a.name||"").localeCompare(b.name||""),render:function RenderName(_,action,index){return(0,jsx_runtime.jsx)(LemonTableLink.i,{"data-attr":"action-link-"+index,to:urls.j.action(action.id),title:action.name||(0,jsx_runtime.jsx)("i",{children:"Unnamed"}),description:action.description})}},{title:"Type",key:"type",render:function RenderType(_,action){return(0,jsx_runtime.jsx)("span",{children:action.steps?.length?action.steps.map((step,index)=>(0,jsx_runtime.jsx)("div",{children:(()=>{let url=(0,utils.VV)(step.url||"");switch(url=url.slice(0,40)+(url.length>40?"...":""),step.event){case"$autocapture":return"Autocapture";case"$pageview":switch(step.url_matching){case"regex":return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL matches regex ",(0,jsx_runtime.jsx)("strong",{children:url})]});case"exact":return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL matches exactly ",(0,jsx_runtime.jsx)("strong",{children:url})]});default:return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Page view URL contains ",(0,jsx_runtime.jsx)("strong",{children:url})]})}case"":case null:case void 0:return"Any event";default:return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Event: ",(0,jsx_runtime.jsx)("strong",{children:step.event})]})}})()},index)):(0,jsx_runtime.jsx)("i",{children:"Empty – set this action up"})})}},...hasAvailableFeature(types.P$.TAGGING)?[{title:"Tags",dataIndex:"tags",width:250,key:"tags",render:function renderTags(tags){return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:tags,staticOnly:!0})}}]:[],(0,columnUtils.JB)(),(0,columnUtils.rw)(),...currentTeam?.slack_incoming_webhook?[{title:"Webhook",dataIndex:"post_to_slack",sorter:(a,b)=>Number(a.post_to_slack)-Number(b.post_to_slack),render:function RenderActions(post_to_slack){return post_to_slack?(0,jsx_runtime.jsx)(posthog_icons_es.IconCheckCircle,{}):null}}]:[],{width:0,render:function RenderActions(_,action){return(0,jsx_runtime.jsx)(More.T,{overlay:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.action(action.id),fullWidth:!0,children:"Edit"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.duplicateAction(action),fullWidth:!0,children:"Duplicate"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:urls.j.replay(types.yd.Home,{filter_group:{type:types.J2.And,values:[{type:types.J2.And,values:[{id:action.id,type:"actions",order:0,name:action.name}]}]}}),sideIcon:(0,jsx_runtime.jsx)(icons.Ud,{}),fullWidth:!0,"data-attr":"action-table-view-recordings",children:"View recordings"}),(0,jsx_runtime.jsx)(LemonButton.J,{to:tryInInsightsUrl(action),fullWidth:!0,children:"Try out in Insights"}),(0,jsx_runtime.jsx)(LemonDivider.p,{}),(0,jsx_runtime.jsx)(LemonButton.J,{status:"danger",onClick:()=>void(0,deleteWithUndo.S)({endpoint:api.ZP.actions.determineDeleteEndpoint(),object:action,callback:loadActions}),fullWidth:!0,children:"Delete action"})]})})}}];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Actions",productKey:types.Md.ACTIONS,thingName:"action",isEmpty:shouldShowEmptyState,description:"Use actions to combine events that you want to have tracked together or to make detailed Autocapture events easier to reuse.",docsURL:"https://posthog.com/docs/data/actions",actionElementOverride:(0,jsx_runtime.jsx)(NewActionButton.O,{onSelectOption:()=>updateHasSeenProductIntroFor(types.Md.ACTIONS,!0)})}),shouldShowEmptyState&&"me"===filterType||!shouldShowEmptyState?(0,jsx_runtime.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-4",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for actions",onChange:setSearchTerm,value:searchTerm}),(0,jsx_runtime.jsx)(src.P4,{value:filterType,onChange:setFilterType,options:[{value:"all",label:"All actions"},{value:"me",label:"My actions"}]})]}):null,(!shouldShowEmptyState||"me"===filterType)&&(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,loading:actionsLoading,rowKey:"id",pagination:{pageSize:100},"data-attr":"actions-table",dataSource:actionsFiltered,defaultSorting:{columnKey:"created_by",order:-1},emptyState:"No results. Create a new action?"})})]})},{})},[DataManagementTab.PropertyDefinitions]:{url:urls.j.propertyDefinitions(),label:(0,jsx_runtime.jsx)(TitleWithIcon.H,{icon:(0,jsx_runtime.jsx)(Tooltip.u,{title:"Properties are additional data sent along with an event capture. Use properties to understand additional information about events and the actors that generate them.",children:(0,jsx_runtime.jsx)(posthog_icons_es.IconInfo,{})}),children:"Properties"}),content:(0,jsx_runtime.jsx)(function(){var _filters$group_type_i,_propertyDefinitions$,_propertyDefinitions$2;let{propertyDefinitions,propertyDefinitionsLoading,filters,propertyTypeOptions}=(0,index_esm.useValues)(propertyDefinitionsTableLogic.T),{loadPropertyDefinitions,setFilters,setPropertyType}=(0,index_esm.useActions)(propertyDefinitionsTableLogic.T),{hasTagging}=(0,index_esm.useValues)(organizationLogic.p),columns=[{key:"icon",width:0,render:function Render(_,definition){return(0,jsx_runtime.jsx)("span",{className:"text-xl text-muted",children:(0,DefinitionHeader.Jf)(definition)})}},{title:"Name",key:"name",render:function Render(_,definition){return(0,jsx_runtime.jsx)(DefinitionHeader.JH,{definition:definition,to:urls.j.propertyDefinition(definition.id),taxonomicGroupType:TaxonomicFilter_types.t.EventProperties})},sorter:(a,b)=>a.name.localeCompare(b.name)},{title:"Type",key:"type",render:function RenderType(_,definition){return definition.property_type?(0,jsx_runtime.jsx)(src.oe,{type:"success",className:"uppercase",children:definition.property_type}):(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"—"})}},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,definition){var _definition$tags;return(0,jsx_runtime.jsx)(ObjectTags.D,{tags:null!==(_definition$tags=definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[]];return(0,jsx_runtime.jsxs)("div",{"data-attr":"manage-events-table",children:[(0,jsx_runtime.jsxs)(LemonBanner.V,{className:"mb-4",type:"info",children:["Looking for ","person"===filters.type?"person ":"","property usage statistics?"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightNewHogQL("SELECT arrayJoin(JSONExtractKeys(properties)) AS property_key, count()\n"+("person"===filters.type?"FROM persons\n":"FROM events\n")+("person"===filters.type?"":"WHERE {filters}\n")+"GROUP BY property_key\nORDER BY count() DESC",{dateRange:{date_from:"-24h"}}),children:"Query with SQL"})]}),(0,jsx_runtime.jsxs)("div",{className:"flex mb-4 gap-2 flex-wrap",children:[(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for properties",onChange:e=>setFilters({property:e||""}),value:filters.property}),(0,jsx_runtime.jsx)(src.Yv,{options:propertyTypeOptions,value:`${filters.type}::${null!==(_filters$group_type_i=filters.group_type_index)&&void 0!==_filters$group_type_i?_filters$group_type_i:""}`,onSelect:setPropertyType})]}),(0,jsx_runtime.jsx)(LemonTable.g,{columns:columns,className:"event-properties-definition-table","data-attr":"event-properties-definition-table",loading:propertyDefinitionsLoading,rowKey:"id",pagination:{controlled:!0,currentPage:null!==(_propertyDefinitions$=propertyDefinitions?.page)&&void 0!==_propertyDefinitions$?_propertyDefinitions$:1,entryCount:null!==(_propertyDefinitions$2=propertyDefinitions?.count)&&void 0!==_propertyDefinitions$2?_propertyDefinitions$2:0,pageSize:constants.ld,onForward:propertyDefinitions.next?()=>{loadPropertyDefinitions(propertyDefinitions.next)}:void 0,onBackward:propertyDefinitions.previous?()=>{loadPropertyDefinitions(propertyDefinitions.previous)}:void 0},dataSource:propertyDefinitions.results,emptyState:"No property definitions",nouns:["property","properties"]})]})},{})},[DataManagementTab.Annotations]:{url:urls.j.annotations(),content:(0,jsx_runtime.jsx)(function(){let{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{currentOrganization}=(0,index_esm.useValues)(organizationLogic.p),{annotations,annotationsLoading,next,loadingNext,timezone,shouldShowEmptyState}=(0,index_esm.useValues)(annotationModalLogic.bE),{loadAnnotationsNext,openModalToCreateAnnotation}=(0,index_esm.useActions)(annotationModalLogic.bE),columns=[{title:"Annotation",key:"annotation",width:"30%",render:function RenderAnnotation(_,annotation){return(0,jsx_runtime.jsx)("div",{className:"ph-no-capture font-semibold",children:(0,jsx_runtime.jsx)(src.rU,{subtle:!0,to:urls.j.annotation(annotation.id),children:annotation.content})})}},{title:`Date and time (${(0,utils.ig)(timezone)})`,dataIndex:"date_marker",render:function RenderDateMarker(_,annotation){return annotation.date_marker?.format(annotationModalLogic.yD)||""},sorter:(a,b)=>a.date_marker?.diff(b.date_marker)||1},{title:"Scope",key:"scope",render:function RenderType(_,annotation){let scopeName=annotationModalLogic.B3[annotation.scope],tooltip=annotation.scope===types.dc.Insight?`This annotation only applies to the "${annotation.insight_name}" insight`:annotation.scope===types.dc.Dashboard?`This annotation applies to all insights on the ${annotation.dashboard_name} dashboard`:annotation.scope===types.dc.Project?`This annotation applies to all insights in the ${currentTeam?.name} project`:`This annotation applies to all insights in the ${currentOrganization?.name} organization`;return(0,jsx_runtime.jsx)(Tooltip.u,{title:tooltip,placement:"right",children:(0,jsx_runtime.jsx)(LemonTag.o,{className:"uppercase",children:annotation.scope===types.dc.Insight?(0,jsx_runtime.jsx)(src.rU,{to:urls.j.insightView(annotation.insight_short_id),className:"flex items-center",target:"_blank",targetBlankIcon:!0,children:scopeName}):scopeName})})},sorter:(a,b)=>annotationModalLogic.nO[a.scope]-annotationModalLogic.nO[b.scope]},{title:"Created\xa0by",dataIndex:"created_by",render:function Render(_,item){let{created_by,creation_type}=item;return(0,jsx_runtime.jsx)("div",{className:"flex flex-row items-center",children:(0,jsx_runtime.jsx)(ProfilePicture.Y,{user:"GIT"===creation_type?{first_name:"GitHub Actions"}:created_by,showName:!0,size:"md",type:"GIT"===creation_type?"bot":"person"})})},sorter:(a,b)=>(a.created_by?.first_name||a.created_by?.email||"").localeCompare(b.created_by?.first_name||b.created_by?.email||"")},(0,columnUtils.rw)(),{key:"actions",width:0,render:function RenderActions(_,annotation){return(0,jsx_runtime.jsx)(LemonButton.J,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconPencil,{}),size:"small",to:urls.j.annotation(annotation.id)})}}];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("p",{children:"Annotations allow you to mark when certain changes happened so you can easily see how they impacted your metrics."}),(0,jsx_runtime.jsxs)("div",{"data-attr":"annotations-content",children:[(0,jsx_runtime.jsx)("div",{className:"mt-4",children:(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Annotations",productKey:types.Md.ANNOTATIONS,thingName:"annotation",description:"Annotations allow you to mark when certain changes happened so you can easily see how they impacted your metrics.",docsURL:"https://posthog.com/docs/data/annotations",action:()=>openModalToCreateAnnotation(),isEmpty:0===annotations.length&&!annotationsLoading,customHog:hedgehogs.MicrophoneHog})}),!shouldShowEmptyState&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LemonTable.g,{"data-attr":"annotations-table",rowKey:"id",dataSource:annotations,columns:columns,defaultSorting:{columnKey:"date_marker",order:-1},noSortingCancellation:!0,loading:annotationsLoading,emptyState:"No annotations yet"}),next&&(0,jsx_runtime.jsx)("div",{className:"flex justify-center mt-6",children:(0,jsx_runtime.jsx)(LemonButton.J,{type:"primary",loading:loadingNext,onClick:()=>{loadAnnotationsNext()},children:"Load more annotations"})})]})]}),(0,jsx_runtime.jsx)(AnnotationModal.h,{})]})},{}),label:"Annotations",buttons:(0,jsx_runtime.jsx)(AnnotationModal.i,{})},[DataManagementTab.History]:{url:urls.j.dataManagementHistory(),label:"History",content:(0,jsx_runtime.jsx)(ActivityLog.D,{scope:types.jc.DATA_MANAGEMENT,caption:"Only actions taken in the UI are captured in History. Automatic creation of definitions by ingestion is not shown here."})},[DataManagementTab.IngestionWarnings]:{url:urls.j.ingestionWarnings(),label:"Ingestion warnings",content:(0,jsx_runtime.jsx)(function(){let{data,dataLoading,summaryDatasets,dates}=(0,index_esm.useValues)(ingestionWarningsLogic);return(0,jsx_runtime.jsx)("div",{"data-attr":"manage-events-table",children:data.length>0||dataLoading?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"mb-4",children:"Data ingestion related warnings from past 30 days."}),(0,jsx_runtime.jsx)(LemonTable.g,{dataSource:data,loading:dataLoading,columns:[{title:"Warning",dataIndex:"type",render:function Render(_,summary){let type=WARNING_TYPE_TO_DESCRIPTION[summary.type]||summary.type;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[type," (",(0,jsx_runtime.jsx)(Link.r,{to:`https://posthog.com/manual/data-management#${type.toLowerCase().replace(",","").split(" ").join("-")}`,children:"docs)"})]})}},{title:"Graph",render:function Render(_,summary){return(0,jsx_runtime.jsx)(Sparkline.b,{className:"h-8",labels:dates,data:summaryDatasets[summary.type]})}},{title:"Events",dataIndex:"count",align:"right",sorter:(a,b)=>a.count-b.count},{title:"Last Seen",dataIndex:"lastSeen",render:function Render(_,summary){return(0,jsx_runtime.jsx)(TZLabel.w,{time:summary.lastSeen,showSeconds:!0})},align:"right",sorter:(a,b)=>new Date(a.lastSeen)>new Date(b.lastSeen)?1:-1}],expandable:{expandedRowRender:RenderNestedWarnings},defaultSorting:{columnKey:"lastSeen",order:-1},noSortingCancellation:!0})]}):(0,jsx_runtime.jsx)(ProductIntroduction.C,{productName:"Ingestion warnings",thingName:"ingestion warning",productKey:types.Md.INGESTION_WARNINGS,isEmpty:!0,description:"Nice! You've had no ingestion warnings in the past 30 days. If we detect any issues with your data, we'll show them here.",docsURL:"https://posthog.com/docs/data/data-management#ingestion-warnings",customHog:hedgehogs.ReadingHog})})},{})}},dataManagementSceneLogic=(0,index_esm.kea)([(0,index_esm.path)(["scenes","events","dataManagementSceneLogic"]),(0,index_esm.connect)({values:[featureFlagLogic.h,["featureFlags"]]}),(0,index_esm.actions)({setTab:tab=>({tab})}),(0,index_esm.reducers)({tab:[DataManagementTab.EventDefinitions,{setTab:(_,_ref)=>{let{tab}=_ref;return tab}}]}),(0,index_esm.selectors)({breadcrumbs:[s=>[s.tab],tab=>[{key:sceneTypes.x.DataManagement,name:"Data management",path:tabs.events.url},{key:tab,name:(0,utils.fm)(tab),path:tabs[tab].url}]],showWarningsTab:[s=>[s.featureFlags],featureFlags=>!!featureFlags[constants.y8.INGESTION_WARNINGS_ENABLED]],enabledTabs:[s=>[s.showWarningsTab],showWarningsTab=>{let allTabs=Object.keys(tabs);return allTabs.filter(x=>x!==DataManagementTab.IngestionWarnings||showWarningsTab)}]}),(0,lib.actionToUrl)(()=>({setTab:_ref2=>{let{tab}=_ref2,tabUrl=tabs[tab]?.url||tabs.events.url;if((0,lib.combineUrl)(tabUrl).pathname!==lib.router.values.location.pathname)return tabUrl}})),(0,lib.urlToAction)(_ref3=>{let{actions,values}=_ref3;return Object.fromEntries(Object.entries(tabs).map(_ref4=>{let[key,tab]=_ref4;return[tab.url,()=>{values.tab!==key&&actions.setTab(key)}]}))})]);function DataManagementScene(){let{enabledTabs,tab}=(0,index_esm.useValues)(dataManagementSceneLogic),{setTab}=(0,index_esm.useActions)(dataManagementSceneLogic),lemonTabs=enabledTabs.map(key=>({key:key,label:(0,jsx_runtime.jsx)("span",{"data-attr":`data-management-${key}-tab`,children:tabs[key].label}),content:tabs[key].content}));return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(PageHeader.m,{caption:"Use data management to organize events that come into PostHog. Reduce noise, clarify usage, and help collaborators get the most value from your data.",tabbedPage:!0,buttons:(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:tabs[tab].buttons})}),(0,jsx_runtime.jsx)(LemonTabs.T,{activeKey:tab,onChange:t=>setTab(t),tabs:lemonTabs})]})}let scene={component:DataManagementScene,logic:dataManagementSceneLogic}},"./frontend/src/scenes/data-management/database/DatabaseTable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>DatabaseTable});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonButton_More__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/More.tsx"),lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx"),lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/Link/index.ts"),lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/deleteWithUndo.tsx"),react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts"),scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts"),scenes_data_warehouse_viewLinkLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),scenes_projectLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let nonEditableSchemaTypes=["lazy_table","virtual_table","field_traverser","expression","view","materialized_view"],editSchemaOptions={integer:"Integer",float:"Float",string:"String",datetime:"DateTime",date:"Date",boolean:"Boolean",array:"Array",json:"JSON"},editSchemaOptionsAsArray=Object.keys(editSchemaOptions).map(n=>({value:n,label:editSchemaOptions[n]})),isNonEditableSchemaType=schemaType=>"string"==typeof schemaType&&nonEditableSchemaTypes.includes(schemaType),JoinsMoreMenu=_ref=>{let{tableName,fieldName}=_ref,{currentProjectId}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_projectLogic__WEBPACK_IMPORTED_MODULE_11__.K),{toggleEditJoinModal}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_viewLinkLogic__WEBPACK_IMPORTED_MODULE_10__.t),{joins,joinsLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__.F),{loadJoins}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_8__.F),{loadDatabase}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__.M),join=joins.find(n=>n.source_table_name===tableName&&n.field_name===fieldName),overlay=(0,react__WEBPACK_IMPORTED_MODULE_7__.useCallback)(()=>joinsLoading||!join?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.$j,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{fullWidth:!0,onClick:()=>void toggleEditJoinModal(join),children:"Edit"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Jp,{status:"danger",fullWidth:!0,onClick:()=>{(0,lib_utils_deleteWithUndo__WEBPACK_IMPORTED_MODULE_6__.S)({endpoint:`projects/${currentProjectId}/warehouse_view_link`,object:{id:join.id,name:`${join.field_name} on ${join.source_table_name}`},callback:()=>{loadDatabase(),loadJoins()}})},children:"Delete"})]}),[joinsLoading,join]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonButton_More__WEBPACK_IMPORTED_MODULE_2__.T,{overlay:overlay()})};function DatabaseTable(_ref2){var _tables$find$fields;let{table,tables,inEditSchemaMode,schemaOnChange}=_ref2,dataSource=Object.values(null!==(_tables$find$fields=tables.find(_ref3=>{let{name}=_ref3;return name===table})?.fields)&&void 0!==_tables$find$fields?_tables$find$fields:{}),{dataWarehouseTables,databaseLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_warehouse_settings_dataWarehouseSceneLogic__WEBPACK_IMPORTED_MODULE_9__.M);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_3__.g,{dataSource:dataSource,loading:databaseLoading,disableTableWhileLoading:!1,columns:[{title:"Column",key:"key",dataIndex:"name",render:function RenderColumn(column){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:column})}},{title:"Type",key:"type",dataIndex:"type",render:function RenderType(_,_ref4){let{name,type,schema_valid}=_ref4;return inEditSchemaMode&&!isNonEditableSchemaType(type)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.Yv,{options:editSchemaOptionsAsArray,value:type,onChange:newValue=>{schemaOnChange&&schemaOnChange(name,newValue)}}):"virtual_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Virtual Table"}):"lazy_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Reference"}):"field_traverser"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:"default",className:"uppercase",children:"Expression"}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_LemonTag_LemonTag__WEBPACK_IMPORTED_MODULE_4__.o,{type:schema_valid?"default":"danger",className:"uppercase",children:type})}},{title:"Info",key:"info",dataIndex:"type",render:function RenderInfo(type,field){return"virtual_table"===type||"view"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Fields: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.fields.join(", ")})]}):"lazy_table"===type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["To table: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:String(field.table)})]}):"field_traverser"===type&&Array.isArray(field.chain)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.chain.join(".")}):"events"==table&&"json"==type&&"properties"==field.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__.r,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_12__.j.propertyDefinitions("event"),children:"Manage event properties"}):"persons"==table&&"json"==type&&"properties"==field.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_Link__WEBPACK_IMPORTED_MODULE_5__.r,{to:scenes_urls__WEBPACK_IMPORTED_MODULE_12__.j.propertyDefinitions("person"),children:"Manage person properties"}):field.schema_valid||inEditSchemaMode?"":(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.name})," can't be parsed as a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("code",{children:field.type}),". It will not be queryable until this is fixed."]})}},{width:0,dataIndex:"type",render:function RenderActions(_,data){if("view"===data.type)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(JoinsMoreMenu,{tableName:table,fieldName:data.name});if("lazy_table"===data.type&&data.table){let isJoiningTableExternalTable=!!dataWarehouseTables.find(n=>n.name===data.table),isSourceExternalTable=!!dataWarehouseTables.find(n=>n.name===table);if(isJoiningTableExternalTable||isSourceExternalTable)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(JoinsMoreMenu,{tableName:table,fieldName:data.name})}return null}}]})}},"./frontend/src/scenes/data-management/database/databaseTableListLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>databaseTableListLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),_queries_query__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/queries/schema.ts");let databaseTableListLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-management","database","databaseTableListLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setSearchTerm:searchTerm=>({searchTerm})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({database:[null,{loadDatabase:async()=>await (0,_queries_query__WEBPACK_IMPORTED_MODULE_2__.jr)({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_3__.OH.DatabaseSchemaQuery})}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({searchTerm:["",{setSearchTerm:(_,_ref)=>{let{searchTerm}=_ref;return searchTerm}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({filteredTables:[s=>[s.database,s.searchTerm],(database,searchTerm)=>database&&database.tables?Object.values(database.tables).filter(_ref2=>{let{name}=_ref2;return name.toLowerCase().includes(searchTerm.toLowerCase())}).sort((a,b)=>a.name.localeCompare(b.name)):[]],allTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables):[]],allTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],posthogTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"posthog"===n.type):[]],posthogTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"posthog"===n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],dataWarehouseTables:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type):[]],dataWarehouseTablesMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type||"view"==n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],dataWarehouseTablesMapById:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"data_warehouse"===n.type||"view"==n.type).reduce((acc,cur)=>(acc[cur.id]=database.tables[cur.name],acc),{}):{}],views:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type):[]],viewsMap:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type).reduce((acc,cur)=>(acc[cur.name]=database.tables[cur.name],acc),{}):{}],viewsMapById:[s=>[s.database],database=>database&&database.tables?Object.values(database.tables).filter(n=>"view"===n.type).reduce((acc,cur)=>(acc[cur.id]=database.tables[cur.name],acc),{}):{}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref3=>{let{actions}=_ref3;actions.loadDatabase()})])},"./frontend/src/scenes/data-management/events/DefinitionHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JH:()=>DefinitionHeader,Jf:()=>getPropertyDefinitionIcon,Kw:()=>getEventDefinitionIcon});var _posthog_icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonTable_LemonTableLink__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/LemonTableLink.tsx"),lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function getPropertyDefinitionIcon(definition){return lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.event_properties[definition.name]?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})}):definition.verified?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Verified event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Event property",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconList,{className:"taxonomy-icon taxonomy-icon-muted"})})}function getEventDefinitionIcon(definition){return"$pageview"===definition.name||"$screen"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Pageview",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconEye,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"})}):"$pageleave"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLeave,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"})}):"$autocapture"===definition.name?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBolt,{className:"taxonomy-icon taxonomy-icon-ph taxonomy-icon-muted"}):definition.name&&definition.verified?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Custom event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCursor,{className:"taxonomy-icon taxonomy-icon-muted"})}):definition.name&&lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconLogomark,{className:"taxonomy-icon taxonomy-icon-muted"})}):null===definition.value?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"All events",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_2__.bK,{className:"taxonomy-icon taxonomy-icon-built-in"})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"Custom event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconCursor,{className:"taxonomy-icon taxonomy-icon-muted"})})}function DefinitionHeader(_ref){var _definition$name;let{to,definition,taxonomicGroupType}=_ref,description=definition.description||lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.NV(definition.name,taxonomicGroupType)?.description;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_LemonTable_LemonTableLink__WEBPACK_IMPORTED_MODULE_3__.i,{to:to,description:description,title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_1__.T,{value:null!==(_definition$name=definition.name)&&void 0!==_definition$name?_definition$name:"",disablePopover:!0,disableIcon:!0,type:taxonomicGroupType}),definition.verified&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:`${lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]?"PostHog":"Verified"} event`,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBadge,{className:" text-success text-xl"})})}),!!lib_taxonomy__WEBPACK_IMPORTED_MODULE_5__.dA.events[definition.name]&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_lemon_ui_Tooltip__WEBPACK_IMPORTED_MODULE_4__.u,{title:"PostHog event",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_posthog_icons__WEBPACK_IMPORTED_MODULE_0__.IconBadge,{className:"text-success text-xl"})})]})})}},"./frontend/src/scenes/data-management/events/EventDefinitionProperties.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>EventDefinitionProperties});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_components_ObjectTags_ObjectTags__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/components/ObjectTags/ObjectTags.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTable/index.ts"),react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts"),scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_DefinitionHeader__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/data-management/events/DefinitionHeader.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function EventDefinitionProperties(_ref){var _eventPropertiesCache,_eventPropertiesCache2,_eventPropertiesCache3;let{definition}=_ref,{loadPropertiesForEvent}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useActions)(scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.qh),{eventPropertiesCacheMap,eventDefinitionPropertiesLoading}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.qh),{hasTagging}=(0,kea__WEBPACK_IMPORTED_MODULE_1__.useValues)(scenes_organizationLogic__WEBPACK_IMPORTED_MODULE_8__.p);(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(()=>{loadPropertiesForEvent(definition)},[]);let columns=[{title:"Property",key:"property",render:function Render(_,_definition){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_DefinitionHeader__WEBPACK_IMPORTED_MODULE_10__.JH,{definition:_definition,to:scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.propertyDefinition(_definition.id),taxonomicGroupType:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_3__.t.EventProperties})}},{title:"Type",key:"type",render:function Render(_,_definition){var _definition$property_;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.oe,{type:"muted",children:null!==(_definition$property_=_definition.property_type)&&void 0!==_definition$property_?_definition$property_:"-"})}},...hasTagging?[{title:"Tags",key:"tags",render:function Render(_,_definition){var _definition$tags;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_components_ObjectTags_ObjectTags__WEBPACK_IMPORTED_MODULE_2__.D,{tags:null!==(_definition$tags=_definition.tags)&&void 0!==_definition$tags?_definition$tags:[],staticOnly:!0})}}]:[],{title:"Example",key:"example",align:"right",render:function Render(_,_definition){var _definition$example;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.oe,{className:"font-mono",type:"muted",children:null!==(_definition$example=_definition.example)&&void 0!==_definition$example?_definition$example:"-"})}}];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("h3",{children:"Top properties"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("p",{children:"Please note that description and tags are shared across events. PostHog properties are excluded from this list."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(lib_lemon_ui_LemonTable__WEBPACK_IMPORTED_MODULE_5__.g,{id:`event-properties-definition-table-${definition.id}`,"data-attr":"event-properties-definition-nested-table",columns:columns,dataSource:null!==(_eventPropertiesCache=eventPropertiesCacheMap?.[definition.id]?.results)&&void 0!==_eventPropertiesCache?_eventPropertiesCache:[],emptyState:"This event has no properties",nouns:["property definition","property definitions"],pagination:{controlled:!0,pageSize:lib_constants__WEBPACK_IMPORTED_MODULE_4__.N6,currentPage:null!==(_eventPropertiesCache2=eventPropertiesCacheMap?.[definition.id]?.page)&&void 0!==_eventPropertiesCache2?_eventPropertiesCache2:1,entryCount:null!==(_eventPropertiesCache3=eventPropertiesCacheMap?.[definition.id]?.count)&&void 0!==_eventPropertiesCache3?_eventPropertiesCache3:0,onForward:eventPropertiesCacheMap?.[definition.id]?.next?()=>{loadPropertiesForEvent(definition,eventPropertiesCacheMap[definition.id].next)}:void 0,onBackward:eventPropertiesCacheMap?.[definition.id]?.previous?()=>{loadPropertiesForEvent(definition,eventPropertiesCacheMap[definition.id].previous)}:void 0},loading:eventDefinitionPropertiesLoading.includes(definition.id)})]})}},"./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{oq:()=>normalizePropertyDefinitionEndpointUrl,qh:()=>eventDefinitionsTableLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/components/PropertyFilters/utils.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_taxonomy__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");function cleanFilters(filter){return{event:"",properties:[],event_type:_types__WEBPACK_IMPORTED_MODULE_9__.uW.Event,ordering:"event",...filter}}function normalizePropertyDefinitionEndpointUrl(url){let searchParams=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},full=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return full||url?lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({...url?(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams:{},...searchParams}):null}function normalizeEventDefinitionEndpointUrl(_ref){let{url,searchParams={},full=!1,eventTypeFilter=_types__WEBPACK_IMPORTED_MODULE_9__.uW.Event}=_ref;if(!full&&!url)return null;let params={...url?{...(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams,event_type:eventTypeFilter}:{},...searchParams};return lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.eventDefinitions.determineListEndpoint(params)}let eventDefinitionsTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","data-management","events","eventDefinitionsTableLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key||"scene"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadEventDefinitions:function(){let url=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{url}},loadEventExample:definition=>({definition}),loadPropertiesForEvent:function(definition){let url=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return{definition,url}},setFilters:filters=>({filters}),setLocalEventDefinition:definition=>({definition}),setLocalPropertyDefinition:(event,definition)=>({event,definition}),setEventDefinitionPropertiesLoading:ids=>({ids})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({filters:[cleanFilters({}),{setFilters:(state,_ref2)=>{var _convertPropertyGroup;let{filters}=_ref2;return{...state,...filters,properties:null!==(_convertPropertyGroup=(0,lib_components_PropertyFilters_utils__WEBPACK_IMPORTED_MODULE_4__.Y4)(filters.properties))&&void 0!==_convertPropertyGroup?_convertPropertyGroup:[]}}}],eventDefinitionPropertiesLoading:[[],{setEventDefinitionPropertiesLoading:(_,_ref3)=>{let{ids}=_ref3;return null!=ids?ids:[]}}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref4=>{let{values,cache,actions}=_ref4;return{eventDefinitions:[{count:0,next:void 0,current:void 0,previous:void 0,results:[]},{loadEventDefinitions:async(_ref5,breakpoint)=>{var _cache$apiCache,_cache$apiCache2,_combineUrl$searchPar;let{url:_url}=_ref5,url=normalizeEventDefinitionEndpointUrl({url:_url,eventTypeFilter:values.filters.event_type});if(url&&url in(null!==(_cache$apiCache=cache.apiCache)&&void 0!==_cache$apiCache?_cache$apiCache:{}))return cache.apiCache[url];url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.eventDefinitions.determineListEndpoint({event_type:values.filters.event_type})),await breakpoint(200),cache.eventsStartTime=performance.now();let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);return breakpoint(),cache.apiCache={...null!==(_cache$apiCache2=cache.apiCache)&&void 0!==_cache$apiCache2?_cache$apiCache2:{},[url]:{...response,previous:normalizeEventDefinitionEndpointUrl({url:response.previous,eventTypeFilter:values.filters.event_type}),next:normalizeEventDefinitionEndpointUrl({url:response.next,eventTypeFilter:values.filters.event_type}),current:url,page:Math.floor((null!==(_combineUrl$searchPar=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams.offset)&&void 0!==_combineUrl$searchPar?_combineUrl$searchPar:0)/lib_constants__WEBPACK_IMPORTED_MODULE_5__.H$)+1}},cache.apiCache[url]},setLocalEventDefinition:_ref6=>{var _cache$apiCache3;let{definition}=_ref6;return values.eventDefinitions.current?(cache.apiCache={...null!==(_cache$apiCache3=cache.apiCache)&&void 0!==_cache$apiCache3?_cache$apiCache3:{},[values.eventDefinitions.current]:{...values.eventDefinitions,results:values.eventDefinitions.results.map(d=>d.id===definition.id?definition:d)}},cache.apiCache[values.eventDefinitions.current]):values.eventDefinitions}}],eventPropertiesCacheMap:[{},{loadPropertiesForEvent:async(_ref7,breakpoint)=>{var _cache$apiCache4,_cache$apiCache5,_cache$apiCache7,_combineUrl$searchPar2,_await$api$get$result,_cache$apiCache6;let exampleEventProperties;let{definition,url}=_ref7;if(url&&url in(null!==(_cache$apiCache4=cache.apiCache)&&void 0!==_cache$apiCache4?_cache$apiCache4:{}))return{...values.eventPropertiesCacheMap,[definition.id]:cache.apiCache[url]};url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({event_names:[definition.name],excluded_properties:lib_taxonomy__WEBPACK_IMPORTED_MODULE_6__.t_,filter_by_event_names:!0,is_feature_flag:!1,limit:lib_constants__WEBPACK_IMPORTED_MODULE_5__.N6})),actions.setEventDefinitionPropertiesLoading(Array.from([...values.eventDefinitionPropertiesLoading,definition.id])),cache.propertiesStartTime=performance.now();let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);breakpoint();let exampleUrl=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.events.determineListEndpoint({event:definition.name},1);exampleUrl&&exampleUrl in(null!==(_cache$apiCache5=cache.apiCache)&&void 0!==_cache$apiCache5?_cache$apiCache5:{})?exampleEventProperties=cache.apiCache[exampleUrl]:(exampleEventProperties=null!==(_await$api$get$result=(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(exampleUrl))?.results?.[0].properties)&&void 0!==_await$api$get$result?_await$api$get$result:{},cache.apiCache={...null!==(_cache$apiCache6=cache.apiCache)&&void 0!==_cache$apiCache6?_cache$apiCache6:{},[exampleUrl]:exampleEventProperties});let currentUrl=`${normalizePropertyDefinitionEndpointUrl(url)}`;return cache.apiCache={...null!==(_cache$apiCache7=cache.apiCache)&&void 0!==_cache$apiCache7?_cache$apiCache7:{},[currentUrl]:{count:response.count,previous:normalizePropertyDefinitionEndpointUrl(response.previous),next:normalizePropertyDefinitionEndpointUrl(response.next),current:currentUrl,page:Math.floor((null!==(_combineUrl$searchPar2=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(currentUrl).searchParams.offset)&&void 0!==_combineUrl$searchPar2?_combineUrl$searchPar2:0)/lib_constants__WEBPACK_IMPORTED_MODULE_5__.N6)+1,results:response.results.map(prop=>({...prop,example:exampleEventProperties?.[prop.name]?.toString()}))}},actions.setEventDefinitionPropertiesLoading(values.eventDefinitionPropertiesLoading.filter(loadingId=>loadingId!=definition.id)),{...values.eventPropertiesCacheMap,[definition.id]:cache.apiCache[currentUrl]}},setLocalPropertyDefinition:_ref8=>{var _cache$apiCache8;let{event,definition}=_ref8;if(!values.eventPropertiesCacheMap?.[event.id]?.current)return values.eventPropertiesCacheMap;let eventCacheKey=values.eventPropertiesCacheMap[event.id].current;return cache.apiCache={...null!==(_cache$apiCache8=cache.apiCache)&&void 0!==_cache$apiCache8?_cache$apiCache8:{},[eventCacheKey]:{...values.eventPropertiesCacheMap[event.id],results:values.eventPropertiesCacheMap[event.id].results.map(p=>p.id===definition.id?definition:p)}},{...values.eventPropertiesCacheMap,[event.id]:cache.apiCache[eventCacheKey]}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref9=>{let{cache}=_ref9;return{apiCache:[()=>[],()=>cache.apiCache]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref10=>{let{actions,values,cache}=_ref10;return{setFilters:async()=>{actions.loadEventDefinitions(normalizeEventDefinitionEndpointUrl({url:values.eventDefinitions.current,searchParams:{search:values.filters.event,ordering:values.filters.ordering},full:!0,eventTypeFilter:values.filters.event_type}))},loadEventDefinitionsSuccess:()=>{void 0!==cache.eventsStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageLoadSucceeded(performance.now()-cache.eventsStartTime,values.eventDefinitions.results.length),cache.eventsStartTime=void 0)},loadEventDefinitionsFailure:_ref11=>{let{error}=_ref11;void 0!==cache.eventsStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageLoadFailed(performance.now()-cache.eventsStartTime,null!=error?error:"There was an unknown error fetching event definitions."),cache.eventsStartTime=void 0)},loadPropertiesForEventSuccess:()=>{void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageNestedPropertiesLoadSucceeded(performance.now()-cache.propertiesStartTime),cache.propertiesStartTime=void 0)},loadPropertiesForEventFailure:_ref12=>{let{error}=_ref12;void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions.reportDataManagementEventDefinitionsPageNestedPropertiesLoadFailed(performance.now()-cache.propertiesStartTime,null!=error?error:"There was an unknown error fetching nested property definitions."),cache.propertiesStartTime=void 0)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref13=>{let{actions,values}=_ref13;return{"/data-management/events":(_,searchParams)=>{(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.h0)(cleanFilters(values.filters),cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams))?values.eventDefinitions.results.length||values.eventDefinitionsLoading||actions.loadEventDefinitions():actions.setFilters(searchParams)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)(_ref14=>{let{values}=_ref14;return{setFilters:()=>{let nextValues=cleanFilters(values.filters),urlValues=cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams);if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.h0)(nextValues,urlValues))return[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,nextValues]}}})])},"./frontend/src/scenes/data-management/properties/propertyDefinitionsTableLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>propertyDefinitionsTableLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-management/events/eventDefinitionsTableLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_groupsModel__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/models/groupsModel.ts");function cleanFilters(filter){return{property:"",type:"event",group_type_index:null,...filter}}let propertyDefinitionsTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-management","properties","propertyDefinitionsTableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)(props=>props.key||"scene"),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[_models_groupsModel__WEBPACK_IMPORTED_MODULE_9__.$,["groupTypes","aggregationLabel"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadPropertyDefinitions:function(){let url=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{url}},setFilters:filters=>({filters}),setHoveredDefinition:definitionKey=>({definitionKey}),setOpenedDefinition:id=>({id}),setLocalPropertyDefinition:definition=>({definition}),setPropertyType:propertyType=>({propertyType})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({filters:[{property:"",type:"event"},{setFilters:(state,_ref)=>{let{filters}=_ref;return{...state,...filters}}}],hoveredDefinition:[null,{setHoveredDefinition:(_,_ref2)=>{let{definitionKey}=_ref2;return definitionKey}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({propertyTypeOptions:[s=>[s.groupTypes,s.aggregationLabel],(groupTypes,aggregationLabel)=>{let groupChoices=Array.from(groupTypes.values()).map(type=>({label:`${(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.fm)(aggregationLabel(type.group_type_index).singular)} properties`,value:`group::${type.group_type_index}`}));return[{label:"Event properties",value:"event::"},{label:"Person properties",value:"person::"}].concat(groupChoices)}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref3=>{let{values,cache}=_ref3;return{propertyDefinitions:[{count:0,next:void 0,current:void 0,previous:void 0,results:[]},{loadPropertyDefinitions:async(_ref4,breakpoint)=>{var _cache$apiCache,_cache$apiCache2,_combineUrl$searchPar;let{url}=_ref4;if(url&&url in(null!==(_cache$apiCache=cache.apiCache)&&void 0!==_cache$apiCache?_cache$apiCache:{}))return cache.apiCache[url];url||(url=lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.propertyDefinitions.determineListEndpoint({})),cache.propertiesStartTime=performance.now(),await breakpoint(200);let response=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.get(url);breakpoint();let currentUrl=`${(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(url)}`;return cache.apiCache={...null!==(_cache$apiCache2=cache.apiCache)&&void 0!==_cache$apiCache2?_cache$apiCache2:{},[currentUrl]:{...response,previous:(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(response.previous),next:(0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(response.next),current:currentUrl,page:Math.floor((null!==(_combineUrl$searchPar=(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.combineUrl)(url).searchParams.offset)&&void 0!==_combineUrl$searchPar?_combineUrl$searchPar:0)/lib_constants__WEBPACK_IMPORTED_MODULE_4__.ld)+1}},cache.apiCache[url]},setLocalPropertyDefinition:_ref5=>{var _cache$apiCache3;let{definition}=_ref5;return values.propertyDefinitions.current?(cache.apiCache={...null!==(_cache$apiCache3=cache.apiCache)&&void 0!==_cache$apiCache3?_cache$apiCache3:{},[values.propertyDefinitions.current]:{...values.propertyDefinitions,results:values.propertyDefinitions.results.map(d=>d.id===definition.id?definition:d)}},cache.apiCache[values.propertyDefinitions.current]):values.propertyDefinitions}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref6=>{let{actions,values,cache}=_ref6;return{setFilters:async(_,breakpoint)=>{await breakpoint(500),actions.loadPropertyDefinitions((0,scenes_data_management_events_eventDefinitionsTableLogic__WEBPACK_IMPORTED_MODULE_7__.oq)(values.propertyDefinitions.current,{offset:0,search:values.filters.property,type:values.filters.type,group_type_index:values.filters.group_type_index},!0))},loadPropertyDefinitionsSuccess:()=>{void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__.vx.findMounted()?.actions.reportDataManagementEventPropertyDefinitionsPageLoadSucceeded(performance.now()-cache.propertiesStartTime,values.propertyDefinitions.results.length),cache.propertiesStartTime=void 0)},loadPropertyDefinitionsFailure:_ref7=>{let{error}=_ref7;void 0!==cache.propertiesStartTime&&(lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__.vx.findMounted()?.actions.reportDataManagementEventPropertyDefinitionsPageLoadFailed(performance.now()-cache.propertiesStartTime,null!=error?error:"There was an unknown error fetching property definitions."),cache.propertiesStartTime=void 0)},setPropertyType:_ref8=>{let{propertyType}=_ref8,[type,index]=propertyType.split("::");actions.setFilters({type:type,group_type_index:index?+index:null})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref9=>{let{actions,values}=_ref9;return{[scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.propertyDefinitions()]:(_,searchParams)=>{!values.propertyDefinitionsLoading&&((0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.h0)(cleanFilters(values.filters),cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams))?values.propertyDefinitions.results.length||actions.loadPropertyDefinitions():actions.setFilters(searchParams))}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.actionToUrl)(_ref10=>{let{values}=_ref10;return{setFilters:()=>{let nextValues=cleanFilters(values.filters),urlValues=cleanFilters(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.searchParams);if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.h0)(nextValues,urlValues))return[kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname,function(filter){return{property:""!==filter.property?filter.property:void 0,type:"event"!==filter.type?filter.type:void 0,group_type_index:null!==filter.group_type_index?filter.group_type_index:void 0}}(nextValues)]}}})])},"./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{YS:()=>ViewLinkKeyLabel,WI:()=>ViewLinkModal_ViewLinkModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),ViewLinkModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-warehouse/ViewLinkModal.scss"),ViewLinkModal_default=__webpack_require__.n(ViewLinkModal),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(ViewLinkModal_default(),options),ViewLinkModal_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),CodeSnippet=__webpack_require__("./frontend/src/lib/components/CodeSnippet/index.ts"),HogQLDropdown=__webpack_require__("./frontend/src/lib/components/HogQLDropdown/HogQLDropdown.tsx"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function ViewLinkModal_ViewLinkModal(){let{isJoinTableModalOpen}=(0,index_esm.useValues)(viewLinkLogic.t),{toggleJoinTableModal}=(0,index_esm.useActions)(viewLinkLogic.t);return(0,jsx_runtime.jsx)(src.fQ,{title:"Join tables",description:(0,jsx_runtime.jsxs)("span",{children:["Define a join between two tables or views. ",(0,jsx_runtime.jsx)("b",{children:"All"})," fields from the joined table or view will be accessible in queries at the top level without needing to explicitly join the view."]}),isOpen:isJoinTableModalOpen,onClose:toggleJoinTableModal,width:700,children:(0,jsx_runtime.jsx)(ViewLinkForm,{})})}function ViewLinkForm(){let{tableOptions,selectedJoiningTableName,selectedSourceTableName,sourceTableKeys,joiningTableKeys,sqlCodeSnippet,error,fieldName,isNewJoin,selectedSourceKey,selectedJoiningKey,sourceIsUsingHogQLExpression,joiningIsUsingHogQLExpression,isViewLinkSubmitting,experimentsOptimized,experimentsTimestampKey}=(0,index_esm.useValues)(viewLinkLogic.t),{selectJoiningTable,toggleJoinTableModal,selectSourceTable,setFieldName,selectSourceKey,selectJoiningKey,setExperimentsOptimized,selectExperimentsTimestampKey}=(0,index_esm.useActions)(viewLinkLogic.t),[advancedSettingsExpanded,setAdvancedSettingsExpanded]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)(lib.Form,{logic:viewLinkLogic.t,formKey:"viewLink",enableFormOnSubmit:!0,children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-col w-full justify-between items-center",children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row w-full justify-between",children:[(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Table"}),(0,jsx_runtime.jsx)("div",{className:"text-wrap break-all",children:isNewJoin?(0,jsx_runtime.jsx)(lib.Field,{name:"source_table_name",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,options:tableOptions,onSelect:selectSourceTable,placeholder:"Select a table"})}):null!=selectedSourceTableName?selectedSourceTableName:""})]}),(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Joining Table"}),(0,jsx_runtime.jsx)(lib.Field,{name:"joining_table_name",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,options:tableOptions,onSelect:selectJoiningTable,placeholder:"Select a table"})})]})]}),(0,jsx_runtime.jsxs)("div",{className:"mt-4 flex flex-row justify-between items-center w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Table Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"source_table_key",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectSourceKey,value:sourceIsUsingHogQLExpression?"":null!=selectedSourceKey?selectedSourceKey:void 0,disabledReason:selectedSourceTableName?"":"Select a table to choose join key",options:[...sourceTableKeys,{value:"",label:(0,jsx_runtime.jsx)("span",{children:"HogQL Expression"})}],placeholder:"Select a key"}),sourceIsUsingHogQLExpression&&(0,jsx_runtime.jsx)(HogQLDropdown.I,{className:"mt-2",hogQLValue:null!=selectedSourceKey?selectedSourceKey:"",onHogQLValueChange:selectSourceKey,tableName:null!=selectedSourceTableName?selectedSourceTableName:""})]})})]}),(0,jsx_runtime.jsx)("div",{className:"mt-5",children:(0,jsx_runtime.jsx)(icons._S,{})}),(0,jsx_runtime.jsxs)("div",{className:"w-60",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Joining Table Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"joining_table_key",children:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectJoiningKey,value:joiningIsUsingHogQLExpression?"":null!=selectedJoiningKey?selectedJoiningKey:void 0,disabledReason:selectedJoiningTableName?"":"Select a table to choose join key",options:[...joiningTableKeys,{value:"",label:(0,jsx_runtime.jsx)("span",{children:"HogQL Expression"})}],placeholder:"Select a key"}),joiningIsUsingHogQLExpression&&(0,jsx_runtime.jsx)(HogQLDropdown.I,{className:"mt-2",hogQLValue:null!=selectedJoiningKey?selectedJoiningKey:"",onHogQLValueChange:selectJoiningKey,tableName:null!=selectedJoiningTableName?selectedJoiningTableName:""})]})})]})]}),"events"===selectedJoiningTableName&&(0,jsx_runtime.jsxs)("div",{className:"w-full mt-2",children:[(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsxs)("div",{className:"mt-4 flex flex-row justify-between w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"mr-4",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Optimize for Experiments"}),(0,jsx_runtime.jsx)(lib.Field,{name:"experiments_optimized",children:(0,jsx_runtime.jsx)(src.Hw,{className:"mt-2",checked:experimentsOptimized,onChange:checked=>setExperimentsOptimized(checked),fullWidth:!0,label:"Limit join to most recent matching event based on\xa0timestamp"})})]}),(0,jsx_runtime.jsxs)("div",{className:"w-60 shrink-0",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Source Timestamp Key"}),(0,jsx_runtime.jsx)(lib.Field,{name:"experiments_timestamp_key",children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,onSelect:selectExperimentsTimestampKey,value:null!=experimentsTimestampKey?experimentsTimestampKey:void 0,options:sourceTableKeys,placeholder:"Select a key"})})]})]})]}),sqlCodeSnippet&&(0,jsx_runtime.jsxs)("div",{className:"w-full mt-2",children:[(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,onClick:()=>setAdvancedSettingsExpanded(!advancedSettingsExpanded),sideIcon:advancedSettingsExpanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("h3",{className:"l4 mt-2",children:"Advanced settings"}),(0,jsx_runtime.jsx)("div",{className:"text-muted mb-2 font-medium",children:"Customize how the fields are accessed"})]})})]}),sqlCodeSnippet&&advancedSettingsExpanded&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"mt-3 flex flex-row justify-between items-center w-full",children:(0,jsx_runtime.jsxs)("div",{className:"w-full",children:[(0,jsx_runtime.jsx)("span",{className:"l4",children:"Field Name"}),(0,jsx_runtime.jsx)(lib.Field,{name:"field_name",hint:`Pick a field name to access ${selectedJoiningTableName} from ${selectedSourceTableName}`,children:(0,jsx_runtime.jsx)(src.DF,{value:fieldName,onChange:fieldName=>setFieldName(fieldName),placeholder:"Field name"})})]})}),(0,jsx_runtime.jsx)("div",{className:"mt-4 flex w-full",children:(0,jsx_runtime.jsx)(CodeSnippet.O,{className:"w-full",language:CodeSnippet.S.SQL,children:sqlCodeSnippet})})]}),error&&(0,jsx_runtime.jsx)("div",{className:"flex w-full",children:(0,jsx_runtime.jsx)("div",{className:"text-danger flex text-sm overflow-auto",children:(0,jsx_runtime.jsx)("span",{children:error})})})]}),(0,jsx_runtime.jsx)(src.p2,{className:"mt-4 mb-4"}),(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-end w-full",children:[(0,jsx_runtime.jsx)(src.Jp,{className:"mr-3",type:"secondary",onClick:toggleJoinTableModal,children:"Close"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",htmlType:"submit",loading:isViewLinkSubmitting,children:"Save"})]})]})}function ViewLinkKeyLabel(_ref){let{column}=_ref;return(0,jsx_runtime.jsxs)("span",{children:[column.name," ",(0,jsx_runtime.jsx)(src.oe,{type:"success",className:"uppercase",children:column.type})]})}},"./frontend/src/scenes/data-warehouse/editor/editorSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>editorSceneLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js");let editorSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","editor","editorSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setSidebarOverlayOpen:isOpen=>({isOpen}),selectSchema:schema=>({schema})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({sidebarOverlayOpen:[!1,{setSidebarOverlayOpen:(_,_ref)=>{let{isOpen}=_ref;return isOpen},selectSchema:(_,_ref2)=>{let{schema}=_ref2;return null!==schema}}],selectedSchema:[null,{selectSchema:(_,_ref3)=>{let{schema}=_ref3;return schema}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({sidebarOverlayTreeItems:[s=>[s.selectedSchema],selectedSchema=>null===selectedSchema?[]:"fields"in selectedSchema?Object.values(selectedSchema.fields).map(field=>({name:field.name,type:field.type})):"columns"in selectedSchema?Object.values(selectedSchema.columns).map(column=>({name:column.name,type:column.type})):[]]})])},"./frontend/src/scenes/data-warehouse/editor/multitabEditorLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cc:()=>dataNodeKey,tg:()=>multitabEditorLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/monaco/codeEditorLogic.tsx"),scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/utils/api.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/queries/nodes/InsightViz/InsightViz.tsx"),_queries_query__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/schema.ts"),_external_dataWarehouseExternalSceneLogic__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseExternalSceneLogic.ts"),_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let dataNodeKey=(0,_queries_nodes_InsightViz_InsightViz__WEBPACK_IMPORTED_MODULE_10__.gG)({dashboardItemId:_external_dataWarehouseExternalSceneLogic__WEBPACK_IMPORTED_MODULE_13__.H,cachedInsight:null,doNotLoad:!0}),editorModelsStateKey=key=>`${key}/editorModelQueries`,activeModelStateKey=key=>`${key}/activeModelUri`,activeModelVariablesStateKey=key=>`${key}/activeModelVariables`,multitabEditorLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["data-warehouse","editor","multitabEditorLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.key)(props=>props.key),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({actions:[_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__.$,["loadDataWarehouseSavedQueriesSuccess","deleteDataWarehouseSavedQuerySuccess","createDataWarehouseSavedQuerySuccess","runDataWarehouseSavedQuery"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setQueryInput:queryInput=>({queryInput}),updateState:!0,runQuery:(queryOverride,switchTab)=>({queryOverride,switchTab}),setActiveQuery:query=>({query}),setTabs:tabs=>({tabs}),addTab:tab=>({tab}),createTab:(query,view)=>({query,view}),deleteTab:tab=>({tab}),removeTab:tab=>({tab}),selectTab:tab=>({tab}),setLocalState:(key,value)=>({key,value}),initialize:!0,saveAsView:!0,saveAsViewSubmit:name=>({name}),saveAsInsight:!0,saveAsInsightSubmit:name=>({name}),setCacheLoading:loading=>({loading}),setError:error=>({error}),setIsValidView:isValidView=>({isValidView}),setSourceQuery:sourceQuery=>({sourceQuery}),setMetadata:metadata=>({metadata}),setMetadataLoading:loading=>({loading}),editView:(query,view)=>({query,view})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.propsChanged)((_ref,oldProps)=>{let{actions,props}=_ref;!oldProps.monaco&&!oldProps.editor&&props.monaco&&props.editor&&actions.initialize()}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)(_ref2=>{let{props}=_ref2;return{cacheLoading:[!0,{setCacheLoading:(_,_ref3)=>{let{loading}=_ref3;return loading}}],sourceQuery:[{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.DataVisualizationNode,source:{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.HogQLQuery,query:""}},{setSourceQuery:(_,_ref4)=>{let{sourceQuery}=_ref4;return sourceQuery}}],queryInput:["",{setQueryInput:(_,_ref5)=>{let{queryInput}=_ref5;return queryInput}}],activeQuery:[null,{setActiveQuery:(_,_ref6)=>{let{query}=_ref6;return query}}],activeModelUri:[null,{selectTab:(_,_ref7)=>{let{tab}=_ref7;return tab}}],editingView:[null,{selectTab:(_,_ref8)=>{var _tab$view;let{tab}=_ref8;return null!==(_tab$view=tab.view)&&void 0!==_tab$view?_tab$view:null}}],allTabs:[[],{addTab:(state,_ref9)=>{let{tab}=_ref9,newTabs=[...state,tab];return newTabs},removeTab:(state,_ref10)=>{let{tab:tabToRemove}=_ref10,newModels=state.filter(tab=>tab.uri.toString()!==tabToRemove.uri.toString());return newModels},setTabs:(_,_ref11)=>{let{tabs}=_ref11;return tabs}}],error:[null,{setError:(_,_ref12)=>{let{error}=_ref12;return error}}],isValidView:[!1,{setIsValidView:(_,_ref13)=>{let{isValidView}=_ref13;return isValidView}}],metadataLoading:[!0,{setMetadataLoading:(_,_ref14)=>{let{loading}=_ref14;return loading}}],metadata:[null,{setMetadata:(_,_ref15)=>{let{metadata}=_ref15;return metadata}}],editorKey:[props.key]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref16=>{let{values,props,actions,asyncActions}=_ref16;return{editView:_ref17=>{let{query,view}=_ref17,maybeExistingTab=values.allTabs.find(tab=>tab.view?.id===view.id);maybeExistingTab?actions.selectTab(maybeExistingTab):actions.createTab(query,view)},createTab:_ref18=>{let{query="",view}=_ref18,mountedCodeEditorLogic=lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc.findMounted(),currentModelCount=1,allNumbers=values.allTabs.map(tab=>parseInt(tab.uri.path.split("/").pop()||"0"));for(;allNumbers.includes(currentModelCount);)currentModelCount++;if(props.monaco){let uri=props.monaco.Uri.parse(currentModelCount.toString()),model=props.monaco.editor.createModel(query,"hogQL",uri);props.editor?.setModel(model),mountedCodeEditorLogic&&(0,lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__.Z)(model,mountedCodeEditorLogic),actions.addTab({uri,view}),actions.selectTab({uri,view});let queries=values.allTabs.map(tab=>({query:props.monaco?.editor.getModel(tab.uri)?.getValue()||"",path:tab.uri.path.split("/").pop(),view:uri.path===tab.uri.path?view:tab.view}));actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},selectTab:_ref19=>{let{tab}=_ref19;if(props.monaco){let model=props.monaco.editor.getModel(tab.uri);props.editor?.setModel(model)}let path=tab.uri.path.split("/").pop();path&&actions.setLocalState(activeModelStateKey(props.key),path)},deleteTab:_ref20=>{let{tab:tabToRemove}=_ref20;if(props.monaco){let model=props.monaco.editor.getModel(tabToRemove.uri);if(tabToRemove.uri.toString()===values.activeModelUri?.uri.toString()){let indexOfModel=values.allTabs.findIndex(tab=>tab.uri.toString()===tabToRemove.uri.toString()),nextModel=values.allTabs[indexOfModel+1]||values.allTabs[indexOfModel-1]||values.allTabs[0];actions.selectTab(nextModel)}model?.dispose(),actions.removeTab(tabToRemove);let queries=values.allTabs.map(tab=>({query:props.monaco?.editor.getModel(tab.uri)?.getValue()||"",path:tab.uri.path.split("/").pop(),view:tab.view}));actions.setLocalState(editorModelsStateKey(props.key),JSON.stringify(queries))}},setLocalState:_ref21=>{let{key,value}=_ref21;localStorage.setItem(key,value)},initialize:()=>{var _values$sourceQuery$s;let allModelQueries=localStorage.getItem(editorModelsStateKey(props.key)),activeModelUri=localStorage.getItem(activeModelStateKey(props.key)),activeModelVariablesString=localStorage.getItem(activeModelVariablesStateKey(props.key)),activeModelVariables=activeModelVariablesString&&"undefined"!=activeModelVariablesString?JSON.parse(activeModelVariablesString):{},mountedCodeEditorLogic=lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc.findMounted()||(0,lib_monaco_codeEditorLogic__WEBPACK_IMPORTED_MODULE_6__.Pc)({key:props.key,query:null!==(_values$sourceQuery$s=values.sourceQuery?.source.query)&&void 0!==_values$sourceQuery$s?_values$sourceQuery$s:"",language:"hogQL"});if(allModelQueries){props.monaco?.editor.getModels().forEach(model=>{model.dispose()});let models=JSON.parse(allModelQueries||"[]"),newModels=[];if(models.forEach(model=>{if(props.monaco){let uri=props.monaco.Uri.parse(model.path),newModel=props.monaco.editor.createModel(model.query,"hogQL",uri);props.editor?.setModel(newModel),newModels.push({uri,view:model.view}),mountedCodeEditorLogic&&(0,lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_5__.Z)(newModel,mountedCodeEditorLogic)}}),actions.setTabs(newModels),activeModelUri){let uri=props.monaco?.Uri.parse(activeModelUri),activeModel=props.monaco?.editor.getModels().find(model=>model.uri.path===uri?.path);activeModel&&props.editor?.setModel(activeModel);let val=activeModel?.getValue();val&&(actions.setSourceQuery({...values.sourceQuery,source:{...values.sourceQuery.source,variables:activeModelVariables}}),actions.setQueryInput(val),actions.runQuery());let activeView=newModels.find(tab=>tab.uri.path.split("/").pop()===activeModelUri)?.view;uri&&actions.selectTab({uri,view:activeView})}else newModels.length&&actions.selectTab({uri:newModels[0].uri})}else{let model=props.editor?.getModel();model&&actions.createTab()}actions.setCacheLoading(!1)},setQueryInput:()=>{actions.updateState()},updateState:async(_,breakpoint)=>{await breakpoint(100);let queries=values.allTabs.map(model=>({query:props.monaco?.editor.getModel(model.uri)?.getValue()||"",path:model.uri.path.split("/").pop(),view:model.view}));localStorage.setItem(editorModelsStateKey(props.key),JSON.stringify(queries))},setSourceQuery:_ref22=>{let{sourceQuery}=_ref22;localStorage.setItem(activeModelVariablesStateKey(props.key),JSON.stringify(sourceQuery.source.variables))},runQuery:_ref23=>{let{queryOverride,switchTab}=_ref23,query=queryOverride||values.queryInput;actions.setSourceQuery({...values.sourceQuery,source:{...values.sourceQuery.source,query}}),(0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__.M)({key:dataNodeKey,query:{...values.sourceQuery.source,query},autoLoad:!1}).actions.loadData(!switchTab)},saveAsView:async()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Save as view",initialValues:{viewName:""},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"viewName",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{placeholder:"Please enter the name of the view",autoFocus:!0})}),errors:{viewName:name=>name?void 0:"You must enter a name"},onSubmit:async _ref24=>{let{viewName}=_ref24;await asyncActions.saveAsViewSubmit(viewName)},shouldAwaitSubmit:!0})},saveAsViewSubmit:async _ref25=>{var _logic$values$respons;let{name}=_ref25,query=values.sourceQuery.source,logic=(0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_9__.M)({key:dataNodeKey,query}),types=null!==(_logic$values$respons=logic.values.response?.types)&&void 0!==_logic$values$respons?_logic$values$respons:[];await _saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_14__.$.asyncActions.createDataWarehouseSavedQuery({name,query,types})},saveAsInsight:async()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.dn.openForm({title:"Save as new insight",initialValues:{name:""},content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(lib_lemon_ui_LemonField__WEBPACK_IMPORTED_MODULE_4__.D,{name:"name",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_15__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.DF,{"data-attr":"insight-name",placeholder:"Please enter the new name",autoFocus:!0})}),errors:{name:name=>name?void 0:"You must enter a name"},onSubmit:async _ref26=>{let{name}=_ref26;return actions.saveAsInsightSubmit(name)}})},saveAsInsightSubmit:async _ref27=>{let{name}=_ref27,insight=await scenes_insights_utils_api__WEBPACK_IMPORTED_MODULE_7__.L.create({name,query:values.sourceQuery,saved:!0});_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.info(`You're now viewing ${insight.name||insight.derived_name||name}`),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.insightView(insight.short_id))},loadDataWarehouseSavedQueriesSuccess:_ref28=>{let{dataWarehouseSavedQueries}=_ref28,newTabs=values.allTabs.map(tab=>({...tab,view:dataWarehouseSavedQueries.find(v=>v.id===tab.view?.id)}));actions.setTabs(newTabs),actions.updateState()},deleteDataWarehouseSavedQuerySuccess:_ref29=>{let{payload:viewId}=_ref29,tabToRemove=values.allTabs.find(tab=>tab.view?.id===viewId);tabToRemove&&actions.deleteTab(tabToRemove),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View deleted")},createDataWarehouseSavedQuerySuccess:_ref30=>{let{dataWarehouseSavedQueries,payload:view}=_ref30,newView=view&&dataWarehouseSavedQueries.find(v=>v.name===view.name);if(newView){let newTabs=values.allTabs.map(tab=>({...tab,view:tab.uri.path===values.activeModelUri?.uri.path?newView:tab.view})),newTab=newTabs.find(tab=>tab.uri.path===values.activeModelUri?.uri.path);actions.setTabs(newTabs),newTab&&actions.selectTab(newTab),actions.updateState()}},updateDataWarehouseSavedQuerySuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View updated")}}}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_3__.Vt)(_ref31=>{let{props,actions,values}=_ref31;return{activeModelUri:activeModelUri=>{if(props.monaco){let _model=props.monaco.editor.getModel(activeModelUri.uri),val=_model?.getValue();actions.setQueryInput(null!=val?val:""),actions.runQuery(void 0,!0)}},allTabs:()=>{let activeTab=values.allTabs.find(tab=>tab.uri.path===values.activeModelUri?.uri.path);activeTab&&actions.selectTab(activeTab)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({exportContext:[s=>[s.sourceQuery],sourceQuery=>({...(0,_queries_query__WEBPACK_IMPORTED_MODULE_11__.Vp)(sourceQuery.source,void 0,void 0),filename:"export"})],isEditingMaterializedView:[s=>[s.editingView],editingView=>!!editingView?.status]})])},"./frontend/src/scenes/data-warehouse/external/DataWarehouseTables.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>DataWarehouseTables,f:()=>DatabaseTableTreeWithItems});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),DatabaseTableTree=__webpack_require__("./frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx"),constants=__webpack_require__("./frontend/src/lib/constants.tsx"),featureFlagLogic=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),copyToClipboard=__webpack_require__("./frontend/src/lib/utils/copyToClipboard.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),insightDataLogic=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),insightLogic=__webpack_require__("./frontend/src/scenes/insights/insightLogic.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Query=__webpack_require__("./frontend/src/queries/Query/Query.tsx"),sourceWizardLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx"),dataWarehouseViewsLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx"),dataWarehouseSceneLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts"),viewLinkLogic=__webpack_require__("./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx"),ViewLinkModal=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),kea_forms_lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),DatabaseTable=__webpack_require__("./frontend/src/scenes/data-management/database/DatabaseTable.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function TableData(){let{selectedRow:table,isEditingSavedQuery,inEditSchemaMode,editSchemaIsLoading}=(0,index_esm.useValues)(dataWarehouseSceneLogic.M),{setIsEditingSavedQuery,toggleEditSchemaMode,updateSelectedSchema,saveSchema,cancelEditSchema}=(0,index_esm.useActions)(dataWarehouseSceneLogic.M),isExternalTable=table?.type==="data_warehouse",isManuallyLinkedTable=isExternalTable&&!table.source;return(0,jsx_runtime.jsx)("div",{className:"border rounded p-3 bg-bg-light",children:table?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("div",{className:"flex flex-row justify-between items-center gap-2",children:[(0,jsx_runtime.jsxs)("h2",{className:"flex-1 text-wrap break-all leading-4",children:[(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})," ",table.name]}),isEditingSavedQuery&&(0,jsx_runtime.jsx)("div",{className:"flex flex-row gap-2 justify-between",children:(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setIsEditingSavedQuery(!1),children:"Cancel"})}),inEditSchemaMode&&(0,jsx_runtime.jsxs)("div",{className:"flex flex-row gap-2 justify-between",children:[(0,jsx_runtime.jsx)(src.Jp,{type:"primary",loading:editSchemaIsLoading,onClick:()=>{saveSchema()},children:"Save schema"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",disabledReason:editSchemaIsLoading&&"Schema is saving...",onClick:()=>{cancelEditSchema()},children:"Cancel edit"})]}),!inEditSchemaMode&&!isEditingSavedQuery&&(0,jsx_runtime.jsx)("div",{className:"flex flex-row gap-2 justify-between",children:isManuallyLinkedTable&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",onClick:()=>{toggleEditSchemaMode()},children:"Edit schema"})})]}),"data_warehouse"==table.type&&(0,jsx_runtime.jsxs)("div",{className:"flex flex-col",children:[table.source&&table.schema&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"Last Synced At"}),(0,jsx_runtime.jsx)("span",{children:table.schema.last_synced_at?(0,utils.bo)(table.schema.last_synced_at,"MMMM DD, YYYY","h:mm A"):"Not yet synced"})]}),!table.source&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"Files URL pattern"}),(0,jsx_runtime.jsx)("span",{className:"break-all",children:table.url_pattern}),(0,jsx_runtime.jsx)("span",{className:"card-secondary mt-2",children:"File format"}),(0,jsx_runtime.jsx)("span",{children:table.format})]})]}),!isEditingSavedQuery&&(0,jsx_runtime.jsxs)("div",{className:"mt-2",children:[(0,jsx_runtime.jsx)("span",{className:"card-secondary",children:"Columns"}),(0,jsx_runtime.jsx)(DatabaseTable.B,{table:table.name,tables:[table],inEditSchemaMode:inEditSchemaMode,schemaOnChange:(key,type)=>updateSelectedSchema(key,type)})]})]}):(0,jsx_runtime.jsx)("div",{className:"px-4 py-3 h-100 col-span-2 flex justify-center items-center"})})}function DeleteTableModal(_ref){let subject,{table,isOpen,setIsOpen,onDelete}=_ref;return subject="view"===table.type?"view":"table",(0,jsx_runtime.jsx)(src.fQ,{title:`Delete ${subject}?`,onClose:()=>setIsOpen(!1),footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>setIsOpen(!1),children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",status:"danger",onClick:()=>onDelete(),children:`Delete ${table.name}`})]}),isOpen:isOpen,children:(0,jsx_runtime.jsxs)("p",{children:[(0,kea_forms_lib.capitalizeFirstLetter)(subject)," deletion ",(0,jsx_runtime.jsx)("b",{children:"cannot be undone"}),". All"," ","view"===table.type?"joins":"views and joins"," related to this ",subject," will be deleted"]})})}let DataWarehouseTables=_ref=>{let{insightProps}=_ref,{query}=(0,index_esm.useValues)((0,insightDataLogic.S)(insightProps)),{setQuery:setInsightQuery}=(0,index_esm.useActions)((0,insightDataLogic.S)(insightProps));return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(index_esm.BindLogic,{logic:insightLogic.zm,props:insightProps,children:(0,jsx_runtime.jsx)("div",{className:"Insight",children:(0,jsx_runtime.jsx)(Query.A,{query:query,setQuery:setInsightQuery,readOnly:!1,context:{showOpenEditorButton:!1,showQueryEditor:!1,showQueryHelp:!1,insightProps}})})})})},DatabaseTableTreeWithItems=_ref2=>{let{inline,collapsible=!0}=_ref2,{dataWarehouseTablesBySourceType,posthogTables,databaseLoading,nonMaterializedViews,materializedViews,views,selectedRow,schemaModalIsOpen,dataWarehouseSavedQueriesLoading}=(0,index_esm.useValues)(dataWarehouseSceneLogic.M),{selectRow,deleteDataWarehouseSavedQuery,deleteDataWarehouseTable,toggleSchemaModal}=(0,index_esm.useActions)(dataWarehouseSceneLogic.M),[collapsed,setCollapsed]=(0,react.useState)(!1),{toggleJoinTableModal,selectSourceTable}=(0,index_esm.useActions)(viewLinkLogic.t),[isDeleteModalOpen,setIsDeleteModalOpen]=(0,react.useState)(!1),{runDataWarehouseSavedQuery}=(0,index_esm.useActions)(dataWarehouseViewsLogic.$),{featureFlags}=(0,index_esm.useValues)(featureFlagLogic.h),deleteButton=table=>table&&("view"===table.type||"materialized_view"===table.type)?(0,jsx_runtime.jsx)(src.Jp,{"data-attr":"schema-list-item-delete",status:"danger",onClick:()=>{selectRow(table),setIsDeleteModalOpen(!0)},fullWidth:!0,children:"Delete"}):(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),dropdownOverlay=table=>(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{(0,copyToClipboard.v)(table.name,table.name)},fullWidth:!0,"data-attr":"schema-list-item-copy",children:"Copy table name"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{selectRow(table),toggleSchemaModal()},"data-attr":"schema-list-item-schema",fullWidth:!0,children:"View table schema"}),(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{selectSourceTable(table.name),toggleJoinTableModal()},"data-attr":"schema-list-item-join",fullWidth:!0,children:"Add join"}),("view"==table.type||"materialized_view"==table.type)&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{lib.router.actions.push(urls.j.dataWarehouseView(table.id))},"data-attr":"schema-list-item-edit",fullWidth:!0,children:"Edit view definition"}),featureFlags[constants.y8.DATA_MODELING]&&"view"===table.type&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{runDataWarehouseSavedQuery(table.id)},"data-attr":"schema-list-item-materialize",fullWidth:!0,children:"Materialize"}),featureFlags[constants.y8.DATA_MODELING]&&"materialized_view"===table.type&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{runDataWarehouseSavedQuery(table.id)},"data-attr":"schema-list-item-run",fullWidth:!0,children:"Run"}),deleteButton(table)]}),treeItems=()=>{if(inline){let items=[{name:"External",items:Object.keys(dataWarehouseTablesBySourceType).map(source_type=>{var _SOURCE_DETAILS$label;return{name:null!==(_SOURCE_DETAILS$label=sourceWizardLogic.l2[source_type]?.label)&&void 0!==_SOURCE_DETAILS$label?_SOURCE_DETAILS$label:source_type,items:dataWarehouseTablesBySourceType[source_type].map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))}))}}),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No tables found"}),isLoading:databaseLoading},{name:"PostHog",items:posthogTables.map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),isLoading:databaseLoading},{name:"Views",items:(featureFlags[constants.y8.DATA_MODELING]?nonMaterializedViews:views).map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading},...featureFlags[constants.y8.DATA_MODELING]?[{name:"Materialized views",items:materializedViews.map(table=>({name:table.name,table:table,dropdownOverlay:dropdownOverlay(table),items:Object.values(table.fields).map(column=>({name:column.name,type:column.type,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No materialized views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading}]:[]];return items}let items=[{name:"External",items:Object.keys(dataWarehouseTablesBySourceType).map(source_type=>({name:source_type,items:dataWarehouseTablesBySourceType[source_type].map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})}))})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No tables found"}),isLoading:databaseLoading},{name:"PostHog",items:posthogTables.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{})})),isLoading:databaseLoading},{name:"Views",items:nonMaterializedViews.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconBrackets,{})})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading},...featureFlags[constants.y8.DATA_MODELING]?[{name:"Materialized views",items:materializedViews.map(table=>({table:table,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconBrackets,{})})),emptyLabel:(0,jsx_runtime.jsx)("span",{className:"text-muted",children:"No materialized views found"}),isLoading:databaseLoading||dataWarehouseSavedQueriesLoading}]:[]];return items};return(0,jsx_runtime.jsxs)("div",{className:(0,clsx_m.clsx)("bg-bg-light rounded space-y-px border p-2 overflow-y-auto",collapsed?"":"min-w-80 flex-1"),children:[collapsed?(0,jsx_runtime.jsx)(src.Jp,{icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),onClick:()=>setCollapsed(!1)}):collapsible?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{size:"xsmall",onClick:()=>setCollapsed(!0),fullWidth:!0,icon:(0,jsx_runtime.jsx)(posthog_icons_es.IconDatabase,{}),className:"font-normal",children:(0,jsx_runtime.jsx)("span",{className:"uppercase text-muted-alt tracking-wider",children:"Sources"})}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{onSelectRow:selectRow,items:treeItems(),selectedRow:selectedRow})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("span",{className:"text-muted-alt tracking-wider font-normal",children:"Sources"}),(0,jsx_runtime.jsx)(DatabaseTableTree.E,{onSelectRow:selectRow,items:treeItems(),selectedRow:selectedRow})]}),(0,jsx_runtime.jsx)(src.fQ,{width:"50rem",isOpen:!!selectedRow&&schemaModalIsOpen,onClose:()=>{selectRow(null),toggleSchemaModal()},title:"Table Schema",children:(0,jsx_runtime.jsx)(TableData,{})}),(0,jsx_runtime.jsx)(ViewLinkModal.WI,{}),selectedRow&&(0,jsx_runtime.jsx)(DeleteTableModal,{table:selectedRow,isOpen:isDeleteModalOpen,setIsOpen:setIsDeleteModalOpen,onDelete:()=>{selectedRow&&("view"===selectedRow.type||"materialized_view"===selectedRow.type?deleteDataWarehouseSavedQuery(selectedRow.id):deleteDataWarehouseTable(selectedRow.id))}})]})}},"./frontend/src/scenes/data-warehouse/external/dataWarehouseExternalSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>DATAWAREHOUSE_EDITOR_ITEM_ID,r:()=>dataWarehouseExternalSceneLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/insightDataLogic.tsx"),scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/insights/insightSceneLogic.tsx"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/schema.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");let DATAWAREHOUSE_EDITOR_ITEM_ID="new-SQL",dataWarehouseExternalSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(()=>["scenes","data-warehouse","external","dataWarehouseExternalSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A,["viewsMapById","database","databaseLoading"]],actions:[scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T,["setSceneState"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A,["loadDatabase","loadDatabaseSuccess"]],logic:[(0,scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S)({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({loadView:id=>({id}),setViewLoading:viewLoading=>({viewLoading})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)(()=>({breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_6__.x.DataWarehouse,name:"Explore",path:scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse()}]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({viewLoading:[!1,{loadView:()=>!0,setViewLoading:(_,_ref)=>{let{viewLoading}=_ref;return viewLoading}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{values,actions}=_ref2;return{loadDatabaseSuccess:()=>{kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname.includes("/data-warehouse/view")&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.currentLocation.pathname)},loadView:async _ref3=>{let{id}=_ref3;id&&id in values.viewsMapById?scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S.findMounted({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})?.actions.setQuery({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_8__.OH.DataVisualizationNode,source:values.viewsMapById[id].query}):(await scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_3__.A.asyncActions.loadDatabase(),id&&id in values.viewsMapById?scenes_insights_insightDataLogic__WEBPACK_IMPORTED_MODULE_4__.S.findMounted({dashboardItemId:DATAWAREHOUSE_EDITOR_ITEM_ID,cachedInsight:null})?.actions.setQuery({kind:_queries_schema__WEBPACK_IMPORTED_MODULE_8__.OH.DataVisualizationNode,source:values.viewsMapById[id].query}):(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Error retrieving view"),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse()))),actions.setViewLoading(!1)}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref4=>{let{actions}=_ref4;return{"/data-warehouse":()=>{scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T.actions.setSceneState(String("new-dataWarehouse"),_types__WEBPACK_IMPORTED_MODULE_9__.LO.Edit,void 0,void 0,void 0,void 0,void 0,void 0)},"/data-warehouse/view/:id":_ref5=>{let{id}=_ref5;scenes_insights_insightSceneLogic__WEBPACK_IMPORTED_MODULE_5__.T.actions.setSceneState(String("new-dataWarehouse"),_types__WEBPACK_IMPORTED_MODULE_9__.LO.Edit,void 0,void 0,void 0,void 0,void 0,void 0),id&&actions.loadView(id)}}})])},"./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>dataWarehouseJoinsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");let dataWarehouseJoinsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","external","dataWarehouseJoinsLogic"]),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)({joins:[[],{loadJoins:async()=>{let joins=await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dataWarehouseViewLinks.list();return joins.results}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["allTablesMap"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({personTableJoins:[s=>[s.joins],joins=>joins.filter(join=>"persons"===join.source_table_name)],tablesJoinedToPersons:[s=>[s.allTablesMap,s.personTableJoins],(allTablesMap,personTableJoins)=>personTableJoins.map(join=>{let table=allTablesMap[join.joining_table_name];return{table,join}})],columnsJoinedToPersons:[s=>[s.tablesJoinedToPersons],tablesJoinedToPersons=>tablesJoinedToPersons.reduce((acc,_ref)=>{let{table,join}=_ref;return table&&acc.push(...Object.values(table.fields).map(column=>({id:`${join.field_name}.${column.name}`,name:`${join.field_name}: ${column.name}`,table:join.field_name,property_type:(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.fm)(column.type)}))),acc},[])]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref2=>{let{actions}=_ref2;actions.loadJoins()})])},"./frontend/src/scenes/data-warehouse/new/dataWarehouseTableLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>dataWarehouseTableLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NEW_WAREHOUSE_TABLE={id:"",name:"",url_pattern:"",format:"Parquet",credential:{access_key:"",access_secret:""}},dataWarehouseTableLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","data-warehouse","tableLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({editingTable:editing=>({editing}),updateTargetingFlagFilters:(index,properties)=>({index,properties}),addConditionSet:!0,removeConditionSet:index=>({index}),launchTable:!0,stopTable:!0,archiveTable:!0,setDataTableQuery:query=>({query})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_3__.loaders)(_ref=>{let{props}=_ref;return{table:{loadTable:async()=>props.id&&"new"!==props.id?await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.get(props.id):{...NEW_WAREHOUSE_TABLE},createTable:async tablePayload=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.create({...tablePayload}),updateTable:async tablePayload=>await lib_api__WEBPACK_IMPORTED_MODULE_5__.ZP.dataWarehouseTables.update(props.id,tablePayload)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{createTableSuccess:async _ref3=>{let{table}=_ref3;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["Table ",table.name," created"]})),actions.loadDatabase(),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse())},updateTableSuccess:async _ref4=>{let{table}=_ref4;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["Table ",table.name," updated"]})),actions.editingTable(!1),kea_router__WEBPACK_IMPORTED_MODULE_4__.router.actions.replace(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.dataWarehouse())}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({isEditingTable:[!1,{editingTable:(_,_ref5)=>{let{editing}=_ref5;return editing}}],dataTableQuery:[null,{setDataTableQuery:(_,_ref6)=>{let{query}=_ref6;return query}}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref7=>{let{actions,props}=_ref7;return{table:{defaults:{...NEW_WAREHOUSE_TABLE},errors:_ref8=>{let{name,url_pattern,credential,format}=_ref8;return url_pattern?.startsWith("s3://")?{url_pattern:"Please use the https version of your bucket url e.g. https://your-org.s3.amazonaws.com/airbyte/stripe/invoices/*.pqt"}:{name:!name&&"Please enter a name.",url_pattern:!url_pattern&&"Please enter a url pattern.",credential:{access_secret:!credential.access_secret&&"Please enter an access secret.",access_key:!credential.access_key&&"Please enter an access key."},format:!format&&"Please enter the format of your files."}},submit:async tablePayload=>{props.id&&"new"!==props.id?actions.updateTable(tablePayload):actions.createTable(tablePayload)}}}})])},"./frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HM:()=>getErrorsForFields,So:()=>sourceWizardLogic,l2:()=>SOURCE_DETAILS});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/scenes/urls.ts"),_types__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/types.ts"),_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts"),_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/data-warehouse/new/dataWarehouseTableLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let getHubspotRedirectUri=()=>`${window.location.origin}/data-warehouse/hubspot/redirect`,SOURCE_DETAILS={Stripe:{name:"Stripe",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["Enter your Stripe credentials to automatically pull your Stripe data into the PostHog Data warehouse.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("br",{}),"You can find your account ID"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:"https://dashboard.stripe.com/settings/user",target:"_blank",children:"in your Stripe dashboard"}),", and create a secret key"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.rU,{to:"https://dashboard.stripe.com/apikeys",target:"_blank",children:"here"}),"."]}),{}),fields:[{name:"account_id",label:"Account id",type:"text",required:!1,placeholder:"acct_..."},{name:"client_secret",label:"Client secret",type:"password",required:!0,placeholder:"sk_live_..."}]},Hubspot:{name:"Hubspot",fields:[],caption:"Succesfully authenticated with Hubspot. Please continue here to complete the source setup",oauthPayload:["code"]},Postgres:{name:"Postgres",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Postgres credentials to automatically pull your Postgres data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"5432"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"postgres"},{name:"user",label:"User",type:"text",required:!0,placeholder:"postgres"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},MySQL:{name:"MySQL",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your MySQL/MariaDB credentials to automatically pull your MySQL data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"3306"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"mysql"},{name:"user",label:"User",type:"text",required:!0,placeholder:"mysql"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"},{type:"select",name:"use_ssl",label:"Use SSL?",defaultValue:"1",required:!0,options:[{value:"1",label:"Yes"},{value:"0",label:"No"}]},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},MSSQL:{name:"MSSQL",label:"Azure SQL Server",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your MS SQL Server/Azure SQL Server credentials to automatically pull your SQL data into the PostHog Data warehouse."}),fields:[{name:"host",label:"Host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Port",type:"number",required:!0,placeholder:"1433"},{name:"dbname",label:"Database",type:"text",required:!0,placeholder:"msdb"},{name:"user",label:"User",type:"text",required:!0,placeholder:"sa"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"dbo"},{name:"ssh-tunnel",label:"Use SSH tunnel?",type:"switch-group",default:!1,fields:[{name:"host",label:"Tunnel host",type:"text",required:!0,placeholder:"localhost"},{name:"port",label:"Tunnel port",type:"number",required:!0,placeholder:"22"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Tunnel username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Tunnel password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Tunnel username",type:"text",required:!1,placeholder:"User1"},{name:"private_key",label:"Tunnel private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Tunnel passphrase",type:"password",required:!1,placeholder:""}]}]}]}]},Snowflake:{name:"Snowflake",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Snowflake credentials to automatically pull your Snowflake data into the PostHog Data warehouse."}),fields:[{name:"account_id",label:"Account id",type:"text",required:!0,placeholder:""},{name:"database",label:"Database",type:"text",required:!0,placeholder:"snowflake_sample_data"},{name:"warehouse",label:"Warehouse",type:"text",required:!0,placeholder:"COMPUTE_WAREHOUSE"},{type:"select",name:"auth_type",label:"Authentication type",required:!0,defaultValue:"password",options:[{label:"Password",value:"password",fields:[{name:"username",label:"Username",type:"text",required:!0,placeholder:"User1"},{name:"password",label:"Password",type:"password",required:!0,placeholder:""}]},{label:"Key pair",value:"keypair",fields:[{name:"username",label:"Username",type:"text",required:!0,placeholder:"User1"},{name:"private_key",label:"Private key",type:"textarea",required:!0,placeholder:""},{name:"passphrase",label:"Passphrase",type:"password",required:!1,placeholder:""}]}]},{name:"role",label:"Role (optional)",type:"text",required:!1,placeholder:"ACCOUNTADMIN"},{name:"schema",label:"Schema",type:"text",required:!0,placeholder:"public"}]},Zendesk:{name:"Zendesk",caption:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:"Enter your Zendesk API key to automatically pull your Zendesk support data into the PostHog Data warehouse."}),fields:[{name:"subdomain",label:"Zendesk subdomain",type:"text",required:!0,placeholder:""},{name:"api_key",label:"API key",type:"text",required:!0,placeholder:""},{name:"email_address",label:"Zendesk email address",type:"email",required:!0,placeholder:""}]},Salesforce:{name:"Salesforce",fields:[{name:"integration_id",label:"Salesforce account",type:"oauth",required:!0}],caption:"Select an existing Salesforce account to link to PostHog or create a new connection"},Vitally:{name:"Vitally",fields:[{name:"secret_token",label:"Secret token",type:"text",required:!0,placeholder:"sk_live_..."},{type:"select",name:"region",label:"Vitally region",required:!0,defaultValue:"EU",options:[{label:"EU",value:"EU"},{label:"US",value:"US",fields:[{name:"subdomain",label:"Vitally subdomain",type:"text",required:!0,placeholder:""}]}]}],caption:""},BigQuery:{name:"BigQuery",fields:[{type:"file-upload",name:"key_file",label:"Google Cloud JSON key file",fileFormat:".json",required:!0},{type:"text",name:"dataset_id",label:"Dataset ID",required:!0,placeholder:""},{type:"switch-group",name:"temporary-dataset",label:"Use a different dataset for the temporary tables?",caption:"We have to create and delete temporary tables when querying your data, this is a requirement of querying large BigQuery tables. We can use a different dataset if you'd like to limit the permissions available to the service account provided.",default:!1,fields:[{type:"text",name:"temporary_dataset_id",label:"Dataset ID for temporary tables",required:!0,placeholder:""}]}],caption:""},Chargebee:{name:"Chargebee",fields:[{name:"api_key",label:"API key",type:"text",required:!0,placeholder:""},{type:"text",name:"site_name",label:"Site name (subdomain)",required:!0,placeholder:""}],caption:""}},buildKeaFormDefaultFromSourceDetails=sourceDetails=>{let fieldDefaults=(field,obj)=>{if("switch-group"===field.type){obj[field.name]={},obj[field.name].enabled=field.default,field.fields.forEach(f=>fieldDefaults(f,obj[field.name]));return}if("select"===field.type){let hasOptionFields=!!field.options.filter(n=>{var _n$fields$length;return(null!==(_n$fields$length=n.fields?.length)&&void 0!==_n$fields$length?_n$fields$length:0)>0}).length;hasOptionFields?(obj[field.name]={},obj[field.name].selection=field.defaultValue,field.options.flatMap(n=>{var _n$fields;return null!==(_n$fields=n.fields)&&void 0!==_n$fields?_n$fields:[]}).forEach(f=>fieldDefaults(f,obj[field.name]))):obj[field.name]=field.defaultValue;return}obj[field.name]=""},sourceDetailsKeys=Object.keys(sourceDetails),formDefault=sourceDetailsKeys.reduce((defaults,cur)=>{let fields=sourceDetails[cur].fields;return fields.forEach(f=>fieldDefaults(f,defaults.payload)),defaults},{prefix:"",payload:{}});return formDefault},manualLinkSourceMap={aws:"S3","google-cloud":"Google Cloud Storage","cloudflare-r2":"Cloudflare R2",azure:"Azure"},sourceWizardLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","data-warehouse","external","sourceWizardLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({selectConnector:connector=>({connector}),toggleManualLinkFormVisible:visible=>({visible}),handleRedirect:(kind,searchParams)=>({kind,searchParams}),onClear:!0,onBack:!0,onNext:!0,onSubmit:!0,setDatabaseSchemas:schemas=>({schemas}),toggleSchemaShouldSync:(schema,shouldSync)=>({schema,shouldSync}),updateSchemaSyncType:(schema,syncType,incrementalField,incrementalFieldType)=>({schema,syncType,incrementalField,incrementalFieldType}),clearSource:!0,updateSource:source=>({source}),createSource:!0,setIsLoading:isLoading=>({isLoading}),setSourceId:id=>({sourceId:id}),closeWizard:!0,cancelWizard:!0,setStep:step=>({step}),getDatabaseSchemas:!0,setManualLinkingProvider:provider=>({provider}),openSyncMethodModal:schema=>({schema}),cancelSyncMethodModal:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U,["tableLoading"],_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__.T,["dataWarehouseSources"],scenes_PreflightCheck_preflightLogic__WEBPACK_IMPORTED_MODULE_6__.preflightLogic,["preflight"]],actions:[_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U,["resetTable","createTableSuccess"],_settings_dataWarehouseSettingsLogic__WEBPACK_IMPORTED_MODULE_11__.T,["loadSources"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_8__.H,["addProductIntent"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({manualLinkingProvider:[null,{setManualLinkingProvider:(_,_ref)=>{let{provider}=_ref;return provider}}],selectedConnector:[null,{selectConnector:(_,_ref2)=>{let{connector}=_ref2;return connector}}],isManualLinkFormVisible:[!1,{toggleManualLinkFormVisible:(_,_ref3)=>{let{visible}=_ref3;return visible}}],currentStep:[1,{onNext:state=>state+1,onBack:state=>state-1,onClear:()=>1,setStep:(_,_ref4)=>{let{step}=_ref4;return step}}],databaseSchema:[[],{setDatabaseSchemas:(_,_ref5)=>{let{schemas}=_ref5;return schemas},toggleSchemaShouldSync:(state,_ref6)=>{let{schema,shouldSync}=_ref6,newSchema=state.map(s=>({...s,should_sync:s.table===schema.table?shouldSync:s.should_sync}));return newSchema},updateSchemaSyncType:(state,_ref7)=>{let{schema,syncType,incrementalField,incrementalFieldType}=_ref7,newSchema=state.map(s=>({...s,sync_type:s.table===schema.table?syncType:s.sync_type,incremental_field:s.table===schema.table?incrementalField:s.incremental_field,incremental_field_type:s.table===schema.table?incrementalFieldType:s.incremental_field_type}));return newSchema}}],source:[{payload:{},prefix:""},{updateSource:(state,_ref8)=>{var _source$prefix,_state$payload,_source$payload;let{source}=_ref8;return{prefix:null!==(_source$prefix=source.prefix)&&void 0!==_source$prefix?_source$prefix:state.prefix,payload:{...null!==(_state$payload=state.payload)&&void 0!==_state$payload?_state$payload:{},...null!==(_source$payload=source.payload)&&void 0!==_source$payload?_source$payload:{}}}},clearSource:()=>({payload:{},prefix:""})}],isLoading:[!1,{onNext:()=>!1,setIsLoading:(_,_ref9)=>{let{isLoading}=_ref9;return isLoading}}],sourceId:[null,{setSourceId:(_,_ref10)=>{let{sourceId}=_ref10;return sourceId}}],syncMethodModalOpen:[!1,{openSyncMethodModal:()=>!0,cancelSyncMethodModal:()=>!1}],currentSyncMethodModalSchema:[null,{openSyncMethodModal:(_,_ref11)=>{let{schema}=_ref11;return schema},cancelSyncMethodModal:()=>null,updateSchemaSyncType:(_,_ref12)=>{let{schema,syncType,incrementalField,incrementalFieldType}=_ref12;return{...schema,sync_type:syncType,incremental_field:incrementalField,incremental_field_type:incrementalFieldType}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({isManualLinkingSelected:[s=>[s.selectedConnector],selectedConnector=>!selectedConnector],canGoBack:[s=>[s.currentStep],currentStep=>4!==currentStep],canGoNext:[s=>[s.currentStep,s.isManualLinkingSelected,s.databaseSchema],(currentStep,isManualLinkingSelected,databaseSchema)=>(!isManualLinkingSelected||1!==currentStep)&&(!!isManualLinkingSelected||3!==currentStep||0!==databaseSchema.filter(n=>n.should_sync).length&&0===databaseSchema.filter(n=>n.should_sync&&!n.sync_type).length)],showSkipButton:[s=>[s.currentStep],currentStep=>4===currentStep],nextButtonText:[s=>[s.currentStep,s.isManualLinkingSelected,(_,props)=>props.onComplete],(currentStep,isManualLinkingSelected,onComplete)=>3===currentStep&&isManualLinkingSelected?"Link":3===currentStep?"Import":4===currentStep?onComplete?"Next":"Return to sources":"Next"],breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__.x.DataWarehouse,name:"Data Warehouse",path:scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouse()},{key:[scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_7__.x.DataWarehouse,"New"],name:"New"}]],showFooter:[s=>[s.selectedConnector,s.isManualLinkFormVisible],(selectedConnector,isManualLinkFormVisible)=>selectedConnector||isManualLinkFormVisible],connectors:[s=>[s.dataWarehouseSources],sources=>Object.values(SOURCE_DETAILS).map(connector=>({...connector,disabledReason:sources&&sources.results.find(source=>source.source_type===connector.name)?"Already linked":null}))],manualConnectors:[()=>[],()=>_types__WEBPACK_IMPORTED_MODULE_10__.zD.map(source=>({name:manualLinkSourceMap[source],type:source}))],addToHubspotButtonUrl:[s=>[s.preflight],preflight=>()=>{let clientId=preflight?.data_warehouse_integrations?.hubspot.client_id;if(!clientId)return null;let params=new URLSearchParams;return params.set("client_id",clientId),params.set("redirect_uri",getHubspotRedirectUri()),params.set("scope","crm.objects.contacts.read crm.objects.companies.read crm.objects.deals.read tickets crm.objects.quotes.read sales-email-read"),`https://app.hubspot.com/oauth/authorize?${params.toString()}`}],modalTitle:[s=>[s.currentStep],currentStep=>1===currentStep?"":2===currentStep?"Link your data source":3===currentStep?"Select tables to import":4===currentStep?"Importing your data...":""],modalCaption:[s=>[s.selectedConnector,s.currentStep],(selectedConnector,currentStep)=>2===currentStep&&selectedConnector?SOURCE_DETAILS[selectedConnector.name]?.caption:4===currentStep?"Sit tight as we import your data! After it's done, you will be able to query it in PostHog.":""],isWrapped:[()=>[(_,props)=>props.onComplete],onComplete=>!!onComplete]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref13=>{let{actions,values,props}=_ref13;return{onBack:()=>{values.currentStep<=1&&actions.onClear()},onClear:()=>{actions.selectConnector(null),actions.resetSourceConnectionDetails(),actions.clearSource(),actions.toggleManualLinkFormVisible(!1),actions.resetTable(),actions.setIsLoading(!1)},onSubmit:()=>{1!==values.currentStep&&(2===values.currentStep&&values.selectedConnector?.name?actions.submitSourceConnectionDetails():2===values.currentStep&&values.isManualLinkFormVisible&&(_dataWarehouseTableLogic__WEBPACK_IMPORTED_MODULE_12__.U.actions.submitTable(),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source created",{sourceType:"Manual"})),3===values.currentStep&&values.selectedConnector?.name&&(actions.updateSource({payload:{schemas:values.databaseSchema.map(schema=>({name:schema.table,should_sync:schema.should_sync,sync_type:schema.sync_type,incremental_field:schema.incremental_field,incremental_field_type:schema.incremental_field_type}))}}),actions.setIsLoading(!0),actions.createSource(),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source created",{sourceType:values.selectedConnector.name})),4===values.currentStep&&(props.onComplete?props.onComplete():actions.closeWizard()))},createTableSuccess:()=>{actions.cancelWizard()},closeWizard:()=>{actions.cancelWizard(),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.pipeline(_types__WEBPACK_IMPORTED_MODULE_10__.J9.Sources))},cancelWizard:()=>{actions.onClear(),actions.clearSource(),actions.loadSources(null),actions.resetSourceConnectionDetails()},createSource:async()=>{if(null!==values.selectedConnector)try{let{id}=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.create({...values.source,source_type:values.selectedConnector.name});_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("New Data Resource Created"),actions.setSourceId(id),actions.resetSourceConnectionDetails(),actions.loadSources(null),actions.onNext()}catch(e){var _e$data$message;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(null!==(_e$data$message=e.data?.message)&&void 0!==_e$data$message?_e$data$message:e.message)}finally{actions.setIsLoading(!1)}},handleRedirect:async _ref14=>{let{kind,searchParams}=_ref14;switch(kind){case"hubspot":actions.updateSource({source_type:"Hubspot",payload:{code:searchParams.code,redirect_uri:getHubspotRedirectUri()}});return;case"salesforce":actions.updateSource({source_type:"Salesforce"});break;default:_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Something went wrong.")}},submitSourceConnectionDetailsSuccess:()=>{actions.getDatabaseSchemas()},getDatabaseSchemas:async()=>{var _values$source$payloa,_e$data$message2,_ref15;if(values.selectedConnector){actions.setIsLoading(!0);try{let schemas=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.database_schema(values.selectedConnector.name,null!==(_values$source$payloa=values.source.payload)&&void 0!==_values$source$payloa?_values$source$payloa:{});actions.setDatabaseSchemas(schemas),actions.onNext()}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(null!==(_e$data$message2=e.data?.message)&&void 0!==_e$data$message2?_e$data$message2:e.message),-1!=(null!==(_ref15=e.data?.message)&&void 0!==_ref15?_ref15:"").indexOf("Invalid credentials")&&posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("warehouse credentials invalid",{sourceType:values.selectedConnector.name})}actions.setIsLoading(!1)}},setManualLinkingProvider:()=>{actions.onNext()},selectConnector:()=>{actions.addProductIntent({product_type:_types__WEBPACK_IMPORTED_MODULE_10__.Md.DATA_WAREHOUSE,intent_context:"selected connector"})}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref16=>{let{actions}=_ref16;return{"/data-warehouse/:kind/redirect":(_ref17,searchParams)=>{let{kind=""}=_ref17;"hubspot"===kind&&kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouseTable(),{kind,code:searchParams.code}),"salesforce"===kind&&kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_9__.j.dataWarehouseTable(),{kind})},"/data-warehouse/new":(_,searchParams)=>{"hubspot"==searchParams.kind&&searchParams.code&&(actions.selectConnector(SOURCE_DETAILS.Hubspot),actions.handleRedirect(searchParams.kind,{code:searchParams.code}),actions.setStep(2)),"salesforce"==searchParams.kind&&(actions.selectConnector(SOURCE_DETAILS.Salesforce),actions.handleRedirect(searchParams.kind,{}),actions.setStep(2))}}}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_2__.forms)(_ref18=>{let{actions,values}=_ref18;return{sourceConnectionDetails:{defaults:buildKeaFormDefaultFromSourceDetails(SOURCE_DETAILS),errors:sourceValues=>{var _values$selectedConne;return getErrorsForFields(null!==(_values$selectedConne=values.selectedConnector?.fields)&&void 0!==_values$selectedConne?_values$selectedConne:[],sourceValues)},submit:async sourceValues=>{if(values.selectedConnector){let payload={...sourceValues,source_type:values.selectedConnector.name};actions.setIsLoading(!0);try{var _values$selectedConne2;await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.externalDataSources.source_prefix(payload.source_type,sourceValues.prefix);let payloadKeys=(null!==(_values$selectedConne2=values.selectedConnector?.fields)&&void 0!==_values$selectedConne2?_values$selectedConne2:[]).map(n=>({name:n.name,type:n.type})),fieldPayload={source_type:values.selectedConnector.name};for(let{name,type}of payloadKeys)if("file-upload"===type)try{let loadedFile=await new Promise((resolve,reject)=>{let fileReader=new FileReader;fileReader.onload=e=>resolve(e.target?.result),fileReader.onerror=e=>reject(e),fileReader.readAsText(payload.payload[name][0])}),jsonConfig=JSON.parse(loadedFile);fieldPayload[name]=jsonConfig}catch(e){return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("File is not valid")}else fieldPayload[name]=payload.payload[name];actions.updateSource({...payload,payload:{source_type:values.selectedConnector.name,...fieldPayload}}),actions.setIsLoading(!1)}catch(e){throw e?.data?.message&&actions.setSourceConnectionDetailsManualErrors({prefix:e.data.message}),actions.setIsLoading(!1),e}}}}}})]),getErrorsForFields=(fields,values)=>{var _values$prefix,_values$payload;let errors={payload:{}};/^[a-zA-Z0-9_-]*$/.test(null!==(_values$prefix=values?.prefix)&&void 0!==_values$prefix?_values$prefix:"")||(errors.prefix="Please enter a valid prefix (only letters, numbers, and '_' or '-').");let validateField=(field,valueObj,errorsObj)=>{if("switch-group"===field.type){valueObj[field.name]?.enabled&&(errorsObj[field.name]={},field.fields.forEach(f=>validateField(f,valueObj[field.name],errorsObj[field.name])));return}if("select"===field.type){let hasOptionFields=!!field.options.filter(n=>{var _n$fields$length2;return(null!==(_n$fields$length2=n.fields?.length)&&void 0!==_n$fields$length2?_n$fields$length2:0)>0}).length;if(hasOptionFields){errorsObj[field.name]={};let selection=valueObj[field.name].selection;field.options.find(n=>n.value===selection)?.fields?.forEach(f=>validateField(f,valueObj[field.name],errorsObj[field.name]))}else field.required&&!valueObj[field.name]&&(errorsObj[field.name]=`Please select a ${field.label.toLowerCase()}`);return}field.required&&!valueObj[field.name]&&(errorsObj[field.name]=`Please enter a ${field.label.toLowerCase()}`)};for(let field of fields)validateField(field,null!==(_values$payload=values?.payload)&&void 0!==_values$payload?_values$payload:{},errors.payload);return errors}},"./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>dataWarehouseViewsLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/userLogic.ts");let dataWarehouseViewsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","warehouse","dataWarehouseSavedQueriesLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_5__.userLogic,["user"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["views","databaseLoading"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_4__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({initialDataWarehouseSavedQueryLoading:[!0,{loadDataWarehouseSavedQueriesSuccess:()=>!1,loadDataWarehouseSavedQueriesFailure:()=>!1}],updatingDataWarehouseSavedQuery:[!1,{updateDataWarehouseSavedQuery:()=>!0,updateDataWarehouseSavedQuerySuccess:()=>!1,updateDataWarehouseSavedQueryFailure:()=>!1}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({runDataWarehouseSavedQuery:viewId=>({viewId})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref=>{let{values}=_ref;return{dataWarehouseSavedQueries:[[],{loadDataWarehouseSavedQueries:async()=>{let savedQueries=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.list();return savedQueries.results},createDataWarehouseSavedQuery:async view=>{var _newView$name;let newView=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.create(view);return _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`${null!==(_newView$name=newView.name)&&void 0!==_newView$name?_newView$name:"View"} successfully created`),[...values.dataWarehouseSavedQueries,newView]},deleteDataWarehouseSavedQuery:async viewId=>(await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.delete(viewId),values.dataWarehouseSavedQueries.filter(view=>view.id!==viewId)),updateDataWarehouseSavedQuery:async view=>{let newView=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.update(view.id,view);return values.dataWarehouseSavedQueries.map(savedQuery=>savedQuery.id===view.id?newView:savedQuery)}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref2=>{let{actions}=_ref2;return{createDataWarehouseSavedQuerySuccess:()=>{actions.loadDatabase()},updateDataWarehouseSavedQuerySuccess:()=>{actions.loadDatabase(),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View updated")},updateDataWarehouseSavedQueryError:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Failed to update view")},runDataWarehouseSavedQuery:async _ref3=>{let{viewId}=_ref3;try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.run(viewId),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Materialization started"),actions.loadDataWarehouseSavedQueries()}catch(error){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error("Failed to run materialization")}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({shouldShowEmptyState:[s=>[s.views,s.databaseLoading],(views,databaseLoading)=>views?.length==0&&!databaseLoading],dataWarehouseSavedQueryMapById:[s=>[s.dataWarehouseSavedQueries],dataWarehouseSavedQueries=>{var _dataWarehouseSavedQu;return null!==(_dataWarehouseSavedQu=dataWarehouseSavedQueries?.reduce((acc,cur)=>(acc[cur.id]=cur,acc),{}))&&void 0!==_dataWarehouseSavedQu?_dataWarehouseSavedQu:{}}],dataWarehouseSavedQueryMap:[s=>[s.dataWarehouseSavedQueries],dataWarehouseSavedQueries=>{var _dataWarehouseSavedQu2;return null!==(_dataWarehouseSavedQu2=dataWarehouseSavedQueries?.reduce((acc,cur)=>(acc[cur.name]=cur,acc),{}))&&void 0!==_dataWarehouseSavedQu2?_dataWarehouseSavedQu2:{}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.events)(_ref4=>{let{actions}=_ref4;return{afterMount:()=>{actions.loadDataWarehouseSavedQueries()}}})])},"./frontend/src/scenes/data-warehouse/settings/dataWarehouseSceneLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>dataWarehouseSceneLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/urls.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/schema.ts"),_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsx");let dataWarehouseSceneLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","warehouse","dataWarehouseSceneLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["database","posthogTables","dataWarehouseTables","databaseLoading","views","viewsMapById"],_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__.$,["dataWarehouseSavedQueryMapById","dataWarehouseSavedQueriesLoading"]],actions:[_saved_queries_dataWarehouseViewsLogic__WEBPACK_IMPORTED_MODULE_8__.$,["deleteDataWarehouseSavedQuery","updateDataWarehouseSavedQuery","updateDataWarehouseSavedQuerySuccess"],scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["loadDatabase","loadDatabaseSuccess","loadDatabaseFailure"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)(_ref=>{let{values}=_ref;return{selectRow:row=>({row}),setIsEditingSavedQuery:isEditingSavedQuery=>({isEditingSavedQuery}),toggleEditSchemaMode:inEditSchemaMode=>({inEditSchemaMode}),updateSelectedSchema:(columnKey,columnType)=>({columnKey,columnType}),saveSchema:!0,setEditSchemaIsLoading:isLoading=>({isLoading}),cancelEditSchema:()=>({database:values.database}),deleteDataWarehouseTable:tableId=>({tableId}),toggleSchemaModal:!0,setEditingView:id=>({id}),updateView:(query,types)=>({query,types})}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({selectedRow:[null,{selectRow:(_,_ref2)=>{let{row}=_ref2;return row},updateSelectedSchema:(state,_ref3)=>{let{columnKey,columnType}=_ref3;if(!state)return state;let newState={...state},column=newState?.fields[columnKey];return column?(column.type=columnType,newState):state},loadDatabaseSuccess:(state,_ref4)=>{let{database}=_ref4;if(!state||!database)return state;let table=Object.values(database.tables).find(n=>n.id===state.id);return table||state},cancelEditSchema:(state,_ref5)=>{let{database}=_ref5;if(!state||!database)return state;let table=Object.values(database.tables).find(n=>n.id===state.id);return table?JSON.parse(JSON.stringify(table)):state}}],schemaUpdates:[{},{updateSelectedSchema:(state,_ref6)=>{let{columnKey,columnType}=_ref6,newState={...state};return newState[columnKey]=columnType,newState},toggleEditSchemaMode:()=>({})}],isEditingSavedQuery:[!1,{setIsEditingSavedQuery:(_,_ref7)=>{let{isEditingSavedQuery}=_ref7;return isEditingSavedQuery}}],inEditSchemaMode:[!1,{toggleEditSchemaMode:(state,_ref8)=>{let{inEditSchemaMode}=_ref8;return void 0!==inEditSchemaMode?inEditSchemaMode:!state}}],editSchemaIsLoading:[!1,{setEditSchemaIsLoading:(_,_ref9)=>{let{isLoading}=_ref9;return isLoading},loadDatabaseSuccess:()=>!1,loadDatabaseFailure:()=>!1}],schemaModalIsOpen:[!1,{toggleSchemaModal:state=>!state}],editingView:[null,{setEditingView:(_,_ref10)=>{let{id}=_ref10;return id}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({dataWarehouseTablesBySourceType:[s=>[s.dataWarehouseTables],dataWarehouseTables=>dataWarehouseTables.reduce((acc,table)=>(table.source?(acc[table.source.source_type]||(acc[table.source.source_type]=[]),acc[table.source.source_type].push(table)):(acc.S3||(acc.S3=[]),acc.S3.push(table)),acc),{})],dataWarehouseTablesAndViews:[s=>[s.dataWarehouseTables,s.views],(dataWarehouseTables,views)=>[...dataWarehouseTables,...views]],nonMaterializedViews:[s=>[s.views,s.dataWarehouseSavedQueryMapById],(views,dataWarehouseSavedQueryMapById)=>views.filter(view=>!dataWarehouseSavedQueryMapById[view.id]?.status).map(view=>({...view,type:"view"}))],materializedViews:[s=>[s.views,s.dataWarehouseSavedQueryMapById],(views,dataWarehouseSavedQueryMapById)=>views.filter(view=>dataWarehouseSavedQueryMapById[view.id]?.status).map(view=>({...view,type:"materialized_view",last_run_at:dataWarehouseSavedQueryMapById[view.id]?.last_run_at,status:dataWarehouseSavedQueryMapById[view.id]?.status}))]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref11=>{let{actions,values}=_ref11;return{deleteDataWarehouseSavedQuery:async tableId=>{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseSavedQueries.delete(tableId),actions.selectRow(null),actions.loadDatabase(),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("View successfully deleted")},selectRow:()=>{actions.setIsEditingSavedQuery(!1)},updateDataWarehouseSavedQuerySuccess:async _ref12=>{var _payload$name;let{payload}=_ref12;_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success(`${null!==(_payload$name=payload?.name)&&void 0!==_payload$name?_payload$name:"View"} successfully updated`),payload&&kea_router__WEBPACK_IMPORTED_MODULE_2__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_6__.j.dataWarehouseView(payload.id))},saveSchema:async()=>{let schemaUpdates=values.schemaUpdates,tableId=values.selectedRow?.id;if(tableId){if(0===Object.keys(schemaUpdates).length){actions.toggleEditSchemaMode();return}actions.setEditSchemaIsLoading(!0);try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.updateSchema(tableId,schemaUpdates),actions.loadDatabase(),values.selectedRow&&posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("source schema saved",{name:values.selectedRow.name,tableType:values.selectedRow.type})}catch(e){_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.error(e.message),actions.setEditSchemaIsLoading(!1)}}},loadDatabaseSuccess:()=>{values.inEditSchemaMode&&actions.toggleEditSchemaMode()},loadDatabaseFailure:()=>{values.inEditSchemaMode&&actions.toggleEditSchemaMode()},cancelEditSchema:()=>{actions.toggleEditSchemaMode(!1)},deleteDataWarehouseTable:async _ref13=>{let{tableId}=_ref13;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.delete(tableId),actions.selectRow(null),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Table successfully deleted")},toggleSchemaModal:()=>{values.schemaModalIsOpen&&values.selectedRow&&posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("source schema viewed",{name:values.selectedRow.name,tableType:values.selectedRow.type})},updateView:_ref14=>{let{query,types}=_ref14;if(values.editingView){let newViewQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_7__.OH.HogQLQuery,query:query},oldView=values.viewsMapById[values.editingView],newView={...oldView,query:newViewQuery,types};actions.updateDataWarehouseSavedQuery(newView)}}}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref15=>{let{actions}=_ref15;return{"/data-warehouse/view/:id":_ref16=>{let{id}=_ref16;actions.setEditingView(id)},"/data-warehouse":()=>{actions.setEditingView(null)}}})])},"./frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>dataWarehouseSettingsLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),posthog_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts");__webpack_require__("./frontend/src/types.ts");let dataWarehouseSettingsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","settings","dataWarehouseSettingsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["dataWarehouseTables"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_6__.A,["loadDatabase"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteSource:source=>({source}),reloadSource:source=>({source}),sourceLoadingFinished:source=>({source}),schemaLoadingFinished:schema=>({schema}),abortAnyRunningQuery:!0,deleteSelfManagedTable:tableId=>({tableId}),refreshSelfManagedTableSchema:tableId=>({tableId})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref=>{let{cache,actions,values}=_ref;return{dataWarehouseSources:[null,{loadSources:async(_,breakpoint)=>{await breakpoint(300),actions.abortAnyRunningQuery(),cache.abortController=new AbortController;let methodOptions={signal:cache.abortController.signal},res=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.list(methodOptions);return breakpoint(),cache.abortController=null,res},updateSource:async source=>{let updatedSource=await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.update(source.id,source);return{...values.dataWarehouseSources,results:values.dataWarehouseSources?.results.map(s=>s.id===updatedSource.id?source:s)||[]}}}],schemas:[null,{updateSchema:async schema=>{var _values$dataWarehouse;let clonedSources=JSON.parse(JSON.stringify(null!==(_values$dataWarehouse=values.dataWarehouseSources?.results)&&void 0!==_values$dataWarehouse?_values$dataWarehouse:[])),sourceIndex=clonedSources.findIndex(n=>n.schemas.find(m=>m.id===schema.id)),schemaIndex=clonedSources[sourceIndex].schemas.findIndex(n=>n.id===schema.id);return clonedSources[sourceIndex].schemas[schemaIndex]=schema,actions.loadSourcesSuccess({...values.dataWarehouseSources,results:clonedSources}),await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSchemas.update(schema.id,schema),actions.loadSources(null),null}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref2=>{let{cache}=_ref2;return{dataWarehouseSourcesLoading:[!1,{loadSources:()=>!0,loadSourcesFailure:()=>null!==cache.abortController,loadSourcesSuccess:()=>null!==cache.abortController}],sourceReloadingById:[{},{reloadSource:(state,_ref3)=>{let{source}=_ref3;return{...state,[source.id]:!0}},deleteSource:(state,_ref4)=>{let{source}=_ref4;return{...state,[source.id]:!0}},sourceLoadingFinished:(state,_ref5)=>{let{source}=_ref5;return{...state,[source.id]:!1}}}],schemaReloadingById:[{},{schemaLoadingFinished:(state,_ref6)=>{let{schema}=_ref6;return{...state,[schema.id]:!1}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({selfManagedTables:[s=>[s.dataWarehouseTables],dataWarehouseTables=>dataWarehouseTables.filter(table=>!table.source)]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_2__.urlToAction)(_ref7=>{let{actions}=_ref7;return{"/data-warehouse/*":()=>{actions.loadSources(null)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref8=>{let{actions,values,cache}=_ref8;return{deleteSelfManagedTable:async _ref9=>{let{tableId}=_ref9;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.delete(tableId),actions.loadDatabase()},refreshSelfManagedTableSchema:async _ref10=>{let{tableId}=_ref10;lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.info("Updating schema..."),await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseTables.refreshSchema(tableId),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.success("Schema updated"),actions.loadDatabase()},deleteSource:async _ref11=>{let{source}=_ref11;await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.delete(source.id),actions.loadSources(null),actions.sourceLoadingFinished(source),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source deleted",{sourceType:source.source_type})},reloadSource:async _ref12=>{var _values$dataWarehouse2;let{source}=_ref12,clonedSources=JSON.parse(JSON.stringify(null!==(_values$dataWarehouse2=values.dataWarehouseSources?.results)&&void 0!==_values$dataWarehouse2?_values$dataWarehouse2:[])),sourceIndex=clonedSources.findIndex(n=>n.id===source.id);clonedSources[sourceIndex].status="Running",clonedSources[sourceIndex].schemas=clonedSources[sourceIndex].schemas.map(n=>n.should_sync?{...n,status:"Running"}:n),actions.loadSourcesSuccess({...values.dataWarehouseSources,results:clonedSources});try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.externalDataSources.reload(source.id),actions.loadSources(null),posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("source reloaded",{sourceType:source.source_type})}catch(e){e.message?lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error(e.message):lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_4__.UJ.error("Cant refresh source at this time")}actions.sourceLoadingFinished(source)},abortAnyRunningQuery:()=>{cache.abortController&&(cache.abortController.abort(),cache.abortController=null)},updateSchema:schema=>{posthog_js__WEBPACK_IMPORTED_MODULE_5__.ZP.capture("schema updated",{shouldSync:schema.should_sync,syncType:schema.sync_type})},loadSourcesSuccess:()=>{clearTimeout(cache.refreshTimeout),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("data-warehouse")&&(cache.refreshTimeout=setTimeout(()=>{actions.loadSources(null)},1e4))},loadSourcesFailure:()=>{clearTimeout(cache.refreshTimeout),kea_router__WEBPACK_IMPORTED_MODULE_2__.router.values.location.pathname.includes("data-warehouse")&&(cache.refreshTimeout=setTimeout(()=>{actions.loadSources(null)},1e4))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref13=>{let{actions}=_ref13;actions.loadSources(null)}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.beforeUnmount)(_ref14=>{let{cache}=_ref14;clearTimeout(cache.refreshTimeout)})])},"./frontend/src/scenes/data-warehouse/viewLinkLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>viewLinkLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-subscriptions@3.0.1_kea@3.1.5/node_modules/kea-subscriptions/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/api.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/data-management/database/databaseTableListLogic.ts"),_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/data-warehouse/external/dataWarehouseJoinsLogic.ts"),_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/data-warehouse/ViewLinkModal.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let NEW_VIEW_LINK={id:"new",source_table_name:void 0,joining_table_name:void 0,field_name:void 0},viewLinkLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","data-warehouse","viewLinkLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["allTables"]],actions:[scenes_data_management_database_databaseTableListLogic__WEBPACK_IMPORTED_MODULE_5__.A,["loadDatabase"],_external_dataWarehouseJoinsLogic__WEBPACK_IMPORTED_MODULE_6__.F,["loadJoins"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(_ref=>{let{values}=_ref;return{selectJoiningTable:selectedTableName=>({selectedTableName}),selectSourceTable:selectedTableName=>({selectedTableName}),selectSourceKey:selectedKey=>({selectedKey,sourceTable:values.selectedSourceTable}),selectJoiningKey:selectedKey=>({selectedKey,joiningTable:values.selectedJoiningTable}),toggleJoinTableModal:!0,toggleEditJoinModal:join=>({join}),toggleNewJoinModal:!0,saveViewLink:viewLink=>({viewLink}),deleteViewLink:(table,column)=>({table,column}),setError:error=>({error}),setFieldName:fieldName=>({fieldName}),setExperimentsOptimized:experimentsOptimized=>({experimentsOptimized}),selectExperimentsTimestampKey:experimentsTimestampKey=>({experimentsTimestampKey}),clearModalFields:!0}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({joinToEdit:[null,{submitViewLinkSuccess:()=>null,clearModalFields:()=>null,toggleEditJoinModal:(_,_ref2)=>{let{join}=_ref2;return join}}],isNewJoin:[!1,{submitViewLinkSuccess:()=>!1,toggleJoinTableModal:()=>!1,toggleEditJoinModal:()=>!1,toggleNewJoinModal:()=>!0,clearModalFields:()=>!1}],selectedSourceTableName:[null,{selectSourceTable:(_,_ref3)=>{let{selectedTableName}=_ref3;return selectedTableName},toggleEditJoinModal:(_,_ref4)=>{var _join$source_table_na;let{join}=_ref4;return null!==(_join$source_table_na=join.source_table_name)&&void 0!==_join$source_table_na?_join$source_table_na:null},clearModalFields:()=>null}],selectedJoiningTableName:[null,{selectJoiningTable:(_,_ref5)=>{let{selectedTableName}=_ref5;return selectedTableName},toggleEditJoinModal:(_,_ref6)=>{var _join$joining_table_n;let{join}=_ref6;return null!==(_join$joining_table_n=join.joining_table_name)&&void 0!==_join$joining_table_n?_join$joining_table_n:null},clearModalFields:()=>null}],selectedSourceKey:[null,{selectSourceKey:(_,_ref7)=>{let{selectedKey}=_ref7;return selectedKey},toggleEditJoinModal:(_,_ref8)=>{var _join$source_table_ke;let{join}=_ref8;return null!==(_join$source_table_ke=join.source_table_key)&&void 0!==_join$source_table_ke?_join$source_table_ke:null}}],selectedJoiningKey:[null,{selectJoiningKey:(_,_ref9)=>{let{selectedKey}=_ref9;return selectedKey},toggleEditJoinModal:(_,_ref10)=>{var _join$joining_table_k;let{join}=_ref10;return null!==(_join$joining_table_k=join.joining_table_key)&&void 0!==_join$joining_table_k?_join$joining_table_k:null}}],fieldName:["",{setFieldName:(_,_ref11)=>{let{fieldName}=_ref11;return fieldName},selectJoiningTable:(_,_ref12)=>{let{selectedTableName}=_ref12;return selectedTableName},toggleEditJoinModal:(_,_ref13)=>{var _join$field_name;let{join}=_ref13;return null!==(_join$field_name=join.field_name)&&void 0!==_join$field_name?_join$field_name:""},clearModalFields:()=>""}],experimentsOptimized:[!1,{setExperimentsOptimized:(_,_ref14)=>{let{experimentsOptimized}=_ref14;return experimentsOptimized},toggleEditJoinModal:(_,_ref15)=>{var _join$configuration$e;let{join}=_ref15;return null!==(_join$configuration$e=join.configuration?.experiments_optimized)&&void 0!==_join$configuration$e&&_join$configuration$e},clearModalFields:()=>!1}],experimentsTimestampKey:[null,{selectExperimentsTimestampKey:(_,_ref16)=>{let{experimentsTimestampKey}=_ref16;return experimentsTimestampKey},toggleEditJoinModal:(_,_ref17)=>{var _join$configuration$e2;let{join}=_ref17;return null!==(_join$configuration$e2=join.configuration?.experiments_timestamp_key)&&void 0!==_join$configuration$e2?_join$configuration$e2:null},clearModalFields:()=>null}],isJoinTableModalOpen:[!1,{toggleJoinTableModal:state=>!state,toggleEditJoinModal:()=>!0,toggleNewJoinModal:()=>!0}],error:[null,{setError:(_,_ref18)=>{let{error}=_ref18;return error},clearModalFields:()=>null}]}),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref19=>{let{actions,values}=_ref19;return{viewLink:{defaults:NEW_VIEW_LINK,errors:_ref20=>{let{source_table_name,joining_table_name}=_ref20;return{source_table_name:values.isNewJoin&&!source_table_name?"Must select a table":void 0,joining_table_name:joining_table_name?void 0:"Must select a table"}},submit:async _ref21=>{var _values$selectedSourc,_values$selectedJoini,_values$experimentsTi,_values$selectedSourc2,_values$selectedJoini2,_values$experimentsTi2;let{joining_table_name,source_table_name}=_ref21;if(values.joinToEdit?.id&&values.selectedSourceTable)try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseViewLinks.update(values.joinToEdit.id,{source_table_name:null!=source_table_name?source_table_name:values.selectedSourceTable.name,source_table_key:null!==(_values$selectedSourc=values.selectedSourceKey)&&void 0!==_values$selectedSourc?_values$selectedSourc:void 0,joining_table_name,joining_table_key:null!==(_values$selectedJoini=values.selectedJoiningKey)&&void 0!==_values$selectedJoini?_values$selectedJoini:void 0,field_name:values.fieldName,configuration:{experiments_optimized:values.experimentsOptimized,experiments_timestamp_key:null!==(_values$experimentsTi=values.experimentsTimestampKey)&&void 0!==_values$experimentsTi?_values$experimentsTi:void 0}}),actions.toggleJoinTableModal(),actions.loadJoins(),actions.loadDatabase(),posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("join updated")}catch(error){actions.setError(error.detail)}else if(values.selectedSourceTable)try{await lib_api__WEBPACK_IMPORTED_MODULE_3__.ZP.dataWarehouseViewLinks.create({source_table_name:null!=source_table_name?source_table_name:values.selectedSourceTable.name,source_table_key:null!==(_values$selectedSourc2=values.selectedSourceKey)&&void 0!==_values$selectedSourc2?_values$selectedSourc2:void 0,joining_table_name,joining_table_key:null!==(_values$selectedJoini2=values.selectedJoiningKey)&&void 0!==_values$selectedJoini2?_values$selectedJoini2:void 0,field_name:values.fieldName,configuration:{experiments_optimized:values.experimentsOptimized,experiments_timestamp_key:null!==(_values$experimentsTi2=values.experimentsTimestampKey)&&void 0!==_values$experimentsTi2?_values$experimentsTi2:void 0}}),actions.toggleJoinTableModal(),actions.loadJoins(),actions.loadDatabase(),posthog_js__WEBPACK_IMPORTED_MODULE_4__.ZP.capture("join created")}catch(error){actions.setError(error.detail)}}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref22=>{let{actions}=_ref22;return{toggleEditJoinModal:_ref23=>{let{join}=_ref23;actions.setViewLinkValues(join)},setExperimentsOptimized:_ref24=>{let{experimentsOptimized}=_ref24;experimentsOptimized||actions.selectExperimentsTimestampKey(null)},selectExperimentsTimestampKey:_ref25=>{let{experimentsTimestampKey}=_ref25;experimentsTimestampKey&&actions.setExperimentsOptimized(!0)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({selectedSourceTable:[s=>[s.selectedSourceTableName,s.allTables],(selectedSourceTableName,tables)=>tables.find(row=>row.name===selectedSourceTableName)],selectedJoiningTable:[s=>[s.selectedJoiningTableName,s.allTables],(selectedJoiningTableName,tables)=>tables.find(row=>row.name===selectedJoiningTableName)],sourceIsUsingHogQLExpression:[s=>[s.selectedSourceKey,s.selectedSourceTable],(sourceKey,sourceTable)=>{var _sourceTable$fields;if(null===sourceKey)return!1;let column=Object.values(null!==(_sourceTable$fields=sourceTable?.fields)&&void 0!==_sourceTable$fields?_sourceTable$fields:{}).find(n=>n.name==sourceKey);return!column}],joiningIsUsingHogQLExpression:[s=>[s.selectedJoiningKey,s.selectedJoiningTable],(joiningKey,joiningTable)=>{var _joiningTable$fields;if(null===joiningKey)return!1;let column=Object.values(null!==(_joiningTable$fields=joiningTable?.fields)&&void 0!==_joiningTable$fields?_joiningTable$fields:{}).find(n=>n.name==joiningKey);return!column}],tableOptions:[s=>[s.allTables],tables=>tables.map(table=>({value:table.name,label:table.name}))],sourceTableKeys:[s=>[s.selectedSourceTable],selectedSourceTable=>selectedSourceTable?Object.values(selectedSourceTable.fields).filter(column=>"view"!==column.type).map(column=>({value:column.name,label:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__.YS,{column:column})})):[]],joiningTableKeys:[s=>[s.selectedJoiningTable],selectedJoiningTable=>selectedJoiningTable?Object.values(selectedJoiningTable.fields).filter(column=>"view"!==column.type).map(column=>({value:column.name,label:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_ViewLinkModal__WEBPACK_IMPORTED_MODULE_7__.YS,{column:column})})):[]],sqlCodeSnippet:[s=>[s.selectedSourceTableName,s.selectedJoiningTableName,s.fieldName],(selectedSourceTableName,joiningTableName,fieldName)=>{if(!selectedSourceTableName||!joiningTableName)return null;let tableAlias=selectedSourceTableName[0];return`SELECT ${tableAlias}.${fieldName||""} FROM ${selectedSourceTableName} ${tableAlias}`}]}),(0,kea_subscriptions__WEBPACK_IMPORTED_MODULE_2__.Vt)(_ref26=>{let{actions}=_ref26;return{isJoinTableModalOpen:isOpen=>{isOpen||(actions.clearModalFields(),actions.resetViewLink())}}})])},"./frontend/src/scenes/dataThemeLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>ThemeName,Q:()=>dataThemeLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),_teamLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let ThemeName=_ref=>{let{id}=_ref,{themes}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)(dataThemeLogic),theme=themes?.find(theme=>theme.id===id);return theme?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span",{children:theme.name}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("span",{className:"italic",children:["No theme found for id: ",id]})},dataThemeLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","dataThemeLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[_teamLogic__WEBPACK_IMPORTED_MODULE_3__.H,["currentTeam"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({setThemes:themes=>({themes})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref2=>{let{props}=_ref2;return{themes:[props.themes||null,{loadThemes:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.dataColorThemes.list()}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({themes:{setThemes:(_,_ref3)=>{let{themes}=_ref3;return themes}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({posthogTheme:[s=>[s.themes],themes=>themes?themes.sort(theme=>theme.id).find(theme=>theme.is_global):null],defaultTheme:[s=>[s.currentTeam,s.themes,s.posthogTheme],(currentTeam,themes,posthogTheme)=>{if(!currentTeam||!themes)return null;let environmentTheme=themes.find(theme=>theme.id===currentTeam.default_data_theme);return environmentTheme||posthogTheme}],getTheme:[s=>[s.themes,s.defaultTheme],(themes,defaultTheme)=>themeId=>{let customTheme;return(Number.isInteger(themeId)&&null!=themes&&(customTheme=themes.find(theme=>theme.id===themeId)),customTheme)?customTheme.colors.reduce((theme,color,index)=>(theme[`preset-${index+1}`]=color,theme),{}):defaultTheme?defaultTheme.colors.reduce((theme,color,index)=>(theme[`preset-${index+1}`]=color,theme),{}):null}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref4=>{let{actions}=_ref4;actions.loadThemes()})])},"./frontend/src/scenes/debug/HogDebug.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>HogDebug});var clsx__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonButton/index.ts"),lib_lemon_ui_LemonDivider__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDivider/index.ts"),lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/monaco/CodeEditor.tsx"),react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/queries/nodes/DataNode/dataNodeLogic.ts"),_queries_nodes_DataNode_ElapsedTime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/queries/nodes/DataNode/ElapsedTime.tsx"),_queries_nodes_DataNode_Reload__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/queries/nodes/DataNode/Reload.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let uniqueNode=0;function HogQueryEditor(props){var _props$queryKey;let monacoDisposables=(0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)([]);(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>()=>{monacoDisposables.current.forEach(d=>d?.dispose())},[]);let[queryInput,setQueryInput]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(props.query.code);(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(()=>{setQueryInput(props.query?.code)},[props.query?.code]);let[realKey]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(()=>uniqueNode++);function saveQuery(){props.setQuery&&props.setQuery({...props.query,code:queryInput})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"space-y-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{"data-attr":"hogql-query-editor",className:(0,clsx__WEBPACK_IMPORTED_MODULE_10__.default)("flex flex-col rounded space-y-2 w-full p-2 border"),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"relative flex-1 overflow-hidden",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"resize-y overflow-hidden h-[222px]",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{queryKey:null!==(_props$queryKey=props.queryKey)&&void 0!==_props$queryKey?_props$queryKey:`new/${realKey}`,className:"border rounded overflow-hidden h-full",language:"hog",value:queryInput,onChange:v=>setQueryInput(null!=v?v:""),height:"100%",onMount:(editor,monaco)=>{monacoDisposables.current.push(editor.addAction({id:"saveAndRunPostHog",label:"Save and run query",keybindings:[monaco.KeyMod.CtrlCmd|monaco.KeyCode.Enter],run:()=>saveQuery()}))},options:{minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,fixedOverflowWidgets:!0,suggest:{showInlineDetails:!0},quickSuggestionsDelay:300}})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex flex-row",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonButton__WEBPACK_IMPORTED_MODULE_1__.J,{onClick:saveQuery,type:"primary",disabledReason:props.setQuery?void 0:"No permission to update",center:!0,fullWidth:!0,"data-attr":"hogql-query-editor-save",children:props.setQuery?"Update and run":"No permission to update"})})})]})})}function HogDebug(_ref){var _response$stdout,_response$results,_response$results2;let{query,setQuery,queryKey,debug}=_ref,dataNodeLogicProps={query,key:queryKey,dataNodeCollectionId:queryKey},{dataLoading,response:_response}=(0,kea__WEBPACK_IMPORTED_MODULE_0__.useValues)((0,_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__.M)(dataNodeLogicProps)),[tab,setTab]=(0,react__WEBPACK_IMPORTED_MODULE_5__.useState)("results");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(kea__WEBPACK_IMPORTED_MODULE_0__.BindLogic,{logic:_queries_nodes_DataNode_dataNodeLogic__WEBPACK_IMPORTED_MODULE_6__.M,props:dataNodeLogicProps,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{className:"space-y-2",children:[setQuery?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(HogQueryEditor,{query:query,setQuery:setQuery,queryKey:queryKey}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonDivider__WEBPACK_IMPORTED_MODULE_2__.p,{className:"my-4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div",{className:"flex gap-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_queries_nodes_DataNode_Reload__WEBPACK_IMPORTED_MODULE_8__.L,{})})]}):null,dataLoading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("h2",{children:"Running query..."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div",{className:"flex",children:["Time elapsed:\xa0",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_queries_nodes_DataNode_ElapsedTime__WEBPACK_IMPORTED_MODULE_7__.W,{})]})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment,{children:[debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_lemon_ui_LemonTabs__WEBPACK_IMPORTED_MODULE_3__.T,{tabs:[{label:"Results",key:"results"},{label:"Stdout",key:"stdout"},{label:"Bytecode",key:"coloredBytecode"},{label:"Raw bytecode",key:"bytecode"}],activeKey:tab,onChange:key=>setTab(String(key))}):null,"bytecode"===tab&&debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"json",value:_response?.bytecode?JSON.stringify(_response?.bytecode):"No bytecode returned with response",height:500,path:`debug/${queryKey}/hog-bytecode.json`,options:{wordWrap:"on"}}):"coloredBytecode"===tab&&debug?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"swift",value:_response?.coloredBytecode&&Array.isArray(_response?.coloredBytecode)?_response?.coloredBytecode.map(a=>a.startsWith("op.")?a:` ${a}`).join("\n"):"No bytecode returned with response",height:500,path:`debug/${queryKey}/hog-bytecode.json`,options:{wordWrap:"on",lineNumbers:nr=>String(nr-1)}}):"stdout"===tab?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"text",value:String(null!==(_response$stdout=_response?.stdout)&&void 0!==_response$stdout?_response$stdout:"No bytecode returned with response"),height:500,path:`debug/${queryKey}/hog-stdout.txt`,options:{wordWrap:"on"}}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lib_monaco_CodeEditor__WEBPACK_IMPORTED_MODULE_4__.p,{className:"border",language:"object"==typeof _response?.results?"json":"text",value:"object"==typeof _response?.results?JSON.stringify(null!==(_response$results=_response?.results)&&void 0!==_response$results?_response$results:"",null,2):String(null!==(_response$results2=_response?.results)&&void 0!==_response$results2?_response$results2:""),height:500,path:`debug/${queryKey}/hog-result.json`,options:{wordWrap:"on"}})]})]})})}},"./frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{EarlyAccessFeature:()=>EarlyAccessFeature,PersonList:()=>PersonList,scene:()=>scene});var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),clsx_m=__webpack_require__("./node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_router_lib=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),FlagSelector=__webpack_require__("./frontend/src/lib/components/FlagSelector.tsx"),NotFound=__webpack_require__("./frontend/src/lib/components/NotFound/index.tsx"),PageHeader=__webpack_require__("./frontend/src/lib/components/PageHeader.tsx"),useFeatureFlag=__webpack_require__("./frontend/src/lib/hooks/useFeatureFlag.ts"),LemonDialog=__webpack_require__("./frontend/src/lib/lemon-ui/LemonDialog/index.ts"),LemonField=__webpack_require__("./frontend/src/lib/lemon-ui/LemonField/index.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),LinkedHogFunctions=__webpack_require__("./frontend/src/scenes/pipeline/hogfunctions/list/LinkedHogFunctions.tsx"),urls=__webpack_require__("./frontend/src/scenes/urls.ts"),Query=__webpack_require__("./frontend/src/queries/Query/Query.tsx"),schema=__webpack_require__("./frontend/src/queries/schema.ts"),types=__webpack_require__("./frontend/src/types.ts"),earlyAccessFeatureLogic=__webpack_require__("./frontend/src/scenes/early-access-features/earlyAccessFeatureLogic.ts"),CodeSnippet=__webpack_require__("./frontend/src/lib/components/CodeSnippet/index.ts");let early_access_feature_demo=__webpack_require__.p+"images/early-access-feature-demo.8931b5833f0ea2443173aef331bedf12.png";var preflightLogic=__webpack_require__("./frontend/src/scenes/PreflightCheck/preflightLogic.tsx"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function InstructionsModal(_ref){let{onClose,visible,flag}=_ref,{preflight}=(0,index_esm.useValues)(preflightLogic.preflightLogic),panels=preflight?.cloud?(0,jsx_runtime.jsx)(src.JL,{className:"mt-2 bg-bg-light",defaultActiveKey:"1",panels:[{key:"1",header:"Option 1: Widget Site App",content:(0,jsx_runtime.jsxs)("div",{children:["Give your users a"," ",(0,jsx_runtime.jsx)(src.rU,{to:urls.j.pipelineNodeNew(types.We.SiteApp,preflight?.region===types.yp.EU?332:574),children:"prebuilt widget"})," ","to opt-in to features",(0,jsx_runtime.jsx)("img",{className:"max-h-full max-w-full mt-2.5",src:early_access_feature_demo})]})},{key:"2",header:"Option 2: Custom implementation",content:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("b",{children:"Opt user in"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureEnrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Opt user out"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureUnenrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Retrieve Previews"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(RetrievePreviewsInstructions,{})})]})}]}):(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("b",{children:"Opt user in"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureEnrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Opt user out"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(FeatureUnenrollInstructions,{flag:flag})}),(0,jsx_runtime.jsx)("b",{children:"Retrieve Previews"}),(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(RetrievePreviewsInstructions,{})})]});return(0,jsx_runtime.jsx)(src.fQ,{title:"How to implement opt-in feature flags",isOpen:visible,onClose:onClose,width:640,children:(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)("div",{className:"mb-2",children:"Implement manual release condition toggles to give your users the ability choose which features they want to try"}),panels]})})}function FeatureEnrollInstructions(_ref2){let{flag}=_ref2;return(0,jsx_runtime.jsx)(CodeSnippet.O,{language:CodeSnippet.S.JavaScript,wrap:!0,children:`posthog.updateEarlyAccessFeatureEnrollment("${flag}", true) `})}function FeatureUnenrollInstructions(_ref3){let{flag}=_ref3;return(0,jsx_runtime.jsx)(CodeSnippet.O,{language:CodeSnippet.S.JavaScript,wrap:!0,children:`posthog.updateEarlyAccessFeatureEnrollment("${flag}", false) `})}function RetrievePreviewsInstructions(){return(0,jsx_runtime.jsx)(CodeSnippet.O,{language:CodeSnippet.S.JavaScript,wrap:!0,children:`posthog.getEarlyAccessFeatures((previewItemData) => { // do something with early access feature @@ -374,4 +374,4 @@ MIICVjCCAb+gAwIBAgIBADANBgkqhkiG9w0BAQ0FADBIMQswCQYDVQQGEwJ1czEL AND timestamp <= '${endDate}' LIMIT 20 `},responseJSON=await api.ZP.query(query),{results}=responseJSON,events=results?.map(r=>{let distinct_id=r[0],properties=JSON.parse(r[1]),personProperties=JSON.parse(r[2]);return{distinct_id,properties,personProperties}})||[];return{...values.surveyOpenTextResults,[questionIndex]:{events}}}}}}),(0,index_esm.listeners)(_ref11=>{let{actions,values}=_ref11;return{createSurveySuccess:_ref12=>{let{survey}=_ref12;src.UJ.success((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Survey ",survey.name," created"]})),actions.loadSurveys(),kea_router_lib.router.actions.replace(urls.j.survey(survey.id)),actions.reportSurveyCreated(survey)},updateSurveySuccess:_ref13=>{let{survey}=_ref13;src.UJ.success((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Survey ",survey.name," updated"]})),actions.editingSurvey(!1),actions.reportSurveyEdited(survey),actions.loadSurveys()},duplicateSurveySuccess:()=>{actions.loadSurveys()},launchSurveySuccess:_ref14=>{let{survey}=_ref14;src.UJ.success((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Survey ",survey.name," launched"]})),actions.loadSurveys()},stopSurveySuccess:()=>{actions.loadSurveys()},resumeSurveySuccess:()=>{actions.loadSurveys()},archiveSurvey:()=>{actions.updateSurvey({archived:!0})},loadSurveySuccess:()=>{actions.loadSurveyUserStats()},resetSurveyResponseLimits:()=>{actions.setSurveyValue("responses_limit",null)},resetSurveyAdaptiveSampling:()=>{actions.setSurveyValues({response_sampling_interval:null,response_sampling_interval_type:null,response_sampling_limit:null,response_sampling_start_date:null,response_sampling_daily_limits:null})},resetTargeting:()=>{actions.setSurveyValue("linked_flag_id",constants.Uo.linked_flag_id),actions.setSurveyValue("targeting_flag_filters",constants.Uo.targeting_flag_filters),actions.setSurveyValue("linked_flag",constants.Uo.linked_flag),actions.setSurveyValue("targeting_flag",constants.Uo.targeting_flag),actions.setSurveyValue("conditions",constants.Uo.conditions),actions.setSurveyValue("remove_targeting_flag",!0),actions.setSurveyValue("responses_limit",constants.Uo.responses_limit),actions.setSurveyValues({iteration_count:constants.Uo.iteration_count,iteration_frequency_days:constants.Uo.iteration_frequency_days})},submitSurveyFailure:async()=>{(0,utils.bv)(values.flagPropertyErrors)||values.urlMatchTypeValidationError?actions.setSelectedSection(SurveyEditSection.DisplayConditions):actions.setSelectedSection(SurveyEditSection.Steps),setTimeout(()=>document.querySelector(".Field--error")?.scrollIntoView({block:"center",behavior:"smooth"}),5)}}}),(0,index_esm.reducers)({isEditingSurvey:[!1,{editingSurvey:(_,_ref15)=>{let{editing}=_ref15;return editing}}],surveyMissing:[!1,{setSurveyMissing:()=>!0}],dataCollectionType:["until_stopped",{setDataCollectionType:(_,_ref16)=>{let{dataCollectionType}=_ref16;return dataCollectionType}}],survey:[{...constants.Uo},{setDefaultForQuestionType:(state,_ref17)=>{let{idx,type,isEditingQuestion,isEditingDescription,isEditingThankYouMessage}=_ref17,question=isEditingQuestion?state.questions[idx].question:constants.Tc[type].questions[0].question,description=isEditingDescription?state.questions[idx].description:constants.Tc[type].questions[0].description,thankYouMessageHeader=isEditingThankYouMessage?state.appearance?.thankYouMessageHeader:constants.Tc[type].appearance.thankYouMessageHeader,newQuestions=[...state.questions];return newQuestions[idx]={...state.questions[idx],...constants.Tc[type].questions[0],question,description},{...state,questions:newQuestions,appearance:{...state.appearance,...constants.Tc[type].appearance,thankYouMessageHeader}}},setSurveyTemplateValues:(_,_ref18)=>{let{template}=_ref18,newTemplateSurvey={...constants.Uo,...template};return newTemplateSurvey},setQuestionBranchingType:(state,_ref19)=>{let{questionIndex,type,specificQuestionIndex}=_ref19,newQuestions=[...state.questions],question=newQuestions[questionIndex];if(type===types.kv.NextQuestion)delete question.branching;else if(type===types.kv.End)question.branching={type:types.kv.End};else if(type===types.kv.ResponseBased){if(question.type!==types.I9.Rating&&question.type!==types.I9.SingleChoice)throw Error(`Survey question type must be ${types.I9.Rating} or ${types.I9.SingleChoice}`);question.branching={type:types.kv.ResponseBased,responseValues:{}}}else type===types.kv.SpecificQuestion&&(question.branching={type:types.kv.SpecificQuestion,index:specificQuestionIndex});return newQuestions[questionIndex]=question,{...state,questions:newQuestions}},setResponseBasedBranchingForQuestion:(state,_ref20)=>{let{questionIndex,responseValue,nextStep,specificQuestionIndex}=_ref20,newQuestions=[...state.questions],question=newQuestions[questionIndex];if(question.type!==types.I9.Rating&&question.type!==types.I9.SingleChoice)throw Error(`Survey question type must be ${types.I9.Rating} or ${types.I9.SingleChoice}`);if(question.branching?.type!==types.kv.ResponseBased)throw Error(`Survey question branching type must be ${types.kv.ResponseBased}`);return"responseValues"in question.branching&&(nextStep===types.kv.NextQuestion?delete question.branching.responseValues[responseValue]:nextStep===types.kv.End?question.branching.responseValues[responseValue]=types.kv.End:nextStep===types.kv.SpecificQuestion&&(question.branching.responseValues[responseValue]=specificQuestionIndex)),newQuestions[questionIndex]=question,{...state,questions:newQuestions}},resetBranchingForQuestion:(state,_ref21)=>{let{questionIndex}=_ref21,newQuestions=[...state.questions],question=newQuestions[questionIndex];return delete question.branching,newQuestions[questionIndex]=question,{...state,questions:newQuestions}},deleteBranchingLogic:state=>{let newQuestions=[...state.questions];return newQuestions.forEach(question=>{delete question.branching}),{...state,questions:newQuestions}}}],selectedPageIndex:[0,{setSelectedPageIndex:(_,_ref22)=>{let{idx}=_ref22;return idx}}],selectedSection:[SurveyEditSection.Steps,{setSelectedSection:(_,_ref23)=>{let{section}=_ref23;return section}}],surveyRatingResultsReady:[{},{loadSurveyRatingResultsSuccess:(state,_ref24)=>{let{payload}=_ref24;return payload&&payload.hasOwnProperty("questionIndex")?{...state,[payload.questionIndex]:!0}:{...state}}}],surveyRecurringNPSResultsReady:[{},{loadSurveyRecurringNPSResultsSuccess:(state,_ref25)=>{let{payload}=_ref25;return payload&&payload.hasOwnProperty("questionIndex")?{...state,[payload.questionIndex]:!0}:{...state}}}],surveySingleChoiceResultsReady:[{},{loadSurveySingleChoiceResultsSuccess:(state,_ref26)=>{let{payload}=_ref26;return payload&&payload.hasOwnProperty("questionIndex")?{...state,[payload.questionIndex]:!0}:{...state}}}],surveyMultipleChoiceResultsReady:[{},{loadSurveyMultipleChoiceResultsSuccess:(state,_ref27)=>{let{payload}=_ref27;return payload&&payload.hasOwnProperty("questionIndex")?{...state,[payload.questionIndex]:!0}:{...state}}}],surveyOpenTextResultsReady:[{},{loadSurveyOpenTextResultsSuccess:(state,_ref28)=>{let{payload}=_ref28;return payload&&payload.hasOwnProperty("questionIndex")?{...state,[payload.questionIndex]:!0}:{...state}}}],writingHTMLDescription:[!1,{setWritingHTMLDescription:(_,_ref29)=>{let{writingHTML}=_ref29;return writingHTML}}],schedule:["once",{setSchedule:(_,_ref30)=>{let{schedule}=_ref30;return schedule}}],flagPropertyErrors:[null,{setFlagPropertyErrors:(_,_ref31)=>{let{errors}=_ref31;return errors}}]}),(0,index_esm.selectors)({isSurveyRunning:[s=>[s.survey],survey=>!!(survey.start_date&&!survey.end_date)],surveyUsesLimit:[s=>[s.survey],survey=>!!(survey.responses_limit&&survey.responses_limit>0)],surveyUsesAdaptiveLimit:[s=>[s.survey],survey=>!!(survey.response_sampling_interval&&survey.response_sampling_interval>0&&""!==survey.response_sampling_interval_type&&survey.response_sampling_limit&&survey.response_sampling_limit>0)],surveyShufflingQuestionsAvailable:[s=>[s.survey],survey=>survey.questions.length>1],showSurveyRepeatSchedule:[s=>[s.schedule],schedule=>"recurring"==schedule],descriptionContentType:[s=>[s.survey],survey=>questionIndex=>survey.questions[questionIndex].descriptionContentType],surveyRepeatedActivationAvailable:[s=>[s.survey],survey=>survey.conditions?.events?.values!=void 0&&survey.conditions?.events?.values?.length>0],hasTargetingSet:[s=>[s.survey],survey=>{let hasLinkedFlag=!!survey.linked_flag_id||survey.linked_flag&&Object.keys(survey.linked_flag).length>0,hasTargetingFlag=survey.targeting_flag&&Object.keys(survey.targeting_flag).length>0||survey.targeting_flag_filters&&Object.keys(survey.targeting_flag_filters).length>0,hasOtherConditions=survey.conditions&&Object.keys(survey.conditions).length>0;return!!hasLinkedFlag||!!hasTargetingFlag||!!hasOtherConditions}],breadcrumbs:[s=>[s.survey],survey=>[{key:sceneTypes.x.Surveys,name:"Surveys",path:urls.j.surveys()},{key:[sceneTypes.x.Survey,survey?.id||"new"],name:survey.name}]],dataTableQuery:[s=>[s.survey],survey=>{if("new"===survey.id)return null;let startDate=survey.start_date||survey.created_at;return{kind:schema.OH.DataTableNode,source:{kind:schema.OH.EventsQuery,select:["*",...survey.questions.map((q,i)=>q.type===types.I9.MultipleChoice?`coalesce(arrayStringConcat(JSONExtractArrayRaw(properties, '${getResponseField(i)}'), ', ')) -- ${q.question}`:`coalesce(JSONExtractString(properties, '${getResponseField(i)}')) -- ${q.question}`),"timestamp","person","coalesce(JSONExtractString(properties, '$lib_version')) -- Library Version","coalesce(JSONExtractString(properties, '$lib')) -- Library","coalesce(JSONExtractString(properties, '$current_url')) -- URL"],orderBy:["timestamp DESC"],where:["event == 'survey sent'"],after:startDate,properties:[{type:types.FT.Event,key:"$survey_id",operator:types.WV.Exact,value:survey.id}]},propertiesViaUrl:!0,showExport:!0,showReload:!0,showEventFilter:!1,showPropertyFilter:!0,showTimings:!1}}],targetingFlagFilters:[s=>[s.survey],survey=>survey.targeting_flag_filters?{...survey.targeting_flag_filters,groups:survey.targeting_flag_filters.groups,multivariate:null,payloads:{},super_groups:void 0}:survey.targeting_flag?.filters||void 0],urlMatchTypeValidationError:[s=>[s.survey],survey=>{if(survey.conditions?.urlMatchType===types.HI.Regex&&survey.conditions.url)try{new RegExp(survey.conditions.url)}catch(e){return e.message}return null}],surveyNPSScore:[s=>[s.surveyRatingResults],surveyRatingResults=>{if(surveyRatingResults){let questionIdx=Object.keys(surveyRatingResults)[0],questionResults=surveyRatingResults[questionIdx];if(0===questionResults.total)return"No data available";let data=questionResults.data;if(11===data.length){let promoters=data.slice(9,11).reduce((a,b)=>a+b,0),passives=data.slice(7,9).reduce((a,b)=>a+b,0),detractors=data.slice(0,7).reduce((a,b)=>a+b,0);return((promoters-detractors)/(promoters+passives+detractors)*100).toFixed(1)}}}],getBranchingDropdownValue:[s=>[s.survey],survey=>(questionIndex,question)=>{if(question.branching?.type){let{type}=question.branching;if(type===types.kv.SpecificQuestion){let nextQuestionIndex=question.branching.index;return`${types.kv.SpecificQuestion}:${nextQuestionIndex}`}return type}return questionIndex[s.survey],survey=>(questionIndex,question,response)=>{if(!question.branching||!("responseValues"in question.branching))return types.kv.NextQuestion;if(Number.isInteger(question.branching.responseValues[response])){let nextQuestionIndex=question.branching.responseValues[response];return`${types.kv.SpecificQuestion}:${nextQuestionIndex}`}return question.branching?.responseValues?.[response]?question.branching.responseValues[response]:questionIndex[s.survey],survey=>{let graph=new Map;survey.questions.forEach((question,fromIndex)=>{if(graph.has(fromIndex)||graph.set(fromIndex,new Set),question.branching?.type!==types.kv.End){if(question.branching?.type===types.kv.SpecificQuestion&&Number.isInteger(question.branching.index)){let toIndex=question.branching.index;graph.get(fromIndex).add(toIndex);return}if(question.branching?.type===types.kv.ResponseBased&&(0,utils.Kn)(question.branching?.responseValues))for(let[_,toIndex]of Object.entries(question.branching?.responseValues))Number.isInteger(toIndex)&&graph.get(fromIndex).add(toIndex);if(fromIndex[s.survey],survey=>survey.questions.some(question=>question.branching&&Object.keys(question.branching).length>0)],surveyAsInsightURL:[s=>[s.survey],survey=>{let query={kind:schema.OH.InsightVizNode,source:{kind:schema.OH.TrendsQuery,properties:[{key:"$survey_id",value:survey.id,operator:types.WV.Exact,type:types.FT.Event}],series:[{kind:schema.OH.EventsNode,event:"survey sent",name:"survey sent",math:types.vN.TotalCount},{kind:schema.OH.EventsNode,event:"survey shown",name:"survey shown",math:types.vN.TotalCount},{kind:schema.OH.EventsNode,event:"survey dismissed",name:"survey dismissed",math:types.vN.TotalCount}]}};return urls.j.insightNew(void 0,void 0,query)}]}),(0,lib.forms)(_ref32=>{let{actions,props,values}=_ref32;return{survey:{defaults:{...constants.Uo},errors:_ref33=>{let{name,questions}=_ref33;return{name:!name&&"Please enter a name.",questions:questions.map(question=>{let questionErrors={question:!question.question&&"Please enter a question label."};return question.type===types.I9.Rating?{...questionErrors,display:!question.display&&"Please choose a display type.",scale:!question.scale&&"Please choose a scale.",lowerBoundLabel:!question.lowerBoundLabel&&"Please enter a lower bound label.",upperBoundLabel:!question.upperBoundLabel&&"Please enter an upper bound label."}:question.type===types.I9.SingleChoice||question.type===types.I9.MultipleChoice?{...questionErrors,choices:question.choices.some(choice=>!choice.trim())?"Please ensure all choices are non-empty.":void 0}:questionErrors}),targeting_flag_filters:values.flagPropertyErrors,urlMatchType:values.urlMatchTypeValidationError}},submit:surveyPayload=>{if(values.hasCycle)return actions.reportSurveyCycleDetected(values.survey),src.UJ.error("Your survey contains an endless cycle. Please revisit your branching rules.");actions.editingSurvey(!1),props.id&&"new"!==props.id?actions.updateSurvey(surveyPayload):actions.createSurvey(surveyPayload)}}}}),(0,kea_router_lib.urlToAction)(_ref34=>{var _props$id;let{actions,props}=_ref34;return{[urls.j.survey(null!==(_props$id=props.id)&&void 0!==_props$id?_props$id:"new")]:(_,_ref35,__,_ref36)=>{let{edit}=_ref35,{method}=_ref36;"new"===props.id&&actions.editingSurvey(!0),"PUSH"===method&&(props.id?actions.loadSurvey():actions.resetSurvey()),edit&&actions.editingSurvey(!0)}}}),(0,kea_router_lib.actionToUrl)(_ref37=>{let{values}=_ref37;return{setSurveyTemplateValues:()=>{let hashParams=kea_router_lib.router.values.hashParams;return hashParams.fromTemplate=!0,[urls.j.survey(values.survey.id),kea_router_lib.router.values.searchParams,hashParams]},editingSurvey:_ref38=>{let{editing}=_ref38,searchParams=kea_router_lib.router.values.searchParams;return editing?searchParams.edit=!0:delete searchParams.edit,[kea_router_lib.router.values.location.pathname,kea_router_lib.router.values.searchParams,kea_router_lib.router.values.hashParams]}}}),(0,index_esm.afterMount)(_ref39=>{let{props,actions}=_ref39;"new"!==props.id&&actions.loadSurvey(),"new"===props.id&&actions.resetSurvey()})]);function sanitizeQuestions(surveyPayload){if(!surveyPayload.questions)return surveyPayload;let sanitizedThankYouHeader=sanitizeHTML(surveyPayload.appearance?.thankYouMessageHeader||""),sanitizedThankYouDescription=sanitizeHTML(surveyPayload.appearance?.thankYouMessageDescription||"");return{...surveyPayload,questions:surveyPayload.questions?.map(rawQuestion=>({...rawQuestion,description:sanitizeHTML(rawQuestion.description||""),question:sanitizeHTML(rawQuestion.question||"")})),appearance:{...surveyPayload.appearance,...sanitizedThankYouHeader&&{thankYouMessageHeader:sanitizedThankYouHeader},...sanitizedThankYouDescription&&{thankYouMessageDescription:sanitizedThankYouDescription}}}}},"./frontend/src/scenes/surveys/surveysLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Iq:()=>SurveysTabs,kT:()=>surveysLogic,zs:()=>getSurveyStatus});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),fuse_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/.pnpm/fuse.js@6.6.2/node_modules/fuse.js/dist/fuse.esm.js"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/scenes/sceneTypes.ts"),scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),scenes_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/urls.ts"),scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),_types__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/types.ts");let SurveysTabs=function(SurveysTabs){return SurveysTabs.Active="active",SurveysTabs.Yours="yours",SurveysTabs.Archived="archived",SurveysTabs.Notifications="notifications",SurveysTabs.History="history",SurveysTabs.Settings="settings",SurveysTabs}({});function getSurveyStatus(survey){return survey.start_date?survey.end_date?_types__WEBPACK_IMPORTED_MODULE_9__.mN.Complete:_types__WEBPACK_IMPORTED_MODULE_9__.mN.Running:_types__WEBPACK_IMPORTED_MODULE_9__.mN.Draft}let surveysLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","surveys","surveysLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)(()=>({values:[scenes_userLogic__WEBPACK_IMPORTED_MODULE_8__.userLogic,["hasAvailableFeature"],scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["currentTeam","currentTeamLoading"]],actions:[scenes_teamLogic__WEBPACK_IMPORTED_MODULE_6__.H,["loadCurrentTeam"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setSearchTerm:searchTerm=>({searchTerm}),setSurveysFilters:(filters,replace)=>({filters,replace}),setTab:tab=>({tab})}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref=>{let{values}=_ref;return{surveys:{__default:[],loadSurveys:async()=>{let responseSurveys=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.surveys.list();return responseSurveys.results},deleteSurvey:async id=>(await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.surveys.delete(id),values.surveys.filter(survey=>survey.id!==id)),updateSurvey:async _ref2=>{let{id,updatePayload}=_ref2,updatedSurvey=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.surveys.update(id,{...updatePayload});return values.surveys.map(survey=>survey.id===id?updatedSurvey:survey)}},surveysResponsesCount:{__default:{},loadResponsesCount:async()=>{let surveysResponsesCount=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.surveys.getResponsesCount();return surveysResponsesCount}}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)({tab:[SurveysTabs.Active,{setTab:(_,_ref3)=>{let{tab}=_ref3;return tab}}],searchTerm:{setSearchTerm:(_,_ref4)=>{let{searchTerm}=_ref4;return searchTerm}},filters:[{archived:!1,status:"any",created_by:null},{setSurveysFilters:(state,_ref5)=>{let{filters}=_ref5;return{...state,...filters}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref6=>{let{actions,values}=_ref6;return{deleteSurveySuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Survey deleted"),kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.surveys())},updateSurveySuccess:()=>{_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Survey updated"),actions.loadCurrentTeam()},setSurveysFilters:()=>{actions.loadSurveys(),actions.loadResponsesCount()},loadSurveysSuccess:()=>{actions.loadCurrentTeam()},setTab:_ref7=>{let{tab}=_ref7;actions.setSurveysFilters({...values.filters,archived:tab===SurveysTabs.Archived})}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({searchedSurveys:[selectors=>[selectors.surveys,selectors.searchTerm,selectors.filters],(surveys,searchTerm,filters)=>{let searchedSurveys=surveys;if(!searchTerm&&0===Object.keys(filters).length)return searchedSurveys;searchTerm&&(searchedSurveys=new fuse_js__WEBPACK_IMPORTED_MODULE_10__.Z(searchedSurveys,{keys:["key","name"],threshold:.3}).search(searchTerm).map(result=>result.item));let{status,created_by,archived}=filters;return"any"!==status&&(searchedSurveys=searchedSurveys.filter(survey=>getSurveyStatus(survey)===status)),created_by&&(searchedSurveys=searchedSurveys.filter(survey=>survey.created_by?.id===created_by)),searchedSurveys=archived?searchedSurveys.filter(survey=>survey.archived):searchedSurveys.filter(survey=>!survey.archived)}],breadcrumbs:[()=>[],()=>[{key:scenes_sceneTypes__WEBPACK_IMPORTED_MODULE_5__.x.Surveys,name:"Surveys",path:scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.surveys()}]],surveysStylingAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_STYLING)],globalSurveyAppearanceConfigAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_STYLING)],surveysHTMLAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_TEXT_HTML)],surveysMultipleQuestionsAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_MULTIPLE_QUESTIONS)],surveysRecurringScheduleAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_RECURRING)],surveysEventsAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_EVENTS)],surveysActionsAvailable:[s=>[s.hasAvailableFeature],hasAvailableFeature=>hasAvailableFeature(_types__WEBPACK_IMPORTED_MODULE_9__.P$.SURVEYS_ACTIONS)],showSurveysDisabledBanner:[s=>[s.currentTeam,s.currentTeamLoading,s.surveys],(currentTeam,currentTeamLoading,surveys)=>!currentTeamLoading&¤tTeam&&!currentTeam.surveys_opt_in&&surveys.some(s=>s.start_date&&!s.end_date&&s.type!==_types__WEBPACK_IMPORTED_MODULE_9__.d_.API)]}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.actionToUrl)(_ref8=>{let{values}=_ref8;return{setTab:()=>[kea_router__WEBPACK_IMPORTED_MODULE_3__.router.values.location.pathname,{...kea_router__WEBPACK_IMPORTED_MODULE_3__.router.values.searchParams,tab:values.tab}]}}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref9=>{let{actions}=_ref9;return{[scenes_urls__WEBPACK_IMPORTED_MODULE_7__.j.surveys()]:(_,_ref10)=>{let{tab}=_ref10;tab&&actions.setTab(tab)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref11=>{let{actions}=_ref11;actions.loadSurveys(),actions.loadResponsesCount()})])},"./frontend/src/scenes/teamLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>teamLogic,R:()=>isAuthenticatedTeam});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/api.ts"),lib_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),_organizationLogic__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/scenes/organizationLogic.tsx"),_projectLogic__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/scenes/projectLogic.ts"),_userLogic__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/scenes/userLogic.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let parseUpdatedAttributeName=attr=>"slack_incoming_webhook"===attr?"Webhook":"app_urls"===attr?"Authorized URLs":attr?(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.UV)(attr):"Project";function isAuthenticatedTeam(team){return!!team&&"api_token"in team}let teamLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","teamLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(()=>({actions:[_userLogic__WEBPACK_IMPORTED_MODULE_12__.userLogic,["loadUser","switchTeam"],_organizationLogic__WEBPACK_IMPORTED_MODULE_10__.p,["loadCurrentOrganization"]],values:[_projectLogic__WEBPACK_IMPORTED_MODULE_11__.K,["currentProject"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_6__.h,["featureFlags"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({deleteTeam:team=>({team}),deleteTeamSuccess:!0,deleteTeamFailure:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({teamBeingDeleted:[null,{deleteTeam:(_,_ref)=>{let{team}=_ref;return team},deleteTeamSuccess:()=>null,deleteTeamFailure:()=>null}]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_1__.loaders)(_ref2=>{let{values,actions}=_ref2;return{currentTeam:[null,{loadCurrentTeam:async()=>{if(!(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.Pc)())return null;try{return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.get("api/environments/@current")}catch{return values.currentTeam}},updateCurrentTeam:async(payload,breakpoint)=>{let message;if(!values.currentTeam)throw Error("Current team has not been loaded yet, so it cannot be updated!");payload.session_replay_config&&(payload.session_replay_config={...values.currentTeam.session_replay_config,...payload.session_replay_config});let promises=[lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.update(`api/environments/${values.currentTeam.id}`,payload),void 0];1===Object.keys(payload).length&&payload.name&&values.currentProject&&!values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.ENVIRONMENTS]&&(promises[0]=lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.update(`api/projects/${values.currentProject.id}`,{name:payload.name}));let[patchedTeam]=await Promise.all(promises);breakpoint(),actions.loadCurrentOrganization(),actions.loadUser();let updatedAttribute=1===Object.keys(payload).length?Object.keys(payload)[0]:null;return message="slack_incoming_webhook"===updatedAttribute?payload.slack_incoming_webhook?`Webhook integration enabled – you should be seeing a message on ${(0,lib_utils__WEBPACK_IMPORTED_MODULE_7__.rt)(payload.slack_incoming_webhook)}`:"Webhook integration disabled":"completed_snippet_onboarding"===updatedAttribute||"has_completed_onboarding_for"===updatedAttribute?"Congrats! You're now ready to use PostHog.":`${parseUpdatedAttributeName(updatedAttribute)} updated successfully!`,Object.keys(payload).map(property=>{lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_8__.vx.findMounted()?.actions?.reportTeamSettingChange(property,payload[property])}),window.location.pathname.match(/\/(onboarding|products)/)||lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success(message),patchedTeam},createTeam:async _ref3=>{let{name,is_demo}=_ref3;if(!values.currentProject)throw Error("Environment could not be created, because the parent project has not been loaded yet!");return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.create(`api/projects/${values.currentProject.id}/environments/`,{name,is_demo})},resetToken:async()=>await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.update(`api/environments/${values.currentTeamId}/reset_token`,{}),addProductIntent:async _ref4=>{let{product_type,intent_context}=_ref4;return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.update(`api/environments/${values.currentTeamId}/add_product_intent`,{product_type,intent_context:null!=intent_context?intent_context:void 0})},recordProductIntentOnboardingComplete:async _ref5=>{let{product_type}=_ref5;return await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.update(`api/environments/${values.currentTeamId}/complete_product_onboarding`,{product_type})}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(()=>({hasOnboardedAnyProduct:[selectors=>[selectors.currentTeam],currentTeam=>!currentTeam||!!currentTeam.completed_snippet_onboarding||!!Object.keys(currentTeam.has_completed_onboarding_for||{}).length],currentTeamId:[selectors=>[selectors.currentTeam],currentTeam=>currentTeam?currentTeam.id:null],isCurrentTeamUnavailable:[selectors=>[selectors.currentTeam,selectors.currentTeamLoading],(currentTeam,currentTeamLoading)=>(!currentTeam?.effective_membership_level||"none"===currentTeam.user_access_level)&&!currentTeamLoading],demoOnlyProject:[selectors=>[selectors.currentTeam,_organizationLogic__WEBPACK_IMPORTED_MODULE_10__.p.selectors.currentOrganization],(currentTeam,currentOrganization)=>currentTeam?.is_demo&¤tOrganization?.teams&&1==currentOrganization.teams.length||!1],funnelCorrelationConfig:[selectors=>[selectors.currentTeam],currentTeam=>currentTeam?.correlation_config||{}],timezone:[selectors=>[selectors.currentTeam],currentTeam=>currentTeam?.timezone||"UTC"],weekStartDay:[selectors=>[selectors.currentTeam],currentTeam=>currentTeam?.week_start_day||0],isTeamTokenResetAvailable:[selectors=>[selectors.currentTeam],currentTeam=>!!currentTeam?.effective_membership_level&¤tTeam.effective_membership_level>=lib_constants__WEBPACK_IMPORTED_MODULE_3__.Dk.Admin||currentTeam?.user_access_level==="admin"],testAccountFilterFrequentMistakes:[selectors=>[selectors.currentTeam],currentTeam=>{if(!currentTeam)return[];let frequentMistakes=[];for(let filter of currentTeam.test_account_filters||[])"email"===filter.key&&"event"===filter.type&&frequentMistakes.push({key:"email",type:"event",fix:"it is more common to filter email by person properties, not event properties"});return frequentMistakes}]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref6=>{let{actions}=_ref6;return{loadCurrentTeamSuccess:_ref7=>{let{currentTeam}=_ref7;currentTeam&&lib_api__WEBPACK_IMPORTED_MODULE_2__.x7.setCurrentTeamId(currentTeam.id)},createTeamSuccess:_ref8=>{let{currentTeam}=_ref8;currentTeam&&actions.switchTeam(currentTeam.id)},deleteTeam:async _ref9=>{let{team}=_ref9;try{await lib_api__WEBPACK_IMPORTED_MODULE_2__.ZP.delete(`api/environments/${team.id}`),location.reload(),actions.deleteTeamSuccess()}catch{actions.deleteTeamFailure()}},deleteTeamSuccess:()=>{lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Project has been deleted")}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref10=>{let{actions,values}=_ref10,appContext=(0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_9__.Fj)(),currentTeam=appContext?.current_team,currentProject=appContext?.current_project,switchedTeam=appContext?.switched_team;switchedTeam&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.info((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment,{children:["You've switched to\xa0project"," ",values.featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_3__.y8.ENVIRONMENTS]?`${currentProject?.name}, environment ${currentTeam?.name}`:currentTeam?.name]}),{button:{label:"Switch back",action:()=>actions.switchTeam(switchedTeam)},icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(lib_lemon_ui_icons__WEBPACK_IMPORTED_MODULE_4__._S,{})}),currentTeam?actions.loadCurrentTeamSuccess(currentTeam):actions.loadCurrentTeam()})])},"./frontend/src/scenes/trends/mathsLogic.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J$:()=>apiValueToMathType,X1:()=>PROPERTY_MATH_DEFINITIONS,YG:()=>BASE_MATH_DEFINITIONS,Yw:()=>mathTypeToApiValues,Z$:()=>MathCategory,fx:()=>mathsLogic,xo:()=>COUNT_PER_ACTOR_MATH_DEFINITIONS});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/constants.tsx"),lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/introductions/groupsAccessLogic.ts"),lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/logic/featureFlagLogic.ts"),_models_groupsModel__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/models/groupsModel.ts"),_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let MathCategory=function(MathCategory){return MathCategory[MathCategory.EventCount=0]="EventCount",MathCategory[MathCategory.SessionCount=1]="SessionCount",MathCategory[MathCategory.ActorCount=2]="ActorCount",MathCategory[MathCategory.EventCountPerActor=3]="EventCountPerActor",MathCategory[MathCategory.PropertyValue=4]="PropertyValue",MathCategory[MathCategory.HogQLExpression=5]="HogQLExpression",MathCategory}({}),FUNNEL_MATH_DEFINITIONS={[_types__WEBPACK_IMPORTED_MODULE_5__.S7.AnyMatch]:{name:"Any events match",shortName:"any event",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Any event of this type that matches the filter will count towards the funnel"}),category:MathCategory.EventCount},[_types__WEBPACK_IMPORTED_MODULE_5__.S7.FirstTimeForUser]:{name:"First event for user",shortName:"first event",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Only the first time the user performed this event will count towards the funnel, and only if it matches the event filters.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If the we are looking for pageview events to posthog.com/about, but the user's first pageview was on posthog.com, it will not match, even if they went to posthog.com/about afterwards."})]}),category:MathCategory.EventCount},[_types__WEBPACK_IMPORTED_MODULE_5__.S7.FirstTimeForUserWithFilters]:{name:"First matching event for user",shortName:"first matching event",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["The first time the user performed this event that matches the event filters will count towards the funnel.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If the we are looking for pageview events to posthog.com/about, and the user's first pageview was on posthog.com but then they navigated to posthog.com/about, it will match the pageview event from posthog.com/about"})]}),category:MathCategory.EventCount}},BASE_MATH_DEFINITIONS={[_types__WEBPACK_IMPORTED_MODULE_5__.vN.TotalCount]:{name:"Total count",shortName:"count",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Total event count. Total number of times the event was performed by any user.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If a user performs an event 3 times in the given period, it counts as 3."})]}),category:MathCategory.EventCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.UniqueUsers]:{name:"Unique users",shortName:"unique users",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Number of unique users who performed the event in the specified period.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If a single user performs an event 3 times in a given day/week/month, it counts only as 1."})]}),category:MathCategory.ActorCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.WeeklyActiveUsers]:{name:"Weekly active users",shortName:"WAUs",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Users active in the past week (7 days).",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"This is a trailing count that aggregates distinct users in the past 7 days for each day in the time series"]}),category:MathCategory.ActorCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.MonthlyActiveUsers]:{name:"Monthly active users",shortName:"MAUs",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Users active in the past month (30 days).",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"This is a trailing count that aggregates distinct users in the past 30 days for each day in the time series"]}),category:MathCategory.ActorCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.UniqueSessions]:{name:"Unique sessions",shortName:"unique sessions",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Number of unique sessions where the event was performed in the specified period.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If a single user performs an event 3 times in two separate sessions, it counts as two sessions."})]}),category:MathCategory.SessionCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.FirstTimeForUser]:{name:"First time for user",shortName:"first time",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Only the first time the user performed this event will count, and only if it matches the event filters.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If the we are looking for pageview events to posthog.com/about, but the user's first pageview was on posthog.com, it will not match, even if they went to posthog.com/about afterwards."})]}),category:MathCategory.EventCount},[_types__WEBPACK_IMPORTED_MODULE_5__.vN.FirstMatchingEventForUser]:{name:"First matching event for user",shortName:"first matching event",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["The first time the user performed this event that matches the event filters will count.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i",{children:"Example: If the we are looking for pageview events to posthog.com/about, and the user's first pageview was on posthog.com but then they navigated to posthog.com/about, it will match the pageview event from posthog.com/about"})]}),category:MathCategory.EventCount}},PROPERTY_MATH_DEFINITIONS={[_types__WEBPACK_IMPORTED_MODULE_5__.O4.Average]:{name:"Average",shortName:"average",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Average of a property value within an event or action.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 3 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 10, 12 and 20, result in 14."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.Sum]:{name:"Sum",shortName:"sum",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Sum of property values within an event or action.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 3 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 10, 12 and 20, result in 42."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.Minimum]:{name:"Minimum",shortName:"minimum",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property minimum.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 3 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 10, 12 and 20, result in 10."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.Maximum]:{name:"Maximum",shortName:"maximum",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property maximum.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 3 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 10, 12 and 20, result in 20."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.Median]:{name:"Median",shortName:"median",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property median (50th percentile).",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 100 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 101..200, result in 150."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.P90]:{name:"90th percentile",shortName:"90th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property 90th percentile.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 100 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 101..200, result in 190."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.P95]:{name:"95th percentile",shortName:"95th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property 95th percentile.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 100 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 101..200, result in 195."]}),category:MathCategory.PropertyValue},[_types__WEBPACK_IMPORTED_MODULE_5__.O4.P99]:{name:"99th percentile",shortName:"99th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Event property 99th percentile.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),"For example 100 events captured with property ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("code",{children:"amount"})," equal to 101..200, result in 199."]}),category:MathCategory.PropertyValue}},HOGQL_MATH_DEFINITIONS={[_types__WEBPACK_IMPORTED_MODULE_5__.mY.HogQL]:{name:"HogQL expression",shortName:"HogQL expression",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Aggregate with a custom HogQL expression."}),category:MathCategory.HogQLExpression}},COUNT_PER_ACTOR_MATH_DEFINITIONS={[_types__WEBPACK_IMPORTED_MODULE_5__.D7.Average]:{name:"Average",shortName:"average",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor average."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.Minimum]:{name:"Minimum",shortName:"minimum",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor minimum."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.Maximum]:{name:"Maximum",shortName:"maximum",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor maximum."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.Median]:{name:"Median",shortName:"median",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor 50th percentile."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.P90]:{name:"90th percentile",shortName:"90th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor 90th percentile."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.P95]:{name:"95th percentile",shortName:"95th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor 95th percentile."}),category:MathCategory.EventCountPerActor},[_types__WEBPACK_IMPORTED_MODULE_5__.D7.P99]:{name:"99th percentile",shortName:"99th percentile",description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:"Event count per actor 99th percentile."}),category:MathCategory.EventCountPerActor}};function mathTypeToApiValues(mathType){let[math,mathGroupTypeIndexRaw]=mathType.split("::"),mathGroupTypeIndex=void 0!==mathGroupTypeIndexRaw?parseInt(mathGroupTypeIndexRaw):NaN;return isNaN(mathGroupTypeIndex)?{math}:{math,math_group_type_index:mathGroupTypeIndex}}function apiValueToMathType(math,groupTypeIndex){let assembledMath=math||_types__WEBPACK_IMPORTED_MODULE_5__.vN.TotalCount;return"unique_group"===math&&(assembledMath+=`::${groupTypeIndex}`),assembledMath}let mathsLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","trends","mathsLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)({values:[_models_groupsModel__WEBPACK_IMPORTED_MODULE_4__.$,["groupTypes","aggregationLabel"],lib_introductions_groupsAccessLogic__WEBPACK_IMPORTED_MODULE_2__.e,["needsUpgradeForGroups","canStartUsingGroups"],lib_logic_featureFlagLogic__WEBPACK_IMPORTED_MODULE_3__.h,["featureFlags"]]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({mathDefinitions:[s=>[s.groupsMathDefinitions,s.featureFlags],(groupsMathDefinitions,featureFlags)=>{let allMathDefinitions={...BASE_MATH_DEFINITIONS,...groupsMathDefinitions,...PROPERTY_MATH_DEFINITIONS,...COUNT_PER_ACTOR_MATH_DEFINITIONS,...HOGQL_MATH_DEFINITIONS};return filterMathTypesUnderFeatureFlags(allMathDefinitions,featureFlags)}],funnelMathDefinitions:[s=>[s.featureFlags],featureFlags=>{let funnelMathDefinitions={...FUNNEL_MATH_DEFINITIONS};return filterMathTypesUnderFeatureFlags(funnelMathDefinitions,featureFlags)}],staticMathDefinitions:[s=>[s.groupsMathDefinitions,s.needsUpgradeForGroups,s.featureFlags],(groupsMathDefinitions,needsUpgradeForGroups,featureFlags)=>{let staticMathDefinitions={...BASE_MATH_DEFINITIONS,...needsUpgradeForGroups?{}:groupsMathDefinitions};return filterMathTypesUnderFeatureFlags(staticMathDefinitions,featureFlags)}],staticActorsOnlyMathDefinitions:[s=>[s.staticMathDefinitions],staticMathDefinitions=>Object.fromEntries(Object.entries(staticMathDefinitions).filter(_ref=>{let[,mathDefinition]=_ref;return mathDefinition.category===MathCategory.ActorCount}))],groupsMathDefinitions:[s=>[s.groupTypes,s.aggregationLabel],(groupTypes,aggregationLabel)=>Object.fromEntries(Array.from(groupTypes.values()).map(groupType=>[apiValueToMathType("unique_group",groupType.group_type_index),{name:`Unique ${aggregationLabel(groupType.group_type_index).plural}`,shortName:`unique ${aggregationLabel(groupType.group_type_index).plural}`,description:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Number of unique ",aggregationLabel(groupType.group_type_index).plural," who performed the event in the specified period.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("i",{children:["Example: If 7 users in a single $",aggregationLabel(groupType.group_type_index).singular," perform an event 9 times in the given period, it counts only as 1."]})]}),category:MathCategory.ActorCount}]).filter(Boolean))]})]);function filterMathTypesUnderFeatureFlags(mathDefinitions,featureFlags){let copy={...mathDefinitions};return featureFlags[lib_constants__WEBPACK_IMPORTED_MODULE_1__.y8.FIRST_TIME_FOR_USER_MATH]||delete copy[_types__WEBPACK_IMPORTED_MODULE_5__.vN.FirstTimeForUser],copy}},"./frontend/src/scenes/trends/persons-modal/PersonsModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{JY:()=>MissingPersonsAlert,AP:()=>PersonsModal_PersonsModal,Yp:()=>openPersonsModal});var injectStylesIntoStyleTag=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),PersonsModal=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/trends/persons-modal/PersonsModal.scss"),PersonsModal_default=__webpack_require__.n(PersonsModal),options={};options.insert="head",options.singleton=!1,injectStylesIntoStyleTag_default()(PersonsModal_default(),options),PersonsModal_default().locals;var posthog_icons_es=__webpack_require__("./node_modules/.pnpm/@posthog+icons@0.9.2_react-dom@18.2.0_react@18.2.0/node_modules/@posthog/icons/dist/posthog-icons.es.js"),src=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),index_esm=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),CopyToClipboard=__webpack_require__("./frontend/src/lib/components/CopyToClipboard.tsx"),exportsLogic=__webpack_require__("./frontend/src/lib/components/ExportButton/exportsLogic.ts"),PropertiesTable=__webpack_require__("./frontend/src/lib/components/PropertiesTable/index.ts"),PropertiesTimeline=__webpack_require__("./frontend/src/lib/components/PropertiesTimeline/index.ts"),icons=__webpack_require__("./frontend/src/lib/lemon-ui/icons/index.ts"),LemonTabs=__webpack_require__("./frontend/src/lib/lemon-ui/LemonTabs/index.ts"),ProfilePicture=__webpack_require__("./frontend/src/lib/lemon-ui/ProfilePicture/index.ts"),Spinner=__webpack_require__("./frontend/src/lib/lemon-ui/Spinner/Spinner.tsx"),Tooltip=__webpack_require__("./frontend/src/lib/lemon-ui/Tooltip/index.ts"),utils=__webpack_require__("./frontend/src/lib/utils.tsx"),react=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),client=__webpack_require__("./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js"),EmptyStates=__webpack_require__("./frontend/src/scenes/insights/EmptyStates/index.ts"),insights_utils=__webpack_require__("./frontend/src/scenes/insights/utils.tsx"),GroupActorDisplay=__webpack_require__("./frontend/src/scenes/persons/GroupActorDisplay.tsx"),person_utils=__webpack_require__("./frontend/src/scenes/persons/person-utils.ts"),PersonDisplay=__webpack_require__("./frontend/src/scenes/persons/PersonDisplay.tsx"),sessionPlayerModalLogic=__webpack_require__("./frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts"),teamLogic=__webpack_require__("./frontend/src/scenes/teamLogic.tsx"),DataTableExport=__webpack_require__("./frontend/src/queries/nodes/DataTable/DataTableExport.tsx"),types=__webpack_require__("./frontend/src/types.ts"),persons_modal_utils=__webpack_require__("./frontend/src/scenes/trends/persons-modal/persons-modal-utils.tsx"),personsModalLogic=__webpack_require__("./frontend/src/scenes/trends/persons-modal/personsModalLogic.ts"),jsx_runtime=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function SaveCohortModal(_ref){let{onSave,onCancel,isOpen}=_ref,[cohortTitle,setCohortTitle]=(0,react.useState)("");return(0,jsx_runtime.jsx)(src.fQ,{title:"New cohort",footer:(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:onCancel,children:"Cancel"}),(0,jsx_runtime.jsx)(src.Jp,{type:"primary",disabledReason:!cohortTitle&&"Please add a title to your cohort",onClick:()=>{onSave(cohortTitle),setCohortTitle("")},children:"Save"})]}),onClose:onCancel,isOpen:isOpen,children:(0,jsx_runtime.jsx)("div",{className:"mb-4",children:(0,jsx_runtime.jsx)(src.DF,{autoFocus:!0,placeholder:"Cohort name...",value:cohortTitle,"data-attr":"cohort-name",onChange:setCohortTitle})})})}function PersonsModal_PersonsModal(_ref){let{url:_url,urlsIndex,urls,query:_query,title,onAfterClose,inline,additionalSelect,orderBy}=_ref,[selectedUrlIndex,setSelectedUrlIndex]=(0,react.useState)(urlsIndex||0),originalUrl=(urls||[])[selectedUrlIndex]?.value||_url||"",logic=(0,personsModalLogic.D)({url:originalUrl,query:_query,additionalSelect,orderBy}),{query,actors,actorsResponseLoading,actorsResponse,errorObject,validationError,insightActorsQueryOptions,searchTerm,actorLabel,isCohortModalOpen,isModalOpen,missingActorsCount,propertiesTimelineFilterFromUrl,exploreUrl,actorsQuery}=(0,index_esm.useValues)(logic),{updateActorsQuery,setSearchTerm,saveAsCohort,setIsCohortModalOpen,closeModal,loadNextActors}=(0,index_esm.useActions)(logic),{openSessionPlayer}=(0,index_esm.useActions)(sessionPlayerModalLogic.A),{currentTeam}=(0,index_esm.useValues)(teamLogic.H),{startExport}=(0,index_esm.useActions)(exportsLogic.exportsLogic),totalActorsCount=missingActorsCount+actors.length,getTitle=(0,react.useCallback)(()=>"function"==typeof title?title((0,utils.fm)(actorLabel.plural)):(0,insights_utils.sc)(title)?"Other":title,[title,actorLabel.plural]);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(src.fQ,{title:null,isOpen:isModalOpen,onClose:closeModal,onAfterClose:onAfterClose,simple:!0,width:560,inline:inline,children:[(0,jsx_runtime.jsx)(src.fQ.Header,{children:(0,jsx_runtime.jsx)("h3",{children:getTitle()})}),(0,jsx_runtime.jsxs)("div",{className:"px-4 py-2",children:[actorsResponse&&!!missingActorsCount&&(0,jsx_runtime.jsx)(MissingPersonsAlert,{actorLabel:actorLabel,missingActorsCount:missingActorsCount}),(0,jsx_runtime.jsx)(src.DF,{type:"search",placeholder:"Search for persons by email, name, or ID",fullWidth:!0,value:searchTerm,onChange:setSearchTerm,className:"my-2"}),urls?(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,className:"mb-2",value:selectedUrlIndex,onChange:v=>{null!==v&&v>=0&&setSelectedUrlIndex(v)},options:(urls||[]).map((url,index)=>({value:index,label:url.label}))}):null,query&&(0,persons_modal_utils.Nc)(insightActorsQueryOptions,query).map(_ref2=>{var _query$key;let[key,options]=_ref2;return"breakdowns"===key?options.map((_ref3,index)=>{var _query$breakdown$inde;let{values}=_ref3;return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,className:"mb-2",value:null!==(_query$breakdown$inde=query?.breakdown?.[index])&&void 0!==_query$breakdown$inde?_query$breakdown$inde:null,onChange:v=>{let breakdown=Array.isArray(query.breakdown)?[...query.breakdown]:[];breakdown[index]=v,updateActorsQuery({breakdown})},options:values})},`${key}_${index}`)}):(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(src.Yv,{fullWidth:!0,className:"mb-2",value:null!==(_query$key=query?.[key])&&void 0!==_query$key?_query$key:null,onChange:v=>updateActorsQuery({[key]:v}),options:options})},key)}),(0,jsx_runtime.jsx)("div",{className:"flex items-center gap-2 text-muted",children:actorsResponseLoading?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(Spinner.$,{}),(0,jsx_runtime.jsxs)("span",{children:["Loading ",actorLabel.plural,"..."]})]}):(0,jsx_runtime.jsxs)("span",{children:[actorsResponse?.next||actorsResponse?.offset?"More than ":"",(0,jsx_runtime.jsxs)("b",{children:[totalActorsCount||"No"," unique"," ",(0,utils.Zi)(totalActorsCount,actorLabel.singular,actorLabel.plural,!1)]})]})})]}),(0,jsx_runtime.jsx)("div",{className:"px-4 overflow-hidden flex flex-col",children:(0,jsx_runtime.jsxs)("div",{className:"relative min-h-20 p-2 space-y-2 rounded bg-border-light overflow-y-auto mb-2",children:[errorObject?validationError?(0,jsx_runtime.jsx)(EmptyStates._f,{query:query,detail:validationError}):(0,jsx_runtime.jsx)(EmptyStates.jC,{query:query}):actors&&actors.length>0?(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:actors.map(actor=>(0,jsx_runtime.jsx)(ActorRow,{actor:actor,onOpenRecording:sessionRecording=>{openSessionPlayer(sessionRecording)},propertiesTimelineFilter:"person"==actor.type&¤tTeam?.person_on_events_querying_enabled?propertiesTimelineFilterFromUrl:void 0},actor.id))}):actorsResponseLoading?(0,jsx_runtime.jsxs)("div",{className:"space-y-3",children:[(0,jsx_runtime.jsx)(src.yW,{active:!1,className:"h-4 w-full"}),(0,jsx_runtime.jsx)(src.yW,{active:!1,className:"h-4 w-3/5"})]}):(0,jsx_runtime.jsxs)("div",{className:"text-center p-5",children:["We couldn't find any matching ",actorLabel.plural," for this data point."]}),(actorsResponse?.next||actorsResponse?.offset)&&(0,jsx_runtime.jsx)("div",{className:"m-4 flex justify-center",children:(0,jsx_runtime.jsxs)(src.Jp,{type:"primary",onClick:loadNextActors,loading:actorsResponseLoading,children:["Load more ",actorLabel.plural]})})]})}),(0,jsx_runtime.jsx)(src.fQ.Footer,{children:(0,jsx_runtime.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,jsx_runtime.jsxs)("div",{className:"flex gap-2",children:[actors.length>0&&(0,jsx_runtime.jsx)(src.Jp,{type:"secondary",onClick:()=>{startExport({export_format:types.P5.CSV,export_context:query?{source:{...actorsQuery,select:actorsQuery.select?.filter(c=>"matched_recordings"!==c),source:{...actorsQuery.source,includeRecordings:!1}}}:{path:originalUrl}})},tooltip:`Up to ${DataTableExport.yP} persons will be exported`,"data-attr":"person-modal-download-csv",children:"Download CSV"}),actors.length>0&&!(0,utils.tK)(actors[0])&&(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>setIsCohortModalOpen(!0),type:"secondary","data-attr":"person-modal-save-as-cohort",disabled:!actors.length,children:"Save as cohort"})]}),exploreUrl&&(0,jsx_runtime.jsx)(src.Jp,{type:"primary",to:exploreUrl,"data-attr":"person-modal-new-insight",onClick:()=>{closeModal()},children:"Explore"})]})})]}),(0,jsx_runtime.jsx)(SaveCohortModal,{onSave:title=>saveAsCohort(title),onCancel:()=>setIsCohortModalOpen(!1),isOpen:isCohortModalOpen})]})}function ActorRow(_ref4){let{actor,onOpenRecording,propertiesTimelineFilter}=_ref4,[expanded,setExpanded]=(0,react.useState)(!1),[tab,setTab]=(0,react.useState)("properties"),name=(0,utils.tK)(actor)?(0,GroupActorDisplay.O)(actor.group_key,actor.properties):(0,person_utils.y)(actor),matchedRecordings=actor.matched_recordings||[];return(0,jsx_runtime.jsxs)("div",{className:"relative border rounded bg-bg-light",children:[(0,jsx_runtime.jsxs)("div",{className:"flex items-center gap-2 p-2",children:[(0,jsx_runtime.jsx)(src.Jp,{noPadding:!0,active:expanded,onClick:()=>setExpanded(!expanded),icon:expanded?(0,jsx_runtime.jsx)(posthog_icons_es.IconCollapse,{}):(0,jsx_runtime.jsx)(posthog_icons_es.IconExpand,{}),title:expanded?"Show less":"Show more","data-attr":`persons-modal-expand-${actor.id}`}),(0,jsx_runtime.jsx)(ProfilePicture.Y,{name:name,size:"md"}),(0,jsx_runtime.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,utils.tK)(actor)?(0,jsx_runtime.jsx)("div",{className:"font-bold",children:(0,jsx_runtime.jsx)(GroupActorDisplay.k,{actor:actor})}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"font-bold flex items-start",children:(0,jsx_runtime.jsx)(PersonDisplay.I,{person:actor,withIcon:!1})}),actor.distinct_ids?.[0]&&(0,jsx_runtime.jsx)(CopyToClipboard.D,{explicitValue:actor.distinct_ids[0],iconStyle:{color:"var(--primary)"},iconPosition:"end",className:"text-xs text-muted-alt",children:(0,utils.mq)(actor.distinct_ids[0],32)})]})}),matchedRecordings.length&&matchedRecordings.length>0?(0,jsx_runtime.jsx)("div",{className:"shrink-0",children:(0,jsx_runtime.jsx)(src.Jp,{onClick:()=>{actor.matched_recordings&&(actor.matched_recordings?.length>1?(setExpanded(!0),setTab("recordings")):actor.matched_recordings[0].session_id&&onOpenRecording({id:actor.matched_recordings[0].session_id,matching_events:actor.matched_recordings}))},sideIcon:1===matchedRecordings.length?(0,jsx_runtime.jsx)(icons.Ud,{}):null,type:"secondary",status:matchedRecordings.length>1?"alt":void 0,size:"small",children:matchedRecordings.length>1?`${matchedRecordings.length} recordings`:"View recording"})}):null]}),expanded?(0,jsx_runtime.jsx)("div",{className:"PersonsModal__tabs bg-bg-3000 border-t rounded-b",children:(0,jsx_runtime.jsx)(LemonTabs.T,{activeKey:tab,onChange:setTab,tabs:[{key:"properties",label:"Properties",content:propertiesTimelineFilter?(0,jsx_runtime.jsx)(PropertiesTimeline.v,{actor:actor,filter:propertiesTimelineFilter}):(0,jsx_runtime.jsx)(PropertiesTable.V,{type:actor.type,properties:actor.properties})},{key:"recordings",label:"Recordings",content:(0,jsx_runtime.jsxs)("div",{className:"p-2 space-y-2 font-medium mt-1",children:[(0,jsx_runtime.jsx)("div",{className:"flex justify-between items-center px-2",children:(0,jsx_runtime.jsx)("span",{children:(0,utils.Zi)(matchedRecordings.length,"matched recording")})}),(0,jsx_runtime.jsx)("ul",{className:"space-y-px",children:matchedRecordings?.length?matchedRecordings.map((recording,i)=>(0,jsx_runtime.jsxs)(react.Fragment,{children:[(0,jsx_runtime.jsx)(src.p2,{className:"my-0"}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(src.Jp,{fullWidth:!0,onClick:()=>{recording.session_id&&onOpenRecording({id:recording.session_id,matching_events:[{events:recording.events,session_id:recording.session_id}]})},children:(0,jsx_runtime.jsxs)("div",{className:"flex flex-1 justify-between gap-2 items-center",children:[(0,jsx_runtime.jsxs)("span",{children:["View recording ",i+1]}),(0,jsx_runtime.jsx)(icons.Ud,{className:"text-xl text-muted"})]})})})]},i)):null})]})}]})}):null,null!==actor.value_at_data_point&&(0,jsx_runtime.jsx)(Tooltip.u,{title:`${name}'s value for this data point.`,children:(0,jsx_runtime.jsx)(src.Mo.Number,{count:actor.value_at_data_point,maxDigits:1/0,position:"top-right",style:{pointerEvents:"auto"}})})]})}function MissingPersonsAlert(_ref5){let{actorLabel,missingActorsCount}=_ref5;return(0,jsx_runtime.jsxs)(src.Vp,{type:"info",className:"mb-2",children:[missingActorsCount," ",missingActorsCount>1?`${actorLabel.plural} are`:`${actorLabel.singular} is`," not shown because they've been merged with those listed, or\xa0deleted."," ",(0,jsx_runtime.jsx)(src.rU,{to:"https://posthog.com/docs/how-posthog-works/queries#insights-counting-unique-persons",children:"Learn more."})]})}let openPersonsModal=props=>{let div=document.createElement("div"),root=(0,client.createRoot)(div);document.body.appendChild(div),root.render((0,jsx_runtime.jsx)(PersonsModal_PersonsModal,{...props,onAfterClose:function(){root.unmount(),div.parentNode&&div.parentNode.removeChild(div)}}))}},"./frontend/src/scenes/trends/persons-modal/persons-modal-utils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Nc:()=>cleanedInsightActorsQueryOptions,Vx:()=>pathsTitle,un:()=>funnelTitle});var lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/components/PropertyKeyInfo.tsx"),lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/components/TaxonomicFilter/types.ts"),lib_taxonomy__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/taxonomy.tsx"),lib_utils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/lib/utils.tsx"),_queries_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/types.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");let funnelTitle=props=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[props.order_type===_types__WEBPACK_IMPORTED_MODULE_5__.kO.UNORDERED?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:props.converted?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Completed ",(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Zi)(props.step,"step","steps")," "]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:["Completed ",(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Zi)(props.step-1,"step","steps"),", did not complete"," ",(0,lib_utils__WEBPACK_IMPORTED_MODULE_3__.Zi)(props.step,"step","steps")," "]})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[props.converted?"Completed":"Dropped off at"," step ",props.step," •"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__.T,{value:props.label||"",disablePopover:!0,type:lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.Events})," "]}),props?.breakdown_value?`• ${props.breakdown_value}`:""]}),pathsTitle=props=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[{completion:"Completed",dropOff:"Dropped off after",continue:"Continued after"}[props.mode]," step"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lib_components_PropertyKeyInfo__WEBPACK_IMPORTED_MODULE_0__.T,{value:props.label.replace(/(^[0-9]+_)/,"")||"",disablePopover:!0})]}),cleanedInsightActorsQueryOptions=(insightActorsQueryOptions,query)=>{let cleanedOptions=Object.entries(null!=insightActorsQueryOptions?insightActorsQueryOptions:{}).filter(_ref=>{let[,value]=_ref;return Array.isArray(value)&&!!value.length}),source=query?.source,seriesNames=(0,_queries_utils__WEBPACK_IMPORTED_MODULE_4__.kX)(source)?source.series.map(s=>s.custom_name):[],cleanedOptionsWithAdjustedSeriesNames=cleanedOptions.map(_ref2=>{let[key,value]=_ref2;return"series"===key?[key,value.map((v,index)=>{var _ref3,_seriesNames$index;return{...v,label:null!==(_ref3=null!==(_seriesNames$index=seriesNames[index])&&void 0!==_seriesNames$index?_seriesNames$index:lib_taxonomy__WEBPACK_IMPORTED_MODULE_2__.NV(v.label,lib_components_TaxonomicFilter_types__WEBPACK_IMPORTED_MODULE_1__.t.Events)?.label)&&void 0!==_ref3?_ref3:v.label}})]:[key,value]});return cleanedOptionsWithAdjustedSeriesNames}},"./frontend/src/scenes/trends/persons-modal/personsModalLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>personsModalLogic});var _posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/@posthog/lemon-ui/src/index.ts"),kea__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/utils.tsx"),lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/eventUsageLogic.ts"),scenes_insights_utils_cleanFilters__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./frontend/src/scenes/insights/utils/cleanFilters.ts"),scenes_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts"),_models_cohortsModel__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./frontend/src/models/cohortsModel.ts"),_models_groupsModel__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./frontend/src/models/groupsModel.ts"),_queries_query__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./frontend/src/queries/query.ts"),_queries_schema__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./frontend/src/queries/schema.ts");let personsModalLogic=(0,kea__WEBPACK_IMPORTED_MODULE_1__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_1__.path)(["scenes","trends","personsModalLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_1__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.actions)({setSearchTerm:search=>({search}),saveAsCohort:cohortName=>({cohortName}),resetActors:()=>!0,closeModal:()=>!0,setIsCohortModalOpen:isOpen=>({isOpen}),loadActors:_ref=>{let{url,clear,offset}=_ref;return{url,clear,offset}},loadNextActors:!0,updateQuery:query=>({query}),updateActorsQuery:query=>({query}),loadActorsQueryOptions:query=>({query})}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.connect)({values:[_models_groupsModel__WEBPACK_IMPORTED_MODULE_10__.$,["groupTypes","aggregationLabel"]],actions:[lib_utils_eventUsageLogic__WEBPACK_IMPORTED_MODULE_6__.vx,["reportPersonsModalViewed"]]}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref2=>{let{values,actions,props}=_ref2;return{actorsResponse:[null,{loadActors:async(_ref3,breakpoint)=>{let{url,clear,offset}=_ref3;if(url&&(url+="&include_recordings=true",values.searchTerm&&(url+=`&search=${values.searchTerm}`)),url&&!values.actorsQuery){let res=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.get(url);return breakpoint(),clear&&actions.resetActors(),res}if(values.actorsQuery){let response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_11__.jr)({...values.actorsQuery,limit:offset?2*offset:100,offset});breakpoint();let assembledSelectFields=values.selectFields,additionalFieldIndices=Object.values(props.additionalSelect||{}).map(field=>assembledSelectFields.indexOf(field)),newResponse={results:[{count:response.results.length,people:response.results.map(result=>{if(void 0!==result[0].group_type_index){let group={type:"group",id:result[0].id,group_key:result[0].group_key,group_type_index:result[0].group_type_index,properties:result[0].group_properties,created_at:result[0].created_at,matched_recordings:[],value_at_data_point:null};return Object.keys(props.additionalSelect||{}).forEach((field,index)=>{group[field]=result[additionalFieldIndices[index]]}),group}let person={type:"person",id:result[0].id,uuid:result[0].id,distinct_ids:result[0].distinct_ids,is_identified:result[0].is_identified,properties:result[0].properties,created_at:result[0].created_at,matched_recordings:[],value_at_data_point:null};return Object.keys(props.additionalSelect||{}).forEach((field,index)=>{person[field]=result[additionalFieldIndices[index]]}),person})}]};return newResponse.offset=response.hasMore?response.offset+response.limit:void 0,newResponse.missing_persons=response.missing_actors_count,clear&&actions.resetActors(),newResponse}return null}}],insightActorsQueryOptions:[null,{loadActorsQueryOptions:async _ref4=>{let{query}=_ref4;if(!query)return values.insightActorsQueryOptions||null;let optionsQuery={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.InsightActorsQueryOptions,source:query},response=await (0,_queries_query__WEBPACK_IMPORTED_MODULE_11__.jr)(optionsQuery,{async:!1});return Object.fromEntries(Object.entries(response).filter(_ref5=>{let[key,_]=_ref5;return _queries_schema__WEBPACK_IMPORTED_MODULE_12__.$V.includes(key)}))}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.reducers)(_ref6=>{let{props}=_ref6;return{query:[props.query,{updateQuery:(_,_ref7)=>{let{query}=_ref7;return query}}],actors:[[],{loadActorsSuccess:(state,_ref8)=>{let{actorsResponse}=_ref8;return[...state,...actorsResponse?.results?.[0]?.people||[]]},resetActors:()=>[]}],errorObject:[null,{loadActors:()=>null,loadActorsFailure:(_,_ref9)=>{let{errorObject}=_ref9;return errorObject},loadActorsSuccess:()=>null}],missingActorsCount:[0,{loadActorsSuccess:(state,_ref10)=>{let{actorsResponse}=_ref10;return state+(actorsResponse?.missing_persons||0)},resetActors:()=>0}],searchTerm:["",{setSearchTerm:(_,_ref11)=>{let{search}=_ref11;return search}}],isModalOpen:[!0,{closeModal:()=>!1}],isCohortModalOpen:[!1,{setIsCohortModalOpen:(_,_ref12)=>{let{isOpen}=_ref12;return isOpen},closeModal:()=>!1}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.listeners)(_ref13=>{let{actions,values,props}=_ref13;return{setSearchTerm:async(_,breakpoint)=>{await breakpoint(500),actions.loadActors({url:props.url,clear:!0})},saveAsCohort:async _ref14=>{let{cohortName}=_ref14,cohort=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/cohort",{is_static:!0,name:cohortName,query:values.actorsQuery});_models_cohortsModel__WEBPACK_IMPORTED_MODULE_9__.Q.actions.cohortCreated(cohort),_posthog_lemon_ui__WEBPACK_IMPORTED_MODULE_0__.UJ.success("Cohort saved",{toastId:`cohort-saved-${cohort.id}`,button:{label:"View cohort",action:()=>kea_router__WEBPACK_IMPORTED_MODULE_3__.router.actions.push(scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.cohort(cohort.id))}}),actions.setIsCohortModalOpen(!1)},loadNextActors:()=>{values.actorsResponse?.next&&actions.loadActors({url:values.actorsResponse.next}),values.actorsResponse?.offset&&actions.loadActors({offset:values.actorsResponse.offset})},loadActors:()=>{values.query&&!values.insightActorsQueryOptions&&actions.loadActorsQueryOptions(values.query)},updateActorsQuery:_ref15=>{let{query:q}=_ref15;q&&values.query&&(actions.updateQuery({...values.query,...q}),actions.loadActors({offset:0,clear:!0}))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.selectors)({actorLabel:[s=>[s.actors,s.aggregationLabel],(actors,aggregationLabel)=>{let firstResult=actors[0];return firstResult?aggregationLabel((0,lib_utils__WEBPACK_IMPORTED_MODULE_5__.tK)(firstResult)?firstResult.group_type_index:void 0):{singular:"result",plural:"results"}}],validationError:[s=>[s.errorObject],errorObject=>errorObject?.status===400||errorObject?.status===512?errorObject.detail:null],propertiesTimelineFilterFromUrl:[()=>[(_,p)=>p.url],url=>{let params=new URLSearchParams(url.split("?")[1]),eventsString=params.get("events"),actionsString=params.get("actions"),propertiesString=params.get("properties"),aggregationGroupTypeIndexString=params.get("aggregation_group_type_index"),filter={date_from:params.get("date_from")||void 0,date_to:params.get("date_to")||void 0,interval:params.get("interval")||void 0,events:eventsString?JSON.parse(eventsString):void 0,actions:actionsString?JSON.parse(actionsString):void 0,properties:propertiesString?JSON.parse(propertiesString):void 0,aggregation_group_type_index:aggregationGroupTypeIndexString?parseInt(aggregationGroupTypeIndexString):void 0,display:params.get("display")||void 0,breakdown:params.get("breakdown")||void 0,breakdown_type:params.get("breakdown_type")||void 0};return(0,scenes_insights_utils_cleanFilters__WEBPACK_IMPORTED_MODULE_7__.Ow)(filter)}],selectFields:[()=>[(_,p)=>p.additionalSelect],additionalSelect=>{let extra=Object.values(additionalSelect||{});return["actor",...extra]}],actorsQuery:[s=>[(_,p)=>p.orderBy,s.query,s.searchTerm,s.selectFields],(orderBy,query,searchTerm,selectFields)=>query?{kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.ActorsQuery,source:query,select:selectFields,orderBy:orderBy||[],search:searchTerm}:null],exploreUrl:[s=>[s.actorsQuery],actorsQuery=>{if(!actorsQuery)return null;let{select:_select,...source}=actorsQuery,query={kind:_queries_schema__WEBPACK_IMPORTED_MODULE_12__.OH.DataTableNode,source,full:!0};return scenes_urls__WEBPACK_IMPORTED_MODULE_8__.j.insightNew(void 0,void 0,query)}]}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.afterMount)(_ref16=>{let{actions,props}=_ref16;actions.loadActors({url:props.url}),actions.reportPersonsModalViewed({url:props.url,query:props.query})}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref17=>{let{cache,actions}=_ref17;return{"*":(_a,_b,_c,_ref18)=>{let{pathname}=_ref18;if(!cache.lastPathname){cache.lastPathname=pathname;return}cache.lastPathname!==pathname&&actions.closeModal()}}}),(0,kea__WEBPACK_IMPORTED_MODULE_1__.propsChanged)((_ref19,oldProps)=>{let{props,actions}=_ref19;props.url!==oldProps.url&&actions.loadActors({url:props.url,clear:!0})})])},"./frontend/src/scenes/trends/trendsDataLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>trendsDataLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),lib_dayjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/dayjs.ts"),scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/scenes/insights/insightVizDataLogic.ts"),scenes_insights_sharedUtils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/scenes/insights/sharedUtils.ts"),scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/scenes/insights/utils.tsx"),_queries_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/queries/utils.ts"),_types__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/types.ts");let POSSIBLY_FRACTIONAL_MATH_TYPES=new Set([_types__WEBPACK_IMPORTED_MODULE_6__.D7.Average].concat(Object.values(_types__WEBPACK_IMPORTED_MODULE_6__.mY)).concat(Object.values(_types__WEBPACK_IMPORTED_MODULE_6__.O4))),trendsDataLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.key)((0,scenes_insights_sharedUtils__WEBPACK_IMPORTED_MODULE_3__.bk)("all_trends")),(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(key=>["scenes","trends","trendsDataLogic",key]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.connect)(props=>({values:[(0,scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_2__.Z)(props),["querySource","insightData","insightDataLoading","series","formula","display","compareFilter","interval","enabledIntervals","breakdownFilter","showValuesOnSeries","showLabelOnSeries","showPercentStackView","supportsPercentStackView","insightFilter","trendsFilter","lifecycleFilter","stickinessFilter","isTrends","isDataWarehouseSeries","isLifecycle","isStickiness","isNonTimeSeriesDisplay","isSingleSeries","hasLegend","showLegend","vizSpecificOptions","yAxisScaleType","resultCustomizationBy","theme"]],actions:[(0,scenes_insights_insightVizDataLogic__WEBPACK_IMPORTED_MODULE_2__.Z)(props),["setInsightData","updateInsightFilter","updateBreakdownFilter","updateHiddenLegendIndexes"]]})),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({loadMoreBreakdownValues:!0,setBreakdownValuesLoading:loading=>({loading}),toggleHiddenLegendIndex:index=>({index})}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({breakdownValuesLoading:[!1,{setBreakdownValuesLoading:(_,_ref)=>{let{loading}=_ref;return loading}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)(_ref2=>{let{values}=_ref2;return{alertSeries:[s=>[s.querySource],queryNode=>null===queryNode?[]:queryNode.series],results:[s=>[s.insightData],insightData=>insightData?.result&&Array.isArray(insightData.result)?insightData.result:[]],hasBreakdownMore:[s=>[s.insightData,s.isTrends],(insightData,isTrends)=>!!isTrends&&!!insightData.hasMore],isBreakdownValid:[s=>[s.breakdownFilter],breakdownFilter=>(0,_queries_utils__WEBPACK_IMPORTED_MODULE_5__.AV)(breakdownFilter)],indexedResults:[s=>[s.results,s.display,s.lifecycleFilter],(results,display,lifecycleFilter)=>{let defaultLifecyclesOrder=["new","resurrecting","returning","dormant"],indexedResults=results.map((result,index)=>({...result,seriesIndex:index}));display&&(display===_types__WEBPACK_IMPORTED_MODULE_6__.Qb.ActionsBarValue||display===_types__WEBPACK_IMPORTED_MODULE_6__.Qb.ActionsPie)?indexedResults.sort((a,b)=>{let aValue=a.breakdown_value===scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.T8?-scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.Oq:a.breakdown_value===scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.ZA?-scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.Tu:a.aggregated_value,bValue=b.breakdown_value===scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.T8?-scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.Oq:b.breakdown_value===scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.ZA?-scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.Tu:b.aggregated_value;return bValue-aValue}):lifecycleFilter&&(lifecycleFilter.toggledLifecycles&&(indexedResults=indexedResults.filter(result=>lifecycleFilter.toggledLifecycles.includes(String(result.status)))),indexedResults=indexedResults.sort((a,b)=>defaultLifecyclesOrder.indexOf(String(b.status))-defaultLifecyclesOrder.indexOf(String(a.status))));let uniqSeries=Array.from(new Set(indexedResults.map(item=>`${item.label}_${item.action?.order}_${item?.breakdown_value}`)));return indexedResults.map((item,index)=>{let colorIndex=uniqSeries.findIndex(identifier=>identifier===`${item.label}_${item.action?.order}_${item?.breakdown_value}`);return{...item,colorIndex:colorIndex,id:index}})}],labelGroupType:[s=>[s.series,s.querySource,s.isLifecycle],(series,querySource,isLifecycle)=>{var _firstAggregationGrou;let firstAggregationGroupTypeIndex;if(isLifecycle)firstAggregationGroupTypeIndex=querySource?.aggregation_group_type_index;else if(firstAggregationGroupTypeIndex=series?.[0]?.math_group_type_index,!series?.every(eOrA=>eOrA?.math_group_type_index===firstAggregationGroupTypeIndex))return"none";return null!==(_firstAggregationGrou=firstAggregationGroupTypeIndex)&&void 0!==_firstAggregationGrou?_firstAggregationGrou:"people"}],incompletenessOffsetFromEnd:[s=>[s.results,s.interval],(results,interval)=>{if(results[0]?.days===void 0)return 0;let startDate=(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_1__.Bv)().tz("utc",!0).startOf(null!=interval?interval:"d"),startIndex=results[0].days.findIndex(day=>(0,lib_dayjs__WEBPACK_IMPORTED_MODULE_1__.Bv)(day).tz("utc",!0)>=startDate);return void 0!==startIndex&&-1!==startIndex?startIndex-results[0].days.length:0}],pieChartVizOptions:[()=>[()=>values.vizSpecificOptions],vizSpecificOptions=>vizSpecificOptions?.[_types__WEBPACK_IMPORTED_MODULE_6__.Qb.ActionsPie]],mightContainFractionalNumbers:[s=>[s.formula,s.series],(formula,series)=>!!formula||!!series&&series.some(s=>s.math&&POSSIBLY_FRACTIONAL_MATH_TYPES.has(s.math))],hiddenLegendIndexes:[s=>[s.trendsFilter,s.stickinessFilter],(trendsFilter,stickinessFilter)=>trendsFilter?.hiddenLegendIndexes||stickinessFilter?.hiddenLegendIndexes||[]],resultCustomizations:[s=>[s.trendsFilter],trendsFilter=>trendsFilter?.resultCustomizations],getTrendsColorToken:[s=>[s.resultCustomizationBy,s.resultCustomizations,s.theme],(resultCustomizationBy,resultCustomizations,theme)=>dataset=>null==theme?null:(0,scenes_insights_utils__WEBPACK_IMPORTED_MODULE_4__.BD)(resultCustomizationBy,resultCustomizations,theme,dataset)],getTrendsColor:[s=>[s.theme,s.getTrendsColorToken],(theme,getTrendsColorToken)=>dataset=>null==theme?"#000000":theme[getTrendsColorToken(dataset)]]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref3=>{let{actions,values}=_ref3;return{toggleHiddenLegendIndex:_ref4=>{let{index}=_ref4;values.insightFilter?.hiddenLegendIndexes?.includes(index)?actions.updateHiddenLegendIndexes(values.insightFilter.hiddenLegendIndexes?.filter(idx=>idx!==index)):actions.updateHiddenLegendIndexes([...values.insightFilter?.hiddenLegendIndexes||[],index])}}})])},"./frontend/src/scenes/urls.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>urls});var kea_router__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/types.ts");let urls={absolute:function(){let path=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return window.location.origin+path},default:()=>"/",project:function(id){let path=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return`/project/${id}`+path},currentProject:function(){let path=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return urls.project((0,lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_1__.ev)(),path)},dashboards:()=>"/dashboard",dashboard:(id,highlightInsightId)=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)(`/dashboard/${id}`,highlightInsightId?{highlightInsightId}:{}).url,dashboardTextTile:(id,textTileId)=>`${urls.dashboard(id)}/text-tiles/${textTileId}`,dashboardSharing:id=>`/dashboard/${id}/sharing`,dashboardSubcriptions:id=>`/dashboard/${id}/subscriptions`,dashboardSubcription:(id,subscriptionId)=>`/dashboard/${id}/subscriptions/${subscriptionId}`,sharedDashboard:shareToken=>`/shared_dashboard/${shareToken}`,createAction:()=>"/data-management/actions/new",duplicateAction:action=>{let queryParams=action?`?copy=${encodeURIComponent(JSON.stringify(action))}`:"";return`/data-management/actions/new/${queryParams}`},action:id=>`/data-management/actions/${id}`,actions:()=>"/data-management/actions",eventDefinitions:()=>"/data-management/events",eventDefinition:id=>`/data-management/events/${id}`,eventDefinitionEdit:id=>`/data-management/events/${id}/edit`,propertyDefinitions:type=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)("/data-management/properties",type?{type}:{}).url,propertyDefinition:id=>`/data-management/properties/${id}`,propertyDefinitionEdit:id=>`/data-management/properties/${id}/edit`,dataManagementHistory:()=>"/data-management/history",database:()=>"/data-management/database",activity:function(){let tab=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_types__WEBPACK_IMPORTED_MODULE_2__.ZO.ExploreEvents;return`/activity/${tab}`},event:(id,timestamp)=>`/events/${encodeURIComponent(id)}/${encodeURIComponent(timestamp)}`,ingestionWarnings:()=>"/data-management/ingestion-warnings",insights:()=>"/insights",insightNew:(type,dashboardId,query)=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)("/insights/new",dashboardId?{dashboard:dashboardId}:{},{...type?{insight:type}:{},...query?{q:"string"==typeof query?query:JSON.stringify(query)}:{}}).url,insightNewHogQL:(query,filters)=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)("/data-warehouse",{},{q:JSON.stringify({kind:"DataTableNode",full:!0,source:{kind:"HogQLQuery",query,filters}})}).url,insightEdit:id=>`/insights/${id}/edit`,insightView:(id,dashboardId,variablesOverride)=>{let params=[{param:"dashboard",value:dashboardId},{param:"variables_override",value:variablesOverride}].filter(n=>!!n.value).map(n=>`${n.param}=${encodeURIComponent(JSON.stringify(n.value))}`).join("&");return`/insights/${id}${params.length?`?${params}`:""}`},insightSubcriptions:id=>`/insights/${id}/subscriptions`,insightSubcription:(id,subscriptionId)=>`/insights/${id}/subscriptions/${subscriptionId}`,insightSharing:id=>`/insights/${id}/sharing`,savedInsights:tab=>`/insights${tab?`?tab=${tab}`:""}`,webAnalytics:()=>"/web",replay:(tab,filters,sessionRecordingId,order)=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)(tab?`/replay/${tab}`:"/replay/home",{...filters?{filters}:{},...sessionRecordingId?{sessionRecordingId}:{},...order?{order}:{}}).url,replayPlaylist:id=>`/replay/playlists/${id}`,replaySingle:id=>`/replay/${id}`,replayFilePlayback:()=>"/replay/file-playback",personByDistinctId:function(id){let encode=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return encode?`/person/${encodeURIComponent(id)}`:`/person/${id}`},personByUUID:function(uuid){let encode=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return encode?`/persons/${encodeURIComponent(uuid)}`:`/persons/${uuid}`},persons:()=>"/persons",pipelineNodeNew:(stage,id)=>`/pipeline/new/${stage}${id?`/${id}`:""}`,pipeline:tab=>`/pipeline/${tab||_types__WEBPACK_IMPORTED_MODULE_2__.J9.Overview}`,pipelineNode:(stage,id,nodeTab)=>`/pipeline/${stage.startsWith(":")||stage?.endsWith("s")?stage:`${stage}s`}/${id}${nodeTab?`/${nodeTab}`:""}`,messagingBroadcasts:()=>"/messaging/broadcasts",messagingBroadcast:id=>`/messaging/broadcasts/${id}`,messagingBroadcastNew:()=>"/messaging/broadcasts/new",messagingProviders:()=>"/messaging/providers",messagingProvider:id=>`/messaging/providers/${id}`,messagingProviderNew:template=>"/messaging/providers/new"+(template?`/${template}`:""),groups:groupTypeIndex=>`/groups/${groupTypeIndex}`,group:function(groupTypeIndex,groupKey){let encode=!(arguments.length>2)||void 0===arguments[2]||arguments[2],tab=arguments.length>3?arguments[3]:void 0;return`/groups/${groupTypeIndex}/${encode?encodeURIComponent(groupKey):groupKey}${tab?`/${tab}`:""}`},cohort:id=>`/cohorts/${id}`,cohorts:()=>"/cohorts",experiment:id=>`/experiments/${id}`,experiments:()=>"/experiments",experimentsSavedMetrics:()=>"/experiments/saved-metrics",experimentsSavedMetric:id=>`/experiments/saved-metrics/${id}`,featureFlags:tab=>`/feature_flags${tab?`?tab=${tab}`:""}`,featureFlag:id=>`/feature_flags/${id}`,featureManagement:id=>`/features${id?`/${id}`:""}`,earlyAccessFeatures:()=>"/early_access_features",earlyAccessFeature:id=>`/early_access_features/${id}`,errorTracking:()=>"/error_tracking",errorTrackingConfiguration:()=>"/error_tracking/configuration",errorTrackingIssue:id=>`/error_tracking/${id}`,surveys:tab=>`/surveys${tab?`?tab=${tab}`:""}`,survey:id=>`/surveys/${id}`,surveyTemplates:()=>"/survey_templates",customCss:()=>"/themes/custom-css",dataWarehouse:query=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)("/data-warehouse",{},query?{q:"string"==typeof query?query:JSON.stringify(query)}:{}).url,sqlEditor:()=>"/sql",dataWarehouseView:id=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)(`/data-warehouse/view/${id}`).url,dataWarehouseTable:()=>"/data-warehouse/new",dataWarehouseRedirect:kind=>`/data-warehouse/${kind}/redirect`,annotations:()=>"/data-management/annotations",annotation:id=>`/data-management/annotations/${id}`,organizationCreateFirst:()=>"/create-organization",projectCreateFirst:()=>"/organization/create-project",projectHomepage:()=>"/",max:()=>"/max",settings:function(){let section=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"project",setting=arguments.length>1?arguments[1]:void 0;return(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)(`/settings/${section}`,void 0,setting).url},organizationCreationConfirm:()=>"/organization/confirm-creation",toolbarLaunch:()=>"/toolbar",site:url=>`/site/${":url"===url?url:encodeURIComponent(url)}`,login:()=>"/login",login2FA:()=>"/login/2fa",login2FASetup:()=>"/login/2fa_setup",passwordReset:()=>"/reset",passwordResetComplete:(userUuid,token)=>`/reset/${userUuid}/${token}`,preflight:()=>"/preflight",signup:()=>"/signup",verifyEmail:function(){let userUuid=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",token=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return`/verify_email${userUuid?`/${userUuid}`:""}${token?`/${token}`:""}`},inviteSignup:id=>`/signup/${id}`,products:()=>"/products",onboarding:(productKey,stepKey,sdk)=>`/onboarding/${productKey}${stepKey?"?step="+stepKey:""}${sdk&&stepKey?"&sdk="+sdk:sdk?"?sdk="+sdk:""}`,organizationBilling:products=>`/organization/billing${products&&products.length?`?products=${products.join(",")}`:""}`,billingAuthorizationStatus:()=>"/billing/authorization_status",instanceStatus:()=>"/instance/status",instanceStaffUsers:()=>"/instance/staff_users",instanceKafkaInspector:()=>"/instance/kafka_inspector",instanceSettings:()=>"/instance/settings",instanceMetrics:()=>"/instance/metrics",asyncMigrations:()=>"/instance/async_migrations",asyncMigrationsFuture:()=>"/instance/async_migrations/future",asyncMigrationsSettings:()=>"/instance/async_migrations/settings",deadLetterQueue:()=>"/instance/dead_letter_queue",unsubscribe:()=>"/unsubscribe",integrationsRedirect:kind=>`/integrations/${kind}/callback`,shared:function(token){let exportOptions=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)(`/shared/${token}`,Object.entries(exportOptions).filter(x=>x[1]).reduce((acc,_ref)=>{let[key,val]=_ref;return{...acc,[key]:!0===val?null:val}},{})).url},embedded:(token,exportOptions)=>urls.shared(token,exportOptions).replace("/shared/","/embedded/"),debugQuery:query=>(0,kea_router__WEBPACK_IMPORTED_MODULE_0__.combineUrl)("/debug",{},query?{q:"string"==typeof query?query:JSON.stringify(query)}:{}).url,debugHog:()=>"/debug/hog",feedback:()=>"/feedback",issues:()=>"/issues",notebooks:()=>"/notebooks",notebook:shortId=>`/notebooks/${shortId}`,canvas:()=>"/canvas",moveToPostHogCloud:()=>"/move-to-cloud",heatmaps:params=>`/heatmaps${params?`?${params.startsWith("?")?params.slice(1):params}`:""}`,alert:alertId=>`/insights?tab=alerts&alert_id=${alertId}`,alerts:()=>"/insights?tab=alerts",insightAlerts:insightShortId=>`/insights/${insightShortId}/alerts`,insightAlert:(insightShortId,alertId)=>`/insights/${insightShortId}/alerts?alert_id=${alertId}`,sessionAttributionExplorer:()=>"/web/session-attribution-explorer"}},"./frontend/src/scenes/userLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{userLogic:()=>userLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-forms@3.2.0_kea@3.1.5/node_modules/kea-forms/lib/index.js"),kea_loaders__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/kea-loaders@3.0.0_kea@3.1.5/node_modules/kea-loaders/lib/index.js"),kea_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_api__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/lib/api.ts"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./frontend/src/lib/utils/getAppContext.ts"),posthog_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/.pnpm/posthog-js@1.203.1/node_modules/posthog-js/dist/module.js"),_urls__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./frontend/src/scenes/urls.ts");let userLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["scenes","userLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)(()=>({loadUser:resetOnFailure=>({resetOnFailure}),updateCurrentOrganization:(organizationId,destination)=>({organizationId,destination}),logout:!0,updateUser:(user,successCallback)=>({user,successCallback}),setUserScenePersonalisation:(scene,dashboard)=>({scene,dashboard}),updateHasSeenProductIntroFor:(productKey,value)=>({productKey,value}),switchTeam:teamId=>({teamId})})),(0,kea_forms__WEBPACK_IMPORTED_MODULE_1__.forms)(_ref=>{let{actions}=_ref;return{userDetails:{errors:_ref2=>{let{first_name,email}=_ref2;return{first_name:first_name?first_name.length>150?"This name is too long. Please keep it under 151 characters.":null:"You need to have a name.",email:email?email.length>254?"This email is too long. Please keep it under 255 characters.":null:"You need to have an email."}},submit:user=>{actions.updateUser(user)}}}}),(0,kea_loaders__WEBPACK_IMPORTED_MODULE_2__.loaders)(_ref3=>{let{values,actions}=_ref3;return{user:[null,{loadUser:async()=>{try{return await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.get("api/users/@me/")}catch(error){console.error(error),actions.loadUserFailure(error.message)}return null},updateUser:async _ref4=>{let{user,successCallback}=_ref4;if(!values.user)throw Error("Current user has not been loaded yet, so it cannot be updated!");try{let response=await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.update("api/users/@me/",user);return successCallback&&successCallback(),response}catch(error){return console.error(error),actions.updateUserFailure(error.message),values.user}},setUserScenePersonalisation:async _ref5=>{let{scene,dashboard}=_ref5;if(!values.user)throw Error("Current user has not been loaded yet, so it cannot be updated!");try{return await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.create("api/users/@me/scene_personalisation",{scene,dashboard})}catch(error){return console.error(error),actions.updateUserFailure(error.message),values.user}}}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)({userDetails:[{},{loadUserSuccess:(_,_ref6)=>{let{user}=_ref6;return{first_name:user?.first_name||"",last_name:user?.last_name||"",email:user?.email||""}},updateUserSuccess:(_,_ref7)=>{let{user}=_ref7;return{first_name:user?.first_name||"",last_name:user?.last_name||"",email:user?.email||""}}}]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref8=>{let{actions,values}=_ref8;return{logout:()=>{posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.reset(),window.location.href="/logout"},loadUserSuccess:_ref9=>{let{user}=_ref9;if(user&&user.uuid){let Sentry=window.Sentry;Sentry?.setUser({email:user.email,id:user.uuid}),posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP&&(posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.identify(user.distinct_id),posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.people.set({email:user.anonymize_data?null:user.email,realm:user.realm}),posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.register({is_demo_project:user.team?.is_demo}),user.team&&posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.group("project",user.team.uuid,{id:user.team.id,uuid:user.team.uuid,name:user.team.name,ingested_event:user.team.ingested_event,is_demo:user.team.is_demo,timezone:user.team.timezone,instance_tag:user.organization?.metadata?.instance_tag}),user.organization&&(posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.group("organization",user.organization.id,{id:user.organization.id,name:user.organization.name,slug:user.organization.slug,created_at:user.organization.created_at,available_product_features:user.organization.available_product_features,...user.organization.metadata}),user.organization.customer_id&&posthog_js__WEBPACK_IMPORTED_MODULE_7__.ZP.group("customer",user.organization.customer_id)))}},updateUserSuccess:()=>{lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.dismiss("updateUser"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.success("Preferences saved",{toastId:"updateUser"})},updateUserFailure:()=>{lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_5__.UJ.error("Error saving preferences",{toastId:"updateUser"})},updateCurrentOrganization:async(_ref10,breakpoint)=>{let{organizationId,destination}=_ref10;values.user?.organization?.id!==organizationId&&(await breakpoint(10),await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.update("api/users/@me/",{set_current_organization:organizationId}),window.location.href=destination||"/")},updateHasSeenProductIntroFor:async(_ref11,breakpoint)=>{let{productKey,value}=_ref11;await breakpoint(10),await lib_api__WEBPACK_IMPORTED_MODULE_4__.ZP.update("api/users/@me/",{has_seen_product_intro_for:{...values.user?.has_seen_product_intro_for,[productKey]:value}}).then(()=>{actions.loadUser()})},switchTeam:_ref12=>{let{teamId}=_ref12;window.location.href=_urls__WEBPACK_IMPORTED_MODULE_8__.j.project(teamId)}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({hasAvailableFeature:[s=>[s.user],user=>(feature,currentUsage)=>{let availableProductFeatures=user?.organization?.available_product_features;if(availableProductFeatures&&availableProductFeatures.length>0){let availableFeature=availableProductFeatures.find(obj=>obj.key===feature);return!!availableFeature&&(!currentUsage||!availableFeature?.limit||availableFeature?.limit>currentUsage)}return!1}],availableFeature:[s=>[s.user],user=>feature=>{let availableProductFeatures=user?.organization?.available_product_features;return availableProductFeatures&&availableProductFeatures.length>0?availableProductFeatures.find(obj=>obj.key===feature):null}],otherOrganizations:[s=>[s.user],user=>user&&user.organizations?.filter(organization=>organization.id!==user.organization?.id).sort((orgA,orgB)=>orgA.id===user?.organization?.id?-2:orgA.name.localeCompare(orgB.name))||[]],themeMode:[s=>[s.user],user=>user?.theme_mode||"light"]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref13=>{let{actions}=_ref13,preloadedUser=lib_utils_getAppContext__WEBPACK_IMPORTED_MODULE_6__.Fj()?.current_user;preloadedUser?actions.loadUserSuccess(preloadedUser):null===preloadedUser?actions.loadUserFailure("Logged out"):actions.loadUser()}),(0,kea_router__WEBPACK_IMPORTED_MODULE_3__.urlToAction)(_ref14=>{let{values}=_ref14;return{"/year_in_posthog/2023":()=>{window.POSTHOG_APP_CONTEXT?.year_in_hog_url&&(window.location.href=`${window.location.origin}${window.POSTHOG_APP_CONTEXT.year_in_hog_url}`),values.user?.uuid&&(window.location.href=`${window.location.origin}/year_in_posthog/2023/${values.user?.uuid}`)}}})])},"./frontend/src/styles/index.tsx":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./frontend/src/styles/global.scss")},"./frontend/src/toolbar/assets/Logo.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>Logo});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");function Logo(_ref){let{style}=_ref;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{style:style,fill:"none",width:"8.125em",height:"2em",viewBox:"0 0 130 32",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m12.3708 17.2868c-.2868.5737-1.1056.5737-1.3925 0l-.6861-1.3722c-.1095-.2192-.1095-.4771 0-.6963l.6861-1.3722c.2869-.5737 1.1057-.5737 1.3925 0l.6861 1.3722c.1096.2192.1096.4771 0 .6963z",fill:"var(--brand-blue)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m12.3708 25.069c-.2868.5737-1.1056.5737-1.3925 0l-.6861-1.3722c-.1095-.2191-.1095-.4771 0-.6963l.6861-1.3721c.2869-.5738 1.1057-.5738 1.3925 0l.6861 1.3721c.1096.2192.1096.4772 0 .6963z",fill:"var(--brand-blue)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m3.89258 22.1149c0-.6935.83849-1.0408 1.32888-.5504l3.56791 3.5679c.49039.4904.14308 1.3289-.55044 1.3289h-3.56791c-.42992 0-.77844-.3486-.77844-.7785zm0-3.7582c0 .2065.08201.4045.228.5505l7.32612 7.3261c.146.1459.344.228.5504.228h4.0239c.6935 0 1.0409-.8385.5505-1.3289l-11.35004-11.35c-.49039-.4904-1.32888-.1431-1.32888.5504zm0-7.7821c0 .2065.08201.4045.228.5505l15.10822 15.1082c.146.1459.344.228.5504.228h4.0239c.6935 0 1.0409-.8385.5505-1.3289l-19.13214-19.13213c-.49039-.49039-1.32888-.14307-1.32888.55044zm7.78212 0c0 .2065.082.4045.228.5505l14.0073 14.0073c.4904.4904 1.3289.143 1.3289-.5505v-4.0239c0-.2064-.082-.4044-.228-.5504l-14.0073-14.00733c-.4904-.49039-1.3289-.14307-1.3289.55044zm9.111-4.57433c-.4904-.49039-1.3289-.14307-1.3289.55044v4.02389c0 .2065.082.4045.228.5505l6.2252 6.2252c.4904.4904 1.3289.1431 1.3289-.5505v-4.0239c0-.2064-.082-.4044-.228-.5504z",fill:"var(--brand-yellow)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m36.9955 22.2104-7.3273-7.3273c-.4904-.4904-1.3288-.1431-1.3288.5504v10.2493c0 .43.3485.7785.7784.7785h11.3502c.4299 0 .7784-.3485.7784-.7785v-.9334c0-.4299-.35-.7732-.7763-.8287-1.3084-.1703-2.5321-.7679-3.4746-1.7103zm-4.9207 1.7606c-.6874 0-1.2452-.5578-1.2452-1.2451s.5578-1.2452 1.2452-1.2452c.6873 0 1.2451.5579 1.2451 1.2452s-.5578 1.2451-1.2451 1.2451z",fill:"var(--brand-key)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g",{fill:"var(--brand-blue)",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m3.89258 25.6831c0 .4299.34852.7784.77844.7784h3.56791c.69352 0 1.04083-.8385.55044-1.3289l-3.56791-3.5679c-.49039-.4904-1.32888-.1431-1.32888.5505z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m11.6747 12.4535-6.45324-6.45323c-.49039-.49039-1.32888-.14307-1.32888.55044v4.02389c0 .2065.08201.4045.228.5505l7.55412 7.5541z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m5.22146 13.7825c-.49039-.4904-1.32888-.1431-1.32888.5504v4.0239c0 .2065.08201.4045.228.5505l7.55412 7.5541v-6.2257z"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m19.4569 12.7759c0-.2064-.082-.4044-.228-.5504l-6.2252-6.22523c-.4904-.49039-1.3289-.14307-1.3289.55044v4.02389c0 .2065.082.4045.228.5505l7.5541 7.5541z",fill:"var(--brand-red)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m11.6748 26.4615h4.3464c.6935 0 1.0408-.8385.5504-1.3289l-4.8968-4.8968z",fill:"var(--brand-red)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m11.6748 12.4536v5.9032c0 .2065.082.4045.228.5505l7.5541 7.5541v-5.9032c0-.2065-.082-.4045-.228-.5505z",fill:"var(--brand-red)"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g",{fill:"var(--brand-key)",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m50.3259 23.3537h3.1979v-5.3028h2.6716c2.9347 0 4.817-1.7406 4.817-4.4324 0-2.6919-1.8823-4.43246-4.817-4.43246h-5.8695zm3.1979-8.0351v-3.4002h2.3478c1.2143 0 1.943.6476 1.943 1.7001 0 1.0524-.7287 1.7001-1.943 1.7001z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m66.7977 23.5156c3.1169 0 5.3837-2.2263 5.3837-5.2623 0-3.0359-2.2668-5.2622-5.3837-5.2622-3.1573 0-5.3837 2.2263-5.3837 5.2622 0 3.036 2.2264 5.2623 5.3837 5.2623zm-2.4287-5.2623c0-1.6191.9715-2.7323 2.4287-2.7323 1.437 0 2.4085 1.1132 2.4085 2.7323 0 1.6192-.9715 2.7324-2.4085 2.7324-1.4572 0-2.4287-1.1132-2.4287-2.7324z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m77.2989 23.5156c2.3882 0 4.0074-1.4977 4.0074-3.2585 0-4.1289-5.4849-2.7931-5.4849-4.4123 0-.4452.4655-.7286 1.1334-.7286.6882 0 1.518.425 1.7811 1.3561l2.3883-.9918c-.4656-1.4775-2.1859-2.4894-4.2706-2.4894-2.2466 0-3.6431 1.3358-3.6431 2.9347 0 3.8657 5.404 2.7931 5.404 4.392 0 .5667-.5263.9512-1.3156.9512-1.1334 0-1.9228-.7893-2.1656-1.7406l-2.3883.931c.5262 1.5383 2.0644 3.0562 4.5539 3.0562z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m88.9994 23.2525-.2024-2.5704c-.3441.1821-.7894.2429-1.1537.2429-.7286 0-1.2143-.5263-1.2143-1.437v-3.8658h2.4692v-2.4692h-2.4692v-2.955h-2.9752v2.955h-1.6192v2.4692h1.6192v4.2503c0 2.4692 1.6798 3.6431 3.8859 3.6431.6072 0 1.1739-.1012 1.6597-.2631z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m99.3728 9.18604v5.50516h-5.6266v-5.50516h-3.1979v14.16766h3.1979v-5.9302h5.6266v5.9302h3.2182v-14.16766z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m109.689 23.5156c3.117 0 5.384-2.2263 5.384-5.2623 0-3.0359-2.267-5.2622-5.384-5.2622-3.157 0-5.384 2.2263-5.384 5.2622 0 3.036 2.227 5.2623 5.384 5.2623zm-2.429-5.2623c0-1.6191.972-2.7323 2.429-2.7323 1.437 0 2.408 1.1132 2.408 2.7323 0 1.6192-.971 2.7324-2.408 2.7324-1.457 0-2.429-1.1132-2.429-2.7324z"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"m120.815 23.0299c1.113 0 2.105-.3846 2.631-1.0525v.9715c0 1.1334-.911 1.9228-2.307 1.9228-.992 0-1.862-.4858-2.004-1.3156l-2.712.425c.364 1.9228 2.328 3.2181 4.716 3.2181 3.137 0 5.222-1.8418 5.222-4.5741v-9.4721h-2.935v.8703c-.546-.6274-1.477-1.0322-2.672-1.0322-2.833 0-4.614 1.943-4.614 5.0194s1.781 5.0194 4.675 5.0194zm-1.781-5.0194c0-1.518.891-2.4895 2.267-2.4895 1.396 0 2.287.9715 2.287 2.4895 0 1.5179-.891 2.4894-2.287 2.4894-1.376 0-2.267-.9715-2.267-2.4894z"})]})]})}},"./frontend/src/toolbar/toolbarConfigLogic.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>toolbarFetch,W:()=>toolbarConfigLogic});var kea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/kea@3.1.5_react@18.2.0/node_modules/kea/lib/index.esm.js"),kea_router__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/kea-router@3.2.0_kea@3.1.5/node_modules/kea-router/lib/index.js"),lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx"),_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./frontend/src/toolbar/toolbarPosthogJS.ts"),_utils__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./frontend/src/toolbar/utils.ts");let toolbarConfigLogic=(0,kea__WEBPACK_IMPORTED_MODULE_0__.kea)([(0,kea__WEBPACK_IMPORTED_MODULE_0__.path)(["toolbar","toolbarConfigLogic"]),(0,kea__WEBPACK_IMPORTED_MODULE_0__.props)({}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.actions)({authenticate:!0,logout:!0,tokenExpired:!0,clearUserIntent:!0,showButton:!0,hideButton:!0,persistConfig:!0}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.reducers)(_ref=>{let{props}=_ref;return{props:[props],temporaryToken:[props.temporaryToken||null,{logout:()=>null,tokenExpired:()=>null,authenticate:()=>null}],actionId:[props.actionId||null,{logout:()=>null,clearUserIntent:()=>null}],experimentId:[props.experimentId||null,{logout:()=>null,clearUserIntent:()=>null}],userIntent:[props.userIntent||null,{logout:()=>null,clearUserIntent:()=>null}],buttonVisible:[!0,{showButton:()=>!0,hideButton:()=>!1,logout:()=>!1}]}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.selectors)({posthog:[s=>[s.props],props=>{var _props$posthog;return null!==(_props$posthog=props.posthog)&&void 0!==_props$posthog?_props$posthog:null}],apiURL:[s=>[s.props],props=>`${props.apiURL?.endsWith("/")?props.apiURL.replace(/\/+$/,""):props.apiURL}`],dataAttributes:[s=>[s.props],props=>{var _props$dataAttributes;return null!==(_props$dataAttributes=props.dataAttributes)&&void 0!==_props$dataAttributes?_props$dataAttributes:[]}],isAuthenticated:[s=>[s.temporaryToken],temporaryToken=>!!temporaryToken]}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.listeners)(_ref2=>{let{values,actions}=_ref2;return{authenticate:()=>{_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.capture("toolbar authenticate",{is_authenticated:values.isAuthenticated});let encodedUrl=encodeURIComponent(window.location.href);actions.persistConfig(),window.location.href=`${values.apiURL}/authorize_and_redirect/?redirect=${encodedUrl}`},logout:()=>{_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.capture("toolbar logout"),localStorage.removeItem(_utils__WEBPACK_IMPORTED_MODULE_4__.k2)},tokenExpired:()=>{_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.capture("toolbar token expired"),console.warn("PostHog Toolbar API token expired. Clearing session."),"localstorage"!==values.props.source&&lib_lemon_ui_LemonToast_LemonToast__WEBPACK_IMPORTED_MODULE_2__.UJ.error("PostHog Toolbar API token expired."),actions.persistConfig()},persistConfig:()=>{var _values$temporaryToke,_values$actionId,_values$experimentId,_values$userIntent;let toolbarParams={...values.props,temporaryToken:null!==(_values$temporaryToke=values.temporaryToken)&&void 0!==_values$temporaryToke?_values$temporaryToke:void 0,actionId:null!==(_values$actionId=values.actionId)&&void 0!==_values$actionId?_values$actionId:void 0,experimentId:null!==(_values$experimentId=values.experimentId)&&void 0!==_values$experimentId?_values$experimentId:void 0,userIntent:null!==(_values$userIntent=values.userIntent)&&void 0!==_values$userIntent?_values$userIntent:void 0,posthog:void 0,featureFlags:void 0};localStorage.setItem(_utils__WEBPACK_IMPORTED_MODULE_4__.k2,JSON.stringify(toolbarParams))}}}),(0,kea__WEBPACK_IMPORTED_MODULE_0__.afterMount)(_ref3=>{let{props,values}=_ref3;if(props.instrument){let distinctId=props.distinctId;_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.optIn(),distinctId&&_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.identify(distinctId,props.userEmail?{email:props.userEmail}:{})}_toolbar_toolbarPosthogJS__WEBPACK_IMPORTED_MODULE_3__.T.capture("toolbar loaded",{is_authenticated:values.isAuthenticated})})]);async function toolbarFetch(url){let fullUrl,method=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",payload=arguments.length>2?arguments[2]:void 0,urlConstruction=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"full",temporaryToken=toolbarConfigLogic.findMounted()?.values.temporaryToken,apiURL=toolbarConfigLogic.findMounted()?.values.apiURL;if("use-as-provided"===urlConstruction)fullUrl=url;else{let{pathname,searchParams}=(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.combineUrl)(url),params={...searchParams,temporary_token:temporaryToken};fullUrl=`${apiURL}${pathname}${(0,kea_router__WEBPACK_IMPORTED_MODULE_1__.encodeParams)(params,"?")}`}let payloadData=payload?{body:JSON.stringify(payload),headers:{"Content-Type":"application/json"}}:{},response=await fetch(fullUrl,{method,...payloadData});if(403===response.status){let responseData=await response.json();"You don't have access to the project."===responseData.detail&&toolbarConfigLogic.actions.authenticate()}return 401==response.status&&toolbarConfigLogic.actions.tokenExpired(),response}},"./frontend/src/toolbar/toolbarPosthogJS.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>useToolbarFeatureFlag,T:()=>toolbarPosthogJS});var posthog_js_lite__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/posthog-js-lite@3.0.0/node_modules/posthog-js-lite/lib/index.esm.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/react@18.2.0/node_modules/react/index.js");let DEFAULT_API_KEY="sTMFPsFhdP1Ssg",runningOnPosthog=!!window.POSTHOG_APP_CONTEXT,apiKey=runningOnPosthog?window.JS_POSTHOG_API_KEY:DEFAULT_API_KEY,apiHost=runningOnPosthog?window.JS_POSTHOG_HOST:"https://internal-t.posthog.com",toolbarPosthogJS=new posthog_js_lite__WEBPACK_IMPORTED_MODULE_0__.Z(apiKey||DEFAULT_API_KEY,{host:apiHost,defaultOptIn:!1,persistence:"memory",persistence_name:apiKey+"_toolbar",preloadFeatureFlags:!1});runningOnPosthog&&window.JS_POSTHOG_SELF_CAPTURE&&toolbarPosthogJS.debug();let useToolbarFeatureFlag=(flag,match)=>{let[flagValue,setFlagValue]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(toolbarPosthogJS.getFeatureFlag(flag));return((0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>toolbarPosthogJS.onFeatureFlag(flag,value=>setFlagValue(value)),[flag,match]),match)?flagValue===match:!!flagValue}},"./frontend/src/toolbar/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{KC:()=>getHeatMapHue,Nb:()=>TOOLBAR_ID,OS:()=>trimElement,R6:()=>function getAllClickTargets(){let startNode=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,selector=arguments.length>1?arguments[1]:void 0,targetSelector=selector||lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.cR,elements=startNode.querySelectorAll(targetSelector),allElements=[...startNode.querySelectorAll("*")],pointerElements=allElements.filter(el=>{if(lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.OK.indexOf(el.tagName.toLowerCase())>=0)return!1;let compStyles=window.getComputedStyle(el);return"pointer"===compStyles.getPropertyValue("cursor")}),shadowElements=allElements.filter(el=>el.shadowRoot&&el.getAttribute("id")!==TOOLBAR_ID).map(el=>el.shadowRoot?getAllClickTargets(el.shadowRoot,targetSelector):[]).reduce((a,b)=>[...a,...b],[]),selectedElements=[...elements,...pointerElements,...shadowElements].map(e=>trimElement(e,targetSelector)).filter(e=>e),uniqueElements=Array.from(new Set(selectedElements));return uniqueElements},bE:()=>elementToActionStep,dZ:()=>elementToQuery,gj:()=>actionStepToActionStepFormItem,k2:()=>LOCALSTORAGE_KEY,lz:()=>getBoxColors,nL:()=>inBounds,o:()=>getElementForStep,sV:()=>stepToDatabaseFormat,vf:()=>getRectForElement,wu:()=>TOOLBAR_CONTAINER_CLASS});var _medv_finder__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/.pnpm/@medv+finder@3.1.0/node_modules/@medv/finder/finder.js"),lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./frontend/src/lib/actionUtils.ts"),lib_utils_cssEscape__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./frontend/src/lib/utils/cssEscape.ts"),query_selector_shadow_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/.pnpm/query-selector-shadow-dom@1.0.0/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js");let TOOLBAR_ID="__POSTHOG_TOOLBAR__",TOOLBAR_CONTAINER_CLASS="toolbar-global-fade-container",LOCALSTORAGE_KEY="_postHogToolbarParams";function elementToQuery(element,dataAttributes){if(element){for(let{name,value}of Array.from(element.attributes)){if(!dataAttributes.includes(name))continue;let selector=`[${(0,lib_utils_cssEscape__WEBPACK_IMPORTED_MODULE_1__.Q)(name)}="${(0,lib_utils_cssEscape__WEBPACK_IMPORTED_MODULE_1__.Q)(value)}"]`;if(1==(0,query_selector_shadow_dom__WEBPACK_IMPORTED_MODULE_2__.Jp)(selector).length)return selector}try{return(0,_medv_finder__WEBPACK_IMPORTED_MODULE_3__.w)(element,{tagName:name=>!lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.Kr.includes(name),seedMinLength:5,attr:name=>name.startsWith("data-")})}catch(error){console.warn("Error while trying to find a selector for element",element,error);return}}}function elementToActionStep(element,dataAttributes){let query=elementToQuery(element,dataAttributes);return{event:"$autocapture",href:element.getAttribute("href")||"",text:function(el){if(!el.childNodes||!el.childNodes.length)return"";let elText="";return el.childNodes.forEach(child=>{3===child.nodeType&&child.textContent&&(elText+=child.textContent.trim().replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),elText}(element)||"",selector:query||"",url:window.location.protocol+"//"+window.location.host+window.location.pathname,url_matching:"exact"}}function getParent(element){let parent=element.parentNode;return parent?.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE?parent.host:parent?.nodeType===window.Node.ELEMENT_NODE?parent:null}function trimElement(element,selector){let target_selector=selector||lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.cR;if(!element)return null;let rootElement=window.document.getElementById(TOOLBAR_ID)||null;if(rootElement&&isParentOf(element,rootElement))return null;let loopElement=element;for(;;)if(1===loopElement.children.length)loopElement=loopElement.children[0];else break;for(;loopElement;){let parent=getParent(loopElement);if(!parent)break;if(loopElement.matches?.(target_selector))return loopElement;let compStyles=window.getComputedStyle(loopElement);if("pointer"===compStyles.getPropertyValue("cursor")){let parentStyles=parent?window.getComputedStyle(parent):null;if(!parentStyles||"pointer"!==parentStyles.getPropertyValue("cursor"))return loopElement}loopElement=parent}return null}function inBounds(min,value,max){return Math.max(min,Math.min(max,value))}function isParentOf(element,possibleParent){let loopElement=element;for(;loopElement;){if(loopElement!==element&&loopElement===possibleParent)return!0;loopElement=getParent(loopElement)}return!1}function getElementForStep(step,allElements){if(!step)return null;let selector="";step.selector&&(step.selector_selected||void 0===step.selector_selected)&&(selector=step.selector),step.href&&(step.href_selected||void 0===step.href_selected)&&(selector+=`[href="${(0,lib_utils_cssEscape__WEBPACK_IMPORTED_MODULE_1__.Q)(step.href)}"]`);let hasText=step.text&&step.text.trim()&&(step.text_selected||void 0===step.text_selected);if(!selector&&!hasText)return null;let elements=[];try{elements=[...(0,query_selector_shadow_dom__WEBPACK_IMPORTED_MODULE_2__.Jp)(selector||"*",document,allElements)]}catch(e){return console.error("Cannot use selector:",selector,". with exception: ",e),null}if(hasText&&step?.text){let textToSearch=step.text.toString().trim();elements=(elements=elements.filter(e=>-1===lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.Kr.indexOf(e.tagName.toLowerCase())&&e.innerText?.trim()===textToSearch&&(e.matches(lib_actionUtils__WEBPACK_IMPORTED_MODULE_0__.cR)||window.getComputedStyle(e)?.getPropertyValue("cursor")==="pointer"))).filter(e=>!elements.find(e2=>isParentOf(e2,e)))}return 1===elements.length?elements[0]:null}function getBoxColors(color){let hover=arguments.length>1&&void 0!==arguments[1]&&arguments[1],opacity=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.2;return"blue"===color?{backgroundBlendMode:"multiply",background:`hsla(240, 90%, 58%, ${opacity})`,boxShadow:`hsla(240, 90%, 27%, 0.2) 0px 3px 10px ${hover?4:0}px`,outline:"hsla(240, 90%, 58%, 0.5) solid 1px"}:"red"===color?{backgroundBlendMode:"multiply",background:`hsla(4, 90%, 58%, ${opacity})`,boxShadow:`hsla(4, 90%, 27%, 0.2) 0px 3px 10px ${hover?5:0}px`,outline:"hsla(4, 90%, 58%, 0.5) solid 1px"}:void 0}function actionStepToActionStepFormItem(step){let isNew=arguments.length>1&&void 0!==arguments[1]&&arguments[1],includedPropertyKeys=arguments.length>2?arguments[2]:void 0;if(!step)return{};if(void 0!==step.selector_selected)return step;if(isNew){let hasSelector=!!step.selector;return"a"===step.tag_name?{...step,href_selected:!0,selector_selected:hasSelector,text_selected:includedPropertyKeys?.includes("text")||!1,url_selected:includedPropertyKeys?.includes("url")||!1}:"button"===step.tag_name?{...step,text_selected:!0,selector_selected:hasSelector,href_selected:includedPropertyKeys?.includes("href")||!1,url_selected:includedPropertyKeys?.includes("url")||!1}:{...step,selector_selected:hasSelector,text_selected:includedPropertyKeys?.includes("text")||!1,url_selected:includedPropertyKeys?.includes("url")||!1,href_selected:includedPropertyKeys?.includes("href")||!1}}return{...step,url_matching:step.url_matching||"exact",href_selected:void 0!==step.href&&null!==step.href,text_selected:void 0!==step.text&&null!==step.text,selector_selected:void 0!==step.selector&&null!==step.selector,url_selected:void 0!==step.url&&null!==step.url}}function stepToDatabaseFormat(step){let{href_selected,text_selected,selector_selected,url_selected,...rest}=step;return{...rest,href:href_selected&&rest.href||null,text:text_selected&&rest.text||null,selector:selector_selected&&rest.selector||null,url:url_selected&&rest.url||null}}function getRectForElement(element){let elements=[elementToAreaRect(element)],loopElement=element;for(;1===loopElement.children.length;)elements.push(elementToAreaRect(loopElement=loopElement.children[0]));let maxArea=0,maxRect=elements[0].rect;for(let{rect,area}of elements)area>=maxArea&&(maxArea=area,maxRect=rect);return maxRect}let getZoomLevel=el=>{let zooms=[],getZoom=el=>{let zoom=window.getComputedStyle(el).getPropertyValue("zoom"),rzoom=zoom?parseFloat(zoom):1;1!==rzoom&&zooms.push(rzoom),el.parentElement?.parentElement&&getZoom(el.parentElement)};return getZoom(el),zooms.reverse(),zooms},getRect=el=>{if(!el)return{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0};let rect=el?.getBoundingClientRect(),zooms=getZoomLevel(el),rectWithZoom={bottom:zooms.reduce((a,b)=>a*b,rect.bottom),height:zooms.reduce((a,b)=>a*b,rect.height),left:zooms.reduce((a,b)=>a*b,rect.left),right:zooms.reduce((a,b)=>a*b,rect.right),top:zooms.reduce((a,b)=>a*b,rect.top),width:zooms.reduce((a,b)=>a*b,rect.width),x:zooms.reduce((a,b)=>a*b,rect.x),y:zooms.reduce((a,b)=>a*b,rect.y)};return rectWithZoom};function elementToAreaRect(element){var _rect$width,_rect$height;let rect=getRect(element);return{element,rect,area:(null!==(_rect$width=rect.width)&&void 0!==_rect$width?_rect$width:0)*(null!==(_rect$height=rect.height)&&void 0!==_rect$height?_rect$height:0)}}function getHeatMapHue(count,maxCount){return 0===maxCount?60:60-count/maxCount*40}},"./frontend/src/types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B_:()=>Realm,Bs:()=>FeatureFlagStatus,Cz:()=>NotebookNodeType,D7:()=>CountPerActorMathType,DC:()=>EntityTypes,EF:()=>SessionRecordingSidebarStacking,F4:()=>DashboardPlacement,F7:()=>ExperimentsTabs,FB:()=>TemplateAvailabilityContext,FT:()=>PropertyFilterType,G2:()=>BehavioralEventType,H$:()=>SidePanelTab,HI:()=>SurveyUrlMatchType,Hh:()=>SingleFieldDateType,I9:()=>SurveyQuestionType,Iz:()=>ChartDisplayCategory,J2:()=>FilterLogicalOperator,J9:()=>PipelineTab,KU:()=>GraphType,LO:()=>ItemMode,MK:()=>ActorGroupType,ML:()=>EarlyAccessFeatureTabs,MN:()=>DashboardMode,Md:()=>ProductKey,NE:()=>BehavioralLifecycleType,O4:()=>PropertyMathType,OU:()=>GroupMathType,P$:()=>AvailableFeature,P5:()=>ExporterFormat,P6:()=>InsightColor,Qb:()=>ChartDisplayType,Qo:()=>SnapshotSourceType,S7:()=>FunnelMathType,SR:()=>RolloutConditionType,Sm:()=>SessionRecordingUsageType,Ts:()=>LayoutView,U6:()=>isDataWarehouseFilter,Ui:()=>FunnelVizType,VI:()=>FunnelCorrelationType,Vb:()=>BehavioralCohortType,W:()=>CookielessServerHashMode,WV:()=>PropertyOperator,We:()=>PipelineStage,XF:()=>FunnelStepReference,Xy:()=>TimeUnitType,Yy:()=>SessionPlayerState,ZO:()=>ActivityTab,_L:()=>SDKTag,_z:()=>Resource,aI:()=>FeatureFlagReleaseType,ak:()=>PluginInstallationType,bZ:()=>NotebookTarget,cB:()=>PathType,cr:()=>SessionRecordingSidebarTab,d_:()=>SurveyType,dc:()=>AnnotationScope,dw:()=>InsightType,e2:()=>BATCH_EXPORT_SERVICE_NAMES,fL:()=>ScheduledChangeOperationType,fS:()=>FunnelCorrelationResultsType,hP:()=>FunnelPathType,ih:()=>FunnelConversionWindowTimeUnit,il:()=>PipelineNodeTab,j3:()=>PersonsTabType,jc:()=>ActivityScope,kO:()=>StepOrderValue,kR:()=>DateOperatorType,kv:()=>SurveyQuestionBranchingType,l4:()=>SavedInsightsTabs,lh:()=>SDKKey,ll:()=>PropertyDefinitionType,mN:()=>ProgressStatus,mY:()=>HogQLMathType,nE:()=>EarlyAccessFeatureStage,q9:()=>BreakdownAttributionType,si:()=>HogWatcherState,uJ:()=>ValueOptionType,uS:()=>PropertyType,uW:()=>EventDefinitionType,uv:()=>AccessLevel,vN:()=>BaseMathType,w7:()=>FilterableInspectorListItemTypes,wz:()=>PropertyDefinitionState,xW:()=>RetentionPeriod,yd:()=>ReplayTabs,yp:()=>Region,zD:()=>manualLinkSources});let AvailableFeature=function(AvailableFeature){return AvailableFeature.APPS="apps",AvailableFeature.SLACK_INTEGRATION="slack_integration",AvailableFeature.MICROSOFT_TEAMS_INTEGRATION="microsoft_teams_integration",AvailableFeature.DISCORD_INTEGRATION="discord_integration",AvailableFeature.ZAPIER="zapier",AvailableFeature.APP_METRICS="app_metrics",AvailableFeature.DATA_PIPELINES="data_pipelines",AvailableFeature.RECORDINGS_PLAYLISTS="recordings_playlists",AvailableFeature.SESSION_REPLAY_DATA_RETENTION="session_replay_data_retention",AvailableFeature.CONSOLE_LOGS="console_logs",AvailableFeature.RECORDINGS_PERFORMANCE="recordings_performance",AvailableFeature.SESSION_REPLAY_NETWORK_PAYLOADS="session_replay_network_payloads",AvailableFeature.RECORDINGS_FILE_EXPORT="recordings_file_export",AvailableFeature.SESSION_REPLAY_SAMPLING="session_replay_sampling",AvailableFeature.REPLAY_RECORDING_DURATION_MINIMUM="replay_recording_duration_minimum",AvailableFeature.REPLAY_FEATURE_FLAG_BASED_RECORDING="replay_feature_flag_based_recording",AvailableFeature.REPLAY_MASK_SENSITIVE_DATA="replay_mask_sensitive_data",AvailableFeature.REPLAY_SHARING_EMBEDDING="replay_sharing_embedding",AvailableFeature.REPLAY_PRODUCT_ANALYTICS_INTEGRATION="replay_product_analytics_integration",AvailableFeature.REPLAY_FILTER_PERSON_PROPERTIES="replay_filter_person_properties",AvailableFeature.REPLAY_FILTER_EVENTS="replay_filter_events",AvailableFeature.REPLAY_DOM_EXPLORER="replay_dom_explorer",AvailableFeature.WORKS_WITH_POSTHOG_JS="works_with_posthog_js",AvailableFeature.REPLAY_AUTOMATIC_PLAYLISTS="replay_automatic_playlists",AvailableFeature.GROUP_ANALYTICS="group_analytics",AvailableFeature.SURVEYS_UNLIMITED_SURVEYS="surveys_unlimited_surveys",AvailableFeature.SURVEYS_ALL_QUESTION_TYPES="surveys_all_question_types",AvailableFeature.SURVEYS_MULTIPLE_QUESTIONS="surveys_multiple_questions",AvailableFeature.SURVEYS_USER_TARGETING="surveys_user_targeting",AvailableFeature.SURVEYS_USER_SAMPLING="surveys_user_sampling",AvailableFeature.SURVEYS_STYLING="surveys_styling",AvailableFeature.SURVEYS_TEXT_HTML="surveys_text_html",AvailableFeature.SURVEYS_API_MODE="surveys_api_mode",AvailableFeature.SURVEYS_RESULTS_ANALYSIS="surveys_results_analysis",AvailableFeature.SURVEYS_TEMPLATES="surveys_templates",AvailableFeature.SURVEYS_DATA_RETENTION="surveys_data_retention",AvailableFeature.SURVEYS_LINK_QUESTION_TYPE="surveys_link_question_type",AvailableFeature.SURVEYS_SLACK_NOTIFICATIONS="surveys_slack_notifications",AvailableFeature.SURVEYS_WAIT_PERIODS="surveys_wait_periods",AvailableFeature.SURVEYS_RECURRING="surveys_recurring",AvailableFeature.SURVEYS_EVENTS="surveys_events",AvailableFeature.SURVEYS_ACTIONS="surveys_actions",AvailableFeature.TRACKED_USERS="tracked_users",AvailableFeature.TEAM_MEMBERS="team_members",AvailableFeature.API_ACCESS="api_access",AvailableFeature.ORGANIZATIONS_PROJECTS="organizations_projects",AvailableFeature.ROLE_BASED_ACCESS="role_based_access",AvailableFeature.SOCIAL_SSO="social_sso",AvailableFeature.PROJECT_BASED_PERMISSIONING="project_based_permissioning",AvailableFeature.SAML="saml",AvailableFeature.SSO_ENFORCEMENT="sso_enforcement",AvailableFeature.WHITE_LABELLING="white_labelling",AvailableFeature.COMMUNITY_SUPPORT="community_support",AvailableFeature.DEDICATED_SUPPORT="dedicated_support",AvailableFeature.EMAIL_SUPPORT="email_support",AvailableFeature.ACCOUNT_MANAGER="account_manager",AvailableFeature.TRAINING="training",AvailableFeature.CONFIGURATION_SUPPORT="configuration_support",AvailableFeature.TERMS_AND_CONDITIONS="terms_and_conditions",AvailableFeature.SECURITY_ASSESSMENT="security_assessment",AvailableFeature.BESPOKE_PRICING="bespoke_pricing",AvailableFeature.INVOICE_PAYMENTS="invoice_payments",AvailableFeature.BOOLEAN_FLAGS="boolean_flags",AvailableFeature.FEATURE_FLAGS_DATA_RETENTION="feature_flags_data_retention",AvailableFeature.MULTIVARIATE_FLAGS="multivariate_flags",AvailableFeature.PERSIST_FLAGS_CROSS_AUTHENTICATION="persist_flags_cross_authentication",AvailableFeature.FEATURE_FLAG_PAYLOADS="feature_flag_payloads",AvailableFeature.MULTIPLE_RELEASE_CONDITIONS="multiple_release_conditions",AvailableFeature.RELEASE_CONDITION_OVERRIDES="release_condition_overrides",AvailableFeature.TARGETING_BY_GROUP="targeting_by_group",AvailableFeature.LOCAL_EVALUATION_AND_BOOTSTRAPPING="local_evaluation_and_bootstrapping",AvailableFeature.FLAG_USAGE_STATS="flag_usage_stats",AvailableFeature.MULTIPLE_ENVIRONMENTS="multiple_environments",AvailableFeature.USER_OPT_IN="user_opt_in",AvailableFeature.INSTANT_ROLLBACKS="instant_rollbacks",AvailableFeature.EXPERIMENTATION="experimentation",AvailableFeature.GROUP_EXPERIMENTS="group_experiments",AvailableFeature.FUNNEL_EXPERIMENTS="funnel_experiments",AvailableFeature.SECONDARY_METRICS="secondary_metrics",AvailableFeature.STATISTICAL_ANALYSIS="statistical_analysis",AvailableFeature.PRODUCT_ANALYTICS_DATA_RETENTION="product_analytics_data_retention",AvailableFeature.DASHBOARDS="dashboards",AvailableFeature.FUNNELS="funnels",AvailableFeature.GRAPHS_TRENDS="graphs_trends",AvailableFeature.PATHS="paths",AvailableFeature.INSIGHTS="insights",AvailableFeature.SUBSCRIPTIONS="subscriptions",AvailableFeature.ADVANCED_PERMISSIONS="advanced_permissions",AvailableFeature.INGESTION_TAXONOMY="ingestion_taxonomy",AvailableFeature.PATHS_ADVANCED="paths_advanced",AvailableFeature.CORRELATION_ANALYSIS="correlation_analysis",AvailableFeature.TAGGING="tagging",AvailableFeature.BEHAVIORAL_COHORT_FILTERING="behavioral_cohort_filtering",AvailableFeature.PRODUCT_ANALYTICS_RETENTION="product_analytics_retention",AvailableFeature.PRODUCT_ANALYTICS_STICKINESS="product_analytics_stickiness",AvailableFeature.AUTOCAPTURE="autocapture",AvailableFeature.DATA_VISUALIZATION="data_visualization",AvailableFeature.PRODUCT_ANALYTICS_SQL_QUERIES="product_analytics_sql_queries",AvailableFeature.TWOFA_ENFORCEMENT="2fa_enforcement",AvailableFeature.AUDIT_LOGS="audit_logs",AvailableFeature.HIPAA_BAA="hipaa_baa",AvailableFeature.CUSTOM_MSA="custom_msa",AvailableFeature.TWOFA="2fa",AvailableFeature.PRIORITY_SUPPORT="priority_support",AvailableFeature.SUPPORT_RESPONSE_TIME="support_response_time",AvailableFeature.DATA_PIPELINES_TRANSFORMATIONS="data_pipelines_transformations",AvailableFeature.AUTOMATIC_PROVISIONING="automatic_provisioning",AvailableFeature.MANAGED_REVERSE_PROXY="managed_reverse_proxy",AvailableFeature.ALERTS="alerts",AvailableFeature}({}),ProductKey=function(ProductKey){return ProductKey.COHORTS="cohorts",ProductKey.ACTIONS="actions",ProductKey.ALERTS="alerts",ProductKey.EXPERIMENTS="experiments",ProductKey.FEATURE_FLAGS="feature_flags",ProductKey.ANNOTATIONS="annotations",ProductKey.HISTORY="history",ProductKey.HEATMAPS="heatmaps",ProductKey.INGESTION_WARNINGS="ingestion_warnings",ProductKey.PERSONS="persons",ProductKey.SURVEYS="surveys",ProductKey.SESSION_REPLAY="session_replay",ProductKey.DATA_WAREHOUSE="data_warehouse",ProductKey.DATA_WAREHOUSE_SAVED_QUERY="data_warehouse_saved_queries",ProductKey.EARLY_ACCESS_FEATURES="early_access_features",ProductKey.PRODUCT_ANALYTICS="product_analytics",ProductKey.PIPELINE_TRANSFORMATIONS="pipeline_transformations",ProductKey.PIPELINE_DESTINATIONS="pipeline_destinations",ProductKey.SITE_APPS="site_apps",ProductKey.DATA_PIPELINES="data_pipelines",ProductKey.GROUP_ANALYTICS="group_analytics",ProductKey.INTEGRATIONS="integrations",ProductKey.PLATFORM_AND_SUPPORT="platform_and_support",ProductKey.TEAMS="teams",ProductKey.WEB_ANALYTICS="web_analytics",ProductKey.ERROR_TRACKING="error_tracking",ProductKey}({}),Realm=function(Realm){return Realm.Cloud="cloud",Realm.Demo="demo",Realm.SelfHostedPostgres="hosted",Realm.SelfHostedClickHouse="hosted-clickhouse",Realm}({}),Region=function(Region){return Region.US="US",Region.EU="EU",Region}({}),PropertyOperator=function(PropertyOperator){return PropertyOperator.Exact="exact",PropertyOperator.IsNot="is_not",PropertyOperator.IContains="icontains",PropertyOperator.NotIContains="not_icontains",PropertyOperator.Regex="regex",PropertyOperator.NotRegex="not_regex",PropertyOperator.GreaterThan="gt",PropertyOperator.GreaterThanOrEqual="gte",PropertyOperator.LessThan="lt",PropertyOperator.LessThanOrEqual="lte",PropertyOperator.IsSet="is_set",PropertyOperator.IsNotSet="is_not_set",PropertyOperator.IsDateExact="is_date_exact",PropertyOperator.IsDateBefore="is_date_before",PropertyOperator.IsDateAfter="is_date_after",PropertyOperator.Between="between",PropertyOperator.NotBetween="not_between",PropertyOperator.Minimum="min",PropertyOperator.Maximum="max",PropertyOperator.In="in",PropertyOperator.NotIn="not_in",PropertyOperator}({}),SavedInsightsTabs=function(SavedInsightsTabs){return SavedInsightsTabs.All="all",SavedInsightsTabs.Yours="yours",SavedInsightsTabs.Favorites="favorites",SavedInsightsTabs.History="history",SavedInsightsTabs.Alerts="alerts",SavedInsightsTabs}({}),ReplayTabs=function(ReplayTabs){return ReplayTabs.Templates="templates",ReplayTabs.Home="home",ReplayTabs.Playlists="playlists",ReplayTabs}({}),ExperimentsTabs=function(ExperimentsTabs){return ExperimentsTabs.All="all",ExperimentsTabs.Yours="yours",ExperimentsTabs.Archived="archived",ExperimentsTabs.Holdouts="holdouts",ExperimentsTabs.SavedMetrics="saved-metrics",ExperimentsTabs}({}),ActivityTab=function(ActivityTab){return ActivityTab.ExploreEvents="explore",ActivityTab.LiveEvents="live",ActivityTab}({}),PipelineTab=function(PipelineTab){return PipelineTab.Overview="overview",PipelineTab.Transformations="transformations",PipelineTab.Destinations="destinations",PipelineTab.SiteApps="site-apps",PipelineTab.Sources="sources",PipelineTab.ImportApps="legacy-sources",PipelineTab.AppsManagement="apps-management",PipelineTab.History="history",PipelineTab}({}),PipelineStage=function(PipelineStage){return PipelineStage.Transformation="transformation",PipelineStage.Destination="destination",PipelineStage.Source="source",PipelineStage.SiteApp="site-app",PipelineStage.ImportApp="legacy-source",PipelineStage}({}),PipelineNodeTab=function(PipelineNodeTab){return PipelineNodeTab.Configuration="configuration",PipelineNodeTab.Runs="runs",PipelineNodeTab.Logs="logs",PipelineNodeTab.Metrics="metrics",PipelineNodeTab.History="history",PipelineNodeTab.Schemas="schemas",PipelineNodeTab.Syncs="syncs",PipelineNodeTab.SourceConfiguration="source configuration",PipelineNodeTab}({}),ProgressStatus=function(ProgressStatus){return ProgressStatus.Draft="draft",ProgressStatus.Running="running",ProgressStatus.Complete="complete",ProgressStatus}({}),PropertyFilterType=function(PropertyFilterType){return PropertyFilterType.Meta="meta",PropertyFilterType.Event="event",PropertyFilterType.Person="person",PropertyFilterType.Element="element",PropertyFilterType.Feature="feature",PropertyFilterType.Session="session",PropertyFilterType.Cohort="cohort",PropertyFilterType.Recording="recording",PropertyFilterType.LogEntry="log_entry",PropertyFilterType.Group="group",PropertyFilterType.HogQL="hogql",PropertyFilterType.DataWarehouse="data_warehouse",PropertyFilterType.DataWarehousePersonProperty="data_warehouse_person_property",PropertyFilterType}({}),SnapshotSourceType={blob:"blob",realtime:"realtime",file:"file"},SessionRecordingUsageType=function(SessionRecordingUsageType){return SessionRecordingUsageType.VIEWED="viewed",SessionRecordingUsageType.ANALYZED="analyzed",SessionRecordingUsageType.LOADED="loaded",SessionRecordingUsageType}({}),SessionRecordingSidebarTab=function(SessionRecordingSidebarTab){return SessionRecordingSidebarTab.OVERVIEW="overview",SessionRecordingSidebarTab.INSPECTOR="inspector",SessionRecordingSidebarTab.DEBUGGER="debugger",SessionRecordingSidebarTab}({}),SessionRecordingSidebarStacking=function(SessionRecordingSidebarStacking){return SessionRecordingSidebarStacking.Vertical="vertical",SessionRecordingSidebarStacking.Horizontal="horizontal",SessionRecordingSidebarStacking}({}),FilterableInspectorListItemTypes=function(FilterableInspectorListItemTypes){return FilterableInspectorListItemTypes.EVENTS="events",FilterableInspectorListItemTypes.CONSOLE="console",FilterableInspectorListItemTypes.NETWORK="network",FilterableInspectorListItemTypes.DOCTOR="doctor",FilterableInspectorListItemTypes}({}),SessionPlayerState=function(SessionPlayerState){return SessionPlayerState.READY="ready",SessionPlayerState.BUFFER="buffer",SessionPlayerState.PLAY="play",SessionPlayerState.PAUSE="pause",SessionPlayerState.SCRUB="scrub",SessionPlayerState.SKIP="skip",SessionPlayerState.ERROR="error",SessionPlayerState}({}),EntityTypes=function(EntityTypes){return EntityTypes.ACTIONS="actions",EntityTypes.EVENTS="events",EntityTypes.DATA_WAREHOUSE="data_warehouse",EntityTypes}({}),isDataWarehouseFilter=filter=>filter.type===EntityTypes.DATA_WAREHOUSE,StepOrderValue=function(StepOrderValue){return StepOrderValue.STRICT="strict",StepOrderValue.UNORDERED="unordered",StepOrderValue.ORDERED="ordered",StepOrderValue}({}),PersonsTabType=function(PersonsTabType){return PersonsTabType.FEED="feed",PersonsTabType.EVENTS="events",PersonsTabType.SESSION_RECORDINGS="sessionRecordings",PersonsTabType.PROPERTIES="properties",PersonsTabType.COHORTS="cohorts",PersonsTabType.RELATED="related",PersonsTabType.HISTORY="history",PersonsTabType.FEATURE_FLAGS="featureFlags",PersonsTabType.DASHBOARD="dashboard",PersonsTabType}({}),LayoutView=function(LayoutView){return LayoutView.Card="card",LayoutView.List="list",LayoutView}({}),InsightColor=function(InsightColor){return InsightColor.White="white",InsightColor.Black="black",InsightColor.Blue="blue",InsightColor.Green="green",InsightColor.Purple="purple",InsightColor}({}),TemplateAvailabilityContext=function(TemplateAvailabilityContext){return TemplateAvailabilityContext.GENERAL="general",TemplateAvailabilityContext.ONBOARDING="onboarding",TemplateAvailabilityContext}({}),PluginInstallationType=function(PluginInstallationType){return PluginInstallationType.Local="local",PluginInstallationType.Custom="custom",PluginInstallationType.Repository="repository",PluginInstallationType.Source="source",PluginInstallationType.Inline="inline",PluginInstallationType}({}),AnnotationScope=function(AnnotationScope){return AnnotationScope.Insight="dashboard_item",AnnotationScope.Dashboard="dashboard",AnnotationScope.Project="project",AnnotationScope.Organization="organization",AnnotationScope}({}),ChartDisplayType=function(ChartDisplayType){return ChartDisplayType.ActionsLineGraph="ActionsLineGraph",ChartDisplayType.ActionsBar="ActionsBar",ChartDisplayType.ActionsStackedBar="ActionsStackedBar",ChartDisplayType.ActionsAreaGraph="ActionsAreaGraph",ChartDisplayType.ActionsLineGraphCumulative="ActionsLineGraphCumulative",ChartDisplayType.BoldNumber="BoldNumber",ChartDisplayType.ActionsPie="ActionsPie",ChartDisplayType.ActionsBarValue="ActionsBarValue",ChartDisplayType.ActionsTable="ActionsTable",ChartDisplayType.WorldMap="WorldMap",ChartDisplayType}({}),ChartDisplayCategory=function(ChartDisplayCategory){return ChartDisplayCategory.TimeSeries="TimeSeries",ChartDisplayCategory.CumulativeTimeSeries="CumulativeTimeSeries",ChartDisplayCategory.TotalValue="TotalValue",ChartDisplayCategory}({}),InsightType=function(InsightType){return InsightType.TRENDS="TRENDS",InsightType.STICKINESS="STICKINESS",InsightType.LIFECYCLE="LIFECYCLE",InsightType.FUNNELS="FUNNELS",InsightType.RETENTION="RETENTION",InsightType.PATHS="PATHS",InsightType.JSON="JSON",InsightType.SQL="SQL",InsightType.HOG="HOG",InsightType}({}),PathType=function(PathType){return PathType.PageView="$pageview",PathType.Screen="$screen",PathType.CustomEvent="custom_event",PathType.HogQL="hogql",PathType}({}),FunnelPathType=function(FunnelPathType){return FunnelPathType.before="funnel_path_before_step",FunnelPathType.between="funnel_path_between_steps",FunnelPathType.after="funnel_path_after_step",FunnelPathType}({}),FunnelVizType=function(FunnelVizType){return FunnelVizType.Steps="steps",FunnelVizType.TimeToConvert="time_to_convert",FunnelVizType.Trends="trends",FunnelVizType}({}),RetentionPeriod=function(RetentionPeriod){return RetentionPeriod.Hour="Hour",RetentionPeriod.Day="Day",RetentionPeriod.Week="Week",RetentionPeriod.Month="Month",RetentionPeriod}({}),FunnelConversionWindowTimeUnit=function(FunnelConversionWindowTimeUnit){return FunnelConversionWindowTimeUnit.Second="second",FunnelConversionWindowTimeUnit.Minute="minute",FunnelConversionWindowTimeUnit.Hour="hour",FunnelConversionWindowTimeUnit.Day="day",FunnelConversionWindowTimeUnit.Week="week",FunnelConversionWindowTimeUnit.Month="month",FunnelConversionWindowTimeUnit}({}),FunnelStepReference=function(FunnelStepReference){return FunnelStepReference.total="total",FunnelStepReference.previous="previous",FunnelStepReference}({}),FunnelCorrelationType=function(FunnelCorrelationType){return FunnelCorrelationType.Success="success",FunnelCorrelationType.Failure="failure",FunnelCorrelationType}({}),FunnelCorrelationResultsType=function(FunnelCorrelationResultsType){return FunnelCorrelationResultsType.Events="events",FunnelCorrelationResultsType.Properties="properties",FunnelCorrelationResultsType.EventWithProperties="event_with_properties",FunnelCorrelationResultsType}({}),BreakdownAttributionType=function(BreakdownAttributionType){return BreakdownAttributionType.FirstTouch="first_touch",BreakdownAttributionType.LastTouch="last_touch",BreakdownAttributionType.AllSteps="all_events",BreakdownAttributionType.Step="step",BreakdownAttributionType}({}),SurveyUrlMatchType=function(SurveyUrlMatchType){return SurveyUrlMatchType.Exact="exact",SurveyUrlMatchType.IsNot="is_not",SurveyUrlMatchType.Contains="icontains",SurveyUrlMatchType.NotIContains="not_icontains",SurveyUrlMatchType.Regex="regex",SurveyUrlMatchType.NotRegex="not_regex",SurveyUrlMatchType}({}),SurveyType=function(SurveyType){return SurveyType.Popover="popover",SurveyType.Widget="widget",SurveyType.FullScreen="full_screen",SurveyType.Email="email",SurveyType.API="api",SurveyType}({}),SurveyQuestionType=function(SurveyQuestionType){return SurveyQuestionType.Open="open",SurveyQuestionType.MultipleChoice="multiple_choice",SurveyQuestionType.SingleChoice="single_choice",SurveyQuestionType.Rating="rating",SurveyQuestionType.Link="link",SurveyQuestionType}({}),SurveyQuestionBranchingType=function(SurveyQuestionBranchingType){return SurveyQuestionBranchingType.NextQuestion="next_question",SurveyQuestionBranchingType.End="end",SurveyQuestionBranchingType.ResponseBased="response_based",SurveyQuestionBranchingType.SpecificQuestion="specific_question",SurveyQuestionBranchingType}({}),FeatureFlagStatus=function(FeatureFlagStatus){return FeatureFlagStatus.ACTIVE="active",FeatureFlagStatus.INACTIVE="inactive",FeatureFlagStatus.STALE="stale",FeatureFlagStatus.DELETED="deleted",FeatureFlagStatus.UNKNOWN="unknown",FeatureFlagStatus}({}),EarlyAccessFeatureStage=function(EarlyAccessFeatureStage){return EarlyAccessFeatureStage.Draft="draft",EarlyAccessFeatureStage.Concept="concept",EarlyAccessFeatureStage.Alpha="alpha",EarlyAccessFeatureStage.Beta="beta",EarlyAccessFeatureStage.GeneralAvailability="general-availability",EarlyAccessFeatureStage.Archived="archived",EarlyAccessFeatureStage}({}),EarlyAccessFeatureTabs=function(EarlyAccessFeatureTabs){return EarlyAccessFeatureTabs.OptedIn="opted-in",EarlyAccessFeatureTabs.OptedOut="opted-out",EarlyAccessFeatureTabs}({}),ScheduledChangeOperationType=function(ScheduledChangeOperationType){return ScheduledChangeOperationType.UpdateStatus="update_status",ScheduledChangeOperationType.AddReleaseCondition="add_release_condition",ScheduledChangeOperationType}({}),ItemMode=function(ItemMode){return ItemMode.Edit="edit",ItemMode.View="view",ItemMode.Subscriptions="subscriptions",ItemMode.Sharing="sharing",ItemMode.Alerts="alerts",ItemMode}({}),DashboardPlacement=function(DashboardPlacement){return DashboardPlacement.Dashboard="dashboard",DashboardPlacement.ProjectHomepage="project-homepage",DashboardPlacement.FeatureFlag="feature-flag",DashboardPlacement.Public="public",DashboardPlacement.Export="export",DashboardPlacement.Person="person",DashboardPlacement.Group="group",DashboardPlacement}({}),DashboardMode=function(DashboardMode){return DashboardMode.Edit="edit",DashboardMode.Fullscreen="fullscreen",DashboardMode.Sharing="sharing",DashboardMode}({}),PropertyType=function(PropertyType){return PropertyType.DateTime="DateTime",PropertyType.String="String",PropertyType.Numeric="Numeric",PropertyType.Boolean="Boolean",PropertyType.Duration="Duration",PropertyType.Selector="Selector",PropertyType.Cohort="Cohort",PropertyType}({}),PropertyDefinitionType=function(PropertyDefinitionType){return PropertyDefinitionType.Event="event",PropertyDefinitionType.Person="person",PropertyDefinitionType.Group="group",PropertyDefinitionType.Session="session",PropertyDefinitionType.LogEntry="log_entry",PropertyDefinitionType.Meta="meta",PropertyDefinitionType}({}),PropertyDefinitionState=function(PropertyDefinitionState){return PropertyDefinitionState.Pending="pending",PropertyDefinitionState.Loading="loading",PropertyDefinitionState.Missing="missing",PropertyDefinitionState.Error="error",PropertyDefinitionState}({}),FilterLogicalOperator=function(FilterLogicalOperator){return FilterLogicalOperator.And="AND",FilterLogicalOperator.Or="OR",FilterLogicalOperator}({}),GraphType=function(GraphType){return GraphType.Bar="bar",GraphType.HorizontalBar="horizontalBar",GraphType.Line="line",GraphType.Histogram="histogram",GraphType.Pie="doughnut",GraphType}({}),FunnelMathType=function(FunnelMathType){return FunnelMathType.AnyMatch="total",FunnelMathType.FirstTimeForUser="first_time_for_user",FunnelMathType.FirstTimeForUserWithFilters="first_time_for_user_with_filters",FunnelMathType}({}),BaseMathType=function(BaseMathType){return BaseMathType.TotalCount="total",BaseMathType.UniqueUsers="dau",BaseMathType.WeeklyActiveUsers="weekly_active",BaseMathType.MonthlyActiveUsers="monthly_active",BaseMathType.UniqueSessions="unique_session",BaseMathType.FirstTimeForUser="first_time_for_user",BaseMathType.FirstMatchingEventForUser="first_matching_event_for_user",BaseMathType}({}),PropertyMathType=function(PropertyMathType){return PropertyMathType.Average="avg",PropertyMathType.Sum="sum",PropertyMathType.Minimum="min",PropertyMathType.Maximum="max",PropertyMathType.Median="median",PropertyMathType.P90="p90",PropertyMathType.P95="p95",PropertyMathType.P99="p99",PropertyMathType}({}),CountPerActorMathType=function(CountPerActorMathType){return CountPerActorMathType.Average="avg_count_per_actor",CountPerActorMathType.Minimum="min_count_per_actor",CountPerActorMathType.Maximum="max_count_per_actor",CountPerActorMathType.Median="median_count_per_actor",CountPerActorMathType.P90="p90_count_per_actor",CountPerActorMathType.P95="p95_count_per_actor",CountPerActorMathType.P99="p99_count_per_actor",CountPerActorMathType}({}),HogQLMathType=function(HogQLMathType){return HogQLMathType.HogQL="hogql",HogQLMathType}({}),GroupMathType=function(GroupMathType){return GroupMathType.UniqueGroup="unique_group",GroupMathType}({}),ActorGroupType=function(ActorGroupType){return ActorGroupType.Person="person",ActorGroupType.GroupPrefix="group",ActorGroupType}({}),BehavioralEventType=function(BehavioralEventType){return BehavioralEventType.PerformEvent="performed_event",BehavioralEventType.PerformMultipleEvents="performed_event_multiple",BehavioralEventType.PerformSequenceEvents="performed_event_sequence",BehavioralEventType.NotPerformedEvent="not_performed_event",BehavioralEventType.NotPerformSequenceEvents="not_performed_event_sequence",BehavioralEventType.HaveProperty="have_property",BehavioralEventType.NotHaveProperty="not_have_property",BehavioralEventType}({}),BehavioralCohortType=function(BehavioralCohortType){return BehavioralCohortType.InCohort="in_cohort",BehavioralCohortType.NotInCohort="not_in_cohort",BehavioralCohortType}({}),BehavioralLifecycleType=function(BehavioralLifecycleType){return BehavioralLifecycleType.PerformEventFirstTime="performed_event_first_time",BehavioralLifecycleType.PerformEventRegularly="performed_event_regularly",BehavioralLifecycleType.StopPerformEvent="stopped_performing_event",BehavioralLifecycleType.StartPerformEventAgain="restarted_performing_event",BehavioralLifecycleType}({}),TimeUnitType=function(TimeUnitType){return TimeUnitType.Day="day",TimeUnitType.Week="week",TimeUnitType.Month="month",TimeUnitType.Year="year",TimeUnitType}({}),DateOperatorType=function(DateOperatorType){return DateOperatorType.BeforeTheLast="before_the_last",DateOperatorType.Between="between",DateOperatorType.NotBetween="not_between",DateOperatorType.OnTheDate="on_the_date",DateOperatorType.NotOnTheDate="not_on_the_date",DateOperatorType.Since="since",DateOperatorType.Before="before",DateOperatorType.IsSet="is_set",DateOperatorType.IsNotSet="is_not_set",DateOperatorType}({}),SingleFieldDateType=function(SingleFieldDateType){return SingleFieldDateType.IsDateExact="is_date_exact",SingleFieldDateType.IsDateBefore="is_date_before",SingleFieldDateType.IsDateAfter="is_date_after",SingleFieldDateType}({}),ValueOptionType=function(ValueOptionType){return ValueOptionType.MostRecent="most_recent",ValueOptionType.Previous="previous",ValueOptionType.OnDate="on_date",ValueOptionType}({}),EventDefinitionType=function(EventDefinitionType){return EventDefinitionType.Event="event",EventDefinitionType.EventCustom="event_custom",EventDefinitionType.EventPostHog="event_posthog",EventDefinitionType}({}),ExporterFormat=function(ExporterFormat){return ExporterFormat.PNG="image/png",ExporterFormat.CSV="text/csv",ExporterFormat.PDF="application/pdf",ExporterFormat.JSON="application/json",ExporterFormat.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ExporterFormat}({}),FeatureFlagReleaseType=function(FeatureFlagReleaseType){return FeatureFlagReleaseType.ReleaseToggle="Release toggle",FeatureFlagReleaseType.Variants="Multiple variants",FeatureFlagReleaseType}({}),RolloutConditionType=function(RolloutConditionType){return RolloutConditionType.Insight="insight",RolloutConditionType.Sentry="sentry",RolloutConditionType}({}),Resource=function(Resource){return Resource.FEATURE_FLAGS="feature flags",Resource}({}),AccessLevel=function(AccessLevel){return AccessLevel[AccessLevel.READ=21]="READ",AccessLevel[AccessLevel.WRITE=37]="WRITE",AccessLevel}({}),ActivityScope=function(ActivityScope){return ActivityScope.ACTION="Action",ActivityScope.FEATURE_FLAG="FeatureFlag",ActivityScope.PERSON="Person",ActivityScope.INSIGHT="Insight",ActivityScope.PLUGIN="Plugin",ActivityScope.PLUGIN_CONFIG="PluginConfig",ActivityScope.HOG_FUNCTION="HogFunction",ActivityScope.DATA_MANAGEMENT="DataManagement",ActivityScope.EVENT_DEFINITION="EventDefinition",ActivityScope.PROPERTY_DEFINITION="PropertyDefinition",ActivityScope.NOTEBOOK="Notebook",ActivityScope.DASHBOARD="Dashboard",ActivityScope.REPLAY="Replay",ActivityScope.EXPERIMENT="Experiment",ActivityScope.SURVEY="Survey",ActivityScope.EARLY_ACCESS_FEATURE="EarlyAccessFeature",ActivityScope.COMMENT="Comment",ActivityScope.COHORT="Cohort",ActivityScope.TEAM="Team",ActivityScope}({}),NotebookNodeType=function(NotebookNodeType){return NotebookNodeType.Mention="ph-mention",NotebookNodeType.Query="ph-query",NotebookNodeType.Recording="ph-recording",NotebookNodeType.RecordingPlaylist="ph-recording-playlist",NotebookNodeType.FeatureFlag="ph-feature-flag",NotebookNodeType.FeatureFlagCodeExample="ph-feature-flag-code-example",NotebookNodeType.Experiment="ph-experiment",NotebookNodeType.EarlyAccessFeature="ph-early-access-feature",NotebookNodeType.Survey="ph-survey",NotebookNodeType.Person="ph-person",NotebookNodeType.Group="ph-group",NotebookNodeType.Cohort="ph-cohort",NotebookNodeType.Backlink="ph-backlink",NotebookNodeType.ReplayTimestamp="ph-replay-timestamp",NotebookNodeType.Image="ph-image",NotebookNodeType.PersonFeed="ph-person-feed",NotebookNodeType.Properties="ph-properties",NotebookNodeType.Map="ph-map",NotebookNodeType.Embed="ph-embed",NotebookNodeType}({}),NotebookTarget=function(NotebookTarget){return NotebookTarget.Popover="popover",NotebookTarget.Scene="scene",NotebookTarget}({}),manualLinkSources=["aws","google-cloud","cloudflare-r2","azure"],BATCH_EXPORT_SERVICE_NAMES=["S3","Snowflake","Postgres","BigQuery","Redshift","HTTP"],SDKKey=function(SDKKey){return SDKKey.ANDROID="android",SDKKey.ANGULAR="angular",SDKKey.ASTRO="astro",SDKKey.API="api",SDKKey.BUBBLE="bubble",SDKKey.DJANGO="django",SDKKey.DOCUSAURUS="docusaurus",SDKKey.ELIXIR="elixir",SDKKey.FRAMER="framer",SDKKey.FLUTTER="flutter",SDKKey.GATSBY="gatsby",SDKKey.GO="go",SDKKey.GOOGLE_TAG_MANAGER="google_tag_manager",SDKKey.HELICONE="helicone",SDKKey.HTML_SNIPPET="html",SDKKey.IOS="ios",SDKKey.JAVA="java",SDKKey.JS_WEB="javascript_web",SDKKey.LARAVEL="laravel",SDKKey.LANGFUSE="langfuse",SDKKey.NEXT_JS="nextjs",SDKKey.NODE_JS="nodejs",SDKKey.NUXT_JS="nuxtjs",SDKKey.PHP="php",SDKKey.PYTHON="python",SDKKey.REACT="react",SDKKey.REACT_NATIVE="react_native",SDKKey.REMIX="remix",SDKKey.RETOOL="retool",SDKKey.RUBY="ruby",SDKKey.RUDDERSTACK="rudderstack",SDKKey.RUST="rust",SDKKey.SEGMENT="segment",SDKKey.SENTRY="sentry",SDKKey.SHOPIFY="shopify",SDKKey.SVELTE="svelte",SDKKey.TRACELOOP="traceloop",SDKKey.VUE_JS="vuejs",SDKKey.WEBFLOW="webflow",SDKKey.WORDPRESS="wordpress",SDKKey}({}),SDKTag=function(SDKTag){return SDKTag.WEB="Web",SDKTag.MOBILE="Mobile",SDKTag.SERVER="Server",SDKTag.INTEGRATION="Integration",SDKTag.RECOMMENDED="Recommended",SDKTag.LLM="LLM",SDKTag.OTHER="Other",SDKTag}({}),SidePanelTab=function(SidePanelTab){return SidePanelTab.Notebooks="notebook",SidePanelTab.Support="support",SidePanelTab.Docs="docs",SidePanelTab.Activation="activation",SidePanelTab.Settings="settings",SidePanelTab.FeaturePreviews="feature-previews",SidePanelTab.Activity="activity",SidePanelTab.Discussion="discussion",SidePanelTab.Status="status",SidePanelTab.Exports="exports",SidePanelTab.AccessControl="access-control",SidePanelTab}({}),HogWatcherState=function(HogWatcherState){return HogWatcherState[HogWatcherState.healthy=1]="healthy",HogWatcherState[HogWatcherState.overflowed=2]="overflowed",HogWatcherState[HogWatcherState.disabledForPeriod=3]="disabledForPeriod",HogWatcherState[HogWatcherState.disabledIndefinitely=4]="disabledIndefinitely",HogWatcherState}({}),CookielessServerHashMode=function(CookielessServerHashMode){return CookielessServerHashMode[CookielessServerHashMode.Disabled=0]="Disabled",CookielessServerHashMode[CookielessServerHashMode.Stateless=1]="Stateless",CookielessServerHashMode[CookielessServerHashMode.Stateful=2]="Stateful",CookielessServerHashMode}({})},"./storybook-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),external_STORYBOOK_MODULE_CHANNELS_=__webpack_require__("@storybook/channels");let pipeline=x=>x(),importers=[async path=>{if(!/^\.[\\/](?:frontend\/src(?:\/(?!\.)(?:(?:(?!(?:^|\/)\.).)*?)\/|\/|$)(?!\.)(?=.)[^/]*?\.stories\.(js|jsx|ts|tsx|mdx))$/.exec(path))return;let pathRemainder=path.substring(15);return __webpack_require__("./frontend/src lazy recursive ^\\.\\/.*$ include: (?:\\/frontend\\/src(?:\\/(?%21\\.)(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/%7C\\/%7C$)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx%7Cmdx))$")("./"+pathRemainder)}];async function importFn(path){for(let i=0;iimporters[i](path));if(moduleExports)return moduleExports}}let channel=(0,external_STORYBOOK_MODULE_CHANNELS_.createBrowserChannel)({page:"preview"});external_STORYBOOK_MODULE_PREVIEW_API_.addons.setChannel(channel),"DEVELOPMENT"===external_STORYBOOK_MODULE_GLOBAL_.global.CONFIG_TYPE&&(window.__STORYBOOK_SERVER_CHANNEL__=channel);let preview=new external_STORYBOOK_MODULE_PREVIEW_API_.PreviewWeb;window.__STORYBOOK_PREVIEW__=preview,window.__STORYBOOK_STORY_STORE__=preview.storyStore,window.__STORYBOOK_ADDONS_CHANNEL__=channel,window.__STORYBOOK_CLIENT_API__=new external_STORYBOOK_MODULE_PREVIEW_API_.ClientApi({storyStore:preview.storyStore}),preview.initialize({importFn:importFn,getProjectAnnotations:()=>(0,external_STORYBOOK_MODULE_PREVIEW_API_.composeConfigs)([__webpack_require__("./node_modules/.pnpm/@storybook+react@7.6.4_react-dom@18.2.0_react@18.2.0_typescript@4.9.5/node_modules/@storybook/react/dist/entry-preview.mjs"),__webpack_require__("./node_modules/.pnpm/@storybook+react@7.6.4_react-dom@18.2.0_react@18.2.0_typescript@4.9.5/node_modules/@storybook/react/dist/entry-preview-docs.mjs"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-docs@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-docs/dist/preview.mjs"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-links@7.6.4_react@18.2.0/node_modules/@storybook/addon-links/dist/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-essentials@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-essentials/dist/actions/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-essentials@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-essentials/dist/backgrounds/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-essentials@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-essentials/dist/measure/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-essentials@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-essentials/dist/outline/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-essentials@7.6.4_@types+react-dom@18.2.14_@types+react@17.0.52_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/addon-essentials/dist/highlight/preview.js"),__webpack_require__("./node_modules/.pnpm/@storybook+addon-a11y@7.6.4/node_modules/@storybook/addon-a11y/dist/preview.js"),__webpack_require__("./node_modules/.pnpm/storybook-addon-pseudo-states@2.1.2_@storybook+components@7.6.4_@storybook+core-events@7.6.4__ryvooa6ckff6nihvuhqddxt4ke/node_modules/storybook-addon-pseudo-states/dist/preview.mjs"),__webpack_require__("./.storybook/preview.tsx")])})},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/ErrorBoundary/ErrorBoundary.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ErrorBoundary{background:var(--danger-highlight);border-radius:var(--radius);height:-moz-fit-content;height:fit-content;margin:1.5rem;min-width:0;padding:.75rem 1rem 1rem}.ErrorBoundary h2{color:var(--danger);font-weight:600;margin-bottom:.75rem}.ErrorBoundary pre{background:var(--border-light);border-radius:var(--radius);margin-bottom:.75rem;padding:.75rem 1rem}.ErrorBoundary .help-button{margin-top:.75rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/Navigation.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.Navigation3000{--breadcrumbs-height-full:3.75rem;--breadcrumbs-height-compact:2.75rem;--scene-padding:1rem;--scene-padding-bottom:var(--scene-padding);background:var(--bg-3000);display:flex;height:100vh;overflow:hidden;width:100%}.storybook-test-runner .Navigation3000{height:auto}.Navigation3000>main{flex:1;min-width:0;overflow:auto}.Navigation3000 .BridgePage{background:none;height:100%;overflow:visible}@media screen and (max-width:576px){.Navigation3000{--scene-padding-bottom:calc(var(--scene-padding) + max(env(safe-area-inset-bottom), 80px))}}@media screen and (max-width:992px){.Navigation3000{--scene-padding:0.5rem}}.Navigation3000__scene{margin:var(--scene-padding);margin-bottom:var(--scene-padding-bottom);min-height:calc(100vh - var(--breadcrumbs-height-full) - var(--scene-padding) - var(--scene-padding-bottom));position:relative}.Navigation3000__scene.Navigation3000__scene--raw,.Navigation3000__scene.Navigation3000__scene--raw-no-header{--scene-padding:0px;--scene-padding-bottom:0px;display:flex;flex-direction:column}.Navigation3000__scene.Navigation3000__scene--raw-no-header{height:100vh}.Navigation3000__scene.Navigation3000__scene--canvas{--scene-padding:0px;display:flex;flex-direction:column;overflow:hidden}.Navbar3000{border-right-width:1px;display:flex;flex-direction:column;max-height:100vh;opacity:.99999;position:relative;transition:transform .1s ease-out}.Navigation3000--mobile .Navbar3000{bottom:0;left:0;position:fixed;top:0;z-index:var(--z-lemon-sidebar)}.Navbar3000.Navbar3000--hidden{transform:translateX(-100%)}.Navbar3000 .Navbar3000__content{background:var(--accent-3000);display:flex;flex:1;flex-direction:column;justify-content:space-between;overflow-y:auto;z-index:var(--z-main-nav)}.Navbar3000 .Navbar3000__content .LemonButton__chrome{--lemon-button-padding-horizontal:0.25rem!important}.Navbar3000 .Navbar3000__content .Navbar3000__bottom,.Navbar3000 .Navbar3000__content .Navbar3000__top{padding:0 .375rem}.Navbar3000 .Navbar3000__content ul{padding:.5rem 0}.Navbar3000 .Navbar3000__content ul+ul{border-top-width:1px}.Navbar3000__top{overflow:auto}.Navbar3000__overlay{-webkit-backdrop-filter:blur(var(--modal-backdrop-blur));backdrop-filter:blur(var(--modal-backdrop-blur));background-color:var(--modal-backdrop-color);height:100%;opacity:1;position:fixed;transition:opacity .1s ease-out,-webkit-backdrop-filter .1s ease-out;transition:opacity .1s ease-out,backdrop-filter .1s ease-out;transition:opacity .1s ease-out,backdrop-filter .1s ease-out,-webkit-backdrop-filter .1s ease-out;width:100%;z-index:var(--z-mobile-nav-overlay)}.Navbar3000__overlay.Navbar3000--hidden{-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);opacity:0;pointer-events:none}.NavbarButton{position:relative}.NavbarButton.NavbarButton--here:after{bottom:.25rem;color:var(--text-3000);content:"•";font-size:1.25rem;left:0;line-height:.5625rem;position:absolute;right:0;text-align:center}.NavbarButton.NavbarButton--here .LemonButton__icon{color:var(--text-3000);transform:translateY(-.25rem)}.Sidebar3000{--sidebar-slider-padding:0.125rem;--sidebar-horizontal-padding:0.5rem;--sidebar-row-height:3rem;--sidebar-background:var(--bg-3000);border-right:min(1px,var(--sidebar-width)) solid transparent;box-sizing:initial;flex:0 0 var(--sidebar-width);height:100vh;position:relative}[theme=dark] .Sidebar3000{--sidebar-background:var(--accent-3000)}.Sidebar3000.Sidebar3000--resizing{will-change:flex-basis}.Sidebar3000 h3,.Sidebar3000 h4,.Sidebar3000 h5{color:var(--text-3000);line-height:inherit;margin:0;overflow:hidden;text-overflow:ellipsis}.Sidebar3000 h3{font-size:.75rem;font-weight:600;line-height:2rem}.Sidebar3000 h4{flex-grow:1;font-size:.6875rem;font-weight:600;line-height:1.75rem}.Sidebar3000 h5{font-size:.75rem;font-weight:400;letter-spacing:normal;text-transform:none}.Sidebar3000 b{font-weight:700}.Sidebar3000 .LemonInput--type-search{border-color:transparent;border-radius:0;max-width:none;transition:none}.Sidebar3000__content{align-items:stretch;background:var(--sidebar-background);border-right:min(1px,var(--sidebar-width)) solid var(--border);box-sizing:initial;display:flex;flex-direction:column;font-size:.6875rem;height:100vh;overflow:hidden;position:fixed;top:0;white-space:nowrap;width:var(--sidebar-width)}.Sidebar3000--resizing .Sidebar3000__content{will-change:width}.Sidebar3000__content>div:not(:first-child){border-top-width:1px}.Sidebar3000__lists{align-items:stretch;display:flex;flex-direction:column;flex-grow:1;overflow:hidden auto;position:relative}.Sidebar3000__hint{align-items:center;background:var(--bg-3000);border-top-width:1px;display:flex;flex:0 0 var(--sidebar-row-height);font-weight:500;justify-content:space-between;padding:0 var(--sidebar-horizontal-padding);z-index:1}.Sidebar3000__hint,.Sidebar3000__slider{-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar3000__slider{bottom:0;cursor:col-resize;position:absolute;right:calc(var(--sidebar-slider-padding)*-1 - min(1px,var(--sidebar-width)));top:0;width:calc(var(--sidebar-slider-padding)*2 + 1px);z-index:var(--z-notifications-popover)}.Sidebar3000__slider:after,.Sidebar3000__slider:before{bottom:0;content:"";left:var(--sidebar-slider-padding);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar3000__slider:before{background:var(--border);transition:transform .1s ease}.Sidebar3000__slider:after{background:var(--text-3000);opacity:0;transition:transform .1s ease}.Sidebar3000--resizing .Sidebar3000__slider:after,.Sidebar3000__slider:hover:after{opacity:.25}.Sidebar3000--resizing .Sidebar3000__slider:after,.Sidebar3000--resizing .Sidebar3000__slider:before{transform:scaleX(3)}.Sidebar3000[aria-hidden=true] .Sidebar3000__slider{cursor:e-resize}.Sidebar3000__header{align-items:center;display:flex;flex:0 0 var(--sidebar-row-height);gap:.25rem;padding:0 var(--sidebar-horizontal-padding)}.Accordion{--accordion-arrow-size:1rem;--accordion-row-height:1.75rem;--accordion-inset-expandable:1.25rem;--accordion-header-background:var(--accent-3000);--accordion-inset:0rem;display:flex;flex-basis:0;flex-direction:column;flex-shrink:0;min-height:var(--accordion-row-height)}[theme=dark] .Accordion{--accordion-header-background:var(--bg-3000)}.Accordion[aria-expanded]{--accordion-inset:var(--accordion-inset-expandable)}.Accordion:not([aria-expanded=false]){flex-grow:1}.Accordion:not([aria-expanded=false]):not(:last-child){border-bottom-width:1px}.Accordion[aria-disabled=true] .Accordion__header{cursor:default}.Accordion[aria-disabled=true] .Accordion__header:hover{background:var(--accordion-header-background)}.Accordion[aria-disabled=true]:not([aria-busy=true]) .Accordion__header .LemonIcon{visibility:hidden}.Accordion__header{align-items:center;background:var(--accordion-header-background);border-bottom-width:1px;cursor:pointer;display:flex;height:var(--accordion-row-height);padding:0 var(--sidebar-horizontal-padding);-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.Accordion__header:hover{background:var(--border-3000)}.Accordion__header>.LemonIcon{flex-shrink:0;font-size:var(--accordion-arrow-size);margin-right:calc(var(--accordion-inset-expandable) - var(--accordion-arrow-size));transition:transform 50ms ease}.Accordion[aria-expanded=true] .Accordion__header>.LemonIcon{transform:rotate(90deg)}.SidebarListItem{--sidebar-list-item-status-color:var(--muted);--sidebar-list-item-fold-size:0.5rem;--sidebar-list-item-ribbon-width:0.1875rem;--sidebar-list-item-background:var(--sidebar-background);background:var(--sidebar-list-item-background);border-bottom-width:1px;color:var(--muted);line-height:1.125rem;list-style:none;opacity:.9;position:relative}.SidebarListItem.SidebarListItem--is-renaming,.SidebarListItem:hover:not([aria-disabled=true]),.SidebarListItem[aria-current=page]{--sidebar-list-item-background:var(--border-3000);opacity:1}.SidebarListItem.SidebarListItem--is-menu-open .SidebarListItem__actions,.SidebarListItem.SidebarListItem--is-renaming .SidebarListItem__actions,.SidebarListItem:focus-within .SidebarListItem__actions,.SidebarListItem:hover .SidebarListItem__actions,.SidebarListItem[aria-current=page] .SidebarListItem__actions{display:flex}.SidebarListItem.SidebarListItem--is-menu-open.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__button,.SidebarListItem.SidebarListItem--is-menu-open.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__link,.SidebarListItem.SidebarListItem--is-renaming.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__button,.SidebarListItem.SidebarListItem--is-renaming.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__link,.SidebarListItem:focus-within.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__button,.SidebarListItem:focus-within.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__link,.SidebarListItem:hover.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__button,.SidebarListItem:hover.SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__link,.SidebarListItem[aria-current=page].SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__button,.SidebarListItem[aria-current=page].SidebarListItem--has-menu:not(.SidebarListItem--extended) .SidebarListItem__link{padding-right:calc(var(--sidebar-horizontal-padding) + 1.25rem)}.SidebarListItem.SidebarListItem--is-menu-open.SidebarListItem--has-menu.SidebarListItem--extended:after,.SidebarListItem.SidebarListItem--is-renaming.SidebarListItem--has-menu.SidebarListItem--extended:after,.SidebarListItem:focus-within.SidebarListItem--has-menu.SidebarListItem--extended:after,.SidebarListItem:hover.SidebarListItem--has-menu.SidebarListItem--extended:after,.SidebarListItem[aria-current=page].SidebarListItem--has-menu.SidebarListItem--extended:after{background:linear-gradient(to left,var(--sidebar-list-item-background) 0,var(--sidebar-list-item-background) 50%,transparent 100%);bottom:1px;content:"";position:absolute;right:1px;top:1px;width:3.5rem}.SidebarListItem.SidebarListItem--marker-fold:before,.SidebarListItem.SidebarListItem--marker-ribbon:before{content:"";display:block;left:0;position:absolute;top:0;z-index:1}.SidebarListItem.SidebarListItem--marker-fold:before{border-bottom:var(--sidebar-list-item-fold-size) solid transparent;border-left:var(--sidebar-list-item-fold-size) solid var(--sidebar-list-item-status-color);height:0;width:0}.SidebarListItem.SidebarListItem--marker-ribbon{--sidebar-list-item-marker-offset:var(--sidebar-list-item-ribbon-width)}.SidebarListItem.SidebarListItem--marker-ribbon:before{background:var(--sidebar-list-item-status-color);height:100%;width:var(--sidebar-list-item-ribbon-width)}.SidebarListItem.SidebarListItem--marker-status-success{--sidebar-list-item-status-color:var(--success)}.SidebarListItem.SidebarListItem--marker-status-warning{--sidebar-list-item-status-color:var(--warning)}.SidebarListItem.SidebarListItem--marker-status-danger{--sidebar-list-item-status-color:var(--danger)}.SidebarListItem.SidebarListItem--marker-status-completion{--sidebar-list-item-status-color:var(--purple)}.SidebarListItem__button,.SidebarListItem__link,.SidebarListItem__rename{--sidebar-list-item-inset:calc(var(--accordion-inset, 0px) + var(--sidebar-horizontal-padding) + var(--sidebar-list-item-marker-offset, 0px));color:inherit;display:flex;height:100%;position:relative;width:100%}.SidebarListItem__button:focus-visible:after,.SidebarListItem__link:focus-visible:after,.SidebarListItem__rename:focus-visible:after{border:1px solid var(--border-3000);content:"";inset:0 0 -1px;pointer-events:none;position:absolute}.SidebarListItem__link{color:inherit!important;flex-direction:column;justify-content:center;padding:0 var(--sidebar-horizontal-padding) 0 var(--sidebar-list-item-inset);row-gap:1px}.SidebarListItem[aria-disabled=true] .SidebarListItem__link{cursor:default}.SidebarListItem__button{align-items:center;color:inherit!important;cursor:pointer;flex-direction:row;font-size:1.125rem;gap:.25rem;padding:0 var(--sidebar-horizontal-padding) 0 var(--sidebar-list-item-inset);row-gap:1px}.SidebarListItem__button:hover{background:var(--border-3000)}.SidebarListItem__button .SidebarListItem__icon{flex-shrink:0}.SidebarListItem__button .SidebarListItem__name{overflow:hidden;text-overflow:ellipsis}.SidebarListItem__rename{background:var(--bg-light);flex-direction:column;justify-content:center}.SidebarListItem__rename input{background:none;color:var(--text-3000);font-size:.75rem;height:100%;outline:none;padding:0 calc(var(--sidebar-horizontal-padding) + 2.5rem) 0 var(--sidebar-list-item-inset);width:100%}.SidebarListItem__rename:after{border:1px solid var(--border);content:"";inset:0 0 -1px;pointer-events:none;position:absolute}.SidebarListItem[aria-invalid=true] .SidebarListItem__rename:after{border-color:var(--danger)}.SidebarListItem__error{background:var(--danger);color:#fff;left:0;line-height:1.25rem;padding:0 .25rem;position:absolute;top:2rem;white-space:normal;z-index:1}.SidebarListItem__error:before{border-bottom:.25rem solid transparent;border-bottom-color:var(--danger);border-left:.25rem solid transparent;border-left-color:var(--danger);border-right:.25rem solid transparent;border-top:.25rem solid transparent;content:"";display:block;left:0;position:absolute;top:-.5rem}.SidebarListItem__actions{display:none;position:absolute;right:var(--sidebar-horizontal-padding);top:50%;transform:translateY(-50%);z-index:1}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/components/KeyboardShortcut.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".KeyboardShortcut{align-items:center;background:var(--accent-3000);border-color:var(--secondary-3000-button-border-hover);border-radius:.25rem;border-width:1px 1px 2px;color:var(--text-3000);display:inline-flex;font-size:.75rem;height:1.25rem;justify-content:center;min-width:1.25rem;padding:.125rem .25rem;text-transform:capitalize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.KeyboardShortcut--muted>.KeyboardShortcut{background:none;color:var(--muted)}.KeyboardShortcut+.KeyboardShortcut__key{margin-left:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/components/TopBar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.TopBar3000{--breadcrumbs-compaction-rate:0;align-items:start;display:flex;height:var(--breadcrumbs-height-full);pointer-events:none;position:sticky;top:0;white-space:nowrap;z-index:var(--z-top-navigation)}.TopBar3000 .EditableField__display{text-overflow:ellipsis;white-space:nowrap}.TopBar3000__content{align-items:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--glass-bg-3000);border-bottom:1px solid var(--glass-border-3000);display:flex;font-size:calc(.75rem + .0625rem*var(--breadcrumbs-compaction-rate));font-weight:600;gap:.5rem;height:calc(var(--breadcrumbs-height-full) - (var(--breadcrumbs-height-full) - var(--breadcrumbs-height-compact))*var(--breadcrumbs-compaction-rate));line-height:1rem;padding:0 1rem;pointer-events:auto;width:100%}.TopBar3000__hamburger{margin-left:-.5rem}.TopBar3000__breadcrumbs{flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden}.TopBar3000__trail{align-items:center;display:flex;margin-top:calc(.25rem*(1 - var(--breadcrumbs-compaction-rate)));overflow:visible}.TopBar3000:not(.TopBar3000--compact) .TopBar3000__trail{height:1rem}.TopBar3000__here{box-sizing:initial;font-family:var(--font-sans)!important;font-size:1rem;font-weight:700;height:calc(1.2em*(1 - var(--breadcrumbs-compaction-rate)));line-height:1.2;margin:0;overflow:hidden;padding:calc(.5rem*(1 - var(--breadcrumbs-compaction-rate))) 0 0;position:relative}.TopBar3000--compact .TopBar3000__here{visibility:hidden}.TopBar3000__here>*{bottom:.25rem;height:1.2em;position:absolute}.TopBar3000__breadcrumb{align-items:center;color:var(--muted);cursor:default;display:flex;flex-shrink:0;overflow:hidden;white-space:pre}.TopBar3000__breadcrumb.Link:hover{color:inherit}.TopBar3000__breadcrumb .LemonIcon{font-size:1rem;margin-left:.125rem}.TopBar3000__breadcrumb .LemonTag--default{border-color:var(--muted);font-weight:600;opacity:.5;text-transform:uppercase}.TopBar3000__breadcrumb.TopBar3000__breadcrumb--here{color:var(--text-3000);cursor:default;flex-shrink:1}.TopBar3000--full .TopBar3000__breadcrumb.TopBar3000__breadcrumb--here{visibility:hidden}.TopBar3000__breadcrumb.TopBar3000__breadcrumb--here>*{transform:translateY(calc(100%*(1 - var(--breadcrumbs-compaction-rate))))}.TopBar3000__breadcrumb.TopBar3000__breadcrumb--actionable{cursor:pointer}.TopBar3000__breadcrumb.TopBar3000__breadcrumb--actionable.TopBar3000__breadcrumb--open,.TopBar3000__breadcrumb.TopBar3000__breadcrumb--actionable:hover{color:var(--text-3000)}.TopBar3000__breadcrumb.TopBar3000__breadcrumb--actionable.TopBar3000__breadcrumb--open .LemonTag--default,.TopBar3000__breadcrumb.TopBar3000__breadcrumb--actionable:hover .LemonTag--default{opacity:1}.TopBar3000__separator{flex-shrink:0;margin:0 .5rem;opacity:.5}.TopBar3000__separator:after{content:"/"}.TopBar3000__more{margin-left:.5rem}.TopBar3000__actions{align-items:center;display:flex;gap:.5rem;justify-content:flex-end}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation-3000/sidepanel/SidePanel.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".SidePanel3000{--side-panel-bar-width:3rem;background:var(--accent-3000);box-sizing:initial;display:flex;flex-shrink:0;position:relative;width:3rem;z-index:var(--z-main-nav)}.SidePanel3000--open{max-width:60%;min-width:28rem;position:relative;width:min(30%,40rem)}@media(max-width:1200px){.SidePanel3000--open{box-shadow:0 0 30px rgba(0,0,0,.2);max-width:calc(100vw - var(--side-panel-bar-width));position:fixed;right:0;top:0}[theme=dark] .SidePanel3000--open{box-shadow:none}}.SidePanel3000--resizing{pointer-events:none}.SidePanel3000__bar{align-items:center;border-left-width:1px;display:flex;flex-direction:column;height:100vh;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--side-panel-bar-width)}.SidePanel3000__bar .LemonButton__icon{transform:rotate(-90deg)}.SidePanel3000__tabs{flex:1;overflow:hidden auto;width:var(--side-panel-bar-width)}.SidePanel3000__tabs::-webkit-scrollbar{display:none}.SidePanel3000__tabs-content{align-items:center;display:flex;gap:.25rem;height:var(--side-panel-bar-width);margin-top:calc((var(--side-panel-bar-width) - .25rem)*-1);transform:rotate(90deg);transform-origin:bottom left}.SidePanel3000__tabs-content .LemonButton{padding-bottom:0!important;padding-right:1px!important}.SidePanel3000__tabs-content .LemonButton .LemonButton__chrome{padding:.25rem calc(var(--lemon-button-padding-right, var(--lemon-button-padding-horizontal)) + var(--lemon-button-chrome-depth)*.5) .25rem calc(var(--lemon-button-padding-left, var(--lemon-button-padding-horizontal)) - var(--lemon-button-chrome-depth)*.5)!important}.SidePanel3000__tabs-content .LemonButton .LemonButton__chrome:after{box-shadow:var(--lemon-button-chrome-depth) 0 0 -1px var(--lemon-button-frame-bg-color)!important;inset:-1px calc(var(--lemon-button-chrome-depth) - 1px) -1px -1px!important}.SidePanel3000__tabs-content .LemonButton:hover:not([aria-disabled=true]) .LemonButton__chrome,.SidePanel3000__tabs-content .LemonButton:not([aria-disabled=true]):active .LemonButton__chrome{transform:translateX(var(--lemon-button-depth))!important}.SidePanel3000__tabs-content .LemonButton:hover:not([aria-disabled=true]) .LemonButton__chrome:after,.SidePanel3000__tabs-content .LemonButton:not([aria-disabled=true]):active .LemonButton__chrome:after{box-shadow:calc(var(--lemon-button-chrome-depth) - var(--lemon-button-depth)) 0 0 -1px var(--lemon-button-frame-bg-color)!important}.SidePanel3000__tabs-content .LemonButton:hover:not([aria-disabled=true]) .LemonButton__chrome:before,.SidePanel3000__tabs-content .LemonButton:not([aria-disabled=true]):active .LemonButton__chrome:before{bottom:-1px!important;right:calc(var(--lemon-button-depth) - 1px)!important}.SidePanel3000__content{border-left-width:1px;display:flex;flex:1;flex-direction:column;height:100vh;overflow-y:auto}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/layout/navigation/TopBar/AccountPopover.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".AccountPopover{max-width:22rem;min-width:16rem}.AccountPopover__side-link{color:var(--primary-3000);flex-grow:1;font-size:.8125rem;font-weight:600;margin-left:.5rem;text-align:right}.AccountPopover__section{border-bottom:1px solid var(--border);padding:.5rem 0;width:100%}.AccountPopover__section:first-child{padding-top:0}.AccountPopover__section:last-child{border-bottom:none;padding-bottom:0}.AccountInfo{align-items:center;display:flex}.AccountInfo__identification{margin-left:.5rem;overflow:hidden;width:100%}.AccessLevelIndicator{font-size:.625rem;margin-left:.5rem;text-transform:uppercase}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/ActivityLog/ActivityLog.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ActivityLog.notifications-menu{max-width:25rem}.ActivityLog .ActivityDescription{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);padding:1rem}.ActivityLog .ActivityDescription .taxonomic-breakdown-filter.tag-pill{background:none;border:none;border-radius:0;font-size:.8125rem;padding:0;vertical-align:unset}.ActivityLog .ActivityDescription section:not(:last-child){margin-bottom:.5rem}.ActivityLog .page-caption{max-width:50rem}.ActivityLogRow{display:flex;gap:.5rem;line-height:24px;max-width:50rem;overflow-wrap:anywhere;padding:.5rem}.ActivityLogRow--unread{background-color:var(--primary-highlight);border-radius:var(--radius)}.ActivityLogRow .ProfilePicture{flex-grow:0}.ActivityLogRow .ActivityLogRow__details{flex-grow:1}.ActivityLogRow .ActivityLogRow__details .highlighted-activity{background-color:var(--mark);display:inline}.ActivityLogRow .ActivityLogRow__details .highlighted-activity>.PersonDisplay{min-width:5.5rem}.ActivityLogRow .ActivityLogRow__description ul.bullet-list{list-style-type:disc;padding-left:20px}.ActivityLogRow .ActivityLogRow__description ul.bullet-list li{display:list-item}.ActivityLogRow .ActivityLogRow__description__extended{margin-bottom:.5rem;margin-top:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/ActivityLog/SentenceList.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".sentence-list,.sentence-list .sentence-part{display:inline}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Animation/Animation.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Animation{align-items:center;aspect-ratio:1/1;display:inline-flex;justify-content:center;max-width:300px;opacity:1;overflow:hidden;transition:opacity .4s ease}.Animation.Animation--hidden{opacity:0}.Animation .Animation__player{display:block;height:100%;width:100%}.Animation .Animation__player svg{display:block}.Animation.Animation--large{width:100%}.Animation.Animation--small{overflow:visible}.Animation.Animation--small svg{height:45px!important;width:45px!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/AnnotationsOverlay/AnnotationsOverlay.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".AnnotationsOverlay{left:var(--annotations-overlay-chart-area-left);position:absolute;top:var(--annotations-overlay-chart-area-height)}.AnnotationsBadge{align-items:center;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background:none;border:none;cursor:pointer;display:flex;height:3rem;justify-content:center;margin-left:calc(var(--annotations-overlay-tick-interval)*var(--annotations-badge-index) - var(--annotations-overlay-chart-area-left) + var(--annotations-overlay-first-tick-left));position:absolute;transform:translate(-50%,-50%);width:var(--annotations-overlay-tick-interval)}.AnnotationsBadge>.LemonBadge{border-color:var(--bg-light);transform:scale(var(--annotations-badge-scale));transform-origin:center;transition:transform .2s ease}.AnnotationsPopover{--annotations-popover-width:30rem;transition:left .2s ease,opacity .1s ease,transform .1s ease;z-index:var(--z-annotation-popover)!important}.AnnotationsPopover .LemonModal{border:none;box-shadow:none;margin:0;max-width:var(--annotations-popover-width);min-height:100%;min-width:var(--annotations-popover-width)}.AnnotationCard .profile-package{vertical-align:bottom}.AnnotationCard h5{margin:0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Cards/CardMeta.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".InsightCard .handle,.TextCard .handle{align-items:flex-end;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%;z-index:var(--z-raised)}.InsightCard .handle.horizontal svg,.TextCard .handle.horizontal svg{transform:rotate(90deg) translateX(.75rem)}.InsightCard .handle.vertical,.TextCard .handle.vertical{flex-direction:column}.InsightCard .handle.vertical svg,.TextCard .handle.vertical svg{transform:translateX(.5rem)}.InsightCard .handle.corner,.TextCard .handle.corner{justify-content:flex-end}.InsightCard .handle.corner svg,.TextCard .handle.corner svg{transform:translate(.5rem,.5rem)}.CardMeta{background:var(--bg-light);border-radius:var(--radius);display:flex;flex-direction:column;flex-shrink:0;max-height:calc(100% - 2rem);position:relative;width:100%;z-index:var(--z-raised)}.CardMeta--with-details .CardMeta__top{height:1.5rem}.CardMeta h5{color:var(--muted);line-height:1rem;margin-bottom:0}.CardMeta h4,.CardMeta h5{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CardMeta h4{font-size:1rem;font-weight:600;height:1.5em;margin-bottom:.125rem}.CardMeta .CardMeta__primary{display:flex;padding:1rem;width:100%}.CardMeta .CardMeta__divider{background:var(--border);height:1px;margin:0 1rem;opacity:0;transition:opacity .2s ease}.CardMeta .CardMeta__details{background:var(--bg-light);border-bottom-width:1px;left:0;margin-top:-1px;max-height:24rem;overflow-y:auto;position:absolute;right:0;top:100%;transition:box-shadow .2s ease,height .2s ease,margin .2s ease}.CardMeta .CardMeta__details .CardMeta__details__content{overflow-y:auto;pointer-events:none}.CardMeta.CardMeta--details-shown .CardMeta__details{box-shadow:var(--shadow-elevation-3000);margin-top:0}.CardMeta.CardMeta--details-shown .CardMeta__details .CardMeta__details__content{opacity:1;pointer-events:all}.CardMeta.CardMeta--details-shown .CardMeta__divider{opacity:1}.CardMeta__ribbon{align-self:stretch;background:var(--muted);border-radius:var(--radius);flex-shrink:0;margin:0 .75rem 0 -.25rem;width:.375rem}.CardMeta__ribbon.blue{background:var(--blue)}.CardMeta__ribbon.purple{background:var(--purple)}.CardMeta__ribbon.green{background:var(--green)}.CardMeta__ribbon.black{background:var(--black)}.CardMeta__main{align-items:flex-start;display:flex;flex-direction:column;height:-moz-fit-content;height:fit-content;min-height:2rem;width:100%}.CardMeta__main>*{max-width:100%}.CardMeta__top{align-items:center;align-self:stretch;display:flex;height:2rem;justify-content:space-between}.CardMeta__top .LemonButton{height:1.75rem}.CardMeta__controls{align-items:center;display:flex;gap:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Cards/InsightCard/InsightCard.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.InsightCard{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;height:30rem;max-width:100%;min-width:0;position:relative;transition:border .2s ease;z-index:3}.InsightCard--highlighted{border-color:var(--primary-3000);outline:1px solid var(--primary-3000)}.InsightCard .ErrorBoundary{height:100%;margin:auto;width:100%}.InsightCard__viz{border-radius:0 0 var(--radius) var(--radius);display:flex;flex:1;flex-direction:column;overflow:auto;position:relative;width:100%}.InsightCard__viz .AnnotationsOverlay,.InsightCard__viz .LineGraph{padding:.5rem}.InsightCard__viz .insight-empty-state{font-size:.875rem;height:100%;padding-bottom:0;padding-top:0}.InsightCard__viz .LemonTable{background:none;border:none;border-radius:0}.WebAnalyticsDashboard .InsightVizDisplay .InsightCard__viz{min-height:var(--insight-viz-min-height)}.CardMeta .InsightDetails,.InsightDetails{font-size:.8125rem;line-height:1.5rem}.CardMeta .InsightDetails h5,.InsightDetails h5{line-height:1.5rem;margin-bottom:.125rem}.CardMeta .InsightDetails section:not(:last-child),.InsightDetails section:not(:last-child){margin-bottom:.5rem}.CardMeta .InsightDetails .LemonRow,.InsightDetails .LemonRow{font-size:inherit;min-height:2rem}.InsightDetails__query{border-radius:var(--radius);border-width:1px;margin-top:.25rem;padding:.375rem .5rem}.InsightDetails__query .LemonRow{padding-left:0;padding-right:0}.InsightDetails__formula code{font-weight:600;margin-left:.375rem}.InsightDetails__series{margin:-.125rem 0}.InsightDetails__series:not(:first-child){margin-top:.5rem}.InsightDetails__series .LemonDivider{margin-left:1.5rem;width:calc(100% - 1.5rem)}.InsightDetails__footer{display:flex;flex-wrap:wrap;gap:.5rem 2rem}.InsightDetails__footer .profile-package{vertical-align:middle}.InsightDetails__footer .taxonomic-breakdown-filter.tag-pill{background:none;border:none;border-radius:0;font-size:.8125rem;padding:0;vertical-align:unset}.SeriesDisplay{line-height:1.5rem}.SeriesDisplay__raw-name{align-items:center;background:var(--primary-highlight);border-radius:var(--radius);color:var(--text-3000);display:inline-flex;font-size:.6875rem;font-weight:600;line-height:1rem;margin:0 .25rem;padding:.125rem .25rem;vertical-align:middle}.SeriesDisplay__raw-name.SeriesDisplay__raw-name--action,.SeriesDisplay__raw-name.SeriesDisplay__raw-name--event{padding:.25rem}.SeriesDisplay__raw-name.SeriesDisplay__raw-name--action:before,.SeriesDisplay__raw-name.SeriesDisplay__raw-name--event:before{background:var(--primary-3000);border-radius:var(--radius);color:var(--bg-light);display:inline-block;flex-shrink:0;font-size:.625rem;font-weight:700;line-height:1rem;margin-right:.25rem;text-align:center;width:1rem}.SeriesDisplay__raw-name.SeriesDisplay__raw-name--action:before{content:"A"}.SeriesDisplay__raw-name.SeriesDisplay__raw-name--event:before{content:"E"}.SeriesDisplay__condition{display:flex}.SeriesDisplay__arrow{color:var(--border-bold);flex-shrink:0;font-size:1.25rem;margin-right:.25rem}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Cards/TextCard/TextCard.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".TextCard__body{flex:1;overflow-y:auto}.TextCard__body ul{list-style-position:inside;list-style-type:disc}.TextCard__body ol{list-style-position:inside;list-style-type:numeric}.TextCard__body img{max-width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/CodeSnippet/CodeSnippet.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".CodeSnippet{font-size:.875rem;position:relative}.CodeSnippet.CodeSnippet--compact{font-size:.8125rem}.CodeSnippet.CodeSnippet--compact .CodeSnippet__actions{right:.375rem;top:.375rem}.CodeSnippet.CodeSnippet--compact pre{padding-top:.375rem}.CodeSnippet .CodeSnippet__actions{background:var(--accent-3000)!important;display:flex;gap:.5rem;position:absolute;right:.5rem;top:.75rem}.CodeSnippet pre{background:var(--accent-3000)!important;border:1px solid var(--border-3000)!important;border-radius:var(--radius)!important;padding:.75rem 1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/CommandBar/index.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonInput.CommandBar__input{border-color:transparent!important;border-radius:0;height:3rem;padding-left:1rem;padding-right:.5rem}.SearchBarTab:hover{border-left:2px solid var(--border-3000)}.SearchBarTab.SearchBarTab__active{border-color:var(--primary-3000)}.CommandBar__overlay{align-items:center;-webkit-backdrop-filter:blur(var(--modal-backdrop-blur));backdrop-filter:blur(var(--modal-backdrop-blur));background-color:var(--modal-backdrop-color);display:flex;flex-direction:column;height:100%;justify-content:center;left:0;padding:.75rem;position:fixed;top:0;width:100%;z-index:var(--z-command-palette)}.CommandBar__overlay-content{height:100%;max-height:40rem;max-width:62rem;overflow:hidden;width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/DateDisplay/DateDisplay.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".dated-highlight{background-color:var(--bg-light);border:1px solid var(--border-light);border-radius:var(--radius);color:var(--muted);margin-right:4px;padding:.125rem .25rem}.date-display-dates,.dated-highlight{white-space:nowrap}.date-display-dates .secondary-date{color:var(--muted-alt);font-weight:400;margin-left:2px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/DateFilter/RollingDateRangeFilter.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".RollingDateRangeFilter{align-items:center;color:var(--text-3000);cursor:pointer;display:flex;font-size:.875rem;font-weight:400;height:1.6875rem;line-height:1.375em;min-height:2rem;padding:1.25rem 0;transition:background .3s ease}.RollingDateRangeFilter:hover{background-color:var(--bg-3000)}.RollingDateRangeFilter input::-webkit-inner-spin-button,.RollingDateRangeFilter input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.RollingDateRangeFilter input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.RollingDateRangeFilter__label{flex-shrink:0;margin:0 auto}.RollingDateRangeFilter__counter{align-items:center;background-color:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);box-sizing:border-box;display:flex;height:1.6875rem;line-height:1.5rem;margin:0 .25rem}.RollingDateRangeFilter__counter .LemonInput{border:none;height:unset;min-height:0;padding:0;width:3rem}.RollingDateRangeFilter__counter .LemonInput input{text-align:center}.RollingDateRangeFilter__counter .RollingDateRangeFilter__counter__step{border-radius:calc(var(--radius) - 1px);height:100%;margin:0;padding:0;text-align:center;width:1.25rem}.RollingDateRangeFilter__counter .RollingDateRangeFilter__counter__step:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.RollingDateRangeFilter__counter .RollingDateRangeFilter__counter__step:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.RollingDateRangeFilter__counter .RollingDateRangeFilter__counter__step:hover{background-color:var(--accent-3000)}.RollingDateRangeFilter__select{width:6rem}.RollingDateRangeFilter__popover{z-index:9999}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/DefinitionPopover/DefinitionPopover.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".definition-popover{max-width:20rem;min-width:17rem;padding:.5rem .75rem .75rem}.definition-popover .definition-popover-header{display:flex;flex-direction:column}.definition-popover .definition-popover-header .definition-popover-header-row{display:flex;flex-direction:row;justify-content:space-between;line-height:2rem;margin-bottom:.25rem}.definition-popover .definition-popover-header .definition-popover-header-row .definition-popover-header-row-title{color:var(--muted);font-size:.6875rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase}.definition-popover .definition-popover-header .definition-popover-header-row .definition-popover-header-row-buttons{display:flex;flex-direction:row;font-size:.8125rem}.definition-popover .definition-popover-header .definition-popover-header-row .definition-popover-header-row-buttons a{margin-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.definition-popover .definition-popover-header .definition-popover-header-row .definition-popover-header-row-buttons .definition-popover-disabled-button{color:var(--muted);cursor:not-allowed}.definition-popover .definition-popover-header .definition-popover-title{align-items:center;display:flex;font-size:1.25rem;font-weight:600;line-height:1.2;margin-bottom:.25rem;min-height:1.5rem;white-space:normal}.definition-popover .definition-popover-header .definition-popover-title svg.taxonomy-icon{flex-shrink:0;font-size:1.5rem;margin-right:.75rem}.definition-popover .definition-popover-header .definition-popover-title svg.taxonomy-icon.taxonomy-icon-muted{color:var(--muted-alt)}.definition-popover .definition-popover-header .definition-popover-title svg.taxonomy-icon.taxonomy-icon-verified{color:var(--success)}.definition-popover .definition-popover-header .definition-popover-title svg.taxonomy-icon.taxonomy-icon-built-in{color:var(--primary-3000)}.definition-popover .definition-popover-tags{margin:0!important}.definition-popover .definition-popover-description{font-weight:400;margin:.5rem 0;overflow-wrap:break-word}.definition-popover .definition-popover-description.empty{color:var(--muted);font-style:italic}.definition-popover .definition-popover-examples{font-style:italic;margin-bottom:.25rem}.definition-popover .definition-popover-timemeta{margin:.5rem 0}.definition-popover .definition-popover-timemeta .definition-popover-timemeta-user{display:inline-flex}.definition-popover .definition-popover-timemeta .definition-popover-timemeta-spacer{margin-right:.5rem}.definition-popover .DefinitionPopover{background-color:var(--bg-3000)}.definition-popover .DefinitionPopover .DefinitionPopover__label{align-items:flex-start;font-size:.6875rem;margin-bottom:1rem;margin-top:1rem;text-transform:uppercase}.definition-popover .definition-popover-grid{display:grid;grid-gap:.5rem}.definition-popover .definition-popover-grid .definition-popover-grid-card{display:flex;flex-direction:column}.definition-popover .definition-popover-grid .definition-popover-grid-card .definition-popover-grid-card-title{color:var(--muted);font-size:.6875rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase}.definition-popover .definition-popover-grid .definition-popover-grid-card .definition-popover-grid-card-content{margin-top:.25rem}.definition-popover .definition-popover-edit-form{display:flex;flex-direction:column}.definition-popover .definition-popover-edit-form .label-text{font-weight:600;margin-right:.25rem}.definition-popover .definition-popover-edit-form .definition-popover-edit-form-label{margin-bottom:.5rem}.definition-popover .definition-popover-edit-form .definition-popover-edit-form-value{margin-bottom:1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/EditableField/EditableField.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".EditableField{align-items:center;display:flex;max-width:100%}.EditableField:not(.EditableField--multiline){line-height:1.15em}.EditableField i{color:var(--muted)}.EditableField .EditableField__notice{color:var(--muted);font-size:1.5rem;margin-left:.5rem}.EditableField .EditableField__highlight{align-items:center;display:flex;flex-direction:row;margin:-.25rem;max-width:calc(100% + .5rem);overflow:auto;padding:.25rem;width:-moz-fit-content;width:fit-content}.EditableField .EditableField__display{overflow:hidden;white-space:pre-wrap}.EditableField.EditableField--editing .EditableField__highlight{align-items:flex-end;border-radius:var(--radius);flex-grow:1;max-width:calc(100% + .5rem);outline:1px solid var(--border);width:auto}.EditableField.EditableField--underlined .EditableField__highlight{margin-bottom:0;margin-top:0;padding-bottom:0;padding-top:0}.EditableField.EditableField--underlined.EditableField--editing .EditableField__highlight{outline:none}.EditableField.EditableField--underlined.EditableField--editing .EditableField__highlight input{border-bottom:1px dashed var(--muted);margin-bottom:-1px}.EditableField .EditableField__actions{align-items:center;display:flex;flex-shrink:0;gap:.5rem;margin-left:.5rem;overflow:hidden}.EditableField input,.EditableField textarea{background:transparent;border:none;color:var(--text-3000);font:inherit;max-width:100%;outline:none;padding:0}.EditableField textarea{align-self:center;width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/EmptyMessage/EmptyMessage.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".empty-message{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center}.empty-message .description,.empty-message .title{text-align:center}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Errors/ErrorDisplay.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ErrorDisplay__stacktrace .LemonCollapsePanel__header{background-color:var(--accent-3000);min-height:1.875rem!important;padding:0!important}.ErrorDisplay__stacktrace .LemonCollapsePanel__header--disabled:hover{background-color:var(--accent-3000)!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Fade/Fade.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,"@keyframes Fade__fade-in{0%{opacity:0}to{opacity:1}}@keyframes Fade__fade-out{0%{opacity:1}to{opacity:0}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/HTMLElementsDisplay/SelectableElement.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".SelectableElement{border:1px solid transparent;border-radius:var(--radius);transition:background-color .2s ease,color .2s ease,border .2s ease}.SelectableElement.SelectableElement--selected{background:var(--primary-3000)}.SelectableElement:hover{background:var(--primary-3000-hover)}.SelectableElement:active{background:var(--primary-3000-active)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".HedgehogBuddy{cursor:pointer;margin:0;z-index:var(--z-hedgehog-buddy)}.HedgehogBuddy:after{content:attr(data-content);height:0;overflow:hidden;position:absolute;width:0;z-index:-1}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/InsightLabel/InsightLabel.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".insights-label{max-width:100%}.insights-label .value{font-size:1.176em;font-weight:700;margin-left:.3rem;padding-right:4px}.insights-label .graph-series-glyph{margin-left:2px;margin-right:4px;padding:0 6px}.insights-label .color-icon{border:2px solid #fff;border-radius:50%;box-sizing:border-box;margin-left:2px;margin-right:6px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/InsightLegend/InsightLegend.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".InsightLegendMenu{background-color:var(--bg-light);box-shadow:none!important;max-height:100%}.InsightLegendMenu.InsightLegendMenu--in-card-view{max-width:40%}.InsightLegendMenu.InsightLegendMenu--horizontal{max-width:100%}.InsightLegendMenu.InsightLegendMenu--horizontal .InsightLegendMenu-scroll{display:flex;flex-wrap:wrap}.InsightLegendMenu.InsightLegendMenu--horizontal .InsightLegendMenu-scroll .InsightLegendMenu-item{width:auto}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Map/Maplibre.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px var(--primary-3000)}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:var(--bg-light);color:var(--muted-3000)}.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button{background-color:var(--bg-3000)}[theme=dark] .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:var(--bg-3000)}[theme=dark] .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl-attrib a{color:var(--text-3000)}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/NotFound/NotFound.scss":(module,exports,__webpack_require__)=>{var ___CSS_LOADER_API_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_GET_URL_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/getUrl.js"),___CSS_LOADER_URL_IMPORT_0___=__webpack_require__("./frontend/public/not-found-astrohog.png");exports=___CSS_LOADER_API_IMPORT___(!1);var ___CSS_LOADER_URL_REPLACEMENT_0___=___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);exports.push([module.id,".NotFoundComponent{align-items:center;display:flex;flex-direction:column;margin:6rem auto;max-width:50rem;padding:0 1rem;text-align:center}.NotFoundComponent .NotFoundComponent__graphic{background:url("+___CSS_LOADER_URL_REPLACEMENT_0___+") no-repeat 50%;height:270px;width:100%}.NotebookNode .NotFoundComponent{align-items:center;background-color:var(--danger-highlight);display:flex;flex:1;flex-direction:column;justify-content:center;margin:0;max-width:100%;padding:2rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Playlist/Playlist.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Playlist{align-items:flex-start;border:1px solid var(--border);border-radius:var(--radius);flex-direction:row;justify-content:flex-start}.Playlist,.Playlist .Playlist__list{display:flex;height:100%;overflow:hidden}.Playlist .Playlist__list{flex-direction:column;flex-shrink:0;position:relative}.Playlist .Playlist__list:not(.Playlist__list--collapsed){max-width:320px;min-width:285px;width:25%}.Playlist .Playlist__list .text-link{color:var(--text-3000)!important}.Playlist .Playlist__main{flex:1;height:100%;overflow:hidden;width:100%}.Playlist--embedded{border:none}.Playlist--wide .Playlist__main{flex:1;height:100%}.SessionRecordingPlaylistHeightWrapper{height:calc(100vh - 15rem);min-height:25rem}.SessionRecordingPreview{border-left:3px solid transparent}.SessionRecordingPreview--active{border-left-color:var(--primary-3000)}.SessionRecordingPreview:hover{background-color:var(--primary-highlight)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertiesTable/PropertiesTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".properties-table-key{display:flex;max-width:24rem;min-width:8rem}.properties-table-value{align-items:center;display:flex;max-width:-moz-fit-content;max-width:fit-content;min-width:12rem}.properties-table-value .value-link>*{vertical-align:middle}.properties-table-value .value-link>svg{font-size:1rem;margin-left:.25rem}.properties-table-value .editable{border:1px solid transparent;border-radius:calc(var(--radius)*.75);cursor:pointer;margin-left:-.25rem;padding:.125rem .25rem}.properties-table-value .editable:hover{background:var(--bg-light);border:1px solid var(--border-light)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertyFilters/PropertyFilters.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PropertyFilters{display:flex;gap:.5rem}.PropertyFilters .PropertyFilters__content{display:flex;flex:1;flex-wrap:wrap;gap:.5rem}.PropertyFilters .PropertyFilters__prefix{color:var(--border-bold-3000);font-size:18px;padding:0 5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.PropertyFilters .logical-row-divider{align-items:flex-start;font-size:12px;font-weight:600;margin-bottom:0;margin-top:.5rem;text-transform:uppercase}.PropertyFilters .logical-row-divider:after,.PropertyFilters .logical-row-divider:before{border-top:1px solid var(--border)}.PropertyFilters .logical-row-divider:before{width:1.5%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertyFilters/components/FilterRow.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".property-filter-row{flex-basis:100%}.property-filter-row.wrap-filters{flex-basis:auto}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PropertyFilterButton{align-items:center;background:var(--border);border:1px solid var(--secondary-3000-button-border);border-radius:99rem;color:var(--text-3000);cursor:default;display:inline-flex;gap:.375rem;height:2rem;outline:0;overflow:hidden;padding:.25rem .625rem;white-space:nowrap}.PropertyFilterButton[aria-disabled=true]:not(.LemonButton--loading){cursor:not-allowed;opacity:var(--opacity-disabled)}.PropertyFilterButton:focus,.PropertyFilterButton:hover:not([aria-disabled=true]){border-color:var(--secondary-3000-button-border-hover)}.PropertyFilterButton:not(.PropertyFilterButton--clickable){border-color:transparent}.PropertyFilterButton.PropertyFilterButton--clickable{cursor:pointer;touch-action:manipulation}.PropertyFilterButton.PropertyFilterButton--closable{padding-right:.5rem}.PropertyFilterButton>:not(.PropertyFilterButton-content){flex-shrink:0}.PropertyFilterButton .PropertyFilterButton-content{flex:1;overflow:hidden;text-overflow:ellipsis}.PropertyFilterButton>.LemonIcon{font-size:1rem}.PropertyFilterButton .LemonButton{border-radius:99rem;margin:0 -.375rem 0 -.125rem}.PropertyFilterButton .LemonButton__chrome{min-height:auto;padding:.1875rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertyFilters/components/TaxonomicPropertyFilter.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".TaxonomicPropertyFilter{overflow:hidden;width:100%}.TaxonomicPropertyFilter--in-dropdown{background:var(--bg-light);max-width:100%;min-width:300px;width:900px}.TaxonomicPropertyFilter--in-dropdown .TaxonomicPropertyFilter__row-items>:first-child{width:10rem}.TaxonomicPropertyFilter__row{display:flex;gap:.5rem;overflow:hidden}.TaxonomicPropertyFilter__row-operator{align-items:center;display:flex;flex-shrink:0;height:40px;justify-content:flex-end;width:4.5rem}.TaxonomicPropertyFilter__row--or-filtering .TaxonomicPropertyFilter__row-operator{width:2rem}.TaxonomicPropertyFilter__row-arrow{color:var(--border-bold-3000);font-size:18px;font-weight:700;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.TaxonomicPropertyFilter__row-items{align-items:center;display:flex;flex:1;flex-wrap:wrap;gap:.5rem;overflow:hidden}.TaxonomicPropertyFilter__row-items>*{max-width:100%;overflow:hidden}.TaxonomicPropertyFilter__row--showing-operators .TaxonomicPropertyFilter__row-items>:first-child{flex-grow:1;min-width:10rem;width:30%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/PropertyKeyInfo.scss":(module,exports,__webpack_require__)=>{var ___CSS_LOADER_API_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_GET_URL_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/getUrl.js"),___CSS_LOADER_URL_IMPORT_0___=__webpack_require__("./frontend/public/posthog-icon.svg"),___CSS_LOADER_URL_IMPORT_1___=__webpack_require__("./frontend/public/langfuse-icon.svg");exports=___CSS_LOADER_API_IMPORT___(!1);var ___CSS_LOADER_URL_REPLACEMENT_0___=___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___),___CSS_LOADER_URL_REPLACEMENT_1___=___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);exports.push([module.id,".PropertyKeyInfo,.PropertyKeyInfo__header{align-items:center;display:inline-flex;gap:.25rem;max-width:100%;overflow:hidden;vertical-align:bottom}.PropertyKeyInfo__header{font-weight:600}.PropertyKeyInfo__text.PropertyKeyInfo__text--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.PropertyKeyInfo__logo{background-size:cover;display:inline-block;flex-shrink:0;height:1rem;width:1rem}.PropertyKeyInfo__logo--posthog{background-image:url("+___CSS_LOADER_URL_REPLACEMENT_0___+")}.PropertyKeyInfo__logo--langfuse{background-image:url("+___CSS_LOADER_URL_REPLACEMENT_1___+")}.PropertyKeyInfo__overlay{padding:.25rem}.PropertyKeyInfo__overlay p{margin-bottom:.25rem}.PropertyKeyInfo__overlay p:last-child{margin-bottom:0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Resizer/Resizer.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.Resizer{--resizer-thickness:8px;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:var(--z-notifications-popover)}.Resizer--left,.Resizer--right{--scale:scaleX(3);bottom:0;cursor:col-resize;top:0;width:var(--resizer-thickness)}.Resizer--left .Resizer__handle,.Resizer--right .Resizer__handle{bottom:0;left:calc(var(--resizer-thickness)/2);top:0;width:1px}.Resizer--left .Resizer__handle:after,.Resizer--left .Resizer__handle:before,.Resizer--right .Resizer__handle:after,.Resizer--right .Resizer__handle:before{bottom:0;top:0;width:1px}.Resizer--bottom,.Resizer--top{--scale:scaleY(3);cursor:row-resize;height:var(--resizer-thickness);left:0;right:0}.Resizer--bottom .Resizer__handle,.Resizer--top .Resizer__handle{height:1px;left:0;right:0;top:calc(var(--resizer-thickness)/2)}.Resizer--bottom .Resizer__handle:after,.Resizer--bottom .Resizer__handle:before,.Resizer--top .Resizer__handle:after,.Resizer--top .Resizer__handle:before{height:1px;left:0;right:0}.Resizer[aria-hidden=true] .Resizer{cursor:e-resize}.Resizer .Resizer__handle{position:absolute}.Resizer .Resizer__handle:after,.Resizer .Resizer__handle:before{box-sizing:initial;content:"";position:absolute}.Resizer .Resizer__handle:before{background:var(--border);transition:transform .1s ease}.Resizer .Resizer__handle:after{background:var(--text-3000);opacity:0;transition:transform .1s ease}.Resizer--left{left:0;transform:translateX(calc(var(--resizer-thickness)/2*-1))}.Resizer--right{right:0;transform:translateX(calc(var(--resizer-thickness)/2*1))}.Resizer--top{top:0;transform:translateY(calc(var(--resizer-thickness)/2*-1))}.Resizer--bottom{bottom:0;transform:translateY(calc(var(--resizer-thickness)/2*1))}.Resizer--resizing .Resizer__handle:after,.Resizer:hover .Resizer__handle:after{opacity:.25}.Resizer--resizing .Resizer__handle:after,.Resizer--resizing .Resizer__handle:before{transform:var(--scale)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/ScrollableShadows/ScrollableShadows.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.ScrollableShadows{display:flex;overflow:hidden;position:relative}.ScrollableShadows:after,.ScrollableShadows:before{content:"";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .2s ease;width:100%;z-index:1}.ScrollableShadows .ScrollableShadows__inner{flex:1}.ScrollableShadows.ScrollableShadows--horizontal{height:100%}.ScrollableShadows.ScrollableShadows--horizontal .ScrollableShadows__inner{overflow-x:auto}.ScrollableShadows.ScrollableShadows--horizontal:before{box-shadow:inset 16px 0 16px -16px rgba(0,0,0,.25)}.ScrollableShadows.ScrollableShadows--horizontal:after{box-shadow:inset -16px 0 16px -16px rgba(0,0,0,.25)}.ScrollableShadows.ScrollableShadows--vertical{width:100%}.ScrollableShadows.ScrollableShadows--vertical .ScrollableShadows__inner{overflow-y:auto}.ScrollableShadows.ScrollableShadows--vertical:before{box-shadow:inset 0 16px 16px -16px rgba(0,0,0,.25)}.ScrollableShadows.ScrollableShadows--vertical:after{box-shadow:inset 0 -16px 16px -16px rgba(0,0,0,.25)}.ScrollableShadows.ScrollableShadows--bottom:after,.ScrollableShadows.ScrollableShadows--left:before,.ScrollableShadows.ScrollableShadows--right:after,.ScrollableShadows.ScrollableShadows--top:before{opacity:1}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Sharing/SharingModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".SharingPreview{background-color:var(--bg-3000);padding:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/TZLabel/index.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".TZLabelPopover .TZLabelPopover__row{display:flex;margin-top:.5rem}.TZLabelPopover .TZLabelPopover__row>:first-child{color:var(--primary-alt);font-weight:700;margin-right:8px}.TZLabelPopover .TZLabelPopover__row>:nth-child(2):not(:empty){color:var(--primary-alt);font-weight:700;margin-right:6px}.TZLabelPopover .TZLabelPopover__row>:nth-child(3){color:var(--muted);flex-grow:1;margin-right:16px}.TZLabelPopover .TZLabelPopover__row>:nth-child(4){min-width:10rem;text-align:right}.TZLabelPopover--seconds .TZLabelPopover .TZLabelPopover__row>:nth-child(4){min-width:12rem}.TZLabelPopover .TZLabelPopover__row--muted,.TZLabelPopover .TZLabelPopover__row--muted>:first-child,.TZLabelPopover .TZLabelPopover__row--muted>:nth-child(2):not(:empty){color:var(--muted)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/TaxonomicFilter/InfiniteList.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".taxonomic-infinite-list{flex-grow:1;min-height:200px}.taxonomic-infinite-list.empty-infinite-list{align-items:center;display:flex;justify-content:center;width:100%}.taxonomic-infinite-list.empty-infinite-list .no-infinite-results{color:#666}.taxonomic-infinite-list .taxonomic-list-row{align-items:center;border:none;color:var(--text-3000);cursor:pointer;display:flex;justify-content:space-between;padding:4px 12px}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents{align-items:center;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents .taxonomic-list-row-contents-icon{display:flex;font-size:1.25rem;justify-content:center;margin-left:-4px;margin-right:4px;min-width:30px}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents .taxonomic-list-row-contents-icon svg.taxonomy-icon{flex-shrink:0;vertical-align:middle}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents .taxonomic-list-row-contents-icon svg.taxonomy-icon.taxonomy-icon-muted{color:var(--muted-alt)}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents .taxonomic-list-row-contents-icon svg.taxonomy-icon.taxonomy-icon-verified{color:var(--success)}.taxonomic-infinite-list .taxonomic-list-row .taxonomic-list-row-contents .taxonomic-list-row-contents-icon svg.taxonomy-icon.taxonomy-icon-built-in{color:var(--primary-3000)}.taxonomic-infinite-list .taxonomic-list-row>div{max-width:100%}.taxonomic-infinite-list .taxonomic-list-row>div>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.taxonomic-infinite-list .taxonomic-list-row.hover{background-color:var(--bg-3000);border-radius:var(--radius)}.taxonomic-infinite-list .taxonomic-list-row.selected{font-weight:700}.taxonomic-infinite-list .taxonomic-list-row.expand-row{color:var(--primary-3000)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/TaxonomicFilter/TaxonomicFilter.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".taxonomic-filter{background:var(--bg-light);display:flex;flex-direction:column;max-width:calc(100vw - 40px);width:550px}.taxonomic-filter.force-minimum-width{min-width:300px}.taxonomic-filter.one-taxonomic-tab .taxonomic-infinite-list{margin-top:10px}.taxonomic-filter .taxonomic-group-title{align-items:stretch;color:var(--muted);display:flex;font-size:12px;font-weight:600;line-height:12px;padding-left:10px;padding-top:10px;text-transform:uppercase;width:100%}.taxonomic-filter .taxonomic-pills{margin-bottom:8px;margin-top:8px;padding-left:10px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/TimelineSeekbar/TimelineSeekbar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.TimelineSeekbar{--timeline-seekbar-thickness:0.125rem;--timeline-seekbar-arrow-width:0.5rem;--timeline-seekbar-arrow-height:0.75rem;margin:.75rem .5rem}.TimelineSeekbar__meta{display:flex;gap:.5rem;justify-content:space-between}.TimelineSeekbar__note{align-items:center;display:flex;font-size:.8125rem;line-height:1.25rem}.TimelineSeekbar__current{background:var(--primary-3000);border-radius:var(--radius);color:var(--bg-light);font-size:.75rem;font-weight:500;line-height:1.25rem;padding:0 .25rem;width:-moz-fit-content;width:fit-content}.TimelineSeekbar__current::-moz-selection{background:var(--primary-3000-hover)}.TimelineSeekbar__current::selection{background:var(--primary-3000-hover)}.TimelineSeekbar__current .Spinner{margin-right:.25rem}.TimelineSeekbar__seekbar{height:1.25rem;margin-top:.5rem;position:relative}.TimelineSeekbar__points{display:flex;height:100%;left:calc(var(--timeline-seekbar-thickness)*2);position:relative;top:0;width:calc(100% - var(--timeline-seekbar-arrow-width) - var(--timeline-seekbar-thickness)*3 - 1.25rem)}.TimelineSeekbar__points .LemonBadge:not(.LemonBadge--active){background-clip:padding-box;border-right-color:transparent}.TimelineSeekbar__section{border-left:var(--timeline-seekbar-thickness) solid var(--bg-light);cursor:pointer;left:calc(var(--timeline-seekbar-section-progress-current) - var(--timeline-seekbar-thickness));position:absolute;width:var(--timeline-seekbar-section-progress-next)}.TimelineSeekbar__section:last-child{width:calc(var(--timeline-seekbar-section-progress-next) + 1.25rem)}.TimelineSeekbar__line{background:var(--primary-3000);height:var(--timeline-seekbar-thickness);left:0;position:absolute;top:calc(50% - var(--timeline-seekbar-thickness)/2);width:calc(100% - var(--timeline-seekbar-arrow-width))}.TimelineSeekbar__line-end,.TimelineSeekbar__line-start{height:1.25rem;position:absolute;top:calc(var(--timeline-seekbar-thickness)/2 - .625rem)}.TimelineSeekbar__line-end:before,.TimelineSeekbar__line-start:before{background:var(--primary-3000);content:"";display:block;height:var(--timeline-seekbar-arrow-height);margin:calc(var(--timeline-seekbar-thickness) + .125rem) 0}.TimelineSeekbar__line-start{left:0;width:var(--timeline-seekbar-thickness)}.TimelineSeekbar__line-end{cursor:pointer;left:100%;width:var(--timeline-seekbar-arrow-width)}.TimelineSeekbar__line-end:before{clip-path:polygon(0 0,100% 50%,0 100%)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/UniversalFilters/UniversalFilterButton.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".UniversalFilterButton{align-items:center;background:var(--border);border:1px solid var(--secondary-3000-button-border);border-radius:99rem;color:var(--text-3000);cursor:default;display:inline-flex;gap:.375rem;height:2rem;outline:0;overflow:hidden;padding:.25rem .625rem;white-space:nowrap}.UniversalFilterButton[aria-disabled=true]:not(.LemonButton--loading){cursor:not-allowed;opacity:var(--opacity-disabled)}.UniversalFilterButton:focus,.UniversalFilterButton:hover:not([aria-disabled=true]){border-color:var(--secondary-3000-button-border-hover)}.UniversalFilterButton:not(.UniversalFilterButton--clickable){border-color:transparent}.UniversalFilterButton.UniversalFilterButton--clickable{cursor:pointer;touch-action:manipulation}.UniversalFilterButton.UniversalFilterButton--closable{padding-right:.5rem}.UniversalFilterButton>:not(.UniversalFilterButton-content){flex-shrink:0}.UniversalFilterButton .UniversalFilterButton-content{flex:1;overflow:hidden;text-overflow:ellipsis}.UniversalFilterButton>.LemonIcon{font-size:1rem}.UniversalFilterButton .LemonButton{border-radius:99rem;margin:0 -.375rem 0 -.125rem}.UniversalFilterButton .LemonButton__chrome{min-height:auto;padding:.1875rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/UserActivityIndicator/UserActivityIndicator.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".UserActivityIndicator{align-items:center;display:flex;font-size:.8125rem;overflow-x:auto;white-space:nowrap}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonActionableTooltip/LemonActionableTooltip.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonActionableTooltip{max-width:var(--in-app-prompts-width);padding:.5rem}.LemonActionableTooltip>*+*{margin-top:.5rem}.LemonActionableTooltip .LemonActionableTooltip__header{display:flex;justify-content:space-between}.LemonActionableTooltip .LemonActionableTooltip__header>*+*{margin-left:.5rem}.LemonActionableTooltip .LemonActionableTooltip__title{font-size:1.125rem;font-weight:500;line-height:1.75rem}.LemonActionableTooltip .LemonActionableTooltip__icon{align-items:center;color:var(--primary-3000);display:flex;height:1.5rem;width:1.5rem}.LemonActionableTooltip .LemonActionableTooltip__icon>svg{height:100%;width:100%}.LemonActionableTooltip .LemonActionableTooltip__body>*+*{margin-top:.5rem}.LemonActionableTooltip .LemonActionableTooltip__footer{display:flex;justify-content:space-between;margin-top:1rem}.LemonActionableTooltip .LemonActionableTooltip__url-buttons{display:flex;flex-direction:column;width:100%}.LemonActionableTooltip .LemonActionableTooltip__url-buttons>*+*{margin-top:.25rem}.LemonActionableTooltip .LemonActionableTooltip__action-buttons{display:flex;flex-direction:column;width:100%}.LemonActionableTooltip .LemonActionableTooltip__action-buttons>*+*{margin-top:.25rem}.LemonActionableTooltip .LemonActionableTooltip__navigation{align-items:center;color:var(--muted);display:flex}.LemonActionableTooltip .LemonActionableTooltip__navigation>*+*{margin-left:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonBadge/LemonBadge.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonBadge{--lemon-badge-color:var(--primary-3000);--lemon-badge-size:1.5rem;--lemon-badge-font-size:0.75rem;--lemon-badge-position-offset:0.5rem;--lemon-badge-border-width:0.125rem;align-items:center;background:var(--lemon-badge-color);border:var(--lemon-badge-border-width) solid var(--accent-3000);border-radius:calc(var(--lemon-badge-size)/2);color:var(--bg-light);display:flex;flex-shrink:0;font-size:var(--lemon-badge-font-size);font-weight:700;height:var(--lemon-badge-size);justify-content:center;line-height:var(--lemon-badge-size);min-width:var(--lemon-badge-size);padding:calc(var(--lemon-badge-size)/8);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:-moz-fit-content;width:fit-content;z-index:1}.LemonBadge>*{height:calc(var(--lemon-badge-size) - var(--lemon-badge-border-width)*2);margin:calc(var(--lemon-badge-size)*-1/8);width:calc(var(--lemon-badge-size) - var(--lemon-badge-border-width)*2)}.LemonBadge.LemonBadge--success{--lemon-badge-color:var(--success)}.LemonBadge.LemonBadge--warning{--lemon-badge-color:var(--warning)}.LemonBadge.LemonBadge--danger{--lemon-badge-color:var(--danger)}.LemonBadge.LemonBadge--muted{--lemon-badge-color:var(--muted)}.LemonBadge.LemonBadge--data{--lemon-badge-color:var(--data-color-1)}.LemonBadge.LemonBadge--position-none{position:relative}.LemonBadge.LemonBadge--position-top-left{left:calc(var(--lemon-badge-position-offset)*-1);top:calc(var(--lemon-badge-position-offset)*-1)}.LemonBadge.LemonBadge--position-top-right{right:calc(var(--lemon-badge-position-offset)*-1);top:calc(var(--lemon-badge-position-offset)*-1)}.LemonBadge.LemonBadge--position-bottom-left{bottom:calc(var(--lemon-badge-position-offset)*-1);left:calc(var(--lemon-badge-position-offset)*-1)}.LemonBadge.LemonBadge--position-bottom-right{bottom:calc(var(--lemon-badge-position-offset)*-1);right:calc(var(--lemon-badge-position-offset)*-1)}.LemonBadge.LemonBadge--small{--lemon-badge-size:1.125rem;--lemon-badge-font-size:0.625rem}.LemonBadge.LemonBadge--large{--lemon-badge-size:1.75rem;--lemon-badge-font-size:0.875rem}.LemonBadge.LemonBadge--dot{height:calc(var(--lemon-badge-size)*.5 + var(--lemon-badge-border-width));min-width:0;width:calc(var(--lemon-badge-size)*.5 + var(--lemon-badge-border-width))}.LemonBadge.LemonBadge--active{outline:calc(var(--lemon-badge-font-size)/5) solid var(--lemon-badge-color);z-index:var(--z-raised)}.LemonBadge.LemonBadge--enter{opacity:0;transform:scale(.5)}.LemonBadge.LemonBadge--enter-active{opacity:1;transform:scale(1);transition:all .2s ease-out}.LemonBadge.LemonBadge--exit{opacity:1;transform:scale(1)}.LemonBadge.LemonBadge--exit-active{opacity:0;transform:scale(.5);transition:all .2s ease-in}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonBanner/LemonBanner.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonBanner{border:1px solid var(--border-tertiary);border-radius:var(--radius);color:var(--content-primary);display:flex;flex-direction:column;font-weight:500;gap:.5rem;min-height:3rem;padding:.5rem;text-align:left}.LemonBanner.LemonBanner--square{border-radius:0}.LemonBanner.LemonBanner--info{background-color:var(--background-secondary)}.LemonBanner.LemonBanner--warning{background-color:var(--background-warning-subtle);color:var(--content-warning-bold)}.LemonBanner.LemonBanner--error{background-color:var(--background-danger-subtle);color:var(--content-danger-bold)}.LemonBanner.LemonBanner--success{background-color:var(--background-success-subtle);color:var(--content-success-bold)}.LemonBanner .LemonBanner__icon{flex-shrink:0;font-size:1.5rem;line-height:0}.LemonBanner p{margin-bottom:.25em}.LemonBanner p:last-child{margin-bottom:0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonButton,.Link.LemonButton{--lemon-button-hover-depth:-0.03125rem;--lemon-button-press-depth:0.03125rem;--lemon-button-padding-adjacent-icon:0.375rem;--lemon-button-transition:opacity 200ms ease,transform 200ms ease;--lemon-button-border-width:0;--lemon-button-bg-color:transparent;--button-border-color:none;--lemon-button-border-color-hover:none;--lemon-button-frame-bg-color:none;--lemon-button-font-size:0.875rem;--lemon-button-icon-size:1.5rem;--lemon-button-height:2.3125rem;--lemon-button-gap:0.5rem;--lemon-button-icon-opacity:0.8;--lemon-button-color:var(--text-3000);align-items:center;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background:none;border-radius:var(--radius);cursor:pointer;display:flex;flex-shrink:0;font-family:var(--font-title);padding:0;position:relative;transition:var(--lemon-button-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none;--lemon-button-chrome-depth:0.1875rem;--lemon-button-padding-horizontal:0.75rem;--lemon-button-side-action-width:2rem}.LemonButton .font-normal,.LemonButton.font-normal,.Link.LemonButton .font-normal,.Link.LemonButton.font-normal{font-family:var(--font-sans)}.LemonButton .LemonButton__chrome,.Link.LemonButton .LemonButton__chrome{align-items:center;background:none;border-color:transparent;border-style:solid;border-width:var(--lemon-button-border-width);color:var(--lemon-button-color);display:flex;flex:1;flex-direction:row;flex-shrink:0;font-size:var(--lemon-button-font-size);font-weight:500;gap:var(--lemon-button-gap);height:100%;justify-content:flex-start;line-height:1.5rem;min-height:var(--lemon-button-height);padding:.25rem var(--lemon-button-padding-horizontal);position:relative;text-align:left;width:100%}.LemonButton .LemonButton__chrome .LemonButton__content,.Link.LemonButton .LemonButton__chrome .LemonButton__content{align-items:center;display:flex;flex:1;line-height:normal;overflow:hidden}.LemonButton .LemonButton__chrome .LemonButton__icon,.Link.LemonButton .LemonButton__chrome .LemonButton__icon{display:flex;flex-shrink:0;font-size:var(--lemon-button-icon-size);place-items:center center;transition:color .2s ease}.LemonButton .LemonButton__chrome .LemonButton__icon .LemonIcon,.Link.LemonButton .LemonButton__chrome .LemonButton__icon .LemonIcon{opacity:var(--lemon-button-icon-opacity)}.LemonButton[aria-disabled=true]:not(.LemonButton--loading),.Link.LemonButton[aria-disabled=true]:not(.LemonButton--loading){cursor:not-allowed;opacity:var(--opacity-disabled)}.LemonButton.LemonButton--active,.LemonButton:hover:not([aria-disabled=true]),.LemonButton:not([aria-disabled=true]):active,.Link.LemonButton.LemonButton--active,.Link.LemonButton:hover:not([aria-disabled=true]),.Link.LemonButton:not([aria-disabled=true]):active{--lemon-button-icon-opacity:0.75}.LemonButton.LemonButton--full-width,.Link.LemonButton.LemonButton--full-width{--lemon-button-padding-horizontal:0.5rem;width:100%}.LemonButton.LemonButton--loading,.Link.LemonButton.LemonButton--loading{cursor:default}.LemonButton.LemonButton--no-padding,.Link.LemonButton.LemonButton--no-padding{height:auto;min-height:0;padding:0;width:auto}.LemonButton.LemonButton--no-padding .LemonButton__chrome,.Link.LemonButton.LemonButton--no-padding .LemonButton__chrome{min-height:0;padding:0}.LemonButton.LemonButton--no-padding.LemonButton--full-width,.Link.LemonButton.LemonButton--no-padding.LemonButton--full-width{width:100%}.LemonButton.LemonButton--truncate,.Link.LemonButton.LemonButton--truncate{flex-shrink:1;min-width:0;white-space:nowrap}.LemonButton.LemonButton--truncate .LemonButton__content,.Link.LemonButton.LemonButton--truncate .LemonButton__content{display:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.LemonButton.LemonButton--centered .LemonButton__chrome,.Link.LemonButton.LemonButton--centered .LemonButton__chrome{justify-content:center!important}.LemonButton.LemonButton--centered .LemonButton__content,.Link.LemonButton.LemonButton--centered .LemonButton__content{flex:initial!important;text-align:center!important}.LemonButton.LemonButton--primary,.Link.LemonButton.LemonButton--primary{--lemon-button-bg-color:var(--primary-3000-button-bg);--lemon-button-bg-color-active:var(--primary-3000-button-bg);--button-border-color:var(--primary-3000-button-border);--lemon-button-border-color-hover:var(--primary-3000-button-border-hover);--lemon-button-frame-bg-color:var(--primary-3000-frame-bg);--lemon-button-color:var(--text-3000-light)}.LemonButton.LemonButton--primary.LemonButton--status-alt,.Link.LemonButton.LemonButton--primary.LemonButton--status-alt{--lemon-button-bg-color:var(--primary-3000-frame-bg-light);--lemon-button-bg-color-active:var(--lemon-button-bg-color);--button-border-color:var(--primary-3000-button-border);--lemon-button-border-color-hover:var(--primary-3000-button-border-hover);--lemon-button-frame-bg-color:var(--primary-3000-button-bg-dark);--lemon-button-color:var(--text-3000-light)}.LemonButton.LemonButton--secondary.LemonButton--status-alt.LemonButton--active,.LemonButton.LemonButton--secondary.LemonButton--status-alt:hover,.LemonButton.LemonButton--secondary:not(.LemonButton--status-alt):not(.LemonButton--status-danger),.Link.LemonButton.LemonButton--secondary.LemonButton--status-alt.LemonButton--active,.Link.LemonButton.LemonButton--secondary.LemonButton--status-alt:hover,.Link.LemonButton.LemonButton--secondary:not(.LemonButton--status-alt):not(.LemonButton--status-danger){--button-border-color:var(--secondary-3000-button-border);--lemon-button-bg-color-active:var(--bg-light);--lemon-button-border-color-hover:var(--secondary-3000-button-border-hover);--lemon-button-frame-bg-color:var(--secondary-3000-frame-bg)}.LemonButton.LemonButton--primary.LemonButton--status-danger,.LemonButton.LemonButton--secondary.LemonButton--status-danger,.LemonButton.LemonButton--status-danger,.Link.LemonButton.LemonButton--primary.LemonButton--status-danger,.Link.LemonButton.LemonButton--secondary.LemonButton--status-danger,.Link.LemonButton.LemonButton--status-danger{--lemon-button-color:var(--danger-3000-button-border-hover);--button-border-color:var(--danger-3000-button-border);--lemon-button-border-color-hover:var(--danger-3000-button-border-hover);--lemon-button-frame-bg-color:var(--danger-3000-frame-bg);--lemon-button-icon-opacity:1}.LemonButton.LemonButton--secondary.LemonButton--status-alt,.Link.LemonButton.LemonButton--secondary.LemonButton--status-alt{--lemon-button-color:var(--muted)}.LemonButton.LemonButton--secondary.LemonButton--status-alt.LemonButton--active,.LemonButton.LemonButton--secondary.LemonButton--status-alt:hover:not([aria-disabled=true]),.Link.LemonButton.LemonButton--secondary.LemonButton--status-alt.LemonButton--active,.Link.LemonButton.LemonButton--secondary.LemonButton--status-alt:hover:not([aria-disabled=true]){--lemon-button-color:var(--text-3000)}.LemonButton.LemonButton--primary,.LemonButton.LemonButton--secondary,.Link.LemonButton.LemonButton--primary,.Link.LemonButton.LemonButton--secondary{--lemon-button-border-width:1px}.LemonButton.LemonButton--primary:not([aria-disabled=true]):hover .LemonButton__chrome:after,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):hover .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):hover .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):hover .LemonButton__chrome:after{border-color:var(--lemon-button-border-color-hover)}.LemonButton.LemonButton--primary.LemonButton--has-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.LemonButton.LemonButton--secondary.LemonButton--has-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.Link.LemonButton.LemonButton--primary.LemonButton--has-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.Link.LemonButton.LemonButton--secondary.LemonButton--has-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding){--lemon-button-padding-left:var(--lemon-button-padding-adjacent-icon)}.LemonButton.LemonButton--primary.LemonButton--has-side-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.LemonButton.LemonButton--secondary.LemonButton--has-side-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.Link.LemonButton.LemonButton--primary.LemonButton--has-side-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding),.Link.LemonButton.LemonButton--secondary.LemonButton--has-side-icon:not(.LemonButton--no-content):not(.LemonButton--no-padding){--lemon-button-padding-right:var(--lemon-button-padding-adjacent-icon)}.LemonButton.LemonButton--primary .LemonButton__chrome,.LemonButton.LemonButton--secondary .LemonButton__chrome,.Link.LemonButton.LemonButton--primary .LemonButton__chrome,.Link.LemonButton.LemonButton--secondary .LemonButton__chrome{background:transparent;padding:calc(.25rem - var(--lemon-button-chrome-depth)*.5) var(--lemon-button-padding-right,var(--lemon-button-padding-horizontal)) calc(.25rem + var(--lemon-button-chrome-depth)*.5) var(--lemon-button-padding-left,var(--lemon-button-padding-horizontal))}.LemonButton.LemonButton--primary .LemonButton__chrome>*,.LemonButton.LemonButton--secondary .LemonButton__chrome>*,.Link.LemonButton.LemonButton--primary .LemonButton__chrome>*,.Link.LemonButton.LemonButton--secondary .LemonButton__chrome>*{z-index:1}.LemonButton.LemonButton--primary .LemonButton__chrome:before,.LemonButton.LemonButton--secondary .LemonButton__chrome:before,.Link.LemonButton.LemonButton--primary .LemonButton__chrome:before,.Link.LemonButton.LemonButton--secondary .LemonButton__chrome:before{border:1px solid var(--button-border-color);border-radius:var(--radius);content:"";inset:-1px;position:absolute;z-index:0}.LemonButton.LemonButton--primary .LemonButton__chrome:after,.LemonButton.LemonButton--secondary .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary .LemonButton__chrome:after{background:var(--lemon-button-bg-color);border:1px solid var(--button-border-color);border-radius:var(--radius);box-shadow:0 var(--lemon-button-chrome-depth) 0 -1px var(--lemon-button-frame-bg-color);content:"";inset:-1px -1px calc(var(--lemon-button-chrome-depth) - 1px) -1px;position:absolute;transition:opacity .2s ease;z-index:0}.LemonButton.LemonButton--primary.LemonButton--active .LemonButton__chrome:after,.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:after,.LemonButton.LemonButton--secondary.LemonButton--active .LemonButton__chrome:after,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary.LemonButton--active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary.LemonButton--active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:after{border:1px solid var(--lemon-button-border-color-hover)}.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]),.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]),.Link.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]),.Link.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]){--lemon-button-depth:var(--lemon-button-hover-depth)}.LemonButton.LemonButton--primary:not([aria-disabled=true]):active,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):active,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active{--lemon-button-depth:var(--lemon-button-press-depth)}.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome,.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome,.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome,.Link.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome,.Link.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome{transform:translateY(var(--lemon-button-depth))}.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome:after,.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:after,.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome:after,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:after{box-shadow:0 calc(var(--lemon-button-chrome-depth) - var(--lemon-button-depth)) 0 -1px var(--lemon-button-frame-bg-color)}.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome:before,.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:before,.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome:before,.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:before,.Link.LemonButton.LemonButton--primary:hover:not([aria-disabled=true]) .LemonButton__chrome:before,.Link.LemonButton.LemonButton--primary:not([aria-disabled=true]):active .LemonButton__chrome:before,.Link.LemonButton.LemonButton--secondary:hover:not([aria-disabled=true]) .LemonButton__chrome:before,.Link.LemonButton.LemonButton--secondary:not([aria-disabled=true]):active .LemonButton__chrome:before{bottom:calc(var(--lemon-button-depth) - 1px)}.LemonButton.LemonButton--primary.LemonButton--active .LemonButton__chrome:after,.LemonButton.LemonButton--secondary.LemonButton--active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--primary.LemonButton--active .LemonButton__chrome:after,.Link.LemonButton.LemonButton--secondary.LemonButton--active .LemonButton__chrome:after{background:var(--lemon-button-bg-color-active)}.LemonButton.LemonButton--tertiary.LemonButton--active,.LemonButton.LemonButton--tertiary:not([aria-disabled=true]):hover,.Link.LemonButton.LemonButton--tertiary.LemonButton--active,.Link.LemonButton.LemonButton--tertiary:not([aria-disabled=true]):hover{background-color:var(--glass-border-3000)}.LemonButton.LemonButton--tertiary.LemonButton--status-danger.LemonButton--active,.LemonButton.LemonButton--tertiary.LemonButton--status-danger:not([aria-disabled=true]):hover,.Link.LemonButton.LemonButton--tertiary.LemonButton--status-danger.LemonButton--active,.Link.LemonButton.LemonButton--tertiary.LemonButton--status-danger:not([aria-disabled=true]):hover{background-color:var(--danger-highlight)}.LemonButton--xsmall,.Link.LemonButton--xsmall{--lemon-button-padding-horizontal:0.375rem;--lemon-button-padding-adjacent-icon:0.25rem;--lemon-button-font-size:0.75rem;--lemon-button-icon-size:0.875rem;--lemon-button-height:1.625rem;--lemon-button-gap:0.25rem;--lemon-button-side-action-width:1.5rem}.LemonButton--small,.Link.LemonButton--small{--lemon-button-padding-horizontal:0.5rem;--lemon-button-height:2.0625rem;--lemon-button-gap:0.25rem;--lemon-button-side-action-width:1.75rem;--lemon-button-icon-size:1.25rem}.LemonButton--large,.Link.LemonButton--large{--lemon-button-font-size:1rem;--lemon-button-icon-size:1.75rem;--lemon-button-padding-adjacent-icon:0.75rem;--lemon-button-height:3.0625rem;--lemon-button-gap:0.75rem}.LemonButtonWithSideAction{position:relative;width:-moz-fit-content;width:fit-content;--lemon-button-chrome-depth:0.1875rem;--lemon-button-padding-horizontal:0.75rem;--lemon-button-side-action-width:2rem}.LemonButtonWithSideAction--full-width{width:100%}.LemonButtonWithSideAction--tertiary .LemonButtonWithSideAction__side-button{--lemon-button-chrome-depth:0px}.LemonButtonWithSideAction:hover>.LemonButton--secondary.LemonButton--status-alt{--button-border-color:var(--secondary-3000-button-border);--lemon-button-bg-color-active:var(--bg-light);--lemon-button-border-color-hover:var(--secondary-3000-button-border-hover);--lemon-button-frame-bg-color:var(--secondary-3000-frame-bg)}.LemonButtonWithSideAction .LemonButtonWithSideAction__spacer{box-sizing:initial;color:var(--muted);height:calc(var(--lemon-button-height) - 1.0625rem);width:calc(var(--lemon-button-side-action-width) - var(--lemon-button-padding-right, var(--lemon-button-padding-horizontal)))}.LemonButtonWithSideAction .LemonButtonWithSideAction__spacer--divider{border-left:1px solid;margin-left:calc(var(--lemon-button-padding-horizontal)/2);padding:0}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button{background:none;border-bottom-right-radius:calc(var(--radius) - 1px);border-top-right-radius:calc(var(--radius) - 1px);bottom:calc(var(--lemon-button-chrome-depth) + 1px);position:absolute;right:1px;top:1px;transform:none;z-index:1}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button .LemonButton{--lemon-button-depth:0px;border-bottom-left-radius:0;border-top-left-radius:0;height:100%;width:var(--lemon-button-side-action-width)}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button .LemonButton__chrome{border:none!important;justify-content:center!important;padding:0!important}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button .LemonButton__chrome:after,.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button .LemonButton__chrome:before{content:none!important}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button:not([aria-disabled=true]):active .LemonButton__chrome{transform:none!important}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button .LemonButton__icon{color:currentColor}.LemonButtonWithSideAction .LemonButtonWithSideAction__side-button:not([aria-disabled=true]):hover{background:rgba(0,0,0,.1)}.LemonButtonWithSideAction--xsmall{--lemon-button-padding-horizontal:0.375rem;--lemon-button-padding-adjacent-icon:0.25rem;--lemon-button-font-size:0.75rem;--lemon-button-icon-size:0.875rem;--lemon-button-height:1.625rem;--lemon-button-gap:0.25rem;--lemon-button-side-action-width:1.5rem}.LemonButtonWithSideAction--small{--lemon-button-padding-horizontal:0.5rem;--lemon-button-height:2.0625rem;--lemon-button-gap:0.25rem;--lemon-button-side-action-width:1.75rem;--lemon-button-icon-size:1.25rem}.LemonButtonWithSideAction--large{--lemon-button-font-size:1rem;--lemon-button-icon-size:1.75rem;--lemon-button-padding-adjacent-icon:0.75rem;--lemon-button-height:3.0625rem;--lemon-button-gap:0.75rem}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonCalendar{--lemon-calendar-month-height:305px;--lemon-calendar-row-gap:2px;--lemon-calendar-day-width:40px;--lemon-calendar-today-radius:2px;--lemon-calendar-time-column-width:50px;--lemon-calendar-time-button-height:2.3125rem;height:var(--lemon-calendar-month-height)}.LemonCalendar .LemonCalendar__month{width:100%}.LemonCalendar .LemonCalendar__month>tbody>tr>td,.LemonCalendar .LemonCalendar__month>thead>tr:first-child>th{padding:calc(var(--lemon-calendar-row-gap)/2) 0}.LemonCalendar .LemonCalendar__month>tbody>tr>td,.LemonCalendar .LemonCalendar__month>thead>tr:first-child>th:first-child,.LemonCalendar .LemonCalendar__month>thead>tr:first-child>th:last-child{width:var(--lemon-calendar-day-width)}.LemonCalendar .LemonCalendar__month tr.LemonCalendar__month-header{height:var(--lemon-calendar-time-button-height)}.LemonCalendar .LemonCalendar__month tr .LemonButton.rounded-none{border-radius:0}.LemonCalendar .LemonCalendar__month tr .LemonButton.rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.LemonCalendar .LemonCalendar__month tr .LemonButton.rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.LemonCalendar .LemonCalendar__month tr .LemonCalendar__today{position:relative}.LemonCalendar .LemonCalendar__month tr .LemonCalendar__today:after{background:currentColor;border-radius:100%;bottom:5px;content:"";height:calc(var(--lemon-calendar-today-radius)*2);left:calc(50% - var(--lemon-calendar-today-radius));position:absolute;width:calc(var(--lemon-calendar-today-radius)*2)}.LemonCalendar .LemonCalendar__range--boundary{background-color:var(--glass-border-3000)}.LemonCalendar--hour{--lemon-calendar-time-columns:2}.LemonCalendar--minute{--lemon-calendar-time-columns:3}.LemonCalendar--hour,.LemonCalendar--minute{padding-right:calc(var(--lemon-calendar-time-columns)*var(--lemon-calendar-time-column-width) + 2px)}.LemonCalendar--hour .LemonCalendar__time>div,.LemonCalendar--minute .LemonCalendar__time>div{width:var(--lemon-calendar-time-column-width)}.LemonCalendar--hour .LemonCalendar__time>div.ScrollableShadows .ScrollableShadows__inner,.LemonCalendar--minute .LemonCalendar__time>div.ScrollableShadows .ScrollableShadows__inner{scroll-behavior:smooth;scrollbar-width:none}.LemonCalendar--hour .LemonCalendar__time--scroll-spacer,.LemonCalendar--minute .LemonCalendar__time--scroll-spacer{height:calc(100% - var(--lemon-calendar-time-button-height))}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCard/LemonCard.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonCard{transition:.2s ease}.LemonCard.LemonCard--hoverEffect:hover{box-shadow:var(--shadow-elevation-3000);transform:scale(1.01)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonCheckbox{--lemon-checkbox-height:calc(2.125rem + 3px);align-items:center;display:flex;font-weight:500;line-height:1.5rem;width:-moz-fit-content;width:fit-content}.LemonCheckbox:has(:focus-visible) .LemonCheckbox__box{outline:1px auto -webkit-focus-ring-color}.LemonCheckbox .LemonCheckbox__input{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;height:0!important;width:0!important}.LemonCheckbox label{--tick-length:12.73;--box-color:var(--primary-3000);align-items:center;cursor:pointer;display:flex;gap:.5rem;min-height:1.5rem}.LemonCheckbox label>.LemonCheckbox__box{background:var(--bg-light);border:1.5px solid var(--border-bold);border-radius:.25rem;flex-shrink:0;height:1rem;transition:border .2s ease,background .2s ease;width:1rem}.LemonCheckbox label>.LemonCheckbox__box path{stroke:var(--bg-light);stroke-dasharray:var(--tick-length);stroke-dashoffset:var(--tick-length);transition:stroke-dashoffset .2s ease}.LemonCheckbox.LemonCheckbox--disabled label{color:var(--muted);cursor:not-allowed}.LemonCheckbox.LemonCheckbox--full-width,.LemonCheckbox.LemonCheckbox--full-width label{width:100%}.LemonCheckbox.LemonCheckbox--indeterminate label{--tick-length:9}.LemonCheckbox.LemonCheckbox:not(.LemonCheckbox--disabled):active label,.LemonCheckbox.LemonCheckbox:not(.LemonCheckbox--disabled):hover label{--box-color:var(--primary-3000-hover)}.LemonCheckbox.LemonCheckbox:not(.LemonCheckbox--disabled):active label .LemonCheckbox__box,.LemonCheckbox.LemonCheckbox:not(.LemonCheckbox--disabled):hover label .LemonCheckbox__box{border-color:var(--box-color)}.LemonCheckbox.LemonCheckbox:not(.LemonCheckbox--disabled):active label{--box-color:var(--primary-3000-active)}.LemonCheckbox.LemonCheckbox--checked label .LemonCheckbox__box{background:var(--box-color);border-color:transparent}.LemonCheckbox.LemonCheckbox--checked label .LemonCheckbox__box path{stroke-dashoffset:0}.LemonCheckbox.LemonCheckbox--bordered{line-height:1.4}.LemonCheckbox.LemonCheckbox--bordered label{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);min-height:var(--lemon-checkbox-height);padding:0 .75rem}.LemonCheckbox.LemonCheckbox--bordered.LemonCheckbox--small label{min-height:2rem;padding:0 .5rem}.LemonCheckbox.LemonCheckbox--bordered.LemonCheckbox--xsmall label{min-height:1.625rem;padding:0 .375rem}.Field--error .LemonCheckbox.LemonCheckbox--bordered label{border:1px solid var(--danger)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonCollapse{align-items:stretch;border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden}.LemonCollapse--embedded{border:none;border-radius:0}.LemonCollapsePanel{align-items:stretch;display:flex;flex-direction:column}.LemonCollapsePanel:not(:last-child){border-bottom-width:1px}.LemonCollapsePanel__header{background:var(--bg-light);border-radius:0!important;font-weight:500!important;min-height:2.875rem!important;padding:.5rem .75rem!important}.LemonCollapsePanel__header.LemonButton:active{transform:inherit}.LemonCollapsePanel__header--disabled:hover{background-color:var(--bg-light)!important;cursor:default}.LemonCollapsePanel__body{border-top-width:1px;box-sizing:initial;height:0;overflow:hidden;transition:height .2s ease}.storybook-test-runner .LemonCollapsePanel__body{height:-moz-fit-content!important;height:fit-content!important}.LemonCollapsePanel__content{padding:1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonDivider/LemonDivider.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonDivider{background:var(--border);flex-shrink:0;height:1px;width:100%}.LemonDivider--dashed{background:repeating-linear-gradient(to right,var(--border),var(--border) 4px,transparent 4px,transparent 8px)}.LemonDivider--thick{height:3px}.LemonDivider--vertical{align-self:stretch;height:auto;width:1px}.LemonDivider--vertical.LemonDivider--thick{width:3px}.LemonDivider--vertical.LemonDivider--dashed{background:repeating-linear-gradient(to bottom,var(--border),var(--border) 4px,transparent 4px,transparent 8px)}.LemonDivider--with-label{background:none;display:flex;height:unset}.LemonDivider--with-label:after,.LemonDivider--with-label:before{border-top:1px solid var(--border);content:"";display:block;position:relative;top:50%;transform:translateY(50%);width:50%}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonFileInput/LemonFileInput.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.FileDropTarget{position:relative}.FileDropTarget--active:after{--file-drop-target-padding:0.5rem;border:3px dashed var(--primary-3000);border-radius:var(--radius);content:"";height:calc(100% + var(--file-drop-target-padding)*2);left:calc(var(--file-drop-target-padding)*-1);position:absolute;top:calc(var(--file-drop-target-padding)*-1);width:calc(100% + var(--file-drop-target-padding)*2)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonInput/LemonInput.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonInput{--lemon-input-height:calc(2.125rem + 3px);align-items:center;background:none;background-color:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);color:var(--text-3000);cursor:text;display:flex;font-size:.875rem;gap:.375rem;height:var(--lemon-input-height);justify-content:left;line-height:1.25rem;min-height:var(--lemon-input-height);padding:.25rem .5rem;text-align:left}.LemonInput[aria-disabled=true]{cursor:not-allowed}.LemonInput.LemonInput--focused:not([aria-disabled=true]),.LemonInput:hover:not([aria-disabled=true]){border-color:var(--border-bold)}.LemonInput.LemonInput--transparent-background{background-color:inherit}.Field--error .LemonInput,.LemonInput.LemonInput--status-danger{border-color:var(--danger)!important}.LemonInput .LemonInput__input{align-self:stretch;background:none;border:none;cursor:inherit;flex:1;outline:none;padding:0;width:100%}.LemonInput .LemonInput__input:disabled{opacity:var(--opacity-disabled)}.LemonInput .LemonIcon{color:var(--muted-alt);flex-shrink:0;font-size:1.25rem;height:1em;transition:color .2s ease;width:1em}.LemonInput.LemonInput--xsmall{--lemon-input-height:1.5rem;padding:.125rem .25rem}.LemonInput.LemonInput--xsmall .LemonIcon{font-size:1rem}.LemonInput.LemonInput--small{--lemon-input-height:2rem;padding:.125rem .25rem}.LemonInput.LemonInput--small .LemonIcon{font-size:1.25rem}.LemonInput.LemonInput--large{--lemon-input-height:3rem}.LemonInput.LemonInput--large .LemonIcon{font-size:1.5rem}.LemonInput.LemonInput--has-content>.LemonIcon{color:var(--primary-3000)}.LemonInput.LemonInput--type-search{max-width:240px}.LemonInput.LemonInput--type-number .LemonInput__input{font-feature-settings:"tnum";font-variant-numeric:tabular-nums;text-overflow:clip}.LemonInput.LemonInput--full-width{max-width:100%;width:100%}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonLabel/LemonLabel.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonLabel{align-items:center;-moz-column-gap:.25rem;column-gap:.25rem;display:inline-flex;flex-wrap:wrap;font-weight:600;line-height:1.5rem}.LemonLabel .LemonLabel__extra{font-weight:400}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonMarkdown>*{margin:0 0 .5em}.LemonMarkdown>:last-child{margin-bottom:0}.LemonMarkdown dl,.LemonMarkdown ol,.LemonMarkdown ul{padding-left:1.5em}.LemonMarkdown ol{list-style-type:decimal}.LemonMarkdown ul{list-style-type:disc}.LemonMarkdown strong[level]{display:block}.LemonMarkdown hr{margin:1em 0}.LemonMarkdown h1{font-weight:600;margin-bottom:.25em}.LemonMarkdown img{max-width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonModal__overlay{align-items:center;display:flex;inset:0;justify-content:center;position:fixed;transition:background-color var(--modal-transition-time) ease-out,-webkit-backdrop-filter var(--modal-transition-time) ease-out;transition:background-color var(--modal-transition-time) ease-out,backdrop-filter var(--modal-transition-time) ease-out;transition:background-color var(--modal-transition-time) ease-out,backdrop-filter var(--modal-transition-time) ease-out,-webkit-backdrop-filter var(--modal-transition-time) ease-out;z-index:var(--z-modal)}.LemonModal__overlay.LemonModal__overlay--force-modal-above-popovers{z-index:var(--z-force-modal-above-popovers)}.LemonModal__overlay.ReactModal__Overlay--after-open{-webkit-backdrop-filter:blur(var(--modal-backdrop-blur));backdrop-filter:blur(var(--modal-backdrop-blur));background-color:var(--modal-backdrop-color)}.LemonModal__overlay.ReactModal__Overlay--before-close{-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);background-color:transparent}.LemonModal__overlay.LemonModal__overlay--z-1061{z-index:1061}.LemonModal__overlay.LemonModal__overlay--z-1062{z-index:1062}.LemonModal__overlay.LemonModal__overlay--z-1066{z-index:1066}.LemonModal__overlay.LemonModal__overlay--z-1067{z-index:1067}.LemonModal__overlay.LemonModal__overlay--z-1068{z-index:1068}.LemonModal__overlay.LemonModal__overlay--z-1069{z-index:1069}.LemonModal{background-color:var(--bg-light);border:1px solid var(--border-bold);border-radius:var(--radius);box-shadow:var(--modal-shadow-elevation);display:flex;flex-direction:column;margin:1rem auto;max-height:90%;max-width:90%;min-width:min(28rem,100%);opacity:0;position:relative;transform:scale(.85);transition:opacity var(--modal-transition-time) ease-out,transform var(--modal-transition-time) ease-out;width:-moz-fit-content;width:fit-content;will-change:transform}.LemonModal.LemonModal--fullscreen{border:none;border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;width:100%}.LemonModal.ReactModal__Content--after-open:not(.ReactModal__Content--before-close){opacity:1;transform:scale(1)}.LemonModal .LemonModal__close{position:absolute;right:1rem;top:.75rem;z-index:1}.LemonModal .LemonModal__close.LemonModal__close--highlighted{animation:LemonModal__tilt-shake .4s}.LemonModal .LemonModal__layout{display:flex;flex:1;flex-direction:column;overflow-y:hidden}.LemonModal .LemonModal__content{overflow-y:auto;padding:1rem}.LemonModal .LemonModal__content.LemonModal__content--embedded{padding:0}.LemonModal .LemonModal__container{display:flex;height:100%;overflow:hidden}.LemonModal__header{border-bottom:1px solid var(--border);margin:1rem 1rem 0;padding-bottom:1rem}.LemonModal__header h3{font-size:1.125rem;font-weight:700;line-height:1.5rem;margin-bottom:0;margin-right:2.5rem}.LemonModal__header p{margin:.5rem 0 -.25rem}.LemonModal__footer{align-items:center;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end;margin:0 1rem 1rem;padding-top:1rem;white-space:nowrap}.LemonModal__header+.LemonModal__footer{border-top:none}@keyframes LemonModal__tilt-shake{0%{transform:rotate(0deg)}16.666%{transform:rotate(12deg)}50%{transform:rotate(-10deg)}83.333%{transform:rotate(8deg)}to{transform:rotate(0deg)}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonProgressCircle/LemonProgressCircle.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonProgressCircle{display:inline-block;position:relative;vertical-align:text-bottom}.LemonProgressCircle circle{transform:rotate(-90deg);transform-origin:50% 50%;transition:stroke-dashoffset .35s}.LemonProgressCircle .LemonProgressCircle__content{align-items:center;display:flex;inset:0;justify-content:center;position:absolute}.LemonButton__icon .LemonProgressCircle{display:inline-flex}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonRow/LemonRow.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonRow{align-items:flex-start;background:none;border:none;border-radius:var(--radius);display:flex;flex-direction:column;flex-shrink:0;font-size:.875rem;justify-content:center;line-height:1.25rem;min-height:2.5rem;padding:.25rem 1rem;text-align:left;transition:background-color .2s ease,color .2s ease,border .2s ease,opacity .2s ease}.LemonRow.LemonRow--status-highlighted{background:var(--primary-highlight);color:var(--text-3000);font-weight:600}.LemonRow.LemonRow--status-highlighted .LemonRow__icon{color:var(--primary-3000)}.LemonRow.LemonRow--status-danger .LemonRow__icon{color:var(--danger)}.LemonRow.LemonRow--status-warning .LemonRow__icon{color:var(--warning)}.LemonRow.LemonRow--status-success .LemonRow__icon{color:var(--success)}.LemonRow.LemonRow--status-muted{background:var(--bg-3000)}.LemonRow.LemonRow--disabled{opacity:var(--opacity-disabled)}.LemonRow__main-area{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.LemonRow__extended-area{display:flex;flex-direction:column;font-size:.8125rem;margin-left:1.875rem;padding-bottom:.125rem}.LemonRow--outlined{border:1px solid var(--border)}.LemonRow--full-width{padding-left:.5rem;padding-right:.5rem;width:100%}.LemonRow--full-width .LemonRow__icon:not(:first-child):last-child{margin-right:0}.LemonRow--full-width>.LemonRow__main-area{justify-content:flex-start}.LemonRow--center .LemonRow__main-area{justify-content:center!important}.LemonRow--center .LemonRow__content{flex-grow:0}.LemonRow--symbolic{display:block;height:1.5rem;min-height:0;padding:0;width:1.5rem}.LemonRow--large,.LemonRow--tall{min-height:3.5rem;padding:.5rem 1rem}.LemonRow--symbolic.LemonRow--large,.LemonRow--tall.LemonRow--symbolic{height:1.75rem;min-height:0;padding:0;width:1.75rem}.LemonRow--large{font-size:1rem}.LemonRow--large .LemonRow__icon{font-size:1.75rem}.LemonRow--small{min-height:2rem;padding:.125rem .5rem}.LemonRow--small.LemonRow--symbolic{height:1.25rem;min-height:0;padding:0;width:1.25rem}.LemonRow--small .LemonRow__icon{font-size:1.25rem}.LemonRow__icon{color:var(--muted-alt);display:flex;flex-shrink:0;font-size:1.5rem;transition:background-color .2s ease,color .2s ease}.LemonRow__content{align-items:center;display:flex;flex-grow:1;min-width:0}.LemonRow__content:not(:first-child),.LemonRow__icon:not(:first-child){margin-left:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonSegmentedButton{border-radius:var(--radius);flex-shrink:0;position:relative;width:-moz-fit-content;width:fit-content}.LemonSegmentedButton>ul{align-items:stretch;display:flex;list-style:none;z-index:1}.LemonSegmentedButton.LemonSegmentedButton--full-width{width:100%}.LemonSegmentedButton .LemonSegmentedButton__option{display:flex;flex:1}.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton__content{white-space:nowrap}.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton,.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton>.LemonButton__chrome:after,.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton>.LemonButton__chrome:before{border-radius:0!important}.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton:not(:hover) .LemonButton__content{opacity:var(--lemon-button-icon-opacity)}.LemonSegmentedButton .LemonSegmentedButton__option .LemonButton.LemonButton--secondary:not([aria-disabled=true]):hover>.LemonButton__chrome:after{border-color:var(--secondary-3000-button-border)}.LemonSegmentedButton .LemonSegmentedButton__option:first-child,.LemonSegmentedButton .LemonSegmentedButton__option:first-child .LemonButton,.LemonSegmentedButton .LemonSegmentedButton__option:first-child .LemonButton>.LemonButton__chrome:after,.LemonSegmentedButton .LemonSegmentedButton__option:first-child .LemonButton>.LemonButton__chrome:before{border-bottom-left-radius:var(--radius)!important;border-top-left-radius:var(--radius)!important}.LemonSegmentedButton .LemonSegmentedButton__option:last-child,.LemonSegmentedButton .LemonSegmentedButton__option:last-child .LemonButton,.LemonSegmentedButton .LemonSegmentedButton__option:last-child .LemonButton>.LemonButton__chrome:after,.LemonSegmentedButton .LemonSegmentedButton__option:last-child .LemonButton>.LemonButton__chrome:before{border-bottom-right-radius:var(--radius)!important;border-top-right-radius:var(--radius)!important}.LemonSegmentedButton .LemonSegmentedButton__option:not(:first-child) .LemonButton__chrome{margin-left:-1px}.LemonSegmentedButton .LemonSegmentedButton__option.LemonSegmentedButton__option--selected{z-index:2}.LemonSegmentedButton .LemonSegmentedButton__option.LemonSegmentedButton__option--selected .LemonButton{--lemon-button-icon-opacity:1}.LemonSegmentedButton .LemonSegmentedButton__option--disabled>div{width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSkeleton/LemonSkeleton.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonSkeleton{animation:LemonSkeleton__shimmer 2s ease infinite;background:linear-gradient(90deg,hsla(0,0%,75%,.2) 25%,hsla(0,0%,51%,.24) 45%,hsla(0,0%,75%,.2) 65%);background-size:400% 100%}.LemonSkeleton.LemonSkeleton--static{animation:none}.LemonSkeleton>span{display:block;height:1px;overflow:hidden;white-space:nowrap;width:1px}@media(prefers-reduced-motion){.LemonSkeleton{animation:none}}@keyframes LemonSkeleton__shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonSwitch{--lemon-switch-height:1.125rem;--lemon-switch-width:calc(var(--lemon-switch-height)*1.83333);align-items:center;display:flex;font-weight:500;gap:.5rem;line-height:1.5rem;width:-moz-fit-content;width:fit-content}.LemonSwitch label[for]{cursor:pointer}.LemonSwitch label{cursor:inherit;flex:1}.LemonSwitch.LemonSwitch--full-width{padding-left:.5rem;padding-right:.5rem;width:100%}.LemonSwitch.LemonSwitch--bordered{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);line-height:1.4;min-height:calc(2.125rem + 3px);padding:0 .75rem}.LemonSwitch.LemonSwitch--bordered.LemonSwitch--small{gap:.5rem;min-height:calc(1.875rem + 3px);padding:0 .5rem}.LemonSwitch>.LemonIcon{color:var(--muted-alt);font-size:1.5rem}.LemonSwitch.LemonSwitch--disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}.LemonSwitch.LemonSwitch--disabled label[for]{cursor:not-allowed}.LemonSwitch__button{background:none;border:none;cursor:pointer;display:inline-block;flex-shrink:0;height:var(--lemon-switch-height);padding:0;position:relative;width:var(--lemon-switch-width)}.LemonSwitch--disabled .LemonSwitch__button{cursor:not-allowed}.LemonSwitch__slider{background-color:var(--border-bold);border-radius:var(--lemon-switch-height);display:inline-block;height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:background-color .1s ease;width:100%}.LemonSwitch--checked .LemonSwitch__slider{background-color:var(--primary-3000)}.LemonSwitch__handle{--lemon-switch-handle-ratio:0.75;--lemon-switch-handle-gutter:calc(var(--lemon-switch-height)*(1 - var(--lemon-switch-handle-ratio))/2);--lemon-switch-handle-width:calc(var(--lemon-switch-height)*var(--lemon-switch-handle-ratio));--lemon-switch-active-translate:translateX(calc(var(--lemon-switch-width) - var(--lemon-switch-handle-width) - var(--lemon-switch-handle-gutter)*2));align-items:center;background-color:#fff;border:none;border-radius:.625rem;cursor:inherit;display:flex;height:calc(var(--lemon-switch-height)*var(--lemon-switch-handle-ratio));justify-content:center;left:var(--lemon-switch-handle-gutter);pointer-events:none;position:absolute;top:var(--lemon-switch-handle-gutter);transition:background-color .1s ease,transform .1s ease,width .1s ease,border-color .1s ease;width:var(--lemon-switch-handle-width)}.LemonSwitch--checked .LemonSwitch__handle{background-color:#fff;border-color:var(--primary-3000);transform:var(--lemon-switch-active-translate)}.LemonSwitch--active .LemonSwitch__handle{--lemon-switch-handle-width:calc(var(--lemon-switch-height)*var(--lemon-switch-handle-ratio)*1.2);transform:none}.LemonSwitch--active.LemonSwitch--checked .LemonSwitch__handle{transform:var(--lemon-switch-active-translate)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTable/LemonTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonTable{--row-base-height:auto;--row-horizontal-padding:1rem;--lemon-table-background-color:var(--bg-table);background:var(--lemon-table-background-color);border:1px solid var(--border);border-radius:var(--radius);flex:1;font-size:13px;overflow:hidden;position:relative;width:100%}.Insight .LemonTable,.InsightCard__viz .LemonTable,.WebAnalyticsDashboard .LemonTable{--lemon-table-background-color:var(--bg-light)}.WebAnalyticsDashboard .LemonTable,.WebAnalyticsModal .LemonTable{border:none}.LemonTable.LemonTable--with-ribbon{--row-ribbon-width:0.25rem}.LemonTable.LemonTable--with-ribbon .LemonTable__content>table>tbody>tr>:first-child{position:relative}.LemonTable.LemonTable--with-ribbon .LemonTable__content>table>tbody>tr>:first-child:after{background:var(--row-ribbon-color);content:"";height:100%;left:0;position:absolute;top:0;width:var(--row-ribbon-width)}.LemonTable--xs .LemonTable__content>table>tbody>tr>td{padding-bottom:.25rem;padding-top:.25rem}.LemonTable--embedded{background:none;border:none;border-radius:0}.LemonTable--stealth{background:none}.LemonTable--stealth .LemonTable__content>table>thead{background:none;border-bottom:none}.LemonTable--stealth .LemonTable__content>table>tbody>tr:not(:first-child),.LemonTable--stealth .LemonTable__content>table>thead>tr:not(:first-child){border-top:none}.LemonTable--lowercase-header .LemonTable__content>table>thead{letter-spacing:normal;text-transform:none}.LemonTable.LemonTable--inset{--row-horizontal-padding:0.5rem}.LemonTable .PaginationControl{border-top:1px solid var(--border);height:var(--row-base-height);padding:.5rem}.LemonTable a.Link{color:var(--text-3000)}.LemonTable a.Link:not(:disabled):hover{color:var(--primary-3000-hover)}.LemonTable__content>table{border-collapse:collapse;border-spacing:0;width:100%}.LemonTable__content>table>thead{background:var(--lemon-table-background-color);font-size:.75rem;letter-spacing:.03125rem;position:relative;text-transform:uppercase}.LemonTable__content>table>thead>tr>th{box-shadow:inset 0 -1px var(--border);font-weight:700;padding-bottom:.5rem;padding-top:.5rem;text-align:left}.LemonTable__content>table>thead>tr>th .LemonButton{margin:-.5rem 0}.LemonTable__content>table>thead>tr.LemonTable__row--grouping{--row-base-height:2.5rem}.LemonTable__content>table>tbody>tr:not(:first-child){border-top:1px solid var(--border)}.LemonTable__content>table>tbody>tr.LemonTable__expansion{background:var(--bg-3000);position:relative}.LemonTable__content>table>tbody>tr.LemonTable__expansion>td{padding:0!important}.LemonTable__content>table>tbody>tr.LemonTable__row--status-highlighted{color:var(--text-3000);font-weight:600}.LemonTable__content>table>tbody>tr.LemonTable__row--status-highlighted>td:not(.LemonTable__cell--sticky){background:var(--primary-highlight)}.LemonTable__content>table>tbody>tr:not(.LemonTable__expansion)>td .LemonButton{margin-bottom:-.25rem;margin-top:-.25rem}.LemonTable__content>table>tbody>tr>td{color:var(--text-secondary-3000);padding-bottom:.3125rem;padding-top:.3125rem}.LemonTable__content>table>tbody>tr>td .CodeSnippet__actions>.LemonButton,.LemonTable__content>table>tbody>tr>td .LemonButtonWithSideAction__side-button>.LemonButton{margin-bottom:0;margin-top:0}.LemonTable__content>table>tbody>tr,.LemonTable__content>table>thead>tr{height:var(--row-base-height)}.LemonTable__content>table>tbody>tr>td,.LemonTable__content>table>tbody>tr>th,.LemonTable__content>table>thead>tr>td,.LemonTable__content>table>thead>tr>th{overflow:hidden;padding-right:var(--row-horizontal-padding);text-overflow:ellipsis}.LemonTable__content>table>tbody>tr>td:first-child,.LemonTable__content>table>tbody>tr>th:first-child,.LemonTable__content>table>thead>tr>td:first-child,.LemonTable__content>table>thead>tr>th:first-child{padding-left:calc(var(--row-horizontal-padding) + var(--row-ribbon-width, 0px))}.LemonTable__content>table>tbody>tr>td.LemonTable__boundary:not(:first-child),.LemonTable__content>table>tbody>tr>th.LemonTable__boundary:not(:first-child),.LemonTable__content>table>thead>tr>td.LemonTable__boundary:not(:first-child),.LemonTable__content>table>thead>tr>th.LemonTable__boundary:not(:first-child){padding-left:var(--row-horizontal-padding)}.LemonTable__content>table>tbody>tr>td.LemonTable__boundary:not(:first-of-type),.LemonTable__content>table>tbody>tr>th.LemonTable__boundary:not(:first-of-type),.LemonTable__content>table>thead>tr>td.LemonTable__boundary:not(:first-of-type),.LemonTable__content>table>thead>tr>th.LemonTable__boundary:not(:first-of-type){border-left:1px solid var(--border)}.LemonTable__content>table>tbody>tr>td.LemonTable__toggle,.LemonTable__content>table>tbody>tr>th.LemonTable__toggle,.LemonTable__content>table>thead>tr>td.LemonTable__toggle,.LemonTable__content>table>thead>tr>th.LemonTable__toggle{padding-right:0}.LemonTable__content>table>tbody>tr>td.LemonTable__toggle+*,.LemonTable__content>table>tbody>tr>th.LemonTable__toggle+*,.LemonTable__content>table>thead>tr>td.LemonTable__toggle+*,.LemonTable__content>table>thead>tr>th.LemonTable__toggle+*{border-left:none!important}.LemonTable__content>table>tbody>tr>td[colspan="0"],.LemonTable__content>table>tbody>tr>th[colspan="0"],.LemonTable__content>table>thead>tr>td[colspan="0"],.LemonTable__content>table>thead>tr>th[colspan="0"]{padding-left:0!important;padding-right:0!important}.LemonTable__empty-state{color:var(--muted-alt)}.LemonTable__overlay{background:var(--lemon-table-background-color);height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .2s ease;width:100%;z-index:2}.LemonTable--loading .LemonTable__overlay{opacity:.5;pointer-events:auto}.LemonTable__header{cursor:default}.LemonTable__header .LemonTable__header-content{color:var(--text-secondary-3000)}.LemonTable__header.LemonTable__header--actionable{cursor:pointer}.LemonTable__header.LemonTable__header--actionable:hover:not(:has(.LemonTable__header--no-hover:hover)) .LemonTable__header-content{color:var(--text-3000)}.LemonTable__header.LemonTable__header--actionable:active .LemonTable__header-content{color:var(--text-3000)}.LemonTable__header-content{align-items:center;display:flex;justify-content:space-between;line-height:1.5}.LemonTable__header-content div{white-space:nowrap}.LemonTable__footer{border-top:1px solid var(--border);cursor:default}.LemonTable__cell--sticky{background:var(--lemon-table-background-color)}.LemonTable__row--status-highlighted .LemonTable__cell--sticky:before{background:var(--primary-highlight)}.LemonTable__header--sticky{background:var(--lemon-table-background-color)}body:not(.storybook-test-runner) .LemonTable__cell--sticky,body:not(.storybook-test-runner) .LemonTable__header--sticky{left:0;overflow:visible!important;position:sticky!important;z-index:1}body:not(.storybook-test-runner) .LemonTable__cell--sticky:before,body:not(.storybook-test-runner) .LemonTable__header--sticky:before{box-shadow:-16px 0 16px 16px transparent;clip-path:inset(0 -16px 0 0);content:"";inset:0;position:absolute;transition:box-shadow .2s ease;z-index:-1}body:not(.storybook-test-runner) .ScrollableShadows--left .LemonTable__cell--sticky:before,body:not(.storybook-test-runner) .ScrollableShadows--left .LemonTable__header--sticky:before{box-shadow:-16px 0 16px 16px rgba(0,0,0,.25)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTable/LemonTableLoader.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonTableLoader{background:var(--primary-highlight);border:none!important;height:0;left:0;overflow:hidden;padding:.05rem!important;position:absolute;transition:height .2s ease,top .2s ease;width:100%;z-index:10}.LemonTableLoader:after{animation:LemonTableLoader__swooping 1.5s linear infinite;background:var(--primary-3000);content:"";height:100%;left:0;position:absolute;top:0;width:50%}.LemonTableLoader.LemonTableLoader--enter-active,.LemonTableLoader.LemonTableLoader--enter-done{height:.125rem}@keyframes LemonTableLoader__swooping{0%{left:0;transform:translateX(-100%);width:33.333%}50%{width:50%}to{left:100%;transform:translateX(100%);width:33.333%}}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.LemonTabs{--lemon-tabs-gap:2rem;--lemon-tabs-margin-bottom:1rem;--lemon-tabs-content-padding:0.75rem 0;align-self:stretch;display:flex;flex-direction:column;position:relative}.LemonTabs--small{--lemon-tabs-gap:1rem;--lemon-tabs-margin-bottom:0.5rem;--lemon-tabs-content-padding:0.375rem 0}.Navigation3000__scene>.LemonTabs:first-child,.Navigation3000__scene>:first-child>.LemonTabs:first-child{margin-top:-.75rem}.LemonTabs__bar{align-items:stretch;display:flex;flex-direction:row;flex-shrink:0;gap:var(--lemon-tabs-gap);list-style:none;margin-bottom:var(--lemon-tabs-margin-bottom);overflow-x:auto;position:relative}.LemonTabs__bar:before{background:var(--border);bottom:0;content:"";height:1px;left:0;position:absolute;width:100%}.LemonTabs__bar:after{background:var(--link);bottom:0;content:"";height:.125rem;left:0;position:absolute;transform:translateX(var(--lemon-tabs-slider-offset));width:var(--lemon-tabs-slider-width)}.LemonTabs--transitioning .LemonTabs__bar:after{transition:width .15s ease,transform .15s ease}.LemonTabs--transitioning .LemonTabs__bar .LemonTabs__tab{transition:color .15s ease}.LemonTabs__bar .LemonTabs__tab:hover{color:var(--link)}.LemonTabs__bar .LemonTabs__tab:active{color:var(--primary-3000-active)}.LemonTabs__bar .LemonTabs__tab.LemonTabs__tab--active{color:var(--link);text-shadow:0 0 .25px currentColor}.LemonTabs__bar .LemonTabs__tab a{color:inherit;-webkit-text-decoration:none;text-decoration:none;transition:none}.LemonTabs__bar .LemonTabs__tab .LemonTabs__tab-content{align-items:center;cursor:pointer;display:flex;padding:var(--lemon-tabs-content-padding);white-space:nowrap}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTag/LemonTag.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonTag{align-items:center;background:var(--border);border-radius:var(--radius-sm);color:var(--text-3000);display:inline-flex;font-size:.75rem;font-weight:var(--font-medium);gap:.125rem;line-height:1rem;padding:.125rem .25rem;white-space:nowrap}.LemonTag.LemonTag--normal{font-weight:400}.LemonTag:not(.LemonTag--breakdown){background:none;border-radius:var(--radius-sm);border-style:solid;border-width:1px;font-size:.6875rem;padding:.075rem .25rem}.LemonTag.LemonTag--primary{background:none;border-color:var(--primary-3000);color:var(--primary-3000)}.LemonTag.LemonTag--option{background-color:var(--accent-3000);color:var(--primary-3000)}.LemonTag.LemonTag--highlight{background:none;border-color:var(--highlight);color:var(--highlight)}.LemonTag.LemonTag--warning{background-color:none;border-color:var(--warning);color:var(--warning)}.LemonTag.LemonTag--danger{background:none;border-color:var(--danger);color:var(--danger)}.LemonTag.LemonTag--success{background:none;border-color:var(--success);color:var(--success)}.LemonTag.LemonTag--completion{background:none;border-color:var(--purple);color:var(--purple)}.LemonTag.LemonTag--caution{background:none;border-color:var(--danger-lighter);color:var(--danger-lighter)}.LemonTag.LemonTag--muted{background-color:var(--accent-3000);color:var(--muted)}.LemonTag.LemonTag--none{background:none}.LemonTag.LemonTag--breakdown{background-color:var(--primary-highlight);border-radius:40px;color:var(--primary-alt);font-size:14px;font-weight:400;line-height:16px;padding:8px 12px;vertical-align:bottom}.LemonTag.LemonTag--size-small{font-size:.625rem;line-height:.875rem;padding:0 .1875rem}.LemonTag .LemonTag__icon{display:flex;font-size:.875rem;margin-right:.125rem}.LemonTag .LemonTag__right-button{margin-left:.25rem;min-height:1.5rem!important;padding:.125rem!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonTextArea{background:none;background-color:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);color:var(--text-3000);cursor:text;display:block;font-size:.875rem;line-height:1.25rem;min-height:2.5rem;outline:none;padding:.5rem;text-align:left;text-overflow:ellipsis;width:100%}.LemonTextArea:focus:not(:disabled),.LemonTextArea:not(:disabled):hover{border:1px solid var(--border-bold)}.LemonTextArea:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}.Field--error .LemonTextArea{border:1px solid var(--danger)}.LemonTextArea--preview ul{list-style-position:inside;list-style-type:disc}.LemonTextArea--preview ol{list-style-position:inside;list-style-type:decimal}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LemonWidget/LemonWidget.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonWidget{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius)}.LemonWidget .LemonWidget__header{align-items:center;color:var(--muted-alt-3000,var(--primary));display:flex;font-size:.875rem;font-weight:500;justify-content:space-between;padding:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Lettermark/Lettermark.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Lettermark{align-items:center;background:var(--lettermark-bg,var(--lettermark-1-bg));border-radius:var(--radius-sm);color:var(--lettermark-text,var(--lettermark-1-text));display:inline-flex;flex-shrink:0;font-size:.75rem;font-weight:600;height:2em;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:2em}.Lettermark.Lettermark--rounded{border-radius:1.5rem}.Lettermark.Lettermark--outlined{background:none;border:1.5px dashed var(--lettermark-bg);color:var(--lettermark-bg)}.Lettermark.Lettermark--variant-gray{background:var(--border);color:var(--text-3000)}.Lettermark.Lettermark--xsmall{font-size:.5rem}.Lettermark.Lettermark--xlarge{border-radius:var(--radius);font-size:2rem}.Lettermark.Lettermark--variant-1{--lettermark-text:var(--lettermark-1-text);--lettermark-bg:var(--lettermark-1-bg)}.Lettermark.Lettermark--variant-2{--lettermark-text:var(--lettermark-2-text);--lettermark-bg:var(--lettermark-2-bg)}.Lettermark.Lettermark--variant-3{--lettermark-text:var(--lettermark-3-text);--lettermark-bg:var(--lettermark-3-bg)}.Lettermark.Lettermark--variant-4{--lettermark-text:var(--lettermark-4-text);--lettermark-bg:var(--lettermark-4-bg)}.Lettermark.Lettermark--variant-5{--lettermark-text:var(--lettermark-5-text);--lettermark-bg:var(--lettermark-5-bg)}.Lettermark.Lettermark--variant-6{--lettermark-text:var(--lettermark-6-text);--lettermark-bg:var(--lettermark-6-bg)}.Lettermark.Lettermark--variant-7{--lettermark-text:var(--lettermark-7-text);--lettermark-bg:var(--lettermark-7-bg)}.Lettermark.Lettermark--variant-8{--lettermark-text:var(--lettermark-8-text);--lettermark-bg:var(--lettermark-8-bg)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Link/Link.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Link{background:none;border:none;color:var(--link);cursor:pointer;line-height:inherit;padding:0;text-align:left;transition:none}.Link:not(:disabled):hover{color:var(--primary-3000-hover)}.Link:not(:disabled):active{color:var(--primary-3000-active)}.Link:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}.Link>.LemonIcon:last-child{margin-left:.15em}.Link--subtle{color:var(--text-3000)}.Link--subtle:not(:disabled):hover{color:var(--primary-3000-hover)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/LoadingBar/LoadingBar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".progress-outer{align-items:center;display:flex}.progress{background:#eee;border-radius:var(--radius-sm);height:10px;min-height:1px;overflow:hidden;position:relative;width:100%}.progress-bar{background:var(--primary-3000-active);height:100%;left:0;position:absolute}.storybook-test-runner .progress-bar{width:50%!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/PaginationControl/PaginationControl.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PaginationControl{align-items:center;align-self:flex-end;display:flex;justify-content:flex-end}.PaginationControl>span{margin-right:.5rem}.PaginationControl--bordered{border:1px solid var(--border);border-radius:var(--radius);padding:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Popover/Popover.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Popover{display:flex;flex-direction:row;perspective:80rem;perspective-origin:top;z-index:var(--z-popover)}.Popover h5{margin:.25rem .5rem}.Popover p:last-child{margin-bottom:0}.Popover[data-floating-placement^=top]{perspective-origin:bottom}.Popover.Popover--top-centered{left:50%;top:1rem;transform:translate(-50%)}.Popover__box{background:var(--bg-light);border:1px solid var(--secondary-3000-button-border);border-radius:var(--radius);box-shadow:var(--shadow-elevation-3000);flex-grow:1;max-width:100%;opacity:0;overflow:visible;position:relative;transform-origin:top;transition:opacity 50ms ease,transform 50ms ease}.Popover[data-placement^=bottom] .Popover__box{margin-top:.25rem;transform:rotateX(-6deg);transform-origin:top}.Popover[data-placement^=bottom].Popover--with-arrow .Popover__box{margin-top:.5rem}.Popover[data-placement^=top] .Popover__box{margin-bottom:.25rem;transform:rotateX(6deg);transform-origin:bottom}.Popover[data-placement^=top].Popover--with-arrow .Popover__box{margin-bottom:.5rem}.Popover[data-placement^=left] .Popover__box{margin-right:.25rem;transform:rotateY(-6deg);transform-origin:right}.Popover[data-placement^=left].Popover--with-arrow .Popover__box{margin-right:.5rem}.Popover[data-placement^=right] .Popover__box{margin-left:.25rem;transform:rotateY(6deg);transform-origin:left}.Popover[data-placement^=right].Popover--with-arrow .Popover__box{margin-left:.5rem}.Popover.Popover--enter-active .Popover__box,.Popover.Popover--enter-done .Popover__box{opacity:1;transform:none}.Popover--max-content-width .Popover__box{width:-moz-max-content;width:max-content}.Popover__arrow{background:var(--bg-light);height:.5rem;position:absolute;transform:rotate(45deg);width:.5rem}[data-placement^=bottom] .Popover__arrow{border-left:1px solid var(--border);border-top:1px solid var(--border);top:-.3125rem}[data-placement^=top] .Popover__arrow{border-bottom:1px solid var(--border);border-right:1px solid var(--border);bottom:-.3125rem}[data-placement^=left] .Popover__arrow{border-right:1px solid var(--border);border-top:1px solid var(--border);right:-.3125rem}[data-placement^=right] .Popover__arrow{border-bottom:1px solid var(--border);border-left:1px solid var(--border);left:-.3125rem}.Popover__content{border-radius:calc(var(--radius) - 1px);max-height:100%}.Popover--padded .Popover__content>.ScrollableShadows__inner{padding:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/ProfilePicture/ProfilePicture.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".profile-package{align-items:center;display:inline-flex}.profile-name,.profile-package:not(:first-child){margin-left:.375rem}.profile-name{font-weight:500}.ProfilePicture{align-items:center;border-radius:50%;display:inline-flex;flex-shrink:0;font-weight:600;justify-content:center;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ProfilePicture.xxl{font-size:20px;height:48px;line-height:48px;width:48px}.ProfilePicture.xl{font-size:20px;height:40px;line-height:40px;width:40px}.ProfilePicture.lg{font-size:18px;height:32px;line-height:32px;width:32px}.ProfilePicture.md{font-size:14px;height:24px;line-height:24px;width:24px}.ProfilePicture.sm{font-size:12px;height:18px;line-height:18px;width:18px}.ProfilePicture.xs{font-size:11px;height:16px;line-height:16px;width:16px}.ProfilePicture .Lettermark{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.ProfileBubbles{align-items:center;display:flex}.ProfileBubbles>*{outline:.125rem solid var(--bg-light)}.ProfileBubbles>:not(:first-child){margin-left:-.125rem}.ProfileBubbles__more{align-items:center;background:var(--primary-3000);border-radius:50%;color:#fff;display:flex;font-size:.625rem;font-weight:600;height:1.5rem;justify-content:center;letter-spacing:-.05em;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Spinner/Spinner.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.Spinner{--spinner-color:var(--primary-3000);display:inline-block;flex-shrink:0;height:1em;vertical-align:-.15em;width:1em}.Spinner.Spinner--textColored{--spinner-color:currentColor}.Spinner__layer,.Spinner__layer>circle{transform-origin:center}.Spinner__layer>circle{display:block;fill:transparent;stroke:var(--spinner-color);stroke-linecap:round;stroke-width:8px}.Spinner__layer:first-child{opacity:.333}.Spinner__layer:nth-child(2){animation:spin 1s linear infinite}.Spinner__layer:nth-child(2)>circle{animation:Spinner__writhe 1.5s ease infinite both}@keyframes Spinner__writhe{0%,to{stroke-dasharray:70;stroke-dashoffset:-60}50%{stroke-dasharray:70;stroke-dashoffset:-30}}.SpinnerOverlay{align-items:center;display:flex;inset:0;justify-content:center;min-height:min(100%,6rem);position:absolute;text-align:center;transition:opacity .2s ease;z-index:var(--z-content-overlay)}.SpinnerOverlay[aria-hidden=true]{opacity:0;pointer-events:none}.SpinnerOverlay:before{background:var(--bg-light);content:"";inset:0;opacity:.5;position:absolute}.SpinnerOverlay .Spinner{position:relative}.SpinnerOverlay.SpinnerOverlay--scene-level:before{background:var(--bg-3000)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Splotch/Splotch.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Splotch{height:1.5rem;padding:.25rem;width:1.5rem}.Splotch__paint{border-radius:var(--radius);height:1rem;width:1rem}.Splotch--blue .Splotch__paint{background:var(--blue)}.Splotch--purple .Splotch__paint{background:var(--purple)}.Splotch--green .Splotch__paint{background:var(--green)}.Splotch--black .Splotch__paint{background:var(--black)}.Splotch--white .Splotch__paint{background:#fff;border:1px solid var(--border)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Tooltip/Tooltip.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Tooltip{box-shadow:var(--modal-shadow-elevation);z-index:var(--z-tooltip)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/icons/icons.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonIcon{display:inline-block;vertical-align:-.15em;width:1em}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/monaco/CodeEditor.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{display:block!important}.editor-wrapper .monaco-editor,.editor-wrapper .overflow-guard{border-radius:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{text-align:right;width:100%}.CodeEditorInline .monaco-editor,.CodeEditorResizeable .monaco-editor{--vscode-textLink-foreground:transparent;--vscode-focusBorder:transparent;border-radius:var(--radius)}.CodeEditorInline .monaco-editor .overflow-guard,.CodeEditorResizeable .monaco-editor .overflow-guard{border-radius:var(--radius)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ColumnConfiguratorModal .Columns{background-color:var(--bg-3000);border-radius:var(--radius);-moz-column-gap:1rem;column-gap:1rem;display:flex;padding:.5rem;width:700px}@media(max-width:960px){.ColumnConfiguratorModal .Columns{display:block;width:auto}}.ColumnConfiguratorModal .HalfColumn{width:50%}@media(max-width:960px){.ColumnConfiguratorModal .HalfColumn{width:100%}}.ColumnConfiguratorModal .SelectedColumn{align-items:center;background-color:var(--primary-highlight);border-radius:var(--radius);display:flex;justify-content:flex-start;margin:calc(var(--radius)/2) 0;overflow:hidden;padding:0 .5rem}.ColumnConfiguratorModal .selected-column-col{display:flex;flex-direction:column}.ColumnConfiguratorModal .drag-handle{color:var(--text-3000);cursor:move;font-size:1.2em;padding-right:.25rem}.ColumnConfiguratorModal .drag-handle svg{transform:rotate(90deg)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataTable/DataTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DataTable td{max-width:20rem}.DataTable .DataTable__row--highlight_once{animation:DataTable__highlight 2s ease-out}.DataTable .DataTable__row--category_row{background-color:var(--bg-3000);color:var(--muted);font-size:.75rem;font-weight:600;height:2rem;text-align:center}@keyframes DataTable__highlight{0%{background-color:var(--mark)}to{background-color:initial}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Chart.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DataVisualization{--viz-min-height:calc(80vh - 6rem)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DataVisualization__LineGraph{min-height:var(--viz-min-height)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/ConditionalFormatting/ConditionalFormattingTab.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ConditionalFormattingTab__ColorPicker .LemonButton__chrome{gap:0;padding-left:6px!important}.ConditionalFormattingTab .LemonCollapsePanel__header{padding-left:0!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/SideBar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DataVisualization .LemonTabs .LemonTabs__bar{margin-bottom:0}.DataVisualization .SideBar{border-radius:var(--radius);max-width:18rem;min-height:var(--viz-min-height);min-width:18rem}.DataVisualization .SideBar .LemonInput.LemonInput--medium{display:flex}.DataVisualization .SideBar .LemonInput.LemonInput--medium .LemonInput__input{flex:1;width:0}.DataVisualization .SideBar .grow-2{flex-grow:2}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/DataVisualization/Components/Variables/Variables.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DataVizVariable_Button .LemonButton__chrome{justify-content:flex-end!important}.DataVizVariable_Popover .ScrollableShadows__inner{padding:0!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/EditorFilterGroup.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".EditorFilterGroup .EditorFilterGroup__title{display:none}.EditorFilterGroup .EditorFilterGroup__content>*+*{margin-top:1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/EditorFilters.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".EditorFiltersWrapper{--editor-panel-group-min-width:24rem;background:var(--bg-light);flex-shrink:0}.EditorFiltersWrapper:not(.EditorFiltersWrapper--embedded){border:1px solid var(--border);border-radius:var(--radius);padding:1rem}.EditorFiltersWrapper .EditorFilters{display:flex;flex-flow:row wrap;gap:1rem}.EditorFiltersWrapper .EditorFilters .EditorFilterGroup{flex:1;max-width:100%;min-width:var(--editor-panel-group-min-width)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/InsightViz.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".InsightViz{container-type:inline-size;display:flex;flex:1;flex-direction:column;gap:1rem;overflow:hidden}.InsightViz.InsightViz--horizontal{align-items:start;flex-flow:row wrap}.InsightViz.InsightViz--horizontal .EditorFiltersWrapper{width:100%}@container (min-width: 768px){.InsightViz.InsightViz--horizontal .EditorFiltersWrapper{max-width:30rem;min-width:26rem;width:30%}}.InsightVizDisplay{--insight-viz-min-height:min(calc(80vh - 6rem),32rem);display:flex;flex:1;flex-direction:column;min-height:0}.ErrorTracking__breakdowns .InsightVizDisplay,.ExportedInsight .InsightVizDisplay,.InsightCard .InsightVizDisplay,.NotebookNode .InsightVizDisplay,.WebAnalyticsDashboard .InsightVizDisplay{flex:1;height:100%}.ErrorTracking__breakdowns .InsightVizDisplay .LineGraph,.ExportedInsight .InsightVizDisplay .LineGraph,.InsightCard .InsightVizDisplay .LineGraph,.NotebookNode .InsightVizDisplay .LineGraph,.WebAnalyticsDashboard .InsightVizDisplay .LineGraph{padding:.5rem}.InsightVizDisplay .InsightVizDisplay__content{display:flex;flex:1;flex-direction:column;height:100%;position:relative}.InsightVizDisplay .InsightVizDisplay__content--with-legend{flex-direction:row}.InsightVizDisplay .InsightVizDisplay__content .InsightVizDisplay__content__left{display:flex;flex:1;flex-direction:column;position:relative;width:100%}.InsightVizDisplay .InsightVizDisplay__content .InsightVizDisplay__content__right{align-items:center;display:flex;flex-shrink:1;margin:1rem;max-height:var(--insight-viz-min-height);max-width:45%;width:-moz-fit-content;width:fit-content}.InsightVizDisplay .InsightDisplayConfig{border-bottom-width:1px;padding:.5rem}.WebAnalyticsDashboard .InsightVizDisplay{--insight-viz-min-height:25rem}.RetentionContainer{display:flex;flex:1;flex-direction:column;width:100%}.RetentionContainer .RetentionContainer__graph{flex:1;margin:.5rem}.RetentionContainer .RetentionContainer__table{flex-shrink:0}.RetentionContainer .LineGraph{min-height:30vh;position:relative!important;width:100%!important}.ExportedInsight .RetentionContainer .LineGraph,.InsightCard .RetentionContainer .LineGraph,.NotebookNode .RetentionContainer .LineGraph,.WebAnalyticsDashboard .RetentionContainer .LineGraph{min-height:100px;position:relative}.TrendsInsight{display:flex;flex:1;flex-direction:column;margin:.5rem;min-height:var(--insight-viz-min-height);position:relative}.ExportedInsight .TrendsInsight,.InsightCard .TrendsInsight,.NotebookNode .TrendsInsight,.WebAnalyticsDashboard .TrendsInsight{min-height:auto}.TrendsInsight--ActionsTable,.TrendsInsight--BoldNumber,.TrendsInsight--WorldMap{margin:0;min-height:auto}.TrendsInsight--BoldNumber{align-items:center;display:flex;justify-content:center}.FunnelInsight{display:flex;flex:1;flex-direction:column;width:100%}.FunnelInsight--type-steps-vertical,.FunnelInsight--type-time_to_convert,.FunnelInsight--type-trends{min-height:var(--insight-viz-min-height)}.ExportedInsight .FunnelInsight--type-steps-vertical,.ExportedInsight .FunnelInsight--type-time_to_convert,.ExportedInsight .FunnelInsight--type-trends,.InsightCard .FunnelInsight--type-steps-vertical,.InsightCard .FunnelInsight--type-time_to_convert,.InsightCard .FunnelInsight--type-trends,.NotebookNode .FunnelInsight--type-steps-vertical,.NotebookNode .FunnelInsight--type-time_to_convert,.NotebookNode .FunnelInsight--type-trends,.WebAnalyticsDashboard .FunnelInsight--type-steps-vertical,.WebAnalyticsDashboard .FunnelInsight--type-time_to_convert,.WebAnalyticsDashboard .FunnelInsight--type-trends{min-height:auto}.funnel-significance-highlight{background:var(--primary);color:var(--bg-light);display:inline-flex}.funnel-significance-highlight .LemonIcon{color:var(--bg-light)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/PropertyGroupFilters.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.PropertyGroupFilters .property-group{background-color:var(--bg-3000);border-radius:var(--radius);border-width:1px;padding:.5rem}.PropertyGroupFilters .property-group-and-or-separator{color:var(--primary-alt);font-size:12px;font-weight:600;padding:.5rem 0;position:relative}.PropertyGroupFilters .property-group-and-or-separator:before{background-color:var(--border-light);content:" ";height:100%;left:17px;position:absolute;top:0;width:2px}.PropertyGroupFilters .property-group-and-or-separator>span{background-color:var(--bg-light);display:inline-block;padding:.25rem;position:relative;text-align:center;width:35px;z-index:1}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/queries/nodes/InsightViz/ResultCustomizationsModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ResultCustomizationsModal__ColorGlyphButton .LemonButton__chrome{gap:4px;padding-left:6px!important;padding-right:6px!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/activity/explore/EventDetails.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".LemonTabs[data-attr=event-details] ul{padding:0 .75rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/authentication/Setup2FA.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Setup2FA__image{margin:0 auto;min-height:215px;min-width:215px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/Billing.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".BillingPlan{flex-grow:1;max-width:500px}.BillingPlan .BillingPlan__description ol,.BillingPlan .BillingPlan__description ul{list-style:none;margin-top:1rem;padding-left:0;text-align:center}.BillingPlan .BillingPlan__description ol li,.BillingPlan .BillingPlan__description ul li{line-height:1.2rem;margin-bottom:1rem}.BillingPlan .BillingPlan__description ol .disclaimer,.BillingPlan .BillingPlan__description ul .disclaimer{font-size:10px;font-weight:700;padding-left:1px;vertical-align:top}.BillingPlan .BillingPlan__description .disclaimer-details{color:var(--muted);font-size:.75rem;margin-top:1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/BillingGauge.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".BillingGaugeItem{animation:BillingGaugeItem__expand .8s cubic-bezier(.15,.15,.2,1) forwards}.BillingGaugeItem .BillingGaugeItem__info{background:var(--bg-light);border-left:1px solid var(--border);bottom:100%;font-size:.8rem;left:100%;line-height:1rem;margin-left:-1px;padding:0 .25rem .5rem;position:absolute;white-space:nowrap}.BillingGaugeItem .BillingGaugeItem__info--bottom{bottom:auto;padding:.5rem .25rem 0;top:100%}.BillingGaugeItem .BillingGaugeItem__info:hover{z-index:100}.BillingGaugeItem.BillingGaugeItem--billing_limit,.BillingGaugeItem.BillingGaugeItem--free_tier{background-color:var(--border-light-opaque)}.BillingGaugeItem.BillingGaugeItem--current_usage{background:var(--danger)}.BillingGaugeItem.BillingGaugeItem--current_usage.BillingGaugeItem--within-usage-limit{background:var(--brand-blue)}.BillingGaugeItem.BillingGaugeItem--projected_usage{background:repeating-linear-gradient(-45deg,var(--danger-3000-button-border-dark),var(--danger-3000-button-border-dark) .5rem,var(--danger-3000-button-border-hover-dark) .5rem,var(--danger-3000-button-border-hover-dark) 1rem);opacity:.5}.BillingGaugeItem.BillingGaugeItem--projected_usage.BillingGaugeItem--within-usage-limit{background:repeating-linear-gradient(-45deg,var(--data-color-1),var(--data-color-1) .5rem,var(--data-color-1-hover) .5rem,var(--data-color-1-hover) 1rem)}@keyframes BillingGaugeItem__expand{0%{width:0}to{width:var(--billing-gauge-item-width)}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/PlanComparison.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PlanComparisonModal{max-width:900px}table.PlanComparison{table-layout:fixed}table.PlanComparison td{padding:.75rem 1rem;vertical-align:top}table.PlanComparison td.PlanTable__td__upgradeButton{padding-bottom:1rem;padding-top:1rem}table.PlanComparison th{font-weight:600;padding:.75rem 1rem;text-align:left;vertical-align:top}table.PlanComparison th.PlanTable__th__section{font-weight:500;padding:.25rem 1rem}table.PlanComparison th.PlanTable__th__feature{font-weight:600;padding:.75rem 1rem .75rem 3.25rem}table.PlanComparison th.PlanTable__th__feature.PlanTable__th__feature--reduced_padding{padding:.75rem 1rem}table.PlanComparison th.PlanTable__th__last-feature{padding-bottom:2rem}table.PlanComparison th p{font-weight:400}.PlanTable__tr__border{border-bottom:3px dotted rgba(0,0,0,.07)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/billing/UnsubscribeSurveyModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".UnsubscribeSurveyCostControl .LemonCollapsePanel__header{background:var(--bg-3000);padding:0!important}.UnsubscribeSurveyCostControl .LemonButton__chrome{padding:0!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".CohortCriteriaRow{padding:0 .5rem}.CohortCriteriaRow .CohortCriteriaRow__Criteria{border:1px solid transparent;border-radius:var(--radius);padding:.25rem .5rem}.CohortCriteriaRow .CohortCriteriaRow__Criteria.CohortCriteriaRow__Criteria--error{border:1px solid var(--danger)}.CohortCriteriaRow .CohortCriteriaRow__Criteria .CohortCriteriaRow__Criteria__error-row{margin:.25rem 0}.CohortCriteriaRow .CohortCriteriaRow__Criteria .CohortCriteriaRow__Criteria__Field{margin:.25rem 0;min-width:0}.CohortCriteriaRow .CohortCriteriaRow__Criteria .CohortCriteriaRow__Criteria__Field.CohortCriteriaRow__Criteria__Field--error .CohortField{border:1px solid var(--danger)}.CohortCriteriaRow .CohortCriteriaRow__Criteria .CohortCriteriaRow__Criteria__Field:not(:last-child){margin-right:.5rem}.CohortCriteriaRow .logical-row-divider{color:var(--primary-alt);font-size:12px;font-weight:600;text-transform:uppercase}.CohortCriteriaRow .logical-row-divider:after,.CohortCriteriaRow .logical-row-divider:before{border-top:1px solid var(--border)}.CohortCriteriaRow .logical-row-divider:before{width:1.5%}.CohortCriteriaRow .logical-row-divider:after{width:95%}.CohortCriteriaRow .CohortCriteriaRow__inline-divider{background-color:var(--border);flex:1;height:1px;margin:0 .5rem}.CohortCriteriaRow .CohortCriteriaRow__Criteria__arrow{color:var(--muted);flex-shrink:0;font-size:18px;font-weight:700;padding-left:6px;padding-right:8px;position:relative;top:6px;-webkit-user-select:none;-moz-user-select:none;user-select:none}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/cohorts/CohortFilters/CohortField.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Popover__CohortField .Popover__box{max-height:30rem}.CohortField__dropdown{max-width:calc(100vw - 14rem);min-width:14rem}.CohortField__CohortTextField{font-weight:500}.CohortField__CohortNumberField{max-width:4rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardItems.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".dashboard-items-wrapper{margin-top:1rem;width:100%}.react-grid-layout{margin-bottom:2rem;position:relative;transition:height .1s ease}.react-grid-layout.dashboard-view-mode .react-grid-item{transition:border-color .1s ease}.react-grid-item.cssTransforms{transition-property:transform}.react-grid-item.resizing{will-change:width,height;z-index:1}.react-grid-item.react-draggable .CardMeta,.react-grid-item.react-draggable .TextCard__body{cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-grid-item.react-draggable-dragging{transition:none;will-change:transform;z-index:105}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{border:1px solid var(--primary-3000);border-radius:var(--radius);max-width:100%;outline:1px solid var(--primary-3000);position:relative;transition:.1s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item{transition:all .1s ease;transition-property:left,top}.react-grid-item>.react-resizable-handle{bottom:-.5rem;cursor:se-resize;height:2rem;position:absolute;right:-.5rem;width:2rem;z-index:10}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{cursor:se-resize}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{bottom:2rem;cursor:ew-resize;height:auto;top:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;left:0;right:2rem;width:auto}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/DashboardTemplateChooser.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DashboardTemplateChooser{display:grid;gap:.5em .5em;grid-template-columns:repeat(3,1fr);max-width:780px}.DashboardTemplateChooser .TemplateItem{height:210px;width:240px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/dashboard/EmptyDashboardComponent.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.EmptyDashboard .EmptyDashboard__fade:after{background:linear-gradient(to top,var(--bg-light),transparent);bottom:0;content:"";height:3rem;pointer-events:none;position:absolute}.EmptyDashboard{margin-top:1rem;position:relative}.EmptyDashboard .EmptyDashboard__fade{height:150px;margin-top:1rem;overflow:hidden;position:relative}.EmptyDashboard .EmptyDashboard__fade:after{--bg-light:var(--bg-3000);height:150px;width:100%}.EmptyDashboard .EmptyDashboard__cta{background:var(--bg-light);border-radius:var(--radius);border-width:1px;box-shadow:var(--shadow-elevation-3000);left:50%;max-width:calc(100% - 32px);padding:1.5rem;position:absolute;top:16px;transform:translateX(-50%);width:360px;z-index:var(--z-content-overlay)}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-management/properties/PropertyDefinitionsTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-icon{padding-right:.5rem;width:36px}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-icon .definition-column-name-icon{align-items:center;display:flex;font-size:1.2rem;justify-content:center;width:30px}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-icon .definition-column-name-icon svg.taxonomy-icon{flex-shrink:0}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-icon .definition-column-name-icon svg.taxonomy-icon.taxonomy-icon-muted{color:var(--muted-alt)}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-icon .definition-column-name-icon svg.taxonomy-icon.taxonomy-icon-verified{color:var(--success)}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-name .definition-column-name-content{display:flex;flex-direction:column;justify-content:center;min-height:32px;position:relative}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-name .definition-column-name-content .definition-column-name-content-title{align-items:center;cursor:pointer;display:flex;font-weight:600;gap:.25rem}.event-properties-definition-table .LemonTable__content>table>tbody td.definition-column-name .definition-column-name-content .definition-column-name-content-title svg{color:var(--success)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/data-warehouse/ViewLinkModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".form-error{color:var(--danger)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/feature-flags/FeatureFlag.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".VariantFormList{border:1px solid var(--border);border-radius:var(--radius);font-size:13px;margin-top:16px;padding:16px}.VariantFormList .label-row{font-weight:700}.VariantFormList .VariantFormList__row{grid-template-columns:repeat(24,minmax(0,1fr))}.feature-flag-property-display{align-items:center;display:flex;flex-flow:row wrap;gap:.5rem;margin-top:.5rem}.feature-flag-property-display .arrow-right{margin-right:-8px;margin-top:.25rem}.feature-flag-property-display .display-value{word-break:break-all}.condition-set-separator{color:var(--primary-alt);font-size:12px;font-weight:var(--font-semibold);margin-bottom:.5rem;margin-left:.5rem}.feature-flag-form-row{align-items:center;display:flex;flex-wrap:wrap;width:100%}.feature-flag-form-row .centered{align-items:center;display:flex;white-space:pre-wrap}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/feature-flags/FeatureFlagInstructions.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FeatureFlagInstructionsHeader{flex-wrap:nowrap}.FeatureFlagInstructionsHeader .FeatureFlagInstructionsHeader__header-title{display:flex;justify-items:center}.FeatureFlagInstructionsHeader .FeatureFlagInstructionsHeader__header-title .FeatureFlagInstructionsHeader__header-title__icon{color:var(--text-muted-alt);font-size:1.6em;margin-right:12px}.FeatureFlagInstructionsHeader__option{display:flex;justify-items:center}.FeatureFlagInstructionsHeader__option .FeatureFlagInstructionsHeader__option__icon{margin-right:8px;margin-top:2px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/Funnel.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".funnel-bin-filter-dropdown .funnel-bins-custom-picker{margin:5px 0 5px 13px;width:43px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelBarHorizontal/FunnelBarHorizontal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FunnelBarHorizontal .funnel-step header .funnel-step-title{max-width:calc(100% - 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FunnelBarHorizontal{min-height:100%;padding:1rem}.InsightCard .FunnelBarHorizontal{padding-left:1rem;padding-right:1rem}.FunnelBarHorizontal .funnel-step{padding-left:2rem;position:relative}.FunnelBarHorizontal .funnel-step:not(:first-child),.FunnelBarHorizontal .funnel-step:not(:first-child) .funnel-series-container{padding-top:.75rem}.FunnelBarHorizontal .funnel-step .graph-series-glyph{z-index:2}.FunnelBarHorizontal .funnel-step .funnel-conversion-metadata{align-items:center;display:flex;justify-content:space-between}.FunnelBarHorizontal .funnel-step .funnel-conversion-metadata .funnel-inspect-button{line-height:1.5rem}.FunnelBarHorizontal .funnel-step .funnel-conversion-metadata .funnel-inspect-button .value-inspector-button-icon{font-size:1.5rem;margin-right:.25rem;vertical-align:bottom}.FunnelBarHorizontal .funnel-step .funnel-series-container{align-items:center;display:flex;flex-direction:column;height:100%;left:0;position:absolute;top:0;width:1.5rem}.FunnelBarHorizontal .funnel-step .funnel-series-container .graph-series-glyph{-webkit-user-select:none;-moz-user-select:none;user-select:none}.FunnelBarHorizontal .funnel-step .funnel-series-container .funnel-series-linebox{border-right:2px solid var(--border);box-sizing:border-box;left:0;opacity:.5;position:absolute;width:calc(.75rem + 1px)}.FunnelBarHorizontal .funnel-step .funnel-series-container .funnel-series-linebox.before{height:11.5px;top:0}.FunnelBarHorizontal .funnel-step .funnel-series-container .funnel-series-linebox.after{bottom:0;height:calc(100% - 11.5px);top:11.5px}.FunnelBarHorizontal .funnel-step .funnel-step-metadata{display:flex;flex-wrap:wrap}.FunnelBarHorizontal .funnel-step footer,.FunnelBarHorizontal .funnel-step header{align-items:center;display:flex;line-height:23px}.FunnelBarHorizontal .funnel-step header{display:flex;flex-wrap:wrap;justify-content:space-between;position:relative}.FunnelBarHorizontal .funnel-step header .funnel-step-title{font-weight:700}.FunnelBarHorizontal .funnel-step header button{margin-left:.375rem}.FunnelBarHorizontal .funnel-bar-wrapper{background-color:var(--border-3000);border-radius:var(--radius);display:flex;flex-direction:row;height:32px;margin:4px 0}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar{background:var(--primary-3000);height:100%;position:relative;transition:width .2s ease,height .2s ease}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar.first{border-radius:var(--radius) 0 0 4px}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar.last{border-radius:0 4px 4px 0}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar.only{border-radius:var(--radius)}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar .funnel-bar-percentage{color:#fff;font-weight:700;line-height:16px;position:absolute;top:8px}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar .funnel-bar-percentage.inside{right:8px}.FunnelBarHorizontal .funnel-bar-wrapper .funnel-bar .funnel-bar-percentage.outside{color:var(--text-3000);left:calc(100% + 8px)}.storybook-test-runner .InsightCard .funnel-bar{display:none}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelBarVertical/FunnelBarVertical.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FunnelBarVertical{flex:1;height:100%;overflow:hidden;position:relative;width:100%}.FunnelBarVertical table{--bar-width:0.5rem;--bar-row-height:18rem;--bar-padding-top:1rem;--bar-padding-bottom:1.5rem;height:100%;width:100%}.FunnelBarVertical table>tbody>tr:first-child{border-bottom:1px solid var(--border)}.FunnelBarVertical table>tbody>tr:first-child>td{padding-bottom:var(--bar-padding-bottom);padding-top:var(--bar-padding-top)}.FunnelBarVertical table>tbody>tr>td{padding:.75rem 0}.StepBars{align-items:flex-end;border-bottom:1px solid var(--border);display:flex;gap:.125rem;height:calc(var(--bar-row-height) - var(--bar-padding-top) - var(--bar-padding-bottom));padding:0 1rem;position:relative}.StepBars:not(.StepBars--first){border-left:1px dashed var(--border)}.StepBars__grid{align-items:stretch;bottom:0;display:flex;flex-direction:column;height:100%;left:0;position:absolute;width:100%}.StepBars__gridline{flex-grow:1}.StepBars__gridline.StepBars__gridline--horizontal{border-top:1px dashed var(--border)}.StepBar{--series-color:#000;--conversion-rate:100%;border-radius:var(--radius);flex-shrink:0;height:100%;position:relative;width:calc(var(--bar-width)/2)}.InsightCard .StepBar{width:calc(var(--bar-width)/2)!important}@media screen and (min-width:992px){.StepBar{width:var(--bar-width)}}.StepBar__backdrop,.StepBar__fill{border-radius:var(--radius);bottom:0;cursor:pointer;left:0;position:absolute;width:100%}.InsightCard .StepBar__backdrop,.InsightCard .StepBar__fill,.StepBar__unclickable .StepBar__backdrop,.StepBar__unclickable .StepBar__fill{cursor:default}.StepBar__backdrop{background:repeating-linear-gradient(-22.5deg,transparent,transparent .5rem,hsla(0,0%,100%,.5) .5rem,hsla(0,0%,100%,.5) 1rem),var(--series-color);height:100%;opacity:.125;transition:opacity .2s ease}.StepBar__backdrop:hover{opacity:.2}.StepBar__backdrop:active{opacity:.25}.StepBar__fill{background:var(--series-color);height:var(--conversion-rate);transition:filter .2s ease}.StepBar__fill:hover{filter:brightness(.9)}.StepBar__fill:active{filter:brightness(.85)}.StepBarLabels{align-items:flex-end;display:flex;flex-direction:column-reverse;height:calc(var(--bar-row-height) - var(--bar-padding-top) - var(--bar-padding-bottom))}.StepBarLabels__segment{flex-grow:1;padding:0 .5rem}.StepBarLabels__segment:first-child{flex-grow:0;height:0}.StepBarLabels__label{font-size:.75rem;font-weight:500;transform:translateY(-50%)}.StepLegend{border-left:1px solid var(--border);height:100%;white-space:nowrap}.StepLegend>.LemonRow{font-weight:500;margin-top:.25rem;min-height:1.5rem;padding:0 .5rem}.StepLegend>.LemonRow:first-child{font-weight:600;margin-top:0;width:-moz-fit-content;width:fit-content}.StepLegend .funnel-inspect-button{font-weight:inherit;line-height:1.5rem}.FunnelTooltip{width:20rem}.FunnelTooltip table{border-collapse:collapse;border-spacing:0;width:100%}.FunnelTooltip tr{height:1.75rem}.FunnelTooltip td:first-child{font-weight:500;padding:0 .5rem}.FunnelTooltip td:last-child{font-weight:600;padding-right:.5rem;text-align:right}.FunnelTooltip .table-subtext{padding-bottom:.25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/funnels/FunnelHistogram.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FunnelHistogram{flex:1}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/EmptyStates/EmptyStates.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".insight-empty-state{align-items:center;color:var(--muted);display:flex;flex-direction:column;flex-grow:1;font-size:1.1em;justify-content:center;padding:1rem}.insight-empty-state.error h2{color:var(--danger)}.insight-empty-state.warning h2{color:var(--warning)}.insight-empty-state h2{color:var(--primary-alt);font-size:1.5rem;font-weight:600;line-height:1.6rem}.insight-empty-state .empty-state-inner{align-items:center;display:flex;flex-direction:column;max-width:600px}.insight-empty-state .empty-state-inner .illustration-main{font-size:2.5rem}.insight-empty-state .empty-state-inner h2{text-align:center;width:100%;word-wrap:break-word}.insight-empty-state .empty-state-inner ol{margin:.5rem 0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".InsightTooltipWrapper{pointer-events:none;position:absolute;transition:all .4s;z-index:var(--z-graph-tooltip)}.InsightTooltip{background:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-elevation-3000);font-size:.8125rem;max-width:30rem;overflow:hidden;pointer-events:none}.InsightTooltip--embedded{border:none;border-radius:0;box-shadow:none}.InsightTooltip .LemonRow{font-size:.8125rem}.InsightTooltip .LemonTable{border:none;border-bottom-left-radius:0;border-bottom-right-radius:0;font-size:.75rem}.InsightTooltip .LemonTable:not(:last-child){border-bottom:1px solid var(--border)}.InsightTooltip .LemonTable .insights-label{margin:0}.InsightTooltip .LemonTable .datum-column{overflow-wrap:anywhere;padding-left:.5rem}.InsightTooltip .LemonTable .LemonTable__content>table>thead{letter-spacing:0}.InsightTooltip .LemonTable .LemonTable__content>table>thead .datum-column .LemonTable__header-content{white-space:nowrap}.InsightTooltip .LemonTable .LemonTable__content>table .datum-label-column{align-items:center;display:flex;font-weight:600}.InsightTooltip .LemonTable .LemonTable__content>table .series-data-cell{font-weight:600}.InsightTooltip .LemonTable .LemonTable__content>table .tag-pill{background-color:var(--border-3000);border:0;color:var(--primary-alt);margin-right:0;overflow:hidden;vertical-align:middle}.InsightTooltip .table-subtext{background-color:var(--bg-light);color:var(--muted);font-size:.75rem;padding:.5rem 1rem;text-align:center}.InsightTooltip .table-subtext .table-subtext-truncated{margin-bottom:4px}.InsightTooltip .table-subtext .table-subtext-click-to-inspect{align-items:center;color:var(--text-3000);display:flex;font-weight:600;justify-content:center;white-space:nowrap}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/filters/ActionFilter/ActionFilter.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ActionFilter ul>li+li,.ActionFilter>*+*{margin-top:.5rem}.ActionFilter .ActionFilterRow-filters{padding:.5rem 0}.ActionFilter.ActionFilter--bordered{border:1px solid var(--border);border-radius:var(--radius)}.ActionFilter.ActionFilter--bordered .ActionFilterRow{margin-top:0}.ActionFilter.ActionFilter--bordered .ActionFilterRow .ActionFilterRow-content{border-bottom:1px solid var(--border);margin-bottom:0;padding:1rem}.ActionFilter.ActionFilter--bordered .ActionFilter-footer{margin-top:0;padding:.5rem}.ActionFilter.ActionFilter--bordered .ActionFilterRow-filters{background-color:var(--bg-3000);border-bottom:1px solid var(--border);padding:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ActionFilterRow .ActionFilterRow-content{align-items:flex-start;display:flex}.ActionFilterRow .ActionFilterRow-content>*+*{margin-left:.5rem}.ActionFilterRow .ActionFilterRow__center,.ActionFilterRow .ActionFilterRow__end,.ActionFilterRow .ActionFilterRow__start{align-items:center;display:flex}.ActionFilterRow .ActionFilterRow__end,.ActionFilterRow .ActionFilterRow__start{align-items:center;display:flex;flex:0;gap:.25rem;height:40px}.ActionFilterRow .ActionFilterRow__center{flex:1;flex-wrap:wrap;gap:.5rem;overflow:hidden}.ActionFilterRowDragHandle{color:var(--text-3000);cursor:move;font-size:1.2em;transform:rotate(90deg)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/filters/BreakdownFilter/BreakdownTagMenu.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".histogram-bin-input{background-color:var(--bg-light);margin:0 .5rem;padding:.25rem;width:60px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/BoldNumber/BoldNumber.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".BoldNumber{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center;padding:2rem 3rem 3rem;width:100%}.InsightCard .BoldNumber{padding:1rem}.BoldNumber.HogQL{padding:5rem}.BoldNumber .BoldNumber__value{font-weight:700;letter-spacing:-.025em;width:100%}@media screen and (min-width:768px){.BoldNumber{padding:3rem 5rem 5rem}.InsightCard .BoldNumber{padding:2rem}}.BoldNumber__comparison{color:var(--muted-alt);cursor:default;font-weight:500;margin-bottom:-1.5rem;margin-top:.5rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Funnels/CorrelationMatrix.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".correlation-table-wrapper table{border:1px solid var(--border);border-collapse:initial;border-radius:var(--radius);border-spacing:0;margin:0 auto}.correlation-table-wrapper table td{border-left:1px solid var(--border);border-top:1px solid var(--border);padding:.5rem 1rem;text-align:center}.correlation-table-wrapper table td .percentage{font-weight:700;padding-bottom:.25rem}.correlation-table-wrapper table td:first-child{border-left:none}.correlation-table-wrapper table .table-title{color:var(--muted-alt)}.correlation-table-wrapper table .table-title td{border-top:none}.correlation-table-wrapper table .horizontal-header,.correlation-table-wrapper table thead{background-color:var(--bg-3000);color:var(--muted);font-weight:700;text-transform:uppercase}.correlation-table-wrapper table tbody td:not(.horizontal-header){text-align:right}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Funnels/FunnelCorrelation.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".funnel-correlation{margin-bottom:3rem}.funnel-correlation .skew-warning{background-color:var(--bg-light);border:1px solid var(--warning);border-radius:var(--radius);line-height:2em;margin-top:1rem}.funnel-correlation .skew-warning h4{align-items:center;border-bottom:1px solid var(--border);display:flex;font-size:1.1em;justify-content:space-between;padding:.5rem;position:relative}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FunnelCorrelationTable .table-options .LemonCheckbox:not(:last-child) label{border-radius:var(--radius) 0 0 var(--radius);border-right:none}.FunnelCorrelationTable .table-options .LemonCheckbox:last-child label{border-radius:0 var(--radius) var(--radius) 0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Histogram/Histogram.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".dashboard-wrapper{height:calc(100% - 2rem);width:100%}.histogram-container{display:flex}.histogram-container svg{margin-left:1rem;margin-right:1rem}.histogram-container svg g#x-axis .domain,.histogram-container svg g#y-axis .domain{stroke:var(--funnel-axis)}.histogram-container svg g#x-axis .tick{color:var(--funnel-axis)}.histogram-container svg g#x-axis text,.histogram-container svg g#y-axis text{font-family:var(--font-sans);font-size:.75rem;font-weight:500;fill:var(--text-3000)}.histogram-container svg g#y-gridlines{stroke-dasharray:4,2}.histogram-container svg g#y-gridlines g.tick:not(:first-child){color:var(--funnel-grid)}.histogram-container svg g#y-gridlines .domain,.histogram-container svg g#y-gridlines g.tick:first-of-type{display:none}.histogram-container svg g#bars{fill:var(--primary-3000)}.histogram-container svg g#labels text.bar-label{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;fill:var(--white)}.histogram-container svg g#labels text.bar-label.outside{fill:#0f0f0f}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".series-name-wrapper-col{align-items:center;display:flex}.series-name-wrapper-col .edit-icon{color:var(--primary-3000);cursor:pointer;font-size:1rem}.series-name-wrapper-col .insights-label.editable{cursor:pointer}.series-name-wrapper-col .insights-label.editable .EntityFilterInfo:not(.text-muted){color:var(--primary-3000);font-weight:500}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/InsightsTable/columns/AggregationColumn.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".AggregationColumn__title{color:var(--text-secondary-3000)}.AggregationColumn__title:hover{color:var(--text-3000)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/WorldMap/WorldMap.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".WorldMap{color:var(--border);padding:1rem 0;width:100%}.WorldMap .landxx{fill:currentColor;fill-rule:evenodd;stroke:var(--bg-light);stroke-width:.125rem}.WorldMap .landxx:hover{color:var(--data-color-1-hover)!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".DraggableToNotebook{position:relative}.DraggableToNotebook--dragging{background-color:var(--bg-light);outline:1px solid var(--primary-3000);transform:translateZ(0)}.DraggableToNotebook[draggable=true]{cursor:grab}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/Nodes/NodeWrapper.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".NotebookNode{--notebook-node-meta-height:2.5rem;--notebook-node-meta-padding:0.25rem;--border-color:var(--border);transform:translateZ(0)}.NotebookNode .NotebookNode__box{background-color:var(--bg-light);border:1px solid var(--border-color);border-radius:var(--radius);overflow:hidden;transform:translateZ(0);transition:border .15s linear,margin-bottom .15s linear}.NotebookNode .NotebookNode__box .NotebookNode__meta{align-items:center;border-bottom:1px solid var(--border);color:var(--primary-alt);display:flex;font-size:.875rem;font-weight:500;height:var(--notebook-node-meta-height);justify-content:space-between;overflow:hidden;padding:var(--notebook-node-meta-padding)}.NotebookNode .NotebookNode__box .NotebookNode__settings{border-bottom:1px solid var(--border)}.NotebookNode .NotebookNode__box .NotebookNode__content{transition:box-shadow .15s ease-out;z-index:1}.NotebookNode .NotebookNode__gap{align-items:center;display:flex;gap:.2rem;height:1.375rem;opacity:0;overflow:hidden;transition:all .15s linear 1s}.NotebookNode--editable:hover .NotebookNode__gap,.NotebookNode--selected .NotebookNode__gap{height:1.875rem;opacity:1;transition:all .15s linear}.NotebookNode--selected{--border-color:var(--border-bold)}.NotebookNode--auto-hide-metadata{--border-color:transparent}.NotebookNode--auto-hide-metadata .NotebookNode__meta{background-color:var(--bg-light);left:0;pointer-events:none;position:absolute;right:0;top:0;visibility:hidden;z-index:var(--z-popover)}.Notebook--editable .NotebookNode--auto-hide-metadata.NotebookNode--selected,.Notebook--editable .NotebookNode--auto-hide-metadata:hover{border-color:var(--border-color)}.Notebook--editable .NotebookNode--auto-hide-metadata.NotebookNode--selected .NotebookNode__meta,.Notebook--editable .NotebookNode--auto-hide-metadata:hover .NotebookNode__meta{pointer-events:all;visibility:visible}.NotebookNode--auto-hide-metadata:hover{--border-color:var(--border)}.NotebookNode.ph-image img{flex:1;height:100%;object-fit:contain;width:100%}.NotebookNodeTitle{overflow:hidden;padding:.25rem;text-overflow:ellipsis;white-space:nowrap}.NotebookNodeTitle--editable{border-radius:var(--radius);transition:background-color .15s linear}.NotebookNodeTitle--editable:hover{background-color:var(--border)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/Notebook/Notebook.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.Notebook{display:flex;flex:1;flex-direction:column;width:100%}.Notebook .NotebookEditor{flex:1;overflow:hidden;position:relative;width:100%}.Notebook .NotebookEditor .ProseMirror-focused{outline:none}.Notebook .NotebookEditor .ProseMirror>h1,.Notebook .NotebookEditor .ProseMirror>h2,.Notebook .NotebookEditor .ProseMirror>h3,.Notebook .NotebookEditor .ProseMirror>h4,.Notebook .NotebookEditor .ProseMirror>h5{margin-top:.5rem}.Notebook .NotebookEditor .ProseMirror>p{margin-bottom:.2rem}.Notebook .NotebookEditor .ProseMirror>.is-empty:before{color:rgba(0,0,0,.2);content:attr(data-placeholder);float:left;height:0;pointer-events:none}[theme=dark] .Notebook .NotebookEditor .ProseMirror>.is-empty:before{color:hsla(0,0%,100%,.2)}.Notebook .NotebookEditor .ProseMirror>ol{list-style-type:decimal}.Notebook .NotebookEditor .ProseMirror>ol ol{list-style-type:lower-alpha}.Notebook .NotebookEditor .ProseMirror>ul{list-style-type:disc}.Notebook .NotebookEditor .ProseMirror>ul ul{list-style-type:circle}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList]{list-style-type:none;padding-left:0}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li{display:flex}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li>label{flex:0 0 auto;margin-right:.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li>div{flex:1 1 auto}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li ol li,.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li ul li{display:list-item}.Notebook .NotebookEditor .ProseMirror>ul[data-type=taskList] li ul[data-type=taskList]>li{display:flex}.Notebook .NotebookEditor .ProseMirror>ol,.Notebook .NotebookEditor .ProseMirror>ol ol,.Notebook .NotebookEditor .ProseMirror>ol ul,.Notebook .NotebookEditor .ProseMirror>ul,.Notebook .NotebookEditor .ProseMirror>ul ol,.Notebook .NotebookEditor .ProseMirror>ul ul{padding-left:2rem}.Notebook .NotebookEditor .ProseMirror>ol li p,.Notebook .NotebookEditor .ProseMirror>ul li p{margin-bottom:.2rem}.Notebook .NotebookEditor .ProseMirror>pre{background-color:rgba(0,0,0,.05);border-radius:var(--radius);margin-bottom:.5rem;overflow-x:auto;padding:.5rem}.Notebook .NotebookEditor .ProseMirror>code,.Notebook .NotebookEditor .ProseMirror>p code{background-color:rgba(0,0,0,.05);border-radius:var(--radius);padding:.2rem}.Notebook .NotebookEditor .Backlink{background-color:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);padding:.125rem .25rem}.Notebook .NotebookEditor .Backlink:hover{background-color:var(--bg-3000)}.Notebook .NotebookEditor .Backlink svg{color:var(--text-3000)}.Notebook .NotebookEditor .Backlink.Backlink--selected{border-color:var(--primary-3000)}.Notebook .NotebookEditor .Backlink.Backlink--active{background:var(--primary-3000);border:1px solid var(--primary-3000);color:var(--white)}.Notebook .NotebookEditor .Backlink.Backlink--active .Backlink__label,.Notebook .NotebookEditor .Backlink.Backlink--active svg{color:var(--white)}.Notebook .NotebookEditor .Backlink.Backlink--active span::-moz-selection{color:var(--white)}.Notebook .NotebookEditor .Backlink.Backlink--active span::selection{color:var(--white)}.Notebook .NotebookEditor[contenteditable=true] a{cursor:text}.Notebook--compact:not(.Notebook--canvas) .NotebookEditor{max-width:800px}.Notebook .NotebookColumn{--notebook-sidebar-height:calc(100vh - 9rem);position:relative;transition:width var(--notebook-popover-transition-properties);width:0}.Notebook .NotebookColumn .NotebookColumn__content{align-self:flex-start;position:sticky;top:0;transform:translateX(-100%);transition:transform var(--notebook-popover-transition-properties)}.NotebookScene .Notebook .NotebookColumn{--notebook-sidebar-height:calc(100vh - 11rem)}.NotebookScene .Notebook .NotebookColumn .NotebookColumn__padding{height:4rem}.NotebookScene .Notebook .NotebookColumn .NotebookColumn__content{top:4rem}.Notebook .NotebookColumn--left .NotebookColumn__content{transform:translateX(-100%);width:var(--notebook-column-left-width)}.Notebook .NotebookColumn--left .NotebookColumn__content>.LemonWidget .LemonWidget__content{max-height:var(--notebook-sidebar-height);overflow:auto}.Notebook .NotebookColumn--right .NotebookColumn__content{transform:translateX(100%);width:var(--notebook-column-right-width)}.Notebook .NotebookColumn--showing.NotebookColumn--left{margin-right:1rem;width:var(--notebook-column-left-width)}.Notebook .NotebookColumn--showing.NotebookColumn--right{margin-left:1rem;width:var(--notebook-column-right-width)}.Notebook .NotebookColumn--showing .NotebookColumn__content{transform:translateX(0)}.Notebook--editable .NotebookEditor .ProseMirror{flex:1;padding-bottom:10rem}.Notebook--editable .NotebookColumn--left.NotebookColumn--showing+.NotebookEditor .ProseMirror{padding-bottom:100vh}.Notebook .NotebookHistory{display:flex;flex:1;flex-direction:column}.Notebook .NotebookInlineMenu{box-shadow:0 4px 10px 0 rgba(0,0,0,.1);margin-bottom:-.2rem}.Notebook .NotebookInlineMenu .LemonInput{border:0;min-height:0}.Notebook .LemonTable__content>table>thead{position:sticky;top:0;z-index:1}.Notebook .NotebookMention,.Notebook .NotebookRecordingTimestamp{display:inline-flex;max-height:22px}.Notebook .NotebookComment{--notebook-comment-background-opacity:0.25;position:relative;transform-style:preserve-3d}.Notebook .NotebookComment:hover{--notebook-comment-background-opacity:0.5}.Notebook .NotebookComment:after{background:var(--primary-3000);content:"";inset:0;opacity:var(--notebook-comment-background-opacity);position:absolute;z-index:-1}.Notebook .InsightVizDisplay .InsightDisplayConfig{border-bottom-width:0;padding:0}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/NotebookPanel/NotebookPanel.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".NotebookPanel{background-color:var(--accent-3000);display:flex;flex:1;flex-direction:column;overflow:hidden}.NotebookPanel .NotebookPanelDropzone{border:2px dashed var(--border-3000);border-radius:var(--radius);display:flex;height:4rem;margin:.5rem;transition:all .15s}.NotebookPanel .NotebookPanelDropzone .NotebookPanelDropzone__message{align-items:center;background-color:var(--bg-light);color:var(--muted-alt);display:flex;flex:1;flex-direction:column;font-size:1rem;font-weight:700;justify-content:center;opacity:.75;padding:1rem;pointer-events:none;text-align:center;transition:all .15s}.NotebookPanel .NotebookPanelDropzone .NotebookPanelDropzone__dropped{display:flex;flex:1;flex-direction:column;overflow:hidden}.NotebookPanel .NotebookPanelDropzone--active{border-color:var(--primary-3000);height:8rem}.NotebookPanel .NotebookPanelDropzone--active .NotebookPanelDropzone__message{opacity:1}.NotebookPanel .NotebookPanelDropzone--dropped{align-items:normal;border:none;height:100%;justify-content:flex-start;margin:1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/NotebookScene.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Navigation3000 .NotebookScene{inset:0;overflow-y:auto;padding:0 1rem;position:absolute}.NotebookScene .ProseMirror>.react-renderer{scroll-margin-top:65px}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/Suggestions/FloatingSuggestions.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".FloatingSuggestion{height:1.375rem;position:absolute}.NotebookFloatingButton{left:0;position:absolute;z-index:var(--z-popover)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/paths/Paths.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Paths{height:720px;max-height:100%;overflow-y:hidden;position:relative;width:100%}.Paths .Paths__canvas{height:100%!important;width:100%}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/persons/PersonDisplay.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PersonDisplay{display:inline}.PersonDisplay .ProfilePicture{margin-right:.5rem;transition:opacity .2s ease}.PersonDisplay a:hover .ProfilePicture{opacity:.75}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/retention/RetentionTable.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".RetentionTable{--retention-table-color:var(--primary-3000);font-weight:500;width:100%}.RetentionTable th{border-bottom:10px solid transparent;border-left:1px solid var(--border);border-top:10px solid transparent;font-weight:500;padding:0 .5rem;text-align:left;white-space:nowrap}.RetentionTable th:first-of-type{border-left:none}.RetentionTable tr{border-left:.25rem solid transparent}.RetentionTable tr:not(:nth-of-type(-n+2)){cursor:pointer}.RetentionTable tr:not(:nth-of-type(-n+2)):hover{border-left-color:var(--retention-table-color)}.RetentionTable .RetentionTable__TextTab{padding:0 1rem 0 .5rem;white-space:nowrap}.RetentionTable .RetentionTable__Tab{background-color:var(--retention-table-color);border-radius:var(--radius);margin:2px;min-height:2rem;padding:.5rem;text-align:right}.RetentionTable .RetentionTable__Tab.RetentionTable__Tab--clickable{transition:transform .2s ease-out}.RetentionTable .RetentionTable__Tab.RetentionTable__Tab--clickable:hover{transform:scale(1.05)}.RetentionTable .RetentionTable__Tab.RetentionTable__Tab--period{background-color:var(--bg-light);border-style:solid;border:1px dashed var(--border);color:var(--muted)}.RetentionTable.RetentionTable--non-interactive tr:hover{border-left-color:transparent}.RetentionTable.RetentionTable--non-interactive .RetentionTable__Tab{cursor:auto}.RetentionTable.RetentionTable--non-interactive .RetentionTable__Tab:hover{transform:none}.RetentionTable.RetentionTable--small-layout{font-size:.75rem;line-height:1rem}.RetentionTable.RetentionTable--small-layout .RetentionTable__TextTab,.RetentionTable.RetentionTable--small-layout th{padding-left:.25rem;padding-right:.25rem}.RetentionTable.RetentionTable--small-layout .RetentionTable__Tab{margin:0;padding:.5rem .25rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/saved-insights/SavedInsights.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".saved-insights .new-insight-dropdown-btn{background-color:var(--primary-3000);border:1px solid var(--border);border-radius:var(--radius);color:#fff;cursor:pointer;height:40px;padding:8px 12px 8px 16px}.saved-insights .saved-insight-empty-state{align-items:center;display:flex;justify-content:center;text-align:center}.saved-insights .saved-insight-empty-state .insight-empty-state__wrapper{margin-bottom:17rem;margin-top:5rem;max-width:600px}.saved-insights .saved-insight-empty-state .insight-empty-state__wrapper .illustration-main{color:var(--border);font-size:5rem;line-height:1em;margin-bottom:1rem;text-align:center}.saved-insights .saved-insight-empty-state .insight-empty-state__wrapper .empty-state__title{font-size:1.5rem;font-weight:600;line-height:1.6rem}.saved-insights .saved-insight-empty-state .insight-empty-state__wrapper .empty-state__description{color:var(--muted);font-size:1rem;font-weight:500;line-height:1.7rem}.new-insight-overlay{width:21rem}.insight-type-icon-wrapper{align-items:center;display:flex}.insight-type-icon-wrapper .icon-container{height:22px;margin-right:8px;position:relative;width:22px}.insight-type-icon-wrapper .icon-container .icon-container-inner{font-size:22px;margin-left:-2px}.saved-insights-grid{display:grid;position:relative;grid-gap:1rem}@media screen and (min-width:1200px){.saved-insights-grid{grid-template-columns:repeat(2,1fr)}}@media screen and (min-width:1600px){.saved-insights-grid{grid-template-columns:repeat(3,1fr)}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/apm/NetworkView.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".NetworkView .NetworkView__table table{table-layout:fixed}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/PlayerFrame.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.PlayerFrame{align-items:center;background-color:var(--bg-3000-dark);display:flex;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.PlayerFrame .PlayerFrame__content{position:absolute}.PlayerFrame .PlayerFrame__content iframe{background-color:#fff;border:0}.PlayerFrame .PlayerFrame__content .replayer-wrapper{position:relative}.PlayerFrame .PlayerFrame__content .replayer-mouse{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTQ4LjcxIDQyLjkxIDM0LjA4IDI4LjI5IDQ0LjMzIDE4YTEgMSAwIDAgMC0uMzMtMS42MUwyLjM1IDEuMDZhMSAxIDAgMCAwLTEuMjkgMS4yOUwxNi4zOSA0NGExIDEgMCAwIDAgMS42NS4zNmwxMC4yNS0xMC4yOCAxNC42MiAxNC42M2ExIDEgMCAwIDAgMS40MSAwbDQuMzgtNC4zOGExIDEgMCAwIDAgLjAxLTEuNDJtLTUuMDkgMy42N0wyOSAzMmExIDEgMCAwIDAtMS40MSAwbC05Ljg1IDkuODVMMy42OSAzLjY5bDM4LjEyIDE0TDMyIDI3LjU4QTEgMSAwIDAgMCAzMiAyOWwxNC41OSAxNC42MloiLz48L3N2Zz4=");background-position:50%;background-repeat:no-repeat;background-size:contain;border-color:transparent;height:20px;position:absolute;transition:left .05s linear,top .05s linear;width:20px}.PlayerFrame .PlayerFrame__content .replayer-mouse:after{background:#4950f6;border-radius:100%;content:"";display:inline-block;height:20px;opacity:.3;transform:translate(-50%,-50%);width:20px}.PlayerFrame .PlayerFrame__content .replayer-mouse.active:after{animation:PlayerFrame__click .2s ease-in-out 1}.PlayerFrame .PlayerFrame__content .replayer-mouse.touch-device{background-image:none;border:4px solid rgba(73,80,246,0);border-radius:100%;height:70px;margin-left:-37px;margin-top:-37px;transition:left 0s linear,top 0s linear,border-color .2s ease-in-out;width:70px}.PlayerFrame .PlayerFrame__content .replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.PlayerFrame .PlayerFrame__content .replayer-mouse.touch-device:after{opacity:0}.PlayerFrame .PlayerFrame__content .replayer-mouse.touch-device.active:after{animation:PlayerFrame__touch-click .2s ease-in-out 1}.PlayerFrame .PlayerFrame__content .replayer-mouse-tail{pointer-events:none;position:absolute}@keyframes PlayerFrame__click{0%{height:20px;opacity:.3;width:20px}50%{height:10px;opacity:.5;width:10px}}@keyframes PlayerFrame__touch-click{0%{height:20px;opacity:0;width:20px}50%{height:10px;opacity:.5;width:10px}}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/PlayerFrameOverlay.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PlayerFrameOverlay{inset:0;position:absolute;z-index:10}.PlayerFrameOverlay .PlayerFrameOverlay__content{align-items:center;background-color:rgba(0,0,0,.15);display:flex;inset:0;justify-content:center;opacity:.8;position:absolute;transition:opacity .1s;z-index:1}.PlayerFrameOverlay .PlayerFrameOverlay__content:hover{opacity:1}.PlayerFrameOverlay .PlayerFrameOverlay__content--only-hover{opacity:0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/PlayerMeta.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PlayerMeta{display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;position:relative}.PlayerMeta .PlayerMetaPersonProperties{background:var(--bg-3000);border-bottom:1px solid transparent;overflow:auto;padding:.5rem}.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties{transition:height .2s ease-out,border-bottom-color .2s ease-out}.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties--enter{height:0}.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties--enter-active,.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties--enter-done,.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties--exit{border-bottom-color:var(--border);height:14rem}.PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMetaPersonProperties--exit-active{height:0}.LemonModal .PlayerMeta:not(.PlayerMeta--fullscreen) .PlayerMeta__top{padding-right:3.5rem!important}.PlayerMeta--fullscreen{align-items:center;flex-direction:row;justify-content:space-between}.PlayerMeta--fullscreen .PlayerMetaPersonProperties{border-right:1px solid var(--border);bottom:97px;left:0;max-width:40rem;position:fixed;top:48px;transition:transform .2s ease-out;width:100%;z-index:1}.PlayerMeta--fullscreen .PlayerMetaPersonProperties--enter{transform:translateX(-100%)}.PlayerMeta--fullscreen .PlayerMetaPersonProperties--enter-active,.PlayerMeta--fullscreen .PlayerMetaPersonProperties--enter-done,.PlayerMeta--fullscreen .PlayerMetaPersonProperties--exit{transform:translateX(0)}.PlayerMeta--fullscreen .PlayerMetaPersonProperties--exit-active{transform:translateX(-100%)}.PlayerMeta .Link{color:var(--text-3000)}.PlayerMeta .Link:hover{color:var(--primary-3000)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/PlayerUpNext.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PlayerUpNext{transition:transform .25s ease-out;z-index:11}.PlayerUpNextButton{align-items:center;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);cursor:pointer;display:flex;overflow:hidden}.PlayerUpNextButton .PlayerUpNextButtonBackground{background-color:var(--border-3000);bottom:0;color:var(--primary-alt);left:0;position:absolute;top:0;width:0}.PlayerUpNextButton.PlayerUpNextButton--animating .PlayerUpNextButtonBackground{animation:PlayerUpNextButtonBackground__expand 3s linear forwards}.PlayerUpNextButton:hover .PlayerUpNextButtonBackground{animation:none;width:100%}@keyframes PlayerUpNextButtonBackground__expand{0%{width:0}to{width:100%}}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/SessionRecordingPlayer.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".SessionRecordingPlayer{background-color:var(--bg-light);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:row;height:100%;overflow:hidden;position:relative;width:100%}.SessionRecordingPlayer--no-border{border:none;border-radius:0}.SessionRecordingPlayer .SessionRecordingPlayer__body{background-color:var(--bg-light);height:100%;min-width:1px;overflow:hidden;position:relative;z-index:0}.SessionRecordingPlayer .SessionRecordingPlayer__main{flex:1}.SessionRecordingPlayer--fullscreen{background-color:var(--bg-light);border:none;border-radius:0;inset:0;overflow-y:auto;position:fixed;z-index:var(--z-modal)}.SessionRecordingPlayer--fullscreen .SessionRecordingPlayer__body{border-radius:0;height:100%;margin:0}.SessionRecordingPlayer .SessionRecordingPlayer__main,.SessionRecordingPlayer .SessionRecordingPlayer__sidebar{display:flex;flex-direction:column;overflow:hidden}.LemonModal .SessionRecordingPlayer .SessionRecordingPlayer__body{height:calc(90vh - 15rem)}.SessionRecordingPlayer .SessionRecordingPlayer__sidebar{flex-shrink:0;max-width:50%;min-width:20rem;position:relative}.SessionRecordingPlayer .SessionRecordingPlayer__sidebar--collapsed{min-width:0}.SessionRecordingPlayer .SessionRecordingPlayer__sidebar__tabs .LemonTabs__tab-content{padding:10px 0}.SessionRecordingPlayer--stacked-vertically{flex-direction:column}.SessionRecordingPlayer--stacked-vertically .SessionRecordingPlayer__sidebar{max-height:60%;max-width:100%;min-width:100%}.PlayerControlSeekIcon{display:flex;position:relative}.PlayerControlSeekIcon .PlayerControlSeekIcon__seconds{align-items:center;display:flex;font-size:6px;font-weight:700;inset:0;justify-content:center;position:absolute;text-align:center}.PlayerControlSeekIcon .PlayerControlSeekIcon__icon{font-size:1.3rem}.PlayerControlSeekIcon .PlayerControlSeekIcon__icon--forward{transform:rotateY(180deg)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/controller/Seekbar.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PlayerSeekbar{--bar-height:4px;--slider-height:20px;--thumb-size:15px;display:flex;height:var(--slider-height);position:relative;width:100%}.PlayerSeekbar--scrubbing,.PlayerSeekbar:hover{--bar-height:8px}.PlayerSeekbar--scrubbing .PlayerSeekBarPreview,.PlayerSeekbar:hover .PlayerSeekBarPreview{opacity:1}.PlayerSeekbar .PlayerSeekbar__slider{background-color:var(--border-light);border-radius:var(--bar-height);cursor:pointer;height:var(--bar-height);left:0;position:absolute;right:0;top:calc((var(--slider-height) - var(--bar-height))/2);transition:height .15s ease-in-out,top .15s ease-in-out;z-index:2}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__bufferbar,.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__currentbar,.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__segments{height:100%;left:0;position:absolute;top:0;width:0}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__bufferbar{background-color:var(--border);border-radius:var(--bar-height);z-index:2}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__currentbar{background-color:var(--primary-3000);border-radius:var(--bar-height) 0 0 var(--bar-height);z-index:3}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__segments{height:100%;white-space:nowrap;width:100%;z-index:4}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__segments .PlayerSeekbar__segments__item{background-color:var(--bg-light);float:left;height:100%;opacity:.5}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__segments .PlayerSeekbar__segments__item--active{opacity:0}.PlayerSeekbar .PlayerSeekbar__slider .PlayerSeekbar__thumb{backface-visibility:hidden;background-color:var(--primary-3000);border:2px solid var(--bg-light);border-radius:50%;height:var(--thumb-size);margin-top:calc(var(--thumb-size)/2*-1);position:absolute;top:calc(var(--bar-height)/2);transition:top .15s ease-in-out;width:var(--thumb-size);z-index:5}.PlayerSeekbar .PlayerSeekBarPreview{bottom:100%;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s ease-in-out;width:100%;z-index:6}.PlayerSeekbar .PlayerSeekBarPreview .PlayerSeekBarPreview__tooltip{width:100%}.PlayerSeekbar .PlayerSeekBarPreview .PlayerSeekBarPreview__tooltip .PlayerSeekBarPreview__tooltip__content{background-color:var(--tooltip-bg);border-radius:var(--radius);color:#fff;display:inline-block;font-size:.8rem;font-weight:600;margin-bottom:.5rem;padding:.1rem;transform:translateX(-50%)}.PlayerSeekbarTicks{height:.75rem;position:relative;width:100%;z-index:1}.PlayerSeekbarTicks .PlayerSeekbarTick{--tick-color:var(--muted-alt);--tick-width:3px;cursor:pointer;height:100%;position:absolute;top:0;transition:transform .15s ease-in-out}.PlayerSeekbarTicks .PlayerSeekbarTick--warning{--tick-color:var(--warning)}.PlayerSeekbarTicks .PlayerSeekbarTick--danger{--tick-color:var(--danger)}.PlayerSeekbarTicks .PlayerSeekbarTick--primary{--tick-color:var(--primary-3000)}.PlayerSeekbarTicks .PlayerSeekbarTick .PlayerSeekbarTick__line{background-color:var(--tick-color);border-radius:2px;height:100%;margin-left:calc(var(--tick-width)/2*-1);opacity:.5;position:absolute;width:var(--tick-width)}.PlayerSeekbarTicks .PlayerSeekbarTick .PlayerSeekbarTick__info{background-color:var(--tick-color);border-radius:var(--radius);bottom:100%;color:#fff;font-size:.8rem;margin-bottom:.25rem;max-width:20rem;opacity:0;padding:.25rem .5rem;position:absolute;transform:translateX(-50%);transition:opacity .15s ease-in-out;visibility:hidden;white-space:nowrap}.PlayerSeekbarTicks .PlayerSeekbarTick:hover{--tick-width:5px}.PlayerSeekbarTicks .PlayerSeekbarTick:hover .PlayerSeekbarTick__info{opacity:1;visibility:visible}.PlayerSeekbarTicks .PlayerSeekbarTick:hover .PlayerSeekbarTick__line{opacity:1}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,"#PlayerInspectorListMarker{background-color:var(--primary-3000);border-radius:0 var(--radius) var(--radius) 0;height:.5rem;left:0;margin-top:.25rem;pointer-events:none;position:absolute;top:0;transition:transform .2s linear;width:1rem;will-change:transform;z-index:1}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/inspector/components/ImagePreview.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,'.ImagePreview__background{background:#eee url(\'data:image/svg+xml;charset=utf-8,\');background-size:30px 30px}',""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/settings/Settings.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".Settings{align-items:start;display:flex;gap:2rem;margin-top:0}.Settings .Settings__sections{flex-shrink:0;max-width:20rem;min-width:14rem;position:sticky;top:4rem;width:20%}.SidePanel3000 .Settings .Settings__sections{top:0}.Settings--compact{flex-direction:column;gap:0}.Settings--compact .Settings__sections{max-width:100%;min-width:100%;position:relative;width:100%}.LemonModal .Settings{margin-top:0}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/settings/organization/InviteModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".InviteModal__share_link{display:flex;overflow:scroll;white-space:nowrap;width:175px;-ms-overflow-style:none;scrollbar-width:none}.InviteModal__share_link::-webkit-scrollbar{display:none}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/surveys/EditSurvey.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".presentation-preview .CodeSnippet__actions{display:none}.SurveyForm .LemonCollapsePanel__header{background:var(--border-light)}.question-choice-open-ended-footer{background-color:var(--bg-3000);bottom:-5px;font-size:10px;left:6px;padding:0 5px;position:absolute}.SurveyQuestionDragHandle{color:var(--text-3000);cursor:move;font-size:1.2em;transform:rotate(90deg)}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/surveys/SurveyView.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".masonry-container{-moz-column-count:4;column-count:4;-moz-column-gap:10px;column-gap:10px}@media screen and (max-width:1024px){.masonry-container{-moz-column-count:2;column-count:2}}.masonry-item{box-sizing:border-box;display:grid;grid-template-rows:1fr auto;margin:0 0 10px;page-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.survey-view .survey-form{z-index:0!important}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/trends/persons-modal/PersonsModal.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".PersonsModal__tabs [role=tablist]{margin-bottom:0;padding:0 1rem}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/trends/viz/ActionsPie.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,".ActionsPie{display:flex;flex:1;flex-direction:row;gap:.5rem;height:100%;width:100%}.ActionsPie .ActionsPie__component{flex:1;min-width:33%;padding:1rem}.ActionsPie .ActionsPie__component .ActionsPie__chart{height:calc(100% - 4.5rem);position:relative;transition:height .5s;width:100%}.ActionsPie .ActionsPie__component h3{letter-spacing:-.025em}",""]),module.exports=exports},"./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/styles/global.scss":(module,exports,__webpack_require__)=>{var ___CSS_LOADER_API_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_GET_URL_IMPORT___=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/runtime/getUrl.js"),___CSS_LOADER_URL_IMPORT_0___=__webpack_require__("./frontend/public/Inter.woff2"),___CSS_LOADER_URL_IMPORT_1___=__webpack_require__("./frontend/public/Inter.woff");exports=___CSS_LOADER_API_IMPORT___(!1);var ___CSS_LOADER_URL_REPLACEMENT_0___=___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___),___CSS_LOADER_URL_REPLACEMENT_1___=___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);exports.push([module.id,":root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc}.Toastify__toast-container{box-sizing:border-box;color:#fff;padding:4px;position:fixed;-webkit-transform:translate3d(0,0,var(--toastify-z-index) px);width:var(--toastify-toast-width);z-index:var(--toastify-z-index)}.Toastify__toast-container--top-left{left:1em;top:1em}.Toastify__toast-container--top-center{left:50%;top:1em;transform:translateX(-50%)}.Toastify__toast-container--top-right{right:1em;top:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{left:0;margin:0;padding:0;width:100vw}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;transform:translateX(0)}.Toastify__toast-container--rtl{left:auto;right:0}}.Toastify__toast{border-radius:4px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);box-sizing:border-box;cursor:pointer;direction:ltr;display:flex;font-family:var(--toastify-font-family);justify-content:space-between;margin-bottom:1rem;max-height:var(--toastify-toast-max-height);min-height:var(--toastify-toast-min-height);overflow:hidden;padding:8px;position:relative}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{align-items:center;display:flex;flex:1 1 auto;margin:auto 0;padding:6px}.Toastify__toast-body>div:last-child{flex:1}.Toastify__toast-icon{display:flex;flex-shrink:0;margin-inline-end:10px;width:20px}.Toastify--animate{animation-duration:.7s;animation-fill-mode:both}.Toastify--animate-icon{animation-duration:.3s;animation-fill-mode:both}@media only screen and (max-width:480px){.Toastify__toast{border-radius:0;margin-bottom:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{background:var(--toastify-color-info);color:var(--toastify-text-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{background:var(--toastify-color-success);color:var(--toastify-text-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{background:var(--toastify-color-warning);color:var(--toastify-text-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{background:var(--toastify-color-error);color:var(--toastify-text-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{align-self:flex-start;background:transparent;border:none;color:#fff;cursor:pointer;opacity:.7;outline:none;padding:0;transition:.3s ease}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{bottom:0;height:5px;left:0;opacity:.7;position:absolute;transform-origin:left;width:100%;z-index:var(--toastify-z-index)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{left:auto;right:0;transform-origin:right}.Toastify__spinner{animation:Toastify__spin .65s linear infinite;border:2px solid;border-color:var(--toastify-spinner-color-empty-area);border-radius:100%;border-right-color:var(--toastify-spinner-color);box-sizing:border-box;height:20px;width:20px}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateX(90deg)}40%{animation-timing-function:ease-in;transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;transform:perspective(400px) rotateX(10deg)}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{opacity:1;transform:perspective(400px) rotateX(-20deg)}to{opacity:0;transform:perspective(400px) rotateX(90deg)}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{transform:translate3d(110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{transform:translate3d(-110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{transform:translate3d(0,500px,0);visibility:hidden}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{transform:translate3d(0,-500px,0);visibility:hidden}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:700;src:url("+___CSS_LOADER_URL_REPLACEMENT_0___+') format("woff2"),url('+___CSS_LOADER_URL_REPLACEMENT_1___+') format("woff");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url('+___CSS_LOADER_URL_REPLACEMENT_0___+') format("woff2"),url('+___CSS_LOADER_URL_REPLACEMENT_1___+') format("woff");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url('+___CSS_LOADER_URL_REPLACEMENT_0___+') format("woff2"),url('+___CSS_LOADER_URL_REPLACEMENT_1___+') format("woff");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:MatterSQ;font-style:normal;font-weight:800;src:url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-Bold.woff2) format("woff2"),url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-Bold.woff) format("woff")}@font-face{font-display:swap;font-family:MatterSQ;font-style:normal;font-weight:700;src:url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-SemiBold.woff2) format("woff2"),url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-SemiBold.woff) format("woff")}@font-face{font-display:swap;font-family:MatterSQ;font-style:normal;font-weight:500;src:url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-Medium.woff2) format("woff2"),url(https://d1sdjtjk6xzm7.cloudfront.net/MatterSQ-Medium.woff) format("woff")}.\\!container{width:100%!important}.container{width:100%}@media (min-width:576px){.\\!container{max-width:576px!important}.container{max-width:576px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:992px){.\\!container{max-width:992px!important}.container{max-width:992px}}@media (min-width:1200px){.\\!container{max-width:1200px!important}.container{max-width:1200px}}@media (min-width:1600px){.\\!container{max-width:1600px!important}.container{max-width:1600px}}/*! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.\\!visible,.visible{visibility:visible!important}.invisible{visibility:hidden!important}.collapse{visibility:collapse!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.sticky{position:sticky!important}.-inset-2{inset:-.5rem!important}.inset-0{inset:0!important}.-bottom-px{bottom:-1px!important}.-left-4{left:-1rem!important}.-left-5{left:-1.25rem!important}.-top-10{top:-2.5rem!important}.-top-4{top:-1rem!important}.-top-px{top:-1px!important}.bottom-0{bottom:0!important}.bottom-0\\.5{bottom:.125rem!important}.bottom-3{bottom:.75rem!important}.left-0{left:0!important}.left-1\\/2{left:50%!important}.left-2{left:.5rem!important}.left-4{left:1rem!important}.right-0{right:0!important}.right-2{right:.5rem!important}.right-3{right:.75rem!important}.right-4{right:1rem!important}.top-0{top:0!important}.top-0\\.5{top:.125rem!important}.top-1\\/2{top:50%!important}.top-2{top:.5rem!important}.top-4{top:1rem!important}.top-\\[var\\(--breadcrumbs-height-compact\\)\\]{top:var(--breadcrumbs-height-compact)!important}.top-\\[var\\(--breadcrumbs-height-full\\)\\]{top:var(--breadcrumbs-height-full)!important}.isolate{isolation:isolate!important}.z-0{z-index:0!important}.z-10{z-index:10!important}.z-20{z-index:20!important}.z-50{z-index:50!important}.z-\\[1000\\]{z-index:1000!important}.z-\\[1\\]{z-index:1!important}.z-\\[2147483010\\]{z-index:2147483010!important}.z-\\[2147483021\\]{z-index:2147483021!important}.z-\\[7\\]{z-index:7!important}.z-\\[var\\(--z-popover\\)\\]{z-index:var(--z-popover)!important}.col-span-1{grid-column:span 1/span 1!important}.col-span-2{grid-column:span 2/span 2!important}.col-span-3{grid-column:span 3/span 3!important}.col-span-4{grid-column:span 4/span 4!important}.col-span-6{grid-column:span 6/span 6!important}.col-span-8{grid-column:span 8/span 8!important}.col-span-full{grid-column:1/-1!important}.col-start-2{grid-column-start:2!important}.row-span-1{grid-row:span 1/span 1!important}.row-start-2{grid-row-start:2!important}.float-right{float:right!important}.-m-1{margin:-.25rem!important}.-m-1\\.5{margin:-.375rem!important}.-m-4{margin:-1rem!important}.-m-scene-padding{margin:calc(var(--scene-padding)*-1)!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-1\\.5{margin:.375rem!important}.m-10{margin:2.5rem!important}.m-2{margin:.5rem!important}.m-3{margin:.75rem!important}.m-4{margin:1rem!important}.m-5{margin:1.25rem!important}.m-6{margin:1.5rem!important}.m-\\[-2px\\]{margin:-2px!important}.m-auto{margin:auto!important}.-mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.-mx-2{margin-left:-.5rem!important;margin-right:-.5rem!important}.-my-1{margin-bottom:-.25rem!important;margin-top:-.25rem!important}.-my-5{margin-bottom:-1.25rem!important;margin-top:-1.25rem!important}.mx-0{margin-left:0!important;margin-right:0!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-1\\.5{margin-left:.375rem!important;margin-right:.375rem!important}.mx-10{margin-left:2.5rem!important;margin-right:2.5rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-3{margin-left:.75rem!important;margin-right:.75rem!important}.mx-4{margin-left:1rem!important;margin-right:1rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-0{margin-bottom:0!important;margin-top:0!important}.my-0\\.5{margin-bottom:.125rem!important;margin-top:.125rem!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-10{margin-bottom:2.5rem!important;margin-top:2.5rem!important}.my-16{margin-bottom:4rem!important;margin-top:4rem!important}.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-2\\.5{margin-bottom:.625rem!important;margin-top:.625rem!important}.my-20{margin-bottom:5rem!important;margin-top:5rem!important}.my-3{margin-bottom:.75rem!important;margin-top:.75rem!important}.my-4{margin-bottom:1rem!important;margin-top:1rem!important}.my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-8{margin-bottom:2rem!important;margin-top:2rem!important}.my-auto{margin-bottom:auto!important;margin-top:auto!important}.-mb-12{margin-bottom:-3rem!important}.-mb-14{margin-bottom:-3.5rem!important}.-mb-6{margin-bottom:-1.5rem!important}.-mr-0{margin-right:0!important}.-mr-0\\.5{margin-right:-.125rem!important}.-mr-1{margin-right:-.25rem!important}.-mr-2{margin-right:-.5rem!important}.-mt-1{margin-top:-.25rem!important}.-mt-2{margin-top:-.5rem!important}.-mt-3{margin-top:-.75rem!important}.-mt-8{margin-top:-2rem!important}.mb-0{margin-bottom:0!important}.mb-0\\.5{margin-bottom:.125rem!important}.mb-1{margin-bottom:.25rem!important}.mb-1\\.5{margin-bottom:.375rem!important}.mb-10{margin-bottom:2.5rem!important}.mb-12{margin-bottom:3rem!important}.mb-16{margin-bottom:4rem!important}.mb-2{margin-bottom:.5rem!important}.mb-2\\.5{margin-bottom:.625rem!important}.mb-3{margin-bottom:.75rem!important}.mb-4{margin-bottom:1rem!important}.mb-5{margin-bottom:1.25rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.ml-0{margin-left:0!important}.ml-0\\.5{margin-left:.125rem!important}.ml-1{margin-left:.25rem!important}.ml-1\\.5{margin-left:.375rem!important}.ml-10{margin-left:2.5rem!important}.ml-11{margin-left:2.75rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.ml-4{margin-left:1rem!important}.ml-5{margin-left:1.25rem!important}.ml-8{margin-left:2rem!important}.ml-9{margin-left:2.25rem!important}.ml-auto{margin-left:auto!important}.mr-0{margin-right:0!important}.mr-1{margin-right:.25rem!important}.mr-1\\.5{margin-right:.375rem!important}.mr-10{margin-right:2.5rem!important}.mr-2{margin-right:.5rem!important}.mr-20{margin-right:5rem!important}.mr-3{margin-right:.75rem!important}.mr-4{margin-right:1rem!important}.mr-5{margin-right:1.25rem!important}.mr-6{margin-right:1.5rem!important}.mr-8{margin-right:2rem!important}.mr-auto{margin-right:auto!important}.mt-0{margin-top:0!important}.mt-0\\.5{margin-top:.125rem!important}.mt-1{margin-top:.25rem!important}.mt-1\\.5{margin-top:.375rem!important}.mt-10{margin-top:2.5rem!important}.mt-12{margin-top:3rem!important}.mt-16{margin-top:4rem!important}.mt-2{margin-top:.5rem!important}.mt-2\\.5{margin-top:.625rem!important}.mt-20{margin-top:5rem!important}.mt-3{margin-top:.75rem!important}.mt-4{margin-top:1rem!important}.mt-5{margin-top:1.25rem!important}.mt-6{margin-top:1.5rem!important}.mt-8{margin-top:2rem!important}.mt-auto{margin-top:auto!important}.box-content{box-sizing:initial!important}.line-clamp-1{-webkit-line-clamp:1!important}.line-clamp-1,.line-clamp-2{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important}.line-clamp-2{-webkit-line-clamp:2!important}.block{display:block!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.\\!table,.table{display:table!important}.grid{display:grid!important}.inline-grid{display:inline-grid!important}.\\!contents,.contents{display:contents!important}.hidden{display:none!important}.size-16{height:4rem!important;width:4rem!important}.size-3{height:.75rem!important;width:.75rem!important}.size-4{height:1rem!important;width:1rem!important}.size-5{height:1.25rem!important;width:1.25rem!important}.size-6{height:1.5rem!important;width:1.5rem!important}.size-\\[18px\\]{height:18px!important;width:18px!important}.size-\\[400\\%\\]{height:400%!important;width:400%!important}.size-full{height:100%!important;width:100%!important}.h-0{height:0!important}.h-1{height:.25rem!important}.h-1\\.5{height:.375rem!important}.h-10{height:2.5rem!important}.h-100{height:25rem!important}.h-12{height:3rem!important}.h-120{height:30rem!important}.h-14{height:3.5rem!important}.h-15{height:3.75rem!important}.h-16{height:4rem!important}.h-18{height:4.5rem!important}.h-2{height:.5rem!important}.h-2\\.5{height:.625rem!important}.h-20{height:5rem!important}.h-24{height:6rem!important}.h-3{height:.75rem!important}.h-3\\.5{height:.875rem!important}.h-30{height:7.5rem!important}.h-4{height:1rem!important}.h-40{height:10rem!important}.h-5{height:1.25rem!important}.h-50{height:12.5rem!important}.h-52{height:13rem!important}.h-6{height:1.5rem!important}.h-60{height:15rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-80{height:20rem!important}.h-9{height:2.25rem!important}.h-96{height:24rem!important}.h-\\[180px\\]{height:180px!important}.h-\\[1em\\]{height:1em!important}.h-\\[200px\\]{height:200px!important}.h-\\[222px\\]{height:222px!important}.h-\\[300px\\]{height:300px!important}.h-\\[30rem\\]{height:30rem!important}.h-\\[33px\\]{height:33px!important}.h-\\[360px\\]{height:360px!important}.h-\\[50vh\\]{height:50vh!important}.h-\\[55px\\]{height:55px!important}.h-\\[80\\%\\]{height:80%!important}.h-\\[80vh\\]{height:80vh!important}.h-\\[90vh\\]{height:90vh!important}.h-auto{height:auto!important}.h-fit{height:-moz-fit-content!important;height:fit-content!important}.h-full{height:100%!important}.h-px{height:1px!important}.h-screen{height:100vh!important}.max-h-10{max-height:2.5rem!important}.max-h-100{max-height:25rem!important}.max-h-140{max-height:35rem!important}.max-h-16{max-height:4rem!important}.max-h-200{max-height:50rem!important}.max-h-60{max-height:15rem!important}.max-h-64{max-height:16rem!important}.max-h-80{max-height:20rem!important}.max-h-\\[100vh\\]{max-height:100vh!important}.max-h-\\[16rem\\]{max-height:16rem!important}.max-h-\\[80vh\\]{max-height:80vh!important}.max-h-full{max-height:100%!important}.min-h-10{min-height:2.5rem!important}.min-h-100{min-height:25rem!important}.min-h-120{min-height:30rem!important}.min-h-16{min-height:4rem!important}.min-h-20{min-height:5rem!important}.min-h-24{min-height:6rem!important}.min-h-30{min-height:7.5rem!important}.min-h-4{min-height:1rem!important}.min-h-50{min-height:12.5rem!important}.min-h-56{min-height:14rem!important}.min-h-6{min-height:1.5rem!important}.min-h-60{min-height:15rem!important}.min-h-8{min-height:2rem!important}.min-h-80{min-height:20rem!important}.min-h-\\[30rem\\]{min-height:30rem!important}.min-h-\\[32rem\\]{min-height:32rem!important}.min-h-\\[420px\\]{min-height:420px!important}.min-h-\\[42px\\]{min-height:42px!important}.min-h-\\[80vh\\]{min-height:80vh!important}.w-0{width:0!important}.w-1\\/2{width:50%!important}.w-1\\/3{width:33.333333%!important}.w-1\\/4{width:25%!important}.w-1\\/6{width:16.666667%!important}.w-10{width:2.5rem!important}.w-100{width:25rem!important}.w-12{width:3rem!important}.w-120{width:30rem!important}.w-14{width:3.5rem!important}.w-140{width:35rem!important}.w-15{width:3.75rem!important}.w-16{width:4rem!important}.w-160{width:40rem!important}.w-18{width:4.5rem!important}.w-192{width:48rem!important}.w-2{width:.5rem!important}.w-2\\.5{width:.625rem!important}.w-2\\/3{width:66.666667%!important}.w-2\\/5{width:40%!important}.w-20{width:5rem!important}.w-200{width:50rem!important}.w-24{width:6rem!important}.w-28{width:7rem!important}.w-3{width:.75rem!important}.w-3\\.5{width:.875rem!important}.w-3\\/4{width:75%!important}.w-3\\/5{width:60%!important}.w-30{width:7.5rem!important}.w-32{width:8rem!important}.w-4{width:1rem!important}.w-40{width:10rem!important}.w-44{width:11rem!important}.w-48{width:12rem!important}.w-5{width:1.25rem!important}.w-5\\/6{width:83.333333%!important}.w-50{width:12.5rem!important}.w-52{width:13rem!important}.w-6{width:1.5rem!important}.w-60{width:15rem!important}.w-64{width:16rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-80{width:20rem!important}.w-\\[12\\.5\\%\\]{width:12.5%!important}.w-\\[12rem\\]{width:12rem!important}.w-\\[15\\%\\]{width:15%!important}.w-\\[1em\\]{width:1em!important}.w-\\[200px\\]{width:200px!important}.w-\\[20px\\]{width:20px!important}.w-\\[24rem\\]{width:24rem!important}.w-\\[350px\\]{width:350px!important}.w-\\[50vw\\]{width:50vw!important}.w-\\[min\\(44rem\\2c 100\\%\\)\\]{width:min(44rem,100%)!important}.w-\\[min\\(48rem\\2c 100\\%\\)\\]{width:min(48rem,100%)!important}.w-auto{width:auto!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-full{width:100%!important}.w-max{width:-moz-max-content!important;width:max-content!important}.w-px{width:1px!important}.min-w-0{min-width:0!important}.min-w-1{min-width:.25rem!important}.min-w-1\\.5{min-width:.375rem!important}.min-w-1\\/3{min-width:33.333333%!important}.min-w-100{min-width:25rem!important}.min-w-120{min-width:30rem!important}.min-w-16{min-width:4rem!important}.min-w-18{min-width:4.5rem!important}.min-w-30{min-width:7.5rem!important}.min-w-32{min-width:8rem!important}.min-w-4{min-width:1rem!important}.min-w-40{min-width:10rem!important}.min-w-44{min-width:11rem!important}.min-w-5{min-width:1.25rem!important}.min-w-50{min-width:12.5rem!important}.min-w-6{min-width:1.5rem!important}.min-w-60{min-width:15rem!important}.min-w-64{min-width:16rem!important}.min-w-80{min-width:20rem!important}.min-w-96{min-width:24rem!important}.min-w-\\[0\\.5rem\\]{min-width:.5rem!important}.min-w-\\[1000px\\]{min-width:1000px!important}.min-w-\\[10rem\\]{min-width:10rem!important}.min-w-\\[12\\.5rem\\]{min-width:12.5rem!important}.min-w-\\[15rem\\]{min-width:15rem!important}.min-w-\\[16rem\\]{min-width:16rem!important}.min-w-\\[1rem\\]{min-width:1rem!important}.min-w-\\[200px\\]{min-width:200px!important}.min-w-\\[20rem\\]{min-width:20rem!important}.min-w-\\[25rem\\]{min-width:25rem!important}.min-w-\\[2rem\\]{min-width:2rem!important}.min-w-\\[300px\\]{min-width:300px!important}.min-w-\\[34rem\\]{min-width:34rem!important}.min-w-\\[40rem\\]{min-width:40rem!important}.min-w-\\[50rem\\]{min-width:50rem!important}.min-w-\\[5rem\\]{min-width:5rem!important}.min-w-\\[7\\.5rem\\]{min-width:7.5rem!important}.min-w-full{min-width:100%!important}.max-w-1\\/2{max-width:50%!important}.max-w-100{max-width:25rem!important}.max-w-120{max-width:30rem!important}.max-w-140{max-width:35rem!important}.max-w-160{max-width:40rem!important}.max-w-192{max-width:48rem!important}.max-w-20{max-width:5rem!important}.max-w-200{max-width:50rem!important}.max-w-24{max-width:6rem!important}.max-w-248{max-width:62rem!important}.max-w-28{max-width:7rem!important}.max-w-2xl{max-width:42rem!important}.max-w-30{max-width:7.5rem!important}.max-w-300{max-width:75rem!important}.max-w-40{max-width:10rem!important}.max-w-44{max-width:11rem!important}.max-w-48{max-width:12rem!important}.max-w-4xl{max-width:56rem!important}.max-w-52{max-width:13rem!important}.max-w-56{max-width:14rem!important}.max-w-60{max-width:15rem!important}.max-w-64{max-width:16rem!important}.max-w-6xl{max-width:72rem!important}.max-w-72{max-width:18rem!important}.max-w-80{max-width:20rem!important}.max-w-96{max-width:24rem!important}.max-w-\\[30rem\\]{max-width:30rem!important}.max-w-\\[43rem\\]{max-width:43rem!important}.max-w-\\[50rem\\]{max-width:50rem!important}.max-w-\\[60vw\\]{max-width:60vw!important}.max-w-\\[800px\\]{max-width:800px!important}.max-w-\\[90\\%\\]{max-width:90%!important}.max-w-\\[920px\\]{max-width:920px!important}.max-w-full{max-width:100%!important}.max-w-lg{max-width:32rem!important}.max-w-max{max-width:-moz-max-content!important;max-width:max-content!important}.max-w-md{max-width:28rem!important}.max-w-none{max-width:none!important}.max-w-screen-md{max-width:768px!important}.max-w-screen-xl{max-width:1200px!important}.max-w-sm{max-width:24rem!important}.max-w-xl{max-width:36rem!important}.max-w-xs{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.flex-2{flex:2 2 0%!important}.flex-auto{flex:1 1 auto!important}.flex-none{flex:none!important}.flex-shrink{flex-shrink:1!important}.flex-shrink-0{flex-shrink:0!important}.shrink{flex-shrink:1!important}.shrink-0{flex-shrink:0!important}.flex-grow,.grow{flex-grow:1!important}.grow-0{flex-grow:0!important}.grow-\\[1000\\]{flex-grow:1000!important}.basis-full{flex-basis:100%!important}.table-auto{table-layout:auto!important}.table-fixed{table-layout:fixed!important}.border-collapse{border-collapse:collapse!important}.border-spacing-2{--tw-border-spacing-x:0.5rem!important;--tw-border-spacing-y:0.5rem!important;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)!important}.origin-top-left{transform-origin:top left!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\\/2{--tw-translate-y:-50%!important}.-translate-y-2{--tw-translate-y:-0.5rem!important}.-translate-y-2,.translate-x-\\[-3\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[-3\\%\\]{--tw-translate-x:-3%!important}.translate-y-10{--tw-translate-y:2.5rem!important}.translate-y-10,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-2{--tw-translate-y:0.5rem!important}.translate-y-\\[10\\%\\]{--tw-translate-y:10%!important}.-rotate-90,.translate-y-\\[10\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-90{--tw-rotate:-90deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-90{--tw-scale-x:.9!important;--tw-scale-y:.9!important}.scale-90,.scale-\\[0\\.8\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-\\[0\\.8\\]{--tw-scale-x:0.8!important;--tw-scale-y:0.8!important}.scale-\\[1\\.8\\]{--tw-scale-x:1.8!important;--tw-scale-y:1.8!important}.scale-\\[1\\.8\\],.scale-x-\\[-1\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-x-\\[-1\\]{--tw-scale-x:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes pulse{50%{opacity:.5}}.animate-\\[pulse_1s_ease-out_infinite\\]{animation:pulse 1s ease-out infinite!important}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite!important}.animate-spin{animation:spin 1s linear infinite!important}.cursor-auto{cursor:auto!important}.cursor-default{cursor:default!important}.cursor-grab{cursor:grab!important}.cursor-grabbing{cursor:grabbing!important}.cursor-help{cursor:help!important}.cursor-move{cursor:move!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.cursor-s-resize{cursor:s-resize!important}.cursor-text{cursor:text!important}.cursor-zoom-in{cursor:zoom-in!important}.select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.select-text{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important}.resize-none{resize:none!important}.resize-y{resize:vertical!important}.resize{resize:both!important}.list-inside{list-style-position:inside!important}.list-disc{list-style-type:disc!important}.list-none{list-style-type:none!important}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.grid-cols-\\[8\\.5rem_1fr\\]{grid-template-columns:8.5rem 1fr!important}.grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr!important}.grid-cols-\\[min-content_auto\\]{grid-template-columns:min-content auto!important}.grid-cols-\\[repeat\\(2\\2c _minmax\\(min-content\\2c _160px\\)\\)\\]{grid-template-columns:repeat(2,minmax(min-content,160px))!important}.grid-rows-\\[160px\\]{grid-template-rows:160px!important}.grid-rows-\\[49px_calc\\(40rem-49px\\)\\]{grid-template-rows:49px calc(40rem - 49px)!important}.grid-rows-\\[repeat\\(2\\2c _48px\\)\\]{grid-template-rows:repeat(2,48px)!important}.flex-row{flex-direction:row!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-nowrap{flex-wrap:nowrap!important}.place-items-center{place-items:center!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.items-baseline{align-items:baseline!important}.items-stretch{align-items:stretch!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.justify-around{justify-content:space-around!important}.justify-items-center{justify-items:center!important}.gap-0{gap:0!important}.gap-0\\.5{gap:.125rem!important}.gap-1{gap:.25rem!important}.gap-1\\.5{gap:.375rem!important}.gap-10{gap:2.5rem!important}.gap-16{gap:4rem!important}.gap-2{gap:.5rem!important}.gap-2\\.5{gap:.625rem!important}.gap-3{gap:.75rem!important}.gap-3\\.5{gap:.875rem!important}.gap-4{gap:1rem!important}.gap-5{gap:1.25rem!important}.gap-6{gap:1.5rem!important}.gap-8{gap:2rem!important}.gap-\\[10\\%\\]{gap:10%!important}.gap-x-1{-moz-column-gap:.25rem!important;column-gap:.25rem!important}.gap-x-12{-moz-column-gap:3rem!important;column-gap:3rem!important}.gap-x-2{-moz-column-gap:.5rem!important;column-gap:.5rem!important}.gap-x-3{-moz-column-gap:.75rem!important;column-gap:.75rem!important}.gap-x-4{-moz-column-gap:1rem!important;column-gap:1rem!important}.gap-x-8{-moz-column-gap:2rem!important;column-gap:2rem!important}.gap-y-1{row-gap:.25rem!important}.gap-y-1\\.5{row-gap:.375rem!important}.gap-y-12{row-gap:3rem!important}.gap-y-2{row-gap:.5rem!important}.gap-y-4{row-gap:1rem!important}.gap-y-px{row-gap:1px!important}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(0px*var(--tw-space-x-reverse))!important}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.125rem*var(--tw-space-x-reverse))!important}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}.space-x-1\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.375rem*var(--tw-space-x-reverse))!important}.space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}.space-x-2\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.625rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.625rem*var(--tw-space-x-reverse))!important}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.75rem*var(--tw-space-x-reverse))!important}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1.5rem*var(--tw-space-x-reverse))!important}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(2rem*var(--tw-space-x-reverse))!important}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(0px*var(--tw-space-y-reverse))!important;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))!important}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.125rem*var(--tw-space-y-reverse))!important;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.25rem*var(--tw-space-y-reverse))!important;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.375rem*var(--tw-space-y-reverse))!important;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(3rem*var(--tw-space-y-reverse))!important;margin-top:calc(3rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.75rem*var(--tw-space-y-reverse))!important;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))!important;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2rem*var(--tw-space-y-reverse))!important;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1px*var(--tw-space-y-reverse))!important;margin-top:calc(1px*(1 - var(--tw-space-y-reverse)))!important}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0!important;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))!important;border-right-width:calc(1px*var(--tw-divide-x-reverse))!important}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-bottom-width:calc(1px*var(--tw-divide-y-reverse))!important;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))!important}.self-start{align-self:flex-start!important}.self-center{align-self:center!important}.self-stretch{align-self:stretch!important}.justify-self-center{justify-self:center!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-clip{overflow:clip!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-scroll{overflow-y:scroll!important}.overscroll-contain{overscroll-behavior:contain!important}.overscroll-none{overscroll-behavior:none!important}.truncate{overflow:hidden!important;white-space:nowrap!important}.overflow-ellipsis,.text-ellipsis,.truncate{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.whitespace-pre{white-space:pre!important}.whitespace-pre-wrap{white-space:pre-wrap!important}.text-wrap{text-wrap:wrap!important}.text-nowrap{text-wrap:nowrap!important}.text-balance{text-wrap:balance!important}.text-pretty{text-wrap:pretty!important}.break-words{overflow-wrap:break-word!important}.break-all{word-break:break-all!important}.break-keep{word-break:keep-all!important}.rounded{border-radius:var(--radius)!important}.rounded-\\[0px\\]{border-radius:0!important}.rounded-\\[var\\(--radius\\)\\]{border-radius:var(--radius)!important}.rounded-full{border-radius:9999px!important}.rounded-lg{border-radius:var(--radius-lg)!important}.rounded-none{border-radius:0!important}.rounded-sm{border-radius:var(--radius-sm)!important}.rounded-b{border-bottom-right-radius:var(--radius)!important}.rounded-b,.rounded-l{border-bottom-left-radius:var(--radius)!important}.rounded-l{border-top-left-radius:var(--radius)!important}.rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-r{border-bottom-right-radius:var(--radius)!important;border-top-right-radius:var(--radius)!important}.rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-t{border-top-left-radius:var(--radius)!important;border-top-right-radius:var(--radius)!important}.rounded-t-none{border-top-left-radius:0!important;border-top-right-radius:0!important}.border{border-width:1px!important}.border-0{border-width:0!important}.border-2{border-width:2px!important}.border-y{border-top-width:1px!important}.border-b,.border-y{border-bottom-width:1px!important}.border-b-2{border-bottom-width:2px!important}.border-l{border-left-width:1px!important}.border-l-2{border-left-width:2px!important}.border-l-4{border-left-width:4px!important}.border-l-\\[5px\\]{border-left-width:5px!important}.border-r{border-right-width:1px!important}.border-t{border-top-width:1px!important}.border-t-0{border-top-width:0!important}.border-dashed{border-style:dashed!important}.border-dotted{border-style:dotted!important}.border-none{border-style:none!important}.border-\\[var\\(--glass-border-3000\\)\\]{border-color:var(--glass-border-3000)!important}.border-l-\\[\\#8F98FF\\]{--tw-border-opacity:1!important;border-left-color:rgb(143 152 255/var(--tw-border-opacity))!important}.border-l-\\[\\#94D674\\]{--tw-border-opacity:1!important;border-left-color:rgb(148 214 116/var(--tw-border-opacity))!important}.border-l-\\[\\#FF9870\\]{--tw-border-opacity:1!important;border-left-color:rgb(255 152 112/var(--tw-border-opacity))!important}.bg-\\[\\#000\\]{--tw-bg-opacity:1!important;background-color:rgb(0 0 0/var(--tw-bg-opacity))!important}.bg-\\[hsla\\(100\\2c 74\\%\\2c 98\\%\\2c 1\\)\\]{background-color:#f9fef6!important}.bg-\\[hsla\\(19\\2c 99\\%\\2c 99\\%\\2c 1\\)\\]{background-color:#fffcfa!important}.bg-\\[hsla\\(235\\2c 100\\%\\2c 99\\%\\2c 1\\)\\]{background-color:#fafaff!important}.bg-\\[var\\(--bg-light\\)\\]{background-color:var(--bg-light)!important}.bg-\\[var\\(--bg-table\\)\\]{background-color:var(--bg-table)!important}.bg-\\[var\\(--glass-bg-3000\\)\\]{background-color:var(--glass-bg-3000)!important}.bg-\\[var\\(--tooltip-bg\\)\\]{background-color:var(--tooltip-bg)!important}.bg-\\[white\\]{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.bg-contain{background-size:contain!important}.bg-cover{background-size:cover!important}.bg-no-repeat{background-repeat:no-repeat!important}.object-contain{object-fit:contain!important}.object-cover{object-fit:cover!important}.p-0{padding:0!important}.p-0\\.5{padding:.125rem!important}.p-1{padding:.25rem!important}.p-1\\.5{padding:.375rem!important}.p-10{padding:2.5rem!important}.p-16{padding:4rem!important}.p-2{padding:.5rem!important}.p-20{padding:5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-5{padding:1.25rem!important}.p-6{padding:1.5rem!important}.p-8{padding:2rem!important}.p-\\[calc\\(0\\.5rem-1px\\)\\]{padding:calc(.5rem - 1px)!important}.px-0{padding-left:0!important;padding-right:0!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-1\\.5{padding-left:.375rem!important;padding-right:.375rem!important}.px-12{padding-left:3rem!important;padding-right:3rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-8{padding-left:2rem!important;padding-right:2rem!important}.px-\\[calc\\(1\\.5rem\\+1px\\)\\]{padding-left:calc(1.5rem + 1px)!important;padding-right:calc(1.5rem + 1px)!important}.px-px{padding-left:1px!important;padding-right:1px!important}.py-0{padding-bottom:0!important;padding-top:0!important}.py-0\\.5{padding-bottom:.125rem!important;padding-top:.125rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-1\\.5{padding-bottom:.375rem!important;padding-top:.375rem!important}.py-10{padding-bottom:2.5rem!important;padding-top:2.5rem!important}.py-12{padding-bottom:3rem!important;padding-top:3rem!important}.py-15{padding-bottom:3.75rem!important;padding-top:3.75rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-20{padding-bottom:5rem!important;padding-top:5rem!important}.py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.py-5{padding-bottom:1.25rem!important;padding-top:1.25rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-8{padding-bottom:2rem!important;padding-top:2rem!important}.py-px{padding-bottom:1px!important;padding-top:1px!important}.pb-1{padding-bottom:.25rem!important}.pb-1\\.5{padding-bottom:.375rem!important}.pb-2{padding-bottom:.5rem!important}.pb-2\\.5{padding-bottom:.625rem!important}.pb-3{padding-bottom:.75rem!important}.pb-4{padding-bottom:1rem!important}.pb-6{padding-bottom:1.5rem!important}.pb-8{padding-bottom:2rem!important}.pb-\\[30rem\\]{padding-bottom:30rem!important}.pl-0{padding-left:0!important}.pl-0\\.5{padding-left:.125rem!important}.pl-1{padding-left:.25rem!important}.pl-1\\.5{padding-left:.375rem!important}.pl-10{padding-left:2.5rem!important}.pl-16{padding-left:4rem!important}.pl-2{padding-left:.5rem!important}.pl-3{padding-left:.75rem!important}.pl-4{padding-left:1rem!important}.pl-6{padding-left:1.5rem!important}.pl-7{padding-left:1.75rem!important}.pl-8{padding-left:2rem!important}.pr-1{padding-right:.25rem!important}.pr-1\\.5{padding-right:.375rem!important}.pr-10{padding-right:2.5rem!important}.pr-14{padding-right:3.5rem!important}.pr-2{padding-right:.5rem!important}.pr-3{padding-right:.75rem!important}.pr-4{padding-right:1rem!important}.pr-5{padding-right:1.25rem!important}.pr-7{padding-right:1.75rem!important}.pr-9{padding-right:2.25rem!important}.pt-1{padding-top:.25rem!important}.pt-1\\.5{padding-top:.375rem!important}.pt-12{padding-top:3rem!important}.pt-16{padding-top:4rem!important}.pt-2{padding-top:.5rem!important}.pt-4{padding-top:1rem!important}.pt-5{padding-top:1.25rem!important}.pt-6{padding-top:1.5rem!important}.pt-8{padding-top:2rem!important}.pt-px{padding-top:1px!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-right{text-align:right!important}.text-start{text-align:start!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-\\[-0\\.25em\\]{vertical-align:-.25em!important}.font-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace!important}.font-sans{font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol!important}.font-title{font-family:MatterSQ,-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important;line-height:1!important}.text-6xl{font-size:3.75rem!important;line-height:1!important}.text-7xl{font-size:4.5rem!important;line-height:1!important}.text-\\[0\\.6875rem\\]{font-size:.6875rem!important}.text-\\[0\\.8125rem\\]{font-size:.8125rem!important}.text-\\[11px\\]{font-size:11px!important}.text-\\[13px\\]{font-size:13px!important}.text-\\[15px\\]{font-size:15px!important}.text-\\[17px\\]{font-size:17px!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.625rem!important;line-height:.75rem!important}.font-bold{font-weight:700!important}.font-light{font-weight:300!important}.font-medium{font-weight:500!important}.font-normal{font-weight:400!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.capitalize{text-transform:capitalize!important}.italic{font-style:italic!important}.not-italic{font-style:normal!important}.tabular-nums{--tw-numeric-spacing:tabular-nums!important;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.leading-10{line-height:2.5rem!important}.leading-4{line-height:1rem!important}.leading-5{line-height:1.25rem!important}.leading-6{line-height:1.5rem!important}.leading-7{line-height:1.75rem!important}.leading-8{line-height:2rem!important}.leading-\\[0px\\]{line-height:0px!important}.leading-\\[normal\\]{line-height:normal!important}.leading-none{line-height:1!important}.leading-relaxed{line-height:1.625!important}.leading-tight{line-height:1.25!important}.tracking-normal{letter-spacing:0!important}.tracking-tight{letter-spacing:-.025em!important}.tracking-wide{letter-spacing:.025em!important}.tracking-wider{letter-spacing:.05em!important}.text-\\[\\#2EA2D3\\]{--tw-text-opacity:1!important;color:rgb(46 162 211/var(--tw-text-opacity))!important}.text-\\[\\#2F80FA\\]{--tw-text-opacity:1!important;color:rgb(47 128 250/var(--tw-text-opacity))!important}.text-\\[\\#30ABC6\\]{--tw-text-opacity:1!important;color:rgb(48 171 198/var(--tw-text-opacity))!important}.text-\\[\\#36C46F\\]{--tw-text-opacity:1!important;color:rgb(54 196 111/var(--tw-text-opacity))!important}.text-\\[\\#681291\\]{--tw-text-opacity:1!important;color:rgb(104 18 145/var(--tw-text-opacity))!important}.text-\\[\\#8567FF\\]{--tw-text-opacity:1!important;color:rgb(133 103 255/var(--tw-text-opacity))!important}.text-\\[\\#B62AD9\\]{--tw-text-opacity:1!important;color:rgb(182 42 217/var(--tw-text-opacity))!important}.text-\\[var\\(--text-secondary-3000\\)\\]{color:var(--text-secondary-3000)!important}.text-\\[var\\(--trace-3000\\)\\]{color:var(--trace-3000)!important}.underline{text-decoration-line:underline!important}.line-through{text-decoration-line:line-through!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.opacity-20{opacity:.2!important}.opacity-25{opacity:.25!important}.opacity-40{opacity:.4!important}.opacity-50{opacity:.5!important}.opacity-60{opacity:.6!important}.opacity-75{opacity:.75!important}.opacity-80{opacity:.8!important}.opacity-\\[var\\(--opacity-disabled\\)\\]{opacity:var(--opacity-disabled)!important}.bg-blend-overlay{background-blend-mode:overlay!important}.shadow{--tw-shadow:var(--shadow-elevation-3000)!important;--tw-shadow-colored:var(--shadow-elevation-3000)!important}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)!important}.shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important}.shadow-none,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)!important}.outline{outline-style:solid!important}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.blur{--tw-blur:blur(8px)!important}.blur,.drop-shadow-xl{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.drop-shadow-xl{--tw-drop-shadow:drop-shadow(0 20px 13px rgba(0,0,0,.03)) drop-shadow(0 8px 5px rgba(0,0,0,.08))!important}.invert{--tw-invert:invert(100%)!important}.invert,.sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.sepia{--tw-sepia:sepia(100%)!important}.\\!filter,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.backdrop-blur{--tw-backdrop-blur:blur(8px)!important}.backdrop-blur,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)!important}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.transition{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-shadow{transition-duration:.15s!important;transition-property:box-shadow!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-100{transition-duration:.1s!important}.duration-200{transition-duration:.2s!important}.duration-300{transition-duration:.3s!important}.duration-75{transition-duration:75ms!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.\\@container,.\\@container\\/og{container-type:inline-size!important}.\\@container\\/og{container-name:og!important}.rendering-pixelated{image-rendering:pixelated!important}.text-primary{color:var(--primary)!important}.bg-primary{background-color:var(--primary)!important}.border-primary{border-color:var(--primary)!important}.border-l-primary{border-left-color:var(--primary)!important}.border-r-primary{border-right-color:var(--primary)!important}.border-t-primary{border-top-color:var(--primary)!important}.border-b-primary{border-bottom-color:var(--primary)!important}.border-x-primary{border-left-color:var(--primary)!important;border-right-color:var(--primary)!important}.border-y-primary{border-bottom-color:var(--primary)!important;border-top-color:var(--primary)!important}.decoration-primary{text-decoration-color:var(--primary)!important}.text-danger-highlight{color:var(--danger-highlight)!important}.bg-danger-highlight{background-color:var(--danger-highlight)!important}.border-danger-highlight{border-color:var(--danger-highlight)!important}.border-l-danger-highlight{border-left-color:var(--danger-highlight)!important}.border-r-danger-highlight{border-right-color:var(--danger-highlight)!important}.border-t-danger-highlight{border-top-color:var(--danger-highlight)!important}.border-b-danger-highlight{border-bottom-color:var(--danger-highlight)!important}.border-x-danger-highlight{border-left-color:var(--danger-highlight)!important;border-right-color:var(--danger-highlight)!important}.border-y-danger-highlight{border-bottom-color:var(--danger-highlight)!important;border-top-color:var(--danger-highlight)!important}.decoration-danger-highlight{text-decoration-color:var(--danger-highlight)!important}.text-danger-lighter{color:var(--danger-lighter)!important}.bg-danger-lighter{background-color:var(--danger-lighter)!important}.border-danger-lighter{border-color:var(--danger-lighter)!important}.border-l-danger-lighter{border-left-color:var(--danger-lighter)!important}.border-r-danger-lighter{border-right-color:var(--danger-lighter)!important}.border-t-danger-lighter{border-top-color:var(--danger-lighter)!important}.border-b-danger-lighter{border-bottom-color:var(--danger-lighter)!important}.border-x-danger-lighter{border-left-color:var(--danger-lighter)!important;border-right-color:var(--danger-lighter)!important}.border-y-danger-lighter{border-bottom-color:var(--danger-lighter)!important;border-top-color:var(--danger-lighter)!important}.decoration-danger-lighter{text-decoration-color:var(--danger-lighter)!important}.text-danger-light{color:var(--danger-light)!important}.bg-danger-light{background-color:var(--danger-light)!important}.border-danger-light{border-color:var(--danger-light)!important}.border-l-danger-light{border-left-color:var(--danger-light)!important}.border-r-danger-light{border-right-color:var(--danger-light)!important}.border-t-danger-light{border-top-color:var(--danger-light)!important}.border-b-danger-light{border-bottom-color:var(--danger-light)!important}.border-x-danger-light{border-left-color:var(--danger-light)!important;border-right-color:var(--danger-light)!important}.border-y-danger-light{border-bottom-color:var(--danger-light)!important;border-top-color:var(--danger-light)!important}.decoration-danger-light{text-decoration-color:var(--danger-light)!important}.text-danger{color:var(--danger)!important}.bg-danger{background-color:var(--danger)!important}.border-danger{border-color:var(--danger)!important}.border-l-danger{border-left-color:var(--danger)!important}.border-r-danger{border-right-color:var(--danger)!important}.border-t-danger{border-top-color:var(--danger)!important}.border-b-danger{border-bottom-color:var(--danger)!important}.border-x-danger{border-left-color:var(--danger)!important;border-right-color:var(--danger)!important}.border-y-danger{border-bottom-color:var(--danger)!important;border-top-color:var(--danger)!important}.decoration-danger{text-decoration-color:var(--danger)!important}.text-danger-dark{color:var(--danger-dark)!important}.bg-danger-dark{background-color:var(--danger-dark)!important}.border-danger-dark{border-color:var(--danger-dark)!important}.border-l-danger-dark{border-left-color:var(--danger-dark)!important}.border-r-danger-dark{border-right-color:var(--danger-dark)!important}.border-t-danger-dark{border-top-color:var(--danger-dark)!important}.border-b-danger-dark{border-bottom-color:var(--danger-dark)!important}.border-x-danger-dark{border-left-color:var(--danger-dark)!important;border-right-color:var(--danger-dark)!important}.border-y-danger-dark{border-bottom-color:var(--danger-dark)!important;border-top-color:var(--danger-dark)!important}.decoration-danger-dark{text-decoration-color:var(--danger-dark)!important}.text-warning-highlight{color:var(--warning-highlight)!important}.bg-warning-highlight{background-color:var(--warning-highlight)!important}.border-warning-highlight{border-color:var(--warning-highlight)!important}.border-l-warning-highlight{border-left-color:var(--warning-highlight)!important}.border-r-warning-highlight{border-right-color:var(--warning-highlight)!important}.border-t-warning-highlight{border-top-color:var(--warning-highlight)!important}.border-b-warning-highlight{border-bottom-color:var(--warning-highlight)!important}.border-x-warning-highlight{border-left-color:var(--warning-highlight)!important;border-right-color:var(--warning-highlight)!important}.border-y-warning-highlight{border-bottom-color:var(--warning-highlight)!important;border-top-color:var(--warning-highlight)!important}.decoration-warning-highlight{text-decoration-color:var(--warning-highlight)!important}.text-warning{color:var(--warning)!important}.bg-warning{background-color:var(--warning)!important}.border-warning{border-color:var(--warning)!important}.border-l-warning{border-left-color:var(--warning)!important}.border-r-warning{border-right-color:var(--warning)!important}.border-t-warning{border-top-color:var(--warning)!important}.border-b-warning{border-bottom-color:var(--warning)!important}.border-x-warning{border-left-color:var(--warning)!important;border-right-color:var(--warning)!important}.border-y-warning{border-bottom-color:var(--warning)!important;border-top-color:var(--warning)!important}.decoration-warning{text-decoration-color:var(--warning)!important}.text-warning-dark{color:var(--warning-dark)!important}.bg-warning-dark{background-color:var(--warning-dark)!important}.border-warning-dark{border-color:var(--warning-dark)!important}.border-l-warning-dark{border-left-color:var(--warning-dark)!important}.border-r-warning-dark{border-right-color:var(--warning-dark)!important}.border-t-warning-dark{border-top-color:var(--warning-dark)!important}.border-b-warning-dark{border-bottom-color:var(--warning-dark)!important}.border-x-warning-dark{border-left-color:var(--warning-dark)!important;border-right-color:var(--warning-dark)!important}.border-y-warning-dark{border-bottom-color:var(--warning-dark)!important;border-top-color:var(--warning-dark)!important}.decoration-warning-dark{text-decoration-color:var(--warning-dark)!important}.text-highlight{color:var(--highlight)!important}.bg-highlight{background-color:var(--highlight)!important}.border-highlight{border-color:var(--highlight)!important}.border-l-highlight{border-left-color:var(--highlight)!important}.border-r-highlight{border-right-color:var(--highlight)!important}.border-t-highlight{border-top-color:var(--highlight)!important}.border-b-highlight{border-bottom-color:var(--highlight)!important}.border-x-highlight{border-left-color:var(--highlight)!important;border-right-color:var(--highlight)!important}.border-y-highlight{border-bottom-color:var(--highlight)!important;border-top-color:var(--highlight)!important}.decoration-highlight{text-decoration-color:var(--highlight)!important}.text-success-highlight{color:var(--success-highlight)!important}.bg-success-highlight{background-color:var(--success-highlight)!important}.border-success-highlight{border-color:var(--success-highlight)!important}.border-l-success-highlight{border-left-color:var(--success-highlight)!important}.border-r-success-highlight{border-right-color:var(--success-highlight)!important}.border-t-success-highlight{border-top-color:var(--success-highlight)!important}.border-b-success-highlight{border-bottom-color:var(--success-highlight)!important}.border-x-success-highlight{border-left-color:var(--success-highlight)!important;border-right-color:var(--success-highlight)!important}.border-y-success-highlight{border-bottom-color:var(--success-highlight)!important;border-top-color:var(--success-highlight)!important}.decoration-success-highlight{text-decoration-color:var(--success-highlight)!important}.text-success-light{color:var(--success-light)!important}.bg-success-light{background-color:var(--success-light)!important}.border-success-light{border-color:var(--success-light)!important}.border-l-success-light{border-left-color:var(--success-light)!important}.border-r-success-light{border-right-color:var(--success-light)!important}.border-t-success-light{border-top-color:var(--success-light)!important}.border-b-success-light{border-bottom-color:var(--success-light)!important}.border-x-success-light{border-left-color:var(--success-light)!important;border-right-color:var(--success-light)!important}.border-y-success-light{border-bottom-color:var(--success-light)!important;border-top-color:var(--success-light)!important}.decoration-success-light{text-decoration-color:var(--success-light)!important}.text-success{color:var(--success)!important}.bg-success{background-color:var(--success)!important}.border-success{border-color:var(--success)!important}.border-l-success{border-left-color:var(--success)!important}.border-r-success{border-right-color:var(--success)!important}.border-t-success{border-top-color:var(--success)!important}.border-b-success{border-bottom-color:var(--success)!important}.border-x-success{border-left-color:var(--success)!important;border-right-color:var(--success)!important}.border-y-success{border-bottom-color:var(--success)!important;border-top-color:var(--success)!important}.decoration-success{text-decoration-color:var(--success)!important}.text-success-dark{color:var(--success-dark)!important}.bg-success-dark{background-color:var(--success-dark)!important}.border-success-dark{border-color:var(--success-dark)!important}.border-l-success-dark{border-left-color:var(--success-dark)!important}.border-r-success-dark{border-right-color:var(--success-dark)!important}.border-t-success-dark{border-top-color:var(--success-dark)!important}.border-b-success-dark{border-bottom-color:var(--success-dark)!important}.border-x-success-dark{border-left-color:var(--success-dark)!important;border-right-color:var(--success-dark)!important}.border-y-success-dark{border-bottom-color:var(--success-dark)!important;border-top-color:var(--success-dark)!important}.decoration-success-dark{text-decoration-color:var(--success-dark)!important}.text-muted{color:var(--muted)!important}.bg-muted{background-color:var(--muted)!important}.border-muted{border-color:var(--muted)!important}.border-l-muted{border-left-color:var(--muted)!important}.border-r-muted{border-right-color:var(--muted)!important}.border-t-muted{border-top-color:var(--muted)!important}.border-b-muted{border-bottom-color:var(--muted)!important}.border-x-muted{border-left-color:var(--muted)!important;border-right-color:var(--muted)!important}.border-y-muted{border-bottom-color:var(--muted)!important;border-top-color:var(--muted)!important}.decoration-muted{text-decoration-color:var(--muted)!important}.text-muted-alt{color:var(--muted-alt)!important}.bg-muted-alt{background-color:var(--muted-alt)!important}.border-muted-alt{border-color:var(--muted-alt)!important}.border-l-muted-alt{border-left-color:var(--muted-alt)!important}.border-r-muted-alt{border-right-color:var(--muted-alt)!important}.border-t-muted-alt{border-top-color:var(--muted-alt)!important}.border-b-muted-alt{border-bottom-color:var(--muted-alt)!important}.border-x-muted-alt{border-left-color:var(--muted-alt)!important;border-right-color:var(--muted-alt)!important}.border-y-muted-alt{border-bottom-color:var(--muted-alt)!important;border-top-color:var(--muted-alt)!important}.decoration-muted-alt{text-decoration-color:var(--muted-alt)!important}.text-mark{color:var(--mark)!important}.bg-mark{background-color:var(--mark)!important}.border-mark{border-color:var(--mark)!important}.border-l-mark{border-left-color:var(--mark)!important}.border-r-mark{border-right-color:var(--mark)!important}.border-t-mark{border-top-color:var(--mark)!important}.border-b-mark{border-bottom-color:var(--mark)!important}.border-x-mark{border-left-color:var(--mark)!important;border-right-color:var(--mark)!important}.border-y-mark{border-bottom-color:var(--mark)!important;border-top-color:var(--mark)!important}.decoration-mark{text-decoration-color:var(--mark)!important}.text-white{color:var(--white)!important}.bg-white{background-color:var(--white)!important}.border-white{border-color:var(--white)!important}.border-l-white{border-left-color:var(--white)!important}.border-r-white{border-right-color:var(--white)!important}.border-t-white{border-top-color:var(--white)!important}.border-b-white{border-bottom-color:var(--white)!important}.border-x-white{border-left-color:var(--white)!important;border-right-color:var(--white)!important}.border-y-white{border-bottom-color:var(--white)!important;border-top-color:var(--white)!important}.decoration-white{text-decoration-color:var(--white)!important}.text-bg-light{color:var(--bg-light)!important}.bg-bg-light{background-color:var(--bg-light)!important}.border-bg-light{border-color:var(--bg-light)!important}.border-l-bg-light{border-left-color:var(--bg-light)!important}.border-r-bg-light{border-right-color:var(--bg-light)!important}.border-t-bg-light{border-top-color:var(--bg-light)!important}.border-b-bg-light{border-bottom-color:var(--bg-light)!important}.border-x-bg-light{border-left-color:var(--bg-light)!important;border-right-color:var(--bg-light)!important}.border-y-bg-light{border-bottom-color:var(--bg-light)!important;border-top-color:var(--bg-light)!important}.decoration-bg-light{text-decoration-color:var(--bg-light)!important}.text-side{color:var(--side)!important}.bg-side{background-color:var(--side)!important}.border-side{border-color:var(--side)!important}.border-l-side{border-left-color:var(--side)!important}.border-r-side{border-right-color:var(--side)!important}.border-t-side{border-top-color:var(--side)!important}.border-b-side{border-bottom-color:var(--side)!important}.border-x-side{border-left-color:var(--side)!important;border-right-color:var(--side)!important}.border-y-side{border-bottom-color:var(--side)!important;border-top-color:var(--side)!important}.decoration-side{text-decoration-color:var(--side)!important}.text-mid{color:var(--mid)!important}.bg-mid{background-color:var(--mid)!important}.border-mid{border-color:var(--mid)!important}.border-l-mid{border-left-color:var(--mid)!important}.border-r-mid{border-right-color:var(--mid)!important}.border-t-mid{border-top-color:var(--mid)!important}.border-b-mid{border-bottom-color:var(--mid)!important}.border-x-mid{border-left-color:var(--mid)!important;border-right-color:var(--mid)!important}.border-y-mid{border-bottom-color:var(--mid)!important;border-top-color:var(--mid)!important}.decoration-mid{text-decoration-color:var(--mid)!important}.text-border{color:var(--border)!important}.bg-border{background-color:var(--border)!important}.border-border{border-color:var(--border)!important}.border-l-border{border-left-color:var(--border)!important}.border-r-border{border-right-color:var(--border)!important}.border-t-border{border-top-color:var(--border)!important}.border-b-border{border-bottom-color:var(--border)!important}.border-x-border{border-left-color:var(--border)!important;border-right-color:var(--border)!important}.border-y-border{border-bottom-color:var(--border)!important;border-top-color:var(--border)!important}.decoration-border{text-decoration-color:var(--border)!important}.text-border-light{color:var(--border-light)!important}.bg-border-light{background-color:var(--border-light)!important}.border-border-light{border-color:var(--border-light)!important}.border-l-border-light{border-left-color:var(--border-light)!important}.border-r-border-light{border-right-color:var(--border-light)!important}.border-t-border-light{border-top-color:var(--border-light)!important}.border-b-border-light{border-bottom-color:var(--border-light)!important}.border-x-border-light{border-left-color:var(--border-light)!important;border-right-color:var(--border-light)!important}.border-y-border-light{border-bottom-color:var(--border-light)!important;border-top-color:var(--border-light)!important}.decoration-border-light{text-decoration-color:var(--border-light)!important}.text-border-bold{color:var(--border-bold)!important}.bg-border-bold{background-color:var(--border-bold)!important}.border-border-bold{border-color:var(--border-bold)!important}.border-l-border-bold{border-left-color:var(--border-bold)!important}.border-r-border-bold{border-right-color:var(--border-bold)!important}.border-t-border-bold{border-top-color:var(--border-bold)!important}.border-b-border-bold{border-bottom-color:var(--border-bold)!important}.border-x-border-bold{border-left-color:var(--border-bold)!important;border-right-color:var(--border-bold)!important}.border-y-border-bold{border-bottom-color:var(--border-bold)!important;border-top-color:var(--border-bold)!important}.decoration-border-bold{text-decoration-color:var(--border-bold)!important}.text-transparent{color:var(--transparent)!important}.bg-transparent{background-color:var(--transparent)!important}.border-transparent{border-color:var(--transparent)!important}.border-l-transparent{border-left-color:var(--transparent)!important}.border-r-transparent{border-right-color:var(--transparent)!important}.border-t-transparent{border-top-color:var(--transparent)!important}.border-b-transparent{border-bottom-color:var(--transparent)!important}.border-x-transparent{border-left-color:var(--transparent)!important;border-right-color:var(--transparent)!important}.border-y-transparent{border-bottom-color:var(--transparent)!important;border-top-color:var(--transparent)!important}.decoration-transparent{text-decoration-color:var(--transparent)!important}.text-link{color:var(--link)!important}.bg-link{background-color:var(--link)!important}.border-link{border-color:var(--link)!important}.border-l-link{border-left-color:var(--link)!important}.border-r-link{border-right-color:var(--link)!important}.border-t-link{border-top-color:var(--link)!important}.border-b-link{border-bottom-color:var(--link)!important}.border-x-link{border-left-color:var(--link)!important;border-right-color:var(--link)!important}.border-y-link{border-bottom-color:var(--link)!important;border-top-color:var(--link)!important}.decoration-link{text-decoration-color:var(--link)!important}.text-brand-blue{color:var(--brand-blue)!important}.bg-brand-blue{background-color:var(--brand-blue)!important}.border-brand-blue{border-color:var(--brand-blue)!important}.border-l-brand-blue{border-left-color:var(--brand-blue)!important}.border-r-brand-blue{border-right-color:var(--brand-blue)!important}.border-t-brand-blue{border-top-color:var(--brand-blue)!important}.border-b-brand-blue{border-bottom-color:var(--brand-blue)!important}.border-x-brand-blue{border-left-color:var(--brand-blue)!important;border-right-color:var(--brand-blue)!important}.border-y-brand-blue{border-bottom-color:var(--brand-blue)!important;border-top-color:var(--brand-blue)!important}.decoration-brand-blue{text-decoration-color:var(--brand-blue)!important}.text-brand-red{color:var(--brand-red)!important}.bg-brand-red{background-color:var(--brand-red)!important}.border-brand-red{border-color:var(--brand-red)!important}.border-l-brand-red{border-left-color:var(--brand-red)!important}.border-r-brand-red{border-right-color:var(--brand-red)!important}.border-t-brand-red{border-top-color:var(--brand-red)!important}.border-b-brand-red{border-bottom-color:var(--brand-red)!important}.border-x-brand-red{border-left-color:var(--brand-red)!important;border-right-color:var(--brand-red)!important}.border-y-brand-red{border-bottom-color:var(--brand-red)!important;border-top-color:var(--brand-red)!important}.decoration-brand-red{text-decoration-color:var(--brand-red)!important}.text-brand-yellow{color:var(--brand-yellow)!important}.bg-brand-yellow{background-color:var(--brand-yellow)!important}.border-brand-yellow{border-color:var(--brand-yellow)!important}.border-l-brand-yellow{border-left-color:var(--brand-yellow)!important}.border-r-brand-yellow{border-right-color:var(--brand-yellow)!important}.border-t-brand-yellow{border-top-color:var(--brand-yellow)!important}.border-b-brand-yellow{border-bottom-color:var(--brand-yellow)!important}.border-x-brand-yellow{border-left-color:var(--brand-yellow)!important;border-right-color:var(--brand-yellow)!important}.border-y-brand-yellow{border-bottom-color:var(--brand-yellow)!important;border-top-color:var(--brand-yellow)!important}.decoration-brand-yellow{text-decoration-color:var(--brand-yellow)!important}.text-brand-key{color:var(--brand-key)!important}.bg-brand-key{background-color:var(--brand-key)!important}.border-brand-key{border-color:var(--brand-key)!important}.border-l-brand-key{border-left-color:var(--brand-key)!important}.border-r-brand-key{border-right-color:var(--brand-key)!important}.border-t-brand-key{border-top-color:var(--brand-key)!important}.border-b-brand-key{border-bottom-color:var(--brand-key)!important}.border-x-brand-key{border-left-color:var(--brand-key)!important;border-right-color:var(--brand-key)!important}.border-y-brand-key{border-bottom-color:var(--brand-key)!important;border-top-color:var(--brand-key)!important}.decoration-brand-key{text-decoration-color:var(--brand-key)!important}.text-text-3000-light{color:var(--text-3000-light)!important}.bg-text-3000-light{background-color:var(--text-3000-light)!important}.border-text-3000-light{border-color:var(--text-3000-light)!important}.border-l-text-3000-light{border-left-color:var(--text-3000-light)!important}.border-r-text-3000-light{border-right-color:var(--text-3000-light)!important}.border-t-text-3000-light{border-top-color:var(--text-3000-light)!important}.border-b-text-3000-light{border-bottom-color:var(--text-3000-light)!important}.border-x-text-3000-light{border-left-color:var(--text-3000-light)!important;border-right-color:var(--text-3000-light)!important}.border-y-text-3000-light{border-bottom-color:var(--text-3000-light)!important;border-top-color:var(--text-3000-light)!important}.decoration-text-3000-light{text-decoration-color:var(--text-3000-light)!important}.text-text-secondary-3000-light{color:var(--text-secondary-3000-light)!important}.bg-text-secondary-3000-light{background-color:var(--text-secondary-3000-light)!important}.border-text-secondary-3000-light{border-color:var(--text-secondary-3000-light)!important}.border-l-text-secondary-3000-light{border-left-color:var(--text-secondary-3000-light)!important}.border-r-text-secondary-3000-light{border-right-color:var(--text-secondary-3000-light)!important}.border-t-text-secondary-3000-light{border-top-color:var(--text-secondary-3000-light)!important}.border-b-text-secondary-3000-light{border-bottom-color:var(--text-secondary-3000-light)!important}.border-x-text-secondary-3000-light{border-left-color:var(--text-secondary-3000-light)!important;border-right-color:var(--text-secondary-3000-light)!important}.border-y-text-secondary-3000-light{border-bottom-color:var(--text-secondary-3000-light)!important;border-top-color:var(--text-secondary-3000-light)!important}.decoration-text-secondary-3000-light{text-decoration-color:var(--text-secondary-3000-light)!important}.text-muted-3000-light{color:var(--muted-3000-light)!important}.bg-muted-3000-light{background-color:var(--muted-3000-light)!important}.border-muted-3000-light{border-color:var(--muted-3000-light)!important}.border-l-muted-3000-light{border-left-color:var(--muted-3000-light)!important}.border-r-muted-3000-light{border-right-color:var(--muted-3000-light)!important}.border-t-muted-3000-light{border-top-color:var(--muted-3000-light)!important}.border-b-muted-3000-light{border-bottom-color:var(--muted-3000-light)!important}.border-x-muted-3000-light{border-left-color:var(--muted-3000-light)!important;border-right-color:var(--muted-3000-light)!important}.border-y-muted-3000-light{border-bottom-color:var(--muted-3000-light)!important;border-top-color:var(--muted-3000-light)!important}.decoration-muted-3000-light{text-decoration-color:var(--muted-3000-light)!important}.text-trace-3000-light{color:var(--trace-3000-light)!important}.bg-trace-3000-light{background-color:var(--trace-3000-light)!important}.border-trace-3000-light{border-color:var(--trace-3000-light)!important}.border-l-trace-3000-light{border-left-color:var(--trace-3000-light)!important}.border-r-trace-3000-light{border-right-color:var(--trace-3000-light)!important}.border-t-trace-3000-light{border-top-color:var(--trace-3000-light)!important}.border-b-trace-3000-light{border-bottom-color:var(--trace-3000-light)!important}.border-x-trace-3000-light{border-left-color:var(--trace-3000-light)!important;border-right-color:var(--trace-3000-light)!important}.border-y-trace-3000-light{border-bottom-color:var(--trace-3000-light)!important;border-top-color:var(--trace-3000-light)!important}.decoration-trace-3000-light{text-decoration-color:var(--trace-3000-light)!important}.text-primary-3000-light{color:var(--primary-3000-light)!important}.bg-primary-3000-light{background-color:var(--primary-3000-light)!important}.border-primary-3000-light{border-color:var(--primary-3000-light)!important}.border-l-primary-3000-light{border-left-color:var(--primary-3000-light)!important}.border-r-primary-3000-light{border-right-color:var(--primary-3000-light)!important}.border-t-primary-3000-light{border-top-color:var(--primary-3000-light)!important}.border-b-primary-3000-light{border-bottom-color:var(--primary-3000-light)!important}.border-x-primary-3000-light{border-left-color:var(--primary-3000-light)!important;border-right-color:var(--primary-3000-light)!important}.border-y-primary-3000-light{border-bottom-color:var(--primary-3000-light)!important;border-top-color:var(--primary-3000-light)!important}.decoration-primary-3000-light{text-decoration-color:var(--primary-3000-light)!important}.text-primary-highlight-light{color:var(--primary-highlight-light)!important}.bg-primary-highlight-light{background-color:var(--primary-highlight-light)!important}.border-primary-highlight-light{border-color:var(--primary-highlight-light)!important}.border-l-primary-highlight-light{border-left-color:var(--primary-highlight-light)!important}.border-r-primary-highlight-light{border-right-color:var(--primary-highlight-light)!important}.border-t-primary-highlight-light{border-top-color:var(--primary-highlight-light)!important}.border-b-primary-highlight-light{border-bottom-color:var(--primary-highlight-light)!important}.border-x-primary-highlight-light{border-left-color:var(--primary-highlight-light)!important;border-right-color:var(--primary-highlight-light)!important}.border-y-primary-highlight-light{border-bottom-color:var(--primary-highlight-light)!important;border-top-color:var(--primary-highlight-light)!important}.decoration-primary-highlight-light{text-decoration-color:var(--primary-highlight-light)!important}.text-primary-3000-hover-light{color:var(--primary-3000-hover-light)!important}.bg-primary-3000-hover-light{background-color:var(--primary-3000-hover-light)!important}.border-primary-3000-hover-light{border-color:var(--primary-3000-hover-light)!important}.border-l-primary-3000-hover-light{border-left-color:var(--primary-3000-hover-light)!important}.border-r-primary-3000-hover-light{border-right-color:var(--primary-3000-hover-light)!important}.border-t-primary-3000-hover-light{border-top-color:var(--primary-3000-hover-light)!important}.border-b-primary-3000-hover-light{border-bottom-color:var(--primary-3000-hover-light)!important}.border-x-primary-3000-hover-light{border-left-color:var(--primary-3000-hover-light)!important;border-right-color:var(--primary-3000-hover-light)!important}.border-y-primary-3000-hover-light{border-bottom-color:var(--primary-3000-hover-light)!important;border-top-color:var(--primary-3000-hover-light)!important}.decoration-primary-3000-hover-light{text-decoration-color:var(--primary-3000-hover-light)!important}.text-primary-3000-active-light{color:var(--primary-3000-active-light)!important}.bg-primary-3000-active-light{background-color:var(--primary-3000-active-light)!important}.border-primary-3000-active-light{border-color:var(--primary-3000-active-light)!important}.border-l-primary-3000-active-light{border-left-color:var(--primary-3000-active-light)!important}.border-r-primary-3000-active-light{border-right-color:var(--primary-3000-active-light)!important}.border-t-primary-3000-active-light{border-top-color:var(--primary-3000-active-light)!important}.border-b-primary-3000-active-light{border-bottom-color:var(--primary-3000-active-light)!important}.border-x-primary-3000-active-light{border-left-color:var(--primary-3000-active-light)!important;border-right-color:var(--primary-3000-active-light)!important}.border-y-primary-3000-active-light{border-bottom-color:var(--primary-3000-active-light)!important;border-top-color:var(--primary-3000-active-light)!important}.decoration-primary-3000-active-light{text-decoration-color:var(--primary-3000-active-light)!important}.text-secondary-3000-light{color:var(--secondary-3000-light)!important}.bg-secondary-3000-light{background-color:var(--secondary-3000-light)!important}.border-secondary-3000-light{border-color:var(--secondary-3000-light)!important}.border-l-secondary-3000-light{border-left-color:var(--secondary-3000-light)!important}.border-r-secondary-3000-light{border-right-color:var(--secondary-3000-light)!important}.border-t-secondary-3000-light{border-top-color:var(--secondary-3000-light)!important}.border-b-secondary-3000-light{border-bottom-color:var(--secondary-3000-light)!important}.border-x-secondary-3000-light{border-left-color:var(--secondary-3000-light)!important;border-right-color:var(--secondary-3000-light)!important}.border-y-secondary-3000-light{border-bottom-color:var(--secondary-3000-light)!important;border-top-color:var(--secondary-3000-light)!important}.decoration-secondary-3000-light{text-decoration-color:var(--secondary-3000-light)!important}.text-secondary-3000-hover-light{color:var(--secondary-3000-hover-light)!important}.bg-secondary-3000-hover-light{background-color:var(--secondary-3000-hover-light)!important}.border-secondary-3000-hover-light{border-color:var(--secondary-3000-hover-light)!important}.border-l-secondary-3000-hover-light{border-left-color:var(--secondary-3000-hover-light)!important}.border-r-secondary-3000-hover-light{border-right-color:var(--secondary-3000-hover-light)!important}.border-t-secondary-3000-hover-light{border-top-color:var(--secondary-3000-hover-light)!important}.border-b-secondary-3000-hover-light{border-bottom-color:var(--secondary-3000-hover-light)!important}.border-x-secondary-3000-hover-light{border-left-color:var(--secondary-3000-hover-light)!important;border-right-color:var(--secondary-3000-hover-light)!important}.border-y-secondary-3000-hover-light{border-bottom-color:var(--secondary-3000-hover-light)!important;border-top-color:var(--secondary-3000-hover-light)!important}.decoration-secondary-3000-hover-light{text-decoration-color:var(--secondary-3000-hover-light)!important}.text-accent-3000-light{color:var(--accent-3000-light)!important}.bg-accent-3000-light{background-color:var(--accent-3000-light)!important}.border-accent-3000-light{border-color:var(--accent-3000-light)!important}.border-l-accent-3000-light{border-left-color:var(--accent-3000-light)!important}.border-r-accent-3000-light{border-right-color:var(--accent-3000-light)!important}.border-t-accent-3000-light{border-top-color:var(--accent-3000-light)!important}.border-b-accent-3000-light{border-bottom-color:var(--accent-3000-light)!important}.border-x-accent-3000-light{border-left-color:var(--accent-3000-light)!important;border-right-color:var(--accent-3000-light)!important}.border-y-accent-3000-light{border-bottom-color:var(--accent-3000-light)!important;border-top-color:var(--accent-3000-light)!important}.decoration-accent-3000-light{text-decoration-color:var(--accent-3000-light)!important}.text-bg-3000-light{color:var(--bg-3000-light)!important}.bg-bg-3000-light{background-color:var(--bg-3000-light)!important}.border-bg-3000-light{border-color:var(--bg-3000-light)!important}.border-l-bg-3000-light{border-left-color:var(--bg-3000-light)!important}.border-r-bg-3000-light{border-right-color:var(--bg-3000-light)!important}.border-t-bg-3000-light{border-top-color:var(--bg-3000-light)!important}.border-b-bg-3000-light{border-bottom-color:var(--bg-3000-light)!important}.border-x-bg-3000-light{border-left-color:var(--bg-3000-light)!important;border-right-color:var(--bg-3000-light)!important}.border-y-bg-3000-light{border-bottom-color:var(--bg-3000-light)!important;border-top-color:var(--bg-3000-light)!important}.decoration-bg-3000-light{text-decoration-color:var(--bg-3000-light)!important}.text-border-3000-light{color:var(--border-3000-light)!important}.bg-border-3000-light{background-color:var(--border-3000-light)!important}.border-border-3000-light{border-color:var(--border-3000-light)!important}.border-l-border-3000-light{border-left-color:var(--border-3000-light)!important}.border-r-border-3000-light{border-right-color:var(--border-3000-light)!important}.border-t-border-3000-light{border-top-color:var(--border-3000-light)!important}.border-b-border-3000-light{border-bottom-color:var(--border-3000-light)!important}.border-x-border-3000-light{border-left-color:var(--border-3000-light)!important;border-right-color:var(--border-3000-light)!important}.border-y-border-3000-light{border-bottom-color:var(--border-3000-light)!important;border-top-color:var(--border-3000-light)!important}.decoration-border-3000-light{text-decoration-color:var(--border-3000-light)!important}.text-border-bold-3000-light{color:var(--border-bold-3000-light)!important}.bg-border-bold-3000-light{background-color:var(--border-bold-3000-light)!important}.border-border-bold-3000-light{border-color:var(--border-bold-3000-light)!important}.border-l-border-bold-3000-light{border-left-color:var(--border-bold-3000-light)!important}.border-r-border-bold-3000-light{border-right-color:var(--border-bold-3000-light)!important}.border-t-border-bold-3000-light{border-top-color:var(--border-bold-3000-light)!important}.border-b-border-bold-3000-light{border-bottom-color:var(--border-bold-3000-light)!important}.border-x-border-bold-3000-light{border-left-color:var(--border-bold-3000-light)!important;border-right-color:var(--border-bold-3000-light)!important}.border-y-border-bold-3000-light{border-bottom-color:var(--border-bold-3000-light)!important;border-top-color:var(--border-bold-3000-light)!important}.decoration-border-bold-3000-light{text-decoration-color:var(--border-bold-3000-light)!important}.text-glass-bg-3000-light{color:var(--glass-bg-3000-light)!important}.bg-glass-bg-3000-light{background-color:var(--glass-bg-3000-light)!important}.border-glass-bg-3000-light{border-color:var(--glass-bg-3000-light)!important}.border-l-glass-bg-3000-light{border-left-color:var(--glass-bg-3000-light)!important}.border-r-glass-bg-3000-light{border-right-color:var(--glass-bg-3000-light)!important}.border-t-glass-bg-3000-light{border-top-color:var(--glass-bg-3000-light)!important}.border-b-glass-bg-3000-light{border-bottom-color:var(--glass-bg-3000-light)!important}.border-x-glass-bg-3000-light{border-left-color:var(--glass-bg-3000-light)!important;border-right-color:var(--glass-bg-3000-light)!important}.border-y-glass-bg-3000-light{border-bottom-color:var(--glass-bg-3000-light)!important;border-top-color:var(--glass-bg-3000-light)!important}.decoration-glass-bg-3000-light{text-decoration-color:var(--glass-bg-3000-light)!important}.text-glass-border-3000-light{color:var(--glass-border-3000-light)!important}.bg-glass-border-3000-light{background-color:var(--glass-border-3000-light)!important}.border-glass-border-3000-light{border-color:var(--glass-border-3000-light)!important}.border-l-glass-border-3000-light{border-left-color:var(--glass-border-3000-light)!important}.border-r-glass-border-3000-light{border-right-color:var(--glass-border-3000-light)!important}.border-t-glass-border-3000-light{border-top-color:var(--glass-border-3000-light)!important}.border-b-glass-border-3000-light{border-bottom-color:var(--glass-border-3000-light)!important}.border-x-glass-border-3000-light{border-left-color:var(--glass-border-3000-light)!important;border-right-color:var(--glass-border-3000-light)!important}.border-y-glass-border-3000-light{border-bottom-color:var(--glass-border-3000-light)!important;border-top-color:var(--glass-border-3000-light)!important}.decoration-glass-border-3000-light{text-decoration-color:var(--glass-border-3000-light)!important}.text-link-3000-light{color:var(--link-3000-light)!important}.bg-link-3000-light{background-color:var(--link-3000-light)!important}.border-link-3000-light{border-color:var(--link-3000-light)!important}.border-l-link-3000-light{border-left-color:var(--link-3000-light)!important}.border-r-link-3000-light{border-right-color:var(--link-3000-light)!important}.border-t-link-3000-light{border-top-color:var(--link-3000-light)!important}.border-b-link-3000-light{border-bottom-color:var(--link-3000-light)!important}.border-x-link-3000-light{border-left-color:var(--link-3000-light)!important;border-right-color:var(--link-3000-light)!important}.border-y-link-3000-light{border-bottom-color:var(--link-3000-light)!important;border-top-color:var(--link-3000-light)!important}.decoration-link-3000-light{text-decoration-color:var(--link-3000-light)!important}.text-primary-3000-frame-bg-light{color:var(--primary-3000-frame-bg-light)!important}.bg-primary-3000-frame-bg-light{background-color:var(--primary-3000-frame-bg-light)!important}.border-primary-3000-frame-bg-light{border-color:var(--primary-3000-frame-bg-light)!important}.border-l-primary-3000-frame-bg-light{border-left-color:var(--primary-3000-frame-bg-light)!important}.border-r-primary-3000-frame-bg-light{border-right-color:var(--primary-3000-frame-bg-light)!important}.border-t-primary-3000-frame-bg-light{border-top-color:var(--primary-3000-frame-bg-light)!important}.border-b-primary-3000-frame-bg-light{border-bottom-color:var(--primary-3000-frame-bg-light)!important}.border-x-primary-3000-frame-bg-light{border-left-color:var(--primary-3000-frame-bg-light)!important;border-right-color:var(--primary-3000-frame-bg-light)!important}.border-y-primary-3000-frame-bg-light{border-bottom-color:var(--primary-3000-frame-bg-light)!important;border-top-color:var(--primary-3000-frame-bg-light)!important}.decoration-primary-3000-frame-bg-light{text-decoration-color:var(--primary-3000-frame-bg-light)!important}.text-primary-3000-button-bg-light{color:var(--primary-3000-button-bg-light)!important}.bg-primary-3000-button-bg-light{background-color:var(--primary-3000-button-bg-light)!important}.border-primary-3000-button-bg-light{border-color:var(--primary-3000-button-bg-light)!important}.border-l-primary-3000-button-bg-light{border-left-color:var(--primary-3000-button-bg-light)!important}.border-r-primary-3000-button-bg-light{border-right-color:var(--primary-3000-button-bg-light)!important}.border-t-primary-3000-button-bg-light{border-top-color:var(--primary-3000-button-bg-light)!important}.border-b-primary-3000-button-bg-light{border-bottom-color:var(--primary-3000-button-bg-light)!important}.border-x-primary-3000-button-bg-light{border-left-color:var(--primary-3000-button-bg-light)!important;border-right-color:var(--primary-3000-button-bg-light)!important}.border-y-primary-3000-button-bg-light{border-bottom-color:var(--primary-3000-button-bg-light)!important;border-top-color:var(--primary-3000-button-bg-light)!important}.decoration-primary-3000-button-bg-light{text-decoration-color:var(--primary-3000-button-bg-light)!important}.text-primary-3000-button-border-light{color:var(--primary-3000-button-border-light)!important}.bg-primary-3000-button-border-light{background-color:var(--primary-3000-button-border-light)!important}.border-primary-3000-button-border-light{border-color:var(--primary-3000-button-border-light)!important}.border-l-primary-3000-button-border-light{border-left-color:var(--primary-3000-button-border-light)!important}.border-r-primary-3000-button-border-light{border-right-color:var(--primary-3000-button-border-light)!important}.border-t-primary-3000-button-border-light{border-top-color:var(--primary-3000-button-border-light)!important}.border-b-primary-3000-button-border-light{border-bottom-color:var(--primary-3000-button-border-light)!important}.border-x-primary-3000-button-border-light{border-left-color:var(--primary-3000-button-border-light)!important;border-right-color:var(--primary-3000-button-border-light)!important}.border-y-primary-3000-button-border-light{border-bottom-color:var(--primary-3000-button-border-light)!important;border-top-color:var(--primary-3000-button-border-light)!important}.decoration-primary-3000-button-border-light{text-decoration-color:var(--primary-3000-button-border-light)!important}.text-primary-3000-button-border-hover-light{color:var(--primary-3000-button-border-hover-light)!important}.bg-primary-3000-button-border-hover-light{background-color:var(--primary-3000-button-border-hover-light)!important}.border-primary-3000-button-border-hover-light{border-color:var(--primary-3000-button-border-hover-light)!important}.border-l-primary-3000-button-border-hover-light{border-left-color:var(--primary-3000-button-border-hover-light)!important}.border-r-primary-3000-button-border-hover-light{border-right-color:var(--primary-3000-button-border-hover-light)!important}.border-t-primary-3000-button-border-hover-light{border-top-color:var(--primary-3000-button-border-hover-light)!important}.border-b-primary-3000-button-border-hover-light{border-bottom-color:var(--primary-3000-button-border-hover-light)!important}.border-x-primary-3000-button-border-hover-light{border-left-color:var(--primary-3000-button-border-hover-light)!important;border-right-color:var(--primary-3000-button-border-hover-light)!important}.border-y-primary-3000-button-border-hover-light{border-bottom-color:var(--primary-3000-button-border-hover-light)!important;border-top-color:var(--primary-3000-button-border-hover-light)!important}.decoration-primary-3000-button-border-hover-light{text-decoration-color:var(--primary-3000-button-border-hover-light)!important}.text-secondary-3000-frame-bg-light{color:var(--secondary-3000-frame-bg-light)!important}.bg-secondary-3000-frame-bg-light{background-color:var(--secondary-3000-frame-bg-light)!important}.border-secondary-3000-frame-bg-light{border-color:var(--secondary-3000-frame-bg-light)!important}.border-l-secondary-3000-frame-bg-light{border-left-color:var(--secondary-3000-frame-bg-light)!important}.border-r-secondary-3000-frame-bg-light{border-right-color:var(--secondary-3000-frame-bg-light)!important}.border-t-secondary-3000-frame-bg-light{border-top-color:var(--secondary-3000-frame-bg-light)!important}.border-b-secondary-3000-frame-bg-light{border-bottom-color:var(--secondary-3000-frame-bg-light)!important}.border-x-secondary-3000-frame-bg-light{border-left-color:var(--secondary-3000-frame-bg-light)!important;border-right-color:var(--secondary-3000-frame-bg-light)!important}.border-y-secondary-3000-frame-bg-light{border-bottom-color:var(--secondary-3000-frame-bg-light)!important;border-top-color:var(--secondary-3000-frame-bg-light)!important}.decoration-secondary-3000-frame-bg-light{text-decoration-color:var(--secondary-3000-frame-bg-light)!important}.text-secondary-3000-button-bg-light{color:var(--secondary-3000-button-bg-light)!important}.bg-secondary-3000-button-bg-light{background-color:var(--secondary-3000-button-bg-light)!important}.border-secondary-3000-button-bg-light{border-color:var(--secondary-3000-button-bg-light)!important}.border-l-secondary-3000-button-bg-light{border-left-color:var(--secondary-3000-button-bg-light)!important}.border-r-secondary-3000-button-bg-light{border-right-color:var(--secondary-3000-button-bg-light)!important}.border-t-secondary-3000-button-bg-light{border-top-color:var(--secondary-3000-button-bg-light)!important}.border-b-secondary-3000-button-bg-light{border-bottom-color:var(--secondary-3000-button-bg-light)!important}.border-x-secondary-3000-button-bg-light{border-left-color:var(--secondary-3000-button-bg-light)!important;border-right-color:var(--secondary-3000-button-bg-light)!important}.border-y-secondary-3000-button-bg-light{border-bottom-color:var(--secondary-3000-button-bg-light)!important;border-top-color:var(--secondary-3000-button-bg-light)!important}.decoration-secondary-3000-button-bg-light{text-decoration-color:var(--secondary-3000-button-bg-light)!important}.text-secondary-3000-button-border-light{color:var(--secondary-3000-button-border-light)!important}.bg-secondary-3000-button-border-light{background-color:var(--secondary-3000-button-border-light)!important}.border-secondary-3000-button-border-light{border-color:var(--secondary-3000-button-border-light)!important}.border-l-secondary-3000-button-border-light{border-left-color:var(--secondary-3000-button-border-light)!important}.border-r-secondary-3000-button-border-light{border-right-color:var(--secondary-3000-button-border-light)!important}.border-t-secondary-3000-button-border-light{border-top-color:var(--secondary-3000-button-border-light)!important}.border-b-secondary-3000-button-border-light{border-bottom-color:var(--secondary-3000-button-border-light)!important}.border-x-secondary-3000-button-border-light{border-left-color:var(--secondary-3000-button-border-light)!important;border-right-color:var(--secondary-3000-button-border-light)!important}.border-y-secondary-3000-button-border-light{border-bottom-color:var(--secondary-3000-button-border-light)!important;border-top-color:var(--secondary-3000-button-border-light)!important}.decoration-secondary-3000-button-border-light{text-decoration-color:var(--secondary-3000-button-border-light)!important}.text-secondary-3000-button-border-hover-light{color:var(--secondary-3000-button-border-hover-light)!important}.bg-secondary-3000-button-border-hover-light{background-color:var(--secondary-3000-button-border-hover-light)!important}.border-secondary-3000-button-border-hover-light{border-color:var(--secondary-3000-button-border-hover-light)!important}.border-l-secondary-3000-button-border-hover-light{border-left-color:var(--secondary-3000-button-border-hover-light)!important}.border-r-secondary-3000-button-border-hover-light{border-right-color:var(--secondary-3000-button-border-hover-light)!important}.border-t-secondary-3000-button-border-hover-light{border-top-color:var(--secondary-3000-button-border-hover-light)!important}.border-b-secondary-3000-button-border-hover-light{border-bottom-color:var(--secondary-3000-button-border-hover-light)!important}.border-x-secondary-3000-button-border-hover-light{border-left-color:var(--secondary-3000-button-border-hover-light)!important;border-right-color:var(--secondary-3000-button-border-hover-light)!important}.border-y-secondary-3000-button-border-hover-light{border-bottom-color:var(--secondary-3000-button-border-hover-light)!important;border-top-color:var(--secondary-3000-button-border-hover-light)!important}.decoration-secondary-3000-button-border-hover-light{text-decoration-color:var(--secondary-3000-button-border-hover-light)!important}.text-danger-3000-frame-bg-light{color:var(--danger-3000-frame-bg-light)!important}.bg-danger-3000-frame-bg-light{background-color:var(--danger-3000-frame-bg-light)!important}.border-danger-3000-frame-bg-light{border-color:var(--danger-3000-frame-bg-light)!important}.border-l-danger-3000-frame-bg-light{border-left-color:var(--danger-3000-frame-bg-light)!important}.border-r-danger-3000-frame-bg-light{border-right-color:var(--danger-3000-frame-bg-light)!important}.border-t-danger-3000-frame-bg-light{border-top-color:var(--danger-3000-frame-bg-light)!important}.border-b-danger-3000-frame-bg-light{border-bottom-color:var(--danger-3000-frame-bg-light)!important}.border-x-danger-3000-frame-bg-light{border-left-color:var(--danger-3000-frame-bg-light)!important;border-right-color:var(--danger-3000-frame-bg-light)!important}.border-y-danger-3000-frame-bg-light{border-bottom-color:var(--danger-3000-frame-bg-light)!important;border-top-color:var(--danger-3000-frame-bg-light)!important}.decoration-danger-3000-frame-bg-light{text-decoration-color:var(--danger-3000-frame-bg-light)!important}.text-danger-3000-button-border-light{color:var(--danger-3000-button-border-light)!important}.bg-danger-3000-button-border-light{background-color:var(--danger-3000-button-border-light)!important}.border-danger-3000-button-border-light{border-color:var(--danger-3000-button-border-light)!important}.border-l-danger-3000-button-border-light{border-left-color:var(--danger-3000-button-border-light)!important}.border-r-danger-3000-button-border-light{border-right-color:var(--danger-3000-button-border-light)!important}.border-t-danger-3000-button-border-light{border-top-color:var(--danger-3000-button-border-light)!important}.border-b-danger-3000-button-border-light{border-bottom-color:var(--danger-3000-button-border-light)!important}.border-x-danger-3000-button-border-light{border-left-color:var(--danger-3000-button-border-light)!important;border-right-color:var(--danger-3000-button-border-light)!important}.border-y-danger-3000-button-border-light{border-bottom-color:var(--danger-3000-button-border-light)!important;border-top-color:var(--danger-3000-button-border-light)!important}.decoration-danger-3000-button-border-light{text-decoration-color:var(--danger-3000-button-border-light)!important}.text-danger-3000-button-border-hover-light{color:var(--danger-3000-button-border-hover-light)!important}.bg-danger-3000-button-border-hover-light{background-color:var(--danger-3000-button-border-hover-light)!important}.border-danger-3000-button-border-hover-light{border-color:var(--danger-3000-button-border-hover-light)!important}.border-l-danger-3000-button-border-hover-light{border-left-color:var(--danger-3000-button-border-hover-light)!important}.border-r-danger-3000-button-border-hover-light{border-right-color:var(--danger-3000-button-border-hover-light)!important}.border-t-danger-3000-button-border-hover-light{border-top-color:var(--danger-3000-button-border-hover-light)!important}.border-b-danger-3000-button-border-hover-light{border-bottom-color:var(--danger-3000-button-border-hover-light)!important}.border-x-danger-3000-button-border-hover-light{border-left-color:var(--danger-3000-button-border-hover-light)!important;border-right-color:var(--danger-3000-button-border-hover-light)!important}.border-y-danger-3000-button-border-hover-light{border-bottom-color:var(--danger-3000-button-border-hover-light)!important;border-top-color:var(--danger-3000-button-border-hover-light)!important}.decoration-danger-3000-button-border-hover-light{text-decoration-color:var(--danger-3000-button-border-hover-light)!important}.text-shadow-elevation-3000-light{color:var(--shadow-elevation-3000-light)!important}.bg-shadow-elevation-3000-light{background-color:var(--shadow-elevation-3000-light)!important}.border-shadow-elevation-3000-light{border-color:var(--shadow-elevation-3000-light)!important}.border-l-shadow-elevation-3000-light{border-left-color:var(--shadow-elevation-3000-light)!important}.border-r-shadow-elevation-3000-light{border-right-color:var(--shadow-elevation-3000-light)!important}.border-t-shadow-elevation-3000-light{border-top-color:var(--shadow-elevation-3000-light)!important}.border-b-shadow-elevation-3000-light{border-bottom-color:var(--shadow-elevation-3000-light)!important}.border-x-shadow-elevation-3000-light{border-left-color:var(--shadow-elevation-3000-light)!important;border-right-color:var(--shadow-elevation-3000-light)!important}.border-y-shadow-elevation-3000-light{border-bottom-color:var(--shadow-elevation-3000-light)!important;border-top-color:var(--shadow-elevation-3000-light)!important}.decoration-shadow-elevation-3000-light{text-decoration-color:var(--shadow-elevation-3000-light)!important}.text-shadow-elevation-3000-dark{color:var(--shadow-elevation-3000-dark)!important}.bg-shadow-elevation-3000-dark{background-color:var(--shadow-elevation-3000-dark)!important}.border-shadow-elevation-3000-dark{border-color:var(--shadow-elevation-3000-dark)!important}.border-l-shadow-elevation-3000-dark{border-left-color:var(--shadow-elevation-3000-dark)!important}.border-r-shadow-elevation-3000-dark{border-right-color:var(--shadow-elevation-3000-dark)!important}.border-t-shadow-elevation-3000-dark{border-top-color:var(--shadow-elevation-3000-dark)!important}.border-b-shadow-elevation-3000-dark{border-bottom-color:var(--shadow-elevation-3000-dark)!important}.border-x-shadow-elevation-3000-dark{border-left-color:var(--shadow-elevation-3000-dark)!important;border-right-color:var(--shadow-elevation-3000-dark)!important}.border-y-shadow-elevation-3000-dark{border-bottom-color:var(--shadow-elevation-3000-dark)!important;border-top-color:var(--shadow-elevation-3000-dark)!important}.decoration-shadow-elevation-3000-dark{text-decoration-color:var(--shadow-elevation-3000-dark)!important}.text-text-3000-dark{color:var(--text-3000-dark)!important}.bg-text-3000-dark{background-color:var(--text-3000-dark)!important}.border-text-3000-dark{border-color:var(--text-3000-dark)!important}.border-l-text-3000-dark{border-left-color:var(--text-3000-dark)!important}.border-r-text-3000-dark{border-right-color:var(--text-3000-dark)!important}.border-t-text-3000-dark{border-top-color:var(--text-3000-dark)!important}.border-b-text-3000-dark{border-bottom-color:var(--text-3000-dark)!important}.border-x-text-3000-dark{border-left-color:var(--text-3000-dark)!important;border-right-color:var(--text-3000-dark)!important}.border-y-text-3000-dark{border-bottom-color:var(--text-3000-dark)!important;border-top-color:var(--text-3000-dark)!important}.decoration-text-3000-dark{text-decoration-color:var(--text-3000-dark)!important}.text-text-secondary-3000-dark{color:var(--text-secondary-3000-dark)!important}.bg-text-secondary-3000-dark{background-color:var(--text-secondary-3000-dark)!important}.border-text-secondary-3000-dark{border-color:var(--text-secondary-3000-dark)!important}.border-l-text-secondary-3000-dark{border-left-color:var(--text-secondary-3000-dark)!important}.border-r-text-secondary-3000-dark{border-right-color:var(--text-secondary-3000-dark)!important}.border-t-text-secondary-3000-dark{border-top-color:var(--text-secondary-3000-dark)!important}.border-b-text-secondary-3000-dark{border-bottom-color:var(--text-secondary-3000-dark)!important}.border-x-text-secondary-3000-dark{border-left-color:var(--text-secondary-3000-dark)!important;border-right-color:var(--text-secondary-3000-dark)!important}.border-y-text-secondary-3000-dark{border-bottom-color:var(--text-secondary-3000-dark)!important;border-top-color:var(--text-secondary-3000-dark)!important}.decoration-text-secondary-3000-dark{text-decoration-color:var(--text-secondary-3000-dark)!important}.text-muted-3000-dark{color:var(--muted-3000-dark)!important}.bg-muted-3000-dark{background-color:var(--muted-3000-dark)!important}.border-muted-3000-dark{border-color:var(--muted-3000-dark)!important}.border-l-muted-3000-dark{border-left-color:var(--muted-3000-dark)!important}.border-r-muted-3000-dark{border-right-color:var(--muted-3000-dark)!important}.border-t-muted-3000-dark{border-top-color:var(--muted-3000-dark)!important}.border-b-muted-3000-dark{border-bottom-color:var(--muted-3000-dark)!important}.border-x-muted-3000-dark{border-left-color:var(--muted-3000-dark)!important;border-right-color:var(--muted-3000-dark)!important}.border-y-muted-3000-dark{border-bottom-color:var(--muted-3000-dark)!important;border-top-color:var(--muted-3000-dark)!important}.decoration-muted-3000-dark{text-decoration-color:var(--muted-3000-dark)!important}.text-trace-3000-dark{color:var(--trace-3000-dark)!important}.bg-trace-3000-dark{background-color:var(--trace-3000-dark)!important}.border-trace-3000-dark{border-color:var(--trace-3000-dark)!important}.border-l-trace-3000-dark{border-left-color:var(--trace-3000-dark)!important}.border-r-trace-3000-dark{border-right-color:var(--trace-3000-dark)!important}.border-t-trace-3000-dark{border-top-color:var(--trace-3000-dark)!important}.border-b-trace-3000-dark{border-bottom-color:var(--trace-3000-dark)!important}.border-x-trace-3000-dark{border-left-color:var(--trace-3000-dark)!important;border-right-color:var(--trace-3000-dark)!important}.border-y-trace-3000-dark{border-bottom-color:var(--trace-3000-dark)!important;border-top-color:var(--trace-3000-dark)!important}.decoration-trace-3000-dark{text-decoration-color:var(--trace-3000-dark)!important}.text-primary-3000-dark{color:var(--primary-3000-dark)!important}.bg-primary-3000-dark{background-color:var(--primary-3000-dark)!important}.border-primary-3000-dark{border-color:var(--primary-3000-dark)!important}.border-l-primary-3000-dark{border-left-color:var(--primary-3000-dark)!important}.border-r-primary-3000-dark{border-right-color:var(--primary-3000-dark)!important}.border-t-primary-3000-dark{border-top-color:var(--primary-3000-dark)!important}.border-b-primary-3000-dark{border-bottom-color:var(--primary-3000-dark)!important}.border-x-primary-3000-dark{border-left-color:var(--primary-3000-dark)!important;border-right-color:var(--primary-3000-dark)!important}.border-y-primary-3000-dark{border-bottom-color:var(--primary-3000-dark)!important;border-top-color:var(--primary-3000-dark)!important}.decoration-primary-3000-dark{text-decoration-color:var(--primary-3000-dark)!important}.text-primary-highlight-dark{color:var(--primary-highlight-dark)!important}.bg-primary-highlight-dark{background-color:var(--primary-highlight-dark)!important}.border-primary-highlight-dark{border-color:var(--primary-highlight-dark)!important}.border-l-primary-highlight-dark{border-left-color:var(--primary-highlight-dark)!important}.border-r-primary-highlight-dark{border-right-color:var(--primary-highlight-dark)!important}.border-t-primary-highlight-dark{border-top-color:var(--primary-highlight-dark)!important}.border-b-primary-highlight-dark{border-bottom-color:var(--primary-highlight-dark)!important}.border-x-primary-highlight-dark{border-left-color:var(--primary-highlight-dark)!important;border-right-color:var(--primary-highlight-dark)!important}.border-y-primary-highlight-dark{border-bottom-color:var(--primary-highlight-dark)!important;border-top-color:var(--primary-highlight-dark)!important}.decoration-primary-highlight-dark{text-decoration-color:var(--primary-highlight-dark)!important}.text-primary-3000-hover-dark{color:var(--primary-3000-hover-dark)!important}.bg-primary-3000-hover-dark{background-color:var(--primary-3000-hover-dark)!important}.border-primary-3000-hover-dark{border-color:var(--primary-3000-hover-dark)!important}.border-l-primary-3000-hover-dark{border-left-color:var(--primary-3000-hover-dark)!important}.border-r-primary-3000-hover-dark{border-right-color:var(--primary-3000-hover-dark)!important}.border-t-primary-3000-hover-dark{border-top-color:var(--primary-3000-hover-dark)!important}.border-b-primary-3000-hover-dark{border-bottom-color:var(--primary-3000-hover-dark)!important}.border-x-primary-3000-hover-dark{border-left-color:var(--primary-3000-hover-dark)!important;border-right-color:var(--primary-3000-hover-dark)!important}.border-y-primary-3000-hover-dark{border-bottom-color:var(--primary-3000-hover-dark)!important;border-top-color:var(--primary-3000-hover-dark)!important}.decoration-primary-3000-hover-dark{text-decoration-color:var(--primary-3000-hover-dark)!important}.text-primary-3000-active-dark{color:var(--primary-3000-active-dark)!important}.bg-primary-3000-active-dark{background-color:var(--primary-3000-active-dark)!important}.border-primary-3000-active-dark{border-color:var(--primary-3000-active-dark)!important}.border-l-primary-3000-active-dark{border-left-color:var(--primary-3000-active-dark)!important}.border-r-primary-3000-active-dark{border-right-color:var(--primary-3000-active-dark)!important}.border-t-primary-3000-active-dark{border-top-color:var(--primary-3000-active-dark)!important}.border-b-primary-3000-active-dark{border-bottom-color:var(--primary-3000-active-dark)!important}.border-x-primary-3000-active-dark{border-left-color:var(--primary-3000-active-dark)!important;border-right-color:var(--primary-3000-active-dark)!important}.border-y-primary-3000-active-dark{border-bottom-color:var(--primary-3000-active-dark)!important;border-top-color:var(--primary-3000-active-dark)!important}.decoration-primary-3000-active-dark{text-decoration-color:var(--primary-3000-active-dark)!important}.text-primary-alt-highlight-light{color:var(--primary-alt-highlight-light)!important}.bg-primary-alt-highlight-light{background-color:var(--primary-alt-highlight-light)!important}.border-primary-alt-highlight-light{border-color:var(--primary-alt-highlight-light)!important}.border-l-primary-alt-highlight-light{border-left-color:var(--primary-alt-highlight-light)!important}.border-r-primary-alt-highlight-light{border-right-color:var(--primary-alt-highlight-light)!important}.border-t-primary-alt-highlight-light{border-top-color:var(--primary-alt-highlight-light)!important}.border-b-primary-alt-highlight-light{border-bottom-color:var(--primary-alt-highlight-light)!important}.border-x-primary-alt-highlight-light{border-left-color:var(--primary-alt-highlight-light)!important;border-right-color:var(--primary-alt-highlight-light)!important}.border-y-primary-alt-highlight-light{border-bottom-color:var(--primary-alt-highlight-light)!important;border-top-color:var(--primary-alt-highlight-light)!important}.decoration-primary-alt-highlight-light{text-decoration-color:var(--primary-alt-highlight-light)!important}.text-secondary-3000-dark{color:var(--secondary-3000-dark)!important}.bg-secondary-3000-dark{background-color:var(--secondary-3000-dark)!important}.border-secondary-3000-dark{border-color:var(--secondary-3000-dark)!important}.border-l-secondary-3000-dark{border-left-color:var(--secondary-3000-dark)!important}.border-r-secondary-3000-dark{border-right-color:var(--secondary-3000-dark)!important}.border-t-secondary-3000-dark{border-top-color:var(--secondary-3000-dark)!important}.border-b-secondary-3000-dark{border-bottom-color:var(--secondary-3000-dark)!important}.border-x-secondary-3000-dark{border-left-color:var(--secondary-3000-dark)!important;border-right-color:var(--secondary-3000-dark)!important}.border-y-secondary-3000-dark{border-bottom-color:var(--secondary-3000-dark)!important;border-top-color:var(--secondary-3000-dark)!important}.decoration-secondary-3000-dark{text-decoration-color:var(--secondary-3000-dark)!important}.text-secondary-3000-hover-dark{color:var(--secondary-3000-hover-dark)!important}.bg-secondary-3000-hover-dark{background-color:var(--secondary-3000-hover-dark)!important}.border-secondary-3000-hover-dark{border-color:var(--secondary-3000-hover-dark)!important}.border-l-secondary-3000-hover-dark{border-left-color:var(--secondary-3000-hover-dark)!important}.border-r-secondary-3000-hover-dark{border-right-color:var(--secondary-3000-hover-dark)!important}.border-t-secondary-3000-hover-dark{border-top-color:var(--secondary-3000-hover-dark)!important}.border-b-secondary-3000-hover-dark{border-bottom-color:var(--secondary-3000-hover-dark)!important}.border-x-secondary-3000-hover-dark{border-left-color:var(--secondary-3000-hover-dark)!important;border-right-color:var(--secondary-3000-hover-dark)!important}.border-y-secondary-3000-hover-dark{border-bottom-color:var(--secondary-3000-hover-dark)!important;border-top-color:var(--secondary-3000-hover-dark)!important}.decoration-secondary-3000-hover-dark{text-decoration-color:var(--secondary-3000-hover-dark)!important}.text-accent-3000-dark{color:var(--accent-3000-dark)!important}.bg-accent-3000-dark{background-color:var(--accent-3000-dark)!important}.border-accent-3000-dark{border-color:var(--accent-3000-dark)!important}.border-l-accent-3000-dark{border-left-color:var(--accent-3000-dark)!important}.border-r-accent-3000-dark{border-right-color:var(--accent-3000-dark)!important}.border-t-accent-3000-dark{border-top-color:var(--accent-3000-dark)!important}.border-b-accent-3000-dark{border-bottom-color:var(--accent-3000-dark)!important}.border-x-accent-3000-dark{border-left-color:var(--accent-3000-dark)!important;border-right-color:var(--accent-3000-dark)!important}.border-y-accent-3000-dark{border-bottom-color:var(--accent-3000-dark)!important;border-top-color:var(--accent-3000-dark)!important}.decoration-accent-3000-dark{text-decoration-color:var(--accent-3000-dark)!important}.text-bg-3000-dark{color:var(--bg-3000-dark)!important}.bg-bg-3000-dark{background-color:var(--bg-3000-dark)!important}.border-bg-3000-dark{border-color:var(--bg-3000-dark)!important}.border-l-bg-3000-dark{border-left-color:var(--bg-3000-dark)!important}.border-r-bg-3000-dark{border-right-color:var(--bg-3000-dark)!important}.border-t-bg-3000-dark{border-top-color:var(--bg-3000-dark)!important}.border-b-bg-3000-dark{border-bottom-color:var(--bg-3000-dark)!important}.border-x-bg-3000-dark{border-left-color:var(--bg-3000-dark)!important;border-right-color:var(--bg-3000-dark)!important}.border-y-bg-3000-dark{border-bottom-color:var(--bg-3000-dark)!important;border-top-color:var(--bg-3000-dark)!important}.decoration-bg-3000-dark{text-decoration-color:var(--bg-3000-dark)!important}.text-border-3000-dark{color:var(--border-3000-dark)!important}.bg-border-3000-dark{background-color:var(--border-3000-dark)!important}.border-border-3000-dark{border-color:var(--border-3000-dark)!important}.border-l-border-3000-dark{border-left-color:var(--border-3000-dark)!important}.border-r-border-3000-dark{border-right-color:var(--border-3000-dark)!important}.border-t-border-3000-dark{border-top-color:var(--border-3000-dark)!important}.border-b-border-3000-dark{border-bottom-color:var(--border-3000-dark)!important}.border-x-border-3000-dark{border-left-color:var(--border-3000-dark)!important;border-right-color:var(--border-3000-dark)!important}.border-y-border-3000-dark{border-bottom-color:var(--border-3000-dark)!important;border-top-color:var(--border-3000-dark)!important}.decoration-border-3000-dark{text-decoration-color:var(--border-3000-dark)!important}.text-border-bold-3000-dark{color:var(--border-bold-3000-dark)!important}.bg-border-bold-3000-dark{background-color:var(--border-bold-3000-dark)!important}.border-border-bold-3000-dark{border-color:var(--border-bold-3000-dark)!important}.border-l-border-bold-3000-dark{border-left-color:var(--border-bold-3000-dark)!important}.border-r-border-bold-3000-dark{border-right-color:var(--border-bold-3000-dark)!important}.border-t-border-bold-3000-dark{border-top-color:var(--border-bold-3000-dark)!important}.border-b-border-bold-3000-dark{border-bottom-color:var(--border-bold-3000-dark)!important}.border-x-border-bold-3000-dark{border-left-color:var(--border-bold-3000-dark)!important;border-right-color:var(--border-bold-3000-dark)!important}.border-y-border-bold-3000-dark{border-bottom-color:var(--border-bold-3000-dark)!important;border-top-color:var(--border-bold-3000-dark)!important}.decoration-border-bold-3000-dark{text-decoration-color:var(--border-bold-3000-dark)!important}.text-glass-bg-3000-dark{color:var(--glass-bg-3000-dark)!important}.bg-glass-bg-3000-dark{background-color:var(--glass-bg-3000-dark)!important}.border-glass-bg-3000-dark{border-color:var(--glass-bg-3000-dark)!important}.border-l-glass-bg-3000-dark{border-left-color:var(--glass-bg-3000-dark)!important}.border-r-glass-bg-3000-dark{border-right-color:var(--glass-bg-3000-dark)!important}.border-t-glass-bg-3000-dark{border-top-color:var(--glass-bg-3000-dark)!important}.border-b-glass-bg-3000-dark{border-bottom-color:var(--glass-bg-3000-dark)!important}.border-x-glass-bg-3000-dark{border-left-color:var(--glass-bg-3000-dark)!important;border-right-color:var(--glass-bg-3000-dark)!important}.border-y-glass-bg-3000-dark{border-bottom-color:var(--glass-bg-3000-dark)!important;border-top-color:var(--glass-bg-3000-dark)!important}.decoration-glass-bg-3000-dark{text-decoration-color:var(--glass-bg-3000-dark)!important}.text-glass-border-3000-dark{color:var(--glass-border-3000-dark)!important}.bg-glass-border-3000-dark{background-color:var(--glass-border-3000-dark)!important}.border-glass-border-3000-dark{border-color:var(--glass-border-3000-dark)!important}.border-l-glass-border-3000-dark{border-left-color:var(--glass-border-3000-dark)!important}.border-r-glass-border-3000-dark{border-right-color:var(--glass-border-3000-dark)!important}.border-t-glass-border-3000-dark{border-top-color:var(--glass-border-3000-dark)!important}.border-b-glass-border-3000-dark{border-bottom-color:var(--glass-border-3000-dark)!important}.border-x-glass-border-3000-dark{border-left-color:var(--glass-border-3000-dark)!important;border-right-color:var(--glass-border-3000-dark)!important}.border-y-glass-border-3000-dark{border-bottom-color:var(--glass-border-3000-dark)!important;border-top-color:var(--glass-border-3000-dark)!important}.decoration-glass-border-3000-dark{text-decoration-color:var(--glass-border-3000-dark)!important}.text-link-3000-dark{color:var(--link-3000-dark)!important}.bg-link-3000-dark{background-color:var(--link-3000-dark)!important}.border-link-3000-dark{border-color:var(--link-3000-dark)!important}.border-l-link-3000-dark{border-left-color:var(--link-3000-dark)!important}.border-r-link-3000-dark{border-right-color:var(--link-3000-dark)!important}.border-t-link-3000-dark{border-top-color:var(--link-3000-dark)!important}.border-b-link-3000-dark{border-bottom-color:var(--link-3000-dark)!important}.border-x-link-3000-dark{border-left-color:var(--link-3000-dark)!important;border-right-color:var(--link-3000-dark)!important}.border-y-link-3000-dark{border-bottom-color:var(--link-3000-dark)!important;border-top-color:var(--link-3000-dark)!important}.decoration-link-3000-dark{text-decoration-color:var(--link-3000-dark)!important}.text-primary-3000-frame-bg-dark{color:var(--primary-3000-frame-bg-dark)!important}.bg-primary-3000-frame-bg-dark{background-color:var(--primary-3000-frame-bg-dark)!important}.border-primary-3000-frame-bg-dark{border-color:var(--primary-3000-frame-bg-dark)!important}.border-l-primary-3000-frame-bg-dark{border-left-color:var(--primary-3000-frame-bg-dark)!important}.border-r-primary-3000-frame-bg-dark{border-right-color:var(--primary-3000-frame-bg-dark)!important}.border-t-primary-3000-frame-bg-dark{border-top-color:var(--primary-3000-frame-bg-dark)!important}.border-b-primary-3000-frame-bg-dark{border-bottom-color:var(--primary-3000-frame-bg-dark)!important}.border-x-primary-3000-frame-bg-dark{border-left-color:var(--primary-3000-frame-bg-dark)!important;border-right-color:var(--primary-3000-frame-bg-dark)!important}.border-y-primary-3000-frame-bg-dark{border-bottom-color:var(--primary-3000-frame-bg-dark)!important;border-top-color:var(--primary-3000-frame-bg-dark)!important}.decoration-primary-3000-frame-bg-dark{text-decoration-color:var(--primary-3000-frame-bg-dark)!important}.text-primary-3000-button-bg-dark{color:var(--primary-3000-button-bg-dark)!important}.bg-primary-3000-button-bg-dark{background-color:var(--primary-3000-button-bg-dark)!important}.border-primary-3000-button-bg-dark{border-color:var(--primary-3000-button-bg-dark)!important}.border-l-primary-3000-button-bg-dark{border-left-color:var(--primary-3000-button-bg-dark)!important}.border-r-primary-3000-button-bg-dark{border-right-color:var(--primary-3000-button-bg-dark)!important}.border-t-primary-3000-button-bg-dark{border-top-color:var(--primary-3000-button-bg-dark)!important}.border-b-primary-3000-button-bg-dark{border-bottom-color:var(--primary-3000-button-bg-dark)!important}.border-x-primary-3000-button-bg-dark{border-left-color:var(--primary-3000-button-bg-dark)!important;border-right-color:var(--primary-3000-button-bg-dark)!important}.border-y-primary-3000-button-bg-dark{border-bottom-color:var(--primary-3000-button-bg-dark)!important;border-top-color:var(--primary-3000-button-bg-dark)!important}.decoration-primary-3000-button-bg-dark{text-decoration-color:var(--primary-3000-button-bg-dark)!important}.text-primary-3000-button-border-dark{color:var(--primary-3000-button-border-dark)!important}.bg-primary-3000-button-border-dark{background-color:var(--primary-3000-button-border-dark)!important}.border-primary-3000-button-border-dark{border-color:var(--primary-3000-button-border-dark)!important}.border-l-primary-3000-button-border-dark{border-left-color:var(--primary-3000-button-border-dark)!important}.border-r-primary-3000-button-border-dark{border-right-color:var(--primary-3000-button-border-dark)!important}.border-t-primary-3000-button-border-dark{border-top-color:var(--primary-3000-button-border-dark)!important}.border-b-primary-3000-button-border-dark{border-bottom-color:var(--primary-3000-button-border-dark)!important}.border-x-primary-3000-button-border-dark{border-left-color:var(--primary-3000-button-border-dark)!important;border-right-color:var(--primary-3000-button-border-dark)!important}.border-y-primary-3000-button-border-dark{border-bottom-color:var(--primary-3000-button-border-dark)!important;border-top-color:var(--primary-3000-button-border-dark)!important}.decoration-primary-3000-button-border-dark{text-decoration-color:var(--primary-3000-button-border-dark)!important}.text-primary-3000-button-border-hover-dark{color:var(--primary-3000-button-border-hover-dark)!important}.bg-primary-3000-button-border-hover-dark{background-color:var(--primary-3000-button-border-hover-dark)!important}.border-primary-3000-button-border-hover-dark{border-color:var(--primary-3000-button-border-hover-dark)!important}.border-l-primary-3000-button-border-hover-dark{border-left-color:var(--primary-3000-button-border-hover-dark)!important}.border-r-primary-3000-button-border-hover-dark{border-right-color:var(--primary-3000-button-border-hover-dark)!important}.border-t-primary-3000-button-border-hover-dark{border-top-color:var(--primary-3000-button-border-hover-dark)!important}.border-b-primary-3000-button-border-hover-dark{border-bottom-color:var(--primary-3000-button-border-hover-dark)!important}.border-x-primary-3000-button-border-hover-dark{border-left-color:var(--primary-3000-button-border-hover-dark)!important;border-right-color:var(--primary-3000-button-border-hover-dark)!important}.border-y-primary-3000-button-border-hover-dark{border-bottom-color:var(--primary-3000-button-border-hover-dark)!important;border-top-color:var(--primary-3000-button-border-hover-dark)!important}.decoration-primary-3000-button-border-hover-dark{text-decoration-color:var(--primary-3000-button-border-hover-dark)!important}.text-primary-alt-highlight-dark{color:var(--primary-alt-highlight-dark)!important}.bg-primary-alt-highlight-dark{background-color:var(--primary-alt-highlight-dark)!important}.border-primary-alt-highlight-dark{border-color:var(--primary-alt-highlight-dark)!important}.border-l-primary-alt-highlight-dark{border-left-color:var(--primary-alt-highlight-dark)!important}.border-r-primary-alt-highlight-dark{border-right-color:var(--primary-alt-highlight-dark)!important}.border-t-primary-alt-highlight-dark{border-top-color:var(--primary-alt-highlight-dark)!important}.border-b-primary-alt-highlight-dark{border-bottom-color:var(--primary-alt-highlight-dark)!important}.border-x-primary-alt-highlight-dark{border-left-color:var(--primary-alt-highlight-dark)!important;border-right-color:var(--primary-alt-highlight-dark)!important}.border-y-primary-alt-highlight-dark{border-bottom-color:var(--primary-alt-highlight-dark)!important;border-top-color:var(--primary-alt-highlight-dark)!important}.decoration-primary-alt-highlight-dark{text-decoration-color:var(--primary-alt-highlight-dark)!important}.text-secondary-3000-frame-bg-dark{color:var(--secondary-3000-frame-bg-dark)!important}.bg-secondary-3000-frame-bg-dark{background-color:var(--secondary-3000-frame-bg-dark)!important}.border-secondary-3000-frame-bg-dark{border-color:var(--secondary-3000-frame-bg-dark)!important}.border-l-secondary-3000-frame-bg-dark{border-left-color:var(--secondary-3000-frame-bg-dark)!important}.border-r-secondary-3000-frame-bg-dark{border-right-color:var(--secondary-3000-frame-bg-dark)!important}.border-t-secondary-3000-frame-bg-dark{border-top-color:var(--secondary-3000-frame-bg-dark)!important}.border-b-secondary-3000-frame-bg-dark{border-bottom-color:var(--secondary-3000-frame-bg-dark)!important}.border-x-secondary-3000-frame-bg-dark{border-left-color:var(--secondary-3000-frame-bg-dark)!important;border-right-color:var(--secondary-3000-frame-bg-dark)!important}.border-y-secondary-3000-frame-bg-dark{border-bottom-color:var(--secondary-3000-frame-bg-dark)!important;border-top-color:var(--secondary-3000-frame-bg-dark)!important}.decoration-secondary-3000-frame-bg-dark{text-decoration-color:var(--secondary-3000-frame-bg-dark)!important}.text-secondary-3000-button-bg-dark{color:var(--secondary-3000-button-bg-dark)!important}.bg-secondary-3000-button-bg-dark{background-color:var(--secondary-3000-button-bg-dark)!important}.border-secondary-3000-button-bg-dark{border-color:var(--secondary-3000-button-bg-dark)!important}.border-l-secondary-3000-button-bg-dark{border-left-color:var(--secondary-3000-button-bg-dark)!important}.border-r-secondary-3000-button-bg-dark{border-right-color:var(--secondary-3000-button-bg-dark)!important}.border-t-secondary-3000-button-bg-dark{border-top-color:var(--secondary-3000-button-bg-dark)!important}.border-b-secondary-3000-button-bg-dark{border-bottom-color:var(--secondary-3000-button-bg-dark)!important}.border-x-secondary-3000-button-bg-dark{border-left-color:var(--secondary-3000-button-bg-dark)!important;border-right-color:var(--secondary-3000-button-bg-dark)!important}.border-y-secondary-3000-button-bg-dark{border-bottom-color:var(--secondary-3000-button-bg-dark)!important;border-top-color:var(--secondary-3000-button-bg-dark)!important}.decoration-secondary-3000-button-bg-dark{text-decoration-color:var(--secondary-3000-button-bg-dark)!important}.text-secondary-3000-button-border-dark{color:var(--secondary-3000-button-border-dark)!important}.bg-secondary-3000-button-border-dark{background-color:var(--secondary-3000-button-border-dark)!important}.border-secondary-3000-button-border-dark{border-color:var(--secondary-3000-button-border-dark)!important}.border-l-secondary-3000-button-border-dark{border-left-color:var(--secondary-3000-button-border-dark)!important}.border-r-secondary-3000-button-border-dark{border-right-color:var(--secondary-3000-button-border-dark)!important}.border-t-secondary-3000-button-border-dark{border-top-color:var(--secondary-3000-button-border-dark)!important}.border-b-secondary-3000-button-border-dark{border-bottom-color:var(--secondary-3000-button-border-dark)!important}.border-x-secondary-3000-button-border-dark{border-left-color:var(--secondary-3000-button-border-dark)!important;border-right-color:var(--secondary-3000-button-border-dark)!important}.border-y-secondary-3000-button-border-dark{border-bottom-color:var(--secondary-3000-button-border-dark)!important;border-top-color:var(--secondary-3000-button-border-dark)!important}.decoration-secondary-3000-button-border-dark{text-decoration-color:var(--secondary-3000-button-border-dark)!important}.text-secondary-3000-button-border-hover-dark{color:var(--secondary-3000-button-border-hover-dark)!important}.bg-secondary-3000-button-border-hover-dark{background-color:var(--secondary-3000-button-border-hover-dark)!important}.border-secondary-3000-button-border-hover-dark{border-color:var(--secondary-3000-button-border-hover-dark)!important}.border-l-secondary-3000-button-border-hover-dark{border-left-color:var(--secondary-3000-button-border-hover-dark)!important}.border-r-secondary-3000-button-border-hover-dark{border-right-color:var(--secondary-3000-button-border-hover-dark)!important}.border-t-secondary-3000-button-border-hover-dark{border-top-color:var(--secondary-3000-button-border-hover-dark)!important}.border-b-secondary-3000-button-border-hover-dark{border-bottom-color:var(--secondary-3000-button-border-hover-dark)!important}.border-x-secondary-3000-button-border-hover-dark{border-left-color:var(--secondary-3000-button-border-hover-dark)!important;border-right-color:var(--secondary-3000-button-border-hover-dark)!important}.border-y-secondary-3000-button-border-hover-dark{border-bottom-color:var(--secondary-3000-button-border-hover-dark)!important;border-top-color:var(--secondary-3000-button-border-hover-dark)!important}.decoration-secondary-3000-button-border-hover-dark{text-decoration-color:var(--secondary-3000-button-border-hover-dark)!important}.text-danger-3000-frame-bg-dark{color:var(--danger-3000-frame-bg-dark)!important}.bg-danger-3000-frame-bg-dark{background-color:var(--danger-3000-frame-bg-dark)!important}.border-danger-3000-frame-bg-dark{border-color:var(--danger-3000-frame-bg-dark)!important}.border-l-danger-3000-frame-bg-dark{border-left-color:var(--danger-3000-frame-bg-dark)!important}.border-r-danger-3000-frame-bg-dark{border-right-color:var(--danger-3000-frame-bg-dark)!important}.border-t-danger-3000-frame-bg-dark{border-top-color:var(--danger-3000-frame-bg-dark)!important}.border-b-danger-3000-frame-bg-dark{border-bottom-color:var(--danger-3000-frame-bg-dark)!important}.border-x-danger-3000-frame-bg-dark{border-left-color:var(--danger-3000-frame-bg-dark)!important;border-right-color:var(--danger-3000-frame-bg-dark)!important}.border-y-danger-3000-frame-bg-dark{border-bottom-color:var(--danger-3000-frame-bg-dark)!important;border-top-color:var(--danger-3000-frame-bg-dark)!important}.decoration-danger-3000-frame-bg-dark{text-decoration-color:var(--danger-3000-frame-bg-dark)!important}.text-danger-3000-button-border-dark{color:var(--danger-3000-button-border-dark)!important}.bg-danger-3000-button-border-dark{background-color:var(--danger-3000-button-border-dark)!important}.border-danger-3000-button-border-dark{border-color:var(--danger-3000-button-border-dark)!important}.border-l-danger-3000-button-border-dark{border-left-color:var(--danger-3000-button-border-dark)!important}.border-r-danger-3000-button-border-dark{border-right-color:var(--danger-3000-button-border-dark)!important}.border-t-danger-3000-button-border-dark{border-top-color:var(--danger-3000-button-border-dark)!important}.border-b-danger-3000-button-border-dark{border-bottom-color:var(--danger-3000-button-border-dark)!important}.border-x-danger-3000-button-border-dark{border-left-color:var(--danger-3000-button-border-dark)!important;border-right-color:var(--danger-3000-button-border-dark)!important}.border-y-danger-3000-button-border-dark{border-bottom-color:var(--danger-3000-button-border-dark)!important;border-top-color:var(--danger-3000-button-border-dark)!important}.decoration-danger-3000-button-border-dark{text-decoration-color:var(--danger-3000-button-border-dark)!important}.text-danger-3000-button-border-hover-dark{color:var(--danger-3000-button-border-hover-dark)!important}.bg-danger-3000-button-border-hover-dark{background-color:var(--danger-3000-button-border-hover-dark)!important}.border-danger-3000-button-border-hover-dark{border-color:var(--danger-3000-button-border-hover-dark)!important}.border-l-danger-3000-button-border-hover-dark{border-left-color:var(--danger-3000-button-border-hover-dark)!important}.border-r-danger-3000-button-border-hover-dark{border-right-color:var(--danger-3000-button-border-hover-dark)!important}.border-t-danger-3000-button-border-hover-dark{border-top-color:var(--danger-3000-button-border-hover-dark)!important}.border-b-danger-3000-button-border-hover-dark{border-bottom-color:var(--danger-3000-button-border-hover-dark)!important}.border-x-danger-3000-button-border-hover-dark{border-left-color:var(--danger-3000-button-border-hover-dark)!important;border-right-color:var(--danger-3000-button-border-hover-dark)!important}.border-y-danger-3000-button-border-hover-dark{border-bottom-color:var(--danger-3000-button-border-hover-dark)!important;border-top-color:var(--danger-3000-button-border-hover-dark)!important}.decoration-danger-3000-button-border-hover-dark{text-decoration-color:var(--danger-3000-button-border-hover-dark)!important}.text-default{color:var(--default)!important}.bg-default{background-color:var(--default)!important}.border-default{border-color:var(--default)!important}.border-l-default{border-left-color:var(--default)!important}.border-r-default{border-right-color:var(--default)!important}.border-t-default{border-top-color:var(--default)!important}.border-b-default{border-bottom-color:var(--default)!important}.border-x-default{border-left-color:var(--default)!important;border-right-color:var(--default)!important}.border-y-default{border-bottom-color:var(--default)!important;border-top-color:var(--default)!important}.decoration-default{text-decoration-color:var(--default)!important}.text-text-3000{color:var(--text-3000)!important}.bg-text-3000{background-color:var(--text-3000)!important}.border-text-3000{border-color:var(--text-3000)!important}.border-l-text-3000{border-left-color:var(--text-3000)!important}.border-r-text-3000{border-right-color:var(--text-3000)!important}.border-t-text-3000{border-top-color:var(--text-3000)!important}.border-b-text-3000{border-bottom-color:var(--text-3000)!important}.border-x-text-3000{border-left-color:var(--text-3000)!important;border-right-color:var(--text-3000)!important}.border-y-text-3000{border-bottom-color:var(--text-3000)!important;border-top-color:var(--text-3000)!important}.decoration-text-3000{text-decoration-color:var(--text-3000)!important}.text-text-secondary-3000{color:var(--text-secondary-3000)!important}.bg-text-secondary-3000{background-color:var(--text-secondary-3000)!important}.border-text-secondary-3000{border-color:var(--text-secondary-3000)!important}.border-l-text-secondary-3000{border-left-color:var(--text-secondary-3000)!important}.border-r-text-secondary-3000{border-right-color:var(--text-secondary-3000)!important}.border-t-text-secondary-3000{border-top-color:var(--text-secondary-3000)!important}.border-b-text-secondary-3000{border-bottom-color:var(--text-secondary-3000)!important}.border-x-text-secondary-3000{border-left-color:var(--text-secondary-3000)!important;border-right-color:var(--text-secondary-3000)!important}.border-y-text-secondary-3000{border-bottom-color:var(--text-secondary-3000)!important;border-top-color:var(--text-secondary-3000)!important}.decoration-text-secondary-3000{text-decoration-color:var(--text-secondary-3000)!important}.text-muted-3000{color:var(--muted-3000)!important}.bg-muted-3000{background-color:var(--muted-3000)!important}.border-muted-3000{border-color:var(--muted-3000)!important}.border-l-muted-3000{border-left-color:var(--muted-3000)!important}.border-r-muted-3000{border-right-color:var(--muted-3000)!important}.border-t-muted-3000{border-top-color:var(--muted-3000)!important}.border-b-muted-3000{border-bottom-color:var(--muted-3000)!important}.border-x-muted-3000{border-left-color:var(--muted-3000)!important;border-right-color:var(--muted-3000)!important}.border-y-muted-3000{border-bottom-color:var(--muted-3000)!important;border-top-color:var(--muted-3000)!important}.decoration-muted-3000{text-decoration-color:var(--muted-3000)!important}.text-primary-3000{color:var(--primary-3000)!important}.bg-primary-3000{background-color:var(--primary-3000)!important}.border-primary-3000{border-color:var(--primary-3000)!important}.border-l-primary-3000{border-left-color:var(--primary-3000)!important}.border-r-primary-3000{border-right-color:var(--primary-3000)!important}.border-t-primary-3000{border-top-color:var(--primary-3000)!important}.border-b-primary-3000{border-bottom-color:var(--primary-3000)!important}.border-x-primary-3000{border-left-color:var(--primary-3000)!important;border-right-color:var(--primary-3000)!important}.border-y-primary-3000{border-bottom-color:var(--primary-3000)!important;border-top-color:var(--primary-3000)!important}.decoration-primary-3000{text-decoration-color:var(--primary-3000)!important}.text-secondary-3000{color:var(--secondary-3000)!important}.bg-secondary-3000{background-color:var(--secondary-3000)!important}.border-secondary-3000{border-color:var(--secondary-3000)!important}.border-l-secondary-3000{border-left-color:var(--secondary-3000)!important}.border-r-secondary-3000{border-right-color:var(--secondary-3000)!important}.border-t-secondary-3000{border-top-color:var(--secondary-3000)!important}.border-b-secondary-3000{border-bottom-color:var(--secondary-3000)!important}.border-x-secondary-3000{border-left-color:var(--secondary-3000)!important;border-right-color:var(--secondary-3000)!important}.border-y-secondary-3000{border-bottom-color:var(--secondary-3000)!important;border-top-color:var(--secondary-3000)!important}.decoration-secondary-3000{text-decoration-color:var(--secondary-3000)!important}.text-secondary-3000-hover{color:var(--secondary-3000-hover)!important}.bg-secondary-3000-hover{background-color:var(--secondary-3000-hover)!important}.border-secondary-3000-hover{border-color:var(--secondary-3000-hover)!important}.border-l-secondary-3000-hover{border-left-color:var(--secondary-3000-hover)!important}.border-r-secondary-3000-hover{border-right-color:var(--secondary-3000-hover)!important}.border-t-secondary-3000-hover{border-top-color:var(--secondary-3000-hover)!important}.border-b-secondary-3000-hover{border-bottom-color:var(--secondary-3000-hover)!important}.border-x-secondary-3000-hover{border-left-color:var(--secondary-3000-hover)!important;border-right-color:var(--secondary-3000-hover)!important}.border-y-secondary-3000-hover{border-bottom-color:var(--secondary-3000-hover)!important;border-top-color:var(--secondary-3000-hover)!important}.decoration-secondary-3000-hover{text-decoration-color:var(--secondary-3000-hover)!important}.text-accent-3000{color:var(--accent-3000)!important}.bg-accent-3000{background-color:var(--accent-3000)!important}.border-accent-3000{border-color:var(--accent-3000)!important}.border-l-accent-3000{border-left-color:var(--accent-3000)!important}.border-r-accent-3000{border-right-color:var(--accent-3000)!important}.border-t-accent-3000{border-top-color:var(--accent-3000)!important}.border-b-accent-3000{border-bottom-color:var(--accent-3000)!important}.border-x-accent-3000{border-left-color:var(--accent-3000)!important;border-right-color:var(--accent-3000)!important}.border-y-accent-3000{border-bottom-color:var(--accent-3000)!important;border-top-color:var(--accent-3000)!important}.decoration-accent-3000{text-decoration-color:var(--accent-3000)!important}.text-bg-3000{color:var(--bg-3000)!important}.bg-bg-3000{background-color:var(--bg-3000)!important}.border-bg-3000{border-color:var(--bg-3000)!important}.border-l-bg-3000{border-left-color:var(--bg-3000)!important}.border-r-bg-3000{border-right-color:var(--bg-3000)!important}.border-t-bg-3000{border-top-color:var(--bg-3000)!important}.border-b-bg-3000{border-bottom-color:var(--bg-3000)!important}.border-x-bg-3000{border-left-color:var(--bg-3000)!important;border-right-color:var(--bg-3000)!important}.border-y-bg-3000{border-bottom-color:var(--bg-3000)!important;border-top-color:var(--bg-3000)!important}.decoration-bg-3000{text-decoration-color:var(--bg-3000)!important}.text-primary-highlight{color:var(--primary-highlight)!important}.bg-primary-highlight{background-color:var(--primary-highlight)!important}.border-primary-highlight{border-color:var(--primary-highlight)!important}.border-l-primary-highlight{border-left-color:var(--primary-highlight)!important}.border-r-primary-highlight{border-right-color:var(--primary-highlight)!important}.border-t-primary-highlight{border-top-color:var(--primary-highlight)!important}.border-b-primary-highlight{border-bottom-color:var(--primary-highlight)!important}.border-x-primary-highlight{border-left-color:var(--primary-highlight)!important;border-right-color:var(--primary-highlight)!important}.border-y-primary-highlight{border-bottom-color:var(--primary-highlight)!important;border-top-color:var(--primary-highlight)!important}.decoration-primary-highlight{text-decoration-color:var(--primary-highlight)!important}.text-primary-alt-highlight{color:var(--primary-alt-highlight)!important}.bg-primary-alt-highlight{background-color:var(--primary-alt-highlight)!important}.border-primary-alt-highlight{border-color:var(--primary-alt-highlight)!important}.border-l-primary-alt-highlight{border-left-color:var(--primary-alt-highlight)!important}.border-r-primary-alt-highlight{border-right-color:var(--primary-alt-highlight)!important}.border-t-primary-alt-highlight{border-top-color:var(--primary-alt-highlight)!important}.border-b-primary-alt-highlight{border-bottom-color:var(--primary-alt-highlight)!important}.border-x-primary-alt-highlight{border-left-color:var(--primary-alt-highlight)!important;border-right-color:var(--primary-alt-highlight)!important}.border-y-primary-alt-highlight{border-bottom-color:var(--primary-alt-highlight)!important;border-top-color:var(--primary-alt-highlight)!important}.decoration-primary-alt-highlight{text-decoration-color:var(--primary-alt-highlight)!important}.text-primary-alt{color:var(--primary-alt)!important}.bg-primary-alt{background-color:var(--primary-alt)!important}.border-primary-alt{border-color:var(--primary-alt)!important}.border-l-primary-alt{border-left-color:var(--primary-alt)!important}.border-r-primary-alt{border-right-color:var(--primary-alt)!important}.border-t-primary-alt{border-top-color:var(--primary-alt)!important}.border-b-primary-alt{border-bottom-color:var(--primary-alt)!important}.border-x-primary-alt{border-left-color:var(--primary-alt)!important;border-right-color:var(--primary-alt)!important}.border-y-primary-alt{border-bottom-color:var(--primary-alt)!important;border-top-color:var(--primary-alt)!important}.decoration-primary-alt{text-decoration-color:var(--primary-alt)!important}.hover\\:text-primary:hover{color:#1d4aff!important}.hover\\:bg-primary:hover{background-color:#1d4aff!important}.hover\\:border-primary:hover{border-color:#1d4aff!important}.hover\\:text-danger-highlight:hover{color:rgba(219,55,7,.1)!important}.hover\\:bg-danger-highlight:hover{background-color:rgba(219,55,7,.1)!important}.hover\\:border-danger-highlight:hover{border-color:rgba(219,55,7,.1)!important}.hover\\:text-danger-lighter:hover{color:#ffa599!important}.hover\\:bg-danger-lighter:hover{background-color:#ffa599!important}.hover\\:border-danger-lighter:hover{border-color:#ffa599!important}.hover\\:text-danger-light:hover{color:#df4b20!important}.hover\\:bg-danger-light:hover{background-color:#df4b20!important}.hover\\:border-danger-light:hover{border-color:#df4b20!important}.hover\\:text-danger:hover{color:#db3707!important}.hover\\:bg-danger:hover{background-color:#db3707!important}.hover\\:border-danger:hover{border-color:#db3707!important}.hover\\:text-danger-dark:hover{color:#992705!important}.hover\\:bg-danger-dark:hover{background-color:#992705!important}.hover\\:border-danger-dark:hover{border-color:#992705!important}.hover\\:text-warning-highlight:hover{color:rgba(247,165,1,.1)!important}.hover\\:bg-warning-highlight:hover{background-color:rgba(247,165,1,.1)!important}.hover\\:border-warning-highlight:hover{border-color:rgba(247,165,1,.1)!important}.hover\\:text-warning:hover{color:#f7a501!important}.hover\\:bg-warning:hover{background-color:#f7a501!important}.hover\\:border-warning:hover{border-color:#f7a501!important}.hover\\:text-warning-dark:hover{color:#e09423!important}.hover\\:bg-warning-dark:hover{background-color:#e09423!important}.hover\\:border-warning-dark:hover{border-color:#e09423!important}.hover\\:text-highlight:hover{color:#e49f2c!important}.hover\\:bg-highlight:hover{background-color:#e49f2c!important}.hover\\:border-highlight:hover{border-color:#e49f2c!important}.hover\\:text-success-highlight:hover{color:rgba(56,134,0,.1)!important}.hover\\:bg-success-highlight:hover{background-color:rgba(56,134,0,.1)!important}.hover\\:border-success-highlight:hover{border-color:rgba(56,134,0,.1)!important}.hover\\:text-success-light:hover{color:#5f9d32!important}.hover\\:bg-success-light:hover{background-color:#5f9d32!important}.hover\\:border-success-light:hover{border-color:#5f9d32!important}.hover\\:text-success:hover{color:#388600!important}.hover\\:bg-success:hover{background-color:#388600!important}.hover\\:border-success:hover{border-color:#388600!important}.hover\\:text-success-dark:hover{color:#245700!important}.hover\\:bg-success-dark:hover{background-color:#245700!important}.hover\\:border-success-dark:hover{border-color:#245700!important}.hover\\:text-muted:hover{color:#5f5f5f!important}.hover\\:bg-muted:hover{background-color:#5f5f5f!important}.hover\\:border-muted:hover{border-color:#5f5f5f!important}.hover\\:text-muted-alt:hover{color:#747ea1!important}.hover\\:bg-muted-alt:hover{background-color:#747ea1!important}.hover\\:border-muted-alt:hover{border-color:#747ea1!important}.hover\\:text-mark:hover{color:hsla(42,94%,86%,.8)!important}.hover\\:bg-mark:hover{background-color:hsla(42,94%,86%,.8)!important}.hover\\:border-mark:hover{border-color:hsla(42,94%,86%,.8)!important}.hover\\:text-white:hover{color:#fff!important}.hover\\:bg-white:hover{background-color:#fff!important}.hover\\:border-white:hover{border-color:#fff!important}.hover\\:text-bg-light:hover{color:#fff!important}.hover\\:bg-bg-light:hover{background-color:#fff!important}.hover\\:border-bg-light:hover{border-color:#fff!important}.hover\\:text-side:hover{color:#fafaf9!important}.hover\\:bg-side:hover{background-color:#fafaf9!important}.hover\\:border-side:hover{border-color:#fafaf9!important}.hover\\:text-mid:hover{color:#f2f2f2!important}.hover\\:bg-mid:hover{background-color:#f2f2f2!important}.hover\\:border-mid:hover{border-color:#f2f2f2!important}.hover\\:text-border:hover{color:rgba(0,0,0,.15)!important}.hover\\:bg-border:hover{background-color:rgba(0,0,0,.15)!important}.hover\\:border-border:hover{border-color:rgba(0,0,0,.15)!important}.hover\\:text-border-light:hover{color:rgba(0,0,0,.08)!important}.hover\\:bg-border-light:hover{background-color:rgba(0,0,0,.08)!important}.hover\\:border-border-light:hover{border-color:rgba(0,0,0,.08)!important}.hover\\:text-border-bold:hover{color:rgba(0,0,0,.24)!important}.hover\\:bg-border-bold:hover{background-color:rgba(0,0,0,.24)!important}.hover\\:border-border-bold:hover{border-color:rgba(0,0,0,.24)!important}.hover\\:text-transparent:hover{color:transparent!important}.hover\\:bg-transparent:hover{background-color:transparent!important}.hover\\:border-transparent:hover{border-color:transparent!important}.hover\\:text-link:hover{color:var(--primary-3000)!important}.hover\\:bg-link:hover{background-color:var(--primary-3000)!important}.hover\\:border-link:hover{border-color:var(--primary-3000)!important}.hover\\:text-brand-blue:hover{color:#1d4aff!important}.hover\\:bg-brand-blue:hover{background-color:#1d4aff!important}.hover\\:border-brand-blue:hover{border-color:#1d4aff!important}.hover\\:text-brand-red:hover{color:#f54e00!important}.hover\\:bg-brand-red:hover{background-color:#f54e00!important}.hover\\:border-brand-red:hover{border-color:#f54e00!important}.hover\\:text-brand-yellow:hover{color:#f9bd2b!important}.hover\\:bg-brand-yellow:hover{background-color:#f9bd2b!important}.hover\\:border-brand-yellow:hover{border-color:#f9bd2b!important}.hover\\:text-brand-key:hover{color:#000!important}.hover\\:bg-brand-key:hover{background-color:#000!important}.hover\\:border-brand-key:hover{border-color:#000!important}.hover\\:text-text-3000-light:hover{color:#111!important}.hover\\:bg-text-3000-light:hover{background-color:#111!important}.hover\\:border-text-3000-light:hover{border-color:#111!important}.hover\\:text-text-secondary-3000-light:hover{color:hsla(0,0%,7%,.7)!important}.hover\\:bg-text-secondary-3000-light:hover{background-color:hsla(0,0%,7%,.7)!important}.hover\\:border-text-secondary-3000-light:hover{border-color:hsla(0,0%,7%,.7)!important}.hover\\:text-muted-3000-light:hover{color:hsla(0,0%,7%,.6)!important}.hover\\:bg-muted-3000-light:hover{background-color:hsla(0,0%,7%,.6)!important}.hover\\:border-muted-3000-light:hover{border-color:hsla(0,0%,7%,.6)!important}.hover\\:text-trace-3000-light:hover{color:hsla(0,0%,7%,.25)!important}.hover\\:bg-trace-3000-light:hover{background-color:hsla(0,0%,7%,.25)!important}.hover\\:border-trace-3000-light:hover{border-color:hsla(0,0%,7%,.25)!important}.hover\\:text-primary-3000-light:hover{color:#f54e01!important}.hover\\:bg-primary-3000-light:hover{background-color:#f54e01!important}.hover\\:border-primary-3000-light:hover{border-color:#f54e01!important}.hover\\:text-primary-highlight-light:hover{color:rgba(245,78,1,.1)!important}.hover\\:bg-primary-highlight-light:hover{background-color:rgba(245,78,1,.1)!important}.hover\\:border-primary-highlight-light:hover{border-color:rgba(245,78,1,.1)!important}.hover\\:text-primary-3000-hover-light:hover{color:#f54e01!important}.hover\\:bg-primary-3000-hover-light:hover{background-color:#f54e01!important}.hover\\:border-primary-3000-hover-light:hover{border-color:#f54e01!important}.hover\\:text-primary-3000-active-light:hover{color:#f54e01!important}.hover\\:bg-primary-3000-active-light:hover{background-color:#f54e01!important}.hover\\:border-primary-3000-active-light:hover{border-color:#f54e01!important}.hover\\:text-secondary-3000-light:hover{color:hsla(68,14%,79%,.6)!important}.hover\\:bg-secondary-3000-light:hover{background-color:hsla(68,14%,79%,.6)!important}.hover\\:border-secondary-3000-light:hover{border-color:hsla(68,14%,79%,.6)!important}.hover\\:text-secondary-3000-hover-light:hover{color:#cfd1c2!important}.hover\\:bg-secondary-3000-hover-light:hover{background-color:#cfd1c2!important}.hover\\:border-secondary-3000-hover-light:hover{border-color:#cfd1c2!important}.hover\\:text-accent-3000-light:hover{color:#eeefe9!important}.hover\\:bg-accent-3000-light:hover{background-color:#eeefe9!important}.hover\\:border-accent-3000-light:hover{border-color:#eeefe9!important}.hover\\:text-bg-3000-light:hover{color:#f3f4ef!important}.hover\\:bg-bg-3000-light:hover{background-color:#f3f4ef!important}.hover\\:border-bg-3000-light:hover{border-color:#f3f4ef!important}.hover\\:text-border-3000-light:hover{color:#dadbd2!important}.hover\\:bg-border-3000-light:hover{background-color:#dadbd2!important}.hover\\:border-border-3000-light:hover{border-color:#dadbd2!important}.hover\\:text-border-bold-3000-light:hover{color:#c1c2b9!important}.hover\\:bg-border-bold-3000-light:hover{background-color:#c1c2b9!important}.hover\\:border-border-bold-3000-light:hover{border-color:#c1c2b9!important}.hover\\:text-glass-bg-3000-light:hover{color:hsla(69,12%,88%,.702)!important}.hover\\:bg-glass-bg-3000-light:hover{background-color:hsla(69,12%,88%,.702)!important}.hover\\:border-glass-bg-3000-light:hover{border-color:hsla(69,12%,88%,.702)!important}.hover\\:text-glass-border-3000-light:hover{color:#e4e5de!important}.hover\\:bg-glass-border-3000-light:hover{background-color:#e4e5de!important}.hover\\:border-glass-border-3000-light:hover{border-color:#e4e5de!important}.hover\\:text-link-3000-light:hover{color:#f54e00!important}.hover\\:bg-link-3000-light:hover{background-color:#f54e00!important}.hover\\:border-link-3000-light:hover{border-color:#f54e00!important}.hover\\:text-primary-3000-frame-bg-light:hover{color:#eb9d2a!important}.hover\\:bg-primary-3000-frame-bg-light:hover{background-color:#eb9d2a!important}.hover\\:border-primary-3000-frame-bg-light:hover{border-color:#eb9d2a!important}.hover\\:text-primary-3000-button-bg-light:hover{color:#fff!important}.hover\\:bg-primary-3000-button-bg-light:hover{background-color:#fff!important}.hover\\:border-primary-3000-button-bg-light:hover{border-color:#fff!important}.hover\\:text-primary-3000-button-border-light:hover{color:#b17816!important}.hover\\:bg-primary-3000-button-border-light:hover{background-color:#b17816!important}.hover\\:border-primary-3000-button-border-light:hover{border-color:#b17816!important}.hover\\:text-primary-3000-button-border-hover-light:hover{color:#8e5b03!important}.hover\\:bg-primary-3000-button-border-hover-light:hover{background-color:#8e5b03!important}.hover\\:border-primary-3000-button-border-hover-light:hover{border-color:#8e5b03!important}.hover\\:text-secondary-3000-frame-bg-light:hover{color:#e1dddd!important}.hover\\:bg-secondary-3000-frame-bg-light:hover{background-color:#e1dddd!important}.hover\\:border-secondary-3000-frame-bg-light:hover{border-color:#e1dddd!important}.hover\\:text-secondary-3000-button-bg-light:hover{color:#f3f4ef!important}.hover\\:bg-secondary-3000-button-bg-light:hover{background-color:#f3f4ef!important}.hover\\:border-secondary-3000-button-bg-light:hover{border-color:#f3f4ef!important}.hover\\:text-secondary-3000-button-border-light:hover{color:#ccc!important}.hover\\:bg-secondary-3000-button-border-light:hover{background-color:#ccc!important}.hover\\:border-secondary-3000-button-border-light:hover{border-color:#ccc!important}.hover\\:text-secondary-3000-button-border-hover-light:hover{color:#aaa!important}.hover\\:bg-secondary-3000-button-border-hover-light:hover{background-color:#aaa!important}.hover\\:border-secondary-3000-button-border-hover-light:hover{border-color:#aaa!important}.hover\\:text-danger-3000-frame-bg-light:hover{color:rgba(245,78,0,.502)!important}.hover\\:bg-danger-3000-frame-bg-light:hover{background-color:rgba(245,78,0,.502)!important}.hover\\:border-danger-3000-frame-bg-light:hover{border-color:rgba(245,78,0,.502)!important}.hover\\:text-danger-3000-button-border-light:hover{color:#e96b30!important}.hover\\:bg-danger-3000-button-border-light:hover{background-color:#e96b30!important}.hover\\:border-danger-3000-button-border-light:hover{border-color:#e96b30!important}.hover\\:text-danger-3000-button-border-hover-light:hover{color:#f54e00!important}.hover\\:bg-danger-3000-button-border-hover-light:hover{background-color:#f54e00!important}.hover\\:border-danger-3000-button-border-hover-light:hover{border-color:#f54e00!important}.hover\\:text-shadow-elevation-3000-light:hover{color:0 3px 0 var(--border-3000-light)!important}.hover\\:bg-shadow-elevation-3000-light:hover{background-color:0 3px 0 var(--border-3000-light)!important}.hover\\:border-shadow-elevation-3000-light:hover{border-color:0 3px 0 var(--border-3000-light)!important}.hover\\:text-shadow-elevation-3000-dark:hover{color:0 3px 0 var(--border-3000-dark)!important}.hover\\:bg-shadow-elevation-3000-dark:hover{background-color:0 3px 0 var(--border-3000-dark)!important}.hover\\:border-shadow-elevation-3000-dark:hover{border-color:0 3px 0 var(--border-3000-dark)!important}.hover\\:text-text-3000-dark:hover{color:#fff!important}.hover\\:bg-text-3000-dark:hover{background-color:#fff!important}.hover\\:border-text-3000-dark:hover{border-color:#fff!important}.hover\\:text-text-secondary-3000-dark:hover{color:hsla(0,0%,100%,.7)!important}.hover\\:bg-text-secondary-3000-dark:hover{background-color:hsla(0,0%,100%,.7)!important}.hover\\:border-text-secondary-3000-dark:hover{border-color:hsla(0,0%,100%,.7)!important}.hover\\:text-muted-3000-dark:hover{color:hsla(0,0%,100%,.5)!important}.hover\\:bg-muted-3000-dark:hover{background-color:hsla(0,0%,100%,.5)!important}.hover\\:border-muted-3000-dark:hover{border-color:hsla(0,0%,100%,.5)!important}.hover\\:text-trace-3000-dark:hover{color:hsla(0,0%,100%,.25)!important}.hover\\:bg-trace-3000-dark:hover{background-color:hsla(0,0%,100%,.25)!important}.hover\\:border-trace-3000-dark:hover{border-color:hsla(0,0%,100%,.25)!important}.hover\\:text-primary-3000-dark:hover{color:#f7a503!important}.hover\\:bg-primary-3000-dark:hover{background-color:#f7a503!important}.hover\\:border-primary-3000-dark:hover{border-color:#f7a503!important}.hover\\:text-primary-highlight-dark:hover{color:rgba(247,165,3,.1)!important}.hover\\:bg-primary-highlight-dark:hover{background-color:rgba(247,165,3,.1)!important}.hover\\:border-primary-highlight-dark:hover{border-color:rgba(247,165,3,.1)!important}.hover\\:text-primary-3000-hover-dark:hover{color:#f7a503!important}.hover\\:bg-primary-3000-hover-dark:hover{background-color:#f7a503!important}.hover\\:border-primary-3000-hover-dark:hover{border-color:#f7a503!important}.hover\\:text-primary-3000-active-dark:hover{color:#f7a503!important}.hover\\:bg-primary-3000-active-dark:hover{background-color:#f7a503!important}.hover\\:border-primary-3000-active-dark:hover{border-color:#f7a503!important}.hover\\:text-primary-alt-highlight-light:hover{color:#e5e7e0!important}.hover\\:bg-primary-alt-highlight-light:hover{background-color:#e5e7e0!important}.hover\\:border-primary-alt-highlight-light:hover{border-color:#e5e7e0!important}.hover\\:text-secondary-3000-dark:hover{color:#1d1f27!important}.hover\\:bg-secondary-3000-dark:hover{background-color:#1d1f27!important}.hover\\:border-secondary-3000-dark:hover{border-color:#1d1f27!important}.hover\\:text-secondary-3000-hover-dark:hover{color:#575d77!important}.hover\\:bg-secondary-3000-hover-dark:hover{background-color:#575d77!important}.hover\\:border-secondary-3000-hover-dark:hover{border-color:#575d77!important}.hover\\:text-accent-3000-dark:hover{color:#21242b!important}.hover\\:bg-accent-3000-dark:hover{background-color:#21242b!important}.hover\\:border-accent-3000-dark:hover{border-color:#21242b!important}.hover\\:text-bg-3000-dark:hover{color:#1d1f27!important}.hover\\:bg-bg-3000-dark:hover{background-color:#1d1f27!important}.hover\\:border-bg-3000-dark:hover{border-color:#1d1f27!important}.hover\\:text-border-3000-dark:hover{color:#35373e!important}.hover\\:bg-border-3000-dark:hover{background-color:#35373e!important}.hover\\:border-border-3000-dark:hover{border-color:#35373e!important}.hover\\:text-border-bold-3000-dark:hover{color:#3f4046!important}.hover\\:bg-border-bold-3000-dark:hover{background-color:#3f4046!important}.hover\\:border-border-bold-3000-dark:hover{border-color:#3f4046!important}.hover\\:text-glass-bg-3000-dark:hover{color:rgba(36,38,42,.6)!important}.hover\\:bg-glass-bg-3000-dark:hover{background-color:rgba(36,38,42,.6)!important}.hover\\:border-glass-bg-3000-dark:hover{border-color:rgba(36,38,42,.6)!important}.hover\\:text-glass-border-3000-dark:hover{color:var(--border-3000-dark)!important}.hover\\:bg-glass-border-3000-dark:hover{background-color:var(--border-3000-dark)!important}.hover\\:border-glass-border-3000-dark:hover{border-color:var(--border-3000-dark)!important}.hover\\:text-link-3000-dark:hover{color:#f1a82c!important}.hover\\:bg-link-3000-dark:hover{background-color:#f1a82c!important}.hover\\:border-link-3000-dark:hover{border-color:#f1a82c!important}.hover\\:text-primary-3000-frame-bg-dark:hover{color:#926826!important}.hover\\:bg-primary-3000-frame-bg-dark:hover{background-color:#926826!important}.hover\\:border-primary-3000-frame-bg-dark:hover{border-color:#926826!important}.hover\\:text-primary-3000-button-bg-dark:hover{color:#e0a045!important}.hover\\:bg-primary-3000-button-bg-dark:hover{background-color:#e0a045!important}.hover\\:border-primary-3000-button-bg-dark:hover{border-color:#e0a045!important}.hover\\:text-primary-3000-button-border-dark:hover{color:#b17816!important}.hover\\:bg-primary-3000-button-border-dark:hover{background-color:#b17816!important}.hover\\:border-primary-3000-button-border-dark:hover{border-color:#b17816!important}.hover\\:text-primary-3000-button-border-hover-dark:hover{color:#8e5b03!important}.hover\\:bg-primary-3000-button-border-hover-dark:hover{background-color:#8e5b03!important}.hover\\:border-primary-3000-button-border-hover-dark:hover{border-color:#8e5b03!important}.hover\\:text-primary-alt-highlight-dark:hover{color:#232429!important}.hover\\:bg-primary-alt-highlight-dark:hover{background-color:#232429!important}.hover\\:border-primary-alt-highlight-dark:hover{border-color:#232429!important}.hover\\:text-secondary-3000-frame-bg-dark:hover{color:#323232!important}.hover\\:bg-secondary-3000-frame-bg-dark:hover{background-color:#323232!important}.hover\\:border-secondary-3000-frame-bg-dark:hover{border-color:#323232!important}.hover\\:text-secondary-3000-button-bg-dark:hover{color:#1d1f27!important}.hover\\:bg-secondary-3000-button-bg-dark:hover{background-color:#1d1f27!important}.hover\\:border-secondary-3000-button-bg-dark:hover{border-color:#1d1f27!important}.hover\\:text-secondary-3000-button-border-dark:hover{color:#4a4c52!important}.hover\\:bg-secondary-3000-button-border-dark:hover{background-color:#4a4c52!important}.hover\\:border-secondary-3000-button-border-dark:hover{border-color:#4a4c52!important}.hover\\:text-secondary-3000-button-border-hover-dark:hover{color:#5e6064!important}.hover\\:bg-secondary-3000-button-border-hover-dark:hover{background-color:#5e6064!important}.hover\\:border-secondary-3000-button-border-hover-dark:hover{border-color:#5e6064!important}.hover\\:text-danger-3000-frame-bg-dark:hover{color:rgba(245,78,0,.502)!important}.hover\\:bg-danger-3000-frame-bg-dark:hover{background-color:rgba(245,78,0,.502)!important}.hover\\:border-danger-3000-frame-bg-dark:hover{border-color:rgba(245,78,0,.502)!important}.hover\\:text-danger-3000-button-border-dark:hover{color:#c44003!important}.hover\\:bg-danger-3000-button-border-dark:hover{background-color:#c44003!important}.hover\\:border-danger-3000-button-border-dark:hover{border-color:#c44003!important}.hover\\:text-danger-3000-button-border-hover-dark:hover{color:#f54e00!important}.hover\\:bg-danger-3000-button-border-hover-dark:hover{background-color:#f54e00!important}.hover\\:border-danger-3000-button-border-hover-dark:hover{border-color:#f54e00!important}.hover\\:text-default:hover{color:var(--default)!important}.hover\\:bg-default:hover{background-color:var(--default)!important}.hover\\:border-default:hover{border-color:var(--default)!important}.hover\\:text-text-3000:hover{color:var(--text-3000)!important}.hover\\:bg-text-3000:hover{background-color:var(--text-3000)!important}.hover\\:border-text-3000:hover{border-color:var(--text-3000)!important}.hover\\:text-text-secondary-3000:hover{color:var(--text-secondary-3000)!important}.hover\\:bg-text-secondary-3000:hover{background-color:var(--text-secondary-3000)!important}.hover\\:border-text-secondary-3000:hover{border-color:var(--text-secondary-3000)!important}.hover\\:text-muted-3000:hover{color:var(--muted-3000)!important}.hover\\:bg-muted-3000:hover{background-color:var(--muted-3000)!important}.hover\\:border-muted-3000:hover{border-color:var(--muted-3000)!important}.hover\\:text-primary-3000:hover{color:var(--primary-3000)!important}.hover\\:bg-primary-3000:hover{background-color:var(--primary-3000)!important}.hover\\:border-primary-3000:hover{border-color:var(--primary-3000)!important}.hover\\:text-secondary-3000:hover{color:var(--secondary-3000)!important}.hover\\:bg-secondary-3000:hover{background-color:var(--secondary-3000)!important}.hover\\:border-secondary-3000:hover{border-color:var(--secondary-3000)!important}.hover\\:text-secondary-3000-hover:hover{color:var(--secondary-3000-hover)!important}.hover\\:bg-secondary-3000-hover:hover{background-color:var(--secondary-3000-hover)!important}.hover\\:border-secondary-3000-hover:hover{border-color:var(--secondary-3000-hover)!important}.hover\\:text-accent-3000:hover{color:var(--accent-3000)!important}.hover\\:bg-accent-3000:hover{background-color:var(--accent-3000)!important}.hover\\:border-accent-3000:hover{border-color:var(--accent-3000)!important}.hover\\:text-bg-3000:hover{color:var(--bg-3000)!important}.hover\\:bg-bg-3000:hover{background-color:var(--bg-3000)!important}.hover\\:border-bg-3000:hover{border-color:var(--bg-3000)!important}.hover\\:text-primary-highlight:hover{color:var(--primary-highlight)!important}.hover\\:bg-primary-highlight:hover{background-color:var(--primary-highlight)!important}.hover\\:border-primary-highlight:hover{border-color:var(--primary-highlight)!important}.hover\\:text-primary-alt-highlight:hover{color:var(--primary-alt-highlight)!important}.hover\\:bg-primary-alt-highlight:hover{background-color:var(--primary-alt-highlight)!important}.hover\\:border-primary-alt-highlight:hover{border-color:var(--primary-alt-highlight)!important}.hover\\:text-primary-alt:hover{color:var(--primary-alt)!important}.hover\\:bg-primary-alt:hover{background-color:var(--primary-alt)!important}.hover\\:border-primary-alt:hover{border-color:var(--primary-alt)!important}.placeholder\\:\\*\\:\\*\\:text-default>*>::-moz-placeholder{color:var(--default)}.placeholder\\:\\*\\:\\*\\:text-default>*>::placeholder{color:var(--default)}.subtitle{align-items:center;display:flex;font-size:22px;font-weight:700;line-height:26px;margin-top:12px}.subtitle.highlighted{padding:1rem 1rem 1rem .5rem}.l3{font-size:16px;font-weight:600;line-height:19px}.l4{font-size:14px;font-weight:700}.col{max-width:100%;min-height:1px;position:relative}.highlighted{animation:highlight 2s ease-out;border-radius:var(--radius);scroll-margin-top:var(--breadcrumbs-height-full)}:root{--neutral-50:#fafafa;--neutral-100:#f5f5f5;--neutral-150:#ebebeb;--neutral-200:#e0e0e0;--neutral-250:#d6d6d6;--neutral-300:#ccc;--neutral-350:#bfbfbf;--neutral-400:#b3b3b3;--neutral-450:#a6a6a6;--neutral-550:#8c8c8c;--neutral-700:#666;--neutral-800:#4d4d4d;--neutral-900:#333;--neutral-950:#262626;--neutral-warm-50:#f3f4f0;--neutral-warm-100:#e8eae0;--neutral-warm-150:#dde0d2;--neutral-warm-200:#d2d6c2;--neutral-warm-250:#c6cbb3;--neutral-warm-300:#bbc1a3;--neutral-warm-350:#b0b795;--neutral-warm-400:#a5ac86;--neutral-warm-450:#99a276;--neutral-warm-500:#8e9867;--neutral-warm-550:#80895d;--neutral-warm-600:#727953;--neutral-warm-650:#636a48;--neutral-warm-700:#565c3e;--neutral-warm-750:#474c34;--neutral-warm-800:#393d29;--neutral-warm-850:#2a2d1f;--neutral-warm-900:#1d1f15;--neutral-warm-950:#0e0f0b;--neutral-cool-50:#f1f2f3;--neutral-cool-100:#e3e5e8;--neutral-cool-150:#d6d8dc;--neutral-cool-200:#c8cbd0;--neutral-cool-250:#babec4;--neutral-cool-300:#adb2b9;--neutral-cool-350:#9fa5ad;--neutral-cool-400:#9197a1;--neutral-cool-450:#838a95;--neutral-cool-500:#767e8a;--neutral-cool-550:#6a717c;--neutral-cool-600:#5e646e;--neutral-cool-650:#525860;--neutral-cool-700:#474c53;--neutral-cool-750:#3b3f45;--neutral-cool-800:#2f3237;--neutral-cool-850:#232529;--neutral-cool-900:#1b1c18;--neutral-cool-950:#0e0e0c;--orange-850:#4c3201;--content-warning:var(--orange-400);--content-danger-bold-disabled:var(--red-800);--content-success-bold-disabled:var(--green-700);--background-secondary:var(--neutral-warm-50);--background-tertiary:var(--neutral-warm-100);--background-hover:var(--neutral-warm-50);--background-pressed:var(--neutral-warm-100);--background-disabled:var(--neutral-warm-50);--background-inverse:var(--neutral-warm-900);--border-primary:var(--neutral-warm-600);--border-secondary:var(--neutral-warm-400);--border-tertiary:var(--neutral-warm-200);--border-disabled:var(--neutral-warm-200);--blue-100:#d2dcfd;--blue-200:#a5b9fb;--blue-300:#7995fa;--blue-400:#4c72f8;--blue-500:#1f4ff6;--blue-600:#193fc5;--blue-700:#132f94;--blue-800:#0c2062;--blue-900:#061031;--brand-100:#fddccc;--brand-200:#fbb899;--brand-300:#f99567;--brand-400:#f77134;--brand-500:#f54e01;--brand-600:#c43e01;--brand-700:#932f01;--brand-800:#621f00;--brand-900:#311000;--green-50:#ebf3e5;--green-100:#d7e7cc;--green-200:#afcf99;--green-300:#88b666;--green-400:#609e33;--green-500:#388600;--green-600:#2d6b00;--green-700:#225000;--green-800:#163600;--green-900:#0b1b00;--neutral-100:#e5e5e5;--neutral-150:#d9d9d9;--neutral-200:#ccc;--neutral-250:#bfbfbf;--neutral-300:#b2b2b2;--neutral-350:#a6a6a6;--neutral-400:#999;--neutral-450:#8c8c8c;--neutral-50:#f2f2f2;--neutral-500:grey;--neutral-550:#737373;--neutral-600:#666;--neutral-650:#595959;--neutral-700:#4d4d4d;--neutral-750:#404040;--neutral-800:#333;--neutral-850:#262626;--neutral-900:#1a1a1a;--neutral-950:#0d0d0d;--orange-50:#fff3e5;--orange-100:#ffe6cc;--orange-200:#fc9;--orange-300:#ffb366;--orange-400:#f93;--orange-500:#ff8000;--orange-600:#c60;--orange-700:#994d00;--orange-800:#630;--orange-900:#331a00;--pink-100:#ffedeb;--pink-200:#ffdbd6;--pink-300:#ffc9c2;--pink-400:#ffb7ad;--pink-500:#ffa599;--pink-600:#cc847a;--pink-700:#99635c;--pink-800:#66423d;--pink-900:#33211f;--primary-black:#000;--primary-black-50:#00000080;--primary-white:#fff;--primary-white-50:#ffffff80;--purple-100:#e0ceff;--purple-200:#c29cff;--purple-300:#a36bff;--purple-400:#8539ff;--purple-500:#6608ff;--purple-600:#5206cc;--purple-700:#3d0599;--purple-800:#290366;--purple-900:#140233;--red-50:#f9ebe6;--red-100:#f8d7cd;--red-200:#f1af9c;--red-300:#e9876a;--red-400:#e25f39;--red-500:#db3707;--red-600:#af2c06;--red-700:#832104;--red-800:#581603;--red-900:#2c0b01;--teal-100:#d9f5f3;--teal-200:#b3eae7;--teal-300:#8de0dc;--teal-400:#67d5d0;--teal-500:#41cbc4;--teal-600:#34a29d;--teal-700:#277a76;--teal-800:#1a514e;--teal-900:#0d2927;--violet-100:#f1d6ff;--violet-200:#e4adff;--violet-300:#d685ff;--violet-400:#c95cff;--violet-500:#b3f;--violet-600:#9629cc;--violet-700:#701f99;--violet-800:#4b1466;--violet-900:#250a33;--yellow-100:#fdedcd;--yellow-200:#fcdb9a;--yellow-300:#fac968;--yellow-400:#f9b735;--yellow-500:#f7a503;--yellow-600:#c68402;--yellow-700:#946302;--yellow-800:#634201;--yellow-900:#312101;--content-primary:var(--neutral-950);--content-secondary:var(--neutral-800);--content-tertiary:var(--neutral-700);--content-primary-inverse:var(--primary-white);--content-secondary-inverse:var(--neutral-100);--content-tertiary-inverse:var(--neutral-300);--content-disabled:var(--neutral-300);--content-brand:var(--brand-500);--content-link:var(--brand-500);--content-link-hover:var(--brand-400);--content-link-pressed:var(--brand-600);--content-warning-bold:var(--orange-700);--content-danger:var(--red-500);--content-danger-bold:var(--red-600);--content-success:var(--green-500);--content-success-bold:var(--green-600);--background-primary:var(--primary-white);--background-secondary:var(--neutral-50);--background-tertiary:var(--neutral-100);--background-hover:var(--neutral-50);--background-pressed:var(--neutral-100);--background-selected:var(--orange-100);--background-disabled:var(--neutral-50);--background-inverse:var(--neutral-900);--background-brand:var(--brand-500);--background-brand-hover:var(--brand-600);--background-brand-pressed:var(--brand-700);--background-warning:var(--orange-500);--background-warning-subtle:var(--orange-50);--background-danger:var(--red-500);--background-danger-subtle:var(--red-50);--background-success:var(--green-500);--background-success-subtle:var(--green-50);--border-primary:var(--neutral-600);--border-secondary:var(--neutral-400);--border-tertiary:var(--neutral-200);--border-disabled:var(--neutral-200);--border-brand:var(--brand-500);--border-inverse:var(--primary-white);--border-focus:var(--blue-500);--border-warning:var(--orange-500);--border-danger:var(--red-500);--border-success:var(--green-500);--overlay-50:var(--primary-black-50);--overlay-50-inverse:var(--primary-white-50);--bg-bridge:#ebece8;--radius:0.375rem;--radius-sm:0.25rem;--radius-lg:0.625rem;--modal-shadow-elevation:0px 16px 16px -16px rgba(0,0,0,.35);--opacity-disabled:0.65;--font-medium:500;--font-semibold:600;--font-sans:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto","Helvetica Neue",helvetica,arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--font-title:"MatterSQ",-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto","Helvetica Neue",helvetica,arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--font-mono:ui-monospace,"SFMono-Regular","SF Mono","Menlo","Consolas","Liberation Mono",monospace;--blue:#597dce;--purple:#c278cf;--green:var(--success);--black:var(--text-3000);--data-color-1:#1d4aff;--data-color-2:#621da6;--data-color-3:#42827e;--data-color-4:#ce0e74;--data-color-5:#f14f58;--data-color-6:#7c440e;--data-color-7:#529a0a;--data-color-8:#0476fb;--data-color-9:#fe729e;--data-color-10:#35416b;--data-color-11:#41cbc4;--data-color-12:#b64b02;--data-color-13:#e4a604;--data-color-14:#a56eff;--data-color-15:#30d5c8;--lifecycle-new:#1d4aff;--lifecycle-returning:#388600;--lifecycle-resurrecting:#a56eff;--lifecycle-dormant:#db3707;--lifecycle-new-hover:#0024b6;--lifecycle-returning-hover:#0d2000;--lifecycle-resurrecting-hover:#6608ff;--lifecycle-dormant-hover:#781e04;--funnel-axis:var(--border);--funnel-grid:#ddd;--z-bottom-notice:5100;--z-command-palette:1875;--z-force-modal-above-popovers:1850;--z-tooltip:1070;--z-definition-popover:1065;--z-popover:1064;--z-graph-tooltip:1063;--z-modal:1060;--z-hedgehog-buddy:1059;--z-annotation-popover:1049;--z-drawer:950;--z-notifications-popover:949;--z-main-nav:948;--z-lemon-sidebar:940;--z-lemon-activation-sidebar:939;--z-mobile-nav-overlay:931;--z-top-navigation:800;--z-content-overlay:488;--z-raised:5;--toastify-color-dark:var(--accent-3000-dark);--toastify-color-light:var(--bg-light);--toastify-color-info:var(--primary);--toastify-color-success:var(--success);--toastify-color-warning:var(--warning);--toastify-color-error:var(--danger);--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-toast-background:var(--bg-light);--toastify-toast-width:26rem;--toastify-toast-min-height:3.5rem;--toastify-toast-max-height:16rem;--toastify-text-color-light:#757575;--in-app-prompts-width:26rem;--lettermark-1-bg:#dcb1e3;--lettermark-1-text:#572e5e;--lettermark-2-bg:#ffc4b2;--lettermark-2-text:#3e5891;--lettermark-3-bg:#fdedc9;--lettermark-3-text:#3e5891;--lettermark-4-bg:#3e5891;--lettermark-4-text:#ffc4b2;--lettermark-5-bg:#8da9e7;--lettermark-5-text:#572e5e;--lettermark-6-bg:#572e5e;--lettermark-6-text:#dcb1e3;--lettermark-7-bg:#ffc035;--lettermark-7-text:#35416b;--lettermark-8-bg:#ff906e;--lettermark-8-text:#2a3d65;--modal-backdrop-blur:5px;--modal-backdrop-color:rgba(0,0,0,.2);--modal-transition-time:200ms;--tooltip-bg-light:#2d2d2d;--tooltip-bg-dark:#656d81;--notebook-popover-transition-properties:150ms cubic-bezier(0,0.5,0.5,1);--notebook-column-left-width:27rem;--notebook-column-right-width:20rem;--primary:#1d4aff;--danger-highlight:rgba(219,55,7,.1);--danger-lighter:#ffa599;--danger-light:#df4b20;--danger:#db3707;--danger-dark:#992705;--warning-highlight:rgba(247,165,1,.1);--warning:#f7a501;--warning-dark:#e09423;--highlight:#e49f2c;--success-highlight:rgba(56,134,0,.1);--success-light:#5f9d32;--success:#388600;--success-dark:#245700;--muted:#5f5f5f;--muted-alt:#747ea1;--mark:hsla(42,93%,86%,.8);--white:#fff;--bg-light:#fff;--side:#fafaf9;--mid:#f2f2f2;--border:rgba(0,0,0,.15);--border-light:rgba(0,0,0,.08);--border-bold:rgba(0,0,0,.24);--transparent:transparent;--link:var(--primary-3000);--brand-blue:#1d4aff;--brand-red:#f54e00;--brand-yellow:#f9bd2b;--brand-key:#000;--text-3000-light:#111;--text-secondary-3000-light:hsla(0,0%,7%,.7);--muted-3000-light:hsla(0,0%,7%,.6);--trace-3000-light:hsla(0,0%,7%,.25);--primary-3000-light:#f54e01;--primary-highlight-light:rgba(245,78,1,.1);--primary-3000-hover-light:#f54e01;--primary-3000-active-light:#f54e01;--secondary-3000-light:hsla(68,14%,79%,.6);--secondary-3000-hover-light:#cfd1c2;--accent-3000-light:#eeefe9;--bg-3000-light:#f3f4ef;--border-3000-light:#dadbd2;--border-bold-3000-light:#c1c2b9;--glass-bg-3000-light:hsla(69,12%,88%,.702);--glass-border-3000-light:#e4e5de;--link-3000-light:#f54e00;--primary-3000-frame-bg-light:#eb9d2a;--primary-3000-button-bg-light:#fff;--primary-3000-button-border-light:#b17816;--primary-3000-button-border-hover-light:#8e5b03;--secondary-3000-frame-bg-light:#e1dddd;--secondary-3000-button-bg-light:#f3f4ef;--secondary-3000-button-border-light:#ccc;--secondary-3000-button-border-hover-light:#aaa;--danger-3000-frame-bg-light:rgba(245,78,0,.502);--danger-3000-button-border-light:#e96b30;--danger-3000-button-border-hover-light:#f54e00;--shadow-elevation-3000-light:0 3px 0 var(--border-3000-light);--shadow-elevation-3000-dark:0 3px 0 var(--border-3000-dark);--text-3000-dark:#fff;--text-secondary-3000-dark:hsla(0,0%,100%,.7);--muted-3000-dark:hsla(0,0%,100%,.5);--trace-3000-dark:hsla(0,0%,100%,.25);--primary-3000-dark:#f7a503;--primary-highlight-dark:rgba(247,165,3,.1);--primary-3000-hover-dark:#f7a503;--primary-3000-active-dark:#f7a503;--primary-alt-highlight-light:#e5e7e0;--secondary-3000-dark:#1d1f27;--secondary-3000-hover-dark:#575d77;--accent-3000-dark:#21242b;--bg-3000-dark:#1d1f27;--border-3000-dark:#35373e;--border-bold-3000-dark:#3f4046;--glass-bg-3000-dark:rgba(36,38,42,.6);--glass-border-3000-dark:var(--border-3000-dark);--link-3000-dark:#f1a82c;--primary-3000-frame-bg-dark:#926826;--primary-3000-button-bg-dark:#e0a045;--primary-3000-button-border-dark:#b17816;--primary-3000-button-border-hover-dark:#8e5b03;--primary-alt-highlight-dark:#232429;--secondary-3000-frame-bg-dark:#323232;--secondary-3000-button-bg-dark:#1d1f27;--secondary-3000-button-border-dark:#4a4c52;--secondary-3000-button-border-hover-dark:#5e6064;--danger-3000-frame-bg-dark:rgba(245,78,0,.502);--danger-3000-button-border-dark:#c44003;--danger-3000-button-border-hover-dark:#f54e00;--default:var(--default);--text-3000:var(--text-3000);--text-secondary-3000:var(--text-secondary-3000);--muted-3000:var(--muted-3000);--primary-3000:var(--primary-3000);--secondary-3000:var(--secondary-3000);--secondary-3000-hover:var(--secondary-3000-hover);--accent-3000:var(--accent-3000);--bg-3000:var(--bg-3000);--primary-highlight:var(--primary-highlight);--primary-alt-highlight:var(--primary-alt-highlight);--primary-alt:var(--primary-alt)}*,:after,:before{border-color:var(--border)}input[type=radio]{accent-color:var(--primary-3000)}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.page-title-row{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin:1rem 0 .25rem;min-height:2.5rem}@media screen and (min-width:768px){.page-title-row{flex-wrap:nowrap}}.page-title{font-size:28px;font-weight:600;line-height:34px;margin:0;min-width:0}.page-caption{font-size:.875rem;line-height:1.25rem;margin-bottom:1rem;max-width:48rem}.page-caption.tabbed{margin-bottom:.5rem}.secondary{background:none;border:0;color:var(--primary-alt);font-size:.9em;font-weight:var(--font-medium);letter-spacing:1px;text-transform:uppercase}.card-secondary{color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.5px;text-transform:uppercase}mark{background-color:var(--mark)!important;border-radius:var(--radius)}hr{border-top:1px solid var(--border);margin:1em 0}input::-ms-clear{display:none}@keyframes highlight{0%{background-color:var(--mark)}to{background-color:initial}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.Toastify__toast{align-items:center;border:1px solid var(--secondary-3000-button-border);border-radius:var(--radius);box-shadow:var(--shadow-elevation-3000);cursor:unset;font-family:var(--font-sans);font-size:1rem;margin-bottom:.5rem;opacity:1!important;padding:.75rem}.Toastify__toast-container{padding:0}.Toastify__toast-body{color:var(--text-3000);font-size:.875rem;font-weight:500;line-height:1.25rem;padding:0}.Toastify__toast-body b,.Toastify__toast-body strong{font-weight:700}.Toastify__toast-body button{margin:0 .75rem}.Toastify__toast-icon{color:var(--muted-alt);font-size:1.5rem;height:1.5rem;margin-right:.75rem;width:1.5rem}.Toastify__toast--success .Toastify__toast-icon{color:var(--toastify-color-success)}.Toastify__toast--warning .Toastify__toast-icon{color:var(--toastify-color-warning)}.Toastify__toast--error .Toastify__toast-icon{color:var(--toastify-color-error)}.Toastify__progress-bar{height:var(--radius)}.error-on-blur.errored:not(:focus){border-color:var(--danger)!important}.info-indicator{color:var(--primary-alt)!important;cursor:pointer;margin-left:4px}.info-indicator.left{margin-left:0;margin-right:4px}.graph-series-glyph{align-items:center;border:2px solid var(--text-3000);border-radius:50%;display:flex;flex-shrink:0;font-size:12px;font-weight:700;height:22px;justify-content:center;pointer-events:none;width:22px}.graph-series-glyph.funnel-step-glyph{background-color:var(--bg-light);border-color:var(--border);color:var(--primary-alt);font-size:unset;height:23px;width:23px}#bottom-notice{background:#000;bottom:0;color:#fff;display:flex!important;flex-direction:row;font-size:.75rem;left:0;line-height:1.5rem;position:fixed;width:100%;z-index:var(--z-bottom-notice)}#bottom-notice code{color:inherit;font-size:inherit}#bottom-notice.warning div{background:var(--danger);height:auto}#bottom-notice.tricolor{cursor:pointer}#bottom-notice.tricolor div:first-child{background:var(--brand-blue)}#bottom-notice.tricolor div:nth-child(2){background:var(--brand-red)}#bottom-notice.tricolor div:nth-child(3){background:var(--brand-yellow)}#bottom-notice.tricolor span{cursor:text}#bottom-notice div{flex-basis:0;flex-grow:1;height:1.5rem;text-align:center}#bottom-notice span{display:none}#bottom-notice button{background:transparent;border:none;color:inherit;cursor:pointer;font-size:1rem;font-weight:700;height:1.5rem;padding:0;width:1.5rem}@media screen and (min-width:750px){#bottom-notice{font-size:1rem;line-height:2rem}#bottom-notice div{height:2rem}#bottom-notice span{display:inline}#bottom-notice button{font-size:1.25rem;height:2rem;width:2rem}}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}input::-moz-placeholder,textarea::-moz-placeholder{color:var(--muted)}input::placeholder,textarea::placeholder{color:var(--muted)}body{background:var(--bg-3000);color:var(--text-3000);font-size:14px;line-height:1.5715;touch-action:manipulation;--primary:var(--primary-3000);--muted:var(--muted-3000);--default:var(--text-3000);--muted-alt:var(--muted-3000);--primary-alt:var(--text-3000);--border:var(--border-3000);--border-bold:var(--border-bold-3000);--data-color-1:#1d4aff;--data-color-1-hover:#1a3cf6;--data-color-10:#35416b}body[theme=light]{--text-3000:var(--text-3000-light);--text-secondary-3000:var(--text-secondary-3000-light);--muted-3000:var(--muted-3000-light);--trace-3000:var(--trace-3000-light);--primary-3000:var(--primary-3000-light);--primary-highlight:var(--primary-highlight-light);--primary-3000-hover:var(--primary-3000-hover-light);--primary-3000-active:var(--primary-3000-active-light);--secondary-3000:var(--secondary-3000-light);--secondary-3000-hover:var(--secondary-3000-hover-light);--accent-3000:var(--accent-3000-light);--bg-3000:var(--bg-3000-light);--border-3000:var(--border-3000-light);--border-light-opaque:#eee;--border-bold-3000:var(--border-bold-3000-light);--glass-bg-3000:var(--glass-bg-3000-light);--glass-border-3000:var(--glass-border-3000-light);--bg-light:#fff;--bg-table:#f9faf7;--link:var(--link-3000-light);--shadow-elevation-3000:var(--shadow-elevation-3000-light);--primary-3000-frame-bg:var(--primary-3000-frame-bg-light);--primary-3000-button-bg:var(--primary-3000-button-bg-light);--primary-3000-button-border:var(--primary-3000-button-border-light);--primary-3000-button-border-hover:var(--primary-3000-button-border-hover-light);--primary-alt-highlight:var(--primary-alt-highlight-light);--secondary-3000-frame-bg:var(--secondary-3000-frame-bg-light);--secondary-3000-button-bg:var(--secondary-3000-button-bg-light);--secondary-3000-button-border:var(--secondary-3000-button-border-light);--secondary-3000-button-border-hover:var(--secondary-3000-button-border-hover-light);--danger-3000-frame-bg:var(--danger-3000-frame-bg-light);--danger-3000-button-border:var(--danger-3000-button-border-light);--danger-3000-button-border-hover:var(--danger-3000-button-border-hover-light);--tooltip-bg:var(--tooltip-bg-light)}body[theme=dark]{--content-primary:var(--neutral-cool-100);--content-warning:var(--orange-300);--content-warning-bold:var(--orange-100);--content-danger-bold:var(--red-100);--content-success-bold:var(--green-100);--background-primary:var(--neutral-cool-900);--background-secondary:var(--neutral-cool-850);--background-tertiary:var(--neutral-cool-800);--background-warning-subtle:var(--orange-850);--background-danger-subtle:var(--red-800);--background-success-subtle:var(--green-800);--border-tertiary:var(--neutral-cool-750);--text-3000:var(--text-3000-dark);--text-secondary-3000:var(--text-secondary-3000-dark);--muted-3000:var(--muted-3000-dark);--trace-3000:var(--trace-3000-dark);--primary-3000:var(--primary-3000-dark);--primary-highlight:var(--primary-highlight-dark);--primary-3000-hover:var(--primary-3000-hover-dark);--primary-3000-active:var(--primary-3000-active-dark);--secondary-3000:var(--secondary-3000-dark);--secondary-3000-hover:var(--secondary-3000-hover-dark);--accent-3000:var(--accent-3000-dark);--bg-3000:var(--bg-3000-dark);--border-3000:var(--border-3000-dark);--border-light-opaque:#1e2028;--border-bold-3000:var(--border-bold-3000-dark);--glass-bg-3000:var(--glass-bg-3000-dark);--glass-border-3000:var(--glass-border-3000-dark);--bg-light:var(--accent-3000);--bg-table:#232429;--brand-key:#fff;--link:var(--link-3000-dark);--shadow-elevation-3000:var(--shadow-elevation-3000-dark);--primary-3000-frame-bg:var(--primary-3000-frame-bg-dark);--primary-3000-button-bg:var(--primary-3000-button-bg-dark);--primary-3000-button-border:var(--primary-3000-button-border-dark);--primary-3000-button-border-hover:var(--primary-3000-button-border-hover-dark);--primary-alt-highlight:var(--primary-alt-highlight-dark);--secondary-3000-frame-bg:var(--secondary-3000-frame-bg-dark);--secondary-3000-button-bg:var(--secondary-3000-button-bg-dark);--secondary-3000-button-border:var(--secondary-3000-button-border-dark);--secondary-3000-button-border-hover:var(--secondary-3000-button-border-hover-dark);--danger-3000-frame-bg:var(--danger-3000-frame-bg-dark);--danger-3000-button-border:var(--danger-3000-button-border-dark);--danger-3000-button-border-hover:var(--danger-3000-button-border-hover-dark);--tooltip-bg:var(--tooltip-bg-dark);--data-color-2:#7f26d9;--data-color-3:#3e7a76;--data-color-4:#bf0d6c;--data-color-5:#f0474f;--data-color-6:#b36114;--data-color-10:#6576b3}body *>::-webkit-scrollbar{height:.5rem;width:.5rem}body *>::-webkit-scrollbar-track{background:var(--accent-3000)}body *>::-webkit-scrollbar-thumb{background:var(--trace-3000);border-radius:var(--radius)}body *>::-webkit-scrollbar-thumb:hover{background:var(--muted-3000)}body b,body strong{font-weight:600}body h1,body h2,body h3,body h4,body h5{font-family:var(--font-title);font-weight:500;margin-bottom:.5em;margin-top:0}body h1,body h2,body h3,body h4{color:var(--text-3000)}body h1{font-size:1.75rem}body h2{font-size:1.3125rem}body h3{font-size:1rem}body h5{color:var(--muted-alt);font-size:.6875rem;font-weight:600;letter-spacing:.075em;line-height:1.5rem;margin-bottom:.25rem;text-transform:uppercase}body pre{margin-bottom:1em;margin-top:0;overflow:auto}body dialog{background-color:var(--bg-3000)}body .LemonButton .text-link,body .Link .text-link{color:var(--text-3000)!important}body .LemonButton:hover .text-link,body .Link:hover .text-link{color:var(--primary-3000)!important}a{color:var(--link);-webkit-text-decoration:none;text-decoration:none}p{margin-bottom:1em;margin-top:0}img{border-style:none;vertical-align:middle}[tabindex="-1"]:focus{outline:none!important}.storybook-test-runner.storybook-test-runner--fullscreen{height:-moz-fit-content;height:fit-content}.storybook-test-runner.storybook-test-runner--padded #storybook-root{display:inline-block}.storybook-test-runner *,.storybook-test-runner :after,.storybook-test-runner :before{animation-duration:0ms!important;animation-fill-mode:forwards!important;animation-iteration-count:1!important;transition-duration:0ms!important}.storybook-test-runner *>::-webkit-scrollbar,.storybook-test-runner .LemonTabs__bar:after,.storybook-test-runner .scrollable:after,.storybook-test-runner .scrollable:before,.storybook-test-runner ::-webkit-scrollbar{display:none}.storybook-test-runner #storybook-root:empty~.ReactModalPortal>.ReactModal__Overlay,.storybook-test-runner #storybook-root>.fixed:only-child{position:static!important}.ligatures-none{font-feature-settings:none;font-variant-ligatures:none}.hide-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbar::-webkit-scrollbar{display:none}.\\*\\:w-80>*{width:20rem!important}.\\*\\:grow>*{flex-grow:1!important}.\\*\\:p-1>*{padding:.25rem!important}.\\*\\:\\*\\:font-medium>*>*{font-weight:500!important}.placeholder\\:\\*\\:\\*\\:font-medium>*>::-moz-placeholder{font-weight:500!important}.placeholder\\:\\*\\:\\*\\:font-medium>*>::placeholder{font-weight:500!important}.before\\:absolute:before{content:var(--tw-content)!important;position:absolute!important}.before\\:inset-0:before{content:var(--tw-content)!important;inset:0!important}.before\\:rounded:before{border-radius:var(--radius)!important;content:var(--tw-content)!important}.before\\:border:before{border-width:1px!important;content:var(--tw-content)!important}.first\\:mt-0:first-child{margin-top:0!important}.first\\:border-t-0:first-child{border-top-width:0!important}.last\\:border-b-0:last-child{border-bottom-width:0!important}.odd\\:last\\:\\*\\:col-span-2>:last-child:nth-child(odd){grid-column:span 2/span 2!important}.hover\\:border-\\[var\\(--primary\\)\\]:hover{border-color:var(--primary)!important}.hover\\:bg-\\[var\\(--bg-light\\)\\]:hover{background-color:var(--bg-light)!important}.hover\\:underline:hover{text-decoration-line:underline!important}.hover\\:opacity-100:hover{opacity:1!important}.hover\\:ring-2:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.group:hover .group-hover\\:visible{visibility:visible!important}.group:hover .group-hover\\:flex{display:flex!important}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.group:hover .group-hover\\:animate-bounce{animation:bounce 1s infinite!important}.group:hover .group-hover\\:opacity-100{opacity:1!important}.group:hover .group-hover\\:opacity-90{opacity:.9!important}@container og (min-width: 20rem){.\\@xs\\/og\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@container og (min-width: 28rem){.\\@md\\/og\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@container (min-width: 28rem){.\\@md\\:block{display:block!important}.\\@md\\:flex{display:flex!important}.\\@md\\:hidden{display:none!important}.\\@md\\:px-1{padding-left:.25rem!important;padding-right:.25rem!important}}@container (min-width: 56rem){.\\@4xl\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@media not all and (min-width:576px){.max-sm\\:hidden{display:none!important}}@media (min-width:576px){.sm\\:block{display:block!important}.sm\\:flex{display:flex!important}.sm\\:min-w-0{min-width:0!important}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sm\\:flex-row{flex-direction:row!important}.sm\\:justify-center{justify-content:center!important}.sm\\:p-6{padding:1.5rem!important}.sm\\:pb-0{padding-bottom:0!important}.sm\\:pb-8{padding-bottom:2rem!important}}@media (min-width:768px){.md\\:col-span-1{grid-column:span 1/span 1!important}.md\\:col-span-2{grid-column:span 2/span 2!important}.md\\:col-span-6{grid-column:span 6/span 6!important}.md\\:col-span-full{grid-column:1/-1!important}.md\\:col-start-2{grid-column-start:2!important}.md\\:row-span-1{grid-row:span 1/span 1!important}.md\\:block{display:block!important}.md\\:inline{display:inline!important}.md\\:flex{display:flex!important}.md\\:grid{display:grid!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.md\\:grid-cols-\\[320px_1fr\\]{grid-template-columns:320px 1fr!important}.md\\:grid-cols-\\[repeat\\(3\\2c _minmax\\(min-content\\2c _160px\\)\\)\\]{grid-template-columns:repeat(3,minmax(min-content,160px))!important}.md\\:border-b-0{border-bottom-width:0!important}.md\\:p-6{padding:1.5rem!important}}@media (min-width:992px){.lg\\:grid-cols-\\[12\\.5rem_1fr\\]{grid-template-columns:12.5rem 1fr!important}}@media (min-width:1200px){.xl\\:mt-0{margin-top:0!important}.xl\\:flex{display:flex!important}.xl\\:pl-2{padding-left:.5rem!important}}@media (prefers-color-scheme:dark){.dark\\:text-\\[\\#C170E8\\]{--tw-text-opacity:1!important;color:rgb(193 112 232/var(--tw-text-opacity))!important}}.\\[\\&\\>input\\:\\:-webkit-inner-spin-button\\]\\:appearance-none>input::-webkit-inner-spin-button{-webkit-appearance:none!important;appearance:none!important}.\\[\\&_\\>\\*\\]\\:px-2>*{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\>\\*\\]\\:py-0\\.5>*{padding-bottom:.125rem!important;padding-top:.125rem!important}.\\[\\&_\\>span\\>span\\]\\:flex-col>span>span{flex-direction:column!important}.\\[\\&_\\>span\\>span\\]\\:items-start>span>span{align-items:flex-start!important}.\\[\\&_\\>span\\>span\\]\\:space-y-1>span>span>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.25rem*var(--tw-space-y-reverse))!important;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))!important}',""]),module.exports=exports},"./frontend/public/hedgehog/running-hog.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/running-hog.d286878cf0d59615f60a05cc434e29a0.png"},"./frontend/public/langfuse-icon.svg":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/langfuse-icon.7106297f8ddfacfd23f2e0a5a16846e1.svg"},"./frontend/public/not-found-astrohog.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/not-found-astrohog.a4e3a59b90ccd886ab4231c270e5d92f.png"},"./frontend/public/posthog-icon.svg":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/posthog-icon.14d048148d45b6fe9c0a5d829469b0e5.svg"},"./frontend/public/services/aws-s3.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/aws-s3.ec2332979c65a4e9a2fa28ddc65f0468.png"},"./frontend/public/services/bigquery.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/bigquery.1bd7c5187189fe1c78abeab849f5e0ec.png"},"./frontend/public/services/google-cloud-storage.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/google-cloud-storage.e1bd2d5efb0bf56cf48e9e90cd2c6c3a.png"},"./frontend/public/services/hubspot.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/hubspot.aa61b2aaad7e9eeeb43f46d98988323d.png"},"./frontend/public/services/postgres.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/postgres.dc5b1b72f73b1a6c2c9d6d354a204e17.png"},"./frontend/public/services/salesforce.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/salesforce.3b4908e6f4a90fc0607f295de7908a58.png"},"./frontend/public/services/snowflake.png":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"images/snowflake.e08a91548c74ea3172ae2f0c9d22b0f8.png"},"./frontend/public/Inter.woff":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"fonts/Inter.10f84849b8a69b4844b2925080f81a97.woff"},"./frontend/public/Inter.woff2":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=__webpack_require__.p+"fonts/Inter.7cb807e6006c622d46c52bf1fdf0ece1.woff2"},"./node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./frontend/src/lib/components/Cards/InsightCard/InsightCard.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightCard_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/Cards/InsightCard/InsightCard.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightCard_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightCard_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightCard_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightCard_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_HedgehogBuddy_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/components/HedgehogBuddy/HedgehogBuddy.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_HedgehogBuddy_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_HedgehogBuddy_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_HedgehogBuddy_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_HedgehogBuddy_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/lib/lemon-ui/Popover/Popover.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_Popover_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/lib/lemon-ui/Popover/Popover.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_Popover_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_Popover_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_Popover_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_Popover_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/feature-flags/FeatureFlag.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FeatureFlag_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/feature-flags/FeatureFlag.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FeatureFlag_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FeatureFlag_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FeatureFlag_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FeatureFlag_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightTooltip_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/InsightTooltip/InsightTooltip.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightTooltip_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightTooltip_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightTooltip_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_InsightTooltip_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/insights/filters/BreakdownFilter/BreakdownTagMenu.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_BreakdownTagMenu_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/filters/BreakdownFilter/BreakdownTagMenu.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_BreakdownTagMenu_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_BreakdownTagMenu_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_BreakdownTagMenu_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_BreakdownTagMenu_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FunnelCorrelationTable_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/insights/views/Funnels/FunnelCorrelationTable.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FunnelCorrelationTable_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FunnelCorrelationTable_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FunnelCorrelationTable_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_FunnelCorrelationTable_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/notebooks/NotebookScene.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_NotebookScene_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/notebooks/NotebookScene.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_NotebookScene_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_NotebookScene_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_NotebookScene_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_NotebookScene_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/persons/PersonDisplay.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PersonDisplay_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/persons/PersonDisplay.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PersonDisplay_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PersonDisplay_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PersonDisplay_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PersonDisplay_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/scenes/session-recordings/player/PlayerMeta.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PlayerMeta_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/scenes/session-recordings/player/PlayerMeta.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PlayerMeta_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PlayerMeta_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PlayerMeta_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_PlayerMeta_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"./frontend/src/styles/global.scss":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/.pnpm/style-loader@2.0.0_webpack@5.88.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_global_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/.pnpm/css-loader@3.6.0_webpack@5.88.2/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.4.31_webpack@5.88.2/node_modules/postcss-loader/dist/cjs.js!./node_modules/.pnpm/sass-loader@10.3.1_sass@1.56.0_webpack@5.88.2/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./frontend/src/styles/global.scss"),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_global_scss__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_global_scss__WEBPACK_IMPORTED_MODULE_1__),options={};options.insert="head",options.singleton=!1,_node_modules_pnpm_style_loader_2_0_0_webpack_5_88_2_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_global_scss__WEBPACK_IMPORTED_MODULE_1___default(),options),_node_modules_pnpm_css_loader_3_6_0_webpack_5_88_2_node_modules_css_loader_dist_cjs_js_node_modules_pnpm_postcss_loader_4_3_0_postcss_8_4_31_webpack_5_88_2_node_modules_postcss_loader_dist_cjs_js_node_modules_pnpm_sass_loader_10_3_1_sass_1_56_0_webpack_5_88_2_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_2_use_3_global_scss__WEBPACK_IMPORTED_MODULE_1___default().locals},"@storybook/channels":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CHANNELS__},"@storybook/client-logger":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CLIENT_LOGGER__},"@storybook/core-events":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CORE_EVENTS__},"@storybook/global":module=>{"use strict";module.exports=__STORYBOOK_MODULE_GLOBAL__},"@storybook/preview-api":module=>{"use strict";module.exports=__STORYBOOK_MODULE_PREVIEW_API__},"?cafa":()=>{},"?4c41":()=>{},"?0634":()=>{},"?8b23":()=>{},"?4d21":()=>{},"?46f2":()=>{},"./frontend/src/mocks/fixtures/_instance_status.json":module=>{"use strict";module.exports=JSON.parse('{"results":{"overview":[{"key":"posthog_git_sha","metric":"PostHog Git SHA","value":"Undefined"},{"key":"analytics_database","metric":"Analytics database in use","value":"ClickHouse"},{"key":"plugin_sever_alive","metric":"Plugin server alive","value":true},{"key":"plugin_sever_version","metric":"Plugin server version","value":"1.10.5"},{"key":"plugin_sever_job_queues","metric":"Job queues enabled in plugin server","value":"Graphile"},{"key":"db_alive","metric":"Postgres database alive","value":true},{"key":"pg_version","metric":"Postgres version","value":"12.0.9"},{"key":"async_migrations_ok","metric":"Async migrations up-to-date","value":true},{"key":"clickhouse_alive","metric":"Clickhouse database alive","value":true},{"key":"clickhouse_event_count","metric":"Events in ClickHouse","value":175843},{"key":"clickhouse_event_count_last_month","metric":"Events recorded last month","value":904},{"key":"clickhouse_event_count_month_to_date","metric":"Events recorded month to date","value":173420},{"key":"clickhouse_disk_0_free_space","metric":"Clickhouse disk free space","value":"28.79 GiB"},{"key":"clickhouse_disk_0_total_space","metric":"Clickhouse disk total space","value":"58.42 GiB"},{"key":"clickhouse_table_sizes","metric":"Clickhouse table sizes","value":"","subrows":{"columns":["Table","Size","Rows"],"rows":[["asynchronous_metric_log","161.20 MiB",137266041],["text_log","584.87 MiB",29580188],["metric_log","25.78 MiB",297922],["query_thread_log","18.04 MiB",219137],["events","34.39 MiB",176855],["events_dead_letter_queue","40.32 MiB",114794],["query_log","9.62 MiB",78456],["person","1.94 MiB",42393],["person_distinct_id2","1.63 MiB",40542],["person_distinct_id","1.55 MiB",40539],["plugin_log_entries","7.64 KiB",94],["session_recording_events","9.91 KiB",62],["infi_clickhouse_orm_migrations","1.58 KiB",46],["groups","5.25 KiB",22]]}},{"key":"clickhouse_system_metrics","metric":"Clickhouse system metrics","value":"","subrows":{"columns":["Metric","Value","Description"],"rows":[["ActiveAsyncDrainedConnections",0,"Number of active connections drained asynchronously."],["ActiveSyncDrainedConnections",0,"Number of active connections drained synchronously."],["AsyncDrainedConnections",0,"Number of connections drained asynchronously."],["AsynchronousMetricsCalculationTimeSpent",0.002780791],["BackgroundBufferFlushSchedulePoolTask",0,"Number of active tasks in BackgroundBufferFlushSchedulePool. This pool is used for periodic Buffer flushes"],["BackgroundDistributedSchedulePoolTask",0,"Number of active tasks in BackgroundDistributedSchedulePool. This pool is used for distributed sends that is done in background."],["BackgroundFetchesPoolTask",0,"Number of active tasks in BackgroundFetchesPool"],["BackgroundMessageBrokerSchedulePoolTask",15,"Number of active tasks in BackgroundProcessingPool for message streaming"],["BackgroundMovePoolTask",0,"Number of active tasks in BackgroundProcessingPool for moves"],["BackgroundPoolTask",0,"Number of active tasks in BackgroundProcessingPool (merges, mutations, or replication queue bookkeeping)"],["BackgroundSchedulePoolTask",0,"Number of active tasks in BackgroundSchedulePool. This pool is used for periodic ReplicatedMergeTree tasks, like cleaning old data parts, altering data parts, replica re-initialization, etc."],["BlockActiveTime_nbd0",0],["BlockActiveTime_nbd1",0],["BlockActiveTime_nbd10",0],["BlockActiveTime_nbd11",0],["BlockActiveTime_nbd12",0],["BlockActiveTime_nbd13",0],["BlockActiveTime_nbd14",0],["BlockActiveTime_nbd15",0],["BlockActiveTime_nbd2",0],["BlockActiveTime_nbd3",0],["BlockActiveTime_nbd4",0],["BlockActiveTime_nbd5",0],["BlockActiveTime_nbd6",0],["BlockActiveTime_nbd7",0],["BlockActiveTime_nbd8",0],["BlockActiveTime_nbd9",0],["BlockActiveTime_vda",0.000011],["BlockDiscardBytes_nbd0",0],["BlockDiscardBytes_nbd1",0],["BlockDiscardBytes_nbd10",0],["BlockDiscardBytes_nbd11",0],["BlockDiscardBytes_nbd12",0],["BlockDiscardBytes_nbd13",0],["BlockDiscardBytes_nbd14",0],["BlockDiscardBytes_nbd15",0],["BlockDiscardBytes_nbd2",0],["BlockDiscardBytes_nbd3",0],["BlockDiscardBytes_nbd4",0],["BlockDiscardBytes_nbd5",0],["BlockDiscardBytes_nbd6",0],["BlockDiscardBytes_nbd7",0],["BlockDiscardBytes_nbd8",0],["BlockDiscardBytes_nbd9",0],["BlockDiscardBytes_vda",0],["BlockDiscardMerges_nbd0",0],["BlockDiscardMerges_nbd1",0],["BlockDiscardMerges_nbd10",0],["BlockDiscardMerges_nbd11",0],["BlockDiscardMerges_nbd12",0],["BlockDiscardMerges_nbd13",0],["BlockDiscardMerges_nbd14",0],["BlockDiscardMerges_nbd15",0],["BlockDiscardMerges_nbd2",0],["BlockDiscardMerges_nbd3",0],["BlockDiscardMerges_nbd4",0],["BlockDiscardMerges_nbd5",0],["BlockDiscardMerges_nbd6",0],["BlockDiscardMerges_nbd7",0],["BlockDiscardMerges_nbd8",0],["BlockDiscardMerges_nbd9",0],["BlockDiscardMerges_vda",0],["BlockDiscardOps_nbd0",0],["BlockDiscardOps_nbd1",0],["BlockDiscardOps_nbd10",0],["BlockDiscardOps_nbd11",0],["BlockDiscardOps_nbd12",0],["BlockDiscardOps_nbd13",0],["BlockDiscardOps_nbd14",0],["BlockDiscardOps_nbd15",0],["BlockDiscardOps_nbd2",0],["BlockDiscardOps_nbd3",0],["BlockDiscardOps_nbd4",0],["BlockDiscardOps_nbd5",0],["BlockDiscardOps_nbd6",0],["BlockDiscardOps_nbd7",0],["BlockDiscardOps_nbd8",0],["BlockDiscardOps_nbd9",0],["BlockDiscardOps_vda",0],["BlockDiscardTime_nbd0",0],["BlockDiscardTime_nbd1",0],["BlockDiscardTime_nbd10",0],["BlockDiscardTime_nbd11",0],["BlockDiscardTime_nbd12",0],["BlockDiscardTime_nbd13",0],["BlockDiscardTime_nbd14",0],["BlockDiscardTime_nbd15",0],["BlockDiscardTime_nbd2",0],["BlockDiscardTime_nbd3",0],["BlockDiscardTime_nbd4",0],["BlockDiscardTime_nbd5",0],["BlockDiscardTime_nbd6",0],["BlockDiscardTime_nbd7",0],["BlockDiscardTime_nbd8",0],["BlockDiscardTime_nbd9",0],["BlockDiscardTime_vda",0],["BlockInFlightOps_nbd0",0],["BlockInFlightOps_nbd1",0],["BlockInFlightOps_nbd10",0],["BlockInFlightOps_nbd11",0],["BlockInFlightOps_nbd12",0],["BlockInFlightOps_nbd13",0],["BlockInFlightOps_nbd14",0],["BlockInFlightOps_nbd15",0],["BlockInFlightOps_nbd2",0],["BlockInFlightOps_nbd3",0],["BlockInFlightOps_nbd4",0],["BlockInFlightOps_nbd5",0],["BlockInFlightOps_nbd6",0],["BlockInFlightOps_nbd7",0],["BlockInFlightOps_nbd8",0],["BlockInFlightOps_nbd9",0],["BlockInFlightOps_vda",0],["BlockQueueTime_nbd0",0],["BlockQueueTime_nbd1",0],["BlockQueueTime_nbd10",0],["BlockQueueTime_nbd11",0],["BlockQueueTime_nbd12",0],["BlockQueueTime_nbd13",0],["BlockQueueTime_nbd14",0],["BlockQueueTime_nbd15",0],["BlockQueueTime_nbd2",0],["BlockQueueTime_nbd3",0],["BlockQueueTime_nbd4",0],["BlockQueueTime_nbd5",0],["BlockQueueTime_nbd6",0],["BlockQueueTime_nbd7",0],["BlockQueueTime_nbd8",0],["BlockQueueTime_nbd9",0],["BlockQueueTime_vda",0.000009999999999999999],["BlockReadBytes_nbd0",0],["BlockReadBytes_nbd1",0],["BlockReadBytes_nbd10",0],["BlockReadBytes_nbd11",0],["BlockReadBytes_nbd12",0],["BlockReadBytes_nbd13",0],["BlockReadBytes_nbd14",0],["BlockReadBytes_nbd15",0],["BlockReadBytes_nbd2",0],["BlockReadBytes_nbd3",0],["BlockReadBytes_nbd4",0],["BlockReadBytes_nbd5",0],["BlockReadBytes_nbd6",0],["BlockReadBytes_nbd7",0],["BlockReadBytes_nbd8",0],["BlockReadBytes_nbd9",0],["BlockReadBytes_vda",0],["BlockReadMerges_nbd0",0],["BlockReadMerges_nbd1",0],["BlockReadMerges_nbd10",0],["BlockReadMerges_nbd11",0],["BlockReadMerges_nbd12",0],["BlockReadMerges_nbd13",0],["BlockReadMerges_nbd14",0],["BlockReadMerges_nbd15",0],["BlockReadMerges_nbd2",0],["BlockReadMerges_nbd3",0],["BlockReadMerges_nbd4",0],["BlockReadMerges_nbd5",0],["BlockReadMerges_nbd6",0],["BlockReadMerges_nbd7",0],["BlockReadMerges_nbd8",0],["BlockReadMerges_nbd9",0],["BlockReadMerges_vda",0],["BlockReadOps_nbd0",0],["BlockReadOps_nbd1",0],["BlockReadOps_nbd10",0],["BlockReadOps_nbd11",0],["BlockReadOps_nbd12",0],["BlockReadOps_nbd13",0],["BlockReadOps_nbd14",0],["BlockReadOps_nbd15",0],["BlockReadOps_nbd2",0],["BlockReadOps_nbd3",0],["BlockReadOps_nbd4",0],["BlockReadOps_nbd5",0],["BlockReadOps_nbd6",0],["BlockReadOps_nbd7",0],["BlockReadOps_nbd8",0],["BlockReadOps_nbd9",0],["BlockReadOps_vda",0],["BlockReadTime_nbd0",0],["BlockReadTime_nbd1",0],["BlockReadTime_nbd10",0],["BlockReadTime_nbd11",0],["BlockReadTime_nbd12",0],["BlockReadTime_nbd13",0],["BlockReadTime_nbd14",0],["BlockReadTime_nbd15",0],["BlockReadTime_nbd2",0],["BlockReadTime_nbd3",0],["BlockReadTime_nbd4",0],["BlockReadTime_nbd5",0],["BlockReadTime_nbd6",0],["BlockReadTime_nbd7",0],["BlockReadTime_nbd8",0],["BlockReadTime_nbd9",0],["BlockReadTime_vda",0],["BlockWriteBytes_nbd0",0],["BlockWriteBytes_nbd1",0],["BlockWriteBytes_nbd10",0],["BlockWriteBytes_nbd11",0],["BlockWriteBytes_nbd12",0],["BlockWriteBytes_nbd13",0],["BlockWriteBytes_nbd14",0],["BlockWriteBytes_nbd15",0],["BlockWriteBytes_nbd2",0],["BlockWriteBytes_nbd3",0],["BlockWriteBytes_nbd4",0],["BlockWriteBytes_nbd5",0],["BlockWriteBytes_nbd6",0],["BlockWriteBytes_nbd7",0],["BlockWriteBytes_nbd8",0],["BlockWriteBytes_nbd9",0],["BlockWriteBytes_vda",253952],["BlockWriteMerges_nbd0",0],["BlockWriteMerges_nbd1",0],["BlockWriteMerges_nbd10",0],["BlockWriteMerges_nbd11",0],["BlockWriteMerges_nbd12",0],["BlockWriteMerges_nbd13",0],["BlockWriteMerges_nbd14",0],["BlockWriteMerges_nbd15",0],["BlockWriteMerges_nbd2",0],["BlockWriteMerges_nbd3",0],["BlockWriteMerges_nbd4",0],["BlockWriteMerges_nbd5",0],["BlockWriteMerges_nbd6",0],["BlockWriteMerges_nbd7",0],["BlockWriteMerges_nbd8",0],["BlockWriteMerges_nbd9",0],["BlockWriteMerges_vda",0],["BlockWriteOps_nbd0",0],["BlockWriteOps_nbd1",0],["BlockWriteOps_nbd10",0],["BlockWriteOps_nbd11",0],["BlockWriteOps_nbd12",0],["BlockWriteOps_nbd13",0],["BlockWriteOps_nbd14",0],["BlockWriteOps_nbd15",0],["BlockWriteOps_nbd2",0],["BlockWriteOps_nbd3",0],["BlockWriteOps_nbd4",0],["BlockWriteOps_nbd5",0],["BlockWriteOps_nbd6",0],["BlockWriteOps_nbd7",0],["BlockWriteOps_nbd8",0],["BlockWriteOps_nbd9",0],["BlockWriteOps_vda",12],["BlockWriteTime_nbd0",0],["BlockWriteTime_nbd1",0],["BlockWriteTime_nbd10",0],["BlockWriteTime_nbd11",0],["BlockWriteTime_nbd12",0],["BlockWriteTime_nbd13",0],["BlockWriteTime_nbd14",0],["BlockWriteTime_nbd15",0],["BlockWriteTime_nbd2",0],["BlockWriteTime_nbd3",0],["BlockWriteTime_nbd4",0],["BlockWriteTime_nbd5",0],["BlockWriteTime_nbd6",0],["BlockWriteTime_nbd7",0],["BlockWriteTime_nbd8",0],["BlockWriteTime_nbd9",0],["BlockWriteTime_vda",0.000008],["BrokenDistributedFilesToInsert",0,"Number of files for asynchronous insertion into Distributed tables that has been marked as broken. This metric will starts from 0 on start. Number of files for every shard is summed."],["CacheDictionaryUpdateQueueBatches",0,"Number of \'batches\' (a set of keys) in update queue in CacheDictionaries."],["CacheDictionaryUpdateQueueKeys",0,"Exact number of keys in update queue in CacheDictionaries."],["ContextLockWait",0,"Number of threads waiting for lock in Context. This is global lock."],["DelayedInserts",0,"Number of INSERT queries that are throttled due to high number of active data parts for partition in a MergeTree table."],["DictCacheRequests",0,"Number of requests in fly to data sources of dictionaries of cache type."],["DiskAvailable_default",30909685760],["DiskSpaceReservedForMerge",0,"Disk space reserved for currently running background merges. It is slightly more than the total size of currently merging parts."],["DiskTotal_default",62725623808],["DiskUnreserved_default",30909685760],["DiskUsed_default",31815938048],["DistributedFilesToInsert",0,"Number of pending files to process for asynchronous insertion into Distributed tables. Number of files for every shard is summed."],["DistributedSend",0,"Number of connections to remote servers sending data that was INSERTed into Distributed tables. Both synchronous and asynchronous mode."],["EphemeralNode",0,"Number of ephemeral nodes hold in ZooKeeper."],["FilesystemLogsPathAvailableBytes",30909685760],["FilesystemLogsPathAvailableINodes",3024789],["FilesystemLogsPathTotalBytes",62725623808],["FilesystemLogsPathTotalINodes",3907584],["FilesystemLogsPathUsedBytes",31815938048],["FilesystemLogsPathUsedINodes",882795],["FilesystemMainPathAvailableBytes",30909685760],["FilesystemMainPathAvailableINodes",3024789],["FilesystemMainPathTotalBytes",62725623808],["FilesystemMainPathTotalINodes",3907584],["FilesystemMainPathUsedBytes",31815938048],["FilesystemMainPathUsedINodes",882795],["GlobalThread",208,"Number of threads in global thread pool."],["GlobalThreadActive",164,"Number of threads in global thread pool running a task."],["HTTPConnection",0,"Number of connections to HTTP server"],["HTTPThreads",1],["InterserverConnection",0,"Number of connections from other replicas to fetch parts"],["InterserverThreads",0],["Jitter",0.000253],["LoadAverage1",0.56],["LoadAverage15",0.25],["LoadAverage5",0.34],["LocalThread",0,"Number of threads in local thread pools. The threads in local thread pools are taken from the global thread pool."],["LocalThreadActive",0,"Number of threads in local thread pools running a task."],["MMapCacheCells",0],["MMappedFileBytes",1958451168,"Sum size of mmapped file regions."],["MMappedFiles",7,"Total number of mmapped files."],["MarkCacheBytes",3995568],["MarkCacheFiles",6657],["MaxDDLEntryID",442,"Max processed DDL entry of DDLWorker."],["MaxPartCountForPartition",8],["MaxPushedDDLEntryID",442,"Max DDL entry of DDLWorker that pushed to zookeeper."],["MemoryCode",265568256],["MemoryDataAndStack",22894653440],["MemoryResident",757252096],["MemoryShared",270368768],["MemoryTracking",757483984,"Total amount of memory (bytes) allocated by the server."],["MemoryVirtual",25127219200],["Merge",0,"Number of executing background merges"],["MySQLConnection",0,"Number of client connections using MySQL protocol"],["MySQLThreads",0],["NetworkReceive",0,"Number of threads receiving data from network. Only ClickHouse-related network interaction is included, not by 3rd party libraries."],["NetworkReceiveBytes_eth0",20222],["NetworkReceiveBytes_ip6tnl0",0],["NetworkReceiveBytes_tunl0",0],["NetworkReceiveDrop_eth0",0],["NetworkReceiveDrop_ip6tnl0",0],["NetworkReceiveDrop_tunl0",0],["NetworkReceiveErrors_eth0",0],["NetworkReceiveErrors_ip6tnl0",0],["NetworkReceiveErrors_tunl0",0],["NetworkReceivePackets_eth0",59],["NetworkReceivePackets_ip6tnl0",0],["NetworkReceivePackets_tunl0",0],["NetworkSend",0,"Number of threads sending data to network. Only ClickHouse-related network interaction is included, not by 3rd party libraries."],["NetworkSendBytes_eth0",6902],["NetworkSendBytes_ip6tnl0",0],["NetworkSendBytes_tunl0",0],["NetworkSendDrop_eth0",0],["NetworkSendDrop_ip6tnl0",0],["NetworkSendDrop_tunl0",0],["NetworkSendErrors_eth0",0],["NetworkSendErrors_ip6tnl0",0],["NetworkSendErrors_tunl0",0],["NetworkSendPackets_eth0",32],["NetworkSendPackets_ip6tnl0",0],["NetworkSendPackets_tunl0",0],["NumberOfDatabases",4],["NumberOfTables",128],["OSContextSwitches",6175],["OSGuestNiceTime",0],["OSGuestNiceTimeCPU0",0],["OSGuestNiceTimeCPU1",0],["OSGuestNiceTimeCPU2",0],["OSGuestNiceTimeCPU3",0],["OSGuestNiceTimeCPU4",0],["OSGuestNiceTimeCPU5",0],["OSGuestNiceTimeCPU6",0],["OSGuestNiceTimeCPU7",0],["OSGuestNiceTimeNormalized",0],["OSGuestTime",0],["OSGuestTimeCPU0",0],["OSGuestTimeCPU1",0],["OSGuestTimeCPU2",0],["OSGuestTimeCPU3",0],["OSGuestTimeCPU4",0],["OSGuestTimeCPU5",0],["OSGuestTimeCPU6",0],["OSGuestTimeCPU7",0],["OSGuestTimeNormalized",0],["OSIOWaitTime",0],["OSIOWaitTimeCPU0",0],["OSIOWaitTimeCPU1",0],["OSIOWaitTimeCPU2",0],["OSIOWaitTimeCPU3",0],["OSIOWaitTimeCPU4",0],["OSIOWaitTimeCPU5",0],["OSIOWaitTimeCPU6",0],["OSIOWaitTimeCPU7",0],["OSIOWaitTimeNormalized",0],["OSIdleTime",6.238421679315133],["OSIdleTimeCPU0",0.7698052392744635],["OSIdleTimeCPU1",0.7997976511942478],["OSIdleTimeCPU2",0.719817886074823],["OSIdleTimeCPU3",0.7997976511942478],["OSIdleTimeCPU4",0.6698305328751826],["OSIdleTimeCPU5",0.8097951218341759],["OSIdleTimeCPU6",0.8197925924741041],["OSIdleTimeCPU7",0.8497850043938884],["OSIdleTimeNormalized",0.7798027099143916],["OSInterrupts",4856],["OSIrqTime",0],["OSIrqTimeCPU0",0],["OSIrqTimeCPU1",0],["OSIrqTimeCPU2",0],["OSIrqTimeCPU3",0],["OSIrqTimeCPU4",0],["OSIrqTimeCPU5",0],["OSIrqTimeCPU6",0],["OSIrqTimeCPU7",0],["OSIrqTimeNormalized",0],["OSMemoryAvailable",3400728576],["OSMemoryBuffers",424554496],["OSMemoryCached",2488438784],["OSMemoryFreePlusCached",3341795328],["OSMemoryFreeWithoutCached",853356544],["OSMemorySwapCached",1839104],["OSMemoryTotal",6227279872],["OSNiceTime",0],["OSNiceTimeCPU0",0],["OSNiceTimeCPU1",0],["OSNiceTimeCPU2",0],["OSNiceTimeCPU3",0],["OSNiceTimeCPU4",0],["OSNiceTimeCPU5",0],["OSNiceTimeCPU6",0],["OSNiceTimeCPU7",0],["OSNiceTimeNormalized",0],["OSOpenFiles",5248],["OSProcessesBlocked",0],["OSProcessesCreated",3],["OSProcessesRunning",4],["OSSoftIrqTime",0.06998229447949669],["OSSoftIrqTimeCPU0",0.029992411919784294],["OSSoftIrqTimeCPU1",0],["OSSoftIrqTimeCPU2",0.009997470639928098],["OSSoftIrqTimeCPU3",0.009997470639928098],["OSSoftIrqTimeCPU4",0],["OSSoftIrqTimeCPU5",0],["OSSoftIrqTimeCPU6",0.009997470639928098],["OSSoftIrqTimeCPU7",0.009997470639928098],["OSSoftIrqTimeNormalized",0.008747786809937087],["OSStealTime",0],["OSStealTimeCPU0",0],["OSStealTimeCPU1",0],["OSStealTimeCPU2",0],["OSStealTimeCPU3",0],["OSStealTimeCPU4",0],["OSStealTimeCPU5",0],["OSStealTimeCPU6",0],["OSStealTimeCPU7",0],["OSStealTimeNormalized",0],["OSSystemTime",0.28992664855791483],["OSSystemTimeCPU0",0.029992411919784294],["OSSystemTimeCPU1",0.03998988255971239],["OSSystemTimeCPU2",0.029992411919784294],["OSSystemTimeCPU3",0.03998988255971239],["OSSystemTimeCPU4",0.05998482383956859],["OSSystemTimeCPU5",0.029992411919784294],["OSSystemTimeCPU6",0.03998988255971239],["OSSystemTimeCPU7",0.029992411919784294],["OSSystemTimeNormalized",0.036240831069739354],["OSThreadsRunnable",4],["OSThreadsTotal",1084],["OSUptime",298274.46],["OSUserTime",0.309921589837771],["OSUserTimeCPU0",0.029992411919784294],["OSUserTimeCPU1",0.029992411919784294],["OSUserTimeCPU2",0.029992411919784294],["OSUserTimeCPU3",0.029992411919784294],["OSUserTimeCPU4",0.08997723575935287],["OSUserTimeCPU5",0.029992411919784294],["OSUserTimeCPU6",0.019994941279856196],["OSUserTimeCPU7",0.029992411919784294],["OSUserTimeNormalized",0.03874019872972138],["OpenFileForRead",31,"Number of files open for reading"],["OpenFileForWrite",0,"Number of files open for writing"],["PartMutation",0,"Number of mutations (ALTER DELETE/UPDATE)"],["PartsCommitted",95,"Active data part, used by current and upcoming SELECTs."],["PartsCompact",152,"Compact parts."],["PartsDeleteOnDestroy",0,"Part was moved to another disk and should be deleted in own destructor."],["PartsDeleting",0,"Not active data part with identity refcounter, it is deleting right now by a cleaner."],["PartsInMemory",0,"In-memory parts."],["PartsOutdated",93,"Not active data part, but could be used by only current SELECTs, could be deleted after SELECTs finishes."],["PartsPreCommitted",0,"The part is in data_parts, but not used for SELECTs."],["PartsTemporary",0,"The part is generating now, it is not in data_parts list."],["PartsWide",36,"Wide parts."],["PostgreSQLConnection",0,"Number of client connections using PostgreSQL protocol"],["Query",1,"Number of executing queries"],["QueryPreempted",0,"Number of queries that are stopped and waiting due to \'priority\' setting."],["QueryThread",0,"Number of query processing threads"],["RWLockActiveReaders",46,"Number of threads holding read lock in a table RWLock."],["RWLockActiveWriters",0,"Number of threads holding write lock in a table RWLock."],["RWLockWaitingReaders",0,"Number of threads waiting for read on a table RWLock."],["RWLockWaitingWriters",0,"Number of threads waiting for write on a table RWLock."],["Read",1,"Number of read (read, pread, io_getevents, etc.) syscalls in fly"],["ReadonlyReplica",0,"Number of Replicated tables that are currently in readonly state due to re-initialization after ZooKeeper session loss or due to startup without ZooKeeper configured."],["ReplicasMaxAbsoluteDelay",0],["ReplicasMaxInsertsInQueue",0],["ReplicasMaxMergesInQueue",0],["ReplicasMaxQueueSize",0],["ReplicasMaxRelativeDelay",0],["ReplicasSumInsertsInQueue",0],["ReplicasSumMergesInQueue",0],["ReplicasSumQueueSize",0],["ReplicatedChecks",0,"Number of data parts checking for consistency"],["ReplicatedFetch",0,"Number of data parts being fetched from replica"],["ReplicatedSend",0,"Number of data parts being sent to replicas"],["Revision",54454,"Revision of the server. It is a number incremented for every release or release candidate except patch releases."],["SendExternalTables",0,"Number of connections that are sending data for external tables to remote servers. External tables are used to implement GLOBAL IN and GLOBAL JOIN operators with distributed subqueries."],["SendScalars",0,"Number of connections that are sending data for scalars to remote servers."],["StorageBufferBytes",0,"Number of bytes in buffers of Buffer tables"],["StorageBufferRows",0,"Number of rows in buffers of Buffer tables"],["SyncDrainedConnections",0,"Number of connections drained synchronously."],["TCPConnection",2,"Number of connections to TCP server (clients with native interface), also included server-server distributed query connections"],["TCPThreads",2],["TablesToDropQueueSize",0,"Number of dropped tables, that are waiting for background data removal."],["TotalBytesOfMergeTreeTables",922069414],["TotalPartsOfMergeTreeTables",95],["TotalRowsOfMergeTreeTables",167857091],["UncompressedCacheBytes",0],["UncompressedCacheCells",0],["Uptime",297631],["VersionInteger",21009002,"Version of the server in a single integer number in base-1000. For example, version 11.22.33 is translated to 11022033."],["Write",0,"Number of write (write, pwrite, io_getevents, etc.) syscalls in fly"],["ZooKeeperRequest",0,"Number of requests to ZooKeeper in fly."],["ZooKeeperSession",1,"Number of sessions (connections) to ZooKeeper. Should be no more than one, because using more than one connection to ZooKeeper may lead to bugs due to lack of linearizability (stale reads) that ZooKeeper consistency model allows."],["ZooKeeperWatch",1,"Number of watches (event subscriptions) in ZooKeeper."],["jemalloc.active",415367168],["jemalloc.allocated",259537136],["jemalloc.arenas.all.dirty_purged",144941416],["jemalloc.arenas.all.muzzy_purged",138378738],["jemalloc.arenas.all.pactive",6338],["jemalloc.arenas.all.pdirty",14251],["jemalloc.arenas.all.pmuzzy",50],["jemalloc.background_thread.num_runs",0],["jemalloc.background_thread.num_threads",0],["jemalloc.background_thread.run_intervals",0],["jemalloc.epoch",297926],["jemalloc.mapped",5647564800],["jemalloc.metadata",45092944],["jemalloc.metadata_thp",0],["jemalloc.resident",1381040128],["jemalloc.retained",14753529856]]}},{"key":"last_event_ingested_timestamp","metric":"Last event ingested","value":"2022-03-16T10:16:44"},{"key":"dead_letter_queue_size","metric":"Dead letter queue size","value":114794},{"key":"dead_letter_queue_events_last_day","metric":"Events sent to dead letter queue in the last 24h","value":4682},{"key":"dead_letter_queue_ratio_ok","metric":"Dead letter queue ratio healthy","value":true},{"key":"redis_alive","metric":"Redis alive","value":true},{"metric":"Redis version","value":"6.2.6"},{"metric":"Redis current queue depth","value":"0"},{"metric":"Redis connected client count","value":"28"},{"metric":"Redis memory used","value":"3.04MB"},{"metric":"Redis memory peak","value":"4.04MB"},{"metric":"Redis total memory available","value":"5.80GB"}],"internal_metrics":{}}}')},"./frontend/src/mocks/fixtures/_preflight.json":module=>{"use strict";module.exports=JSON.parse('{"django":true,"redis":true,"plugins":false,"celery":false,"db":true,"clickhouse":true,"kafka":true,"initiated":true,"cloud":false,"demo":false,"object_storage":true,"realm":"hosted-clickhouse","region":"US","available_social_auth_providers":{"github":false,"gitlab":false,"google-oauth2":false,"saml":false},"can_create_org":false,"email_service_available":false,"db_backend":"clickhouse","available_timezones":{"Africa/Abidjan":0,"Africa/Accra":0,"Africa/Addis_Ababa":3,"Africa/Algiers":1,"Africa/Asmara":3,"Africa/Bamako":0,"Africa/Bangui":1,"Africa/Banjul":0,"Africa/Bissau":0,"Africa/Blantyre":2,"Africa/Brazzaville":1,"Africa/Bujumbura":2,"Africa/Cairo":2,"Africa/Casablanca":1,"Africa/Ceuta":1,"Africa/Conakry":0,"Africa/Dakar":0,"Africa/Dar_es_Salaam":3,"Africa/Djibouti":3,"Africa/Douala":1,"Africa/El_Aaiun":1,"Africa/Freetown":0,"Africa/Gaborone":2,"Africa/Harare":2,"Africa/Johannesburg":2,"Africa/Juba":2,"Africa/Kampala":3,"Africa/Khartoum":2,"Africa/Kigali":2,"Africa/Kinshasa":1,"Africa/Lagos":1,"Africa/Libreville":1,"Africa/Lome":0,"Africa/Luanda":1,"Africa/Lubumbashi":2,"Africa/Lusaka":2,"Africa/Malabo":1,"Africa/Maputo":2,"Africa/Maseru":2,"Africa/Mbabane":2,"Africa/Mogadishu":3,"Africa/Monrovia":0,"Africa/Nairobi":3,"Africa/Ndjamena":1,"Africa/Niamey":1,"Africa/Nouakchott":0,"Africa/Ouagadougou":0,"Africa/Porto-Novo":1,"Africa/Sao_Tome":0,"Africa/Tripoli":2,"Africa/Tunis":1,"Africa/Windhoek":2,"America/Adak":-9,"America/Anchorage":-8,"America/Anguilla":-4,"America/Antigua":-4,"America/Araguaina":-3,"America/Argentina/Buenos_Aires":-3,"America/Argentina/Catamarca":-3,"America/Argentina/Cordoba":-3,"America/Argentina/Jujuy":-3,"America/Argentina/La_Rioja":-3,"America/Argentina/Mendoza":-3,"America/Argentina/Rio_Gallegos":-3,"America/Argentina/Salta":-3,"America/Argentina/San_Juan":-3,"America/Argentina/San_Luis":-3,"America/Argentina/Tucuman":-3,"America/Argentina/Ushuaia":-3,"America/Aruba":-4,"America/Asuncion":-3,"America/Atikokan":-5,"America/Bahia":-3,"America/Bahia_Banderas":-6,"America/Barbados":-4,"America/Belem":-3,"America/Belize":-6,"America/Blanc-Sablon":-4,"America/Boa_Vista":-4,"America/Bogota":-5,"America/Boise":-6,"America/Cambridge_Bay":-6,"America/Campo_Grande":-4,"America/Cancun":-5,"America/Caracas":-4,"America/Cayenne":-3,"America/Cayman":-5,"America/Chicago":-5,"America/Chihuahua":-7,"America/Costa_Rica":-6,"America/Creston":-7,"America/Cuiaba":-4,"America/Curacao":-4,"America/Danmarkshavn":0,"America/Dawson":-7,"America/Dawson_Creek":-7,"America/Denver":-6,"America/Detroit":-4,"America/Dominica":-4,"America/Edmonton":-6,"America/Eirunepe":-5,"America/El_Salvador":-6,"America/Fort_Nelson":-7,"America/Fortaleza":-3,"America/Glace_Bay":-3,"America/Goose_Bay":-3,"America/Grand_Turk":-4,"America/Grenada":-4,"America/Guadeloupe":-4,"America/Guatemala":-6,"America/Guayaquil":-5,"America/Guyana":-4,"America/Halifax":-3,"America/Havana":-4,"America/Hermosillo":-7,"America/Indiana/Indianapolis":-4,"America/Indiana/Knox":-5,"America/Indiana/Marengo":-4,"America/Indiana/Petersburg":-4,"America/Indiana/Tell_City":-5,"America/Indiana/Vevay":-4,"America/Indiana/Vincennes":-4,"America/Indiana/Winamac":-4,"America/Inuvik":-6,"America/Iqaluit":-4,"America/Jamaica":-5,"America/Juneau":-8,"America/Kentucky/Louisville":-4,"America/Kentucky/Monticello":-4,"America/Kralendijk":-4,"America/La_Paz":-4,"America/Lima":-5,"America/Los_Angeles":-7,"America/Lower_Princes":-4,"America/Maceio":-3,"America/Managua":-6,"America/Manaus":-4,"America/Marigot":-4,"America/Martinique":-4,"America/Matamoros":-5,"America/Mazatlan":-7,"America/Menominee":-5,"America/Merida":-6,"America/Metlakatla":-8,"America/Mexico_City":-6,"America/Miquelon":-2,"America/Moncton":-3,"America/Monterrey":-6,"America/Montevideo":-3,"America/Montserrat":-4,"America/Nassau":-4,"America/New_York":-4,"America/Nipigon":-4,"America/Nome":-8,"America/Noronha":-2,"America/North_Dakota/Beulah":-5,"America/North_Dakota/Center":-5,"America/North_Dakota/New_Salem":-5,"America/Nuuk":-3,"America/Ojinaga":-6,"America/Panama":-5,"America/Pangnirtung":-4,"America/Paramaribo":-3,"America/Phoenix":-7,"America/Port-au-Prince":-4,"America/Port_of_Spain":-4,"America/Porto_Velho":-4,"America/Puerto_Rico":-4,"America/Punta_Arenas":-3,"America/Rainy_River":-5,"America/Rankin_Inlet":-5,"America/Recife":-3,"America/Regina":-6,"America/Resolute":-5,"America/Rio_Branco":-5,"America/Santarem":-3,"America/Santiago":-3,"America/Santo_Domingo":-4,"America/Sao_Paulo":-3,"America/Scoresbysund":-1,"America/Sitka":-8,"America/St_Barthelemy":-4,"America/St_Johns":-2.5,"America/St_Kitts":-4,"America/St_Lucia":-4,"America/St_Thomas":-4,"America/St_Vincent":-4,"America/Swift_Current":-6,"America/Tegucigalpa":-6,"America/Thule":-3,"America/Thunder_Bay":-4,"America/Tijuana":-7,"America/Toronto":-4,"America/Tortola":-4,"America/Vancouver":-7,"America/Whitehorse":-7,"America/Winnipeg":-5,"America/Yakutat":-8,"America/Yellowknife":-6,"Antarctica/Casey":11,"Antarctica/Davis":7,"Antarctica/DumontDUrville":10,"Antarctica/Macquarie":11,"Antarctica/Mawson":5,"Antarctica/McMurdo":13,"Antarctica/Palmer":-3,"Antarctica/Rothera":-3,"Antarctica/Syowa":3,"Antarctica/Troll":0,"Antarctica/Vostok":6,"Arctic/Longyearbyen":1,"Asia/Aden":3,"Asia/Almaty":6,"Asia/Amman":2,"Asia/Anadyr":12,"Asia/Aqtau":5,"Asia/Aqtobe":5,"Asia/Ashgabat":5,"Asia/Atyrau":5,"Asia/Baghdad":3,"Asia/Bahrain":3,"Asia/Baku":4,"Asia/Bangkok":7,"Asia/Barnaul":7,"Asia/Beirut":2,"Asia/Bishkek":6,"Asia/Brunei":8,"Asia/Chita":9,"Asia/Choibalsan":8,"Asia/Colombo":5.5,"Asia/Damascus":2,"Asia/Dhaka":6,"Asia/Dili":9,"Asia/Dubai":4,"Asia/Dushanbe":5,"Asia/Famagusta":2,"Asia/Gaza":2,"Asia/Hebron":2,"Asia/Ho_Chi_Minh":7,"Asia/Hong_Kong":8,"Asia/Hovd":7,"Asia/Irkutsk":8,"Asia/Jakarta":7,"Asia/Jayapura":9,"Asia/Jerusalem":2,"Asia/Kabul":4.5,"Asia/Kamchatka":12,"Asia/Karachi":5,"Asia/Kathmandu":5.75,"Asia/Khandyga":9,"Asia/Kolkata":5.5,"Asia/Krasnoyarsk":7,"Asia/Kuala_Lumpur":8,"Asia/Kuching":8,"Asia/Kuwait":3,"Asia/Macau":8,"Asia/Magadan":11,"Asia/Makassar":8,"Asia/Manila":8,"Asia/Muscat":4,"Asia/Nicosia":2,"Asia/Novokuznetsk":7,"Asia/Novosibirsk":7,"Asia/Omsk":6,"Asia/Oral":5,"Asia/Phnom_Penh":7,"Asia/Pontianak":7,"Asia/Pyongyang":9,"Asia/Qatar":3,"Asia/Qostanay":6,"Asia/Qyzylorda":5,"Asia/Riyadh":3,"Asia/Sakhalin":11,"Asia/Samarkand":5,"Asia/Seoul":9,"Asia/Shanghai":8,"Asia/Singapore":8,"Asia/Srednekolymsk":11,"Asia/Taipei":8,"Asia/Tashkent":5,"Asia/Tbilisi":4,"Asia/Tehran":3.5,"Asia/Thimphu":6,"Asia/Tokyo":9,"Asia/Tomsk":7,"Asia/Ulaanbaatar":8,"Asia/Urumqi":6,"Asia/Ust-Nera":10,"Asia/Vientiane":7,"Asia/Vladivostok":10,"Asia/Yakutsk":9,"Asia/Yangon":6.5,"Asia/Yekaterinburg":5,"Asia/Yerevan":4,"Atlantic/Azores":-1,"Atlantic/Bermuda":-3,"Atlantic/Canary":0,"Atlantic/Cape_Verde":-1,"Atlantic/Faroe":0,"Atlantic/Madeira":0,"Atlantic/Reykjavik":0,"Atlantic/South_Georgia":-2,"Atlantic/St_Helena":0,"Atlantic/Stanley":-3,"Australia/Adelaide":10.5,"Australia/Brisbane":10,"Australia/Broken_Hill":10.5,"Australia/Darwin":9.5,"Australia/Eucla":8.75,"Australia/Hobart":11,"Australia/Lindeman":10,"Australia/Lord_Howe":11,"Australia/Melbourne":11,"Australia/Perth":8,"Australia/Sydney":11,"Canada/Atlantic":-3,"Canada/Central":-5,"Canada/Eastern":-4,"Canada/Mountain":-6,"Canada/Newfoundland":-2.5,"Canada/Pacific":-7,"Europe/Amsterdam":1,"Europe/Andorra":1,"Europe/Astrakhan":4,"Europe/Athens":2,"Europe/Belgrade":1,"Europe/Berlin":1,"Europe/Bratislava":1,"Europe/Brussels":1,"Europe/Bucharest":2,"Europe/Budapest":1,"Europe/Busingen":1,"Europe/Chisinau":2,"Europe/Copenhagen":1,"Europe/Dublin":0,"Europe/Gibraltar":1,"Europe/Guernsey":0,"Europe/Helsinki":2,"Europe/Isle_of_Man":0,"Europe/Istanbul":3,"Europe/Jersey":0,"Europe/Kaliningrad":2,"Europe/Kiev":2,"Europe/Kirov":3,"Europe/Lisbon":0,"Europe/Ljubljana":1,"Europe/London":0,"Europe/Luxembourg":1,"Europe/Madrid":1,"Europe/Malta":1,"Europe/Mariehamn":2,"Europe/Minsk":3,"Europe/Monaco":1,"Europe/Moscow":3,"Europe/Oslo":1,"Europe/Paris":1,"Europe/Podgorica":1,"Europe/Prague":1,"Europe/Riga":2,"Europe/Rome":1,"Europe/Samara":4,"Europe/San_Marino":1,"Europe/Sarajevo":1,"Europe/Saratov":4,"Europe/Simferopol":3,"Europe/Skopje":1,"Europe/Sofia":2,"Europe/Stockholm":1,"Europe/Tallinn":2,"Europe/Tirane":1,"Europe/Ulyanovsk":4,"Europe/Uzhgorod":2,"Europe/Vaduz":1,"Europe/Vatican":1,"Europe/Vienna":1,"Europe/Vilnius":2,"Europe/Volgograd":3,"Europe/Warsaw":1,"Europe/Zagreb":1,"Europe/Zaporozhye":2,"Europe/Zurich":1,"GMT":0,"Indian/Antananarivo":3,"Indian/Chagos":6,"Indian/Christmas":7,"Indian/Cocos":6.5,"Indian/Comoro":3,"Indian/Kerguelen":5,"Indian/Mahe":4,"Indian/Maldives":5,"Indian/Mauritius":4,"Indian/Mayotte":3,"Indian/Reunion":4,"Pacific/Apia":14,"Pacific/Auckland":13,"Pacific/Bougainville":11,"Pacific/Chatham":13.75,"Pacific/Chuuk":10,"Pacific/Easter":-5,"Pacific/Efate":11,"Pacific/Enderbury":13,"Pacific/Fakaofo":13,"Pacific/Fiji":12,"Pacific/Funafuti":12,"Pacific/Galapagos":-6,"Pacific/Gambier":-9,"Pacific/Guadalcanal":11,"Pacific/Guam":10,"Pacific/Honolulu":-10,"Pacific/Kiritimati":14,"Pacific/Kosrae":11,"Pacific/Kwajalein":12,"Pacific/Majuro":12,"Pacific/Marquesas":-9.5,"Pacific/Midway":-11,"Pacific/Nauru":12,"Pacific/Niue":-11,"Pacific/Norfolk":12,"Pacific/Noumea":11,"Pacific/Pago_Pago":-11,"Pacific/Palau":9,"Pacific/Pitcairn":-8,"Pacific/Pohnpei":11,"Pacific/Port_Moresby":10,"Pacific/Rarotonga":-10,"Pacific/Saipan":10,"Pacific/Tahiti":-10,"Pacific/Tarawa":12,"Pacific/Tongatapu":13,"Pacific/Wake":12,"Pacific/Wallis":12,"US/Alaska":-8,"US/Arizona":-7,"US/Central":-5,"US/Eastern":-4,"US/Hawaii":-10,"US/Mountain":-6,"US/Pacific":-7,"UTC":0},"opt_out_capture":false,"is_debug":true,"licensed_users_available":21311,"site_url":"http://localhost:6006","instance_preferences":{"debug_queries":false,"disable_paid_fs":false}}')},"./frontend/src/mocks/fixtures/_system_status.json":module=>{"use strict";module.exports=JSON.parse('{"results":[{"key":"ingestion_server","metric":"Event ingestion via","value":"Plugin Server"},{"key":"plugin_sever_alive","metric":"Plugin server alive","value":true},{"key":"plugin_sever_version","metric":"Plugin server version","value":"0.15.5"},{"key":"db_alive","metric":"Postgres database alive","value":true},{"key":"pg_version","metric":"Postgres version","value":"13.0.1"},{"metric":"Postgres elements table size","value":"~3508 rows (~840 kB)"},{"metric":"Postgres events table size","value":"~5003 rows (~7032 kB)"},{"metric":"Postgres session recording table size","value":"~536 rows (~4608 kB)"},{"key":"redis_alive","metric":"Redis alive","value":true},{"metric":"Redis version","value":"6.0.10"},{"metric":"Redis current queue depth","value":"0"},{"metric":"Redis connected client count","value":"37"},{"metric":"Redis memory used","value":"2.10MB"},{"metric":"Redis memory peak","value":"12.00MB"},{"metric":"Redis total memory available","value":"64.00GB"}]}')},"./frontend/src/queries/schema.json":module=>{"use strict";module.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"ActionConversionGoal":{"additionalProperties":false,"properties":{"actionId":{"type":"integer"}},"required":["actionId"],"type":"object"},"ActionsNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"id":{"type":"integer"},"kind":{"const":"ActionsNode","type":"string"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["id","kind"],"type":"object"},"ActorsPropertyTaxonomyQuery":{"additionalProperties":false,"properties":{"group_type_index":{"type":"integer"},"kind":{"const":"ActorsPropertyTaxonomyQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"property":{"type":"string"},"response":{"$ref":"#/definitions/ActorsPropertyTaxonomyQueryResponse"}},"required":["kind","property"],"type":"object"},"ActorsPropertyTaxonomyQueryResponse":{"additionalProperties":false,"description":"All analytics query responses must inherit from this.","properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/ActorsPropertyTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"ActorsPropertyTaxonomyResponse":{"additionalProperties":false,"properties":{"sample_count":{"type":"integer"},"sample_values":{"items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"integer"}]},"type":"array"}},"required":["sample_values","sample_count"],"type":"object"},"ActorsQuery":{"additionalProperties":false,"properties":{"fixedProperties":{"description":"Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.","items":{"$ref":"#/definitions/AnyPersonScopeFilter"},"type":"array"},"kind":{"const":"ActorsQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"orderBy":{"items":{"type":"string"},"type":"array"},"properties":{"description":"Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.","items":{"$ref":"#/definitions/AnyPersonScopeFilter"},"type":"array"},"response":{"$ref":"#/definitions/ActorsQueryResponse"},"search":{"type":"string"},"select":{"items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"},"source":{"anyOf":[{"$ref":"#/definitions/InsightActorsQuery"},{"$ref":"#/definitions/FunnelsActorsQuery"},{"$ref":"#/definitions/FunnelCorrelationActorsQuery"},{"$ref":"#/definitions/HogQLQuery"}]}},"required":["kind"],"type":"object"},"ActorsQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"missing_actors_count":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","limit","offset","results","types"],"type":"object"},"AggregationAxisFormat":{"enum":["numeric","duration","duration_ms","percentage","percentage_scaled"],"type":"string"},"AlertCalculationInterval":{"enum":["hourly","daily","weekly","monthly"],"type":"string"},"AlertCondition":{"additionalProperties":false,"properties":{"type":{"$ref":"#/definitions/AlertConditionType"}},"required":["type"],"type":"object"},"AlertConditionType":{"enum":["absolute_value","relative_increase","relative_decrease"],"type":"string"},"AlertState":{"enum":["Firing","Not firing","Errored","Snoozed"],"type":"string"},"AnyDataNode":{"anyOf":[{"$ref":"#/definitions/EventsNode"},{"$ref":"#/definitions/ActionsNode"},{"$ref":"#/definitions/PersonsNode"},{"$ref":"#/definitions/EventsQuery"},{"$ref":"#/definitions/ActorsQuery"},{"$ref":"#/definitions/InsightActorsQuery"},{"$ref":"#/definitions/InsightActorsQueryOptions"},{"$ref":"#/definitions/SessionsTimelineQuery"},{"$ref":"#/definitions/HogQuery"},{"$ref":"#/definitions/HogQLQuery"},{"$ref":"#/definitions/HogQLMetadata"},{"$ref":"#/definitions/HogQLAutocomplete"},{"$ref":"#/definitions/WebOverviewQuery"},{"$ref":"#/definitions/WebStatsTableQuery"},{"$ref":"#/definitions/WebExternalClicksTableQuery"},{"$ref":"#/definitions/WebGoalsQuery"},{"$ref":"#/definitions/SessionAttributionExplorerQuery"},{"$ref":"#/definitions/ErrorTrackingQuery"},{"$ref":"#/definitions/ExperimentFunnelsQuery"},{"$ref":"#/definitions/ExperimentTrendsQuery"},{"$ref":"#/definitions/RecordingsQuery"}]},"AnyEntityNode":{"anyOf":[{"$ref":"#/definitions/EventsNode"},{"$ref":"#/definitions/ActionsNode"},{"$ref":"#/definitions/DataWarehouseNode"}]},"AnyFilterLike":{"anyOf":[{"$ref":"#/definitions/AnyPropertyFilter"},{"$ref":"#/definitions/PropertyGroupFilter"},{"$ref":"#/definitions/PropertyGroupFilterValue"}]},"AnyPersonScopeFilter":{"anyOf":[{"$ref":"#/definitions/PersonPropertyFilter"},{"$ref":"#/definitions/CohortPropertyFilter"},{"$ref":"#/definitions/HogQLPropertyFilter"},{"$ref":"#/definitions/EmptyPropertyFilter"}],"description":"Any filter type supported by `property_to_expr(scope=\\"person\\", ...)`."},"AnyPropertyFilter":{"anyOf":[{"$ref":"#/definitions/EventPropertyFilter"},{"$ref":"#/definitions/PersonPropertyFilter"},{"$ref":"#/definitions/ElementPropertyFilter"},{"$ref":"#/definitions/SessionPropertyFilter"},{"$ref":"#/definitions/CohortPropertyFilter"},{"$ref":"#/definitions/RecordingPropertyFilter"},{"$ref":"#/definitions/LogEntryPropertyFilter"},{"$ref":"#/definitions/GroupPropertyFilter"},{"$ref":"#/definitions/FeaturePropertyFilter"},{"$ref":"#/definitions/HogQLPropertyFilter"},{"$ref":"#/definitions/EmptyPropertyFilter"},{"$ref":"#/definitions/DataWarehousePropertyFilter"},{"$ref":"#/definitions/DataWarehousePersonPropertyFilter"}]},"AnyResponseType":{"anyOf":[{"type":"object"},{"$ref":"#/definitions/HogQueryResponse"},{"$ref":"#/definitions/HogQLQueryResponse"},{"$ref":"#/definitions/HogQLMetadataResponse"},{"$ref":"#/definitions/HogQLAutocompleteResponse"},{"type":"object"},{"not":{}},{"$ref":"#/definitions/EventsQueryResponse"},{"$ref":"#/definitions/ErrorTrackingQueryResponse"}]},"AssistantArrayPropertyFilter":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/definitions/AssistantArrayPropertyFilterOperator","description":"`exact` - exact match of any of the values. `is_not` - does not match any of the values."},"value":{"description":"Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \\"true\\" or \\"false\\".","items":{"type":"string"},"type":"array"}},"required":["operator","value"],"type":"object"},"AssistantArrayPropertyFilterOperator":{"enum":["exact","is_not"],"type":"string"},"AssistantBaseMultipleBreakdownFilter":{"additionalProperties":false,"properties":{"property":{"description":"Property name from the plan to break down by.","type":"string"}},"required":["property"],"type":"object"},"AssistantBasePropertyFilter":{"anyOf":[{"$ref":"#/definitions/AssistantStringNumberOrBooleanPropertyFilter"},{"$ref":"#/definitions/AssistantDateTimePropertyFilter"},{"$ref":"#/definitions/AssistantSetPropertyFilter"}]},"AssistantBreakdownFilter":{"additionalProperties":false,"properties":{"breakdown_limit":{"default":25,"description":"How many distinct values to show.","type":"integer"}},"type":"object"},"AssistantDateTimePropertyFilter":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/definitions/AssistantDateTimePropertyFilterOperator"},"value":{"description":"Value must be a date in ISO 8601 format.","type":"string"}},"required":["operator","value"],"type":"object"},"AssistantDateTimePropertyFilterOperator":{"enum":["is_date_exact","is_date_before","is_date_after"],"type":"string"},"AssistantEventMultipleBreakdownFilterType":{"enum":["person","event","session","hogql"],"type":"string"},"AssistantEventType":{"enum":["status","message","conversation"],"type":"string"},"AssistantFunnelsBreakdownFilter":{"additionalProperties":false,"properties":{"breakdown":{"description":"The entity property to break down by.","type":"string"},"breakdown_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"If `breakdown_type` is `group`, this is the index of the group. Use the index from the group mapping."},"breakdown_limit":{"default":25,"description":"How many distinct values to show.","type":"integer"},"breakdown_type":{"$ref":"#/definitions/AssistantFunnelsBreakdownType","default":"event","description":"Type of the entity to break down by. If `group` is used, you must also provide `breakdown_group_type_index` from the group mapping."}},"required":["breakdown_type","breakdown"],"type":"object"},"AssistantFunnelsBreakdownType":{"enum":["person","event","group","session"],"type":"string"},"AssistantFunnelsEventsNode":{"additionalProperties":false,"properties":{"custom_name":{"description":"Optional custom name for the event if it is needed to be renamed.","type":"string"},"event":{"description":"Name of the event.","type":"string"},"kind":{"const":"EventsNode","type":"string"},"math":{"$ref":"#/definitions/AssistantTrendsMath","description":"Optional math aggregation type for the series. Only specify this math type if the user wants one of these. `first_time_for_user` - counts the number of users who have completed the event for the first time ever. `first_time_for_user_with_filters` - counts the number of users who have completed the event with specified filters for the first time."},"properties":{"items":{"$ref":"#/definitions/AssistantPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["event","kind"],"type":"object"},"AssistantFunnelsExclusionEventsNode":{"additionalProperties":false,"description":"Exclustion steps for funnels. The \\"from\\" and \\"to\\" steps must not exceed the funnel\'s series length.","properties":{"event":{"type":"string"},"funnelFromStep":{"type":"integer"},"funnelToStep":{"type":"integer"},"kind":{"const":"EventsNode","type":"string"}},"required":["event","funnelFromStep","funnelToStep","kind"],"type":"object"},"AssistantFunnelsFilter":{"additionalProperties":false,"properties":{"binCount":{"description":"Use this setting only when `funnelVizType` is `time_to_convert`: number of bins to show in histogram.","type":"integer"},"exclusions":{"default":[],"description":"Users may want to use exclusion events to filter out conversions in which a particular event occurred between specific steps. These events must not be included in the main sequence. You must include start and end indexes for each exclusion where the minimum index is one and the maximum index is the number of steps in the funnel. For example, there is a sequence with three steps: sign up, finish onboarding, purchase. If the user wants to exclude all conversions in which users left the page before finishing the onboarding, the exclusion step would be the event `$pageleave` with start index 2 and end index 3.","items":{"$ref":"#/definitions/AssistantFunnelsExclusionEventsNode"},"type":"array"},"funnelAggregateByHogQL":{"const":"properties.$session_id","description":"Use this field only if the user explicitly asks to aggregate the funnel by unique sessions.","type":"string"},"funnelOrderType":{"$ref":"#/definitions/StepOrderValue","default":"ordered","description":"Defines the behavior of event matching between steps. Prefer the `strict` option unless explicitly told to use a different one. `ordered` - defines a sequential funnel. Step B must happen after Step A, but any number of events can happen between A and B. `strict` - defines a funnel where all events must happen in order. Step B must happen directly after Step A without any events in between. `any` - order doesn\'t matter. Steps can be completed in any sequence."},"funnelStepReference":{"$ref":"#/definitions/FunnelStepReference","default":"total","description":"Whether conversion shown in the graph should be across all steps or just relative to the previous step."},"funnelVizType":{"$ref":"#/definitions/FunnelVizType","default":"steps","description":"Defines the type of visualization to use. The `steps` option is recommended. `steps` - shows a step-by-step funnel. Perfect to show a conversion rate of a sequence of events (default). `time_to_convert` - shows a histogram of the time it took to complete the funnel. Use this if the user asks about the average time it takes to complete the funnel. `trends` - shows a trend of the whole sequence\'s conversion rate over time. Use this if the user wants to see how the conversion rate changes over time."},"funnelWindowInterval":{"default":14,"description":"Controls a time frame value for a conversion to be considered. Select a reasonable value based on the user\'s query. Use in combination with `funnelWindowIntervalUnit`. The default value is 14 days.","type":"integer"},"funnelWindowIntervalUnit":{"$ref":"#/definitions/FunnelConversionWindowTimeUnit","default":"day","description":"Controls a time frame interval for a conversion to be considered. Select a reasonable value based on the user\'s query. Use in combination with `funnelWindowInterval`. The default value is 14 days."},"layout":{"$ref":"#/definitions/FunnelLayout","default":"vertical","description":"Controls how the funnel chart is displayed: vertically (preferred) or horizontally."}},"type":"object"},"AssistantFunnelsQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"description":"Use this field to define the aggregation by a specific group from the group mapping that the user has provided.","type":"integer"},"breakdownFilter":{"$ref":"#/definitions/AssistantFunnelsBreakdownFilter","description":"Breakdown the chart by a property"},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"funnelsFilter":{"$ref":"#/definitions/AssistantFunnelsFilter","description":"Properties specific to the funnels insight"},"interval":{"$ref":"#/definitions/IntervalType","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"FunnelsQuery","type":"string"},"properties":{"default":[],"description":"Property filters for all series","items":{"$ref":"#/definitions/AssistantPropertyFilter"},"type":"array"},"samplingFactor":{"description":"Sampling rate from 0 to 1 where 1 is 100% of the data.","type":["number","null"]},"series":{"description":"Events to include","items":{"$ref":"#/definitions/AssistantFunnelsEventsNode"},"type":"array"}},"required":["kind","series"],"type":"object"},"AssistantGenerationStatusEvent":{"additionalProperties":false,"properties":{"type":{"$ref":"#/definitions/AssistantGenerationStatusType"}},"required":["type"],"type":"object"},"AssistantGenerationStatusType":{"enum":["ack","generation_error"],"type":"string"},"AssistantGenericMultipleBreakdownFilter":{"additionalProperties":false,"properties":{"property":{"description":"Property name from the plan to break down by.","type":"string"},"type":{"$ref":"#/definitions/AssistantEventMultipleBreakdownFilterType"}},"required":["property","type"],"type":"object"},"AssistantGenericPropertyFilter":{"anyOf":[{"additionalProperties":false,"properties":{"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantSingleValuePropertyFilterOperator","description":"`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern."},"type":{"enum":["event","person","session","feature"],"type":"string"},"value":{"description":"Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid ClickHouse regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value.","type":"string"}},"required":["key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantArrayPropertyFilterOperator","description":"`exact` - exact match of any of the values. `is_not` - does not match any of the values."},"type":{"enum":["event","person","session","feature"],"type":"string"},"value":{"description":"Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \\"true\\" or \\"false\\".","items":{"type":"string"},"type":"array"}},"required":["key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantDateTimePropertyFilterOperator"},"type":{"enum":["event","person","session","feature"],"type":"string"},"value":{"description":"Value must be a date in ISO 8601 format.","type":"string"}},"required":["key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantSetPropertyFilterOperator","description":"`is_set` - the property has any value. `is_not_set` - the property doesn\'t have a value or wasn\'t collected."},"type":{"enum":["event","person","session","feature"],"type":"string"}},"required":["key","operator","type"],"type":"object"}]},"AssistantGroupMultipleBreakdownFilter":{"additionalProperties":false,"properties":{"group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Index of the group type from the group mapping."},"property":{"description":"Property name from the plan to break down by.","type":"string"},"type":{"const":"group","type":"string"}},"required":["property","type"],"type":"object"},"AssistantGroupPropertyFilter":{"anyOf":[{"additionalProperties":false,"properties":{"group_type_index":{"description":"Index of the group type from the group mapping.","type":"integer"},"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantSingleValuePropertyFilterOperator","description":"`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern."},"type":{"const":"group","type":"string"},"value":{"description":"Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid ClickHouse regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value.","type":"string"}},"required":["group_type_index","key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"group_type_index":{"description":"Index of the group type from the group mapping.","type":"integer"},"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantArrayPropertyFilterOperator","description":"`exact` - exact match of any of the values. `is_not` - does not match any of the values."},"type":{"const":"group","type":"string"},"value":{"description":"Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \\"true\\" or \\"false\\".","items":{"type":"string"},"type":"array"}},"required":["group_type_index","key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"group_type_index":{"description":"Index of the group type from the group mapping.","type":"integer"},"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantDateTimePropertyFilterOperator"},"type":{"const":"group","type":"string"},"value":{"description":"Value must be a date in ISO 8601 format.","type":"string"}},"required":["group_type_index","key","operator","type","value"],"type":"object"},{"additionalProperties":false,"properties":{"group_type_index":{"description":"Index of the group type from the group mapping.","type":"integer"},"key":{"description":"Use one of the properties the user has provided in the plan.","type":"string"},"operator":{"$ref":"#/definitions/AssistantSetPropertyFilterOperator","description":"`is_set` - the property has any value. `is_not_set` - the property doesn\'t have a value or wasn\'t collected."},"type":{"const":"group","type":"string"}},"required":["group_type_index","key","operator","type"],"type":"object"}]},"AssistantInsightsQueryBase":{"additionalProperties":false,"properties":{"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"properties":{"default":[],"description":"Property filters for all series","items":{"$ref":"#/definitions/AssistantPropertyFilter"},"type":"array"},"samplingFactor":{"description":"Sampling rate from 0 to 1 where 1 is 100% of the data.","type":["number","null"]}},"type":"object"},"AssistantMessage":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"type":{"const":"ai","type":"string"}},"required":["type","content"],"type":"object"},"AssistantMessageType":{"enum":["human","ai","ai/reasoning","ai/viz","ai/failure","ai/router"],"type":"string"},"AssistantMultipleBreakdownFilter":{"anyOf":[{"$ref":"#/definitions/AssistantGroupMultipleBreakdownFilter"},{"$ref":"#/definitions/AssistantGenericMultipleBreakdownFilter"}]},"AssistantPropertyFilter":{"anyOf":[{"$ref":"#/definitions/AssistantGenericPropertyFilter"},{"$ref":"#/definitions/AssistantGroupPropertyFilter"}]},"AssistantSetPropertyFilter":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/definitions/AssistantSetPropertyFilterOperator","description":"`is_set` - the property has any value. `is_not_set` - the property doesn\'t have a value or wasn\'t collected."}},"required":["operator"],"type":"object"},"AssistantSetPropertyFilterOperator":{"enum":["is_set","is_not_set"],"type":"string"},"AssistantSingleValuePropertyFilter":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/definitions/AssistantSingleValuePropertyFilterOperator","description":"`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern."},"value":{"description":"Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid ClickHouse regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value.","type":"string"}},"required":["operator","value"],"type":"object"},"AssistantSingleValuePropertyFilterOperator":{"enum":["exact","is_not","icontains","not_icontains","regex","not_regex"],"type":"string"},"AssistantStringNumberOrBooleanPropertyFilter":{"anyOf":[{"$ref":"#/definitions/AssistantSingleValuePropertyFilter"},{"$ref":"#/definitions/AssistantArrayPropertyFilter"}]},"AssistantTrendsBreakdownFilter":{"additionalProperties":false,"properties":{"breakdown_limit":{"default":25,"description":"How many distinct values to show.","type":"integer"},"breakdowns":{"description":"Use this field to define breakdowns.","items":{"$ref":"#/definitions/AssistantMultipleBreakdownFilter"},"maxLength":3,"type":"array"}},"required":["breakdowns"],"type":"object"},"AssistantTrendsDisplayType":{"anyOf":[{"const":"ActionsLineGraph","type":"string"},{"const":"ActionsBar","type":"string"},{"const":"ActionsAreaGraph","type":"string"},{"const":"ActionsLineGraphCumulative","type":"string"},{"const":"BoldNumber","type":"string"},{"const":"ActionsPie","type":"string"},{"const":"ActionsBarValue","type":"string"},{"const":"ActionsTable","type":"string"},{"const":"WorldMap","type":"string"},{"not":{}}]},"AssistantTrendsEventsNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"event":{"description":"The event or `null` for all events.","type":["string","null"]},"kind":{"const":"EventsNode","type":"string"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"orderBy":{"description":"Columns to order by","items":{"type":"string"},"type":"array"},"properties":{"items":{"$ref":"#/definitions/AssistantPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["kind"],"type":"object"},"AssistantTrendsFilter":{"additionalProperties":false,"properties":{"aggregationAxisFormat":{"$ref":"#/definitions/AggregationAxisFormat","default":"numeric","description":"Formats the trends value axis. Do not use the formatting unless you are absolutely sure that formatting will match the data. `numeric` - no formatting. Prefer this option by default. `duration` - formats the value in seconds to a human-readable duration, e.g., `132` becomes `2 minutes 12 seconds`. Use this option only if you are sure that the values are in seconds. `duration_ms` - formats the value in miliseconds to a human-readable duration, e.g., `1050` becomes `1 second 50 milliseconds`. Use this option only if you are sure that the values are in miliseconds. `percentage` - adds a percentage sign to the value, e.g., `50` becomes `50%`. `percentage_scaled` - formats the value as a percentage scaled to 0-100, e.g., `0.5` becomes `50%`."},"aggregationAxisPostfix":{"description":"Custom postfix to add to the aggregation axis, e.g., ` clicks` to format 5 as `5 clicks`. You may need to add a space before postfix.","type":"string"},"aggregationAxisPrefix":{"description":"Custom prefix to add to the aggregation axis, e.g., `$` for USD dollars. You may need to add a space after prefix.","type":"string"},"decimalPlaces":{"description":"Number of decimal places to show. Do not add this unless you are sure that values will have a decimal point.","type":"number"},"display":{"default":"ActionsLineGraph","description":"Visualization type. Available values: `ActionsLineGraph` - time-series line chart; most common option, as it shows change over time. `ActionsBar` - time-series bar chart. `ActionsAreaGraph` - time-series area chart. `ActionsLineGraphCumulative` - cumulative time-series line chart; good for cumulative metrics. `BoldNumber` - total value single large number. You can\'t use this with breakdown; use when user explicitly asks for a single output number. `ActionsBarValue` - total value (NOT time-series) bar chart; good for categorical data. `ActionsPie` - total value pie chart; good for visualizing proportions. `ActionsTable` - total value table; good when using breakdown to list users or other entities. `WorldMap` - total value world map; use when breaking down by country name using property `$geoip_country_name`, and only then.","enum":["ActionsLineGraph","ActionsBar","ActionsAreaGraph","ActionsLineGraphCumulative","BoldNumber","ActionsPie","ActionsBarValue","ActionsTable","WorldMap"],"type":"string"},"formula":{"description":"If the formula is provided, apply it here.","type":"string"},"showLegend":{"default":false,"description":"Whether to show the legend describing series and breakdowns.","type":"boolean"},"showPercentStackView":{"default":false,"description":"Whether to show a percentage of each series. Use only with","type":"boolean"},"showValuesOnSeries":{"default":false,"description":"Whether to show a value on each data point.","type":"boolean"},"yAxisScaleType":{"default":"linear","description":"Whether to scale the y-axis.","enum":["log10","linear"],"type":"string"}},"type":"object"},"AssistantTrendsMath":{"enum":["first_time_for_user","first_time_for_user_with_filters"],"type":"string"},"AssistantTrendsQuery":{"additionalProperties":false,"properties":{"breakdownFilter":{"$ref":"#/definitions/AssistantTrendsBreakdownFilter","description":"Breakdown of the events"},"compareFilter":{"$ref":"#/definitions/CompareFilter","description":"Compare to date range"},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"interval":{"$ref":"#/definitions/IntervalType","default":"day","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"TrendsQuery","type":"string"},"properties":{"default":[],"description":"Property filters for all series","items":{"$ref":"#/definitions/AssistantPropertyFilter"},"type":"array"},"samplingFactor":{"description":"Sampling rate from 0 to 1 where 1 is 100% of the data.","type":["number","null"]},"series":{"description":"Events to include","items":{"$ref":"#/definitions/AssistantTrendsEventsNode"},"type":"array"},"trendsFilter":{"$ref":"#/definitions/AssistantTrendsFilter","description":"Properties specific to the trends insight"}},"required":["kind","series"],"type":"object"},"AutocompleteCompletionItem":{"additionalProperties":false,"properties":{"detail":{"description":"A human-readable string with additional information about this item, like type or symbol information.","type":"string"},"documentation":{"description":"A human-readable string that represents a doc-comment.","type":"string"},"insertText":{"description":"A string or snippet that should be inserted in a document when selecting this completion.","type":"string"},"kind":{"$ref":"#/definitions/AutocompleteCompletionItemKind","description":"The kind of this completion item. Based on the kind an icon is chosen by the editor."},"label":{"description":"The label of this completion item. By default this is also the text that is inserted when selecting this completion.","type":"string"}},"required":["label","insertText","kind"],"type":"object"},"AutocompleteCompletionItemKind":{"enum":["Method","Function","Constructor","Field","Variable","Class","Struct","Interface","Module","Property","Event","Operator","Unit","Value","Constant","Enum","EnumMember","Keyword","Text","Color","File","Reference","Customcolor","Folder","TypeParameter","User","Issue","Snippet"],"type":"string"},"BaseAssistantMessage":{"additionalProperties":false,"properties":{"id":{"type":"string"}},"type":"object"},"BaseMathType":{"enum":["total","dau","weekly_active","monthly_active","unique_session","first_time_for_user","first_matching_event_for_user"],"type":"string"},"BinCountValue":{"anyOf":[{"type":"number"},{"const":"auto","type":"string"}]},"Breakdown":{"additionalProperties":false,"properties":{"group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"histogram_bin_count":{"type":"integer"},"normalize_url":{"type":"boolean"},"property":{"type":"string"},"type":{"anyOf":[{"$ref":"#/definitions/MultipleBreakdownType"},{"type":"null"}]}},"required":["property"],"type":"object"},"BreakdownAttributionType":{"enum":["first_touch","last_touch","all_events","step"],"type":"string"},"BreakdownFilter":{"additionalProperties":false,"properties":{"breakdown":{"anyOf":[{"type":"string"},{"type":"integer"},{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},{"type":"null"}]},"breakdown_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"breakdown_hide_other_aggregation":{"type":["boolean","null"]},"breakdown_histogram_bin_count":{"type":"integer"},"breakdown_limit":{"type":"integer"},"breakdown_normalize_url":{"type":"boolean"},"breakdown_type":{"anyOf":[{"$ref":"#/definitions/BreakdownType"},{"type":"null"}],"default":"event"},"breakdowns":{"items":{"$ref":"#/definitions/Breakdown"},"maxLength":3,"type":"array"}},"type":"object"},"BreakdownItem":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/BreakdownValueInt"}]}},"required":["label","value"],"type":"object"},"BreakdownKeyType":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"number"},{"items":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"number"}]},"type":"array"},{"type":"null"}]},"BreakdownType":{"enum":["cohort","person","event","group","session","hogql","data_warehouse","data_warehouse_person_property"],"type":"string"},"BreakdownValueInt":{"type":"integer"},"CacheMissResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":["string","null"]},"query_status":{"$ref":"#/definitions/QueryStatus"}},"required":["cache_key"],"type":"object"},"CachedActorsPropertyTaxonomyQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/ActorsPropertyTaxonomyResponse"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedActorsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"missing_actors_count":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["cache_key","columns","hogql","is_cached","last_refresh","limit","next_allowed_client_refresh","offset","results","timezone","types"],"type":"object"},"CachedErrorTrackingQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{"type":"string"},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/ErrorTrackingIssue"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedEventTaxonomyQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/EventTaxonomyResponse"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedEventsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["cache_key","columns","hogql","is_cached","last_refresh","next_allowed_client_refresh","results","timezone","types"],"type":"object"},"CachedExperimentFunnelsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"expected_loss":{"type":"number"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"insight":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"is_cached":{"type":"boolean"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"last_refresh":{"format":"date-time","type":"string"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"timezone":{"type":"string"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantFunnelsBaseStats"},"type":"array"}},"required":["cache_key","credible_intervals","expected_loss","insight","is_cached","kind","last_refresh","next_allowed_client_refresh","probability","significance_code","significant","timezone","variants"],"type":"object"},"CachedExperimentTrendsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"count_query":{"$ref":"#/definitions/TrendsQuery"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"insight":{"items":{"type":"object"},"type":"array"},"is_cached":{"type":"boolean"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"last_refresh":{"format":"date-time","type":"string"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"p_value":{"type":"number"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"timezone":{"type":"string"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantTrendsBaseStats"},"type":"array"}},"required":["cache_key","credible_intervals","insight","is_cached","kind","last_refresh","next_allowed_client_refresh","p_value","probability","significance_code","significant","timezone","variants"],"type":"object"},"CachedFunnelCorrelationResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/FunnelCorrelationResult"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedFunnelsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"isUdf":{"type":"boolean"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"anyOf":[{"$ref":"#/definitions/FunnelStepsResults"},{"$ref":"#/definitions/FunnelStepsBreakdownResults"},{"$ref":"#/definitions/FunnelTimeToConvertResults"},{"$ref":"#/definitions/FunnelTrendsResults"}]},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedHogQLQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"clickhouse":{"description":"Executed ClickHouse query","type":"string"},"columns":{"description":"Returned columns","items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"explain":{"description":"Query explanation output","items":{"type":"string"},"type":"array"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"metadata":{"$ref":"#/definitions/HogQLMetadataResponse","description":"Query metadata output"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query":{"description":"Input query string","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"description":"Types of returned columns","items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedInsightActorsQueryOptionsResponse":{"additionalProperties":false,"properties":{"breakdown":{"items":{"$ref":"#/definitions/BreakdownItem"},"type":"array"},"breakdowns":{"items":{"$ref":"#/definitions/MultipleBreakdownOptions"},"type":"array"},"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"compare":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"day":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/DatetimeDay"},{"$ref":"#/definitions/Day"}]}},"required":["label","value"],"type":"object"},"type":"array"},"interval":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"description":"An interval selected out of available intervals in source query","type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"series":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"status":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"timezone":{"type":"string"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","timezone"],"type":"object"},"CachedLifecycleQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedPathsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedRetentionQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/RetentionResult"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedSessionAttributionExplorerQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedSessionsTimelineQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/TimelineEntry"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedStickinessQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedSuggestedQuestionsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"questions":{"items":{"type":"string"},"type":"array"},"timezone":{"type":"string"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","questions","timezone"],"type":"object"},"CachedTeamTaxonomyQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/TeamTaxonomyResponse"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedTrendsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"description":"Wether more breakdown values are available.","type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedWebExternalClicksTableQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedWebGoalsQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedWebOverviewQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/WebOverviewItem"},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"CachedWebStatsTableQueryResponse":{"additionalProperties":false,"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"ChartAxis":{"additionalProperties":false,"properties":{"column":{"type":"string"},"settings":{"additionalProperties":false,"properties":{"display":{"$ref":"#/definitions/ChartSettingsDisplay"},"formatting":{"$ref":"#/definitions/ChartSettingsFormatting"}},"type":"object"}},"required":["column"],"type":"object"},"ChartDisplayType":{"enum":["ActionsLineGraph","ActionsBar","ActionsStackedBar","ActionsAreaGraph","ActionsLineGraphCumulative","BoldNumber","ActionsPie","ActionsBarValue","ActionsTable","WorldMap"],"type":"string"},"ChartSettings":{"additionalProperties":false,"properties":{"goalLines":{"items":{"$ref":"#/definitions/GoalLine"},"type":"array"},"leftYAxisSettings":{"$ref":"#/definitions/YAxisSettings"},"rightYAxisSettings":{"$ref":"#/definitions/YAxisSettings"},"seriesBreakdownColumn":{"type":["string","null"]},"stackBars100":{"description":"Whether we fill the bars to 100% in stacked mode","type":"boolean"},"xAxis":{"$ref":"#/definitions/ChartAxis"},"yAxis":{"items":{"$ref":"#/definitions/ChartAxis"},"type":"array"},"yAxisAtZero":{"description":"Deprecated: use `[left|right]YAxisSettings`. Whether the Y axis should start at zero","type":"boolean"}},"type":"object"},"ChartSettingsDisplay":{"additionalProperties":false,"properties":{"color":{"type":"string"},"displayType":{"enum":["auto","line","bar"],"type":"string"},"label":{"type":"string"},"trendLine":{"type":"boolean"},"yAxisPosition":{"enum":["left","right"],"type":"string"}},"type":"object"},"ChartSettingsFormatting":{"additionalProperties":false,"properties":{"decimalPlaces":{"type":"number"},"prefix":{"type":"string"},"style":{"enum":["none","number","percent"],"type":"string"},"suffix":{"type":"string"}},"type":"object"},"ClickhouseQueryProgress":{"additionalProperties":false,"properties":{"active_cpu_time":{"type":"integer"},"bytes_read":{"type":"integer"},"estimated_rows_total":{"type":"integer"},"rows_read":{"type":"integer"},"time_elapsed":{"type":"integer"}},"required":["bytes_read","rows_read","estimated_rows_total","time_elapsed","active_cpu_time"],"type":"object"},"CohortPropertyFilter":{"additionalProperties":false,"description":"Sync with plugin-server/src/types.ts","properties":{"key":{"const":"id","type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator","default":"in"},"type":{"const":"cohort","type":"string"},"value":{"type":"integer"}},"required":["key","operator","type","value"],"type":"object"},"CompareFilter":{"additionalProperties":false,"properties":{"compare":{"default":false,"description":"Whether to compare the current date range to a previous date range.","type":"boolean"},"compare_to":{"description":"The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.","type":"string"}},"type":"object"},"ConditionalFormattingRule":{"additionalProperties":false,"properties":{"bytecode":{"items":{},"type":"array"},"color":{"type":"string"},"colorMode":{"enum":["light","dark"],"type":"string"},"columnName":{"type":"string"},"id":{"type":"string"},"input":{"type":"string"},"templateId":{"type":"string"}},"required":["id","templateId","columnName","bytecode","input","color"],"type":"object"},"CountPerActorMathType":{"enum":["avg_count_per_actor","min_count_per_actor","max_count_per_actor","median_count_per_actor","p90_count_per_actor","p95_count_per_actor","p99_count_per_actor"],"type":"string"},"CustomChannelCondition":{"additionalProperties":false,"properties":{"id":{"type":"string"},"key":{"$ref":"#/definitions/CustomChannelField"},"op":{"$ref":"#/definitions/CustomChannelOperator"},"value":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}},"required":["key","op","id"],"type":"object"},"CustomChannelField":{"enum":["utm_source","utm_medium","utm_campaign","referring_domain"],"type":"string"},"CustomChannelOperator":{"enum":["exact","is_not","is_set","is_not_set","icontains","not_icontains","regex","not_regex"],"type":"string"},"CustomChannelRule":{"additionalProperties":false,"properties":{"channel_type":{"type":"string"},"combiner":{"$ref":"#/definitions/FilterLogicalOperator"},"id":{"type":"string"},"items":{"items":{"$ref":"#/definitions/CustomChannelCondition"},"type":"array"}},"required":["items","combiner","channel_type","id"],"type":"object"},"CustomEventConversionGoal":{"additionalProperties":false,"properties":{"customEventName":{"type":"string"}},"required":["customEventName"],"type":"object"},"DashboardFilter":{"additionalProperties":false,"properties":{"date_from":{"type":["string","null"]},"date_to":{"type":["string","null"]},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"type":"null"}]}},"type":"object"},"DataColorToken":{"enum":["preset-1","preset-2","preset-3","preset-4","preset-5","preset-6","preset-7","preset-8","preset-9","preset-10","preset-11","preset-12","preset-13","preset-14","preset-15"],"type":"string"},"DataTableNode":{"additionalProperties":false,"properties":{"allowSorting":{"description":"Can the user click on column headers to sort the table? (default: true)","type":"boolean"},"columns":{"description":"Columns shown in the table, unless the `source` provides them.","items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"},"embedded":{"description":"Uses the embedded version of LemonTable","type":"boolean"},"expandable":{"description":"Can expand row to show raw event data (default: true)","type":"boolean"},"full":{"description":"Show with most visual options enabled. Used in scenes.","type":"boolean"},"hiddenColumns":{"description":"Columns that aren\'t shown in the table, even if in columns or returned data","items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"},"kind":{"const":"DataTableNode","type":"string"},"propertiesViaUrl":{"description":"Link properties via the URL (default: false)","type":"boolean"},"response":{"anyOf":[{"properties":{},"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"missing_actors_count":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","limit","offset","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"clickhouse":{"description":"Executed ClickHouse query","type":"string"},"columns":{"description":"Returned columns","items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"explain":{"description":"Query explanation output","items":{"type":"string"},"type":"array"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"metadata":{"$ref":"#/definitions/HogQLMetadataResponse","description":"Query metadata output"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query":{"description":"Input query string","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"description":"Types of returned columns","items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/WebOverviewItem"},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/ErrorTrackingIssue"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"expected_loss":{"type":"number"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"insight":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantFunnelsBaseStats"},"type":"array"}},"required":["credible_intervals","expected_loss","insight","kind","probability","significance_code","significant","variants"],"type":"object"},{"additionalProperties":false,"properties":{"count_query":{"$ref":"#/definitions/TrendsQuery"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"insight":{"items":{"type":"object"},"type":"array"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"p_value":{"type":"number"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantTrendsBaseStats"},"type":"array"}},"required":["credible_intervals","insight","kind","p_value","probability","significance_code","significant","variants"],"type":"object"}]},"showActions":{"description":"Show the kebab menu at the end of the row","type":"boolean"},"showColumnConfigurator":{"description":"Show a button to configure the table\'s columns if possible","type":"boolean"},"showDateRange":{"description":"Show date range selector","type":"boolean"},"showElapsedTime":{"description":"Show the time it takes to run a query","type":"boolean"},"showEventFilter":{"description":"Include an event filter above the table (EventsNode only)","type":"boolean"},"showExport":{"description":"Show the export button","type":"boolean"},"showHogQLEditor":{"description":"Include a HogQL query editor above HogQL tables","type":"boolean"},"showOpenEditorButton":{"description":"Show a button to open the current query as a new insight. (default: true)","type":"boolean"},"showPersistentColumnConfigurator":{"description":"Show a button to configure and persist the table\'s default columns if possible","type":"boolean"},"showPropertyFilter":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/definitions/TaxonomicFilterGroupType"},"type":"array"}],"description":"Include a property filter above the table"},"showReload":{"description":"Show a reload button","type":"boolean"},"showResultsTable":{"description":"Show a results table","type":"boolean"},"showSavedQueries":{"description":"Shows a list of saved queries","type":"boolean"},"showSearch":{"description":"Include a free text search field (PersonsNode only)","type":"boolean"},"showTestAccountFilters":{"description":"Show filter to exclude test accounts","type":"boolean"},"showTimings":{"description":"Show a detailed query timing breakdown","type":"boolean"},"source":{"anyOf":[{"$ref":"#/definitions/EventsNode"},{"$ref":"#/definitions/EventsQuery"},{"$ref":"#/definitions/PersonsNode"},{"$ref":"#/definitions/ActorsQuery"},{"$ref":"#/definitions/HogQLQuery"},{"$ref":"#/definitions/WebOverviewQuery"},{"$ref":"#/definitions/WebStatsTableQuery"},{"$ref":"#/definitions/WebExternalClicksTableQuery"},{"$ref":"#/definitions/WebGoalsQuery"},{"$ref":"#/definitions/SessionAttributionExplorerQuery"},{"$ref":"#/definitions/ErrorTrackingQuery"},{"$ref":"#/definitions/ExperimentFunnelsQuery"},{"$ref":"#/definitions/ExperimentTrendsQuery"}],"description":"Source of the events"}},"required":["kind","source"],"type":"object"},"DataVisualizationNode":{"additionalProperties":false,"properties":{"chartSettings":{"$ref":"#/definitions/ChartSettings"},"display":{"$ref":"#/definitions/ChartDisplayType"},"kind":{"const":"DataVisualizationNode","type":"string"},"source":{"$ref":"#/definitions/HogQLQuery"},"tableSettings":{"$ref":"#/definitions/TableSettings"}},"required":["kind","source"],"type":"object"},"DataWarehouseEventsModifier":{"additionalProperties":false,"properties":{"distinct_id_field":{"type":"string"},"id_field":{"type":"string"},"table_name":{"type":"string"},"timestamp_field":{"type":"string"}},"required":["table_name","timestamp_field","distinct_id_field","id_field"],"type":"object"},"DataWarehouseNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"distinct_id_field":{"type":"string"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"id":{"type":"string"},"id_field":{"type":"string"},"kind":{"const":"DataWarehouseNode","type":"string"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"},"table_name":{"type":"string"},"timestamp_field":{"type":"string"}},"required":["distinct_id_field","id","id_field","kind","table_name","timestamp_field"],"type":"object"},"DataWarehousePersonPropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"data_warehouse_person_property","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"DataWarehousePropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"data_warehouse","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"DatabaseSchemaBatchExportTable":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"id":{"type":"string"},"name":{"type":"string"},"type":{"const":"batch_export","type":"string"}},"required":["fields","id","name","type"],"type":"object"},"DatabaseSchemaDataWarehouseTable":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"format":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"schema":{"$ref":"#/definitions/DatabaseSchemaSchema"},"source":{"$ref":"#/definitions/DatabaseSchemaSource"},"type":{"const":"data_warehouse","type":"string"},"url_pattern":{"type":"string"}},"required":["fields","format","id","name","type","url_pattern"],"type":"object"},"DatabaseSchemaField":{"additionalProperties":false,"properties":{"chain":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},"fields":{"items":{"type":"string"},"type":"array"},"hogql_value":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"schema_valid":{"type":"boolean"},"table":{"type":"string"},"type":{"$ref":"#/definitions/DatabaseSerializedFieldType"}},"required":["name","hogql_value","type","schema_valid"],"type":"object"},"DatabaseSchemaMaterializedViewTable":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"id":{"type":"string"},"last_run_at":{"type":"string"},"name":{"type":"string"},"query":{"$ref":"#/definitions/HogQLQuery"},"status":{"type":"string"},"type":{"const":"materialized_view","type":"string"}},"required":["fields","id","name","query","type"],"type":"object"},"DatabaseSchemaPostHogTable":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"id":{"type":"string"},"name":{"type":"string"},"type":{"const":"posthog","type":"string"}},"required":["fields","id","name","type"],"type":"object"},"DatabaseSchemaQuery":{"additionalProperties":false,"properties":{"kind":{"const":"DatabaseSchemaQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/DatabaseSchemaQueryResponse"}},"required":["kind"],"type":"object"},"DatabaseSchemaQueryResponse":{"additionalProperties":false,"properties":{"tables":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaTable"},"type":"object"}},"required":["tables"],"type":"object"},"DatabaseSchemaSchema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"incremental":{"type":"boolean"},"last_synced_at":{"type":"string"},"name":{"type":"string"},"should_sync":{"type":"boolean"},"status":{"type":"string"}},"required":["id","name","should_sync","incremental"],"type":"object"},"DatabaseSchemaSource":{"additionalProperties":false,"properties":{"id":{"type":"string"},"last_synced_at":{"type":"string"},"prefix":{"type":"string"},"source_type":{"type":"string"},"status":{"type":"string"}},"required":["id","status","source_type","prefix"],"type":"object"},"DatabaseSchemaTable":{"anyOf":[{"$ref":"#/definitions/DatabaseSchemaPostHogTable"},{"$ref":"#/definitions/DatabaseSchemaDataWarehouseTable"},{"$ref":"#/definitions/DatabaseSchemaViewTable"},{"$ref":"#/definitions/DatabaseSchemaBatchExportTable"},{"$ref":"#/definitions/DatabaseSchemaMaterializedViewTable"}]},"DatabaseSchemaTableCommon":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["posthog","data_warehouse","view","batch_export","materialized_view"],"type":"string"}},"required":["type","id","name","fields"],"type":"object"},"DatabaseSchemaViewTable":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaField"},"type":"object"},"id":{"type":"string"},"name":{"type":"string"},"query":{"$ref":"#/definitions/HogQLQuery"},"type":{"const":"view","type":"string"}},"required":["fields","id","name","query","type"],"type":"object"},"DatabaseSerializedFieldType":{"enum":["integer","float","string","datetime","date","boolean","array","json","lazy_table","virtual_table","field_traverser","expression","view","materialized_view"],"type":"string"},"DateRange":{"additionalProperties":false,"properties":{"date_from":{"type":["string","null"]},"date_to":{"type":["string","null"]},"explicitDate":{"default":false,"description":"Whether the date_from and date_to should be used verbatim. Disables rounding to the start and end of period.","type":["boolean","null"]}},"type":"object"},"DatetimeDay":{"format":"date-time","type":"string"},"Day":{"type":"integer"},"DefaultChannelTypes":{"enum":["Cross Network","Paid Search","Paid Social","Paid Video","Paid Shopping","Paid Unknown","Direct","Organic Search","Organic Social","Organic Video","Organic Shopping","Push","SMS","Audio","Email","Referral","Affiliate","Unknown"],"type":"string"},"DurationType":{"enum":["duration","active_seconds","inactive_seconds"],"type":"string"},"ElementPropertyFilter":{"additionalProperties":false,"description":"Sync with plugin-server/src/types.ts","properties":{"key":{"enum":["tag_name","text","href","selector"],"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"element","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"ElementType":{"additionalProperties":false,"properties":{"attr_class":{"items":{"type":"string"},"type":"array"},"attr_id":{"type":"string"},"attributes":{"additionalProperties":{"type":"string"},"type":"object"},"href":{"type":"string"},"nth_child":{"type":"number"},"nth_of_type":{"type":"number"},"order":{"type":"number"},"tag_name":{"type":"string"},"text":{"type":"string"}},"required":["attributes","tag_name"],"type":"object"},"EmptyPropertyFilter":{"additionalProperties":false,"type":"object"},"EntityNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"kind":{"$ref":"#/definitions/NodeKind"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["kind"],"type":"object"},"EntityType":{"enum":["actions","events","data_warehouse","new_entity"],"type":"string"},"ErrorTrackingIssue":{"additionalProperties":false,"properties":{"assignee":{"type":["number","null"]},"description":{"type":["string","null"]},"first_seen":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_seen":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"occurrences":{"type":"number"},"sessions":{"type":"number"},"status":{"enum":["archived","active","resolved","pending_release"],"type":"string"},"users":{"type":"number"},"volume":{}},"required":["id","name","description","occurrences","sessions","users","first_seen","last_seen","assignee","status"],"type":"object"},"ErrorTrackingQuery":{"additionalProperties":false,"properties":{"assignee":{"anyOf":[{"type":"integer"},{"type":"null"}]},"dateRange":{"$ref":"#/definitions/DateRange"},"filterGroup":{"$ref":"#/definitions/PropertyGroupFilter"},"filterTestAccounts":{"type":"boolean"},"issueId":{"type":"string"},"kind":{"const":"ErrorTrackingQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"orderBy":{"enum":["last_seen","first_seen","occurrences","users","sessions"],"type":"string"},"response":{"$ref":"#/definitions/ErrorTrackingQueryResponse"},"searchQuery":{"type":"string"},"select":{"items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"}},"required":["dateRange","kind"],"type":"object"},"ErrorTrackingQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/ErrorTrackingIssue"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"EventDefinition":{"additionalProperties":false,"properties":{"elements":{"items":{},"type":"array"},"event":{"type":"string"},"properties":{"type":"object"}},"required":["event","properties","elements"],"type":"object"},"EventOddsRatioSerialized":{"additionalProperties":false,"properties":{"correlation_type":{"enum":["success","failure"],"type":"string"},"event":{"$ref":"#/definitions/EventDefinition"},"failure_count":{"type":"integer"},"odds_ratio":{"type":"number"},"success_count":{"type":"integer"}},"required":["event","success_count","failure_count","odds_ratio","correlation_type"],"type":"object"},"EventPropertyFilter":{"additionalProperties":false,"description":"Sync with plugin-server/src/types.ts","properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator","default":"exact"},"type":{"const":"event","description":"Event properties","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"EventTaxonomyItem":{"additionalProperties":false,"properties":{"property":{"type":"string"},"sample_count":{"type":"integer"},"sample_values":{"items":{"type":"string"},"type":"array"}},"required":["property","sample_values","sample_count"],"type":"object"},"EventTaxonomyQuery":{"additionalProperties":false,"properties":{"event":{"type":"string"},"kind":{"const":"EventTaxonomyQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"items":{"type":"string"},"type":"array"},"response":{"$ref":"#/definitions/EventTaxonomyQueryResponse"}},"required":["event","kind"],"type":"object"},"EventTaxonomyQueryResponse":{"additionalProperties":false,"description":"All analytics query responses must inherit from this.","properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/EventTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"EventTaxonomyResponse":{"items":{"$ref":"#/definitions/EventTaxonomyItem"},"type":"array"},"EventType":{"additionalProperties":false,"properties":{"distinct_id":{"type":"string"},"elements":{"items":{"$ref":"#/definitions/ElementType"},"type":"array"},"elements_chain":{"type":["string","null"]},"event":{"type":"string"},"id":{"type":"string"},"person":{"additionalProperties":false,"properties":{"distinct_ids":{"items":{"type":"string"},"type":"array"},"is_identified":{"type":"boolean"},"properties":{"type":"object"}},"required":["distinct_ids","properties"],"type":"object"},"properties":{"type":"object"},"timestamp":{"type":"string"},"uuid":{"type":"string"}},"required":["id","distinct_id","properties","event","timestamp","elements"],"type":"object"},"EventsNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"event":{"description":"The event or `null` for all events.","type":["string","null"]},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"kind":{"const":"EventsNode","type":"string"},"limit":{"type":"integer"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"orderBy":{"description":"Columns to order by","items":{"type":"string"},"type":"array"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["kind"],"type":"object"},"EventsQuery":{"additionalProperties":false,"properties":{"actionId":{"description":"Show events matching a given action","type":"integer"},"after":{"description":"Only fetch events that happened after this timestamp","type":"string"},"before":{"description":"Only fetch events that happened before this timestamp","type":"string"},"event":{"description":"Limit to events matching this string","type":["string","null"]},"filterTestAccounts":{"description":"Filter test accounts","type":"boolean"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyFilterLike"},"type":"array"},"kind":{"const":"EventsQuery","type":"string"},"limit":{"description":"Number of rows to return","type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"description":"Number of rows to skip before returning rows","type":"integer"},"orderBy":{"description":"Columns to order by","items":{"type":"string"},"type":"array"},"personId":{"description":"Show events for a given person","type":"string"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"$ref":"#/definitions/EventsQueryResponse"},"select":{"description":"Return a limited set of data. Required.","items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"},"where":{"description":"HogQL filters to apply on returned data","items":{"$ref":"#/definitions/HogQLExpression"},"type":"array"}},"required":["kind","select"],"type":"object"},"EventsQueryPersonColumn":{"additionalProperties":false,"properties":{"created_at":{"type":"string"},"distinct_id":{"type":"string"},"properties":{"additionalProperties":false,"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"uuid":{"type":"string"}},"required":["uuid","created_at","properties","distinct_id"],"type":"object"},"EventsQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","results","types"],"type":"object"},"ExperimentFunnelsQuery":{"additionalProperties":false,"properties":{"experiment_id":{"type":"integer"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"name":{"type":"string"},"response":{"$ref":"#/definitions/ExperimentFunnelsQueryResponse"},"stats_version":{"type":"integer"}},"required":["funnels_query","kind"],"type":"object"},"ExperimentFunnelsQueryResponse":{"additionalProperties":false,"properties":{"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"expected_loss":{"type":"number"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"insight":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantFunnelsBaseStats"},"type":"array"}},"required":["kind","insight","variants","probability","significant","significance_code","expected_loss","credible_intervals"],"type":"object"},"ExperimentSignificanceCode":{"enum":["significant","not_enough_exposure","low_win_probability","high_loss","high_p_value"],"type":"string"},"ExperimentTrendsQuery":{"additionalProperties":false,"properties":{"count_query":{"$ref":"#/definitions/TrendsQuery"},"experiment_id":{"type":"integer"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"name":{"type":"string"},"response":{"$ref":"#/definitions/ExperimentTrendsQueryResponse"},"stats_version":{"type":"integer"}},"required":["count_query","kind"],"type":"object"},"ExperimentTrendsQueryResponse":{"additionalProperties":false,"properties":{"count_query":{"$ref":"#/definitions/TrendsQuery"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"insight":{"items":{"type":"object"},"type":"array"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"p_value":{"type":"number"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantTrendsBaseStats"},"type":"array"}},"required":["kind","insight","variants","probability","significant","significance_code","p_value","credible_intervals"],"type":"object"},"ExperimentVariantFunnelsBaseStats":{"additionalProperties":false,"properties":{"failure_count":{"type":"number"},"key":{"type":"string"},"success_count":{"type":"number"}},"required":["key","success_count","failure_count"],"type":"object"},"ExperimentVariantTrendsBaseStats":{"additionalProperties":false,"properties":{"absolute_exposure":{"type":"number"},"count":{"type":"number"},"exposure":{"type":"number"},"key":{"type":"string"}},"required":["key","count","exposure","absolute_exposure"],"type":"object"},"FailureMessage":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"type":{"const":"ai/failure","type":"string"}},"required":["type"],"type":"object"},"FeaturePropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"feature","description":"Event property with \\"$feature/\\" prepended","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"FilterLogicalOperator":{"enum":["AND","OR"],"type":"string"},"FunnelConversionWindowTimeUnit":{"enum":["second","minute","hour","day","week","month"],"type":"string"},"FunnelCorrelationActorsQuery":{"additionalProperties":false,"properties":{"funnelCorrelationPersonConverted":{"type":"boolean"},"funnelCorrelationPersonEntity":{"$ref":"#/definitions/AnyEntityNode"},"funnelCorrelationPropertyValues":{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"includeRecordings":{"type":"boolean"},"kind":{"const":"FunnelCorrelationActorsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/ActorsQueryResponse"},"source":{"$ref":"#/definitions/FunnelCorrelationQuery"}},"required":["kind","source"],"type":"object"},"FunnelCorrelationQuery":{"additionalProperties":false,"properties":{"funnelCorrelationEventExcludePropertyNames":{"items":{"type":"string"},"type":"array"},"funnelCorrelationEventNames":{"items":{"type":"string"},"type":"array"},"funnelCorrelationExcludeEventNames":{"items":{"type":"string"},"type":"array"},"funnelCorrelationExcludeNames":{"items":{"type":"string"},"type":"array"},"funnelCorrelationNames":{"items":{"type":"string"},"type":"array"},"funnelCorrelationType":{"$ref":"#/definitions/FunnelCorrelationResultsType"},"kind":{"const":"FunnelCorrelationQuery","type":"string"},"response":{"$ref":"#/definitions/FunnelCorrelationResponse"},"source":{"$ref":"#/definitions/FunnelsActorsQuery"}},"required":["funnelCorrelationType","kind","source"],"type":"object"},"FunnelCorrelationResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/FunnelCorrelationResult"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},"FunnelCorrelationResult":{"additionalProperties":false,"properties":{"events":{"items":{"$ref":"#/definitions/EventOddsRatioSerialized"},"type":"array"},"skewed":{"type":"boolean"}},"required":["events","skewed"],"type":"object"},"FunnelCorrelationResultsType":{"enum":["events","properties","event_with_properties"],"type":"string"},"FunnelExclusion":{"anyOf":[{"$ref":"#/definitions/FunnelExclusionEventsNode"},{"$ref":"#/definitions/FunnelExclusionActionsNode"}]},"FunnelExclusionActionsNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"funnelFromStep":{"type":"integer"},"funnelToStep":{"type":"integer"},"id":{"type":"integer"},"kind":{"const":"ActionsNode","type":"string"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["funnelFromStep","funnelToStep","id","kind"],"type":"object"},"FunnelExclusionEventsNode":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"event":{"description":"The event or `null` for all events.","type":["string","null"]},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"funnelFromStep":{"type":"integer"},"funnelToStep":{"type":"integer"},"kind":{"const":"EventsNode","type":"string"},"limit":{"type":"integer"},"math":{"$ref":"#/definitions/MathType"},"math_group_type_index":{"enum":[0,1,2,3,4],"type":"number"},"math_hogql":{"type":"string"},"math_property":{"type":"string"},"math_property_type":{"type":"string"},"name":{"type":"string"},"orderBy":{"description":"Columns to order by","items":{"type":"string"},"type":"array"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"}},"required":["funnelFromStep","funnelToStep","kind"],"type":"object"},"FunnelExclusionLegacy":{"additionalProperties":false,"properties":{"custom_name":{"type":["string","null"]},"funnel_from_step":{"type":"number"},"funnel_to_step":{"type":"number"},"id":{"type":["string","number","null"]},"index":{"type":"number"},"name":{"type":["string","null"]},"order":{"type":"number"},"type":{"$ref":"#/definitions/EntityType"}},"required":["funnel_from_step","funnel_to_step"],"type":"object"},"FunnelExclusionSteps":{"additionalProperties":false,"properties":{"funnelFromStep":{"type":"integer"},"funnelToStep":{"type":"integer"}},"required":["funnelFromStep","funnelToStep"],"type":"object"},"FunnelLayout":{"enum":["horizontal","vertical"],"type":"string"},"FunnelMathType":{"enum":["total","first_time_for_user","first_time_for_user_with_filters"],"type":"string"},"FunnelPathType":{"enum":["funnel_path_before_step","funnel_path_between_steps","funnel_path_after_step"],"type":"string"},"FunnelPathsFilter":{"additionalProperties":false,"properties":{"funnelPathType":{"$ref":"#/definitions/FunnelPathType"},"funnelSource":{"$ref":"#/definitions/FunnelsQuery"},"funnelStep":{"type":"integer"}},"required":["funnelSource"],"type":"object"},"FunnelStepReference":{"enum":["total","previous"],"type":"string"},"FunnelStepsBreakdownResults":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"FunnelStepsResults":{"items":{"type":"object"},"type":"array"},"FunnelTimeToConvertResults":{"additionalProperties":false,"properties":{"average_conversion_time":{"type":["number","null"]},"bins":{"items":{"items":{"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"}},"required":["average_conversion_time","bins"],"type":"object"},"FunnelTrendsResults":{"items":{"type":"object"},"type":"array"},"FunnelVizType":{"enum":["steps","time_to_convert","trends"],"type":"string"},"FunnelsActorsQuery":{"additionalProperties":false,"properties":{"funnelCustomSteps":{"description":"Custom step numbers to get persons for. This overrides `funnelStep`. Primarily for correlation use.","items":{"type":"integer"},"type":"array"},"funnelStep":{"description":"Index of the step for which we want to get the timestamp for, per person. Positive for converted persons, negative for dropped of persons.","type":"integer"},"funnelStepBreakdown":{"$ref":"#/definitions/BreakdownKeyType","description":"The breakdown value for which to get persons for. This is an array for person and event properties, a string for groups and an integer for cohorts."},"funnelTrendsDropOff":{"type":"boolean"},"funnelTrendsEntrancePeriodStart":{"description":"Used together with `funnelTrendsDropOff` for funnels time conversion date for the persons modal.","type":"string"},"includeRecordings":{"type":"boolean"},"kind":{"const":"FunnelsActorsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/ActorsQueryResponse"},"source":{"$ref":"#/definitions/FunnelsQuery"}},"required":["kind","source"],"type":"object"},"FunnelsFilter":{"additionalProperties":false,"properties":{"binCount":{"type":"integer"},"breakdownAttributionType":{"$ref":"#/definitions/BreakdownAttributionType","default":"first_touch"},"breakdownAttributionValue":{"type":"integer"},"exclusions":{"default":[],"items":{"$ref":"#/definitions/FunnelExclusion"},"type":"array"},"funnelAggregateByHogQL":{"type":"string"},"funnelFromStep":{"type":"integer"},"funnelOrderType":{"$ref":"#/definitions/StepOrderValue","default":"ordered"},"funnelStepReference":{"$ref":"#/definitions/FunnelStepReference","default":"total"},"funnelToStep":{"type":"integer"},"funnelVizType":{"$ref":"#/definitions/FunnelVizType","default":"steps"},"funnelWindowInterval":{"default":14,"type":"integer"},"funnelWindowIntervalUnit":{"$ref":"#/definitions/FunnelConversionWindowTimeUnit","default":"day"},"hiddenLegendBreakdowns":{"items":{"type":"string"},"type":"array"},"layout":{"$ref":"#/definitions/FunnelLayout","default":"vertical"},"resultCustomizations":{"additionalProperties":{"$ref":"#/definitions/ResultCustomizationByValue"},"description":"Customizations for the appearance of result datasets.","type":"object"},"useUdf":{"type":"boolean"}},"type":"object"},"FunnelsFilterLegacy":{"additionalProperties":false,"description":"`FunnelsFilterType` minus everything inherited from `FilterType` and persons modal related params","properties":{"bin_count":{"$ref":"#/definitions/BinCountValue"},"breakdown_attribution_type":{"$ref":"#/definitions/BreakdownAttributionType"},"breakdown_attribution_value":{"type":"number"},"exclusions":{"items":{"$ref":"#/definitions/FunnelExclusionLegacy"},"type":"array"},"funnel_aggregate_by_hogql":{"type":"string"},"funnel_from_step":{"type":"number"},"funnel_order_type":{"$ref":"#/definitions/StepOrderValue"},"funnel_step_reference":{"$ref":"#/definitions/FunnelStepReference"},"funnel_to_step":{"type":"number"},"funnel_viz_type":{"$ref":"#/definitions/FunnelVizType"},"funnel_window_interval":{"type":"number"},"funnel_window_interval_unit":{"$ref":"#/definitions/FunnelConversionWindowTimeUnit"},"hidden_legend_keys":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"not":{}}]},"type":"object"},"layout":{"$ref":"#/definitions/FunnelLayout"}},"type":"object"},"FunnelsQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"breakdownFilter":{"$ref":"#/definitions/BreakdownFilter","description":"Breakdown of the events and actions"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"funnelsFilter":{"$ref":"#/definitions/FunnelsFilter","description":"Properties specific to the funnels insight"},"interval":{"$ref":"#/definitions/IntervalType","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"FunnelsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/FunnelsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]},"series":{"description":"Events and actions to include","items":{"$ref":"#/definitions/AnyEntityNode"},"type":"array"}},"required":["kind","series"],"type":"object"},"FunnelsQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"isUdf":{"type":"boolean"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"anyOf":[{"$ref":"#/definitions/FunnelStepsResults"},{"$ref":"#/definitions/FunnelStepsBreakdownResults"},{"$ref":"#/definitions/FunnelTimeToConvertResults"},{"$ref":"#/definitions/FunnelTrendsResults"}]},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"GenericCachedQueryResponse":{"properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"timezone":{"type":"string"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","timezone"],"type":"object"},"GoalLine":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"number"}},"required":["label","value"],"type":"object"},"GroupMathType":{"const":"unique_group","type":"string"},"GroupPropertyFilter":{"additionalProperties":false,"properties":{"group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"group","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"HasPropertiesNode":{"anyOf":[{"$ref":"#/definitions/EventsNode"},{"$ref":"#/definitions/EventsQuery"},{"$ref":"#/definitions/PersonsNode"}]},"HogCompileResponse":{"additionalProperties":false,"properties":{"bytecode":{"items":{},"type":"array"},"locals":{"items":{},"type":"array"}},"required":["bytecode","locals"],"type":"object"},"HogLanguage":{"enum":["hog","hogJson","hogQL","hogQLExpr","hogTemplate"],"type":"string"},"HogQLAutocomplete":{"additionalProperties":false,"properties":{"endPosition":{"description":"End position of the editor word","type":"integer"},"filters":{"$ref":"#/definitions/HogQLFilters","description":"Table to validate the expression against"},"globals":{"description":"Global values in scope","type":"object"},"kind":{"const":"HogQLAutocomplete","type":"string"},"language":{"$ref":"#/definitions/HogLanguage","description":"Language to validate"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query":{"description":"Query to validate","type":"string"},"response":{"$ref":"#/definitions/HogQLAutocompleteResponse"},"sourceQuery":{"$ref":"#/definitions/AnyDataNode","description":"Query in whose context to validate."},"startPosition":{"description":"Start position of the editor word","type":"integer"}},"required":["endPosition","kind","language","query","startPosition"],"type":"object"},"HogQLAutocompleteResponse":{"additionalProperties":false,"properties":{"incomplete_list":{"description":"Whether or not the suggestions returned are complete","type":"boolean"},"suggestions":{"items":{"$ref":"#/definitions/AutocompleteCompletionItem"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["suggestions","incomplete_list"],"type":"object"},"HogQLExpression":{"type":"string"},"HogQLFilters":{"additionalProperties":false,"description":"Filters object that will be converted to a HogQL {filters} placeholder","properties":{"dateRange":{"$ref":"#/definitions/DateRange"},"filterTestAccounts":{"type":"boolean"},"properties":{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"}},"type":"object"},"HogQLMathType":{"const":"hogql","type":"string"},"HogQLMetadata":{"additionalProperties":false,"properties":{"debug":{"description":"Enable more verbose output, usually run from the /debug page","type":"boolean"},"filters":{"$ref":"#/definitions/HogQLFilters","description":"Extra filters applied to query via {filters}"},"globals":{"description":"Extra globals for the query","type":"object"},"kind":{"const":"HogQLMetadata","type":"string"},"language":{"$ref":"#/definitions/HogLanguage","description":"Language to validate"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query":{"description":"Query to validate","type":"string"},"response":{"$ref":"#/definitions/HogQLMetadataResponse"},"sourceQuery":{"$ref":"#/definitions/AnyDataNode","description":"Query within which \\"expr\\" and \\"template\\" are validated. Defaults to \\"select * from events\\""},"variables":{"additionalProperties":{"$ref":"#/definitions/HogQLVariable"},"description":"Variables to be subsituted into the query","type":"object"}},"required":["kind","language","query"],"type":"object"},"HogQLMetadataResponse":{"additionalProperties":false,"properties":{"errors":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"},"isValid":{"type":"boolean"},"isValidView":{"type":"boolean"},"notices":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"},"query":{"type":"string"},"table_names":{"items":{"type":"string"},"type":"array"},"warnings":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"}},"required":["errors","warnings","notices"],"type":"object"},"HogQLNotice":{"additionalProperties":false,"properties":{"end":{"type":"integer"},"fix":{"type":"string"},"message":{"type":"string"},"start":{"type":"integer"}},"required":["message"],"type":"object"},"HogQLPropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"const":"hogql","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","type"],"type":"object"},"HogQLQuery":{"additionalProperties":false,"properties":{"explain":{"deprecated":"use modifiers.debug instead","type":"boolean"},"filters":{"$ref":"#/definitions/HogQLFilters"},"kind":{"const":"HogQLQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query":{"type":"string"},"response":{"$ref":"#/definitions/HogQLQueryResponse"},"values":{"description":"Constant values that can be referenced with the {placeholder} syntax in the query","type":"object"},"variables":{"additionalProperties":{"$ref":"#/definitions/HogQLVariable"},"description":"Variables to be subsituted into the query","type":"object"}},"required":["kind","query"],"type":"object"},"HogQLQueryModifiers":{"additionalProperties":false,"description":"HogQL Query Options are automatically set per team. However, they can be overridden in the query.","properties":{"bounceRateDurationSeconds":{"type":"number"},"bounceRatePageViewMode":{"enum":["count_pageviews","uniq_urls","uniq_page_screen_autocaptures"],"type":"string"},"customChannelTypeRules":{"items":{"$ref":"#/definitions/CustomChannelRule"},"type":"array"},"dataWarehouseEventsModifiers":{"items":{"$ref":"#/definitions/DataWarehouseEventsModifier"},"type":"array"},"debug":{"type":"boolean"},"inCohortVia":{"enum":["auto","leftjoin","subquery","leftjoin_conjoined"],"type":"string"},"materializationMode":{"enum":["auto","legacy_null_as_string","legacy_null_as_null","disabled"],"type":"string"},"optimizeJoinedFilters":{"type":"boolean"},"personsArgMaxVersion":{"enum":["auto","v1","v2"],"type":"string"},"personsJoinMode":{"enum":["inner","left"],"type":"string"},"personsOnEventsMode":{"enum":["disabled","person_id_no_override_properties_on_events","person_id_override_properties_on_events","person_id_override_properties_joined"],"type":"string"},"propertyGroupsMode":{"enum":["enabled","disabled","optimized"],"type":"string"},"s3TableUseInvalidColumns":{"type":"boolean"},"sessionTableVersion":{"enum":["auto","v1","v2"],"type":"string"},"useMaterializedViews":{"type":"boolean"}},"type":"object"},"HogQLQueryResponse":{"additionalProperties":false,"properties":{"clickhouse":{"description":"Executed ClickHouse query","type":"string"},"columns":{"description":"Returned columns","items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"explain":{"description":"Query explanation output","items":{"type":"string"},"type":"array"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"metadata":{"$ref":"#/definitions/HogQLMetadataResponse","description":"Query metadata output"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query":{"description":"Input query string","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"description":"Types of returned columns","items":{},"type":"array"}},"required":["results"],"type":"object"},"HogQLVariable":{"additionalProperties":false,"properties":{"code_name":{"type":"string"},"value":{},"variableId":{"type":"string"}},"required":["variableId","code_name"],"type":"object"},"HogQuery":{"additionalProperties":false,"properties":{"code":{"type":"string"},"kind":{"const":"HogQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/HogQueryResponse"}},"required":["kind"],"type":"object"},"HogQueryResponse":{"additionalProperties":false,"properties":{"bytecode":{"items":{},"type":"array"},"coloredBytecode":{"items":{},"type":"array"},"results":{},"stdout":{"type":"string"}},"required":["results"],"type":"object"},"HumanMessage":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"type":{"const":"human","type":"string"}},"required":["type","content"],"type":"object"},"InsightActorsQuery":{"additionalProperties":false,"properties":{"breakdown":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/BreakdownValueInt"},{"items":{"type":"string"},"type":"array"}]},"compare":{"enum":["current","previous"],"type":"string"},"day":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/Day"}]},"includeRecordings":{"type":"boolean"},"interval":{"description":"An interval selected out of available intervals in source query.","type":"integer"},"kind":{"const":"InsightActorsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/ActorsQueryResponse"},"series":{"type":"integer"},"source":{"$ref":"#/definitions/InsightQuerySource"},"status":{"type":"string"}},"required":["kind","source"],"type":"object"},"InsightActorsQueryBase":{"additionalProperties":false,"properties":{"includeRecordings":{"type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/ActorsQueryResponse"}},"required":["kind"],"type":"object"},"InsightActorsQueryOptions":{"additionalProperties":false,"properties":{"kind":{"const":"InsightActorsQueryOptions","type":"string"},"response":{"$ref":"#/definitions/InsightActorsQueryOptionsResponse"},"source":{"anyOf":[{"$ref":"#/definitions/InsightActorsQuery"},{"$ref":"#/definitions/FunnelsActorsQuery"},{"$ref":"#/definitions/FunnelCorrelationActorsQuery"}]}},"required":["kind","source"],"type":"object"},"InsightActorsQueryOptionsResponse":{"additionalProperties":false,"properties":{"breakdown":{"items":{"$ref":"#/definitions/BreakdownItem"},"type":"array"},"breakdowns":{"items":{"$ref":"#/definitions/MultipleBreakdownOptions"},"type":"array"},"compare":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"day":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/DatetimeDay"},{"$ref":"#/definitions/Day"}]}},"required":["label","value"],"type":"object"},"type":"array"},"interval":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"description":"An interval selected out of available intervals in source query","type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"series":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"status":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"}},"type":"object"},"InsightFilter":{"anyOf":[{"$ref":"#/definitions/TrendsFilter"},{"$ref":"#/definitions/FunnelsFilter"},{"$ref":"#/definitions/RetentionFilter"},{"$ref":"#/definitions/PathsFilter"},{"$ref":"#/definitions/StickinessFilter"},{"$ref":"#/definitions/LifecycleFilter"}]},"InsightFilterProperty":{"enum":["trendsFilter","funnelsFilter","retentionFilter","pathsFilter","stickinessFilter","lifecycleFilter"],"type":"string"},"InsightNodeKind":{"enum":["TrendsQuery","FunnelsQuery","RetentionQuery","PathsQuery","StickinessQuery","LifecycleQuery"],"type":"string"},"InsightQueryNode":{"discriminator":{"propertyName":"kind"},"oneOf":[{"$ref":"#/definitions/TrendsQuery"},{"$ref":"#/definitions/FunnelsQuery"},{"$ref":"#/definitions/RetentionQuery"},{"$ref":"#/definitions/PathsQuery"},{"$ref":"#/definitions/StickinessQuery"},{"$ref":"#/definitions/LifecycleQuery"}],"required":["kind"],"type":"object"},"InsightQuerySource":{"$ref":"#/definitions/InsightQueryNode"},"InsightShortId":{"type":"string"},"InsightThreshold":{"additionalProperties":false,"properties":{"bounds":{"$ref":"#/definitions/InsightsThresholdBounds"},"type":{"$ref":"#/definitions/InsightThresholdType"}},"required":["type"],"type":"object"},"InsightThresholdType":{"enum":["absolute","percentage"],"type":"string"},"InsightVizNode":{"additionalProperties":false,"properties":{"embedded":{"description":"Query is embedded inside another bordered component","type":"boolean"},"full":{"description":"Show with most visual options enabled. Used in insight scene.","type":"boolean"},"hidePersonsModal":{"type":"boolean"},"kind":{"const":"InsightVizNode","type":"string"},"showCorrelationTable":{"type":"boolean"},"showFilters":{"type":"boolean"},"showHeader":{"type":"boolean"},"showLastComputation":{"type":"boolean"},"showLastComputationRefresh":{"type":"boolean"},"showResults":{"type":"boolean"},"showTable":{"type":"boolean"},"source":{"$ref":"#/definitions/InsightQueryNode"},"suppressSessionAnalysisWarning":{"type":"boolean"},"vizSpecificOptions":{"$ref":"#/definitions/VizSpecificOptions"}},"required":["kind","source"],"type":"object"},"InsightsQueryBase":{"additionalProperties":false,"description":"Base class for insight query nodes. Should not be used directly.","properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/FunnelsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind"],"type":"object"},"InsightsQueryBase":{"additionalProperties":false,"description":"Base class for insight query nodes. Should not be used directly.","properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/LifecycleQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind"],"type":"object"},"InsightsQueryBase":{"additionalProperties":false,"description":"Base class for insight query nodes. Should not be used directly.","properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/PathsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind"],"type":"object"},"InsightsQueryBase":{"additionalProperties":false,"description":"Base class for insight query nodes. Should not be used directly.","properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/RetentionQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind"],"type":"object"},"InsightsQueryBase":{"additionalProperties":false,"description":"Base class for insight query nodes. Should not be used directly.","properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"$ref":"#/definitions/NodeKind"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/TrendsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind"],"type":"object"},"InsightsThresholdBounds":{"additionalProperties":false,"properties":{"lower":{"type":"number"},"upper":{"type":"number"}},"type":"object"},"IntervalType":{"enum":["minute","hour","day","week","month"],"type":"string"},"LifecycleFilter":{"additionalProperties":false,"properties":{"showLegend":{"default":false,"type":"boolean"},"showValuesOnSeries":{"type":"boolean"},"toggledLifecycles":{"items":{"$ref":"#/definitions/LifecycleToggle"},"type":"array"}},"type":"object"},"LifecycleFilterLegacy":{"additionalProperties":false,"description":"`LifecycleFilterType` minus everything inherited from `FilterType`","properties":{"show_legend":{"type":"boolean"},"show_values_on_series":{"type":"boolean"},"toggledLifecycles":{"items":{"$ref":"#/definitions/LifecycleToggle"},"type":"array"}},"type":"object"},"LifecycleQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"interval":{"$ref":"#/definitions/IntervalType","default":"day","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"LifecycleQuery","type":"string"},"lifecycleFilter":{"$ref":"#/definitions/LifecycleFilter","description":"Properties specific to the lifecycle insight"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/LifecycleQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]},"series":{"description":"Events and actions to include","items":{"$ref":"#/definitions/AnyEntityNode"},"type":"array"}},"required":["kind","series"],"type":"object"},"LifecycleQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"LifecycleToggle":{"enum":["new","resurrecting","returning","dormant"],"type":"string"},"LogEntryPropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"log_entry","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"MatchedRecording":{"additionalProperties":false,"properties":{"events":{"items":{"$ref":"#/definitions/MatchedRecordingEvent"},"type":"array"},"session_id":{"type":"string"}},"required":["events"],"type":"object"},"MatchedRecordingEvent":{"additionalProperties":false,"properties":{"uuid":{"type":"string"}},"required":["uuid"],"type":"object"},"MathType":{"anyOf":[{"$ref":"#/definitions/BaseMathType"},{"$ref":"#/definitions/FunnelMathType"},{"$ref":"#/definitions/PropertyMathType"},{"$ref":"#/definitions/CountPerActorMathType"},{"$ref":"#/definitions/GroupMathType"},{"$ref":"#/definitions/HogQLMathType"}]},"MultipleBreakdownOptions":{"additionalProperties":false,"properties":{"values":{"items":{"$ref":"#/definitions/BreakdownItem"},"type":"array"}},"required":["values"],"type":"object"},"MultipleBreakdownType":{"enum":["person","event","group","session","hogql"],"type":"string"},"NodeKind":{"description":"PostHog Query Schema definition.\\n\\nThis file acts as the source of truth for:\\n\\n- frontend/src/queries/schema.json - generated from typescript via \\"pnpm run schema:build:json\\"\\n\\n- posthog/schema.py - generated from json the above json via \\"pnpm run schema:build:python\\"","enum":["EventsNode","ActionsNode","DataWarehouseNode","EventsQuery","PersonsNode","HogQuery","HogQLQuery","HogQLMetadata","HogQLAutocomplete","ActorsQuery","FunnelsActorsQuery","FunnelCorrelationActorsQuery","SessionsTimelineQuery","RecordingsQuery","SessionAttributionExplorerQuery","ErrorTrackingQuery","DataTableNode","DataVisualizationNode","SavedInsightNode","InsightVizNode","TrendsQuery","FunnelsQuery","RetentionQuery","PathsQuery","StickinessQuery","LifecycleQuery","InsightActorsQuery","InsightActorsQueryOptions","FunnelCorrelationQuery","WebOverviewQuery","WebStatsTableQuery","WebExternalClicksTableQuery","WebGoalsQuery","ExperimentFunnelsQuery","ExperimentTrendsQuery","DatabaseSchemaQuery","SuggestedQuestionsQuery","TeamTaxonomyQuery","EventTaxonomyQuery","ActorsPropertyTaxonomyQuery"],"type":"string"},"PathCleaningFilter":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"regex":{"type":"string"}},"type":"object"},"PathType":{"enum":["$pageview","$screen","custom_event","hogql"],"type":"string"},"PathsFilter":{"additionalProperties":false,"properties":{"edgeLimit":{"default":50,"type":"integer"},"endPoint":{"type":"string"},"excludeEvents":{"items":{"type":"string"},"type":"array"},"includeEventTypes":{"items":{"$ref":"#/definitions/PathType"},"type":"array"},"localPathCleaningFilters":{"anyOf":[{"items":{"$ref":"#/definitions/PathCleaningFilter"},"type":"array"},{"type":"null"}]},"maxEdgeWeight":{"type":"integer"},"minEdgeWeight":{"type":"integer"},"pathDropoffKey":{"description":"Relevant only within actors query","type":"string"},"pathEndKey":{"description":"Relevant only within actors query","type":"string"},"pathGroupings":{"items":{"type":"string"},"type":"array"},"pathReplacements":{"type":"boolean"},"pathStartKey":{"description":"Relevant only within actors query","type":"string"},"pathsHogQLExpression":{"type":"string"},"startPoint":{"type":"string"},"stepLimit":{"default":5,"type":"integer"}},"type":"object"},"PathsFilterLegacy":{"additionalProperties":false,"description":"`PathsFilterType` minus everything inherited from `FilterType` and persons modal related params","properties":{"edge_limit":{"type":"integer"},"end_point":{"type":"string"},"exclude_events":{"items":{"type":"string"},"type":"array"},"funnel_filter":{"type":"object"},"funnel_paths":{"$ref":"#/definitions/FunnelPathType"},"include_event_types":{"items":{"$ref":"#/definitions/PathType"},"type":"array"},"local_path_cleaning_filters":{"anyOf":[{"items":{"$ref":"#/definitions/PathCleaningFilter"},"type":"array"},{"type":"null"}]},"max_edge_weight":{"type":"integer"},"min_edge_weight":{"type":"integer"},"path_groupings":{"items":{"type":"string"},"type":"array"},"path_replacements":{"type":"boolean"},"path_type":{"$ref":"#/definitions/PathType"},"paths_hogql_expression":{"type":"string"},"start_point":{"type":"string"},"step_limit":{"type":"integer"}},"type":"object"},"PathsQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"funnelPathsFilter":{"$ref":"#/definitions/FunnelPathsFilter","description":"Used for displaying paths in relation to funnel steps."},"kind":{"const":"PathsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"pathsFilter":{"$ref":"#/definitions/PathsFilter","description":"Properties specific to the paths insight"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/PathsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind","pathsFilter"],"type":"object"},"PathsQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"PersonPropertyFilter":{"additionalProperties":false,"description":"Sync with plugin-server/src/types.ts","properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"person","description":"Person properties","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"PersonType":{"additionalProperties":false,"properties":{"created_at":{"type":"string"},"distinct_ids":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"is_identified":{"type":"boolean"},"name":{"type":"string"},"properties":{"type":"object"},"uuid":{"type":"string"}},"required":["distinct_ids","properties"],"type":"object"},"PersonsNode":{"additionalProperties":false,"deprecated":"Use `ActorsQuery` instead.","properties":{"cohort":{"type":"integer"},"distinctId":{"type":"string"},"fixedProperties":{"description":"Fixed properties in the query, can\'t be edited in the interface (e.g. scoping down by person)","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"kind":{"const":"PersonsNode","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"properties":{"description":"Properties configurable in the interface","items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"type":"object"},"search":{"type":"string"}},"required":["kind"],"type":"object"},"PropertyFilterType":{"enum":["meta","event","person","element","feature","session","cohort","recording","log_entry","group","hogql","data_warehouse","data_warehouse_person_property"],"type":"string"},"PropertyFilterValue":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":["string","number"]},"type":"array"},{"type":"null"}]},"PropertyGroupFilter":{"additionalProperties":false,"properties":{"type":{"$ref":"#/definitions/FilterLogicalOperator"},"values":{"items":{"$ref":"#/definitions/PropertyGroupFilterValue"},"type":"array"}},"required":["type","values"],"type":"object"},"PropertyGroupFilterValue":{"additionalProperties":false,"properties":{"type":{"$ref":"#/definitions/FilterLogicalOperator"},"values":{"items":{"anyOf":[{"$ref":"#/definitions/AnyPropertyFilter"},{"$ref":"#/definitions/PropertyGroupFilterValue"}]},"type":"array"}},"required":["type","values"],"type":"object"},"PropertyMathType":{"enum":["avg","sum","min","max","median","p90","p95","p99"],"type":"string"},"PropertyOperator":{"description":"Sync with plugin-server/src/types.ts","enum":["exact","is_not","icontains","not_icontains","regex","not_regex","gt","gte","lt","lte","is_set","is_not_set","is_date_exact","is_date_before","is_date_after","between","not_between","min","max","in","not_in"],"type":"string"},"QueryRequest":{"additionalProperties":false,"properties":{"async":{"deprecated":"Use `refresh` instead.","type":"boolean"},"client_query_id":{"description":"Client provided query ID. Can be used to retrieve the status or cancel the query.","type":"string"},"filters_override":{"$ref":"#/definitions/DashboardFilter"},"query":{"$ref":"#/definitions/QuerySchema","description":"Submit a JSON string representing a query for PostHog data analysis, for example a HogQL query.\\n\\nExample payload:\\n\\n```\\n\\n{\\"query\\": {\\"kind\\": \\"HogQLQuery\\", \\"query\\": \\"select * from events limit 100\\"}}\\n\\n```\\n\\nFor more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access)."},"refresh":{"$ref":"#/definitions/RefreshType","default":"blocking","description":"Whether results should be calculated sync or async, and how much to rely on the cache:\\n- `\'blocking\'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache\\n- `\'async\'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache\\n- `\'lazy_async\'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache\\n- `\'force_blocking\'` - calculate synchronously, even if fresh results are already cached\\n- `\'force_async\'` - kick off background calculation, even if fresh results are already cached\\n- `\'force_cache\'` - return cached data or a cache miss; always completes immediately as it never calculates Background calculation can be tracked using the `query_status` response field."},"variables_override":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["query"],"type":"object"},"QueryResponseAlternative":{"anyOf":[{"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"missing_actors_count":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","limit","offset","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"breakdown":{"items":{"$ref":"#/definitions/BreakdownItem"},"type":"array"},"breakdowns":{"items":{"$ref":"#/definitions/MultipleBreakdownOptions"},"type":"array"},"compare":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"day":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"$ref":"#/definitions/DatetimeDay"},{"$ref":"#/definitions/Day"}]}},"required":["label","value"],"type":"object"},"type":"array"},"interval":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"description":"An interval selected out of available intervals in source query","type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"series":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"status":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/TimelineEntry"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"bytecode":{"items":{},"type":"array"},"coloredBytecode":{"items":{},"type":"array"},"results":{},"stdout":{"type":"string"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"clickhouse":{"description":"Executed ClickHouse query","type":"string"},"columns":{"description":"Returned columns","items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"explain":{"description":"Query explanation output","items":{"type":"string"},"type":"array"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"metadata":{"$ref":"#/definitions/HogQLMetadataResponse","description":"Query metadata output"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query":{"description":"Input query string","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"description":"Types of returned columns","items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"errors":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"},"isValid":{"type":"boolean"},"isValidView":{"type":"boolean"},"notices":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"},"query":{"type":"string"},"table_names":{"items":{"type":"string"},"type":"array"},"warnings":{"items":{"$ref":"#/definitions/HogQLNotice"},"type":"array"}},"required":["errors","warnings","notices"],"type":"object"},{"additionalProperties":false,"properties":{"incomplete_list":{"description":"Whether or not the suggestions returned are complete","type":"boolean"},"suggestions":{"items":{"$ref":"#/definitions/AutocompleteCompletionItem"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["suggestions","incomplete_list"],"type":"object"},{"additionalProperties":false,"properties":{"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/WebOverviewItem"},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/ErrorTrackingIssue"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"expected_loss":{"type":"number"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"insight":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantFunnelsBaseStats"},"type":"array"}},"required":["kind","insight","variants","probability","significant","significance_code","expected_loss","credible_intervals"],"type":"object"},{"additionalProperties":false,"properties":{"count_query":{"$ref":"#/definitions/TrendsQuery"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"insight":{"items":{"type":"object"},"type":"array"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"p_value":{"type":"number"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantTrendsBaseStats"},"type":"array"}},"required":["kind","insight","variants","probability","significant","significance_code","p_value","credible_intervals"],"type":"object"},{"properties":{},"type":"object"},{"not":{}},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"missing_actors_count":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"items":{},"type":"array"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"}},"required":["columns","hogql","limit","offset","results","types"],"type":"object"},{"additionalProperties":false,"properties":{"clickhouse":{"description":"Executed ClickHouse query","type":"string"},"columns":{"description":"Returned columns","items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"explain":{"description":"Query explanation output","items":{"type":"string"},"type":"array"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"metadata":{"$ref":"#/definitions/HogQLMetadataResponse","description":"Query metadata output"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query":{"description":"Input query string","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"description":"Types of returned columns","items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/WebOverviewItem"},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/ErrorTrackingIssue"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"expected_loss":{"type":"number"},"funnels_query":{"$ref":"#/definitions/FunnelsQuery"},"insight":{"items":{"items":{"type":"object"},"type":"array"},"type":"array"},"kind":{"const":"ExperimentFunnelsQuery","type":"string"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantFunnelsBaseStats"},"type":"array"}},"required":["credible_intervals","expected_loss","insight","kind","probability","significance_code","significant","variants"],"type":"object"},{"additionalProperties":false,"properties":{"count_query":{"$ref":"#/definitions/TrendsQuery"},"credible_intervals":{"additionalProperties":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"type":"object"},"exposure_query":{"$ref":"#/definitions/TrendsQuery"},"insight":{"items":{"type":"object"},"type":"array"},"kind":{"const":"ExperimentTrendsQuery","type":"string"},"p_value":{"type":"number"},"probability":{"additionalProperties":{"type":"number"},"type":"object"},"significance_code":{"$ref":"#/definitions/ExperimentSignificanceCode"},"significant":{"type":"boolean"},"stats_version":{"type":"integer"},"variants":{"items":{"$ref":"#/definitions/ExperimentVariantTrendsBaseStats"},"type":"array"}},"required":["credible_intervals","insight","kind","p_value","probability","significance_code","significant","variants"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"description":"Wether more breakdown values are available.","type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"isUdf":{"type":"boolean"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"anyOf":[{"$ref":"#/definitions/FunnelStepsResults"},{"$ref":"#/definitions/FunnelStepsBreakdownResults"},{"$ref":"#/definitions/FunnelTimeToConvertResults"},{"$ref":"#/definitions/FunnelTrendsResults"}]},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/RetentionResult"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/FunnelCorrelationResult"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"tables":{"additionalProperties":{"$ref":"#/definitions/DatabaseSchemaTable"},"type":"object"}},"required":["tables"],"type":"object"},{"additionalProperties":false,"properties":{"questions":{"items":{"type":"string"},"type":"array"}},"required":["questions"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/TeamTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/EventTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/ActorsPropertyTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"}]},"QuerySchema":{"discriminator":{"propertyName":"kind"},"oneOf":[{"$ref":"#/definitions/EventsNode"},{"$ref":"#/definitions/ActionsNode"},{"$ref":"#/definitions/PersonsNode"},{"$ref":"#/definitions/DataWarehouseNode"},{"$ref":"#/definitions/EventsQuery"},{"$ref":"#/definitions/ActorsQuery"},{"$ref":"#/definitions/InsightActorsQuery"},{"$ref":"#/definitions/InsightActorsQueryOptions"},{"$ref":"#/definitions/SessionsTimelineQuery"},{"$ref":"#/definitions/HogQuery"},{"$ref":"#/definitions/HogQLQuery"},{"$ref":"#/definitions/HogQLMetadata"},{"$ref":"#/definitions/HogQLAutocomplete"},{"$ref":"#/definitions/WebOverviewQuery"},{"$ref":"#/definitions/WebStatsTableQuery"},{"$ref":"#/definitions/WebExternalClicksTableQuery"},{"$ref":"#/definitions/WebGoalsQuery"},{"$ref":"#/definitions/SessionAttributionExplorerQuery"},{"$ref":"#/definitions/ErrorTrackingQuery"},{"$ref":"#/definitions/ExperimentFunnelsQuery"},{"$ref":"#/definitions/ExperimentTrendsQuery"},{"$ref":"#/definitions/DataVisualizationNode"},{"$ref":"#/definitions/DataTableNode"},{"$ref":"#/definitions/SavedInsightNode"},{"$ref":"#/definitions/InsightVizNode"},{"$ref":"#/definitions/TrendsQuery"},{"$ref":"#/definitions/FunnelsQuery"},{"$ref":"#/definitions/RetentionQuery"},{"$ref":"#/definitions/PathsQuery"},{"$ref":"#/definitions/StickinessQuery"},{"$ref":"#/definitions/LifecycleQuery"},{"$ref":"#/definitions/FunnelCorrelationQuery"},{"$ref":"#/definitions/DatabaseSchemaQuery"},{"$ref":"#/definitions/SuggestedQuestionsQuery"},{"$ref":"#/definitions/TeamTaxonomyQuery"},{"$ref":"#/definitions/EventTaxonomyQuery"},{"$ref":"#/definitions/ActorsPropertyTaxonomyQuery"}],"required":["kind"],"type":"object"},"QuerySchemaRoot":{"$ref":"#/definitions/QuerySchema"},"QueryStatus":{"additionalProperties":false,"properties":{"complete":{"default":false,"description":"Whether the query is still running. Will be true if the query is complete, even if it errored. Either result or error will be set.","type":"boolean"},"dashboard_id":{"type":"integer"},"end_time":{"description":"When did the query execution task finish (whether successfully or not).","format":"date-time","type":"string"},"error":{"default":false,"description":"If the query failed, this will be set to true. More information can be found in the error_message field.","type":"boolean"},"error_message":{"default":null,"type":["string","null"]},"expiration_time":{"format":"date-time","type":"string"},"id":{"type":"string"},"insight_id":{"type":"integer"},"labels":{"items":{"type":"string"},"type":"array"},"pickup_time":{"description":"When was the query execution task picked up by a worker.","format":"date-time","type":"string"},"query_async":{"const":true,"default":true,"description":"ONLY async queries use QueryStatus.","type":"boolean"},"query_progress":{"$ref":"#/definitions/ClickhouseQueryProgress"},"results":{},"start_time":{"description":"When was query execution task enqueued.","format":"date-time","type":"string"},"task_id":{"type":"string"},"team_id":{"type":"integer"}},"required":["id","query_async","team_id","error","complete","error_message"],"type":"object"},"QueryStatusResponse":{"additionalProperties":false,"properties":{"query_status":{"$ref":"#/definitions/QueryStatus"}},"required":["query_status"],"type":"object"},"QueryTiming":{"additionalProperties":false,"properties":{"k":{"description":"Key. Shortened to \'k\' to save on data.","type":"string"},"t":{"description":"Time in seconds. Shortened to \'t\' to save on data.","type":"number"}},"required":["k","t"],"type":"object"},"ReasoningMessage":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"substeps":{"items":{"type":"string"},"type":"array"},"type":{"const":"ai/reasoning","type":"string"}},"required":["type","content"],"type":"object"},"RecordingOrder":{"enum":["duration","recording_duration","inactive_seconds","active_seconds","start_time","console_error_count","click_count","keypress_count","mouse_activity_count","activity_score"],"type":"string"},"RecordingPropertyFilter":{"additionalProperties":false,"properties":{"key":{"anyOf":[{"$ref":"#/definitions/DurationType"},{"const":"snapshot_source","type":"string"},{"const":"visited_page","type":"string"}]},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"recording","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"RecordingsQuery":{"additionalProperties":false,"properties":{"actions":{"items":{"type":"object"},"type":"array"},"console_log_filters":{"items":{"$ref":"#/definitions/LogEntryPropertyFilter"},"type":"array"},"date_from":{"default":"-3d","type":["string","null"]},"date_to":{"type":["string","null"]},"events":{"items":{"type":"object"},"type":"array"},"filter_test_accounts":{"type":"boolean"},"having_predicates":{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"kind":{"const":"RecordingsQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"operand":{"$ref":"#/definitions/FilterLogicalOperator","default":"AND"},"order":{"$ref":"#/definitions/RecordingOrder","default":"start_time"},"person_uuid":{"type":"string"},"properties":{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},"response":{"$ref":"#/definitions/RecordingsQueryResponse"},"session_ids":{"items":{"type":"string"},"type":"array"},"user_modified_filters":{"type":"object"}},"required":["kind"],"type":"object"},"RecordingsQueryResponse":{"additionalProperties":false,"properties":{"has_next":{"type":"boolean"},"results":{"items":{"$ref":"#/definitions/SessionRecordingType"},"type":"array"}},"required":["results","has_next"],"type":"object"},"RefreshType":{"anyOf":[{"type":"boolean"},{"const":"async","type":"string"},{"const":"async_except_on_cache_miss","type":"string"},{"const":"blocking","type":"string"},{"const":"force_async","type":"string"},{"const":"force_blocking","type":"string"},{"const":"force_cache","type":"string"},{"const":"lazy_async","type":"string"}]},"ResultCustomization":{"anyOf":[{"$ref":"#/definitions/ResultCustomizationByValue"},{"$ref":"#/definitions/ResultCustomizationByPosition"}]},"ResultCustomizationBase":{"additionalProperties":false,"properties":{"color":{"$ref":"#/definitions/DataColorToken"}},"required":["color"],"type":"object"},"ResultCustomizationBy":{"enum":["value","position"],"type":"string"},"ResultCustomizationByPosition":{"additionalProperties":false,"properties":{"assignmentBy":{"const":"position","type":"string"},"color":{"$ref":"#/definitions/DataColorToken"}},"required":["assignmentBy","color"],"type":"object"},"ResultCustomizationByValue":{"additionalProperties":false,"properties":{"assignmentBy":{"const":"value","type":"string"},"color":{"$ref":"#/definitions/DataColorToken"}},"required":["assignmentBy","color"],"type":"object"},"RetentionEntity":{"additionalProperties":false,"properties":{"custom_name":{"type":"string"},"id":{"type":["string","number"]},"kind":{"$ref":"#/definitions/RetentionEntityKind"},"name":{"type":"string"},"order":{"type":"integer"},"type":{"$ref":"#/definitions/EntityType"},"uuid":{"type":"string"}},"type":"object"},"RetentionEntityKind":{"enum":["ActionsNode","EventsNode"],"type":"string"},"RetentionFilter":{"additionalProperties":false,"properties":{"cumulative":{"type":"boolean"},"period":{"$ref":"#/definitions/RetentionPeriod","default":"Day"},"retentionReference":{"enum":["total","previous"],"type":"string"},"retentionType":{"$ref":"#/definitions/RetentionType"},"returningEntity":{"$ref":"#/definitions/RetentionEntity"},"showMean":{"type":"boolean"},"targetEntity":{"$ref":"#/definitions/RetentionEntity"},"totalIntervals":{"default":11,"type":"integer"}},"type":"object"},"RetentionFilterLegacy":{"additionalProperties":false,"description":"`RetentionFilterType` minus everything inherited from `FilterType`","properties":{"cumulative":{"type":"boolean"},"period":{"$ref":"#/definitions/RetentionPeriod"},"retention_reference":{"enum":["total","previous"],"type":"string"},"retention_type":{"$ref":"#/definitions/RetentionType"},"returning_entity":{"$ref":"#/definitions/RetentionEntity"},"show_mean":{"type":"boolean"},"target_entity":{"$ref":"#/definitions/RetentionEntity"},"total_intervals":{"type":"integer"}},"type":"object"},"RetentionPeriod":{"enum":["Hour","Day","Week","Month"],"type":"string"},"RetentionQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"kind":{"const":"RetentionQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/RetentionQueryResponse"},"retentionFilter":{"$ref":"#/definitions/RetentionFilter","description":"Properties specific to the retention insight"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]}},"required":["kind","retentionFilter"],"type":"object"},"RetentionQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/RetentionResult"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"RetentionResult":{"additionalProperties":false,"properties":{"date":{"format":"date-time","type":"string"},"label":{"type":"string"},"values":{"items":{"$ref":"#/definitions/RetentionValue"},"type":"array"}},"required":["values","label","date"],"type":"object"},"RetentionType":{"enum":["retention_recurring","retention_first_time"],"type":"string"},"RetentionValue":{"additionalProperties":false,"properties":{"count":{"type":"integer"}},"required":["count"],"type":"object"},"RootAssistantMessage":{"anyOf":[{"$ref":"#/definitions/VisualizationMessage"},{"$ref":"#/definitions/ReasoningMessage"},{"$ref":"#/definitions/AssistantMessage"},{"$ref":"#/definitions/HumanMessage"},{"$ref":"#/definitions/FailureMessage"},{"$ref":"#/definitions/RouterMessage"}]},"RouterMessage":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"type":{"const":"ai/router","type":"string"}},"required":["type","content"],"type":"object"},"SamplingRate":{"additionalProperties":false,"properties":{"denominator":{"type":"number"},"numerator":{"type":"number"}},"required":["numerator"],"type":"object"},"SavedInsightNode":{"additionalProperties":false,"properties":{"allowSorting":{"description":"Can the user click on column headers to sort the table? (default: true)","type":"boolean"},"embedded":{"description":"Query is embedded inside another bordered component","type":"boolean"},"expandable":{"description":"Can expand row to show raw event data (default: true)","type":"boolean"},"full":{"description":"Show with most visual options enabled. Used in insight scene.","type":"boolean"},"hidePersonsModal":{"type":"boolean"},"kind":{"const":"SavedInsightNode","type":"string"},"propertiesViaUrl":{"description":"Link properties via the URL (default: false)","type":"boolean"},"shortId":{"$ref":"#/definitions/InsightShortId"},"showActions":{"description":"Show the kebab menu at the end of the row","type":"boolean"},"showColumnConfigurator":{"description":"Show a button to configure the table\'s columns if possible","type":"boolean"},"showCorrelationTable":{"type":"boolean"},"showDateRange":{"description":"Show date range selector","type":"boolean"},"showElapsedTime":{"description":"Show the time it takes to run a query","type":"boolean"},"showEventFilter":{"description":"Include an event filter above the table (EventsNode only)","type":"boolean"},"showExport":{"description":"Show the export button","type":"boolean"},"showFilters":{"type":"boolean"},"showHeader":{"type":"boolean"},"showHogQLEditor":{"description":"Include a HogQL query editor above HogQL tables","type":"boolean"},"showLastComputation":{"type":"boolean"},"showLastComputationRefresh":{"type":"boolean"},"showOpenEditorButton":{"description":"Show a button to open the current query as a new insight. (default: true)","type":"boolean"},"showPersistentColumnConfigurator":{"description":"Show a button to configure and persist the table\'s default columns if possible","type":"boolean"},"showPropertyFilter":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/definitions/TaxonomicFilterGroupType"},"type":"array"}],"description":"Include a property filter above the table"},"showReload":{"description":"Show a reload button","type":"boolean"},"showResults":{"type":"boolean"},"showResultsTable":{"description":"Show a results table","type":"boolean"},"showSavedQueries":{"description":"Shows a list of saved queries","type":"boolean"},"showSearch":{"description":"Include a free text search field (PersonsNode only)","type":"boolean"},"showTable":{"type":"boolean"},"showTestAccountFilters":{"description":"Show filter to exclude test accounts","type":"boolean"},"showTimings":{"description":"Show a detailed query timing breakdown","type":"boolean"},"suppressSessionAnalysisWarning":{"type":"boolean"},"vizSpecificOptions":{"$ref":"#/definitions/VizSpecificOptions"}},"required":["kind","shortId"],"type":"object"},"SessionAttributionExplorerQuery":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":false,"properties":{"dateRange":{"$ref":"#/definitions/DateRange"},"properties":{"items":{"$ref":"#/definitions/SessionPropertyFilter"},"type":"array"}},"type":"object"},"groupBy":{"items":{"$ref":"#/definitions/SessionAttributionGroupBy"},"type":"array"},"kind":{"const":"SessionAttributionExplorerQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"response":{"$ref":"#/definitions/SessionAttributionExplorerQueryResponse"}},"required":["groupBy","kind"],"type":"object"},"SessionAttributionExplorerQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},"SessionAttributionGroupBy":{"enum":["ChannelType","Medium","Source","Campaign","AdIds","ReferringDomain","InitialURL"],"type":"string"},"SessionPropertyFilter":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"operator":{"$ref":"#/definitions/PropertyOperator"},"type":{"const":"session","type":"string"},"value":{"$ref":"#/definitions/PropertyFilterValue"}},"required":["key","operator","type"],"type":"object"},"SessionRecordingType":{"additionalProperties":false,"properties":{"active_seconds":{"type":"number"},"activity_score":{"description":"calculated on the backend so that we can sort by it, definition may change over time","type":"number"},"click_count":{"type":"number"},"console_error_count":{"type":"number"},"console_log_count":{"type":"number"},"console_warn_count":{"type":"number"},"distinct_id":{"type":"string"},"email":{"type":"string"},"end_time":{"description":"When the recording ends in ISO format.","type":"string"},"id":{"type":"string"},"inactive_seconds":{"type":"number"},"keypress_count":{"type":"number"},"matching_events":{"description":"List of matching events. *","items":{"$ref":"#/definitions/MatchedRecording"},"type":"array"},"mouse_activity_count":{"description":"count of all mouse activity in the recording, not just clicks","type":"number"},"ongoing":{"description":"whether we have received data for this recording in the last 5 minutes (assumes the recording was loaded from ClickHouse)\\n*","type":"boolean"},"person":{"$ref":"#/definitions/PersonType"},"recording_duration":{"description":"Length of recording in seconds.","type":"number"},"snapshot_source":{"enum":["web","mobile","unknown"],"type":"string"},"start_time":{"description":"When the recording starts in ISO format.","type":"string"},"start_url":{"type":"string"},"storage":{"description":"Where this recording information was loaded from","enum":["object_storage_lts","object_storage"],"type":"string"},"summary":{"type":"string"},"viewed":{"description":"Whether this recording has been viewed already.","type":"boolean"}},"required":["id","viewed","recording_duration","start_time","end_time","snapshot_source"],"type":"object"},"SessionsTimelineQuery":{"additionalProperties":false,"properties":{"after":{"description":"Only fetch sessions that started after this timestamp (default: \'-24h\')","type":"string"},"before":{"description":"Only fetch sessions that started before this timestamp (default: \'+5s\')","type":"string"},"kind":{"const":"SessionsTimelineQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"personId":{"description":"Fetch sessions only for a given person","type":"string"},"response":{"$ref":"#/definitions/SessionsTimelineQueryResponse"}},"required":["kind"],"type":"object"},"SessionsTimelineQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/TimelineEntry"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"StepOrderValue":{"enum":["strict","unordered","ordered"],"type":"string"},"StickinessFilter":{"additionalProperties":false,"properties":{"display":{"$ref":"#/definitions/ChartDisplayType"},"hiddenLegendIndexes":{"items":{"type":"integer"},"type":"array"},"showLegend":{"type":"boolean"},"showValuesOnSeries":{"type":"boolean"},"stickinessCriteria":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/definitions/StickinessOperator"},"value":{"type":"integer"}},"required":["operator","value"],"type":"object"}},"type":"object"},"StickinessFilterLegacy":{"additionalProperties":false,"description":"`StickinessFilterType` minus everything inherited from `FilterType` and persons modal related params","properties":{"compare":{"type":"boolean"},"compare_to":{"type":"string"},"display":{"$ref":"#/definitions/ChartDisplayType"},"hidden_legend_keys":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"not":{}}]},"type":"object"},"show_legend":{"type":"boolean"},"show_values_on_series":{"type":"boolean"}},"type":"object"},"StickinessOperator":{"enum":["gte","lte","exact"],"type":"string"},"StickinessQuery":{"additionalProperties":false,"properties":{"compareFilter":{"$ref":"#/definitions/CompareFilter","description":"Compare to date range"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"interval":{"$ref":"#/definitions/IntervalType","default":"day","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"StickinessQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/StickinessQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]},"series":{"description":"Events and actions to include","items":{"$ref":"#/definitions/AnyEntityNode"},"type":"array"},"stickinessFilter":{"$ref":"#/definitions/StickinessFilter","description":"Properties specific to the stickiness insight"}},"required":["kind","series"],"type":"object"},"StickinessQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"SuggestedQuestionsQuery":{"additionalProperties":false,"properties":{"kind":{"const":"SuggestedQuestionsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/SuggestedQuestionsQueryResponse"}},"required":["kind"],"type":"object"},"SuggestedQuestionsQueryResponse":{"additionalProperties":false,"properties":{"questions":{"items":{"type":"string"},"type":"array"}},"required":["questions"],"type":"object"},"TableSettings":{"additionalProperties":false,"properties":{"columns":{"items":{"$ref":"#/definitions/ChartAxis"},"type":"array"},"conditionalFormatting":{"items":{"$ref":"#/definitions/ConditionalFormattingRule"},"type":"array"}},"type":"object"},"TaxonomicFilterGroupType":{"enum":["metadata","actions","cohorts","cohorts_with_all","data_warehouse","data_warehouse_properties","data_warehouse_person_properties","elements","events","event_properties","event_feature_flags","numerical_event_properties","person_properties","pageview_urls","screens","custom_events","wildcard","groups","persons","feature_flags","insights","experiments","plugins","dashboards","name_groups","session_properties","hogql_expression","notebooks","log_entries","replay"],"type":"string"},"TeamTaxonomyItem":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"event":{"type":"string"}},"required":["event","count"],"type":"object"},"TeamTaxonomyQuery":{"additionalProperties":false,"properties":{"kind":{"const":"TeamTaxonomyQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"response":{"$ref":"#/definitions/TeamTaxonomyQueryResponse"}},"required":["kind"],"type":"object"},"TeamTaxonomyQueryResponse":{"additionalProperties":false,"description":"All analytics query responses must inherit from this.","properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"$ref":"#/definitions/TeamTaxonomyResponse"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"TeamTaxonomyResponse":{"items":{"$ref":"#/definitions/TeamTaxonomyItem"},"type":"array"},"TestBasicQueryResponse":{"additionalProperties":false,"deprecated":"Only exported for use in test_query_runner.py! Don\'t use anywhere else.","properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"TestCachedBasicQueryResponse":{"additionalProperties":false,"deprecated":"Only exported for use in test_query_runner.py! Don\'t use anywhere else.","properties":{"cache_key":{"type":"string"},"cache_target_age":{"format":"date-time","type":"string"},"calculation_trigger":{"description":"What triggered the calculation of the query, leave empty if user/immediate","type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"is_cached":{"type":"boolean"},"last_refresh":{"format":"date-time","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"next_allowed_client_refresh":{"format":"date-time","type":"string"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"timezone":{"type":"string"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["cache_key","is_cached","last_refresh","next_allowed_client_refresh","results","timezone"],"type":"object"},"TimelineEntry":{"additionalProperties":false,"properties":{"events":{"items":{"$ref":"#/definitions/EventType"},"type":"array"},"recording_duration_s":{"description":"Duration of the recording in seconds.","type":"number"},"sessionId":{"description":"Session ID. None means out-of-session events","type":"string"}},"required":["events"],"type":"object"},"TrendsAlertConfig":{"additionalProperties":false,"properties":{"check_ongoing_interval":{"type":"boolean"},"series_index":{"type":"integer"},"type":{"const":"TrendsAlertConfig","type":"string"}},"required":["type","series_index"],"type":"object"},"TrendsFilter":{"additionalProperties":false,"properties":{"aggregationAxisFormat":{"$ref":"#/definitions/AggregationAxisFormat","default":"numeric"},"aggregationAxisPostfix":{"type":"string"},"aggregationAxisPrefix":{"type":"string"},"breakdown_histogram_bin_count":{"type":"number"},"decimalPlaces":{"type":"number"},"display":{"$ref":"#/definitions/ChartDisplayType","default":"ActionsLineGraph"},"formula":{"type":"string"},"hiddenLegendIndexes":{"items":{"type":"integer"},"type":"array"},"resultCustomizationBy":{"$ref":"#/definitions/ResultCustomizationBy","default":"value","description":"Wether result datasets are associated by their values or by their order."},"resultCustomizations":{"anyOf":[{"additionalProperties":{"$ref":"#/definitions/ResultCustomizationByValue"},"type":"object"},{"additionalProperties":{"$ref":"#/definitions/ResultCustomizationByPosition"},"propertyNames":{"type":"string"},"type":"object"}],"description":"Customizations for the appearance of result datasets."},"showAlertThresholdLines":{"default":false,"type":"boolean"},"showLabelsOnSeries":{"type":"boolean"},"showLegend":{"default":false,"type":"boolean"},"showPercentStackView":{"default":false,"type":"boolean"},"showValuesOnSeries":{"default":false,"type":"boolean"},"smoothingIntervals":{"default":1,"type":"integer"},"yAxisScaleType":{"enum":["log10","linear"],"type":"string"}},"type":"object"},"TrendsFilterLegacy":{"additionalProperties":false,"description":"`TrendsFilterType` minus everything inherited from `FilterType` and `shown_as`","properties":{"aggregation_axis_format":{"$ref":"#/definitions/AggregationAxisFormat"},"aggregation_axis_postfix":{"type":"string"},"aggregation_axis_prefix":{"type":"string"},"breakdown_histogram_bin_count":{"type":"number"},"compare":{"type":"boolean"},"compare_to":{"type":"string"},"decimal_places":{"type":"number"},"display":{"$ref":"#/definitions/ChartDisplayType"},"formula":{"type":"string"},"hidden_legend_keys":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"not":{}}]},"type":"object"},"show_alert_threshold_lines":{"type":"boolean"},"show_labels_on_series":{"type":"boolean"},"show_legend":{"type":"boolean"},"show_percent_stack_view":{"type":"boolean"},"show_values_on_series":{"type":"boolean"},"smoothing_intervals":{"type":"number"},"y_axis_scale_type":{"enum":["log10","linear"],"type":"string"}},"type":"object"},"TrendsQuery":{"additionalProperties":false,"properties":{"aggregation_group_type_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Groups aggregation"},"breakdownFilter":{"$ref":"#/definitions/BreakdownFilter","description":"Breakdown of the events and actions"},"compareFilter":{"$ref":"#/definitions/CompareFilter","description":"Compare to date range"},"conversionGoal":{"anyOf":[{"$ref":"#/definitions/WebAnalyticsConversionGoal"},{"type":"null"}],"description":"Whether we should be comparing against a specific conversion goal"},"dataColorTheme":{"description":"Colors used in the insight\'s visualization","type":["number","null"]},"dateRange":{"$ref":"#/definitions/DateRange","description":"Date range for the query"},"filterTestAccounts":{"default":false,"description":"Exclude internal and test users by applying the respective filters","type":"boolean"},"interval":{"$ref":"#/definitions/IntervalType","default":"day","description":"Granularity of the response. Can be one of `hour`, `day`, `week` or `month`"},"kind":{"const":"TrendsQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"anyOf":[{"items":{"$ref":"#/definitions/AnyPropertyFilter"},"type":"array"},{"$ref":"#/definitions/PropertyGroupFilter"}],"default":[],"description":"Property filters for all series"},"response":{"$ref":"#/definitions/TrendsQueryResponse"},"samplingFactor":{"description":"Sampling rate","type":["number","null"]},"series":{"description":"Events and actions to include","items":{"$ref":"#/definitions/AnyEntityNode"},"type":"array"},"trendsFilter":{"$ref":"#/definitions/TrendsFilter","description":"Properties specific to the trends insight"}},"required":["kind","series"],"type":"object"},"TrendsQueryResponse":{"additionalProperties":false,"properties":{"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"description":"Wether more breakdown values are available.","type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"type":"object"},"type":"array"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"VisualizationMessage":{"additionalProperties":false,"properties":{"answer":{"anyOf":[{"$ref":"#/definitions/AssistantTrendsQuery"},{"$ref":"#/definitions/AssistantFunnelsQuery"}]},"id":{"type":"string"},"initiator":{"type":"string"},"plan":{"type":"string"},"type":{"const":"ai/viz","type":"string"}},"required":["type"],"type":"object"},"VizSpecificOptions":{"additionalProperties":false,"description":"Chart specific rendering options. Use ChartRenderingMetadata for non-serializable values, e.g. onClick handlers","properties":{"ActionsPie":{"additionalProperties":false,"properties":{"disableHoverOffset":{"type":"boolean"},"hideAggregation":{"type":"boolean"}},"type":"object"},"RETENTION":{"additionalProperties":false,"properties":{"hideLineGraph":{"type":"boolean"},"hideSizeColumn":{"type":"boolean"},"useSmallLayout":{"type":"boolean"}},"type":"object"}},"type":"object"},"WebAnalyticsConversionGoal":{"anyOf":[{"$ref":"#/definitions/ActionConversionGoal"},{"$ref":"#/definitions/CustomEventConversionGoal"}]},"WebAnalyticsPropertyFilter":{"anyOf":[{"$ref":"#/definitions/EventPropertyFilter"},{"$ref":"#/definitions/PersonPropertyFilter"},{"$ref":"#/definitions/SessionPropertyFilter"}]},"WebAnalyticsPropertyFilters":{"items":{"$ref":"#/definitions/WebAnalyticsPropertyFilter"},"type":"array"},"WebExternalClicksTableQuery":{"additionalProperties":false,"properties":{"compareFilter":{"$ref":"#/definitions/CompareFilter"},"conversionGoal":{"anyOf":[{"$ref":"#/definitions/WebAnalyticsConversionGoal"},{"type":"null"}]},"dateRange":{"$ref":"#/definitions/DateRange"},"filterTestAccounts":{"type":"boolean"},"kind":{"const":"WebExternalClicksTableQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"$ref":"#/definitions/WebAnalyticsPropertyFilters"},"response":{"$ref":"#/definitions/WebExternalClicksTableQueryResponse"},"sampling":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"forceSamplingRate":{"$ref":"#/definitions/SamplingRate"}},"type":"object"},"stripQueryParams":{"type":"boolean"},"useSessionsTable":{"deprecated":"ignored, always treated as enabled *","type":"boolean"}},"required":["kind","properties"],"type":"object"},"WebExternalClicksTableQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},"WebGoalsQuery":{"additionalProperties":false,"properties":{"compareFilter":{"$ref":"#/definitions/CompareFilter"},"conversionGoal":{"anyOf":[{"$ref":"#/definitions/WebAnalyticsConversionGoal"},{"type":"null"}]},"dateRange":{"$ref":"#/definitions/DateRange"},"filterTestAccounts":{"type":"boolean"},"kind":{"const":"WebGoalsQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"$ref":"#/definitions/WebAnalyticsPropertyFilters"},"response":{"$ref":"#/definitions/WebGoalsQueryResponse"},"sampling":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"forceSamplingRate":{"$ref":"#/definitions/SamplingRate"}},"type":"object"},"useSessionsTable":{"deprecated":"ignored, always treated as enabled *","type":"boolean"}},"required":["kind","properties"],"type":"object"},"WebGoalsQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},"WebOverviewItem":{"additionalProperties":false,"properties":{"changeFromPreviousPct":{"type":"number"},"isIncreaseBad":{"type":"boolean"},"key":{"type":"string"},"kind":{"$ref":"#/definitions/WebOverviewItemKind"},"previous":{"type":"number"},"value":{"type":"number"}},"required":["key","kind"],"type":"object"},"WebOverviewItemKind":{"enum":["unit","duration_s","percentage"],"type":"string"},"WebOverviewQuery":{"additionalProperties":false,"properties":{"compareFilter":{"$ref":"#/definitions/CompareFilter"},"conversionGoal":{"anyOf":[{"$ref":"#/definitions/WebAnalyticsConversionGoal"},{"type":"null"}]},"dateRange":{"$ref":"#/definitions/DateRange"},"filterTestAccounts":{"type":"boolean"},"includeLCPScore":{"type":"boolean"},"kind":{"const":"WebOverviewQuery","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"$ref":"#/definitions/WebAnalyticsPropertyFilters"},"response":{"$ref":"#/definitions/WebOverviewQueryResponse"},"sampling":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"forceSamplingRate":{"$ref":"#/definitions/SamplingRate"}},"type":"object"},"useSessionsTable":{"deprecated":"ignored, always treated as enabled *","type":"boolean"}},"required":["kind","properties"],"type":"object"},"WebOverviewQueryResponse":{"additionalProperties":false,"properties":{"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hogql":{"description":"Generated HogQL query.","type":"string"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{"$ref":"#/definitions/WebOverviewItem"},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"}},"required":["results"],"type":"object"},"WebStatsBreakdown":{"enum":["Page","InitialPage","ExitPage","ExitClick","InitialChannelType","InitialReferringDomain","InitialUTMSource","InitialUTMCampaign","InitialUTMMedium","InitialUTMTerm","InitialUTMContent","InitialUTMSourceMediumCampaign","Browser","OS","Viewport","DeviceType","Country","Region","City","Timezone","Language"],"type":"string"},"WebStatsTableQuery":{"additionalProperties":false,"properties":{"breakdownBy":{"$ref":"#/definitions/WebStatsBreakdown"},"compareFilter":{"$ref":"#/definitions/CompareFilter"},"conversionGoal":{"anyOf":[{"$ref":"#/definitions/WebAnalyticsConversionGoal"},{"type":"null"}]},"dateRange":{"$ref":"#/definitions/DateRange"},"doPathCleaning":{"type":"boolean"},"filterTestAccounts":{"type":"boolean"},"includeBounceRate":{"type":"boolean"},"includeScrollDepth":{"type":"boolean"},"kind":{"const":"WebStatsTableQuery","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"properties":{"$ref":"#/definitions/WebAnalyticsPropertyFilters"},"response":{"$ref":"#/definitions/WebStatsTableQueryResponse"},"sampling":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"forceSamplingRate":{"$ref":"#/definitions/SamplingRate"}},"type":"object"},"useSessionsTable":{"deprecated":"ignored, always treated as enabled *","type":"boolean"}},"required":["breakdownBy","kind","properties"],"type":"object"},"WebStatsTableQueryResponse":{"additionalProperties":false,"properties":{"columns":{"items":{},"type":"array"},"error":{"description":"Query error. Returned only if \'explain\' or `modifiers.debug` is true. Throws an error otherwise.","type":"string"},"hasMore":{"type":"boolean"},"hogql":{"description":"Generated HogQL query.","type":"string"},"limit":{"type":"integer"},"modifiers":{"$ref":"#/definitions/HogQLQueryModifiers","description":"Modifiers used when performing the query"},"offset":{"type":"integer"},"query_status":{"$ref":"#/definitions/QueryStatus","description":"Query status indicates whether next to the provided data, a query is still running."},"results":{"items":{},"type":"array"},"samplingRate":{"$ref":"#/definitions/SamplingRate"},"timings":{"description":"Measured timings for different parts of the query generation process","items":{"$ref":"#/definitions/QueryTiming"},"type":"array"},"types":{"items":{},"type":"array"}},"required":["results"],"type":"object"},"YAxisSettings":{"additionalProperties":false,"properties":{"scale":{"enum":["linear","logarithmic"],"type":"string"},"startAtZero":{"description":"Whether the Y axis should start at zero","type":"boolean"}},"type":"object"},"numerical_key":{"type":"string"}}}')}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[27774],()=>__webpack_exec__("./storybook-config-entry.js")),__webpack_require__.O()}]); -//# sourceMappingURL=main.27cd4f3d.iframe.bundle.js.map \ No newline at end of file +//# sourceMappingURL=main.76fe5407.iframe.bundle.js.map \ No newline at end of file diff --git a/docs/main.27cd4f3d.iframe.bundle.js.map b/docs/main.76fe5407.iframe.bundle.js.map similarity index 99% rename from docs/main.27cd4f3d.iframe.bundle.js.map rename to docs/main.76fe5407.iframe.bundle.js.map index 3f0df8ad7..214251994 100644 --- a/docs/main.27cd4f3d.iframe.bundle.js.map +++ b/docs/main.76fe5407.iframe.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"main.27cd4f3d.iframe.bundle.js","mappings":";;;;;AAyBA;ACqKA;;;;;;;ACiCA;AC7LA;AAAA;AAKA;;;ACVA;;;AAsBA;;AAEA;;ACYA;ACrCA;AAUA;AAOA;AAkDA;;AAuXA;AAAA;AAAA;AAAA;AAlZA;AAaA;AAOA;;;;;;;ACWA;;AC5EA;;;;;;;;;;;ACmPA;;;;;AAeA;;;AAcA;;;;;;;AAyDA;AC9QA;ACqhBA;AACA;AC9fA;AASA;;;AAWA;AC1GA;;;AAoBA;;;AAIA;AAKA;AACA;AAGA;;AAIA;;AAEA;AAGA;AACA;AAGA;AAGA;;AAEA;;AAWA;AACA;AACA;;;;;AAiCA;;;AAIA;AAKA;;;AAGA;AACA;AAGA;AACA;AACA;;AAWA;AACA;AACA;;;AAwBA;;;AAIA;;AAMA;;AAEA;;AAEA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AAwBA;;;AAIA;AAKA;;AAEA;AACA;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AA6BA;;;AAIA;AAKA;;AAEA;AACA;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AA8BA;;;AAyBA;;AAuBA;;;;AAyBA;;;;;;;AAOA;;;;AAIA;AACA;AAkBA;;;AAGA;;AAEA;;;AAGA;AAUA;;;AASA;AACA;;AAEA;;;AA6BA;;AAMA;;AAWA;;AAEA;;;;;;AAMA;;AAEA;;;;AAaA;;;;;;;;;;;;;AAaA;ACxeA;;;;;;;;;;;ACyLA;;;;;;;;;;;;;;;;;;;AC8nCA;;ACjtBA;AACA;AACA;AACA;;ACroBA;AACA;;;;;AAKA;AACA;AACA;;;ACOA;AC0EA;;;;;ACoJA;AACA;AACA;;;;AAIA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;;AAuCA;;;;AAIA;AACA;AACA;AACA;;AAEA;;;AA0CA;;;;AAIA;AACA;AACA;;AAEA;;AAuEA;;;;AAIA;AACA;AACA;;AAEA;;;AAkCA;;;AAGA;AACA;AACA;;;AAGA;;;;AA+CA;AACA;AACA;AACA;;AAEA","sources":["webpack://posthog/./frontend/src/lib/components/ReverseProxyChecker/reverseProxyCheckerLogic.ts","webpack://posthog/./frontend/src/lib/components/Alerts/views/EditAlertModal.tsx","webpack://posthog/./frontend/src/lib/components/AuthorizedUrlList/authorizedUrlListLogic.ts","webpack://posthog/./frontend/src/lib/components/JSSnippet.tsx","webpack://posthog/./frontend/src/lib/components/Metalytics/metalyticsLogic.ts","webpack://posthog/./frontend/src/lib/components/Support/SupportForm.tsx","webpack://posthog/./frontend/src/lib/components/Support/supportLogic.ts","webpack://posthog/./frontend/src/lib/components/VersionChecker/versionCheckerLogic.ts","webpack://posthog/./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx","webpack://posthog/./frontend/src/queries/examples.ts","webpack://posthog/./frontend/src/scenes/paths/renderPaths.ts","webpack://posthog/./frontend/src/scenes/billing/billingLogic.tsx","webpack://posthog/./frontend/src/scenes/early-access-features/InstructionsModal.tsx","webpack://posthog/./frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx","webpack://posthog/./frontend/src/scenes/notebooks/Nodes/NotebookNodeReplayTimestamp.tsx","webpack://posthog/./frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx","webpack://posthog/./ee/frontend/mobile-replay/transformer/transformers.ts","webpack://posthog/./frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts","webpack://posthog/./frontend/src/scenes/session-recordings/playlist/sessionRecordingsListPropertiesLogic.ts","webpack://posthog/./frontend/src/scenes/settings/organization/VerifiedDomains/ConfigureSAMLModal.tsx","webpack://posthog/./frontend/src/scenes/settings/environment/ManagedReverseProxy.tsx","webpack://posthog/./frontend/src/scenes/surveys/surveyLogic.tsx"],"sourcesContent":["import { afterMount, kea, path, reducers } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { reverseProxyCheckerLogicType } from './reverseProxyCheckerLogicType'\n\nconst CHECK_INTERVAL_MS = 1000 * 60 * 60 // 1 hour\n\nexport const reverseProxyCheckerLogic = kea([\n path(['components', 'ReverseProxyChecker', 'reverseProxyCheckerLogic']),\n loaders({\n hasReverseProxy: [\n false as boolean | null,\n {\n loadHasReverseProxy: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$lib_custom_api_host AS lib_custom_api_host\n FROM events\n WHERE timestamp >= now() - INTERVAL 1 DAY \n AND timestamp <= now()\n ORDER BY timestamp DESC\n limit 10`,\n }\n\n const res = await api.query(query)\n return !!res.results?.find((x) => !!x[0])\n },\n },\n ],\n }),\n reducers({\n lastCheckedTimestamp: [\n 0,\n { persist: true },\n {\n loadHasReverseProxySuccess: () => Date.now(),\n },\n ],\n }),\n afterMount(({ actions, values }) => {\n if (values.lastCheckedTimestamp < Date.now() - CHECK_INTERVAL_MS) {\n actions.loadHasReverseProxy()\n }\n }),\n])\n","import { IconInfo } from '@posthog/icons'\nimport {\n LemonBanner,\n LemonCheckbox,\n LemonInput,\n LemonSegmentedButton,\n LemonSelect,\n SpinnerOverlay,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form, Group } from 'kea-forms'\nimport { AlertStateIndicator } from 'lib/components/Alerts/views/ManageAlertsModal'\nimport { MemberSelectMultiple } from 'lib/components/MemberSelectMultiple'\nimport { TZLabel } from 'lib/components/TZLabel'\nimport { UserActivityIndicator } from 'lib/components/UserActivityIndicator/UserActivityIndicator'\nimport { dayjs } from 'lib/dayjs'\nimport { IconChevronLeft } from 'lib/lemon-ui/icons'\nimport { LemonButton } from 'lib/lemon-ui/LemonButton'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonModal } from 'lib/lemon-ui/LemonModal'\nimport { alphabet, formatDate } from 'lib/utils'\nimport { useCallback } from 'react'\nimport { trendsDataLogic } from 'scenes/trends/trendsDataLogic'\n\nimport { AlertCalculationInterval, AlertConditionType, AlertState, InsightThresholdType } from '~/queries/schema'\nimport { InsightShortId, QueryBasedInsightModel } from '~/types'\n\nimport { alertFormLogic, canCheckOngoingInterval } from '../alertFormLogic'\nimport { alertLogic } from '../alertLogic'\nimport { SnoozeButton } from '../SnoozeButton'\nimport { AlertType } from '../types'\n\nexport function AlertStateTable({ alert }: { alert: AlertType }): JSX.Element | null {\n if (!alert.checks || alert.checks.length === 0) {\n return null\n }\n\n return (\n
\n
\n

Current status:

\n \n

\n {alert.snoozed_until && ` until ${formatDate(dayjs(alert?.snoozed_until), 'MMM D, HH:mm')}`}\n

\n
\n \n \n \n \n \n \n \n \n \n \n {alert.checks.map((check) => (\n \n \n \n \n \n \n ))}\n \n
StatusTimeValueTargets notified
{check.state}\n \n {check.calculated_value}{check.targets_notified ? 'Yes' : 'No'}
\n
\n )\n}\n\ninterface EditAlertModalProps {\n isOpen: boolean | undefined\n alertId?: AlertType['id']\n insightId: QueryBasedInsightModel['id']\n insightShortId: InsightShortId\n onEditSuccess: () => void\n onClose?: () => void\n}\n\nexport function EditAlertModal({\n isOpen,\n alertId,\n insightId,\n insightShortId,\n onClose,\n onEditSuccess,\n}: EditAlertModalProps): JSX.Element {\n const _alertLogic = alertLogic({ alertId })\n const { alert, alertLoading } = useValues(_alertLogic)\n const { loadAlert } = useActions(_alertLogic)\n\n // need to reload edited alert as well\n const _onEditSuccess = useCallback(() => {\n loadAlert()\n onEditSuccess()\n }, [loadAlert, onEditSuccess])\n\n const formLogicProps = { alert, insightId, onEditSuccess: _onEditSuccess }\n const formLogic = alertFormLogic(formLogicProps)\n const { alertForm, isAlertFormSubmitting, alertFormChanged } = useValues(formLogic)\n const { deleteAlert, snoozeAlert, clearSnooze } = useActions(formLogic)\n const { setAlertFormValue } = useActions(formLogic)\n\n const trendsLogic = trendsDataLogic({ dashboardItemId: insightShortId })\n const { alertSeries, isNonTimeSeriesDisplay, isBreakdownValid, formula } = useValues(trendsLogic)\n\n const creatingNewAlert = alertForm.id === undefined\n // can only check ongoing interval for absolute value/increase alerts with upper threshold\n const can_check_ongoing_interval = canCheckOngoingInterval(alertForm)\n\n return (\n \n {alertLoading ? (\n \n ) : (\n \n \n
\n } onClick={onClose} size=\"xsmall\" />\n\n

{creatingNewAlert ? 'New' : 'Edit '} Alert

\n
\n
\n\n \n
\n
\n
\n \n \n \n \n \n \n
\n {alert?.created_by ? (\n \n ) : null}\n
\n\n
\n

Definition

\n
\n {isBreakdownValid && (\n \n For trends with breakdown, the alert will fire if any of the breakdown\n values breaches the threshold.\n \n )}\n
\n
When
\n \n \n ({\n label: isBreakdownValid\n ? 'any breakdown value'\n : formula\n ? `Formula (${formula})`\n : `${alphabet[index]} - ${\n custom_name ?? name ?? event\n }`,\n value: isBreakdownValid || formula ? 0 : index,\n })\n )}\n disabledReason={\n (isBreakdownValid &&\n `For trends with breakdown, the alert will fire if any of the breakdown\n values breaches the threshold.`) ||\n (formula &&\n `When using formula mode, can only alert on formula value`)\n }\n />\n \n \n \n \n \n \n \n
\n
\n
less than
\n \n \n setAlertFormValue('threshold', {\n configuration: {\n type: alertForm.threshold.configuration.type,\n bounds: {\n ...alertForm.threshold.configuration.bounds,\n lower:\n value &&\n alertForm.threshold.configuration.type ===\n InsightThresholdType.PERCENTAGE\n ? value / 100\n : value,\n },\n },\n })\n }\n />\n \n
or more than
\n \n \n setAlertFormValue('threshold', {\n configuration: {\n type: alertForm.threshold.configuration.type,\n bounds: {\n ...alertForm.threshold.configuration.bounds,\n upper:\n value &&\n alertForm.threshold.configuration.type ===\n InsightThresholdType.PERCENTAGE\n ? value / 100\n : value,\n },\n },\n })\n }\n />\n \n {alertForm.condition.type !== AlertConditionType.ABSOLUTE_VALUE && (\n \n \n \n \n \n )}\n
\n
\n
\n {alertForm.condition.type === AlertConditionType.ABSOLUTE_VALUE\n ? 'check'\n : 'compare'}\n
\n \n ({\n label: interval,\n value: interval,\n }))}\n />\n \n
and notify
\n
\n u.id) ?? []}\n idKey=\"id\"\n onChange={(value) => setAlertFormValue('subscribed_users', value)}\n />\n
\n
\n
\n
\n\n
\n

Advanced

\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n\n {alert && }\n
\n\n \n
\n
\n {!creatingNewAlert ? (\n \n Delete alert\n \n ) : null}\n {!creatingNewAlert && alert?.state === AlertState.FIRING ? (\n \n ) : null}\n {!creatingNewAlert && alert?.state === AlertState.SNOOZED ? (\n \n Clear snooze\n \n ) : null}\n
\n
\n \n {creatingNewAlert ? 'Create alert' : 'Save'}\n \n
\n \n )}\n
\n )\n}\n","import Fuse from 'fuse.js'\nimport {\n actions,\n afterMount,\n connect,\n kea,\n key,\n listeners,\n path,\n props,\n reducers,\n selectors,\n sharedListeners,\n} from 'kea'\nimport { forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { encodeParams, urlToAction } from 'kea-router'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { isDomain, isURL } from 'lib/utils'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { urls } from 'scenes/urls'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport { ExperimentIdType, ToolbarParams, ToolbarUserIntent } from '~/types'\n\nimport type { authorizedUrlListLogicType } from './authorizedUrlListLogicType'\n\nexport interface ProposeNewUrlFormType {\n url: string\n}\n\nexport enum AuthorizedUrlListType {\n TOOLBAR_URLS = 'TOOLBAR_URLS',\n RECORDING_DOMAINS = 'RECORDING_DOMAINS',\n WEB_EXPERIMENTS = 'WEB_EXPERIMENTS',\n}\n\n/**\n * Firefox does not allow you construct a new URL with e.g. https://*.example.com (which is to be fair more standards compliant than Chrome)\n * when used to probe for e.g. for authorized urls we only care if the proposed URL has a path so we can safely replace the wildcard with a character\n * NB this changes its input and shouldn't be used for general purpose URL parsing\n */\nexport function sanitizePossibleWildCardedURL(url: string): URL {\n const deWildCardedURL = url.replace(/\\*/g, 'x')\n return new URL(deWildCardedURL)\n}\n\n/**\n * Checks if the URL has a wildcard (*) in the port position e.g. http://localhost:*\n */\nexport function hasPortWildcard(input: unknown): boolean {\n if (!input || typeof input !== 'string') {\n return false\n }\n // This regex matches URLs with a wildcard (*) in the port position\n const portWildcardRegex = /^(https?:\\/\\/[^:/]+):\\*(.*)$/\n return portWildcardRegex.test(input.trim())\n}\n\nexport const validateProposedUrl = (\n proposedUrl: string,\n currentUrls: string[],\n onlyAllowDomains: boolean = false\n): string | undefined => {\n if (!isURL(proposedUrl)) {\n return 'Please enter a valid URL'\n }\n\n if (hasPortWildcard(proposedUrl)) {\n return 'Wildcards are not allowed in the port position'\n }\n\n if (onlyAllowDomains && !isDomain(sanitizePossibleWildCardedURL(proposedUrl))) {\n return \"Please enter a valid domain (URLs with a path aren't allowed)\"\n }\n\n if (proposedUrl.indexOf('*') > -1 && !proposedUrl.match(/^(.*)\\*[^*]*\\.[^*]+\\.[^*]+$/)) {\n return 'Wildcards can only be used for subdomains'\n }\n\n if (currentUrls.indexOf(proposedUrl) > -1) {\n return `This ${onlyAllowDomains ? 'domains' : 'URL'} already is registered`\n }\n\n return\n}\n\n/** defaultIntent: whether to launch with empty intent (i.e. toolbar mode is default) */\nexport function appEditorUrl(\n appUrl: string,\n options?: { actionId?: number | null; experimentId?: ExperimentIdType; userIntent?: ToolbarUserIntent }\n): string {\n // See https://github.com/PostHog/posthog-js/blob/f7119c/src/extensions/toolbar.ts#L52 for where these params\n // are passed. `appUrl` is an extra `redirect_to_site` param.\n const params: ToolbarParams & { appUrl: string } = {\n userIntent:\n options?.userIntent ??\n (options?.actionId ? 'edit-action' : options?.experimentId ? 'edit-experiment' : 'add-action'),\n // Make sure to pass the app url, otherwise the api_host will be used by\n // the toolbar, which isn't correct when used behind a reverse proxy as\n // we require e.g. SSO login to the app, which will not work when placed\n // behind a proxy unless we register each domain with the OAuth2 client.\n apiURL: apiHostOrigin(),\n appUrl,\n ...(options?.actionId ? { actionId: options.actionId } : {}),\n ...(options?.experimentId ? { experimentId: options.experimentId } : {}),\n }\n return '/api/user/redirect_to_site/' + encodeParams(params, '?')\n}\n\nexport const checkUrlIsAuthorized = (url: string | URL, authorizedUrls: string[]): boolean => {\n try {\n const parsedUrl = typeof url === 'string' ? sanitizePossibleWildCardedURL(url) : url\n const urlWithoutPath = parsedUrl.protocol + '//' + parsedUrl.host\n // Is this domain already in the list of urls?\n const exactMatch =\n authorizedUrls.filter((authorizedUrl) => authorizedUrl.indexOf(urlWithoutPath) > -1).length > 0\n\n if (exactMatch) {\n return true\n }\n\n const wildcardMatch = !!authorizedUrls.find((authorizedUrl) => {\n // Matches something like `https://*.example.com` against the urlWithoutPath\n const regex = new RegExp(authorizedUrl.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*'))\n return urlWithoutPath.match(regex)\n })\n\n if (wildcardMatch) {\n return true\n }\n } catch (error) {\n // Ignore invalid URLs\n }\n\n return false\n}\n\nexport interface SuggestedDomain {\n url: string\n count: number\n}\n\nexport const filterNotAuthorizedUrls = (\n suggestions: SuggestedDomain[],\n authorizedUrls: string[]\n): SuggestedDomain[] => {\n const suggestedDomains: SuggestedDomain[] = []\n\n suggestions.forEach(({ url, count }) => {\n const parsedUrl = sanitizePossibleWildCardedURL(url)\n const urlWithoutPath = parsedUrl.protocol + '//' + parsedUrl.host\n // Have we already added this domain?\n if (suggestedDomains.some((sd) => sd.url === urlWithoutPath)) {\n return\n }\n\n if (!checkUrlIsAuthorized(parsedUrl, authorizedUrls)) {\n suggestedDomains.push({ url: urlWithoutPath, count })\n }\n })\n\n return suggestedDomains\n}\n\nexport const NEW_URL = 'https://'\n\nexport interface KeyedAppUrl {\n url: string\n type: 'authorized' | 'suggestion'\n originalIndex: number\n // how many seen in the last three days\n count?: number\n}\n\nexport interface AuthorizedUrlListLogicProps {\n actionId: number | null\n experimentId: ExperimentIdType | null\n type: AuthorizedUrlListType\n query: string | null | undefined\n}\n\nexport const defaultAuthorizedUrlProperties = {\n actionId: null,\n experimentId: null,\n query: null,\n}\n\nexport const authorizedUrlListLogic = kea([\n path((key) => ['lib', 'components', 'AuthorizedUrlList', 'authorizedUrlListLogic', key]),\n key((props) => (props.experimentId ? `${props.type}-${props.experimentId}` : `${props.type}-${props.actionId}`)),\n props({} as AuthorizedUrlListLogicProps),\n connect({\n values: [teamLogic, ['currentTeam', 'currentTeamId']],\n actions: [teamLogic, ['updateCurrentTeam']],\n }),\n actions(() => ({\n setAuthorizedUrls: (authorizedUrls: string[]) => ({ authorizedUrls }),\n addUrl: (url: string, launch?: boolean) => ({ url, launch }),\n newUrl: true,\n removeUrl: (index: number) => ({ index }),\n updateUrl: (index: number, url: string) => ({ index, url }),\n launchAtUrl: (url: string) => ({ url }),\n setSearchTerm: (term: string) => ({ term }),\n setEditUrlIndex: (originalIndex: number | null) => ({ originalIndex }),\n cancelProposingUrl: true,\n })),\n loaders(({ values }) => ({\n suggestions: {\n __default: [] as SuggestedDomain[],\n loadSuggestions: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`select properties.$current_url, count()\n from events\n where event = '$pageview'\n and timestamp >= now() - interval 3 day \n and timestamp <= now()\n group by properties.$current_url\n order by count() desc\n limit 25`,\n }\n\n const response = await api.query(query)\n const result = response.results as [string, number][]\n\n if (result && result.length === 0) {\n return []\n }\n\n const suggestedDomains = filterNotAuthorizedUrls(\n result.map(([url, count]) => ({ url, count })),\n values.authorizedUrls\n )\n\n return suggestedDomains.slice(0, 20)\n },\n },\n })),\n subscriptions(({ props, actions }) => ({\n currentTeam: (currentTeam) => {\n actions.setAuthorizedUrls(\n (props.type === AuthorizedUrlListType.RECORDING_DOMAINS\n ? currentTeam.recording_domains\n : currentTeam.app_urls) || []\n )\n },\n })),\n afterMount(({ actions }) => {\n actions.loadSuggestions()\n }),\n forms(({ values, actions }) => ({\n proposedUrl: {\n defaults: { url: '' } as ProposeNewUrlFormType,\n errors: ({ url }) => ({\n url: validateProposedUrl(url, values.authorizedUrls, values.onlyAllowDomains),\n }),\n submit: async ({ url }) => {\n if (values.editUrlIndex !== null && values.editUrlIndex >= 0) {\n actions.updateUrl(values.editUrlIndex, url)\n } else {\n actions.addUrl(url)\n }\n },\n },\n })),\n reducers(() => ({\n showProposedURLForm: [\n false as boolean,\n {\n newUrl: () => true,\n submitProposedUrlSuccess: () => false,\n cancelProposingUrl: () => false,\n },\n ],\n authorizedUrls: [\n [] as string[],\n {\n setAuthorizedUrls: (_, { authorizedUrls }) => authorizedUrls,\n addUrl: (state, { url }) => (!state.includes(url) ? state.concat([url]) : state),\n updateUrl: (state, { index, url }) => Object.assign([...state], { [index]: url }),\n removeUrl: (state, { index }) => {\n const newUrls = [...state]\n newUrls.splice(index, 1)\n return newUrls\n },\n },\n ],\n suggestions: [\n [],\n {\n addUrl: (state, { url }) => [...state].filter((sd) => url !== sd.url),\n },\n ],\n searchTerm: [\n '',\n {\n setSearchTerm: (_, { term }) => term,\n },\n ],\n editUrlIndex: [\n null as number | null,\n {\n setEditUrlIndex: (_, { originalIndex }) => originalIndex,\n removeUrl: (editUrlIndex, { index }) =>\n editUrlIndex && index < editUrlIndex\n ? editUrlIndex - 1\n : index === editUrlIndex\n ? null\n : editUrlIndex,\n newUrl: () => -1,\n updateUrl: () => null,\n addUrl: () => null,\n cancelProposingUrl: () => null,\n },\n ],\n })),\n sharedListeners(({ values, props }) => ({\n saveUrls: async () => {\n if (props.type === AuthorizedUrlListType.RECORDING_DOMAINS) {\n await teamLogic.asyncActions.updateCurrentTeam({ recording_domains: values.authorizedUrls })\n } else {\n await teamLogic.asyncActions.updateCurrentTeam({ app_urls: values.authorizedUrls })\n }\n },\n })),\n listeners(({ sharedListeners, values, actions }) => ({\n setEditUrlIndex: () => {\n actions.setProposedUrlValue('url', values.urlToEdit)\n },\n newUrl: () => {\n actions.setProposedUrlValue('url', NEW_URL)\n },\n addUrl: [\n sharedListeners.saveUrls,\n ({ url, launch }) => {\n if (launch) {\n actions.launchAtUrl(url)\n }\n },\n ],\n removeUrl: sharedListeners.saveUrls,\n updateUrl: sharedListeners.saveUrls,\n launchAtUrl: ({ url }) => {\n window.location.href = values.launchUrl(url)\n },\n cancelProposingUrl: () => {\n actions.resetProposedUrl()\n },\n submitProposedUrlSuccess: () => {\n actions.setEditUrlIndex(null)\n actions.resetProposedUrl()\n },\n })),\n selectors({\n urlToEdit: [\n (s) => [s.authorizedUrls, s.editUrlIndex],\n (authorizedUrls, editUrlIndex) => {\n if (editUrlIndex === null || editUrlIndex === -1) {\n return NEW_URL\n }\n return authorizedUrls[editUrlIndex]\n },\n ],\n urlsKeyed: [\n (s) => [s.authorizedUrls, s.suggestions, s.searchTerm],\n (authorizedUrls, suggestions, searchTerm): KeyedAppUrl[] => {\n const keyedUrls = authorizedUrls\n .map((url, index) => ({\n url,\n type: 'authorized',\n originalIndex: index,\n }))\n .concat(\n suggestions.map(({ url, count }, index) => ({\n url,\n type: 'suggestion',\n originalIndex: index,\n count,\n }))\n ) as KeyedAppUrl[]\n\n if (!searchTerm) {\n return keyedUrls\n }\n\n return new Fuse(keyedUrls, {\n keys: ['url'],\n threshold: 0.3,\n })\n .search(searchTerm)\n .map((result) => result.item)\n },\n ],\n launchUrl: [\n (_, p) => [p.actionId, p.experimentId],\n (actionId, experimentId) => (url: string) => {\n if (experimentId) {\n return appEditorUrl(url, {\n experimentId,\n })\n }\n\n return appEditorUrl(url, {\n actionId,\n })\n },\n ],\n isAddUrlFormVisible: [(s) => [s.editUrlIndex], (editUrlIndex) => editUrlIndex === -1],\n onlyAllowDomains: [(_, p) => [p.type], (type) => type === AuthorizedUrlListType.RECORDING_DOMAINS],\n\n checkUrlIsAuthorized: [\n (s) => [s.authorizedUrls],\n (authorizedUrls) => (url: string) => {\n return checkUrlIsAuthorized(url, authorizedUrls)\n },\n ],\n }),\n urlToAction(({ actions }) => ({\n [urls.toolbarLaunch()]: (_, searchParams) => {\n if (searchParams.addNew) {\n actions.newUrl()\n }\n },\n })),\n])\n","import { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { featureFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport posthog from 'posthog-js'\nimport { teamLogic } from 'scenes/teamLogic'\n\nfunction snippetFunctions(arrayJs = '/static/array.js'): string {\n const methods: string[] = []\n const posthogPrototype = Object.getPrototypeOf(posthog)\n for (const key of Object.getOwnPropertyNames(posthogPrototype)) {\n if (\n typeof posthogPrototype[key] === 'function' &&\n !key.startsWith('_') &&\n !['constructor', 'toString', 'push'].includes(key)\n ) {\n methods.push(key)\n }\n }\n const snippetMethods = methods.join(' ')\n\n return `!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\")+\"${arrayJs}\",(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=\"${snippetMethods}\".split(\" \"),n=0;n',\n ` ${snippetFunctions(arrayJs)}`,\n ` posthog.init('${currentTeam?.api_token}', {\n api_host:'${apiHostOrigin()}'${\n isPersonProfilesDisabled\n ? ``\n : `,\\n person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well`\n }\n })`,\n '',\n ]\n .map((x) => ' '.repeat(indent) + x)\n .join('\\n')\n}\n\nexport function JSSnippet(): JSX.Element {\n const snippet = useJsSnippet()\n\n return {snippet}\n}\n\nexport function JSSnippetV2(): JSX.Element {\n const { currentTeam } = useValues(teamLogic)\n\n const snippet = useJsSnippet(0, `/array/${currentTeam?.api_token}/array.js`)\n\n return {snippet}\n}\n","import { connect, kea, path, selectors } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { membersLogic } from 'scenes/organization/membersLogic'\n\nimport { sidePanelContextLogic } from '~/layout/navigation-3000/sidepanel/panels/sidePanelContextLogic'\nimport { SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { metalyticsLogicType } from './metalyticsLogicType'\n\nexport const metalyticsLogic = kea([\n path(['lib', 'components', 'metalytics', 'metalyticsLogic']),\n connect({\n values: [sidePanelContextLogic, ['sceneSidePanelContext'], membersLogic, ['members']],\n }),\n\n loaders(({ values }) => ({\n viewCount: [\n null as { views: number; users: number } | null,\n {\n loadViewCount: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT SUM(count) AS count, COUNT(DISTINCT app_source_id) AS unique_users\n FROM app_metrics\n WHERE app_source = 'metalytics'\n AND instance_id = ${values.instanceId}`,\n }\n\n // NOTE: I think this gets cached heavily - how to correctly invalidate?\n const response = await api.query(query, undefined, undefined, true)\n const result = response.results as number[][]\n return {\n views: result[0][0],\n users: result[0][1],\n }\n },\n },\n ],\n recentUsers: [\n [] as string[],\n {\n loadUsersLast30days: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT DISTINCT app_source_id\n FROM app_metrics\n WHERE app_source = 'metalytics'\n AND instance_id = ${values.instanceId}\n AND timestamp >= NOW() - INTERVAL 30 DAY\n ORDER BY timestamp DESC`,\n }\n\n const response = await api.query(query, undefined, undefined, true)\n return response.results.map((result) => result[0]) as string[]\n },\n },\n ],\n })),\n\n selectors({\n instanceId: [\n (s) => [s.sceneSidePanelContext],\n (sidePanelContext: SidePanelSceneContext) =>\n sidePanelContext?.activity_item_id\n ? `${sidePanelContext.activity_scope}:${sidePanelContext.activity_item_id}`\n : null,\n ],\n scope: [\n (s) => [s.sceneSidePanelContext],\n (sidePanelContext: SidePanelSceneContext) => sidePanelContext?.activity_scope,\n ],\n\n recentUserMembers: [\n (s) => [s.recentUsers, s.members],\n (recentUsers, members) => {\n if (!members || !recentUsers) {\n return []\n }\n // Filter members whose IDs match the recentUsers array\n const filteredMembers = members.filter((member) => recentUsers.includes(String(member.user.id)))\n return filteredMembers\n },\n ],\n }),\n\n subscriptions(({ actions }) => ({\n instanceId: async (instanceId) => {\n if (instanceId) {\n actions.loadViewCount()\n actions.loadUsersLast30days()\n\n await api.create('/api/projects/@current/metalytics/', {\n metric_name: 'viewed',\n instance_id: instanceId,\n })\n }\n },\n })),\n])\n","import { IconBug, IconInfo, IconQuestion } from '@posthog/icons'\nimport {\n LemonInput,\n LemonSegmentedButton,\n LemonSegmentedButtonOption,\n lemonToast,\n Link,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { useUploadFiles } from 'lib/hooks/useUploadFiles'\nimport { IconFeedback } from 'lib/lemon-ui/icons'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonFileInput } from 'lib/lemon-ui/LemonFileInput/LemonFileInput'\nimport { LemonSelect } from 'lib/lemon-ui/LemonSelect/LemonSelect'\nimport { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { useRef } from 'react'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport {\n SEVERITY_LEVEL_TO_NAME,\n SUPPORT_TICKET_TEMPLATES,\n supportLogic,\n SupportTicketKind,\n TARGET_AREA_TO_NAME,\n} from './supportLogic'\n\nconst SUPPORT_TICKET_OPTIONS: LemonSegmentedButtonOption[] = [\n {\n value: 'support',\n label: 'Question',\n icon: ,\n },\n {\n value: 'feedback',\n label: 'Feedback',\n icon: ,\n },\n {\n value: 'bug',\n label: 'Bug',\n icon: ,\n },\n]\n\nconst SUPPORT_TICKET_KIND_TO_PROMPT: Record = {\n bug: \"What's the bug?\",\n feedback: 'What feedback do you have?',\n support: 'What can we help you with?',\n}\n\nexport function SupportForm(): JSX.Element | null {\n const { sendSupportRequest } = useValues(supportLogic)\n const { setSendSupportRequestValue } = useActions(supportLogic)\n const { objectStorageAvailable } = useValues(preflightLogic)\n // the support model can be shown when logged out, file upload is not offered to anonymous users\n const { user } = useValues(userLogic)\n // only allow authentication issues for logged out users\n\n const dropRef = useRef(null)\n\n const { setFilesToUpload, filesToUpload, uploading } = useUploadFiles({\n onUpload: (url, fileName) => {\n setSendSupportRequestValue('message', sendSupportRequest.message + `\\n\\nAttachment \"${fileName}\": ${url}`)\n },\n onError: (detail) => {\n lemonToast.error(`Error uploading image: ${detail}`)\n },\n })\n\n const changeKind = (kind: SupportTicketKind): void => {\n setSendSupportRequestValue('kind', kind)\n if (kind === 'bug') {\n setSendSupportRequestValue('severity_level', 'medium')\n } else {\n setSendSupportRequestValue('severity_level', 'low')\n }\n }\n\n return (\n \n {!user && (\n <>\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n \n \n {(props) => (\n
\n \n {objectStorageAvailable && !!user && (\n \n )}\n
\n )}\n \n
\n
\n \n \n Definitions\n \n
\n \n ({\n label: value,\n value: key,\n }))}\n />\n \n
\n \n )\n}\n","import { captureException } from '@sentry/react'\nimport * as Sentry from '@sentry/react'\nimport { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'\nimport { forms } from 'kea-forms'\nimport { urlToAction } from 'kea-router'\nimport { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'\nimport { uuid } from 'lib/utils'\nimport posthog from 'posthog-js'\nimport { organizationLogic } from 'scenes/organizationLogic'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'\nimport { AvailableFeature, OrganizationBasicType, Region, SidePanelTab, TeamPublicType, UserType } from '~/types'\n\nimport type { supportLogicType } from './supportLogicType'\nimport { openSupportModal } from './SupportModal'\n\nexport function getPublicSupportSnippet(\n cloudRegion: Region | null | undefined,\n currentOrganization: OrganizationBasicType | null,\n currentTeam: TeamPublicType | null,\n includeCurrentLocation = true\n): string {\n if (!cloudRegion) {\n return ''\n }\n return (\n (includeCurrentLocation ? getCurrentLocationLink() : '') +\n getSessionReplayLink() +\n `\\nAdmin: http://go/adminOrg${cloudRegion}/${currentOrganization?.id} (project ID ${currentTeam?.id})` +\n getSentryLink(cloudRegion, currentTeam)\n ).trimStart()\n}\n\nfunction getCurrentLocationLink(): string {\n const cleanedCurrentUrl = window.location.href.replace(/panel=support[^&]*(&)?/, '').replace(/#$/, '')\n return `\\nLocation: ${cleanedCurrentUrl}`\n}\n\nfunction getSessionReplayLink(): string {\n const replayUrl = posthog\n .get_session_replay_url({ withTimestamp: true, timestampLookBack: 30 })\n .replace(window.location.origin + '/replay/', 'http://go/session/')\n return `\\nSession: ${replayUrl}`\n}\n\nfunction getErrorTrackingLink(): string {\n const filterGroup = encodeURIComponent(\n JSON.stringify({\n type: 'AND',\n values: [\n {\n type: 'AND',\n values: [\n {\n key: '$session_id',\n value: [posthog.get_session_id()],\n operator: 'exact',\n type: 'event',\n },\n ],\n },\n ],\n })\n )\n\n return `\\nExceptions: https://us.posthog.com/project/2/error_tracking?filterGroup=${filterGroup}`\n}\n\nfunction getDjangoAdminLink(\n user: UserType | null,\n cloudRegion: Region | null | undefined,\n currentOrganization: OrganizationBasicType | null,\n currentTeam: TeamPublicType | null\n): string {\n if (!user || !cloudRegion) {\n return ''\n }\n const link = `http://go/admin${cloudRegion}/${user.email}`\n return `\\nAdmin: ${link} (organization ID ${currentOrganization?.id}: ${currentOrganization?.name}, project ID ${currentTeam?.id}: ${currentTeam?.name})`\n}\n\nfunction getBillingAdminLink(currentOrganization: OrganizationBasicType | null): string {\n if (!currentOrganization) {\n return ''\n }\n return `\\nBilling admin: http://go/billing/${currentOrganization.id}`\n}\n\nfunction getSentryLink(cloudRegion: Region | null | undefined, currentTeam: TeamPublicType | null): string {\n if (!cloudRegion || !currentTeam) {\n return ''\n }\n return `\\nSentry: http://go/sentry${cloudRegion}/${currentTeam.id}`\n}\n\nconst SUPPORT_TICKET_KIND_TO_TITLE: Record = {\n support: 'Contact support',\n feedback: 'Give feedback',\n bug: 'Report a bug',\n}\n\nexport const TARGET_AREA_TO_NAME = [\n {\n title: 'General',\n options: [\n {\n value: 'apps',\n 'data-attr': `support-form-target-area-apps`,\n label: 'Data pipelines',\n },\n {\n value: 'login',\n 'data-attr': `support-form-target-area-login`,\n label: 'Authentication (incl. login, sign-up, invites)',\n },\n {\n value: 'billing',\n 'data-attr': `support-form-target-area-billing`,\n label: 'Billing',\n },\n {\n value: 'onboarding',\n 'data-attr': `support-form-target-area-onboarding`,\n label: 'Onboarding',\n },\n {\n value: 'sdk',\n 'data-attr': `support-form-target-area-onboarding`,\n label: 'SDK / Implementation',\n },\n {\n value: 'cohorts',\n 'data-attr': `support-form-target-area-cohorts`,\n label: 'Cohorts',\n },\n {\n value: 'data_management',\n 'data-attr': `support-form-target-area-data_management`,\n label: 'Data management (incl. events, actions, properties)',\n },\n {\n value: 'notebooks',\n 'data-attr': `support-form-target-area-notebooks`,\n label: 'Notebooks',\n },\n {\n value: 'mobile',\n 'data-attr': `support-form-target-area-mobile`,\n label: 'Mobile',\n },\n ],\n },\n {\n title: 'Individual product',\n options: [\n {\n value: 'experiments',\n 'data-attr': `support-form-target-area-experiments`,\n label: 'Experiments',\n },\n {\n value: 'data_warehouse',\n 'data-attr': `support-form-target-area-data_warehouse`,\n label: 'Data warehouse',\n },\n {\n value: 'batch_exports',\n 'data-attr': `support-form-target-area-batch-exports`,\n label: 'Batch exports',\n },\n {\n value: 'feature_flags',\n 'data-attr': `support-form-target-area-feature_flags`,\n label: 'Feature flags',\n },\n {\n value: 'analytics',\n 'data-attr': `support-form-target-area-analytics`,\n label: 'Product analytics (incl. insights, dashboards, annotations)',\n },\n {\n value: 'session_replay',\n 'data-attr': `support-form-target-area-session_replay`,\n label: 'Session replay (incl. recordings)',\n },\n {\n value: 'toolbar',\n 'data-attr': `support-form-target-area-toolbar`,\n label: 'Toolbar (incl. heatmaps)',\n },\n {\n value: 'surveys',\n 'data-attr': `support-form-target-area-surveys`,\n label: 'Surveys',\n },\n {\n value: 'web_analytics',\n 'data-attr': `support-form-target-area-web_analytics`,\n label: 'Web Analytics',\n },\n {\n value: 'error_tracking',\n 'data-attr': `support-form-target-area-error_tracking`,\n label: 'Error tracking',\n },\n ],\n },\n]\n\nexport const SEVERITY_LEVEL_TO_NAME = {\n critical: 'Outage, data loss, or data breach',\n high: 'Feature is not working at all',\n medium: 'Feature not working as expected',\n low: 'Question or feature request',\n}\n\nexport const SUPPORT_KIND_TO_SUBJECT = {\n bug: 'Bug Report',\n feedback: 'Feedback',\n support: 'Support Ticket',\n}\n\nexport type SupportTicketTargetArea =\n | 'experiments'\n | 'apps'\n | 'login'\n | 'billing'\n | 'onboarding'\n | 'cohorts'\n | 'data_management'\n | 'notebooks'\n | 'data_warehouse'\n | 'feature_flags'\n | 'analytics'\n | 'session_replay'\n | 'toolbar'\n | 'surveys'\n | 'web_analytics'\n | 'error_tracking'\nexport type SupportTicketSeverityLevel = keyof typeof SEVERITY_LEVEL_TO_NAME\nexport type SupportTicketKind = keyof typeof SUPPORT_KIND_TO_SUBJECT\n\nexport const getLabelBasedOnTargetArea = (target_area: SupportTicketTargetArea): null | string => {\n for (const category of TARGET_AREA_TO_NAME) {\n for (const option of category.options) {\n if (option.value === target_area) {\n return option.label\n }\n }\n }\n return null // Return null if the value is not found\n}\n\nexport const URL_PATH_TO_TARGET_AREA: Record = {\n insights: 'analytics',\n recordings: 'session_replay',\n replay: 'session_replay',\n dashboard: 'analytics',\n feature_flags: 'feature_flags',\n experiments: 'experiments',\n 'web-performance': 'session_replay',\n events: 'analytics',\n 'data-management': 'data_management',\n cohorts: 'cohorts',\n annotations: 'analytics',\n persons: 'analytics',\n groups: 'analytics',\n app: 'apps',\n toolbar: 'session_replay',\n warehouse: 'data_warehouse',\n surveys: 'surveys',\n web: 'web_analytics',\n}\n\nexport const SUPPORT_TICKET_TEMPLATES = {\n bug: 'Please describe the bug you saw, and how to reproduce it.\\n\\nIf the bug appeared on a specific insight or dashboard, please include a link to it.',\n feedback:\n \"If your request is due to a problem, please describe the problem as best you can.\\n\\nPlease also describe the solution you'd like to see, and any alternatives you considered.\\n\\nYou can add images below to help illustrate your request, if needed!\",\n support:\n \"Please explain as fully as possible what you're aiming to do, and what you'd like help with.\\n\\nIf your question involves an existing insight or dashboard, please include a link to it.\",\n}\n\nexport function getURLPathToTargetArea(pathname: string): SupportTicketTargetArea | null {\n const first_part = pathname.split('/')[1]\n return URL_PATH_TO_TARGET_AREA[first_part] ?? null\n}\n\nexport type SupportFormLogicProps = {\n onClose?: () => void\n}\n\nexport type SupportFormFields = {\n name: string\n email: string\n kind: SupportTicketKind\n target_area: SupportTicketTargetArea | null\n severity_level: SupportTicketSeverityLevel | null\n message: string\n isEmailFormOpen?: boolean | 'true' | 'false'\n}\n\nexport const supportLogic = kea([\n props({} as SupportFormLogicProps),\n path(['lib', 'components', 'support', 'supportLogic']),\n connect(() => ({\n values: [\n userLogic,\n ['user'],\n preflightLogic,\n ['preflight'],\n sidePanelStateLogic,\n ['sidePanelAvailable'],\n userLogic,\n ['hasAvailableFeature'],\n ],\n actions: [sidePanelStateLogic, ['openSidePanel', 'setSidePanelOptions']],\n })),\n actions(() => ({\n closeSupportForm: true,\n openSupportForm: (values: Partial) => values,\n submitZendeskTicket: (form: SupportFormFields) => form,\n updateUrlParams: true,\n openEmailForm: true,\n closeEmailForm: true,\n })),\n reducers(() => ({\n isSupportFormOpen: [\n false,\n {\n openSupportForm: () => true,\n closeSupportForm: () => false,\n },\n ],\n isEmailFormOpen: [\n false,\n {\n openEmailForm: () => true,\n closeEmailForm: () => false,\n },\n ],\n })),\n forms(({ actions, values }) => ({\n sendSupportRequest: {\n defaults: {\n name: '',\n email: '',\n kind: 'support',\n severity_level: null,\n target_area: null,\n message: '',\n } as SupportFormFields,\n errors: ({ name, email, message, kind, target_area, severity_level }) => {\n return {\n name: !values.user ? (!name ? 'Please enter your name' : '') : '',\n email: !values.user ? (!email ? 'Please enter your email' : '') : '',\n message: !message ? 'Please enter a message' : '',\n kind: !kind ? 'Please choose' : undefined,\n severity_level: !severity_level ? 'Please choose' : undefined,\n target_area: !target_area ? 'Please choose' : undefined,\n }\n },\n submit: async (formValues) => {\n // name must be present for zendesk to accept the ticket\n formValues.name = values.user?.first_name ?? formValues.name ?? 'name not set'\n formValues.email = values.user?.email ?? formValues.email ?? ''\n actions.submitZendeskTicket(formValues)\n actions.closeSupportForm()\n actions.resetSendSupportRequest()\n },\n },\n })),\n selectors({\n title: [\n (s) => [s.sendSupportRequest ?? null],\n (sendSupportRequest) =>\n sendSupportRequest.kind\n ? SUPPORT_TICKET_KIND_TO_TITLE[sendSupportRequest.kind]\n : 'Leave a message with PostHog',\n ],\n }),\n listeners(({ actions, props, values }) => ({\n updateUrlParams: async () => {\n const panelOptions = [\n values.sendSupportRequest.kind ?? '',\n values.sendSupportRequest.target_area ?? '',\n values.sendSupportRequest.severity_level ?? '',\n values.isEmailFormOpen ?? 'false',\n ].join(':')\n\n if (panelOptions !== ':') {\n actions.setSidePanelOptions(panelOptions)\n }\n },\n openSupportForm: async ({ name, email, isEmailFormOpen, kind, target_area, severity_level, message }) => {\n let area = target_area ?? getURLPathToTargetArea(window.location.pathname)\n if (!userLogic.values.user) {\n area = 'login'\n }\n kind = kind ?? 'support'\n actions.resetSendSupportRequest({\n name: name ?? '',\n email: email ?? '',\n kind,\n target_area: area,\n severity_level: severity_level ?? null,\n message: message ?? '',\n })\n\n if (isEmailFormOpen === 'true' || isEmailFormOpen === true) {\n actions.openEmailForm()\n } else {\n actions.closeEmailForm()\n }\n\n if (values.sidePanelAvailable) {\n const panelOptions = [kind ?? '', area ?? ''].join(':')\n actions.openSidePanel(SidePanelTab.Support, panelOptions === ':' ? undefined : panelOptions)\n } else {\n openSupportModal()\n }\n\n actions.updateUrlParams()\n },\n submitZendeskTicket: async ({ name, email, kind, target_area, severity_level, message }) => {\n const zendesk_ticket_uuid = uuid()\n const subject =\n SUPPORT_KIND_TO_SUBJECT[kind ?? 'support'] +\n ': ' +\n (target_area\n ? getLabelBasedOnTargetArea(target_area) ?? `${target_area} (feature preview)`\n : 'General') +\n ' (' +\n zendesk_ticket_uuid +\n ')'\n const cloudRegion = preflightLogic.values.preflight?.region\n\n const payload = {\n request: {\n requester: { name: name, email: email },\n subject: subject,\n custom_fields: [\n {\n id: 22084126888475,\n value: severity_level,\n },\n {\n id: 22129191462555,\n value: posthog.get_distinct_id(),\n },\n {\n id: 27242745654043,\n value: target_area ?? '',\n },\n {\n id: 27031528411291,\n value: userLogic?.values?.user?.organization?.id ?? '',\n },\n {\n id: 26073267652251,\n value: values.hasAvailableFeature(AvailableFeature.PRIORITY_SUPPORT)\n ? 'priority_support'\n : values.hasAvailableFeature(AvailableFeature.EMAIL_SUPPORT)\n ? 'email_support'\n : 'free_support',\n },\n ],\n comment: {\n body:\n message +\n `\\n\\n-----` +\n `\\nKind: ${kind}` +\n `\\nTarget area: ${target_area}` +\n `\\nReport event: http://go/ticketByUUID/${zendesk_ticket_uuid}` +\n getSessionReplayLink() +\n getErrorTrackingLink() +\n getCurrentLocationLink() +\n getDjangoAdminLink(\n userLogic.values.user,\n cloudRegion,\n organizationLogic.values.currentOrganization,\n teamLogic.values.currentTeam\n ) +\n (target_area === 'billing' || target_area === 'login' || target_area === 'onboarding'\n ? getBillingAdminLink(organizationLogic.values.currentOrganization)\n : '') +\n getSentryLink(cloudRegion, teamLogic.values.currentTeam) +\n (cloudRegion && teamLogic.values.currentTeam\n ? '\\nPersons-on-events mode for project: ' +\n (teamLogic.values.currentTeam.modifiers?.personsOnEventsMode ??\n teamLogic.values.currentTeam.default_modifiers?.personsOnEventsMode ??\n 'unknown')\n : ''),\n },\n },\n }\n\n try {\n const zendeskRequestBody = JSON.stringify(payload, undefined, 4)\n const response = await fetch('https://posthoghelp.zendesk.com/api/v2/requests.json', {\n method: 'POST',\n body: zendeskRequestBody,\n headers: { 'Content-Type': 'application/json' },\n })\n if (!response.ok) {\n const error = new Error(`There was an error creating the support ticket with zendesk.`)\n const extra: Record = { zendeskBody: zendeskRequestBody }\n Object.entries(payload).forEach(([key, value]) => {\n extra[`payload_${key}`] = value\n })\n const body = await response.text()\n const contexts = {\n response: {\n status_code: response.status,\n data: body,\n body_size: body?.length,\n },\n }\n captureException(error, {\n extra,\n contexts,\n })\n lemonToast.error(`There was an error sending the message.`)\n return\n }\n\n const json = await response.json()\n\n const zendesk_ticket_id = json.request.id\n const zendesk_ticket_link = `https://posthoghelp.zendesk.com/agent/tickets/${zendesk_ticket_id}`\n const properties = {\n zendesk_ticket_uuid,\n kind,\n target_area,\n message,\n zendesk_ticket_id,\n zendesk_ticket_link,\n }\n posthog.capture('support_ticket', properties)\n Sentry.captureMessage('User submitted Zendesk ticket', {\n tags: {\n zendesk_ticket_uuid,\n zendesk_ticket_link,\n support_request_kind: kind,\n support_request_area: target_area,\n team_id: teamLogic.values.currentTeamId,\n },\n extra: properties,\n level: 'log',\n })\n lemonToast.success(\"Got the message! If we have follow-up information for you, we'll reply via email.\")\n } catch (e) {\n captureException(e)\n lemonToast.error(`There was an error sending the message.`)\n }\n },\n\n closeSupportForm: () => {\n props.onClose?.()\n },\n\n setSendSupportRequestValue: () => {\n actions.updateUrlParams()\n },\n })),\n\n urlToAction(({ actions, values }) => ({\n '*': (_, _search, hashParams) => {\n if (values.isSupportFormOpen) {\n return\n }\n\n const [panel, ...panelOptions] = (hashParams['panel'] ?? '').split(':')\n\n if (panel === SidePanelTab.Support) {\n const [kind, area, severity, isEmailFormOpen] = panelOptions\n\n actions.openSupportForm({\n kind: Object.keys(SUPPORT_KIND_TO_SUBJECT).includes(kind) ? kind : null,\n target_area: getLabelBasedOnTargetArea(area) ? area : null,\n severity_level: Object.keys(SEVERITY_LEVEL_TO_NAME).includes(severity) ? severity : null,\n isEmailFormOpen: isEmailFormOpen ?? 'false',\n })\n return\n }\n\n // Legacy supportModal param\n if ('supportModal' in hashParams) {\n const [kind, area, severity] = (hashParams['supportModal'] || '').split(':')\n\n actions.openSupportForm({\n kind: Object.keys(SUPPORT_KIND_TO_SUBJECT).includes(kind) ? kind : null,\n target_area: Object.keys(TARGET_AREA_TO_NAME).includes(area) ? area : null,\n severity_level: Object.keys(SEVERITY_LEVEL_TO_NAME).includes(severity) ? severity : null,\n })\n }\n },\n })),\n])\n","import { actions, afterMount, kea, key, listeners, path, props, reducers, sharedListeners } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\nimport { isNotNil } from 'lib/utils'\nimport {\n diffVersions,\n highestVersion,\n isEqualVersion,\n parseVersion,\n SemanticVersion,\n tryParseVersion,\n versionToString,\n} from 'lib/utils/semver'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { versionCheckerLogicType } from './versionCheckerLogicType'\n\n// If you would like to deprecate all posthog-js versions older than a specific version\n// (i.e. after fixing an important bug) please edit\n// https://github.com/PostHog/posthog-js/blob/main/deprecation.json\n\nconst CHECK_INTERVAL_MS = 1000 * 60 * 60 * 6 // 6 hour\n\nexport type SDKVersion = {\n version: SemanticVersion\n timestamp?: string\n}\n\nexport type SDKVersionWarning = {\n latestUsedVersion: string\n latestAvailableVersion: string\n numVersionsBehind?: number\n level: 'warning' | 'info' | 'error'\n}\n\nexport interface PosthogJSDeprecation {\n deprecateBeforeVersion?: string\n deprecateOlderThanDays?: number\n}\n\nexport interface AvailableVersions {\n sdkVersions?: SemanticVersion[]\n deprecation?: PosthogJSDeprecation\n}\n\nexport interface VersionCheckerLogicProps {\n teamId: number | null\n}\n\nexport const versionCheckerLogic = kea([\n props({ teamId: null } as VersionCheckerLogicProps),\n key(({ teamId }) => teamId || 'no-team-id'),\n path((key) => ['components', 'VersionChecker', 'versionCheckerLogic', key]),\n actions({\n setVersionWarning: (versionWarning: SDKVersionWarning | null) => ({ versionWarning }),\n setSdkVersions: (sdkVersions: SDKVersion[]) => ({ sdkVersions }),\n }),\n loaders(({ values }) => ({\n availableVersions: [\n {} as AvailableVersions,\n {\n loadAvailableVersions: async (): Promise => {\n // Make both requests simultaneously and don't return until both have finished, to avoid a flash\n // of partial results in the UI.\n const availableVersionsPromise: Promise = fetch(\n 'https://api.github.com/repos/posthog/posthog-js/tags'\n )\n .then((r) => r.json())\n .then((r) => r.map((x: any) => tryParseVersion(x.name)).filter(isNotNil))\n const deprecationPromise: Promise = fetch(\n 'https://raw.githubusercontent.com/PostHog/posthog-js/main/deprecation.json'\n ).then((r) => r.json())\n const settled = await Promise.allSettled([availableVersionsPromise, deprecationPromise])\n const availableVersions = settled[0].status === 'fulfilled' ? settled[0].value : []\n const deprecation = settled[1].status === 'fulfilled' ? settled[1].value : {}\n // if one or more of the requests failed, merge in the previous value if we have one\n return {\n ...values.availableVersions,\n sdkVersions: availableVersions,\n deprecation: deprecation,\n }\n },\n },\n ],\n usedVersions: [\n null as SDKVersion[] | null,\n {\n loadUsedVersions: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$lib_version AS lib_version, max(timestamp) AS latest_timestamp, count(lib_version) as count\n FROM events\n WHERE timestamp >= now() - INTERVAL 1 DAY \n AND timestamp <= now()\n AND properties.$lib = 'web'\n GROUP BY lib_version\n ORDER BY latest_timestamp DESC\n limit 10`,\n }\n\n const res = await api.query(query, undefined, undefined, true)\n\n return (\n res.results\n ?.map((x) => {\n const version = tryParseVersion(x[0])\n if (!version) {\n return null\n }\n return {\n version,\n timestamp: x[1],\n }\n })\n .filter(isNotNil) ?? null\n )\n },\n },\n ],\n })),\n\n reducers({\n lastCheckTimestamp: [\n 0,\n { persist: true },\n {\n loadUsedVersionsSuccess: () => Date.now(),\n },\n ],\n versionWarning: [\n null as SDKVersionWarning | null,\n // bumping cache key due to an incorrect tag being cached on 2024-02-12\n { persist: true, prefix: '2024-02-12' },\n {\n setVersionWarning: (_, { versionWarning }) => versionWarning,\n },\n ],\n }),\n\n sharedListeners(({ values, actions }) => ({\n checkForVersionWarning: () => {\n if (!values.usedVersions?.length) {\n return\n }\n const { deprecation, sdkVersions } = values.availableVersions\n\n // We want the highest semantic version to be the latest used one, rather than\n // the one with the latest timestamp, because secondary installations can spew old versions\n const latestUsedVersion = highestVersion(values.usedVersions.map((v) => v.version))\n\n // the latest version published on github\n const latestAvailableVersion = sdkVersions?.[0]\n\n // the version where, anything before this deprecated (i.e. this version is allowed, before it is not)\n const deprecateBeforeVersion = deprecation?.deprecateBeforeVersion\n ? parseVersion(deprecation.deprecateBeforeVersion)\n : null\n\n let warning: SDKVersionWarning | null = null\n\n if (deprecateBeforeVersion) {\n const diff = diffVersions(deprecateBeforeVersion, latestUsedVersion)\n // if they are behind the deprecatedBeforeVersion by any amount, show an error\n if (diff && diff.diff > 0) {\n warning = {\n latestUsedVersion: versionToString(latestUsedVersion),\n latestAvailableVersion: versionToString(latestAvailableVersion || deprecateBeforeVersion),\n level: 'error',\n }\n }\n }\n\n if (!warning && sdkVersions && latestAvailableVersion) {\n const diff = diffVersions(latestAvailableVersion, latestUsedVersion)\n\n if (diff && diff.diff > 0) {\n // there's a difference between the latest used version and the latest available version\n\n let numVersionsBehind = sdkVersions.findIndex((v) => isEqualVersion(v, latestUsedVersion))\n if (numVersionsBehind === -1) {\n // if we couldn't find the versions, use the length of the list as a fallback\n numVersionsBehind = sdkVersions.length - 1\n }\n if (numVersionsBehind < diff.diff) {\n // we might have deleted versions, but if the actual diff is X then we must be at least X versions behind\n numVersionsBehind = diff.diff\n }\n\n let level: 'warning' | 'info' | 'error' | undefined\n if (diff.kind === 'major') {\n level = 'info' // it is desirable to be on the latest major version, but not critical\n } else if (diff.kind === 'minor') {\n level = numVersionsBehind >= 40 ? 'warning' : undefined\n }\n\n if (level === undefined && numVersionsBehind >= 50) {\n level = 'error'\n }\n\n // we check if there is a \"latest user version string\" to avoid returning odd data in unexpected cases\n if (level && !!versionToString(latestUsedVersion).trim().length) {\n warning = {\n latestUsedVersion: versionToString(latestUsedVersion),\n latestAvailableVersion: versionToString(latestAvailableVersion),\n level,\n numVersionsBehind,\n }\n }\n }\n }\n\n actions.setVersionWarning(warning)\n },\n })),\n\n listeners(({ sharedListeners }) => ({\n loadAvailableVersionsSuccess: sharedListeners.checkForVersionWarning,\n loadUsedVersionsSuccess: sharedListeners.checkForVersionWarning,\n })),\n\n afterMount(({ actions, values }) => {\n if (values.lastCheckTimestamp < Date.now() - CHECK_INTERVAL_MS) {\n actions.loadAvailableVersions()\n actions.loadUsedVersions()\n }\n }),\n])\n","import { useValues } from 'kea'\nimport { TextContent } from 'lib/components/Cards/TextCard/TextCard'\nimport { useUploadFiles } from 'lib/hooks/useUploadFiles'\nimport { IconMarkdown, IconTools } from 'lib/lemon-ui/icons'\nimport { LemonFileInput } from 'lib/lemon-ui/LemonFileInput'\nimport { LemonTabs } from 'lib/lemon-ui/LemonTabs'\nimport { LemonTextArea, LemonTextAreaProps } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { lemonToast } from 'lib/lemon-ui/LemonToast'\nimport { Link } from 'lib/lemon-ui/Link'\nimport { Tooltip } from 'lib/lemon-ui/Tooltip'\nimport posthog from 'posthog-js'\nimport React, { useRef, useState } from 'react'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\n\nexport const LemonTextAreaMarkdown = React.forwardRef(\n function _LemonTextAreaMarkdown({ value, onChange, ...editAreaProps }, ref): JSX.Element {\n const { objectStorageAvailable } = useValues(preflightLogic)\n\n const [isPreviewShown, setIsPreviewShown] = useState(false)\n const dropRef = useRef(null)\n\n const { setFilesToUpload, filesToUpload, uploading } = useUploadFiles({\n onUpload: (url, fileName) => {\n onChange?.(value + `\\n\\n![${fileName}](${url})`)\n posthog.capture('markdown image uploaded', { name: fileName })\n },\n onError: (detail) => {\n posthog.capture('markdown image upload failed', { error: detail })\n lemonToast.error(`Error uploading image: ${detail}`)\n },\n })\n\n return (\n setIsPreviewShown(key === 'preview')}\n tabs={[\n {\n key: 'write',\n label: 'Write',\n content: (\n
\n \n
\n \n Markdown formatting support\n
\n {objectStorageAvailable ? (\n \n ) : (\n
\n \n \n \n \n \n \n Add external images using{' '}\n \n {' '}\n Markdown image links\n \n .\n \n
\n )}\n
\n ),\n },\n {\n key: 'preview',\n label: 'Preview',\n content: value ? (\n \n ) : (\n Nothing to preview\n ),\n },\n ]}\n />\n )\n }\n)\n","// This file contains example queries, used in storybook and in the /query interface.\nimport { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils'\nimport {\n ActionsNode,\n DataTableNode,\n DataVisualizationNode,\n EventsNode,\n EventsQuery,\n FunnelsQuery,\n HogQLQuery,\n HogQuery,\n InsightVizNode,\n LifecycleQuery,\n Node,\n NodeKind,\n PathsQuery,\n PersonsNode,\n RetentionQuery,\n StickinessQuery,\n TrendsQuery,\n} from '~/queries/schema'\nimport {\n ChartDisplayType,\n FilterLogicalOperator,\n PropertyFilterType,\n PropertyGroupFilter,\n PropertyOperator,\n StepOrderValue,\n} from '~/types'\n\nconst Events: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: defaultDataTableColumns(NodeKind.EventsQuery),\n properties: [\n { type: PropertyFilterType.Event, key: '$browser', operator: PropertyOperator.Exact, value: 'Chrome' },\n ],\n after: '-24h',\n limit: 100,\n}\n\nconst EventsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n source: Events,\n}\nconst EventsTableFull: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: Events,\n}\n\nconst TotalEvents: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: ['count()'],\n}\n\nexport const TotalEventsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: TotalEvents,\n}\n\nconst PropertyFormulas: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: [\n '1 + 2 + 3',\n 'event',\n 'person.created_at',\n \"concat(properties['$browser'], ' 💚 ', properties['$geoip_city_name']) -- Browser 💚 City\",\n \"'random string'\",\n ],\n limit: 100,\n}\n\nconst PropertyFormulasTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: PropertyFormulas,\n}\n\nconst EventAggregations: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: {\n kind: NodeKind.EventsQuery,\n select: [\n \"concat(properties['$geoip_city_name'], ' ', 'Rocks') -- City\",\n 'event',\n 'count() + 100000 -- Inflamed total',\n '1 + 2',\n ],\n orderBy: ['-count()'],\n },\n}\n\nconst Persons: PersonsNode = {\n kind: NodeKind.PersonsNode,\n properties: [\n { type: PropertyFilterType.Person, key: '$browser', operator: PropertyOperator.Exact, value: 'Chrome' },\n ],\n}\n\nconst PersonsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n columns: defaultDataTableColumns(NodeKind.PersonsNode),\n source: Persons,\n}\n\nconst PersonsTableFull: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n columns: defaultDataTableColumns(NodeKind.PersonsNode),\n source: Persons,\n}\n\nconst properties: PropertyGroupFilter = {\n type: FilterLogicalOperator.And,\n values: [\n {\n type: FilterLogicalOperator.Or,\n values: [\n {\n type: PropertyFilterType.Event,\n key: '$current_url',\n operator: PropertyOperator.Exact,\n value: ['https://hedgebox.net/files/'],\n },\n {\n type: PropertyFilterType.Event,\n key: '$geoip_country_code',\n operator: PropertyOperator.Exact,\n value: ['US', 'AU'],\n },\n ],\n },\n ],\n}\n\nconst filterTestAccounts = false\nconst series: (EventsNode | ActionsNode)[] = [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n custom_name: 'Views',\n event: '$pageview',\n properties: [\n {\n type: PropertyFilterType.Event,\n key: '$browser',\n operator: PropertyOperator.Exact,\n value: 'Chrome',\n },\n {\n type: PropertyFilterType.Cohort,\n key: 'id',\n operator: PropertyOperator.In,\n value: 2,\n },\n ],\n },\n // {\n // kind: NodeKind.ActionsNode,\n // id: 1,\n // name: 'Interacted with file',\n // custom_name: 'Interactions',\n // properties: [\n // {\n // type: PropertyFilterType.Event,\n // key: '$geoip_country_code',\n // operator: PropertyOperator.Exact,\n // value: ['US'],\n // },\n // ],\n // math: PropertyMathType.Average,\n // math_property: '$session_duration',\n // },\n]\n\nconst InsightTrendsQuery: TrendsQuery = {\n kind: NodeKind.TrendsQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n trendsFilter: {\n display: ChartDisplayType.ActionsAreaGraph,\n },\n breakdownFilter: {\n breakdown: '$geoip_country_code',\n breakdown_type: 'event',\n },\n}\n\nconst InsightFunnelsQuery: FunnelsQuery = {\n kind: NodeKind.FunnelsQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n funnelsFilter: {\n funnelOrderType: StepOrderValue.ORDERED,\n },\n breakdownFilter: {\n breakdown: '$geoip_country_code',\n breakdown_type: 'event',\n },\n}\n\nconst InsightRetentionQuery: RetentionQuery = {\n kind: NodeKind.RetentionQuery,\n properties,\n filterTestAccounts,\n retentionFilter: {\n // TODO: this should be typed as (EventsNode | ActionsNode)[] without math and properties\n targetEntity: { type: 'events', id: '$pageview', name: '$pageview' },\n returningEntity: { type: 'events', id: '$pageview', name: '$pageview' },\n },\n}\n\nconst InsightPathsQuery: PathsQuery = {\n kind: NodeKind.PathsQuery,\n properties,\n filterTestAccounts,\n pathsFilter: {},\n}\n\nconst InsightStickinessQuery: StickinessQuery = {\n kind: NodeKind.StickinessQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n stickinessFilter: {},\n}\n\nconst InsightLifecycleQuery: LifecycleQuery = {\n kind: NodeKind.LifecycleQuery,\n properties,\n filterTestAccounts,\n dateRange: {\n date_from: '-7d',\n },\n series, // TODO: Visualization only supports one event or action\n}\n\nconst HogQLRaw: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: ` select event,\n person.properties.email,\n properties.$browser,\n count()\n from events\n where {filters} -- replaced with global date and property filters\n and person.properties.email is not null\n group by event,\n properties.$browser,\n person.properties.email\n order by count() desc\n limit 100`,\n filters: {\n dateRange: {\n date_from: '-24h',\n },\n },\n}\n\nconst HogQLForDataVisualization: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `select toDate(timestamp) as timestamp, count()\nfrom events\nwhere {filters} and timestamp <= now()\ngroup by timestamp\norder by timestamp asc\nlimit 100`,\n explain: true,\n filters: {\n dateRange: {\n date_from: '-7d',\n },\n },\n}\n\nconst HogQLForDataWarehouse: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `select toDate(timestamp) as timestamp, count()\nfrom events\ngroup by timestamp\nlimit 100`,\n explain: true,\n}\n\nconst DataWarehouse: DataVisualizationNode = {\n kind: NodeKind.DataVisualizationNode,\n source: HogQLForDataWarehouse,\n}\n\nconst HogQLTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: HogQLRaw,\n}\n\nconst DataVisualization: DataVisualizationNode = {\n kind: NodeKind.DataVisualizationNode,\n source: HogQLForDataVisualization,\n tableSettings: {\n columns: [\n {\n column: 'timestamp',\n settings: {\n formatting: {\n prefix: '',\n suffix: '',\n },\n },\n },\n {\n column: 'count()',\n settings: {\n formatting: {\n prefix: '',\n suffix: '',\n },\n },\n },\n ],\n },\n chartSettings: { goalLines: undefined },\n}\n\nconst Hog: HogQuery = {\n kind: NodeKind.HogQuery,\n code: 'return 1 + 2;',\n}\n\nconst Hoggonacci: HogQuery = {\n kind: NodeKind.HogQuery,\n code: `fn fibonacci(number) {\n if (number < 2) {\n return number;\n } else {\n return fibonacci(number - 1) + fibonacci(number - 2);\n }\n}\nreturn fibonacci(16);`,\n}\n/* a subset of examples including only those we can show all users and that don't use HogQL */\nexport const queryExamples: Record = {\n Events,\n EventsTable,\n EventsTableFull,\n TotalEventsTable,\n PropertyFormulasTable,\n EventAggregations,\n Persons,\n PersonsTable,\n PersonsTableFull,\n InsightTrendsQuery,\n InsightTrends: { kind: NodeKind.InsightVizNode, source: InsightTrendsQuery } as InsightVizNode,\n InsightFunnelsQuery,\n InsightFunnels: { kind: NodeKind.InsightVizNode, source: InsightFunnelsQuery } as InsightVizNode,\n InsightRetentionQuery,\n InsightRetention: {\n kind: NodeKind.InsightVizNode,\n source: InsightRetentionQuery,\n } as InsightVizNode,\n InsightPathsQuery,\n InsightPaths: { kind: NodeKind.InsightVizNode, source: InsightPathsQuery } as InsightVizNode,\n InsightStickinessQuery,\n InsightStickiness: {\n kind: NodeKind.InsightVizNode,\n source: InsightStickinessQuery,\n } as InsightVizNode,\n InsightLifecycleQuery,\n InsightLifecycle: {\n kind: NodeKind.InsightVizNode,\n source: InsightLifecycleQuery,\n } as InsightVizNode,\n}\n\nexport const stringifiedQueryExamples: Record = Object.fromEntries(\n Object.entries(queryExamples).map(([key, node]) => [key, JSON.stringify(node)])\n)\n\nexport const examples: Record = {\n ...queryExamples,\n HogQLRaw,\n HogQLTable,\n DataVisualization,\n Hog,\n Hoggonacci,\n DataWarehouse,\n}\n\nexport const stringifiedExamples: Record = Object.fromEntries(\n Object.entries(examples).map(([key, node]) => [key, JSON.stringify(node)])\n)\n","import * as d3 from 'd3'\nimport * as Sankey from 'd3-sankey'\nimport { D3Selector } from 'lib/hooks/useD3'\nimport { stripHTTP } from 'lib/utils'\nimport { Dispatch, RefObject, SetStateAction } from 'react'\n\nimport { FunnelPathsFilter, PathsFilter } from '~/queries/schema'\n\nimport { FALLBACK_CANVAS_WIDTH, HIDE_PATH_CARD_HEIGHT } from './Paths'\nimport { PathNode } from './pathsDataLogic'\nimport { isSelectedPathStartOrEnd, PathNodeData, PathTargetLink, roundedRect } from './pathUtils'\n\nconst createCanvas = (canvasRef: RefObject, width: number, height: number): D3Selector => {\n return d3\n .select(canvasRef.current)\n .append('svg')\n .classed('Paths__canvas', true)\n .style('background', 'var(--item-background)')\n .style('width', `${width}px`)\n .style('height', `${height}px`)\n}\n\nconst createSankey = (width: number, height: number): Sankey.SankeyLayout => {\n // @ts-expect-error - d3 sankey typing things\n return new Sankey.sankey()\n .nodeId((d: PathNodeData) => d.name)\n .nodeAlign(Sankey.sankeyJustify)\n .nodeSort(null)\n .nodeWidth(15)\n .size([width, height])\n}\n\nconst appendPathNodes = (\n svg: any,\n nodes: PathNodeData[],\n pathsFilter: PathsFilter,\n funnelPathsFilter: FunnelPathsFilter,\n setNodeCards: Dispatch>\n): void => {\n svg.append('g')\n .selectAll('rect')\n .data(nodes)\n .join('rect')\n .attr('x', (d: PathNodeData) => d.x0 + 1)\n .attr('y', (d: PathNodeData) => d.y0)\n .attr('height', (d: PathNodeData) => d.y1 - d.y0)\n .attr('width', (d: PathNodeData) => d.x1 - d.x0 - 2)\n .attr('fill', (d: PathNodeData) => {\n let c\n for (const link of d.sourceLinks) {\n if (c === undefined) {\n c = link.color\n } else if (c !== link.color) {\n c = null\n }\n }\n if (c === undefined) {\n for (const link of d.targetLinks) {\n if (c === undefined) {\n c = link.color\n } else if (c !== link.color) {\n c = null\n }\n }\n }\n if (isSelectedPathStartOrEnd(pathsFilter, funnelPathsFilter, d)) {\n return d3.color('purple')\n }\n const startNodeColor = c && d3.color(c) ? d3.color(c) : d3.color('#5375ff')\n return startNodeColor\n })\n .on('mouseover', (_event: MouseEvent, data: PathNodeData) => {\n if (data.y1 - data.y0 > HIDE_PATH_CARD_HEIGHT) {\n return\n }\n setNodeCards(\n nodes.map((node: PathNodeData) =>\n node.index === data.index\n ? { ...node, visible: true }\n : { ...node, visible: node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT }\n )\n )\n })\n .append('title')\n .text((d: PathNodeData) => `${stripHTTP(d.name)}\\n${d.value.toLocaleString()}`)\n}\n\nconst appendDropoffs = (svg: D3Selector): void => {\n const dropOffGradient = svg\n .append('defs')\n .append('linearGradient')\n .attr('id', 'dropoff-gradient')\n .attr('gradientTransform', 'rotate(90)')\n\n dropOffGradient.append('stop').attr('offset', '0%').attr('stop-color', 'rgba(220,53,69,0.7)')\n\n dropOffGradient.append('stop').attr('offset', '100%').attr('stop-color', 'var(--bg-light)')\n}\n\nconst appendPathLinks = (\n svg: any,\n links: PathNodeData[],\n nodes: PathNodeData[],\n setNodeCards: Dispatch>\n): void => {\n const link = svg\n .append('g')\n .attr('fill', 'none')\n .selectAll('g')\n .data(links)\n .join('g')\n .attr('stroke', 'var(--primary)')\n .attr('opacity', 0.35)\n\n link.append('path')\n .attr('d', Sankey.sankeyLinkHorizontal())\n .attr('id', (d: PathNodeData) => `path-${d.index}`)\n .attr('stroke-width', (d: PathNodeData) => {\n return Math.max(1, d.width)\n })\n .on('mouseover', (_event: MouseEvent, data: PathNodeData) => {\n svg.select(`#path-${data.index}`).attr('stroke', 'blue')\n if (data?.source?.targetLinks.length === 0) {\n return\n }\n const nodesToColor = [data.source]\n const pathCardsToShow: number[] = []\n while (nodesToColor.length > 0) {\n const _node = nodesToColor.pop()\n _node?.targetLinks.forEach((_link: PathTargetLink) => {\n svg.select(`#path-${_link.index}`).attr('stroke', 'blue')\n nodesToColor.push(_link.source)\n pathCardsToShow.push(_link.source.index)\n })\n }\n const pathCards = [data.target]\n pathCardsToShow.push(data.target.index, data.source.index)\n while (pathCards.length > 0) {\n const node = pathCards.pop()\n node?.sourceLinks.forEach((l: PathTargetLink) => {\n pathCards.push(l.target)\n pathCardsToShow.push(l.target.index)\n })\n }\n setNodeCards(\n nodes.map((node: PathNodeData) => ({\n ...node,\n ...{\n visible: pathCardsToShow.includes(node.index)\n ? true\n : node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT,\n },\n }))\n )\n })\n .on('mouseleave', () => {\n svg.selectAll('path').attr('stroke', 'var(--primary)')\n })\n\n link.append('g')\n .append('path')\n .attr('d', (data: PathNodeData) => {\n if (data.source.layer === 0) {\n return\n }\n const _height =\n data.source.y1 - data.source.y0 - data.source.sourceLinks.reduce((prev, curr) => prev + curr.width, 0)\n return roundedRect(0, 0, 30, _height, Math.min(25, _height), false, true, false, false)\n })\n .attr('fill', 'url(#dropoff-gradient)')\n .attr('stroke-width', 0)\n .attr('transform', (data: PathNodeData) => {\n return (\n 'translate(' +\n Math.round(data.source.x1) +\n ',' +\n Math.round(data.source.y0 + data.source.sourceLinks.reduce((prev, curr) => prev + curr.width, 0)) +\n ')'\n )\n })\n}\n\nconst addChartAxisLines = (svg: D3Selector, height: number, nodes: PathNodeData[], maxLayer: number): void => {\n if (maxLayer > 5) {\n const arr = [...Array(maxLayer)]\n const minWidthApart = nodes[1].x0 - nodes[0].x0\n arr.forEach((_, i) => {\n svg.append('line')\n .style('stroke', 'var(--border)')\n .attr('stroke-width', 2)\n .attr('x1', minWidthApart * (i + 1) - 20)\n .attr('y1', 0)\n .attr('x2', minWidthApart * (i + 1) - 20)\n .attr('y2', height)\n })\n }\n}\n\nexport function renderPaths(\n canvasRef: RefObject,\n canvasWidth: number,\n canvasHeight: number,\n paths: { links: PathNode[]; nodes: any[] },\n pathsFilter: PathsFilter,\n funnelPathsFilter: FunnelPathsFilter,\n setNodeCards: Dispatch>\n): void {\n if (!paths || paths.nodes.length === 0) {\n return\n }\n\n const maxLayer = paths.links.reduce((prev, curr) => {\n // @ts-expect-error - sometimes target is an object instead of string\n const currNum = curr.target.name || curr.target\n return Math.max(prev, Number(currNum.match(/[^_]*/)))\n }, 0)\n\n const minWidth = canvasWidth > FALLBACK_CANVAS_WIDTH || maxLayer < 3 ? canvasWidth : FALLBACK_CANVAS_WIDTH\n\n const width = maxLayer > 5 && canvasWidth ? (minWidth / 5) * maxLayer : minWidth\n const height = canvasHeight\n\n const svg = createCanvas(canvasRef, width, height)\n const sankey = createSankey(width, height)\n const { nodes, links } = sankey({\n nodes: paths.nodes.map((d) => ({ ...d })),\n links: paths.links.map((d) => ({ ...d })),\n })\n\n setNodeCards(nodes.map((node: PathNodeData) => ({ ...node, visible: node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT })))\n\n appendPathNodes(svg, nodes, pathsFilter, funnelPathsFilter, setNodeCards)\n appendDropoffs(svg)\n appendPathLinks(svg, links, nodes, setNodeCards)\n addChartAxisLines(svg, height, nodes, maxLayer)\n}\n","import { LemonDialog, lemonToast, Link } from '@posthog/lemon-ui'\nimport { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'\nimport { FieldNamePath, forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { router, urlToAction } from 'kea-router'\nimport api, { getJSONOrNull } from 'lib/api'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { dayjs } from 'lib/dayjs'\nimport { LemonBannerAction } from 'lib/lemon-ui/LemonBanner/LemonBanner'\nimport { lemonBannerLogic } from 'lib/lemon-ui/LemonBanner/lemonBannerLogic'\nimport { LemonButtonPropsBase } from 'lib/lemon-ui/LemonButton'\nimport { featureFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { pluralize } from 'lib/utils'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport posthog from 'posthog-js'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport { BillingPlanType, BillingProductV2Type, BillingType, ProductKey } from '~/types'\n\nimport type { billingLogicType } from './billingLogicType'\nimport { DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD } from './CreditCTAHero'\n\nexport const ALLOCATION_THRESHOLD_ALERT = 0.85 // Threshold to show warning of event usage near limit\nexport const ALLOCATION_THRESHOLD_BLOCK = 1.2 // Threshold to block usage\n\nexport interface BillingAlertConfig {\n status: 'info' | 'warning' | 'error'\n title: string\n message?: string\n contactSupport?: boolean\n buttonCTA?: string\n dismissKey?: string\n action?: LemonBannerAction\n pathName?: string\n onClose?: () => void\n}\n\nexport enum BillingAPIErrorCodes {\n OPEN_INVOICES_ERROR = 'open_invoices_error',\n NO_ACTIVE_PAYMENT_METHOD_ERROR = 'no_active_payment_method_error',\n COULD_NOT_PAY_INVOICES_ERROR = 'could_not_pay_invoices_error',\n}\n\nexport interface UnsubscribeError {\n detail: string | JSX.Element\n link: JSX.Element\n}\n\nexport interface BillingError {\n status: 'info' | 'warning' | 'error'\n message: string\n action: LemonButtonPropsBase\n}\n\nconst parseBillingResponse = (data: Partial): BillingType => {\n if (data.billing_period) {\n data.billing_period = {\n current_period_start: dayjs(data.billing_period.current_period_start),\n current_period_end: dayjs(data.billing_period.current_period_end),\n interval: data.billing_period.interval,\n }\n }\n\n data.free_trial_until = data.free_trial_until ? dayjs(data.free_trial_until) : undefined\n data.amount_off_expires_at = data.amount_off_expires_at ? dayjs(data.amount_off_expires_at) : undefined\n // If expiration is in the middle of the current period, we let it expire at the end of the period\n if (\n data.amount_off_expires_at &&\n data.billing_period &&\n data.amount_off_expires_at.isBefore(data.billing_period.current_period_end) &&\n data.amount_off_expires_at.isAfter(data.billing_period.current_period_start)\n ) {\n data.amount_off_expires_at = data.billing_period.current_period_end\n }\n\n return data as BillingType\n}\n\nexport const billingLogic = kea([\n path(['scenes', 'billing', 'billingLogic']),\n actions({\n setProductSpecificAlert: (productSpecificAlert: BillingAlertConfig | null) => ({ productSpecificAlert }),\n setScrollToProductKey: (scrollToProductKey: ProductKey | null) => ({ scrollToProductKey }),\n setShowLicenseDirectInput: (show: boolean) => ({ show }),\n reportBillingAlertShown: (alertConfig: BillingAlertConfig) => ({ alertConfig }),\n reportBillingAlertActionClicked: (alertConfig: BillingAlertConfig) => ({ alertConfig }),\n reportCreditsFormSubmitted: (creditInput: number) => ({ creditInput }),\n reportCreditsModalShown: true,\n reportBillingShown: true,\n registerInstrumentationProps: true,\n reportCreditsCTAShown: (creditOverview: any) => ({ creditOverview }),\n setRedirectPath: true,\n setIsOnboarding: true,\n determineBillingAlert: true,\n setUnsubscribeError: (error: null | UnsubscribeError) => ({ error }),\n resetUnsubscribeError: true,\n setBillingAlert: (billingAlert: BillingAlertConfig | null) => ({ billingAlert }),\n showPurchaseCreditsModal: (isOpen: boolean) => ({ isOpen }),\n toggleCreditCTAHeroDismissed: (isDismissed: boolean) => ({ isDismissed }),\n setComputedDiscount: (discount: number) => ({ discount }),\n }),\n connect(() => ({\n values: [featureFlagLogic, ['featureFlags'], preflightLogic, ['preflight']],\n actions: [\n userLogic,\n ['loadUser'],\n eventUsageLogic,\n ['reportProductUnsubscribed'],\n lemonBannerLogic({ dismissKey: 'usage-limit-exceeded' }),\n ['resetDismissKey as resetUsageLimitExceededKey'],\n lemonBannerLogic({ dismissKey: 'usage-limit-approaching' }),\n ['resetDismissKey as resetUsageLimitApproachingKey'],\n ],\n })),\n reducers({\n billingAlert: [\n null as BillingAlertConfig | null,\n {\n setBillingAlert: (_, { billingAlert }) => billingAlert,\n },\n ],\n scrollToProductKey: [\n null as ProductKey | null,\n {\n setScrollToProductKey: (_, { scrollToProductKey }) => scrollToProductKey,\n },\n ],\n productSpecificAlert: [\n null as BillingAlertConfig | null,\n {\n setProductSpecificAlert: (_, { productSpecificAlert }) => productSpecificAlert,\n },\n ],\n showLicenseDirectInput: [\n false,\n {\n setShowLicenseDirectInput: (_, { show }) => show,\n },\n ],\n redirectPath: [\n '' as string,\n {\n setRedirectPath: () => {\n return window.location.pathname.includes('/onboarding')\n ? window.location.pathname + window.location.search\n : ''\n },\n },\n ],\n isOnboarding: [\n false,\n {\n setIsOnboarding: () => window.location.pathname.includes('/onboarding'),\n },\n ],\n unsubscribeError: [\n null as null | UnsubscribeError,\n {\n resetUnsubscribeError: () => null,\n setUnsubscribeError: (_, { error }) => error,\n },\n ],\n timeRemainingInSeconds: [\n 0,\n {\n loadBillingSuccess: (_, { billing }) => {\n if (!billing?.billing_period) {\n return 0\n }\n const currentTime = dayjs()\n const periodEnd = dayjs(billing.billing_period.current_period_end)\n return periodEnd.diff(currentTime, 'second')\n },\n },\n ],\n timeTotalInSeconds: [\n 0,\n {\n loadBillingSuccess: (_, { billing }) => {\n if (!billing?.billing_period) {\n return 0\n }\n const periodStart = dayjs(billing.billing_period.current_period_start)\n const periodEnd = dayjs(billing.billing_period.current_period_end)\n return periodEnd.diff(periodStart, 'second')\n },\n },\n ],\n isPurchaseCreditsModalOpen: [\n false,\n {\n showPurchaseCreditsModal: (_, { isOpen }) => isOpen,\n },\n ],\n isCreditCTAHeroDismissed: [\n false,\n { persist: true },\n {\n toggleCreditCTAHeroDismissed: (_, { isDismissed }) => isDismissed,\n },\n ],\n computedDiscount: [\n 0,\n {\n setComputedDiscount: (_, { discount }) => discount,\n },\n ],\n }),\n loaders(({ actions, values }) => ({\n billing: [\n null as BillingType | null,\n {\n loadBilling: async () => {\n // Note: this is a temporary flag to skip forecasting in the billing page\n // for customers running into performance issues until we have a more permanent fix\n // of splitting the billing and forecasting data.\n const skipForecasting = values.featureFlags[FEATURE_FLAGS.BILLING_SKIP_FORECASTING]\n const response = await api.get(\n 'api/billing' + (skipForecasting ? '?include_forecasting=false' : '')\n )\n\n return parseBillingResponse(response)\n },\n\n updateBillingLimits: async (limits: { [key: string]: number | null }) => {\n try {\n const response = await api.update('api/billing', { custom_limits_usd: limits })\n lemonToast.success('Billing limits updated')\n return parseBillingResponse(response)\n } catch (error: any) {\n lemonToast.error(\n 'There was an error updating your billing limits. Please try again or contact support.'\n )\n throw error\n }\n },\n\n deactivateProduct: async (key: string) => {\n // clear upgrade params from URL\n // Note(@zach): This is not working properly. We need to look into this.\n const currentURL = new URL(window.location.href)\n currentURL.searchParams.delete('upgraded')\n currentURL.searchParams.delete('products')\n router.actions.push(currentURL.pathname + currentURL.search)\n\n actions.resetUnsubscribeError()\n try {\n const response = await api.getResponse('api/billing/deactivate?products=' + key)\n const jsonRes = await getJSONOrNull(response)\n\n lemonToast.success(\n \"You have been unsubscribed. We're sad to see you go. May the hedgehogs be ever in your favor.\"\n )\n actions.reportProductUnsubscribed(key)\n\n return parseBillingResponse(jsonRes)\n } catch (error: any) {\n if (error.code) {\n if (error.code === BillingAPIErrorCodes.OPEN_INVOICES_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n link: (\n \n View invoices\n \n ),\n } as UnsubscribeError)\n } else if (error.code === BillingAPIErrorCodes.NO_ACTIVE_PAYMENT_METHOD_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n } as UnsubscribeError)\n } else if (error.code === BillingAPIErrorCodes.COULD_NOT_PAY_INVOICES_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n link: (\n \n {error.link ? 'View invoice' : 'View invoices'}\n \n ),\n } as UnsubscribeError)\n }\n } else {\n actions.setUnsubscribeError({\n detail:\n typeof error.detail === 'string'\n ? error.detail\n : `We encountered a problem. Please try again or submit a support ticket.`,\n } as UnsubscribeError)\n }\n console.error(error)\n // This is a bit of a hack to prevent the page from re-rendering.\n return values.billing\n }\n },\n },\n ],\n billingError: [\n null as BillingError | null,\n {\n getInvoices: async () => {\n // First check to see if there are open invoices\n try {\n const res = await api.getResponse('api/billing/get_invoices?status=open')\n const jsonRes = await getJSONOrNull(res)\n const numOpenInvoices = jsonRes['count']\n if (numOpenInvoices > 0) {\n const viewInvoicesButton = {\n to:\n numOpenInvoices == 1 && jsonRes['link']\n ? jsonRes['link']\n : values.billing?.stripe_portal_url,\n children: `View invoice${numOpenInvoices > 1 ? 's' : ''}`,\n targetBlank: true,\n }\n return {\n status: 'warning',\n message: `You have ${numOpenInvoices} open invoice${\n numOpenInvoices > 1 ? 's' : ''\n }. Please pay ${\n numOpenInvoices > 1 ? 'them' : 'it'\n } before adding items to your subscription.`,\n action: viewInvoicesButton,\n }\n }\n } catch (error: any) {\n console.error(error)\n }\n return null\n },\n },\n ],\n creditOverview: [\n {\n eligible: false,\n estimated_monthly_credit_amount_usd: DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n status: 'none',\n invoice_url: null,\n collection_method: null,\n cc_last_four: null,\n email: null,\n },\n {\n loadCreditOverview: async () => {\n // Check if the user is subscribed\n if (values.billing?.has_active_subscription) {\n const response = await api.get('api/billing/credits/overview')\n if (!values.creditForm.creditInput) {\n actions.setCreditFormValue(\n 'creditInput',\n Math.round(\n (response.estimated_monthly_credit_amount_usd ||\n DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD) * 12\n )\n )\n }\n\n if (response.eligible && response.status === 'none') {\n actions.reportCreditsCTAShown(response)\n }\n return response\n }\n // Return default values if not subscribed\n return {\n eligible: false,\n estimated_monthly_credit_amount_usd: DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n status: 'none',\n invoice_url: null,\n collection_method: null,\n cc_last_four: null,\n email: null,\n }\n },\n },\n ],\n products: [\n [] as BillingProductV2Type[],\n {\n loadProducts: async () => {\n const response = await api.get('api/billing/available_products')\n return response\n },\n },\n ],\n })),\n selectors({\n upgradeLink: [(s) => [s.preflight], (): string => '/organization/billing'],\n isUnlicensedDebug: [\n (s) => [s.preflight, s.billing],\n (preflight, billing): boolean => !!preflight?.is_debug && !billing?.billing_period,\n ],\n projectedTotalAmountUsdWithBillingLimits: [\n (s) => [s.billing],\n (billing: BillingType): number => {\n if (!billing) {\n return 0\n }\n let projectedTotal = 0\n for (const product of billing.products || []) {\n const billingLimit =\n billing?.custom_limits_usd?.[product.type] ||\n (product.usage_key ? billing?.custom_limits_usd?.[product.usage_key] || 0 : 0)\n projectedTotal += Math.min(parseFloat(product.projected_amount_usd || '0'), billingLimit)\n }\n return projectedTotal\n },\n ],\n supportPlans: [\n (s) => [s.billing],\n (billing: BillingType): BillingPlanType[] => {\n const platformAndSupportProduct = billing?.products?.find(\n (product) => product.type == ProductKey.PLATFORM_AND_SUPPORT\n )\n if (!platformAndSupportProduct?.plans) {\n return []\n }\n\n const addonPlans = platformAndSupportProduct?.addons?.map((addon) => addon.plans).flat()\n const insertionIndex = Math.max(0, (platformAndSupportProduct?.plans?.length ?? 1) - 1)\n const allPlans = platformAndSupportProduct?.plans?.slice(0) || []\n allPlans.splice(insertionIndex, 0, ...addonPlans)\n return allPlans\n },\n ],\n hasSupportAddonPlan: [\n (s) => [s.billing],\n (billing: BillingType): boolean => {\n return !!billing?.products\n ?.find((product) => product.type == ProductKey.PLATFORM_AND_SUPPORT)\n ?.addons.find((addon) => addon.plans.find((plan) => plan.current_plan))\n },\n ],\n creditDiscount: [(s) => [s.computedDiscount], (computedDiscount) => computedDiscount || 0],\n }),\n forms(({ actions, values }) => ({\n activateLicense: {\n defaults: { license: '' } as { license: string },\n errors: ({ license }) => ({\n license: !license ? 'Please enter your license key' : undefined,\n }),\n submit: async ({ license }, breakpoint) => {\n await breakpoint(500)\n try {\n await api.update('api/billing/license', {\n license,\n })\n\n // Reset the URL so we don't trigger the license submission again\n router.actions.replace(\n `/${values.isOnboarding ? 'ingestion' : 'organization'}/billing?success=true`\n )\n setTimeout(() => {\n window.location.reload() // Permissions, projects etc will be out of date at this point, so refresh\n }, 100)\n } catch (e: any) {\n actions.setActivateLicenseManualErrors({\n license: e.detail || 'License could not be activated. Please contact support.',\n })\n throw e\n }\n },\n },\n creditForm: {\n defaults: {\n creditInput: '',\n collectionMethod: 'charge_automatically',\n },\n submit: async ({ creditInput, collectionMethod }) => {\n await api.create('api/billing/credits/purchase', {\n annual_amount_usd: +Math.round(+creditInput - +creditInput * values.creditDiscount),\n discount_percent: values.computedDiscount * 100,\n collection_method: collectionMethod,\n })\n\n actions.showPurchaseCreditsModal(false)\n actions.loadCreditOverview()\n actions.reportCreditsFormSubmitted(+creditInput)\n\n LemonDialog.open({\n title: 'Your credit purchase has been submitted',\n width: 536,\n content:\n collectionMethod === 'send_invoice' ? (\n <>\n

\n The invoice for your credits has been created and it will be emailed to the email on\n file.\n

\n

\n Once the invoice is paid we will apply the credits to your account. Until the\n invoice is paid you will be charged for usage as normal.\n

\n \n ) : (\n <>\n

\n Your card will be charged soon and the credits will be applied to your account.\n Please make sure your{' '}\n \n card on file\n {' '}\n is up to date. You will receive an email when the credits are applied.\n

\n \n ),\n })\n },\n errors: ({ creditInput, collectionMethod }) => ({\n creditInput: !creditInput\n ? 'Please enter the amount of credits you want to purchase'\n : // This value is used because 3333 - 10% = 3000\n +creditInput < 3333\n ? 'Please enter a credit amount of at least $3,333'\n : undefined,\n collectionMethod: !collectionMethod ? 'Please select a collection method' : undefined,\n }),\n },\n })),\n listeners(({ actions, values }) => ({\n reportBillingShown: () => {\n posthog.capture('billing v2 shown')\n },\n reportBillingAlertShown: ({ alertConfig }) => {\n posthog.capture('billing alert shown', {\n ...alertConfig,\n })\n },\n reportBillingAlertActionClicked: ({ alertConfig }) => {\n posthog.capture('billing alert action clicked', {\n ...alertConfig,\n })\n },\n reportCreditsModalShown: () => {\n posthog.capture('credits modal shown')\n },\n reportCreditsFormSubmitted: ({ creditInput }) => {\n posthog.capture('credits modal credit form submitted', {\n credit_amount_usd: creditInput,\n })\n },\n reportCreditsCTAShown: ({ creditOverview }) => {\n posthog.capture('credits cta shown', {\n eligible: creditOverview.eligible,\n status: creditOverview.status,\n estimated_monthly_credit_amount_usd:\n creditOverview.estimated_monthly_credit_amount_usd || DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n })\n },\n toggleCreditCTAHeroDismissed: ({ isDismissed }) => {\n if (isDismissed) {\n posthog.capture('credits cta hero dismissed')\n }\n },\n loadBillingSuccess: () => {\n if (\n router.values.location.pathname.includes('/organization/billing') &&\n router.values.searchParams['success']\n ) {\n // if the activation is successful, we reload the user to get the updated billing info on the organization\n actions.loadUser()\n router.actions.replace('/organization/billing')\n }\n actions.registerInstrumentationProps()\n\n actions.determineBillingAlert()\n\n actions.loadCreditOverview()\n },\n determineBillingAlert: () => {\n if (values.productSpecificAlert) {\n actions.setBillingAlert(values.productSpecificAlert)\n return\n }\n\n if (!values.billing || !values.preflight?.cloud) {\n return\n }\n\n if (values.billing.free_trial_until && values.billing.free_trial_until.isAfter(dayjs())) {\n const remainingDays = values.billing.free_trial_until.diff(dayjs(), 'days')\n const remainingHours = values.billing.free_trial_until.diff(dayjs(), 'hours')\n\n if (remainingHours > 72) {\n return\n }\n\n actions.setBillingAlert({\n status: 'info',\n title: `Your free trial will end in ${\n remainingHours < 24 ? pluralize(remainingHours, 'hour') : pluralize(remainingDays, 'day')\n }.`,\n message: `Setup billing now to ensure you don't lose access to premium features.`,\n })\n return\n }\n\n if (values.billing.deactivated) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Your organization has been temporarily suspended.',\n message: 'Please contact support to reactivate it.',\n contactSupport: true,\n })\n return\n }\n\n const productOverLimit = values.billing.products?.find((x: BillingProductV2Type) => {\n return x.percentage_usage > 1 && x.usage_key\n })\n\n if (productOverLimit) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Usage limit exceeded',\n message: `You have exceeded the usage limit for ${productOverLimit.name}. Please \n ${productOverLimit.subscribed ? 'increase your billing limit' : 'upgrade your plan'}\n or ${\n productOverLimit.name === 'Data warehouse'\n ? 'data will not be synced'\n : 'data loss may occur'\n }.`,\n dismissKey: 'usage-limit-exceeded',\n })\n return\n }\n\n actions.resetUsageLimitExceededKey()\n\n const productApproachingLimit = values.billing.products?.find(\n (x) => x.percentage_usage > ALLOCATION_THRESHOLD_ALERT\n )\n\n if (productApproachingLimit) {\n actions.setBillingAlert({\n status: 'info',\n title: 'You will soon hit your usage limit',\n message: `You have currently used ${parseFloat(\n (productApproachingLimit.percentage_usage * 100).toFixed(2)\n )}% of your ${\n productApproachingLimit.usage_key && productApproachingLimit.usage_key.toLowerCase()\n } allocation.`,\n dismissKey: 'usage-limit-approaching',\n })\n return\n }\n\n actions.resetUsageLimitApproachingKey()\n },\n setCreditFormValue: ({ name, value }) => {\n if (name === 'creditInput' || (name as FieldNamePath)?.[0] === 'creditInput') {\n const spend = +value\n let discount = 0\n if (spend >= 100000) {\n discount = 0.35\n } else if (spend >= 60000) {\n discount = 0.25\n } else if (spend >= 20000) {\n discount = 0.2\n } else if (spend >= 3000) {\n discount = 0.1\n }\n actions.setComputedDiscount(discount)\n }\n },\n registerInstrumentationProps: async (_, breakpoint) => {\n await breakpoint(100)\n if (posthog && values.billing) {\n const payload = {\n has_billing_plan: !!values.billing.has_active_subscription,\n free_trial_until: values.billing.free_trial_until?.toISOString(),\n customer_deactivated: values.billing.deactivated,\n current_total_amount_usd: values.billing.current_total_amount_usd,\n }\n if (values.billing.custom_limits_usd) {\n for (const product of Object.keys(values.billing.custom_limits_usd)) {\n payload[`custom_limits_usd.${product}`] = values.billing.custom_limits_usd[product]\n }\n }\n if (values.billing.products) {\n for (const product of values.billing.products) {\n const type = product.type.toLowerCase()\n payload[`percentage_usage.${type}`] = product.percentage_usage\n payload[`current_amount_usd.${type}`] = product.current_amount_usd\n payload[`unit_amount_usd.${type}`] = product.unit_amount_usd\n payload[`usage_limit.${type}`] = product.usage_limit\n payload[`current_usage.${type}`] = product.current_usage\n payload[`projected_usage.${type}`] = product.projected_usage\n payload[`free_allocation.${type}`] = product.free_allocation\n }\n }\n if (values.billing.billing_period) {\n payload['billing_period_start'] = values.billing.billing_period.current_period_start\n payload['billing_period_end'] = values.billing.billing_period.current_period_end\n }\n posthog.register(payload)\n }\n },\n showPurchaseCreditsModal: ({ isOpen }) => {\n if (isOpen) {\n actions.reportCreditsModalShown()\n }\n },\n })),\n afterMount(({ actions }) => {\n actions.loadBilling()\n actions.getInvoices()\n }),\n urlToAction(({ actions }) => ({\n // IMPORTANT: This needs to be above the \"*\" so it takes precedence\n '/*/billing': (_params, _search, hash) => {\n if (hash.license) {\n actions.setShowLicenseDirectInput(true)\n actions.setActivateLicenseValues({ license: hash.license })\n actions.submitActivateLicense()\n }\n if (_search.products) {\n const products = _search.products.split(',')\n actions.setScrollToProductKey(products[0])\n }\n if (_search.billing_error) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Error',\n message: _search.billing_error,\n })\n }\n actions.setRedirectPath()\n actions.setIsOnboarding()\n },\n '*': () => {\n actions.setRedirectPath()\n actions.setIsOnboarding()\n },\n })),\n])\n","import { LemonCollapse, LemonModal, Link } from '@posthog/lemon-ui'\nimport { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport EarlyAccessFeatureImage from 'public/early-access-feature-demo.png'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { urls } from 'scenes/urls'\n\nimport { FeatureFlagType, PipelineStage, Region } from '~/types'\n\ninterface InstructionsModalProps {\n flag: FeatureFlagType['key']\n visible: boolean\n onClose: () => void\n}\n\nexport function InstructionsModal({ onClose, visible, flag }: InstructionsModalProps): JSX.Element {\n const { preflight } = useValues(preflightLogic)\n\n const getCloudPanels = (): JSX.Element => (\n \n Give your users a{' '}\n \n prebuilt widget\n {' '}\n to opt-in to features\n \n \n ),\n },\n {\n key: '2',\n header: 'Option 2: Custom implementation',\n content: (\n
\n Opt user in\n
\n \n
\n\n Opt user out\n
\n \n
\n\n Retrieve Previews\n
\n \n
\n
\n ),\n },\n ]}\n />\n )\n\n const getSelfHostedPanels = (): JSX.Element => (\n
\n Opt user in\n
\n \n
\n\n Opt user out\n
\n \n
\n\n Retrieve Previews\n
\n \n
\n
\n )\n\n const panels: JSX.Element = preflight?.cloud ? getCloudPanels() : getSelfHostedPanels()\n\n return (\n \n
\n
\n Implement manual release condition toggles to give your users the ability choose which features they\n want to try\n
\n {panels}\n
\n
\n )\n}\n\nfunction FeatureEnrollInstructions({ flag }: { flag: string }): JSX.Element {\n return (\n \n {`posthog.updateEarlyAccessFeatureEnrollment(\"${flag}\", true)\n`}\n \n )\n}\n\nfunction FeatureUnenrollInstructions({ flag }: { flag: string }): JSX.Element {\n return (\n \n {`posthog.updateEarlyAccessFeatureEnrollment(\"${flag}\", false)\n`}\n \n )\n}\n\nfunction RetrievePreviewsInstructions(): JSX.Element {\n return (\n \n {`posthog.getEarlyAccessFeatures((previewItemData) => {\n // do something with early access feature\n})\n`}\n \n )\n}\n","import { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport { teamLogic } from 'scenes/teamLogic'\n\nimport { GroupType } from '~/types'\n\nexport const UTM_TAGS = '?utm_medium=in-product&utm_campaign=feature-flag'\n\nexport interface FeatureFlagSnippet {\n flagKey: string\n multivariant?: boolean\n groupType?: GroupType\n localEvaluation?: boolean\n payload?: boolean\n samplePropertyName?: string\n instantlyAvailableProperties?: boolean\n}\n\nconst LOCAL_EVAL_REMINDER = `Remember to set a personal API key in the SDK to enable local evaluation.\n`\n\nexport function NodeJSSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'await client.'\n const flagFunction = payload ? 'getFeatureFlagPayload' : multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n groupProperties: { ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n personProperties: {'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${\n payload\n ? `\n undefined,`\n : ''\n }\n {\n groups: { '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n }\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${\n payload\n ? `\n undefined,`\n : ''\n }\n {${localEvalAddition}\n }\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n\n const variableName = payload ? 'matchedFlagPayload' : multivariant ? 'enabledVariant' : 'isMyFlagEnabledForUser'\n\n const conditional = multivariant ? `${variableName} === 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif (${conditional}) {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`\n\n return (\n <>\n \n {`${\n localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''\n }const ${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function PHPSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHog::'\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // empty person properties\n [],\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n [${groupType.group_type} => ['${propertyName}' => 'value', 'name' => 'xyz']]`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n ['${propertyName}' => 'value']`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n // group types\n ['${groupType.group_type}' => '<${groupType.name_singular || 'group'} ID>'],${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = multivariant ? '$enabledVariant' : '$isMyFlagEnabledForUser'\n\n const conditional = multivariant ? `${variableName} === 'example-variant'` : `${variableName}`\n\n return (\n <>\n \n {`${localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}\n\nif (${conditional}) {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`}\n \n \n )\n}\n\nexport function GolangSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'client.'\n\n const flagFunction = multivariant ? 'GetFeatureFlag' : 'IsFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n groupProperties: map[string]Properties{\"${groupType.group_type}\": posthog.NewProperties().Set(\"${propertyName}\", \"value\").Set(\"name\", \"xyz\")}`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n PersonProperties: posthog.NewProperties().Set(\"${propertyName}\", \"value\")`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n FeatureFlagPayload{\n Key: \"${flagKey}\",\n DistinctId: \"distinct-id\",\n Groups: Groups{'${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>'},${localEvalAddition}\n }\n)`\n : `${clientSuffix}${flagFunction}(\n FeatureFlagPayload{\n Key: '${flagKey}',\n DistinctId: \"distinct-id\",${localEvalAddition}\n })`\n const variableName = multivariant ? 'enabledVariant, err' : 'isMyFlagEnabledForUser, err'\n\n const conditional = multivariant ? `enabledVariant == 'example-variant'` : `isMyFlagEnabledForUser`\n\n return (\n <>\n \n {`${localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''}${variableName} := ${flagSnippet}\n\nif ${conditional} {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`}\n \n \n )\n}\n\nexport function RubySnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n const flagFunction = payload ? 'get_feature_flag_payload' : multivariant ? 'get_feature_flag' : 'is_feature_enabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n # add group properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n group_properties: { ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n # add person properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n person_properties: {'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n groups: { '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = payload ? 'matched_flag_payload' : multivariant ? 'enabled_variant' : 'is_my_flag_enabled'\n\n const conditional = multivariant ? `${variableName} == 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif ${conditional}\n # Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\nend`\n\n return (\n <>\n \n {`${localEvaluation ? '# ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function PythonSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n const flagFunction = payload ? 'get_feature_flag_payload' : multivariant ? 'get_feature_flag' : 'feature_enabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n # add group properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n group_properties={ ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n # add person properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n person_properties={'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n groups={ '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = payload ? 'matched_flag_payload' : multivariant ? 'enabled_variant' : 'is_my_flag_enabled'\n\n const conditional = multivariant ? `${variableName} == 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif ${conditional}:\n # Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n`\n\n return (\n <>\n \n {`${localEvaluation ? '# ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function AndroidSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHog.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload(\"${flagKey}\")`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == \"example-variant\"` : ''\n return (\n \n {`if (${clientSuffix}${flagFunction}(\"${flagKey}\")${variantSuffix}) {\n // do something\n}\n `}\n \n )\n}\n\nexport function FlutterSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'await Posthog().'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload('${flagKey}');`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n\n return (\n \n {`if (${clientSuffix}${flagFunction}('${flagKey}')${variantSuffix}) {\n // do something\n}\n `}\n \n )\n}\n\nexport function iOSSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHogSDK.shared.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload(\"${flagKey}\")`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? `as? String == \"example-variant\"` : ''\n return (\n \n {`if ${clientSuffix}${flagFunction}(\"${flagKey}\")${variantSuffix} {\n // do something\n}`}\n \n )\n}\n\nexport function ReactNativeSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload('${flagKey}')`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n return (\n \n {`// With a hook\nimport { useFeatureFlag } from 'posthog-react-native'\n\nconst MyComponent = () => {\n const showFlaggedFeature = useFeatureFlag('${flagKey}')\n\n if (showFlaggedFeature === undefined) {\n // the response is undefined if the flags are being loaded\n return null\n }\n\n return showFlaggedFeature ${variantSuffix} ? Testing feature 😄 : Not Testing feature 😢\n}\n\n// Or calling on the method directly\n${clientSuffix}${flagFunction}('${flagKey}')\n `}\n \n )\n}\n\nexport function ReactSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const flagFunction = payload\n ? 'useFeatureFlagPayload'\n : multivariant\n ? 'useFeatureFlagVariantKey'\n : 'useFeatureFlagEnabled'\n\n const variable = payload ? 'payload' : multivariant ? 'variant' : 'flagEnabled'\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n\n return (\n \n {`\nimport { ${flagFunction} } from 'posthog-js/react'\n\nfunction App() {\n const ${variable} = ${flagFunction}('${flagKey}')\n\n if (${variable}${variantSuffix}) {\n // do something\n }\n}`}\n \n )\n}\n\nexport function APISnippet({ groupType }: FeatureFlagSnippet): JSX.Element {\n const { currentTeam } = useValues(teamLogic)\n\n const groupAddition = groupType\n ? `\n \"groups\": { \"${groupType.group_type}\": \"<${groupType.name_singular || 'group'} ID>\" },`\n : ''\n\n return (\n <>\n \n {`curl ${apiHostOrigin()}/decide?v=3/ \\\\\n-X POST -H 'Content-Type: application/json' \\\\\n-d '{\n \"api_key\": \"${currentTeam ? currentTeam.api_token : '[project_api_key]'}\",\n \"distinct_id\": \"[user distinct id]\",${groupAddition}\n}'\n `}\n \n \n )\n}\n\nexport function JSSnippet({\n flagKey,\n multivariant,\n payload,\n groupType,\n instantlyAvailableProperties,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n if (payload) {\n return (\n <>\n \n {`posthog.getFeatureFlagPayload('${flagKey ?? ''}')`}\n \n \n )\n }\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const propertyOverrideSnippet = `// Your flag depends on properties that are not instantly available. If you want\n// to make them available without waiting for server delays, send these properties for flag evaluation, like so:\n// Make sure to call this before evaluating flags. More info: https://posthog.com/docs/libraries/js#overriding-server-properties \nposthog.${\n groupType\n ? `setGroupPropertiesForFlags({ '${groupType.group_type}': {'${propertyName}': 'value'}})`\n : `setPersonPropertiesForFlags({'${propertyName}': 'value'})`\n }\n\n`\n\n const clientSuffix = 'posthog.'\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n return (\n <>\n \n {`${instantlyAvailableProperties ? '' : propertyOverrideSnippet}// Ensure flags are loaded before usage.\n// You'll only need to call this on the code for when the first time a user visits.\n${clientSuffix}onFeatureFlags(function() {\n // feature flags should be available at this point\n if (${clientSuffix}${flagFunction}('${flagKey ?? ''}') ${variantSuffix}) {\n // do something\n }\n})\n\n// Otherwise, you can just do:\nif (${clientSuffix}${flagFunction}('${flagKey ?? ''}') ${variantSuffix}) {\n // do something\n}`}\n \n \n )\n}\n\nexport function JSBootstrappingSnippet(): JSX.Element {\n return (\n \n {`// Initialise the posthog library with a distinct ID and feature flags for immediate loading\n// This avoids the delay between the library loading and feature flags becoming available to use.\n\nposthog.init('{project_api_key}', {\n api_host: '${apiHostOrigin()}'\n bootstrap:\n {\n distinctID: 'your-anonymous-id',\n featureFlags: {\n // input the flag values here from 'posthog.getAllFlags(distinct_id)' which you can find in the server-side libraries.\n // example:\n // 'flag-1': true,\n // 'variant-flag': 'control',\n // 'other-flag': false\n },\n }\n})\n `}\n \n )\n}\n","import { mergeAttributes, Node, NodeViewProps } from '@tiptap/core'\nimport { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'\nimport { NotebookNodeType, NotebookTarget } from '~/types'\nimport { dayjs } from 'lib/dayjs'\nimport { JSONContent } from '../Notebook/utils'\nimport clsx from 'clsx'\nimport { urls } from 'scenes/urls'\nimport { LemonButton } from '@posthog/lemon-ui'\nimport { notebookLogic } from '../Notebook/notebookLogic'\nimport { useValues } from 'kea'\nimport { useMemo } from 'react'\nimport { openNotebook } from '~/models/notebooksModel'\n\nexport interface NotebookNodeReplayTimestampAttrs {\n playbackTime?: number\n sessionRecordingId: string\n sourceNodeId?: string\n}\n\nconst Component = (props: NodeViewProps): JSX.Element => {\n const { shortId, findNodeLogic, findNodeLogicById } = useValues(notebookLogic)\n const { sessionRecordingId, playbackTime = 0, sourceNodeId } = props.node.attrs as NotebookNodeReplayTimestampAttrs\n\n const relatedNodeInNotebook = useMemo(() => {\n const logicById = sourceNodeId ? findNodeLogicById(sourceNodeId) : null\n\n return logicById ?? findNodeLogic(NotebookNodeType.Recording, { id: sessionRecordingId })\n }, [findNodeLogic])\n\n const handlePlayInNotebook = (): void => {\n // TODO: Figure out how to send this action info to the playlist OR the replay node...\n\n relatedNodeInNotebook?.values.sendMessage('play-replay', {\n sessionRecordingId,\n time: playbackTime ?? 0,\n })\n }\n\n return (\n \n openNotebook(shortId, NotebookTarget.Popover)\n }\n to={\n !relatedNodeInNotebook\n ? urls.replaySingle(sessionRecordingId) + `?t=${playbackTime / 1000}`\n : undefined\n }\n >\n {formatTimestamp(playbackTime)}\n \n \n )\n}\n\nexport const NotebookNodeReplayTimestamp = Node.create({\n name: NotebookNodeType.ReplayTimestamp,\n inline: true,\n group: 'inline',\n atom: true,\n\n serializedText: (attrs: NotebookNodeReplayTimestampAttrs): string => {\n // timestamp is not a block so `getText` does not add a separator.\n // we need to add it manually\n return `${attrs.playbackTime ? formatTimestamp(attrs.playbackTime) : '00:00'}:\\n`\n },\n\n addAttributes() {\n return {\n playbackTime: { default: null, keepOnSplit: false },\n sessionRecordingId: { default: null, keepOnSplit: true, isRequired: true },\n sourceNodeId: { default: null, keepOnSplit: true },\n }\n },\n\n parseHTML() {\n return [{ tag: NotebookNodeType.ReplayTimestamp }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [NotebookNodeType.ReplayTimestamp, mergeAttributes(HTMLAttributes)]\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(Component)\n },\n})\n\nexport function formatTimestamp(time: number): string {\n return dayjs.duration(time, 'milliseconds').format('HH:mm:ss').replace(/^00:/, '').trim()\n}\n\nexport function buildTimestampCommentContent(attrs: NotebookNodeReplayTimestampAttrs): JSONContent {\n return {\n type: 'paragraph',\n content: [\n {\n type: NotebookNodeType.ReplayTimestamp,\n attrs,\n },\n { type: 'text', text: ' ' },\n ],\n }\n}\n","import {\n IconCursor,\n IconFunnels,\n IconHogQL,\n IconLifecycle,\n IconPeople,\n IconRetention,\n IconRewindPlay,\n IconStickiness,\n IconTrends,\n IconUpload,\n IconUserPaths,\n} from '@posthog/icons'\nimport { IconCode } from '@posthog/icons'\nimport { LemonButton, LemonDivider, lemonToast } from '@posthog/lemon-ui'\nimport { Extension } from '@tiptap/core'\nimport { ReactRenderer } from '@tiptap/react'\nimport Suggestion from '@tiptap/suggestion'\nimport Fuse from 'fuse.js'\nimport { useValues } from 'kea'\nimport { IconBold, IconItalic } from 'lib/lemon-ui/icons'\nimport { Popover } from 'lib/lemon-ui/Popover'\nimport { selectFiles } from 'lib/utils/file-utils'\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useState } from 'react'\n\nimport { KeyboardShortcut } from '~/layout/navigation-3000/components/KeyboardShortcut'\nimport { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils'\nimport { NodeKind } from '~/queries/schema'\nimport { BaseMathType, ChartDisplayType, FunnelVizType, NotebookNodeType, PathType, RetentionPeriod } from '~/types'\n\nimport { buildNodeEmbed } from '../Nodes/NotebookNodeEmbed'\nimport { buildInsightVizQueryContent, buildNodeQueryContent } from '../Nodes/NotebookNodeQuery'\nimport NotebookIconHeading from './NotebookIconHeading'\nimport { notebookLogic } from './notebookLogic'\nimport { EditorCommands, EditorRange } from './utils'\n\ntype SlashCommandConditionalProps =\n | {\n mode: 'add'\n getPos: () => number\n range?: never\n }\n | {\n mode: 'slash'\n getPos?: never\n range: EditorRange\n }\n\ntype SlashCommandsProps = SlashCommandConditionalProps & {\n query?: string\n decorationNode?: any\n onClose?: () => void\n}\n\ntype SlashCommandsPopoverProps = SlashCommandsProps & {\n visible: boolean\n children?: JSX.Element\n}\n\ntype SlashCommandsRef = {\n onKeyDown: (event: KeyboardEvent) => boolean\n}\n\ntype SlashCommandsItem = {\n title: string\n search?: string\n icon?: JSX.Element\n command: (chain: EditorCommands, pos: number | EditorRange) => EditorCommands | Promise\n}\n\nconst TEXT_CONTROLS: SlashCommandsItem[] = [\n {\n title: 'h1',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 1 }),\n },\n {\n title: 'h2',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 2 }),\n },\n {\n title: 'h3',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 3 }),\n },\n {\n title: 'bold',\n icon: ,\n command: (chain) => chain.toggleBold(),\n },\n {\n title: 'italic',\n icon: ,\n command: (chain) => chain.toggleItalic(),\n },\n]\n\nconst SLASH_COMMANDS: SlashCommandsItem[] = [\n {\n title: 'Trend',\n search: 'graph trend insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.TrendsQuery,\n filterTestAccounts: false,\n series: [\n {\n kind: NodeKind.EventsNode,\n event: '$pageview',\n name: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n interval: 'day',\n trendsFilter: {\n display: ChartDisplayType.ActionsLineGraph,\n },\n })\n ),\n },\n {\n title: 'Funnel',\n search: 'funnel insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.FunnelsQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n },\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n },\n ],\n funnelsFilter: {\n funnelVizType: FunnelVizType.Steps,\n },\n })\n ),\n },\n {\n title: 'Retention',\n search: 'retention insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.RetentionQuery,\n retentionFilter: {\n period: RetentionPeriod.Day,\n totalIntervals: 11,\n targetEntity: {\n id: '$pageview',\n name: '$pageview',\n type: 'events',\n },\n returningEntity: {\n id: '$pageview',\n name: '$pageview',\n type: 'events',\n },\n retentionType: 'retention_first_time',\n },\n })\n ),\n },\n {\n title: 'Paths',\n search: 'user paths insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.PathsQuery,\n pathsFilter: {\n includeEventTypes: [PathType.PageView],\n },\n })\n ),\n },\n {\n title: 'Stickiness',\n search: 'stickiness insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.StickinessQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n stickinessFilter: {},\n })\n ),\n },\n {\n title: 'Lifecycle',\n search: 'lifecycle insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.LifecycleQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n })\n ),\n },\n {\n title: 'HogQL',\n search: 'sql',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.HogQLQuery,\n query: `select event,\n person.properties.email,\n properties.$browser,\n count()\n from events\n where {filters} -- replaced with global date and property filters\n and person.properties.email is not null\ngroup by event,\n properties.$browser,\n person.properties.email\norder by count() desc\n limit 100`,\n filters: {\n dateRange: {\n date_from: '-24h',\n },\n },\n },\n })\n ),\n },\n {\n title: 'Events',\n search: 'data explore',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.EventsQuery,\n select: defaultDataTableColumns(NodeKind.EventsQuery),\n properties: [],\n after: '-24h',\n limit: 100,\n },\n })\n ),\n },\n {\n title: 'People',\n search: 'persons users',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n columns: defaultDataTableColumns(NodeKind.ActorsQuery),\n source: {\n kind: NodeKind.ActorsQuery,\n properties: [],\n },\n })\n ),\n },\n {\n title: 'Session recordings',\n search: 'video replay',\n icon: ,\n command: (chain, pos) => chain.insertContentAt(pos, { type: NotebookNodeType.RecordingPlaylist, attrs: {} }),\n },\n {\n title: 'Image',\n search: 'picture gif',\n icon: ,\n command: async (chain, pos) => {\n // Trigger upload followed by insert\n try {\n const files = await selectFiles({ contentType: 'image/*', multiple: false })\n\n if (files.length) {\n return chain.insertContentAt(pos, { type: NotebookNodeType.Image, attrs: { file: files[0] } })\n }\n } catch (e) {\n lemonToast.error('Something went wrong when trying to select a file.')\n }\n\n return chain\n },\n },\n {\n title: 'Embedded iframe',\n search: 'iframe embed',\n icon: ,\n command: async (chain, pos) => {\n return chain.insertContentAt(pos, buildNodeEmbed())\n },\n },\n]\n\nexport const SlashCommands = forwardRef(function SlashCommands(\n { mode, range, getPos, onClose, query }: SlashCommandsProps,\n ref\n): JSX.Element | null {\n const { editor } = useValues(notebookLogic)\n // We start with 1 because the first item is the text controls\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [selectedHorizontalIndex, setSelectedHorizontalIndex] = useState(0)\n\n const allCommmands = [...TEXT_CONTROLS, ...SLASH_COMMANDS]\n\n const fuse = useMemo(() => {\n return new Fuse(allCommmands, {\n keys: ['title', 'search'],\n threshold: 0.3,\n })\n }, [allCommmands])\n\n const filteredCommands = useMemo(() => {\n if (!query) {\n return allCommmands\n }\n return fuse.search(query).map((result) => result.item)\n }, [query, fuse])\n\n const filteredSlashCommands = useMemo(\n () => filteredCommands.filter((item) => SLASH_COMMANDS.includes(item)),\n [filteredCommands]\n )\n\n useEffect(() => {\n setSelectedIndex(0)\n setSelectedHorizontalIndex(0)\n }, [query])\n\n const execute = async (item: SlashCommandsItem): Promise => {\n if (editor) {\n const selectedNode = editor.getSelectedNode()\n const isTextNode = selectedNode === null || selectedNode.isText\n const isTextCommand = TEXT_CONTROLS.map((c) => c.title).includes(item.title)\n\n const position = mode === 'slash' ? range.from : getPos()\n let chain = mode === 'slash' ? editor.deleteRange(range) : editor.chain()\n\n if (!isTextNode && isTextCommand) {\n chain = chain.insertContentAt(position, { type: 'paragraph' })\n }\n\n const partialCommand = await item.command(chain, position)\n partialCommand.run()\n\n onClose?.()\n }\n }\n\n const onPressEnter = async (): Promise => {\n const command =\n selectedIndex === -1 ? TEXT_CONTROLS[selectedHorizontalIndex] : filteredSlashCommands[selectedIndex]\n\n await execute(command)\n }\n const onPressUp = (): void => {\n setSelectedIndex(Math.max(selectedIndex - 1, -1))\n }\n const onPressDown = (): void => {\n setSelectedIndex(Math.min(selectedIndex + 1, SLASH_COMMANDS.length - 1))\n }\n\n const onPressLeft = (): void => {\n setSelectedHorizontalIndex(Math.max(selectedHorizontalIndex - 1, 0))\n }\n const onPressRight = (): void => {\n setSelectedHorizontalIndex(Math.min(selectedHorizontalIndex + 1, TEXT_CONTROLS.length - 1))\n }\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent): boolean => {\n const keyMappings = {\n ArrowUp: onPressUp,\n ArrowDown: onPressDown,\n ArrowLeft: onPressLeft,\n ArrowRight: onPressRight,\n Enter: onPressEnter,\n }\n\n if (keyMappings[event.key]) {\n keyMappings[event.key]()\n return true\n }\n\n return false\n },\n [selectedIndex, selectedHorizontalIndex, filteredCommands]\n )\n\n // Expose the keydown handler to the tiptap extension\n useImperativeHandle(ref, () => ({ onKeyDown }), [onKeyDown])\n\n useEffect(() => {\n if (mode !== 'add') {\n return\n }\n\n // If not opened from a slash command, we want to add our own keyboard listeners\n const keyDownListener = (event: KeyboardEvent): void => {\n const preventDefault = onKeyDown(event)\n if (preventDefault) {\n event.preventDefault()\n }\n }\n\n window.addEventListener('keydown', keyDownListener, true)\n\n return () => window.removeEventListener('keydown', keyDownListener, true)\n }, [onKeyDown, mode])\n\n if (!editor) {\n return null\n }\n\n return (\n
\n
\n {TEXT_CONTROLS.map((item, index) => (\n void execute(item)}\n icon={item.icon}\n />\n ))}\n
\n\n \n\n {filteredSlashCommands.map((item, index) => (\n void execute(item)}\n >\n {item.title}\n \n ))}\n\n {filteredSlashCommands.length === 0 && (\n
\n Nothing matching /{query}\n
\n )}\n\n {mode === 'add' && (\n <>\n \n
\n You can trigger this menu by typing \n
\n \n )}\n
\n )\n})\n\nexport const SlashCommandsPopover = forwardRef(\n function SlashCommandsPopover(\n { visible = true, decorationNode, children, onClose, ...props }: SlashCommandsPopoverProps,\n ref\n ): JSX.Element | null {\n return (\n }\n referenceElement={decorationNode}\n visible={visible}\n onClickOutside={onClose}\n >\n {children}\n \n )\n }\n)\n\nexport const SlashCommandsExtension = Extension.create({\n name: 'slash-commands',\n\n addProseMirrorPlugins() {\n return [\n Suggestion({\n editor: this.editor,\n char: '/',\n startOfLine: true,\n render: () => {\n let renderer: ReactRenderer\n\n return {\n onStart: (props) => {\n renderer = new ReactRenderer(SlashCommandsPopover, {\n props: { ...props, mode: 'slash' },\n editor: props.editor,\n })\n },\n\n onUpdate(props) {\n renderer.updateProps(props)\n\n if (!props.clientRect) {\n return\n }\n },\n\n onKeyDown(props) {\n if (props.event.key === 'Escape') {\n renderer.destroy()\n return true\n }\n return renderer.ref?.onKeyDown(props.event) ?? false\n },\n\n onExit() {\n renderer.destroy()\n },\n }\n },\n }),\n ]\n },\n})\n","import {\n addedNodeMutation,\n customEvent,\n EventType,\n fullSnapshotEvent,\n incrementalSnapshotEvent,\n IncrementalSource,\n metaEvent,\n mutationData,\n removedNodeMutation,\n} from '@rrweb/types'\nimport { captureMessage } from '@sentry/react'\nimport { isObject } from 'lib/utils'\nimport { PLACEHOLDER_SVG_DATA_IMAGE_URL } from 'scenes/session-recordings/player/rrweb'\n\nimport {\n attributes,\n documentNode,\n elementNode,\n fullSnapshotEvent as MobileFullSnapshotEvent,\n keyboardEvent,\n metaEvent as MobileMetaEvent,\n MobileIncrementalSnapshotEvent,\n MobileNodeMutation,\n MobileNodeType,\n NodeType,\n serializedNodeWithId,\n textNode,\n wireframe,\n wireframeButton,\n wireframeCheckBox,\n wireframeDiv,\n wireframeImage,\n wireframeInputComponent,\n wireframeNavigationBar,\n wireframePlaceholder,\n wireframeProgress,\n wireframeRadio,\n wireframeRadioGroup,\n wireframeRectangle,\n wireframeScreenshot,\n wireframeSelect,\n wireframeStatusBar,\n wireframeText,\n wireframeToggle,\n} from '../mobile.types'\nimport { makeNavigationBar, makeOpenKeyboardPlaceholder, makeStatusBar } from './screen-chrome'\nimport { ConversionContext, ConversionResult } from './types'\nimport {\n asStyleString,\n makeBodyStyles,\n makeColorStyles,\n makeDeterminateProgressStyles,\n makeHTMLStyles,\n makeIndeterminateProgressStyles,\n makeMinimalStyles,\n makePositionStyles,\n makeStylesString,\n} from './wireframeStyle'\n\nexport const BACKGROUND = '#f3f4ef'\nconst FOREGROUND = '#35373e'\n\n/**\n * generates a sequence of ids\n * from 100 to 9,999,999\n * the transformer reserves ids in the range 0 to 9,999,999\n * we reserve a range of ids because we need nodes to have stable ids across snapshots\n * in order for incremental snapshots to work\n * some mobile elements have to be wrapped in other elements in order to be styled correctly\n * which means the web version of a mobile replay will use ids that don't exist in the mobile replay,\n * and we need to ensure they don't clash\n * -----\n * id is typed as a number in rrweb\n * and there's a few places in their code where rrweb uses a check for `id === -1` to bail out of processing\n * so, it's safest to assume that id is expected to be a positive integer\n */\nfunction* ids(): Generator {\n let i = 100\n while (i < 9999999) {\n yield i++\n }\n}\n\nlet globalIdSequence = ids()\n\n// there are some fixed ids that we need to use for fixed elements or artificial mutations\nconst DOCUMENT_ID = 1\nconst HTML_DOC_TYPE_ID = 2\nconst HTML_ELEMENT_ID = 3\nconst HEAD_ID = 4\nconst BODY_ID = 5\n// the nav bar should always be the last item in the body so that it is at the top of the stack\nconst NAVIGATION_BAR_PARENT_ID = 7\nexport const NAVIGATION_BAR_ID = 8\n// the keyboard so that it is still before the nav bar\nconst KEYBOARD_PARENT_ID = 9\nexport const KEYBOARD_ID = 10\nexport const STATUS_BAR_PARENT_ID = 11\nexport const STATUS_BAR_ID = 12\n\nfunction isKeyboardEvent(x: unknown): x is keyboardEvent {\n return isObject(x) && 'data' in x && isObject(x.data) && 'tag' in x.data && x.data.tag === 'keyboard'\n}\n\nexport function _isPositiveInteger(id: unknown): id is number {\n return typeof id === 'number' && id > 0 && id % 1 === 0\n}\n\nfunction _isNullish(x: unknown): x is null | undefined {\n return x === null || x === undefined\n}\n\nfunction isRemovedNodeMutation(x: addedNodeMutation | removedNodeMutation): x is removedNodeMutation {\n return isObject(x) && 'id' in x\n}\n\nexport const makeCustomEvent = (\n mobileCustomEvent: (customEvent | keyboardEvent) & {\n timestamp: number\n delay?: number\n }\n): (customEvent | incrementalSnapshotEvent) & {\n timestamp: number\n delay?: number\n} => {\n if (isKeyboardEvent(mobileCustomEvent)) {\n // keyboard events are handled as incremental snapshots to add or remove a keyboard from the DOM\n // TODO eventually we can pass something to makeIncrementalEvent here\n const adds: addedNodeMutation[] = []\n const removes = []\n if (mobileCustomEvent.data.payload.open) {\n const keyboardPlaceHolder = makeOpenKeyboardPlaceholder(mobileCustomEvent, {\n timestamp: mobileCustomEvent.timestamp,\n idSequence: globalIdSequence,\n })\n if (keyboardPlaceHolder) {\n adds.push({\n parentId: KEYBOARD_PARENT_ID,\n nextId: null,\n node: keyboardPlaceHolder.result,\n })\n // mutations seem not to want a tree of nodes to add\n // so even though `keyboardPlaceholder` is a tree with content\n // we have to add the text content as well\n adds.push({\n parentId: keyboardPlaceHolder.result.id,\n nextId: null,\n node: {\n type: NodeType.Text,\n id: globalIdSequence.next().value,\n textContent: 'keyboard',\n },\n })\n } else {\n captureMessage('Failed to create keyboard placeholder', { extra: { mobileCustomEvent } })\n }\n } else {\n removes.push({\n parentId: KEYBOARD_PARENT_ID,\n id: KEYBOARD_ID,\n })\n }\n const mutation: mutationData = { adds, attributes: [], removes, source: IncrementalSource.Mutation, texts: [] }\n return {\n type: EventType.IncrementalSnapshot,\n data: mutation,\n timestamp: mobileCustomEvent.timestamp,\n }\n }\n return mobileCustomEvent\n}\n\nexport const makeMetaEvent = (\n mobileMetaEvent: MobileMetaEvent & {\n timestamp: number\n }\n): metaEvent & {\n timestamp: number\n delay?: number\n} => ({\n type: EventType.Meta,\n data: {\n href: mobileMetaEvent.data.href || '', // the replay doesn't use the href, so we safely ignore any absence\n // mostly we need width and height in order to size the viewport\n width: mobileMetaEvent.data.width,\n height: mobileMetaEvent.data.height,\n },\n timestamp: mobileMetaEvent.timestamp,\n})\n\nexport function makeDivElement(\n wireframe: wireframeDiv,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const _id = _isPositiveInteger(wireframe.id) ? wireframe.id : context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: asStyleString([makeStylesString(wireframe), 'overflow:hidden', 'white-space:nowrap']),\n 'data-rrweb-id': _id,\n },\n id: _id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction makeTextElement(\n wireframe: wireframeText,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (wireframe.type !== 'text') {\n console.error('Passed incorrect wireframe type to makeTextElement')\n return null\n }\n\n // because we might have to style the text, we always wrap it in a div\n // and apply styles to that\n const id = context.idSequence.next().value\n\n const childNodes = [...children]\n if (!_isNullish(wireframe.text)) {\n childNodes.unshift({\n type: NodeType.Text,\n textContent: wireframe.text,\n // since the text node is wrapped, we assign it a synthetic id\n id,\n })\n }\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: asStyleString([makeStylesString(wireframe), 'overflow:hidden', 'white-space:normal']),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes,\n },\n context,\n }\n}\n\nfunction makeWebViewElement(\n wireframe: wireframe,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const labelledWireframe: wireframePlaceholder = { ...wireframe } as wireframePlaceholder\n if ('url' in wireframe) {\n labelledWireframe.label = wireframe.url\n }\n\n return makePlaceholderElement(labelledWireframe, children, context)\n}\n\nexport function makePlaceholderElement(\n wireframe: wireframe,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const txt = 'label' in wireframe && wireframe.label ? wireframe.label : wireframe.type || 'PLACEHOLDER'\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe, {\n verticalAlign: 'center',\n horizontalAlign: 'center',\n backgroundColor: wireframe.style?.backgroundColor || BACKGROUND,\n color: wireframe.style?.color || FOREGROUND,\n backgroundImage: PLACEHOLDER_SVG_DATA_IMAGE_URL,\n backgroundSize: 'auto',\n backgroundRepeat: 'unset',\n ...context.styleOverride,\n }),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Text,\n // since the text node is wrapped, we assign it a synthetic id\n id: context.idSequence.next().value,\n textContent: txt,\n },\n ...children,\n ],\n },\n context,\n }\n}\n\nexport function dataURIOrPNG(src: string): string {\n // replace all new lines in src\n src = src.replace(/\\r?\\n|\\r/g, '')\n if (!src.startsWith('data:image/')) {\n return 'data:image/png;base64,' + src\n }\n return src\n}\n\nfunction makeImageElement(\n wireframe: wireframeImage | wireframeScreenshot,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (!wireframe.base64) {\n return makePlaceholderElement(wireframe, children, context)\n }\n\n const src = dataURIOrPNG(wireframe.base64)\n return {\n result: {\n type: NodeType.Element,\n tagName: 'img',\n attributes: {\n src: src,\n width: wireframe.width,\n height: wireframe.height,\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction inputAttributes(wireframe: T): attributes {\n const attributes = {\n style: makeStylesString(wireframe),\n type: wireframe.inputType,\n ...(wireframe.disabled ? { disabled: wireframe.disabled } : {}),\n 'data-rrweb-id': wireframe.id,\n }\n\n switch (wireframe.inputType) {\n case 'checkbox':\n return {\n ...attributes,\n style: null, // checkboxes are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n }\n case 'toggle':\n return {\n ...attributes,\n style: null, // toggle are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n }\n case 'radio':\n return {\n ...attributes,\n style: null, // radio buttons are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n // radio value defaults to the string \"on\" if not specified\n // we're not really submitting the form, so it doesn't matter 🤞\n // radio name is used to correctly uncheck values when one is checked\n // mobile doesn't really have it, and we will be checking based on snapshots,\n // so we can ignore it for now\n }\n case 'button':\n return {\n ...attributes,\n }\n case 'text_area':\n return {\n ...attributes,\n value: wireframe.value || '',\n }\n case 'progress':\n return {\n ...attributes,\n // indeterminate when omitted\n value: wireframe.value || null,\n // defaults to 1 when omitted\n max: wireframe.max || null,\n type: null, // progress has no type attribute\n }\n default:\n return {\n ...attributes,\n value: wireframe.value || '',\n }\n }\n}\n\nfunction makeButtonElement(\n wireframe: wireframeButton,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const buttonText: textNode | null = wireframe.value\n ? {\n type: NodeType.Text,\n textContent: wireframe.value,\n }\n : null\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'button',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: buttonText ? [{ ...buttonText, id: context.idSequence.next().value }, ...children] : children,\n },\n context,\n }\n}\n\nfunction makeSelectOptionElement(\n option: string,\n selected: boolean,\n context: ConversionContext\n): ConversionResult {\n const optionId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'option',\n attributes: {\n ...(selected ? { selected: selected } : {}),\n 'data-rrweb-id': optionId,\n },\n id: optionId,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: option,\n id: context.idSequence.next().value,\n },\n ],\n },\n context,\n }\n}\n\nfunction makeSelectElement(\n wireframe: wireframeSelect,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const selectOptions: serializedNodeWithId[] = []\n if (wireframe.options) {\n let optionContext = context\n for (let i = 0; i < wireframe.options.length; i++) {\n const option = wireframe.options[i]\n const conversion = makeSelectOptionElement(option, wireframe.value === option, optionContext)\n selectOptions.push(conversion.result)\n optionContext = conversion.context\n }\n }\n return {\n result: {\n type: NodeType.Element,\n tagName: 'select',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: [...selectOptions, ...children],\n },\n context,\n }\n}\n\nfunction groupRadioButtons(children: serializedNodeWithId[], radioGroupName: string): serializedNodeWithId[] {\n return children.map((child) => {\n if (child.type === NodeType.Element && child.tagName === 'input' && child.attributes.type === 'radio') {\n return {\n ...child,\n attributes: {\n ...child.attributes,\n name: radioGroupName,\n 'data-rrweb-id': child.id,\n },\n }\n }\n return child\n })\n}\n\nfunction makeRadioGroupElement(\n wireframe: wireframeRadioGroup,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const radioGroupName = 'radio_group_' + wireframe.id\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: groupRadioButtons(children, radioGroupName),\n },\n context,\n }\n}\n\nfunction makeStar(title: string, path: string, context: ConversionContext): serializedNodeWithId {\n const svgId = context.idSequence.next().value\n const titleId = context.idSequence.next().value\n const pathId = context.idSequence.next().value\n return {\n type: NodeType.Element,\n tagName: 'svg',\n isSVG: true,\n attributes: {\n style: asStyleString(['height: 100%', 'overflow-clip-margin: content-box', 'overflow:hidden']),\n viewBox: '0 0 24 24',\n fill: 'currentColor',\n 'data-rrweb-id': svgId,\n },\n id: svgId,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'title',\n isSVG: true,\n attributes: {\n 'data-rrweb-id': titleId,\n },\n id: titleId,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: title,\n id: context.idSequence.next().value,\n },\n ],\n },\n {\n type: NodeType.Element,\n tagName: 'path',\n isSVG: true,\n attributes: {\n d: path,\n 'data-rrweb-id': pathId,\n },\n id: pathId,\n childNodes: [],\n },\n ],\n }\n}\n\nfunction filledStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'filled star',\n 'M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z',\n context\n )\n}\n\nfunction halfStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'half-filled star',\n 'M12,15.4V6.1L13.71,10.13L18.09,10.5L14.77,13.39L15.76,17.67M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z',\n context\n )\n}\n\nfunction emptyStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'empty star',\n 'M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z',\n context\n )\n}\n\nfunction makeRatingBar(\n wireframe: wireframeProgress,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n // max is the number of stars... and value is the number of stars to fill\n\n // deliberate double equals, because we want to allow null and undefined\n if (wireframe.value == null || wireframe.max == null) {\n return makePlaceholderElement(wireframe, children, context)\n }\n\n const numberOfFilledStars = Math.floor(wireframe.value)\n const numberOfHalfStars = wireframe.value - numberOfFilledStars > 0 ? 1 : 0\n const numberOfEmptyStars = wireframe.max - numberOfFilledStars - numberOfHalfStars\n\n const filledStars = Array(numberOfFilledStars)\n .fill(undefined)\n .map(() => filledStar(context))\n const halfStars = Array(numberOfHalfStars)\n .fill(undefined)\n .map(() => halfStar(context))\n const emptyStars = Array(numberOfEmptyStars)\n .fill(undefined)\n .map(() => emptyStar(context))\n\n const ratingBarId = context.idSequence.next().value\n const ratingBar = {\n type: NodeType.Element,\n tagName: 'div',\n id: ratingBarId,\n attributes: {\n style: asStyleString([\n makeColorStyles(wireframe),\n 'position: relative',\n 'display: flex',\n 'flex-direction: row',\n 'padding: 2px 4px',\n ]),\n 'data-rrweb-id': ratingBarId,\n },\n childNodes: [...filledStars, ...halfStars, ...emptyStars],\n } as serializedNodeWithId\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [ratingBar, ...children],\n },\n context,\n }\n}\n\nfunction makeProgressElement(\n wireframe: wireframeProgress,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (wireframe.style?.bar === 'circular') {\n // value needs to be expressed as a number between 0 and 100\n const max = wireframe.max || 1\n let value = wireframe.value || null\n if (_isPositiveInteger(value) && value <= max) {\n value = (value / max) * 100\n } else {\n value = null\n }\n\n const styleOverride = {\n color: wireframe.style?.color || FOREGROUND,\n backgroundColor: wireframe.style?.backgroundColor || BACKGROUND,\n }\n\n // if not _isPositiveInteger(value) then we render a spinner,\n // so we need to add a style element with the spin keyframe\n const stylingChildren: serializedNodeWithId[] = _isPositiveInteger(value)\n ? []\n : [\n {\n type: NodeType.Element,\n tagName: 'style',\n attributes: {\n type: 'text/css',\n },\n id: context.idSequence.next().value,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: `@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }`,\n id: context.idSequence.next().value,\n },\n ],\n },\n ]\n\n const wrappingDivId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeMinimalStyles(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // with no provided value we render a spinner\n style: _isPositiveInteger(value)\n ? makeDeterminateProgressStyles(wireframe, styleOverride)\n : makeIndeterminateProgressStyles(wireframe, styleOverride),\n 'data-rrweb-id': wrappingDivId,\n },\n id: wrappingDivId,\n childNodes: stylingChildren,\n },\n ...children,\n ],\n },\n context,\n }\n } else if (wireframe.style?.bar === 'rating') {\n return makeRatingBar(wireframe, children, context)\n }\n return {\n result: {\n type: NodeType.Element,\n tagName: 'progress',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction makeToggleParts(wireframe: wireframeToggle, context: ConversionContext): serializedNodeWithId[] {\n const togglePosition = wireframe.checked ? 'right' : 'left'\n const defaultColor = wireframe.checked ? '#1d4aff' : BACKGROUND\n const sliderPartId = context.idSequence.next().value\n const handlePartId = context.idSequence.next().value\n return [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-toggle-part': 'slider',\n style: asStyleString([\n 'position:absolute',\n 'top:33%',\n 'left:5%',\n 'display:inline-block',\n 'width:75%',\n 'height:33%',\n 'opacity: 0.2',\n 'border-radius:7.5%',\n `background-color:${wireframe.style?.color || defaultColor}`,\n ]),\n 'data-rrweb-id': sliderPartId,\n },\n id: sliderPartId,\n childNodes: [],\n },\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-toggle-part': 'handle',\n style: asStyleString([\n 'position:absolute',\n 'top:1.5%',\n `${togglePosition}:5%`,\n 'display:flex',\n 'align-items:center',\n 'justify-content:center',\n 'width:40%',\n 'height:75%',\n 'cursor:inherit',\n 'border-radius:50%',\n `background-color:${wireframe.style?.color || defaultColor}`,\n `border:2px solid ${wireframe.style?.borderColor || wireframe.style?.color || defaultColor}`,\n ]),\n 'data-rrweb-id': handlePartId,\n },\n id: handlePartId,\n childNodes: [],\n },\n ]\n}\n\nfunction makeToggleElement(\n wireframe: wireframeToggle,\n context: ConversionContext\n): ConversionResult<\n elementNode & {\n id: number\n }\n> | null {\n const isLabelled = 'label' in wireframe\n const wrappingDivId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // if labelled take up available space, otherwise use provided positioning\n style: isLabelled ? asStyleString(['height:100%', 'flex:1']) : makePositionStyles(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // relative position, fills parent\n style: asStyleString(['position:relative', 'width:100%', 'height:100%']),\n 'data-rrweb-id': wrappingDivId,\n },\n id: wrappingDivId,\n childNodes: makeToggleParts(wireframe, context),\n },\n ],\n },\n context,\n }\n}\n\nfunction makeLabelledInput(\n wireframe: wireframeCheckBox | wireframeRadio | wireframeToggle,\n theInputElement: serializedNodeWithId,\n context: ConversionContext\n): ConversionResult {\n const theLabel: serializedNodeWithId = {\n type: NodeType.Text,\n textContent: wireframe.label || '',\n id: context.idSequence.next().value,\n }\n\n const orderedChildren = wireframe.inputType === 'toggle' ? [theLabel, theInputElement] : [theInputElement, theLabel]\n\n const labelId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'label',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': labelId,\n },\n id: labelId,\n childNodes: orderedChildren,\n },\n context,\n }\n}\n\nfunction makeInputElement(\n wireframe: wireframeInputComponent,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (!wireframe.inputType) {\n return null\n }\n\n if (wireframe.inputType === 'button') {\n return makeButtonElement(wireframe, children, context)\n }\n\n if (wireframe.inputType === 'select') {\n return makeSelectElement(wireframe, children, context)\n }\n\n if (wireframe.inputType === 'progress') {\n return makeProgressElement(wireframe, children, context)\n }\n\n const theInputElement: ConversionResult | null =\n wireframe.inputType === 'toggle'\n ? makeToggleElement(wireframe, context)\n : {\n result: {\n type: NodeType.Element,\n tagName: 'input',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n\n if (!theInputElement) {\n return null\n }\n\n if ('label' in wireframe) {\n return makeLabelledInput(wireframe, theInputElement.result, theInputElement.context)\n }\n // when labelled no styles are needed, when un-labelled as here - we add the styling in.\n ;(theInputElement.result as elementNode).attributes.style = makeStylesString(wireframe)\n return theInputElement\n}\n\nfunction makeRectangleElement(\n wireframe: wireframeRectangle,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction chooseConverter(\n wireframe: T\n): (\n wireframe: T,\n children: serializedNodeWithId[],\n context: ConversionContext\n) => ConversionResult | null {\n // in theory type is always present\n // but since this is coming over the wire we can't really be sure,\n // and so we default to div\n const converterType: MobileNodeType = wireframe.type || 'div'\n const converterMapping: Record<\n MobileNodeType,\n (wireframe: T, children: serializedNodeWithId[]) => ConversionResult | null\n > = {\n // KLUDGE: TS can't tell that the wireframe type of each function is safe based on the converter type\n text: makeTextElement as any,\n image: makeImageElement as any,\n rectangle: makeRectangleElement as any,\n div: makeDivElement as any,\n input: makeInputElement as any,\n radio_group: makeRadioGroupElement as any,\n web_view: makeWebViewElement as any,\n placeholder: makePlaceholderElement as any,\n status_bar: makeStatusBar as any,\n navigation_bar: makeNavigationBar as any,\n screenshot: makeImageElement as any,\n }\n return converterMapping[converterType]\n}\n\nfunction convertWireframe(\n wireframe: wireframe,\n context: ConversionContext\n): ConversionResult | null {\n const children = convertWireframesFor(wireframe.childWireframes, context)\n const converted = chooseConverter(wireframe)?.(wireframe, children.result, children.context)\n return converted || null\n}\n\nfunction convertWireframesFor(\n wireframes: wireframe[] | undefined,\n context: ConversionContext\n): ConversionResult {\n if (!wireframes) {\n return { result: [], context }\n }\n\n const result: serializedNodeWithId[] = []\n for (const wireframe of wireframes) {\n const converted = convertWireframe(wireframe, context)\n if (converted) {\n result.push(converted.result)\n context = converted.context\n }\n }\n return { result, context }\n}\n\nfunction isMobileIncrementalSnapshotEvent(x: unknown): x is MobileIncrementalSnapshotEvent {\n const isIncrementalSnapshot = isObject(x) && 'type' in x && x.type === EventType.IncrementalSnapshot\n if (!isIncrementalSnapshot) {\n return false\n }\n const hasData = isObject(x) && 'data' in x\n const data = hasData ? x.data : null\n\n const hasMutationSource = isObject(data) && 'source' in data && data.source === IncrementalSource.Mutation\n\n const adds = isObject(data) && 'adds' in data && Array.isArray(data.adds) ? data.adds : null\n const updates = isObject(data) && 'updates' in data && Array.isArray(data.updates) ? data.updates : null\n\n const hasUpdatedWireframe = !!updates && updates.length > 0 && isObject(updates[0]) && 'wireframe' in updates[0]\n const hasAddedWireframe = !!adds && adds.length > 0 && isObject(adds[0]) && 'wireframe' in adds[0]\n\n return hasMutationSource && (hasAddedWireframe || hasUpdatedWireframe)\n}\n\nfunction chooseParentId(nodeType: MobileNodeType, providedParentId: number): number {\n return nodeType === 'screenshot' ? BODY_ID : providedParentId\n}\n\nfunction makeIncrementalAdd(add: MobileNodeMutation, context: ConversionContext): addedNodeMutation[] | null {\n const converted = convertWireframe(add.wireframe, context)\n\n if (!converted) {\n return null\n }\n\n const addition: addedNodeMutation = {\n parentId: chooseParentId(add.wireframe.type, add.parentId),\n nextId: null,\n node: converted.result,\n }\n const adds: addedNodeMutation[] = []\n if (addition) {\n const flattened = flattenMutationAdds(addition)\n flattened.forEach((x) => adds.push(x))\n return adds\n }\n return null\n}\n\n/**\n * When processing an update we remove the entire item, and then add it back in.\n */\nfunction makeIncrementalRemoveForUpdate(update: MobileNodeMutation): removedNodeMutation {\n return {\n parentId: chooseParentId(update.wireframe.type, update.parentId),\n id: update.wireframe.id,\n }\n}\n\nfunction isNode(x: unknown): x is serializedNodeWithId {\n // KLUDGE: really we should check that x.type is valid, but we're safe enough already\n return isObject(x) && 'type' in x && 'id' in x\n}\n\nfunction isNodeWithChildren(x: unknown): x is elementNode | documentNode {\n return isNode(x) && 'childNodes' in x && Array.isArray(x.childNodes)\n}\n\n/**\n * when creating incremental adds we have to flatten the node tree structure\n * there's no point, then keeping those child nodes in place\n */\nfunction cloneWithoutChildren(converted: addedNodeMutation): addedNodeMutation {\n const cloned = { ...converted }\n const clonedNode: serializedNodeWithId = { ...converted.node }\n if (isNodeWithChildren(clonedNode)) {\n clonedNode.childNodes = []\n }\n cloned.node = clonedNode\n return cloned\n}\n\nfunction flattenMutationAdds(converted: addedNodeMutation): addedNodeMutation[] {\n const flattened: addedNodeMutation[] = []\n\n flattened.push(cloneWithoutChildren(converted))\n\n const node: unknown = converted.node\n const newParentId = converted.node.id\n if (isNodeWithChildren(node)) {\n node.childNodes.forEach((child) => {\n flattened.push(\n cloneWithoutChildren({\n parentId: newParentId,\n nextId: null,\n node: child,\n })\n )\n if (isNodeWithChildren(child)) {\n flattened.push(...flattenMutationAdds({ parentId: newParentId, nextId: null, node: child }))\n }\n })\n }\n return flattened\n}\n\n/**\n * each update wireframe carries the entire tree because we don't want to diff on the client\n * that means that we might create multiple mutations for the same node\n * we only want to add it once, so we dedupe the mutations\n * the app guarantees that for a given ID that is present more than once in a single snapshot\n * every instance of that ID is identical\n * it might change in the next snapshot but for a single incremental snapshot there is one\n * and only one version of any given ID\n */\nfunction dedupeMutations(mutations: T[]): T[] {\n // KLUDGE: it's slightly yucky to stringify everything but since synthetic nodes\n // introduce a new id, we can't just compare the id\n const seen = new Set()\n\n // in case later mutations are the ones we want to keep, we reverse the array\n // this does help with the deduping, so, it's likely that the view for a single ID\n // is not consistent over a snapshot, but it's cheap to reverse so :YOLO:\n return mutations\n .reverse()\n .filter((mutation: addedNodeMutation | removedNodeMutation) => {\n let toCompare: string\n if (isRemovedNodeMutation(mutation)) {\n toCompare = JSON.stringify(mutation)\n } else {\n // if this is a synthetic addition, then we need to ignore the id,\n // since duplicates won't have duplicate ids\n toCompare = JSON.stringify({\n ...mutation.node,\n id: 0,\n })\n }\n\n if (seen.has(toCompare)) {\n return false\n }\n seen.add(toCompare)\n return true\n })\n .reverse()\n}\n\n/**\n * We want to ensure that any events don't use id = 0.\n * They must always represent a valid ID from the dom, so we swap in the body id when the id = 0.\n *\n * For \"removes\", we don't need to do anything, the id of the element to be removed remains valid. We won't try and remove other elements that we added during transformation in order to show that element.\n *\n * \"adds\" are converted from wireframes to nodes and converted to `incrementalSnapshotEvent.adds`\n *\n * \"updates\" are converted to a remove and an add.\n *\n */\nexport const makeIncrementalEvent = (\n mobileEvent: (MobileIncrementalSnapshotEvent | incrementalSnapshotEvent) & {\n timestamp: number\n delay?: number\n }\n): incrementalSnapshotEvent & {\n timestamp: number\n delay?: number\n} => {\n const converted = mobileEvent as unknown as incrementalSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n if ('id' in converted.data && converted.data.id === 0) {\n converted.data.id = BODY_ID\n }\n\n if (isMobileIncrementalSnapshotEvent(mobileEvent)) {\n const adds: addedNodeMutation[] = []\n const removes: removedNodeMutation[] = mobileEvent.data.removes || []\n if ('adds' in mobileEvent.data && Array.isArray(mobileEvent.data.adds)) {\n const addsContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n\n mobileEvent.data.adds.forEach((add) => {\n makeIncrementalAdd(add, addsContext)?.forEach((x) => adds.push(x))\n })\n }\n if ('updates' in mobileEvent.data && Array.isArray(mobileEvent.data.updates)) {\n const updatesContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n const updateAdditions: addedNodeMutation[] = []\n mobileEvent.data.updates.forEach((update) => {\n const removal = makeIncrementalRemoveForUpdate(update)\n if (removal) {\n removes.push(removal)\n }\n makeIncrementalAdd(update, updatesContext)?.forEach((x) => updateAdditions.push(x))\n })\n dedupeMutations(updateAdditions).forEach((x) => adds.push(x))\n }\n\n converted.data = {\n source: IncrementalSource.Mutation,\n attributes: [],\n texts: [],\n adds: dedupeMutations(adds),\n // TODO: this assumes that removes are processed before adds 🤞\n removes: dedupeMutations(removes),\n }\n }\n\n return converted\n}\n\nfunction makeKeyboardParent(): serializedNodeWithId {\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-render-reason': 'a fixed placeholder to contain the keyboard in the correct stacking position',\n 'data-rrweb-id': KEYBOARD_PARENT_ID,\n },\n id: KEYBOARD_PARENT_ID,\n childNodes: [],\n }\n}\n\nfunction makeStatusBarNode(\n statusBar: wireframeStatusBar | undefined,\n context: ConversionContext\n): serializedNodeWithId {\n const childNodes = statusBar ? convertWireframesFor([statusBar], context).result : []\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-rrweb-id': STATUS_BAR_PARENT_ID,\n },\n id: STATUS_BAR_PARENT_ID,\n childNodes,\n }\n}\n\nfunction makeNavBarNode(\n navigationBar: wireframeNavigationBar | undefined,\n context: ConversionContext\n): serializedNodeWithId {\n const childNodes = navigationBar ? convertWireframesFor([navigationBar], context).result : []\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-rrweb-id': NAVIGATION_BAR_PARENT_ID,\n },\n id: NAVIGATION_BAR_PARENT_ID,\n childNodes,\n }\n}\n\nfunction stripBarsFromWireframe(wireframe: wireframe): {\n wireframe: wireframe | undefined\n statusBar: wireframeStatusBar | undefined\n navBar: wireframeNavigationBar | undefined\n} {\n if (wireframe.type === 'status_bar') {\n return { wireframe: undefined, statusBar: wireframe, navBar: undefined }\n } else if (wireframe.type === 'navigation_bar') {\n return { wireframe: undefined, statusBar: undefined, navBar: wireframe }\n }\n let statusBar: wireframeStatusBar | undefined\n let navBar: wireframeNavigationBar | undefined\n const wireframeToReturn: wireframe | undefined = { ...wireframe }\n wireframeToReturn.childWireframes = []\n for (const child of wireframe.childWireframes || []) {\n const {\n wireframe: childWireframe,\n statusBar: childStatusBar,\n navBar: childNavBar,\n } = stripBarsFromWireframe(child)\n statusBar = statusBar || childStatusBar\n navBar = navBar || childNavBar\n if (childWireframe) {\n wireframeToReturn.childWireframes.push(childWireframe)\n }\n }\n return { wireframe: wireframeToReturn, statusBar, navBar }\n}\n\n/**\n * We want to be able to place the status bar and navigation bar in the correct stacking order.\n * So, we lift them out of the tree, and return them separately.\n */\nexport function stripBarsFromWireframes(wireframes: wireframe[]): {\n statusBar: wireframeStatusBar | undefined\n navigationBar: wireframeNavigationBar | undefined\n appNodes: wireframe[]\n} {\n let statusBar: wireframeStatusBar | undefined\n let navigationBar: wireframeNavigationBar | undefined\n const copiedNodes: wireframe[] = []\n\n wireframes.forEach((w) => {\n const matches = stripBarsFromWireframe(w)\n if (matches.statusBar) {\n statusBar = matches.statusBar\n }\n if (matches.navBar) {\n navigationBar = matches.navBar\n }\n if (matches.wireframe) {\n copiedNodes.push(matches.wireframe)\n }\n })\n return { statusBar, navigationBar, appNodes: copiedNodes }\n}\n\nexport const makeFullEvent = (\n mobileEvent: MobileFullSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n): fullSnapshotEvent & {\n timestamp: number\n delay?: number\n} => {\n // we can restart the id sequence on each full snapshot\n globalIdSequence = ids()\n\n if (!('wireframes' in mobileEvent.data)) {\n return mobileEvent as unknown as fullSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n }\n\n const conversionContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n\n const { statusBar, navigationBar, appNodes } = stripBarsFromWireframes(mobileEvent.data.wireframes)\n\n const nodeGroups = {\n appNodes: convertWireframesFor(appNodes, conversionContext).result || [],\n statusBarNode: makeStatusBarNode(statusBar, conversionContext),\n navBarNode: makeNavBarNode(navigationBar, conversionContext),\n }\n\n return {\n type: EventType.FullSnapshot,\n timestamp: mobileEvent.timestamp,\n data: {\n node: {\n type: NodeType.Document,\n childNodes: [\n {\n type: NodeType.DocumentType,\n name: 'html',\n publicId: '',\n systemId: '',\n id: HTML_DOC_TYPE_ID,\n },\n {\n type: NodeType.Element,\n tagName: 'html',\n attributes: { style: makeHTMLStyles(), 'data-rrweb-id': HTML_ELEMENT_ID },\n id: HTML_ELEMENT_ID,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'head',\n attributes: { 'data-rrweb-id': HEAD_ID },\n id: HEAD_ID,\n childNodes: [makeCSSReset(conversionContext)],\n },\n {\n type: NodeType.Element,\n tagName: 'body',\n attributes: { style: makeBodyStyles(), 'data-rrweb-id': BODY_ID },\n id: BODY_ID,\n childNodes: [\n // in the order they should stack if they ever clash\n // lower is higher in the stacking context\n ...nodeGroups.appNodes,\n makeKeyboardParent(),\n nodeGroups.navBarNode,\n nodeGroups.statusBarNode,\n ],\n },\n ],\n },\n ],\n id: DOCUMENT_ID,\n },\n initialOffset: {\n top: 0,\n left: 0,\n },\n },\n }\n}\n\nfunction makeCSSReset(context: ConversionContext): serializedNodeWithId {\n // we need to normalize CSS so browsers don't do unexpected things\n return {\n type: NodeType.Element,\n tagName: 'style',\n attributes: {\n type: 'text/css',\n },\n id: context.idSequence.next().value,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: `\n body {\n margin: unset;\n }\n input, button, select, textarea {\n font: inherit;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n padding-block: 0 !important;\n }\n .input:focus {\n outline: none;\n }\n img {\n border-style: none;\n }\n `,\n id: context.idSequence.next().value,\n },\n ],\n }\n}\n","import posthogEE from '@posthog/ee/exports'\nimport { customEvent, EventType, eventWithTime, fullSnapshotEvent, IncrementalSource } from '@rrweb/types'\nimport { captureException } from '@sentry/react'\nimport { gunzipSync, strFromU8, strToU8 } from 'fflate'\nimport {\n actions,\n afterMount,\n beforeUnmount,\n connect,\n defaults,\n kea,\n key,\n listeners,\n path,\n props,\n reducers,\n selectors,\n} from 'kea'\nimport { loaders } from 'kea-loaders'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { Dayjs, dayjs } from 'lib/dayjs'\nimport { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic'\nimport { isObject } from 'lib/utils'\nimport { chainToElements } from 'lib/utils/elements-chain'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport posthog from 'posthog-js'\nimport { compressedEventWithTime } from 'posthog-js/lib/src/extensions/replay/sessionrecording'\nimport { RecordingComment } from 'scenes/session-recordings/player/inspector/playerInspectorLogic'\nimport { teamLogic } from 'scenes/teamLogic'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport {\n AnyPropertyFilter,\n EncodedRecordingSnapshot,\n PersonType,\n PropertyFilterType,\n PropertyOperator,\n RecordingEventsFilters,\n RecordingEventType,\n RecordingReportLoadTimes,\n RecordingSegment,\n RecordingSnapshot,\n SessionPlayerData,\n SessionRecordingId,\n SessionRecordingSnapshotParams,\n SessionRecordingSnapshotSource,\n SessionRecordingSnapshotSourceResponse,\n SessionRecordingType,\n SessionRecordingUsageType,\n SnapshotSourceType,\n} from '~/types'\n\nimport { PostHogEE } from '../../../../@posthog/ee/types'\nimport { ExportedSessionRecordingFileV2 } from '../file-playback/types'\nimport type { sessionRecordingDataLogicType } from './sessionRecordingDataLogicType'\nimport { createSegments, mapSnapshotsToWindowId } from './utils/segmenter'\n\nconst IS_TEST_MODE = process.env.NODE_ENV === 'test'\nconst BUFFER_MS = 60000 // +- before and after start and end of a recording to query for.\nconst DEFAULT_REALTIME_POLLING_MILLIS = 3000\n\nlet postHogEEModule: PostHogEE\n\nfunction isRecordingSnapshot(x: unknown): x is RecordingSnapshot {\n return typeof x === 'object' && x !== null && 'type' in x && 'timestamp' in x\n}\n\n/*\n there was a bug in mobile SDK that didn't consistently send a meta event with a full snapshot.\n rrweb player hides itself until it has seen the meta event 🤷\n but we can patch a meta event into the recording data to make it work\n*/\nfunction patchMetaEventIntoMobileData(parsedLines: RecordingSnapshot[]): RecordingSnapshot[] {\n let fullSnapshotIndex: number = -1\n let metaIndex: number = -1\n try {\n fullSnapshotIndex = parsedLines.findIndex((l) => l.type === EventType.FullSnapshot)\n metaIndex = parsedLines.findIndex((l) => l.type === EventType.Meta)\n\n // then we need to patch the meta event into the snapshot data\n if (fullSnapshotIndex > -1 && metaIndex === -1) {\n const fullSnapshot = parsedLines[fullSnapshotIndex] as RecordingSnapshot & fullSnapshotEvent & eventWithTime\n // a full snapshot (particularly from the mobile transformer) has a relatively fixed structure,\n // but the types exposed by rrweb don't quite cover what we need , so...\n const mainNode = fullSnapshot.data.node as any\n const targetNode = mainNode.childNodes[1].childNodes[1].childNodes[0]\n const { width, height } = targetNode.attributes\n const metaEvent: RecordingSnapshot = {\n windowId: fullSnapshot.windowId,\n type: EventType.Meta,\n timestamp: fullSnapshot.timestamp,\n data: {\n href: getHrefFromSnapshot(fullSnapshot) || '',\n width,\n height,\n },\n }\n parsedLines.splice(fullSnapshotIndex, 0, metaEvent)\n }\n } catch (e) {\n captureException(e, {\n tags: { feature: 'session-recording-missing-meta-patching' },\n extra: { fullSnapshotIndex, metaIndex },\n })\n }\n\n return parsedLines\n}\n\nfunction hasAnyWireframes(snapshotData: Record[]): boolean {\n return snapshotData.some((d) => {\n return isObject(d.data) && 'wireframes' in d.data\n })\n}\n\nfunction isCompressedEvent(ev: unknown): ev is compressedEventWithTime {\n return typeof ev === 'object' && ev !== null && 'cv' in ev\n}\n\nfunction unzip(compressedStr: string): any {\n return JSON.parse(strFromU8(gunzipSync(strToU8(compressedStr, true))))\n}\n\n/**\n *\n * takes an event that might be from web, might be from mobile,\n * and might be partially compressed,\n * and decompresses it when possible\n *\n * you can't return a union of `KnownType | unknown`\n * so even though this returns `eventWithTime | unknown`\n * it has to be typed as only unknown\n */\nfunction decompressEvent(ev: unknown): unknown {\n try {\n if (isCompressedEvent(ev)) {\n if (ev.cv === '2024-10') {\n if (ev.type === EventType.FullSnapshot) {\n return {\n ...ev,\n data: unzip(ev.data),\n }\n } else if (ev.type === EventType.IncrementalSnapshot) {\n if (ev.data.source === IncrementalSource.StyleSheetRule) {\n return {\n ...ev,\n data: {\n ...ev.data,\n source: IncrementalSource.StyleSheetRule,\n adds: unzip(ev.data.adds),\n removes: unzip(ev.data.removes),\n },\n }\n } else if (ev.data.source === IncrementalSource.Mutation) {\n return {\n ...ev,\n data: {\n ...ev.data,\n source: IncrementalSource.Mutation,\n adds: unzip(ev.data.adds),\n removes: unzip(ev.data.removes),\n texts: unzip(ev.data.texts),\n attributes: unzip(ev.data.attributes),\n },\n }\n }\n }\n } else {\n posthog.captureException(new Error('Unknown compressed event version'), {\n feature: 'session-recording-compressed-event-decompression',\n compressedEvent: ev,\n compressionVersion: ev.cv,\n })\n // probably unplayable but we don't know how to decompress it\n return ev\n }\n }\n return ev\n } catch (e) {\n posthog.captureException((e as Error) || new Error('Could not decompress event'), {\n feature: 'session-recording-compressed-event-decompression',\n compressedEvent: ev,\n })\n return ev\n }\n}\n\n/**\n * We can receive data in one of multiple formats, so we treat it as unknown\n * And if we can't process it force it into eventWithTime\n *\n * If it can't be case as eventWithTime by this point then it's probably not a valid event anyway\n */\nfunction coerceToEventWithTime(d: unknown, withMobileTransformer: boolean): eventWithTime {\n // we decompress first so that we could support partial compression on mobile in future\n const currentEvent = decompressEvent(d)\n return withMobileTransformer\n ? postHogEEModule?.mobileReplay?.transformEventToWeb(currentEvent) || (currentEvent as eventWithTime)\n : (currentEvent as eventWithTime)\n}\n\nexport const parseEncodedSnapshots = async (\n items: (RecordingSnapshot | EncodedRecordingSnapshot | string)[],\n sessionId: string,\n // this is only kept so that we can export the untransformed data for debugging\n withMobileTransformer: boolean = true\n): Promise => {\n if (!postHogEEModule) {\n postHogEEModule = await posthogEE()\n }\n\n const lineCount = items.length\n const unparseableLines: string[] = []\n let isMobileSnapshots = false\n\n const parsedLines: RecordingSnapshot[] = items.flatMap((l) => {\n if (!l) {\n // blob files have an empty line at the end\n return []\n }\n try {\n let snapshotLine: { windowId: string } | EncodedRecordingSnapshot\n if (typeof l === 'string') {\n // is loaded from blob or realtime storage\n snapshotLine = JSON.parse(l) as EncodedRecordingSnapshot\n } else {\n // is loaded from file export\n snapshotLine = l\n }\n let snapshotData: ({ windowId: string } | EncodedRecordingSnapshot)[]\n if (isRecordingSnapshot(snapshotLine)) {\n // is loaded from file export\n snapshotData = [snapshotLine]\n } else {\n // is loaded from blob or realtime storage\n snapshotData = snapshotLine['data']\n }\n\n if (!isMobileSnapshots) {\n isMobileSnapshots = hasAnyWireframes(snapshotData)\n }\n\n return snapshotData.map((d: unknown) => {\n const snap = coerceToEventWithTime(d, withMobileTransformer)\n\n return {\n // this handles parsing data that was loaded from blob storage \"window_id\"\n // and data that was exported from the front-end \"windowId\"\n // we have more than one format of data that we store/pass around\n // but only one that we play back\n windowId: snapshotLine['window_id'] || snapshotLine['windowId'],\n ...snap,\n }\n })\n } catch (e) {\n if (typeof l === 'string') {\n unparseableLines.push(l)\n }\n return []\n }\n })\n\n if (unparseableLines.length) {\n const extra = {\n playbackSessionId: sessionId,\n totalLineCount: lineCount,\n unparseableLinesCount: unparseableLines.length,\n exampleLines: unparseableLines.slice(0, 3),\n }\n posthog.capture('session recording had unparseable lines', {\n ...extra,\n feature: 'session-recording-snapshot-processing',\n })\n }\n\n return isMobileSnapshots ? patchMetaEventIntoMobileData(parsedLines) : parsedLines\n}\n\nconst getHrefFromSnapshot = (snapshot: unknown): string | undefined => {\n return isObject(snapshot) && 'data' in snapshot\n ? (snapshot.data as any)?.href || (snapshot.data as any)?.payload?.href\n : undefined\n}\n\n/*\n cyrb53 (c) 2018 bryc (github.com/bryc)\n License: Public domain. Attribution appreciated.\n A fast and simple 53-bit string hash function with decent collision resistance.\n Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity.\n*/\nconst cyrb53 = function (str: string, seed = 0): number {\n let h1 = 0xdeadbeef ^ seed,\n h2 = 0x41c6ce57 ^ seed\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i)\n h1 = Math.imul(h1 ^ ch, 2654435761)\n h2 = Math.imul(h2 ^ ch, 1597334677)\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507)\n h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909)\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507)\n h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909)\n return 4294967296 * (2097151 & h2) + (h1 >>> 0)\n}\n\nexport const deduplicateSnapshots = (snapshots: RecordingSnapshot[] | null): RecordingSnapshot[] => {\n const seenHashes: Set = new Set()\n\n return (snapshots ?? [])\n .filter((snapshot) => {\n // For a multitude of reasons, there can be duplicate snapshots in the same recording.\n // we have to stringify the snapshot to compare it to other snapshots.\n // so we can filter by storing them all in a set\n\n // we can see duplicates that only differ by delay - these still count as duplicates\n // even though the delay would hide that\n const { delay: _delay, ...delayFreeSnapshot } = snapshot\n // we check each item multiple times as new snapshots come in\n // so store the computer value on the object to save recalculating it so much\n const key = (snapshot as any).seen || cyrb53(JSON.stringify(delayFreeSnapshot))\n ;(snapshot as any).seen = key\n\n if (seenHashes.has(key)) {\n return false\n }\n seenHashes.add(key)\n return true\n })\n .sort((a, b) => a.timestamp - b.timestamp)\n}\n\nconst generateRecordingReportDurations = (cache: Record): RecordingReportLoadTimes => {\n return {\n metadata: cache.metadataLoadDuration || Math.round(performance.now() - cache.metaStartTime),\n snapshots: cache.snapshotsLoadDuration || Math.round(performance.now() - cache.snapshotsStartTime),\n events: cache.eventsLoadDuration || Math.round(performance.now() - cache.eventsStartTime),\n firstPaint: cache.firstPaintDuration,\n }\n}\n\nconst resetTimingsCache = (cache: Record): void => {\n cache.metaStartTime = null\n cache.metadataLoadDuration = null\n cache.snapshotsStartTime = null\n cache.snapshotsLoadDuration = null\n cache.eventsStartTime = null\n cache.eventsLoadDuration = null\n cache.firstPaintDuration = null\n}\n\nexport interface SessionRecordingDataLogicProps {\n sessionRecordingId: SessionRecordingId\n realTimePollingIntervalMilliseconds?: number\n}\n\nfunction makeEventsQuery(\n person: PersonType | null,\n distinctId: string | null,\n start: Dayjs,\n end: Dayjs,\n properties: AnyPropertyFilter[]\n): Promise {\n return api.query({\n kind: NodeKind.EventsQuery,\n // NOTE: Be careful adding fields here. We want to keep the payload as small as possible to load all events quickly\n select: [\n 'uuid',\n 'event',\n 'timestamp',\n 'elements_chain',\n 'properties.$window_id',\n 'properties.$current_url',\n 'properties.$event_type',\n ],\n orderBy: ['timestamp ASC'],\n limit: 1000000,\n personId: person ? String(person.id) : undefined,\n after: start.subtract(BUFFER_MS, 'ms').format(),\n before: end.add(BUFFER_MS, 'ms').format(),\n properties: properties,\n where: distinctId ? [`distinct_id = ('${distinctId}')`] : undefined,\n })\n}\n\nasync function processEncodedResponse(\n encodedResponse: (EncodedRecordingSnapshot | string)[],\n props: SessionRecordingDataLogicProps,\n featureFlags: FeatureFlagsSet\n): Promise<{ transformed: RecordingSnapshot[]; untransformed: RecordingSnapshot[] | null }> {\n let untransformed: RecordingSnapshot[] | null = null\n\n const transformed = await parseEncodedSnapshots(encodedResponse, props.sessionRecordingId)\n\n if (featureFlags[FEATURE_FLAGS.SESSION_REPLAY_EXPORT_MOBILE_DATA]) {\n untransformed = await parseEncodedSnapshots(\n encodedResponse,\n props.sessionRecordingId,\n false // don't transform mobile data\n )\n }\n\n return { transformed, untransformed }\n}\n\nconst getSourceKey = (source: SessionRecordingSnapshotSource): string => {\n // realtime sources vary so blob_key is not always present and is either null or undefined...\n // we only care about key when not realtime\n // and we'll always have a key when not realtime\n return `${source.source}-${source.blob_key || source.source}`\n}\n\nexport const sessionRecordingDataLogic = kea([\n path((key) => ['scenes', 'session-recordings', 'sessionRecordingDataLogic', key]),\n props({} as SessionRecordingDataLogicProps),\n key(({ sessionRecordingId }) => sessionRecordingId || 'no-session-recording-id'),\n connect({\n logic: [eventUsageLogic],\n values: [featureFlagLogic, ['featureFlags'], teamLogic, ['currentTeam']],\n }),\n defaults({\n sessionPlayerMetaData: null as SessionRecordingType | null,\n }),\n actions({\n setFilters: (filters: Partial) => ({ filters }),\n loadRecordingMeta: true,\n loadRecordingComments: true,\n maybeLoadRecordingMeta: true,\n loadSnapshots: true,\n loadSnapshotSources: true,\n loadNextSnapshotSource: true,\n loadSnapshotsForSource: (source: Pick) => ({ source }),\n loadEvents: true,\n loadFullEventData: (event: RecordingEventType | RecordingEventType[]) => ({ event }),\n markViewed: (delay?: number) => ({ delay }),\n reportUsageIfFullyLoaded: true,\n persistRecording: true,\n maybePersistRecording: true,\n pollRealtimeSnapshots: true,\n stopRealtimePolling: true,\n setTrackedWindow: (windowId: string | null) => ({ windowId }),\n setWasMarkedViewed: (wasMarkedViewed: boolean) => ({ wasMarkedViewed }),\n }),\n reducers(() => ({\n trackedWindow: [\n null as string | null,\n {\n setTrackedWindow: (_, { windowId }) => windowId,\n },\n ],\n filters: [\n {} as Partial,\n {\n setFilters: (state, { filters }) => ({ ...state, ...filters }),\n },\n ],\n isRealtimePolling: [\n false as boolean,\n {\n pollRealtimeSnapshots: () => true,\n stopRealtimePolling: () => false,\n },\n ],\n isNotFound: [\n false as boolean,\n {\n loadRecordingMeta: () => false,\n loadRecordingMetaSuccess: () => false,\n loadRecordingMetaFailure: () => true,\n },\n ],\n snapshotsBySource: [\n null as Record | null,\n {\n loadSnapshotsForSourceSuccess: (state, { snapshotsForSource }) => {\n const sourceKey = getSourceKey(snapshotsForSource.source)\n\n return {\n ...state,\n [sourceKey]: snapshotsForSource,\n }\n },\n },\n ],\n wasMarkedViewed: [\n false as boolean,\n {\n setWasMarkedViewed: (_, { wasMarkedViewed }) => wasMarkedViewed,\n },\n ],\n })),\n loaders(({ values, props, cache }) => ({\n sessionComments: {\n loadRecordingComments: async (_, breakpoint) => {\n const empty: RecordingComment[] = []\n if (!props.sessionRecordingId) {\n return empty\n }\n\n const response = await api.notebooks.recordingComments(props.sessionRecordingId)\n breakpoint()\n\n return response.results || empty\n },\n },\n sessionPlayerMetaData: {\n loadRecordingMeta: async (_, breakpoint) => {\n if (!props.sessionRecordingId) {\n return null\n }\n\n cache.metaStartTime = performance.now()\n\n const response = await api.recordings.get(props.sessionRecordingId)\n breakpoint()\n\n return response\n },\n\n persistRecording: async (_, breakpoint) => {\n if (!values.sessionPlayerMetaData) {\n return null\n }\n await breakpoint(100)\n await api.recordings.persist(props.sessionRecordingId)\n\n return {\n ...values.sessionPlayerMetaData,\n storage: 'object_storage_lts',\n }\n },\n },\n snapshotSources: [\n null as SessionRecordingSnapshotSource[] | null,\n {\n loadSnapshotSources: async () => {\n const response = await api.recordings.listSnapshotSources(props.sessionRecordingId)\n return response.sources ?? []\n },\n },\n ],\n snapshotsForSource: [\n null as SessionRecordingSnapshotSourceResponse | null,\n {\n loadSnapshotsForSource: async ({ source }, breakpoint) => {\n let params: SessionRecordingSnapshotParams\n\n if (source.source === SnapshotSourceType.blob) {\n if (!source.blob_key) {\n throw new Error('Missing key')\n }\n params = { blob_key: source.blob_key, source: 'blob' }\n } else if (source.source === SnapshotSourceType.realtime) {\n params = { source: 'realtime', version: '2024-04-30' }\n } else {\n throw new Error(`Unsupported source: ${source.source}`)\n }\n\n const snapshotLoadingStartTime = performance.now()\n\n if (!cache.snapshotsStartTime) {\n cache.snapshotsStartTime = snapshotLoadingStartTime\n }\n\n await breakpoint(1)\n\n const response = await api.recordings.getSnapshots(props.sessionRecordingId, params).catch((e) => {\n if (source.source === 'realtime' && e.status === 404) {\n // Realtime source is not always available so a 404 is expected\n return []\n }\n throw e\n })\n\n const { transformed, untransformed } = await processEncodedResponse(\n response,\n props,\n values.featureFlags\n )\n\n return { snapshots: transformed, untransformed_snapshots: untransformed ?? undefined, source }\n },\n },\n ],\n sessionEventsData: [\n null as null | RecordingEventType[],\n {\n loadEvents: async () => {\n if (!cache.eventsStartTime) {\n cache.eventsStartTime = performance.now()\n }\n\n const { start, end, person } = values.sessionPlayerData\n\n if (!person || !start || !end) {\n return null\n }\n\n const [sessionEvents, relatedEvents]: any[] = await Promise.all([\n // make one query for all events that are part of the session\n makeEventsQuery(null, null, start, end, [\n {\n key: '$session_id',\n value: [props.sessionRecordingId],\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n ]),\n // make a second for all events from that person,\n // not marked as part of the session\n // but in the same time range\n // these are probably e.g. backend events for the session\n // but with no session id\n // since posthog-js must always add session id we can also\n // take advantage of lib being materialized and further filter\n makeEventsQuery(null, values.sessionPlayerMetaData?.distinct_id || null, start, end, [\n {\n key: '$session_id',\n value: '',\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n {\n key: '$lib',\n value: ['web'],\n operator: PropertyOperator.IsNot,\n type: PropertyFilterType.Event,\n },\n ]),\n ])\n\n return [...sessionEvents.results, ...relatedEvents.results].map(\n (event: any): RecordingEventType => {\n const currentUrl = event[5]\n // We use the pathname to simplify the UI - we build it here instead of fetching it to keep data usage small\n let pathname: string | undefined\n try {\n pathname = event[5] ? new URL(event[5]).pathname : undefined\n } catch {\n pathname = undefined\n }\n\n return {\n id: event[0],\n event: event[1],\n timestamp: event[2],\n elements: chainToElements(event[3]),\n properties: {\n $window_id: event[4],\n $current_url: currentUrl,\n $event_type: event[6],\n $pathname: pathname,\n },\n playerTime: +dayjs(event[2]) - +start,\n fullyLoaded: false,\n }\n }\n )\n },\n\n loadFullEventData: async ({ event }) => {\n // box so we're always dealing with a list\n const events = Array.isArray(event) ? event : [event]\n\n let existingEvents = values.sessionEventsData?.filter((x) => events.some((e) => e.id === x.id))\n\n const allEventsAreFullyLoaded =\n existingEvents?.every((e) => e.fullyLoaded) && existingEvents.length === events.length\n if (!existingEvents || allEventsAreFullyLoaded) {\n return values.sessionEventsData\n }\n\n existingEvents = existingEvents.filter((e) => !e.fullyLoaded)\n const timestamps = existingEvents.map((ee) => dayjs(ee.timestamp).utc().valueOf())\n const eventNames = Array.from(new Set(existingEvents.map((ee) => ee.event)))\n const eventIds = existingEvents.map((ee) => ee.id)\n const earliestTimestamp = timestamps.reduce((a, b) => Math.min(a, b))\n const latestTimestamp = timestamps.reduce((a, b) => Math.max(a, b))\n try {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties, uuid\n FROM events\n WHERE timestamp > ${(earliestTimestamp - 1000) / 1000}\n AND timestamp < ${(latestTimestamp + 1000) / 1000}\n AND event in ${eventNames}\n AND uuid in ${eventIds}`,\n }\n const response = await api.query(query)\n if (response.error) {\n throw new Error(response.error)\n }\n\n for (const event of existingEvents) {\n const result = response.results.find((x: any) => {\n return x[1] === event.id\n })\n\n if (result) {\n event.properties = JSON.parse(result[0])\n event.fullyLoaded = true\n }\n }\n } catch (e) {\n // NOTE: This is not ideal but should happen so rarely that it is tolerable.\n existingEvents.forEach((e) => (e.fullyLoaded = true))\n captureException(e, {\n tags: { feature: 'session-recording-load-full-event-data' },\n })\n }\n\n // here we map the events list because we want the result to be a new instance to trigger downstream recalculation\n return !values.sessionEventsData\n ? values.sessionEventsData\n : values.sessionEventsData.map((x) => {\n const event = existingEvents?.find((ee) => ee.id === x.id)\n return event\n ? ({\n ...x,\n properties: event.properties,\n fullyLoaded: event.fullyLoaded,\n } as RecordingEventType)\n : x\n })\n },\n },\n ],\n })),\n listeners(({ values, actions, cache, props }) => ({\n loadSnapshots: () => {\n // This kicks off the loading chain\n if (!values.snapshotSourcesLoading) {\n actions.loadSnapshotSources()\n }\n },\n maybeLoadRecordingMeta: () => {\n if (!values.sessionPlayerMetaDataLoading) {\n actions.loadRecordingMeta()\n }\n if (!values.sessionCommentsLoading) {\n actions.loadRecordingComments()\n }\n },\n loadSnapshotSources: () => {\n // We only load events once we actually start loading the recording\n actions.loadEvents()\n },\n loadRecordingMetaSuccess: () => {\n cache.metadataLoadDuration = Math.round(performance.now() - cache.metaStartTime)\n actions.reportUsageIfFullyLoaded()\n },\n loadRecordingMetaFailure: () => {\n cache.metadataLoadDuration = Math.round(performance.now() - cache.metaStartTime)\n },\n\n loadSnapshotSourcesSuccess: () => {\n // When we receive the list of sources we can kick off the loading chain\n actions.loadNextSnapshotSource()\n },\n\n loadSnapshotsForSourceSuccess: ({ snapshotsForSource }) => {\n const sources = values.snapshotSources\n const snapshots = snapshotsForSource.snapshots\n\n // Cache the last response count to detect if we're getting the same data over and over\n const newSnapshotsCount = snapshots.length\n\n if ((cache.lastSnapshotsCount ?? newSnapshotsCount) === newSnapshotsCount) {\n // if we're getting no results from realtime polling we can increment faster\n // so that we stop polling sooner\n const increment = newSnapshotsCount === 0 ? 2 : 1\n cache.lastSnapshotsUnchangedCount = (cache.lastSnapshotsUnchangedCount ?? 0) + increment\n } else {\n cache.lastSnapshotsUnchangedCount = 0\n }\n cache.lastSnapshotsCount = newSnapshotsCount\n\n if (!snapshots.length && sources?.length === 1) {\n // We got only a single source to load, loaded it successfully, but it had no snapshots.\n posthog.capture('recording_snapshots_v2_empty_response', {\n source: sources[0],\n })\n } else if (!cache.firstPaintDuration) {\n cache.firstPaintDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n }\n if (!values.wasMarkedViewed) {\n actions.markViewed()\n }\n\n actions.loadNextSnapshotSource()\n },\n\n loadNextSnapshotSource: () => {\n const nextSourceToLoad = values.snapshotSources?.find((s) => {\n const sourceKey = getSourceKey(s)\n return !values.snapshotsBySource?.[sourceKey]\n })\n\n if (nextSourceToLoad) {\n return actions.loadSnapshotsForSource(nextSourceToLoad)\n }\n\n // TODO: Move this to a one time check - only report once per recording\n cache.snapshotsLoadDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n actions.reportUsageIfFullyLoaded()\n\n // If we have a realtime source, start polling it\n const realTimeSource = values.snapshotSources?.find((s) => s.source === SnapshotSourceType.realtime)\n if (realTimeSource) {\n actions.pollRealtimeSnapshots()\n }\n },\n loadSnapshotsForSourceFailure: () => {\n cache.snapshotsLoadDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n },\n pollRealtimeSnapshots: () => {\n // always make sure we've cleared up the last timeout\n clearTimeout(cache.realTimePollingTimeoutID)\n cache.realTimePollingTimeoutID = null\n\n // ten is an arbitrary limit to try to avoid sending requests to our backend unnecessarily\n // we could change this or add to it e.g. only poll if browser is visible to user\n if ((cache.lastSnapshotsUnchangedCount ?? 0) <= 10) {\n cache.realTimePollingTimeoutID = setTimeout(() => {\n actions.loadSnapshotsForSource({ source: SnapshotSourceType.realtime })\n }, props.realTimePollingIntervalMilliseconds || DEFAULT_REALTIME_POLLING_MILLIS)\n } else {\n actions.stopRealtimePolling()\n }\n },\n loadEventsSuccess: () => {\n cache.eventsLoadDuration = Math.round(performance.now() - cache.eventsStartTime)\n actions.reportUsageIfFullyLoaded()\n },\n loadEventsFailure: () => {\n cache.eventsLoadDuration = Math.round(performance.now() - cache.eventsStartTime)\n },\n reportUsageIfFullyLoaded: (_, breakpoint) => {\n breakpoint()\n if (values.fullyLoaded) {\n eventUsageLogic.actions.reportRecording(\n values.sessionPlayerData,\n generateRecordingReportDurations(cache),\n SessionRecordingUsageType.LOADED,\n values.sessionPlayerMetaData,\n 0\n )\n // Reset cache now that final usage report has been sent\n resetTimingsCache(cache)\n }\n },\n markViewed: async ({ delay }, breakpoint) => {\n const durations = generateRecordingReportDurations(cache)\n // Triggered on first paint\n breakpoint()\n if (values.wasMarkedViewed) {\n return\n }\n actions.setWasMarkedViewed(true) // this prevents us from calling the function multiple times\n\n await breakpoint(IS_TEST_MODE ? 1 : delay ?? 3000)\n await api.recordings.update(props.sessionRecordingId, {\n viewed: true,\n player_metadata: values.sessionPlayerMetaData,\n durations,\n })\n await breakpoint(IS_TEST_MODE ? 1 : 10000)\n await api.recordings.update(props.sessionRecordingId, {\n analyzed: true,\n player_metadata: values.sessionPlayerMetaData,\n durations,\n })\n },\n\n maybePersistRecording: () => {\n if (values.sessionPlayerMetaDataLoading) {\n return\n }\n\n if (values.sessionPlayerMetaData?.storage === 'object_storage') {\n actions.persistRecording()\n }\n },\n })),\n selectors(({ cache }) => ({\n webVitalsEvents: [\n (s) => [s.sessionEventsData],\n (sessionEventsData): RecordingEventType[] =>\n (sessionEventsData || []).filter((e) => e.event === '$web_vitals'),\n ],\n\n windowIdForTimestamp: [\n (s) => [s.segments],\n (segments) =>\n (timestamp: number): string | undefined => {\n return segments.find(\n (segment) => segment.startTimestamp <= timestamp && segment.endTimestamp >= timestamp\n )?.windowId\n },\n ],\n\n sessionPlayerData: [\n (s, p) => [\n s.sessionPlayerMetaData,\n s.snapshotsByWindowId,\n s.segments,\n s.bufferedToTime,\n s.start,\n s.end,\n s.durationMs,\n s.fullyLoaded,\n p.sessionRecordingId,\n ],\n (\n meta,\n snapshotsByWindowId,\n segments,\n bufferedToTime,\n start,\n end,\n durationMs,\n fullyLoaded,\n sessionRecordingId\n ): SessionPlayerData => ({\n person: meta?.person ?? null,\n start,\n end,\n durationMs,\n snapshotsByWindowId,\n segments,\n bufferedToTime,\n fullyLoaded,\n sessionRecordingId,\n }),\n ],\n\n snapshotsLoading: [\n (s) => [s.snapshotSourcesLoading, s.snapshotsForSourceLoading],\n (snapshotSourcesLoading, snapshotsForSourceLoading): boolean => {\n // if there's a realTimePollingTimeoutID, don't signal that we're loading\n // we don't want the UI to flip to \"loading\" every time we poll\n return !cache.realTimePollingTimeoutID && (snapshotSourcesLoading || snapshotsForSourceLoading)\n },\n ],\n\n snapshotsLoaded: [(s) => [s.snapshotSources], (snapshotSources): boolean => !!snapshotSources],\n\n fullyLoaded: [\n (s) => [s.snapshots, s.sessionPlayerMetaDataLoading, s.snapshotsLoading, s.sessionEventsDataLoading],\n (snapshots, sessionPlayerMetaDataLoading, snapshotsLoading, sessionEventsDataLoading): boolean => {\n // TODO: Do a proper check for all sources having been loaded\n return (\n !!snapshots.length &&\n !sessionPlayerMetaDataLoading &&\n !snapshotsLoading &&\n !sessionEventsDataLoading\n )\n },\n ],\n\n firstSnapshot: [\n (s) => [s.snapshots],\n (snapshots): RecordingSnapshot | null => {\n return snapshots[0] || null\n },\n ],\n\n lastSnapshot: [\n (s) => [s.snapshots],\n (snapshots): RecordingSnapshot | null => {\n return snapshots[snapshots.length - 1] || null\n },\n ],\n\n start: [\n (s) => [s.firstSnapshot, s.sessionPlayerMetaData],\n (firstSnapshot, meta): Dayjs | null => {\n const eventStart = meta?.start_time ? dayjs(meta.start_time) : null\n const snapshotStart = firstSnapshot ? dayjs(firstSnapshot.timestamp) : null\n\n // whichever is earliest\n if (eventStart && snapshotStart) {\n return eventStart.isBefore(snapshotStart) ? eventStart : snapshotStart\n }\n return eventStart || snapshotStart\n },\n ],\n\n end: [\n (s) => [s.lastSnapshot, s.sessionPlayerMetaData],\n (lastSnapshot, meta): Dayjs | null => {\n const eventEnd = meta?.end_time ? dayjs(meta.end_time) : null\n const snapshotEnd = lastSnapshot ? dayjs(lastSnapshot.timestamp) : null\n\n // whichever is latest\n if (eventEnd && snapshotEnd) {\n return eventEnd.isAfter(snapshotEnd) ? eventEnd : snapshotEnd\n }\n return eventEnd || snapshotEnd\n },\n ],\n\n durationMs: [\n (s) => [s.start, s.end],\n (start, end): number => {\n return !!start && !!end ? end.diff(start) : 0\n },\n ],\n\n segments: [\n (s) => [s.snapshots, s.start, s.end, s.trackedWindow],\n (snapshots, start, end, trackedWindow): RecordingSegment[] => {\n return createSegments(snapshots || [], start, end, trackedWindow)\n },\n ],\n\n urls: [\n (s) => [s.snapshots],\n (snapshots): { url: string; timestamp: number }[] => {\n return (\n snapshots\n .filter((snapshot) => getHrefFromSnapshot(snapshot))\n .map((snapshot) => {\n return {\n url: getHrefFromSnapshot(snapshot) as string,\n timestamp: snapshot.timestamp,\n }\n }) ?? []\n )\n },\n ],\n\n snapshots: [\n (s) => [s.snapshotSources, s.snapshotsBySource],\n (sources, snapshotsBySource): RecordingSnapshot[] => {\n const allSnapshots =\n sources?.flatMap((source) => {\n const sourceKey = getSourceKey(source)\n return snapshotsBySource?.[sourceKey]?.snapshots || []\n }) ?? []\n\n return deduplicateSnapshots(allSnapshots)\n },\n ],\n\n untransformedSnapshots: [\n (s) => [s.snapshotSources, s.snapshotsBySource],\n (sources, snapshotsBySource): RecordingSnapshot[] => {\n const allSnapshots =\n sources?.flatMap((source) => {\n const sourceKey = getSourceKey(source)\n return snapshotsBySource?.[sourceKey]?.untransformed_snapshots || []\n }) ?? []\n\n return deduplicateSnapshots(allSnapshots)\n },\n ],\n\n snapshotsByWindowId: [\n (s) => [s.snapshots],\n (snapshots): Record => {\n return mapSnapshotsToWindowId(snapshots || [])\n },\n ],\n\n snapshotsInvalid: [\n (s, p) => [s.snapshotsByWindowId, s.fullyLoaded, s.start, p.sessionRecordingId, s.currentTeam],\n (snapshotsByWindowId, fullyLoaded, start, sessionRecordingId, currentTeam): boolean => {\n if (!fullyLoaded || !start) {\n return false\n }\n\n const windowsHaveFullSnapshot = Object.entries(snapshotsByWindowId).reduce(\n (acc, [windowId, events]) => {\n acc[`window-id-${windowId}-has-full-snapshot`] = events.some(\n (event) => event.type === EventType.FullSnapshot\n )\n return acc\n },\n {}\n )\n const anyWindowMissingFullSnapshot = !Object.values(windowsHaveFullSnapshot).some((x) => x)\n const everyWindowMissingFullSnapshot = !Object.values(windowsHaveFullSnapshot).every((x) => x)\n\n if (everyWindowMissingFullSnapshot) {\n // video is definitely unplayable\n posthog.capture('recording_has_no_full_snapshot', {\n watchedSession: sessionRecordingId,\n teamId: currentTeam?.id,\n teamName: currentTeam?.name,\n })\n } else if (anyWindowMissingFullSnapshot) {\n posthog.capture('recording_window_missing_full_snapshot', {\n watchedSession: sessionRecordingId,\n teamID: currentTeam?.id,\n teamName: currentTeam?.name,\n })\n }\n\n return everyWindowMissingFullSnapshot\n },\n ],\n\n isRecentAndInvalid: [\n (s) => [s.start, s.snapshotsInvalid],\n (start, snapshotsInvalid) => {\n const lessThanFiveMinutesOld = dayjs().diff(start, 'minute') <= 5\n return snapshotsInvalid && lessThanFiveMinutesOld\n },\n ],\n\n bufferedToTime: [\n (s) => [s.segments],\n (segments): number | null => {\n if (!segments.length) {\n return null\n }\n\n const startTime = segments[0].startTimestamp\n const lastSegment = segments[segments.length - 1]\n\n if (lastSegment.kind === 'buffer') {\n return lastSegment.startTimestamp - startTime\n }\n\n return lastSegment.endTimestamp - startTime\n },\n ],\n\n windowIds: [\n (s) => [s.snapshotsByWindowId],\n (snapshotsByWindowId) => {\n return Object.keys(snapshotsByWindowId)\n },\n ],\n\n createExportJSON: [\n (s) => [s.sessionPlayerMetaData, s.snapshots, s.untransformedSnapshots],\n (\n sessionPlayerMetaData,\n snapshots,\n untransformedSnapshots\n ): ((exportUntransformedMobileSnapshotData: boolean) => ExportedSessionRecordingFileV2) => {\n return (exportUntransformedMobileSnapshotData: boolean) => ({\n version: '2023-04-28',\n data: {\n id: sessionPlayerMetaData?.id ?? '',\n person: sessionPlayerMetaData?.person,\n snapshots: exportUntransformedMobileSnapshotData ? untransformedSnapshots : snapshots,\n },\n })\n },\n ],\n\n customRRWebEvents: [\n (s) => [s.snapshots],\n (snapshots): customEvent[] => {\n return snapshots.filter((snapshot) => snapshot.type === EventType.Custom).map((x) => x as customEvent)\n },\n ],\n })),\n subscriptions(({ actions, values }) => ({\n webVitalsEvents: (value: RecordingEventType[]) => {\n // we preload all web vitals data, so it can be used before user interaction\n if (!values.sessionEventsDataLoading) {\n actions.loadFullEventData(value)\n }\n },\n isRecentAndInvalid: (prev: boolean, next: boolean) => {\n if (!prev && next) {\n posthog.capture('recording cannot playback yet', {\n watchedSession: values.sessionPlayerData.sessionRecordingId,\n })\n }\n },\n })),\n afterMount(({ cache }) => {\n resetTimingsCache(cache)\n }),\n beforeUnmount(({ cache }) => {\n resetTimingsCache(cache)\n }),\n])\n","import { actions, connect, kea, listeners, path, reducers } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\nimport { dayjs } from 'lib/dayjs'\nimport { CORE_FILTER_DEFINITIONS_BY_GROUP } from 'lib/taxonomy'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport { SessionRecordingPropertiesType, SessionRecordingType } from '~/types'\n\nimport type { sessionRecordingsListPropertiesLogicType } from './sessionRecordingsListPropertiesLogicType'\n\n// This logic is used to fetch properties for a list of recordings\n// It is used in a global way as the cached values can be re-used\nexport const sessionRecordingsListPropertiesLogic = kea([\n path(() => ['scenes', 'session-recordings', 'playlist', 'sessionRecordingsListPropertiesLogic']),\n connect(() => ({\n actions: [eventUsageLogic, ['reportRecordingsListPropertiesFetched']],\n })),\n\n actions({\n loadPropertiesForSessions: (sessions: SessionRecordingType[]) => ({ sessions }),\n maybeLoadPropertiesForSessions: (sessions: SessionRecordingType[]) => ({ sessions }),\n }),\n\n loaders(({ actions }) => ({\n recordingProperties: [\n [] as SessionRecordingPropertiesType[],\n {\n loadPropertiesForSessions: async ({ sessions }, breakpoint) => {\n await breakpoint(100)\n\n const startTime = performance.now()\n const sessionIds = sessions.map((x) => x.id)\n\n const oldestTimestamp = sessions.map((x) => x.start_time).sort()[0]\n const newestTimestamp = sessions.map((x) => x.end_time).sort()[sessions.length - 1]\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$session_id as session_id, any(properties) as properties\n FROM events\n WHERE event IN ${Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP['events'])}\n AND session_id IN ${sessionIds}\n -- the timestamp range here is only to avoid querying too much of the events table\n -- we don't really care about the absolute value, \n -- but we do care about whether timezones have an odd impact\n -- so, we extend the range by a day on each side so that timezones don't cause issues\n AND timestamp >= ${dayjs(oldestTimestamp).subtract(1, 'day')}\n AND timestamp <= ${dayjs(newestTimestamp).add(1, 'day')}\n GROUP BY session_id`,\n }\n\n const response = await api.query(query)\n const loadTimeMs = performance.now() - startTime\n\n actions.reportRecordingsListPropertiesFetched(loadTimeMs)\n\n breakpoint()\n return (response.results || []).map(\n (x: any): SessionRecordingPropertiesType => ({\n id: x[0],\n properties: JSON.parse(x[1] || '{}'),\n })\n )\n },\n },\n ],\n })),\n\n listeners(({ actions, values }) => ({\n maybeLoadPropertiesForSessions: ({ sessions }) => {\n const newSessions = sessions.filter((session) => !values.recordingPropertiesById[session.id])\n\n if (newSessions.length > 0) {\n actions.loadPropertiesForSessions(newSessions)\n }\n },\n })),\n\n reducers({\n recordingPropertiesById: [\n {} as Record,\n {\n loadPropertiesForSessionsSuccess: (\n state,\n { recordingProperties }\n ): Record => {\n const newState = { ...state }\n recordingProperties.forEach((properties) => {\n newState[properties.id] = properties.properties\n })\n\n return newState\n },\n },\n ],\n }),\n])\n","import { Link } from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { CopyToClipboardInline } from 'lib/components/CopyToClipboard'\nimport { LemonBanner } from 'lib/lemon-ui/LemonBanner'\nimport { LemonButton } from 'lib/lemon-ui/LemonButton'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonInput } from 'lib/lemon-ui/LemonInput/LemonInput'\nimport { LemonModal } from 'lib/lemon-ui/LemonModal'\nimport { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\n\nimport { verifiedDomainsLogic } from './verifiedDomainsLogic'\n\nexport function ConfigureSAMLModal(): JSX.Element {\n const { configureSAMLModalId, isSamlConfigSubmitting, samlConfig } = useValues(verifiedDomainsLogic)\n const { setConfigureSAMLModalId } = useActions(verifiedDomainsLogic)\n const { preflight } = useValues(preflightLogic)\n const siteUrl = preflight?.site_url ?? window.location.origin\n\n const samlReady = samlConfig.saml_acs_url && samlConfig.saml_entity_id && samlConfig.saml_x509_cert\n\n const handleClose = (): void => {\n setConfigureSAMLModalId(null)\n // clean()\n }\n\n return (\n \n
\n \n

Configure SAML authentication and provisioning

\n
\n \n

\n \n Read the docs\n \n

\n \n {`${siteUrl}/complete/saml/`}\n \n \n {configureSAMLModalId || 'unknown'}\n \n \n {siteUrl}\n \n \n \n \n \n \n \n \n \n \n {!samlReady && (\n \n SAML will not be enabled unless you enter all attributes above. However you can still\n settings as draft.\n \n )}\n
\n \n \n Save settings\n \n \n
\n
\n )\n}\n","import { IconEllipsis, IconInfo, IconPlus } from '@posthog/icons'\nimport {\n LemonBanner,\n LemonButton,\n LemonDialog,\n LemonInput,\n LemonMenu,\n LemonTable,\n LemonTableColumns,\n LemonTabs,\n Spinner,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport clsx from 'clsx'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'\nimport { RestrictionScope, useRestrictedArea } from 'lib/components/RestrictedArea'\nimport { OrganizationMembershipLevel } from 'lib/constants'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'\n\nimport { AvailableFeature } from '~/types'\n\nimport { proxyLogic, ProxyRecord } from './proxyLogic'\n\nconst MAX_PROXY_RECORDS = 3\n\nconst statusText = {\n valid: 'live',\n timed_out: 'timed out',\n}\n\nexport function ManagedReverseProxy(): JSX.Element {\n const { formState, proxyRecords, proxyRecordsLoading } = useValues(proxyLogic)\n const { showForm, deleteRecord } = useActions(proxyLogic)\n\n const restrictionReason = useRestrictedArea({\n minimumAccessLevel: OrganizationMembershipLevel.Admin,\n scope: RestrictionScope.Organization,\n })\n\n const maxRecordsReached = proxyRecords.length >= MAX_PROXY_RECORDS\n\n const recordsWithMessages = proxyRecords.filter((record) => !!record.message)\n\n const columns: LemonTableColumns = [\n {\n title: 'Domain',\n dataIndex: 'domain',\n },\n {\n title: 'Status',\n dataIndex: 'status',\n render: function RenderStatus(status) {\n if (!status) {\n return Unknown\n }\n\n return (\n \n {status === 'issuing' && }\n {statusText[status] || status}\n {status === 'waiting' && (\n \n \n \n )}\n {status === 'timed_out' && (\n \n \n \n )}\n \n )\n },\n },\n {\n title: ,\n width: 20,\n className: 'flex justify-center',\n render: function Render(_, { id, status }) {\n return (\n status != 'deleting' &&\n !restrictionReason && (\n {\n LemonDialog.open({\n title: 'Delete managed proxy',\n width: '20rem',\n content:\n 'Are you sure you want to delete this managed proxy? This cannot be undone and if it is in use then events sent to the domain will not be processed.',\n primaryButton: {\n status: 'danger',\n onClick: () => deleteRecord(id),\n children: 'Delete',\n },\n secondaryButton: {\n children: 'Cancel',\n },\n })\n },\n },\n ]}\n >\n } />\n \n )\n )\n },\n },\n ]\n\n return (\n \n
\n {recordsWithMessages.map((r) => (\n \n {`**${r.domain}**\\n ${r.message}`}\n \n ))}\n ,\n }}\n />\n {formState === 'collapsed' ? (\n maxRecordsReached ? (\n \n There is a maximum of {MAX_PROXY_RECORDS} records allowed per organization\n \n ) : (\n
\n }\n disabledReason={restrictionReason}\n >\n New managed proxy\n \n
\n )\n ) : (\n \n )}\n
\n
\n )\n}\n\nconst ExpandedRow = ({ record }: { record: ProxyRecord }): JSX.Element => {\n return (\n
\n \n {record.target_cname}\n \n ),\n },\n ]}\n />\n
\n )\n}\n\nfunction CreateRecordForm(): JSX.Element {\n const { formState, proxyRecordsLoading, proxyRecords } = useValues(proxyLogic)\n const { collapseForm } = useActions(proxyLogic)\n\n const waitingRecords = proxyRecords.filter((r) => r.status === 'waiting')\n\n return (\n
\n {formState == 'active' ? (\n
\n \n \n \n
\n \n Cancel\n \n \n Add\n \n
\n
\n ) : (\n <>\n
Almost there
\n
\n You need to set the following CNAME records in your DNS provider:\n
\n {waitingRecords.map((r) => (\n
\n {r.domain}\n \n {r.target_cname}\n \n
\n ))}\n
\n \n Done\n \n
\n \n )}\n
\n )\n}\n","import { lemonToast } from '@posthog/lemon-ui'\nimport { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'\nimport { forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { actionToUrl, router, urlToAction } from 'kea-router'\nimport api from 'lib/api'\nimport { dayjs } from 'lib/dayjs'\nimport { featureFlagLogic as enabledFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { hasFormErrors, isObject } from 'lib/utils'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport { Scene } from 'scenes/sceneTypes'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { urls } from 'scenes/urls'\n\nimport { DataTableNode, HogQLQuery, InsightVizNode, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport {\n BaseMathType,\n Breadcrumb,\n FeatureFlagFilters,\n MultipleSurveyQuestion,\n PropertyFilterType,\n PropertyOperator,\n RatingSurveyQuestion,\n Survey,\n SurveyQuestionBase,\n SurveyQuestionBranchingType,\n SurveyQuestionType,\n SurveyUrlMatchType,\n} from '~/types'\n\nimport { defaultSurveyAppearance, defaultSurveyFieldValues, NEW_SURVEY, NewSurvey } from './constants'\nimport type { surveyLogicType } from './surveyLogicType'\nimport { surveysLogic } from './surveysLogic'\nimport { sanitizeHTML } from './utils'\n\nexport enum SurveyEditSection {\n Steps = 'steps',\n Widget = 'widget',\n Presentation = 'presentation',\n Appearance = 'appearance',\n Customization = 'customization',\n DisplayConditions = 'DisplayConditions',\n Scheduling = 'scheduling',\n CompletionConditions = 'CompletionConditions',\n}\nexport interface SurveyLogicProps {\n /** Either a UUID or 'new'. */\n id: string\n}\n\nexport interface SurveyMetricsQueries {\n surveysShown: DataTableNode\n surveysDismissed: DataTableNode\n}\n\nexport interface SurveyUserStats {\n seen: number\n dismissed: number\n sent: number\n}\n\nexport interface SurveyRatingResults {\n [key: number]: {\n data: number[]\n total: number\n }\n}\n\nexport interface SurveyRecurringNPSResults {\n [key: number]: {\n data: number[]\n total: number\n }\n}\n\ntype SurveyNPSResult = {\n Promoters: number\n Detractors: number\n Passives: number\n}\n\nexport interface SurveySingleChoiceResults {\n [key: number]: {\n labels: string[]\n data: number[]\n total: number\n }\n}\n\nexport interface SurveyMultipleChoiceResults {\n [key: number]: {\n labels: string[]\n data: number[]\n }\n}\n\nexport interface SurveyOpenTextResults {\n [key: number]: {\n events: { distinct_id: string; properties: Record; personProperties: Record }[]\n }\n}\n\nexport interface QuestionResultsReady {\n [key: string]: boolean\n}\n\nexport type DataCollectionType = 'until_stopped' | 'until_limit' | 'until_adaptive_limit'\nexport type ScheduleType = 'once' | 'recurring'\n\nconst getResponseField = (i: number): string => (i === 0 ? '$survey_response' : `$survey_response_${i}`)\n\nfunction duplicateExistingSurvey(survey: Survey | NewSurvey): Partial {\n return {\n ...survey,\n id: NEW_SURVEY.id,\n name: `${survey.name} (copy)`,\n archived: false,\n start_date: null,\n end_date: null,\n targeting_flag_filters: survey.targeting_flag?.filters ?? NEW_SURVEY.targeting_flag_filters,\n linked_flag_id: survey.linked_flag?.id ?? NEW_SURVEY.linked_flag_id,\n }\n}\n\nexport const surveyLogic = kea([\n props({} as SurveyLogicProps),\n key(({ id }) => id),\n path((key) => ['scenes', 'surveys', 'surveyLogic', key]),\n connect(() => ({\n actions: [\n surveysLogic,\n ['loadSurveys'],\n eventUsageLogic,\n [\n 'reportSurveyCreated',\n 'reportSurveyEdited',\n 'reportSurveyArchived',\n 'reportSurveyViewed',\n 'reportSurveyCycleDetected',\n ],\n ],\n values: [enabledFlagLogic, ['featureFlags as enabledFlags'], surveysLogic, ['surveys']],\n })),\n actions({\n setSurveyMissing: true,\n editingSurvey: (editing: boolean) => ({ editing }),\n setDefaultForQuestionType: (\n idx: number,\n type: SurveyQuestionType,\n isEditingQuestion: boolean,\n isEditingDescription: boolean,\n isEditingThankYouMessage: boolean\n ) => ({\n idx,\n type,\n isEditingQuestion,\n isEditingDescription,\n isEditingThankYouMessage,\n }),\n setQuestionBranchingType: (questionIndex, type, specificQuestionIndex) => ({\n questionIndex,\n type,\n specificQuestionIndex,\n }),\n setResponseBasedBranchingForQuestion: (questionIndex, responseValue, nextStep, specificQuestionIndex) => ({\n questionIndex,\n responseValue,\n nextStep,\n specificQuestionIndex,\n }),\n setDataCollectionType: (dataCollectionType: DataCollectionType) => ({\n dataCollectionType,\n }),\n resetBranchingForQuestion: (questionIndex) => ({ questionIndex }),\n deleteBranchingLogic: true,\n archiveSurvey: true,\n setWritingHTMLDescription: (writingHTML: boolean) => ({ writingHTML }),\n setSurveyTemplateValues: (template: any) => ({ template }),\n setSelectedPageIndex: (idx: number | null) => ({ idx }),\n setSelectedSection: (section: SurveyEditSection | null) => ({ section }),\n\n setSchedule: (schedule: ScheduleType) => ({ schedule }),\n resetTargeting: true,\n resetSurveyAdaptiveSampling: true,\n resetSurveyResponseLimits: true,\n setFlagPropertyErrors: (errors: any) => ({ errors }),\n }),\n loaders(({ props, actions, values }) => ({\n responseSummary: {\n summarize: async ({ questionIndex }: { questionIndex?: number }) => {\n return api.surveys.summarize_responses(props.id, questionIndex)\n },\n },\n survey: {\n loadSurvey: async () => {\n if (props.id && props.id !== 'new') {\n try {\n const survey = await api.surveys.get(props.id)\n actions.reportSurveyViewed(survey)\n return survey\n } catch (error: any) {\n if (error.status === 404) {\n actions.setSurveyMissing()\n return { ...NEW_SURVEY }\n }\n throw error\n }\n }\n if (props.id === 'new' && router.values.hashParams.fromTemplate) {\n const templatedSurvey = values.survey\n templatedSurvey.appearance = {\n ...defaultSurveyAppearance,\n ...teamLogic.values.currentTeam?.survey_config?.appearance,\n ...templatedSurvey.appearance,\n }\n return templatedSurvey\n }\n\n const newSurvey = NEW_SURVEY\n newSurvey.appearance = {\n ...defaultSurveyAppearance,\n ...teamLogic.values.currentTeam?.survey_config?.appearance,\n ...newSurvey.appearance,\n }\n\n return newSurvey\n },\n createSurvey: async (surveyPayload: Partial) => {\n return await api.surveys.create(sanitizeQuestions(surveyPayload))\n },\n updateSurvey: async (surveyPayload: Partial) => {\n return await api.surveys.update(props.id, sanitizeQuestions(surveyPayload))\n },\n launchSurvey: async () => {\n const startDate = dayjs()\n return await api.surveys.update(props.id, { start_date: startDate.toISOString() })\n },\n stopSurvey: async () => {\n return await api.surveys.update(props.id, { end_date: dayjs().toISOString() })\n },\n resumeSurvey: async () => {\n return await api.surveys.update(props.id, { end_date: null })\n },\n },\n duplicatedSurvey: {\n duplicateSurvey: async () => {\n const { survey } = values\n const payload = duplicateExistingSurvey(survey)\n const createdSurvey = await api.surveys.create(sanitizeQuestions(payload))\n\n lemonToast.success('Survey duplicated.', {\n toastId: `survey-duplicated-${createdSurvey.id}`,\n button: {\n label: 'View Survey',\n action: () => {\n router.actions.push(urls.survey(createdSurvey.id))\n },\n },\n })\n\n actions.reportSurveyCreated(createdSurvey, true)\n return survey\n },\n },\n surveyUserStats: {\n loadSurveyUserStats: async (): Promise => {\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`\n SELECT\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey shown'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate}),\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey dismissed'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate}),\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey sent'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate})\n `,\n }\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n if (results && results[0]) {\n const [totalSeen, dismissed, sent] = results[0]\n const onlySeen = totalSeen - dismissed - sent\n return { seen: onlySeen < 0 ? 0 : onlySeen, dismissed, sent }\n }\n return { seen: 0, dismissed: 0, sent: 0 }\n },\n },\n surveyRatingResults: {\n loadSurveyRatingResults: async ({\n questionIndex,\n iteration,\n }: {\n questionIndex: number\n iteration?: number | null | undefined\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Rating) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Rating}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n let iterationCondition = ''\n if (iteration && iteration > 0) {\n iterationCondition = ` AND properties.$survey_iteration='${iteration}' `\n }\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent' \n AND properties.$survey_id = '${props.id}'\n ${iterationCondition}\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response\n `,\n }\n const responseJSON = await api.query(query)\n // TODO:Dylan - I don't like how we lose our types here\n // would be cool if we could parse this in a more type-safe way\n const { results } = responseJSON\n\n let total = 0\n const dataSize = question.scale === 10 ? 11 : question.scale\n const data = new Array(dataSize).fill(0)\n results?.forEach(([value, count]) => {\n total += count\n\n const index = question.scale === 10 ? value : value - 1\n data[index] = count\n })\n\n return { ...values.surveyRatingResults, [questionIndex]: { total, data } }\n },\n },\n surveyRecurringNPSResults: {\n loadSurveyRecurringNPSResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Rating) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Rating}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '$survey_iteration') AS survey_iteration,\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent'\n AND properties.$survey_id = '${props.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response, survey_iteration\n `,\n }\n\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n let total = 100\n const data = new Array(survey.iteration_count).fill(0)\n\n const iterations = new Map()\n\n results?.forEach(([iteration, response, count]) => {\n let promoters = 0\n let passives = 0\n let detractors = 0\n\n if (parseInt(response) >= 9) {\n // a Promoter is someone who gives a survey response of 9 or 10\n promoters += parseInt(count)\n } else if (parseInt(response) > 6) {\n // a Passive is someone who gives a survey response of 7 or 8\n passives += parseInt(count)\n } else {\n // a Detractor is someone who gives a survey response of 0 - 6\n detractors += parseInt(count)\n }\n\n if (iterations.has(iteration)) {\n const currentValue = iterations.get(iteration)\n if (currentValue !== undefined) {\n currentValue.Detractors += detractors\n currentValue.Promoters += promoters\n currentValue.Passives += passives\n }\n } else {\n iterations.set(iteration, {\n Detractors: detractors,\n Passives: passives,\n Promoters: promoters,\n })\n }\n })\n\n iterations.forEach((value: SurveyNPSResult, key: string) => {\n // NPS score is calculated with this formula\n // (Promoters / (Promoters + Passives + Detractors) * 100) - (Detractors / (Promoters + Passives + Detractors)* 100)\n const totalResponses = value.Promoters + value.Passives + value.Detractors\n const npsScore =\n (value.Promoters / totalResponses) * 100 - (value.Detractors / totalResponses) * 100\n data[parseInt(key) - 1] = npsScore\n total += 100\n })\n\n return { ...values.surveyRecurringNPSResults, [questionIndex]: { total, data } }\n },\n },\n surveySingleChoiceResults: {\n loadSurveySingleChoiceResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent' \n AND properties.$survey_id = '${props.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response\n `,\n }\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n\n const labels = results?.map((r) => r[0])\n const data = results?.map((r) => r[1])\n const total = data?.reduce((a, b) => a + b, 0)\n\n return { ...values.surveySingleChoiceResults, [questionIndex]: { labels, data, total } }\n },\n },\n surveyMultipleChoiceResults: {\n loadSurveyMultipleChoiceResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.MultipleChoice) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.MultipleChoice}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT \n count(),\n arrayJoin(JSONExtractArrayRaw(properties, '${getResponseField(questionIndex)}')) AS choice\n FROM events\n WHERE event == 'survey sent'\n AND properties.$survey_id == '${survey.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY choice\n ORDER BY count() DESC\n `,\n }\n const responseJSON = await api.query(query)\n let { results } = responseJSON\n\n // Remove outside quotes\n results = results?.map((r) => {\n return [r[0], r[1].slice(1, r[1].length - 1)]\n })\n\n // Zero-fill choices that are not open-ended\n question.choices.forEach((choice, idx) => {\n const isOpenChoice = idx == question.choices.length - 1 && question?.hasOpenChoice\n if (results?.length && !isOpenChoice && !results.some((r) => r[1] === choice)) {\n results.push([0, choice])\n }\n })\n\n const data = results?.map((r) => r[0])\n const labels = results?.map((r) => r[1])\n\n return { ...values.surveyMultipleChoiceResults, [questionIndex]: { labels, data } }\n },\n },\n surveyOpenTextResults: {\n loadSurveyOpenTextResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Open) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Open}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT distinct_id, properties, person.properties\n FROM events\n WHERE event == 'survey sent'\n AND properties.$survey_id == '${survey.id}'\n AND trim(JSONExtractString(properties, '${getResponseField(questionIndex)}')) != ''\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n LIMIT 20\n `,\n }\n\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n\n const events =\n results?.map((r) => {\n const distinct_id = r[0]\n const properties = JSON.parse(r[1])\n const personProperties = JSON.parse(r[2])\n return { distinct_id, properties, personProperties }\n }) || []\n\n return { ...values.surveyOpenTextResults, [questionIndex]: { events } }\n },\n },\n })),\n listeners(({ actions, values }) => ({\n createSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} created)\n actions.loadSurveys()\n router.actions.replace(urls.survey(survey.id))\n actions.reportSurveyCreated(survey)\n },\n updateSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} updated)\n actions.editingSurvey(false)\n actions.reportSurveyEdited(survey)\n actions.loadSurveys()\n },\n duplicateSurveySuccess: () => {\n actions.loadSurveys()\n },\n launchSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} launched)\n actions.loadSurveys()\n },\n stopSurveySuccess: () => {\n actions.loadSurveys()\n },\n resumeSurveySuccess: () => {\n actions.loadSurveys()\n },\n archiveSurvey: () => {\n actions.updateSurvey({ archived: true })\n },\n loadSurveySuccess: () => {\n actions.loadSurveyUserStats()\n },\n resetSurveyResponseLimits: () => {\n actions.setSurveyValue('responses_limit', null)\n },\n\n resetSurveyAdaptiveSampling: () => {\n actions.setSurveyValues({\n response_sampling_interval: null,\n response_sampling_interval_type: null,\n response_sampling_limit: null,\n response_sampling_start_date: null,\n response_sampling_daily_limits: null,\n })\n },\n resetTargeting: () => {\n actions.setSurveyValue('linked_flag_id', NEW_SURVEY.linked_flag_id)\n actions.setSurveyValue('targeting_flag_filters', NEW_SURVEY.targeting_flag_filters)\n actions.setSurveyValue('linked_flag', NEW_SURVEY.linked_flag)\n actions.setSurveyValue('targeting_flag', NEW_SURVEY.targeting_flag)\n actions.setSurveyValue('conditions', NEW_SURVEY.conditions)\n actions.setSurveyValue('remove_targeting_flag', true)\n actions.setSurveyValue('responses_limit', NEW_SURVEY.responses_limit)\n actions.setSurveyValues({\n iteration_count: NEW_SURVEY.iteration_count,\n iteration_frequency_days: NEW_SURVEY.iteration_frequency_days,\n })\n },\n submitSurveyFailure: async () => {\n // When errors occur, scroll to the error, but wait for errors to be set in the DOM first\n if (hasFormErrors(values.flagPropertyErrors) || values.urlMatchTypeValidationError) {\n actions.setSelectedSection(SurveyEditSection.DisplayConditions)\n } else {\n actions.setSelectedSection(SurveyEditSection.Steps)\n }\n setTimeout(\n () => document.querySelector(`.Field--error`)?.scrollIntoView({ block: 'center', behavior: 'smooth' }),\n 5\n )\n },\n })),\n reducers({\n isEditingSurvey: [\n false,\n {\n editingSurvey: (_, { editing }) => editing,\n },\n ],\n surveyMissing: [\n false,\n {\n setSurveyMissing: () => true,\n },\n ],\n dataCollectionType: [\n 'until_stopped' as DataCollectionType,\n {\n setDataCollectionType: (_, { dataCollectionType }) => dataCollectionType,\n },\n ],\n\n survey: [\n { ...NEW_SURVEY } as NewSurvey | Survey,\n {\n setDefaultForQuestionType: (\n state,\n { idx, type, isEditingQuestion, isEditingDescription, isEditingThankYouMessage }\n ) => {\n const question = isEditingQuestion\n ? state.questions[idx].question\n : defaultSurveyFieldValues[type].questions[0].question\n const description = isEditingDescription\n ? state.questions[idx].description\n : defaultSurveyFieldValues[type].questions[0].description\n const thankYouMessageHeader = isEditingThankYouMessage\n ? state.appearance?.thankYouMessageHeader\n : defaultSurveyFieldValues[type].appearance.thankYouMessageHeader\n const newQuestions = [...state.questions]\n newQuestions[idx] = {\n ...state.questions[idx],\n ...(defaultSurveyFieldValues[type].questions[0] as SurveyQuestionBase),\n question,\n description,\n }\n return {\n ...state,\n questions: newQuestions,\n appearance: {\n ...state.appearance,\n ...defaultSurveyFieldValues[type].appearance,\n thankYouMessageHeader,\n },\n }\n },\n setSurveyTemplateValues: (_, { template }) => {\n const newTemplateSurvey = { ...NEW_SURVEY, ...template }\n return newTemplateSurvey\n },\n setQuestionBranchingType: (state, { questionIndex, type, specificQuestionIndex }) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n\n if (type === SurveyQuestionBranchingType.NextQuestion) {\n delete question.branching\n } else if (type === SurveyQuestionBranchingType.End) {\n question.branching = {\n type: SurveyQuestionBranchingType.End,\n }\n } else if (type === SurveyQuestionBranchingType.ResponseBased) {\n if (\n question.type !== SurveyQuestionType.Rating &&\n question.type !== SurveyQuestionType.SingleChoice\n ) {\n throw new Error(\n `Survey question type must be ${SurveyQuestionType.Rating} or ${SurveyQuestionType.SingleChoice}`\n )\n }\n\n question.branching = {\n type: SurveyQuestionBranchingType.ResponseBased,\n responseValues: {},\n }\n } else if (type === SurveyQuestionBranchingType.SpecificQuestion) {\n question.branching = {\n type: SurveyQuestionBranchingType.SpecificQuestion,\n index: specificQuestionIndex,\n }\n }\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n setResponseBasedBranchingForQuestion: (\n state,\n { questionIndex, responseValue, nextStep, specificQuestionIndex }\n ) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n\n if (\n question.type !== SurveyQuestionType.Rating &&\n question.type !== SurveyQuestionType.SingleChoice\n ) {\n throw new Error(\n `Survey question type must be ${SurveyQuestionType.Rating} or ${SurveyQuestionType.SingleChoice}`\n )\n }\n\n if (question.branching?.type !== SurveyQuestionBranchingType.ResponseBased) {\n throw new Error(\n `Survey question branching type must be ${SurveyQuestionBranchingType.ResponseBased}`\n )\n }\n\n if ('responseValues' in question.branching) {\n if (nextStep === SurveyQuestionBranchingType.NextQuestion) {\n delete question.branching.responseValues[responseValue]\n } else if (nextStep === SurveyQuestionBranchingType.End) {\n question.branching.responseValues[responseValue] = SurveyQuestionBranchingType.End\n } else if (nextStep === SurveyQuestionBranchingType.SpecificQuestion) {\n question.branching.responseValues[responseValue] = specificQuestionIndex\n }\n }\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n resetBranchingForQuestion: (state, { questionIndex }) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n delete question.branching\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n deleteBranchingLogic: (state) => {\n const newQuestions = [...state.questions]\n newQuestions.forEach((question) => {\n delete question.branching\n })\n\n return {\n ...state,\n questions: newQuestions,\n }\n },\n },\n ],\n selectedPageIndex: [\n 0 as number | null,\n {\n setSelectedPageIndex: (_, { idx }) => idx,\n },\n ],\n selectedSection: [\n SurveyEditSection.Steps as SurveyEditSection | null,\n {\n setSelectedSection: (_, { section }) => section,\n },\n ],\n surveyRatingResultsReady: [\n {},\n {\n loadSurveyRatingResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyRecurringNPSResultsReady: [\n {},\n {\n loadSurveyRecurringNPSResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveySingleChoiceResultsReady: [\n {},\n {\n loadSurveySingleChoiceResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyMultipleChoiceResultsReady: [\n {},\n {\n loadSurveyMultipleChoiceResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyOpenTextResultsReady: [\n {},\n {\n loadSurveyOpenTextResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n writingHTMLDescription: [\n false,\n {\n setWritingHTMLDescription: (_, { writingHTML }) => writingHTML,\n },\n ],\n schedule: [\n 'once',\n {\n setSchedule: (_, { schedule }) => schedule,\n },\n ],\n flagPropertyErrors: [\n null as any,\n {\n setFlagPropertyErrors: (_, { errors }) => errors,\n },\n ],\n }),\n selectors({\n isSurveyRunning: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(survey.start_date && !survey.end_date)\n },\n ],\n surveyUsesLimit: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(survey.responses_limit && survey.responses_limit > 0)\n },\n ],\n surveyUsesAdaptiveLimit: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(\n survey.response_sampling_interval &&\n survey.response_sampling_interval > 0 &&\n survey.response_sampling_interval_type !== '' &&\n survey.response_sampling_limit &&\n survey.response_sampling_limit > 0\n )\n },\n ],\n surveyShufflingQuestionsAvailable: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return survey.questions.length > 1\n },\n ],\n showSurveyRepeatSchedule: [(s) => [s.schedule], (schedule: ScheduleType) => schedule == 'recurring'],\n descriptionContentType: [\n (s) => [s.survey],\n (survey: Survey) => (questionIndex: number) => {\n return survey.questions[questionIndex].descriptionContentType\n },\n ],\n surveyRepeatedActivationAvailable: [\n (s) => [s.survey],\n (survey: Survey): boolean =>\n survey.conditions?.events?.values != undefined && survey.conditions?.events?.values?.length > 0,\n ],\n hasTargetingSet: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n const hasLinkedFlag =\n !!survey.linked_flag_id || (survey.linked_flag && Object.keys(survey.linked_flag).length > 0)\n const hasTargetingFlag =\n (survey.targeting_flag && Object.keys(survey.targeting_flag).length > 0) ||\n (survey.targeting_flag_filters && Object.keys(survey.targeting_flag_filters).length > 0)\n const hasOtherConditions = survey.conditions && Object.keys(survey.conditions).length > 0\n return !!hasLinkedFlag || !!hasTargetingFlag || !!hasOtherConditions\n },\n ],\n breadcrumbs: [\n (s) => [s.survey],\n (survey: Survey): Breadcrumb[] => [\n {\n key: Scene.Surveys,\n name: 'Surveys',\n path: urls.surveys(),\n },\n { key: [Scene.Survey, survey?.id || 'new'], name: survey.name },\n ],\n ],\n dataTableQuery: [\n (s) => [s.survey],\n (survey): DataTableNode | null => {\n if (survey.id === 'new') {\n return null\n }\n const surveyWithResults = survey as Survey\n const startDate = surveyWithResults.start_date || surveyWithResults.created_at\n return {\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.EventsQuery,\n select: [\n '*',\n ...survey.questions.map((q, i) => {\n if (q.type === SurveyQuestionType.MultipleChoice) {\n // Join array items into a string\n return `coalesce(arrayStringConcat(JSONExtractArrayRaw(properties, '${getResponseField(\n i\n )}'), ', ')) -- ${q.question}`\n }\n\n return `coalesce(JSONExtractString(properties, '${getResponseField(i)}')) -- ${\n q.question\n }`\n }),\n 'timestamp',\n 'person',\n `coalesce(JSONExtractString(properties, '$lib_version')) -- Library Version`,\n `coalesce(JSONExtractString(properties, '$lib')) -- Library`,\n `coalesce(JSONExtractString(properties, '$current_url')) -- URL`,\n ],\n orderBy: ['timestamp DESC'],\n where: [`event == 'survey sent'`],\n after: startDate,\n properties: [\n {\n type: PropertyFilterType.Event,\n key: '$survey_id',\n operator: PropertyOperator.Exact,\n value: survey.id,\n },\n ],\n },\n propertiesViaUrl: true,\n showExport: true,\n showReload: true,\n showEventFilter: false,\n showPropertyFilter: true,\n showTimings: false,\n }\n },\n ],\n targetingFlagFilters: [\n (s) => [s.survey],\n (survey): FeatureFlagFilters | undefined => {\n if (survey.targeting_flag_filters) {\n return {\n ...survey.targeting_flag_filters,\n groups: survey.targeting_flag_filters.groups,\n multivariate: null,\n payloads: {},\n super_groups: undefined,\n }\n }\n return survey.targeting_flag?.filters || undefined\n },\n ],\n urlMatchTypeValidationError: [\n (s) => [s.survey],\n (survey): string | null => {\n if (survey.conditions?.urlMatchType === SurveyUrlMatchType.Regex && survey.conditions.url) {\n try {\n new RegExp(survey.conditions.url)\n } catch (e: any) {\n return e.message\n }\n }\n return null\n },\n ],\n surveyNPSScore: [\n (s) => [s.surveyRatingResults],\n (surveyRatingResults) => {\n if (surveyRatingResults) {\n const questionIdx = Object.keys(surveyRatingResults)[0]\n const questionResults = surveyRatingResults[questionIdx]\n\n // If we don't have any results, return 'No data available' instead of NaN.\n if (questionResults.total === 0) {\n return 'No data available'\n }\n\n const data: number[] = questionResults.data\n if (data.length === 11) {\n const promoters = data.slice(9, 11).reduce((a, b) => a + b, 0)\n const passives = data.slice(7, 9).reduce((a, b) => a + b, 0)\n const detractors = data.slice(0, 7).reduce((a, b) => a + b, 0)\n const npsScore = ((promoters - detractors) / (promoters + passives + detractors)) * 100\n return npsScore.toFixed(1)\n }\n }\n },\n ],\n\n getBranchingDropdownValue: [\n (s) => [s.survey],\n (survey) => (questionIndex: number, question: RatingSurveyQuestion | MultipleSurveyQuestion) => {\n if (question.branching?.type) {\n const { type } = question.branching\n\n if (type === SurveyQuestionBranchingType.SpecificQuestion) {\n const nextQuestionIndex = question.branching.index\n return `${SurveyQuestionBranchingType.SpecificQuestion}:${nextQuestionIndex}`\n }\n\n return type\n }\n\n // No branching specified, default to Next question / Confirmation message\n if (questionIndex < survey.questions.length - 1) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n return SurveyQuestionBranchingType.End\n },\n ],\n getResponseBasedBranchingDropdownValue: [\n (s) => [s.survey],\n (survey) => (questionIndex: number, question: RatingSurveyQuestion | MultipleSurveyQuestion, response) => {\n if (!question.branching || !('responseValues' in question.branching)) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n // If a value is mapped onto an integer, we're redirecting to a specific question\n if (Number.isInteger(question.branching.responseValues[response])) {\n const nextQuestionIndex = question.branching.responseValues[response]\n return `${SurveyQuestionBranchingType.SpecificQuestion}:${nextQuestionIndex}`\n }\n\n // If any other value is present (practically only Confirmation message), return that value\n if (question.branching?.responseValues?.[response]) {\n return question.branching.responseValues[response]\n }\n\n // No branching specified, default to Next question / Confirmation message\n if (questionIndex < survey.questions.length - 1) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n return SurveyQuestionBranchingType.End\n },\n ],\n hasCycle: [\n (s) => [s.survey],\n (survey) => {\n const graph = new Map()\n survey.questions.forEach((question, fromIndex: number) => {\n if (!graph.has(fromIndex)) {\n graph.set(fromIndex, new Set())\n }\n\n if (question.branching?.type === SurveyQuestionBranchingType.End) {\n return\n } else if (\n question.branching?.type === SurveyQuestionBranchingType.SpecificQuestion &&\n Number.isInteger(question.branching.index)\n ) {\n const toIndex = question.branching.index\n graph.get(fromIndex).add(toIndex)\n return\n } else if (\n question.branching?.type === SurveyQuestionBranchingType.ResponseBased &&\n isObject(question.branching?.responseValues)\n ) {\n for (const [_, toIndex] of Object.entries(question.branching?.responseValues)) {\n if (Number.isInteger(toIndex)) {\n graph.get(fromIndex).add(toIndex)\n }\n }\n }\n\n // No branching - still need to connect the next question\n if (fromIndex < survey.questions.length - 1) {\n const toIndex = fromIndex + 1\n graph.get(fromIndex).add(toIndex)\n }\n })\n\n let cycleDetected = false\n function dfs(node: number, seen: number[]): void {\n if (cycleDetected) {\n return\n }\n\n for (const neighbor of graph.get(node) || []) {\n if (seen.includes(neighbor)) {\n cycleDetected = true\n return\n }\n dfs(neighbor, seen.concat(neighbor))\n }\n }\n dfs(0, [0])\n\n return cycleDetected\n },\n ],\n hasBranchingLogic: [\n (s) => [s.survey],\n (survey) =>\n survey.questions.some((question) => question.branching && Object.keys(question.branching).length > 0),\n ],\n surveyAsInsightURL: [\n (s) => [s.survey],\n (survey) => {\n const query: InsightVizNode = {\n kind: NodeKind.InsightVizNode,\n source: {\n kind: NodeKind.TrendsQuery,\n properties: [\n {\n key: '$survey_id',\n value: survey.id,\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n ],\n series: [\n {\n kind: NodeKind.EventsNode,\n event: 'survey sent',\n name: 'survey sent',\n math: BaseMathType.TotalCount,\n },\n {\n kind: NodeKind.EventsNode,\n event: 'survey shown',\n name: 'survey shown',\n math: BaseMathType.TotalCount,\n },\n {\n kind: NodeKind.EventsNode,\n event: 'survey dismissed',\n name: 'survey dismissed',\n math: BaseMathType.TotalCount,\n },\n ],\n },\n }\n\n return urls.insightNew(undefined, undefined, query)\n },\n ],\n }),\n forms(({ actions, props, values }) => ({\n survey: {\n defaults: { ...NEW_SURVEY } as NewSurvey | Survey,\n errors: ({ name, questions }) => ({\n // NOTE: When more validation errors are added, the submitSurveyFailure listener should be updated\n // to scroll to the right error section\n name: !name && 'Please enter a name.',\n questions: questions.map((question) => {\n const questionErrors = {\n question: !question.question && 'Please enter a question label.',\n }\n\n if (question.type === SurveyQuestionType.Rating) {\n return {\n ...questionErrors,\n display: !question.display && 'Please choose a display type.',\n scale: !question.scale && 'Please choose a scale.',\n lowerBoundLabel: !question.lowerBoundLabel && 'Please enter a lower bound label.',\n upperBoundLabel: !question.upperBoundLabel && 'Please enter an upper bound label.',\n }\n } else if (\n question.type === SurveyQuestionType.SingleChoice ||\n question.type === SurveyQuestionType.MultipleChoice\n ) {\n return {\n ...questionErrors,\n choices: question.choices.some((choice) => !choice.trim())\n ? 'Please ensure all choices are non-empty.'\n : undefined,\n }\n }\n\n return questionErrors\n }),\n // release conditions controlled using a PureField in the form\n targeting_flag_filters: values.flagPropertyErrors,\n // controlled using a PureField in the form\n urlMatchType: values.urlMatchTypeValidationError,\n }),\n submit: (surveyPayload) => {\n if (values.hasCycle) {\n actions.reportSurveyCycleDetected(values.survey)\n\n return lemonToast.error(\n 'Your survey contains an endless cycle. Please revisit your branching rules.'\n )\n }\n\n // when the survey is being submitted, we should turn off editing mode\n actions.editingSurvey(false)\n if (props.id && props.id !== 'new') {\n actions.updateSurvey(surveyPayload)\n } else {\n actions.createSurvey(surveyPayload)\n }\n },\n },\n })),\n urlToAction(({ actions, props }) => ({\n [urls.survey(props.id ?? 'new')]: (_, { edit }, __, { method }) => {\n // We always set the editingSurvey to true when we create a new survey\n if (props.id === 'new') {\n actions.editingSurvey(true)\n }\n // If the URL was pushed (user clicked on a link), reset the scene's data.\n // This avoids resetting form fields if you click back/forward.\n if (method === 'PUSH') {\n if (props.id) {\n actions.loadSurvey()\n } else {\n actions.resetSurvey()\n }\n }\n\n if (edit) {\n actions.editingSurvey(true)\n }\n },\n })),\n actionToUrl(({ values }) => ({\n setSurveyTemplateValues: () => {\n const hashParams = router.values.hashParams\n hashParams['fromTemplate'] = true\n\n return [urls.survey(values.survey.id), router.values.searchParams, hashParams]\n },\n editingSurvey: ({ editing }) => {\n const searchParams = router.values.searchParams\n if (editing) {\n searchParams['edit'] = true\n } else {\n delete searchParams['edit']\n }\n\n return [router.values.location.pathname, router.values.searchParams, router.values.hashParams]\n },\n })),\n afterMount(({ props, actions }) => {\n if (props.id !== 'new') {\n actions.loadSurvey()\n }\n if (props.id === 'new') {\n actions.resetSurvey()\n }\n }),\n])\n\nfunction sanitizeQuestions(surveyPayload: Partial): Partial {\n if (!surveyPayload.questions) {\n return surveyPayload\n }\n\n const sanitizedThankYouHeader = sanitizeHTML(surveyPayload.appearance?.thankYouMessageHeader || '')\n const sanitizedThankYouDescription = sanitizeHTML(surveyPayload.appearance?.thankYouMessageDescription || '')\n\n return {\n ...surveyPayload,\n questions: surveyPayload.questions?.map((rawQuestion) => {\n return {\n ...rawQuestion,\n description: sanitizeHTML(rawQuestion.description || ''),\n question: sanitizeHTML(rawQuestion.question || ''),\n }\n }),\n appearance: {\n ...surveyPayload.appearance,\n ...(sanitizedThankYouHeader && { thankYouMessageHeader: sanitizedThankYouHeader }),\n ...(sanitizedThankYouDescription && { thankYouMessageDescription: sanitizedThankYouDescription }),\n },\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"main.76fe5407.iframe.bundle.js","mappings":";;;;;AAyBA;ACqKA;;;;;;;ACiCA;AC7LA;AAAA;AAKA;;;ACVA;;;AAsBA;;AAEA;;ACYA;ACrCA;AAUA;AAOA;AAkDA;;AAuXA;AAAA;AAAA;AAAA;AAlZA;AAaA;AAOA;;;;;;;ACWA;;AC5EA;;;;;;;;;;;ACmPA;;;;;AAeA;;;AAcA;;;;;;;AAyDA;AC9QA;ACqhBA;AACA;AC9fA;AASA;;;AAWA;AC1GA;;;AAoBA;;;AAIA;AAKA;AACA;AAGA;;AAIA;;AAEA;AAGA;AACA;AAGA;AAGA;;AAEA;;AAWA;AACA;AACA;;;;;AAiCA;;;AAIA;AAKA;;;AAGA;AACA;AAGA;AACA;AACA;;AAWA;AACA;AACA;;;AAwBA;;;AAIA;;AAMA;;AAEA;;AAEA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AAwBA;;;AAIA;AAKA;;AAEA;AACA;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AA6BA;;;AAIA;AAKA;;AAEA;AACA;AAGA;AACA;AACA;;AAUA;AACA;AACA;;;AA8BA;;;AAyBA;;AAuBA;;;;AAyBA;;;;;;;AAOA;;;;AAIA;AACA;AAkBA;;;AAGA;;AAEA;;;AAGA;AAUA;;;AASA;AACA;;AAEA;;;AA6BA;;AAMA;;AAWA;;AAEA;;;;;;AAMA;;AAEA;;;;AAaA;;;;;;;;;;;;;AAaA;ACxeA;;;;;;;;;;;ACyLA;;;;;;;;;;;;;;;;;;;AC8nCA;;ACjtBA;AACA;AACA;AACA;;ACroBA;AACA;;;;;AAKA;AACA;AACA;;;ACOA;AC0EA;;;;;ACoJA;AACA;AACA;;;;AAIA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;;AAuCA;;;;AAIA;AACA;AACA;AACA;;AAEA;;;AA0CA;;;;AAIA;AACA;AACA;;AAEA;;AAuEA;;;;AAIA;AACA;AACA;;AAEA;;;AAkCA;;;AAGA;AACA;AACA;;;AAGA;;;;AA+CA;AACA;AACA;AACA;;AAEA","sources":["webpack://posthog/./frontend/src/lib/components/ReverseProxyChecker/reverseProxyCheckerLogic.ts","webpack://posthog/./frontend/src/lib/components/Alerts/views/EditAlertModal.tsx","webpack://posthog/./frontend/src/lib/components/AuthorizedUrlList/authorizedUrlListLogic.ts","webpack://posthog/./frontend/src/lib/components/JSSnippet.tsx","webpack://posthog/./frontend/src/lib/components/Metalytics/metalyticsLogic.ts","webpack://posthog/./frontend/src/lib/components/Support/SupportForm.tsx","webpack://posthog/./frontend/src/lib/components/Support/supportLogic.ts","webpack://posthog/./frontend/src/lib/components/VersionChecker/versionCheckerLogic.ts","webpack://posthog/./frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx","webpack://posthog/./frontend/src/queries/examples.ts","webpack://posthog/./frontend/src/scenes/paths/renderPaths.ts","webpack://posthog/./frontend/src/scenes/billing/billingLogic.tsx","webpack://posthog/./frontend/src/scenes/early-access-features/InstructionsModal.tsx","webpack://posthog/./frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx","webpack://posthog/./frontend/src/scenes/notebooks/Nodes/NotebookNodeReplayTimestamp.tsx","webpack://posthog/./frontend/src/scenes/notebooks/Notebook/SlashCommands.tsx","webpack://posthog/./ee/frontend/mobile-replay/transformer/transformers.ts","webpack://posthog/./frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts","webpack://posthog/./frontend/src/scenes/session-recordings/playlist/sessionRecordingsListPropertiesLogic.ts","webpack://posthog/./frontend/src/scenes/settings/organization/VerifiedDomains/ConfigureSAMLModal.tsx","webpack://posthog/./frontend/src/scenes/settings/environment/ManagedReverseProxy.tsx","webpack://posthog/./frontend/src/scenes/surveys/surveyLogic.tsx"],"sourcesContent":["import { afterMount, kea, path, reducers } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { reverseProxyCheckerLogicType } from './reverseProxyCheckerLogicType'\n\nconst CHECK_INTERVAL_MS = 1000 * 60 * 60 // 1 hour\n\nexport const reverseProxyCheckerLogic = kea([\n path(['components', 'ReverseProxyChecker', 'reverseProxyCheckerLogic']),\n loaders({\n hasReverseProxy: [\n false as boolean | null,\n {\n loadHasReverseProxy: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$lib_custom_api_host AS lib_custom_api_host\n FROM events\n WHERE timestamp >= now() - INTERVAL 1 DAY \n AND timestamp <= now()\n ORDER BY timestamp DESC\n limit 10`,\n }\n\n const res = await api.query(query)\n return !!res.results?.find((x) => !!x[0])\n },\n },\n ],\n }),\n reducers({\n lastCheckedTimestamp: [\n 0,\n { persist: true },\n {\n loadHasReverseProxySuccess: () => Date.now(),\n },\n ],\n }),\n afterMount(({ actions, values }) => {\n if (values.lastCheckedTimestamp < Date.now() - CHECK_INTERVAL_MS) {\n actions.loadHasReverseProxy()\n }\n }),\n])\n","import { IconInfo } from '@posthog/icons'\nimport {\n LemonBanner,\n LemonCheckbox,\n LemonInput,\n LemonSegmentedButton,\n LemonSelect,\n SpinnerOverlay,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form, Group } from 'kea-forms'\nimport { AlertStateIndicator } from 'lib/components/Alerts/views/ManageAlertsModal'\nimport { MemberSelectMultiple } from 'lib/components/MemberSelectMultiple'\nimport { TZLabel } from 'lib/components/TZLabel'\nimport { UserActivityIndicator } from 'lib/components/UserActivityIndicator/UserActivityIndicator'\nimport { dayjs } from 'lib/dayjs'\nimport { IconChevronLeft } from 'lib/lemon-ui/icons'\nimport { LemonButton } from 'lib/lemon-ui/LemonButton'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonModal } from 'lib/lemon-ui/LemonModal'\nimport { alphabet, formatDate } from 'lib/utils'\nimport { useCallback } from 'react'\nimport { trendsDataLogic } from 'scenes/trends/trendsDataLogic'\n\nimport { AlertCalculationInterval, AlertConditionType, AlertState, InsightThresholdType } from '~/queries/schema'\nimport { InsightShortId, QueryBasedInsightModel } from '~/types'\n\nimport { alertFormLogic, canCheckOngoingInterval } from '../alertFormLogic'\nimport { alertLogic } from '../alertLogic'\nimport { SnoozeButton } from '../SnoozeButton'\nimport { AlertType } from '../types'\n\nexport function AlertStateTable({ alert }: { alert: AlertType }): JSX.Element | null {\n if (!alert.checks || alert.checks.length === 0) {\n return null\n }\n\n return (\n
\n
\n

Current status:

\n \n

\n {alert.snoozed_until && ` until ${formatDate(dayjs(alert?.snoozed_until), 'MMM D, HH:mm')}`}\n

\n
\n \n \n \n \n \n \n \n \n \n \n {alert.checks.map((check) => (\n \n \n \n \n \n \n ))}\n \n
StatusTimeValueTargets notified
{check.state}\n \n {check.calculated_value}{check.targets_notified ? 'Yes' : 'No'}
\n
\n )\n}\n\ninterface EditAlertModalProps {\n isOpen: boolean | undefined\n alertId?: AlertType['id']\n insightId: QueryBasedInsightModel['id']\n insightShortId: InsightShortId\n onEditSuccess: () => void\n onClose?: () => void\n}\n\nexport function EditAlertModal({\n isOpen,\n alertId,\n insightId,\n insightShortId,\n onClose,\n onEditSuccess,\n}: EditAlertModalProps): JSX.Element {\n const _alertLogic = alertLogic({ alertId })\n const { alert, alertLoading } = useValues(_alertLogic)\n const { loadAlert } = useActions(_alertLogic)\n\n // need to reload edited alert as well\n const _onEditSuccess = useCallback(() => {\n loadAlert()\n onEditSuccess()\n }, [loadAlert, onEditSuccess])\n\n const formLogicProps = { alert, insightId, onEditSuccess: _onEditSuccess }\n const formLogic = alertFormLogic(formLogicProps)\n const { alertForm, isAlertFormSubmitting, alertFormChanged } = useValues(formLogic)\n const { deleteAlert, snoozeAlert, clearSnooze } = useActions(formLogic)\n const { setAlertFormValue } = useActions(formLogic)\n\n const trendsLogic = trendsDataLogic({ dashboardItemId: insightShortId })\n const { alertSeries, isNonTimeSeriesDisplay, isBreakdownValid, formula } = useValues(trendsLogic)\n\n const creatingNewAlert = alertForm.id === undefined\n // can only check ongoing interval for absolute value/increase alerts with upper threshold\n const can_check_ongoing_interval = canCheckOngoingInterval(alertForm)\n\n return (\n \n {alertLoading ? (\n \n ) : (\n \n \n
\n } onClick={onClose} size=\"xsmall\" />\n\n

{creatingNewAlert ? 'New' : 'Edit '} Alert

\n
\n
\n\n \n
\n
\n
\n \n \n \n \n \n \n
\n {alert?.created_by ? (\n \n ) : null}\n
\n\n
\n

Definition

\n
\n {isBreakdownValid && (\n \n For trends with breakdown, the alert will fire if any of the breakdown\n values breaches the threshold.\n \n )}\n
\n
When
\n \n \n ({\n label: isBreakdownValid\n ? 'any breakdown value'\n : formula\n ? `Formula (${formula})`\n : `${alphabet[index]} - ${\n custom_name ?? name ?? event\n }`,\n value: isBreakdownValid || formula ? 0 : index,\n })\n )}\n disabledReason={\n (isBreakdownValid &&\n `For trends with breakdown, the alert will fire if any of the breakdown\n values breaches the threshold.`) ||\n (formula &&\n `When using formula mode, can only alert on formula value`)\n }\n />\n \n \n \n \n \n \n \n
\n
\n
less than
\n \n \n setAlertFormValue('threshold', {\n configuration: {\n type: alertForm.threshold.configuration.type,\n bounds: {\n ...alertForm.threshold.configuration.bounds,\n lower:\n value &&\n alertForm.threshold.configuration.type ===\n InsightThresholdType.PERCENTAGE\n ? value / 100\n : value,\n },\n },\n })\n }\n />\n \n
or more than
\n \n \n setAlertFormValue('threshold', {\n configuration: {\n type: alertForm.threshold.configuration.type,\n bounds: {\n ...alertForm.threshold.configuration.bounds,\n upper:\n value &&\n alertForm.threshold.configuration.type ===\n InsightThresholdType.PERCENTAGE\n ? value / 100\n : value,\n },\n },\n })\n }\n />\n \n {alertForm.condition.type !== AlertConditionType.ABSOLUTE_VALUE && (\n \n \n \n \n \n )}\n
\n
\n
\n {alertForm.condition.type === AlertConditionType.ABSOLUTE_VALUE\n ? 'check'\n : 'compare'}\n
\n \n ({\n label: interval,\n value: interval,\n }))}\n />\n \n
and notify
\n
\n u.id) ?? []}\n idKey=\"id\"\n onChange={(value) => setAlertFormValue('subscribed_users', value)}\n />\n
\n
\n
\n
\n\n
\n

Advanced

\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n
\n
\n\n {alert && }\n
\n\n \n
\n
\n {!creatingNewAlert ? (\n \n Delete alert\n \n ) : null}\n {!creatingNewAlert && alert?.state === AlertState.FIRING ? (\n \n ) : null}\n {!creatingNewAlert && alert?.state === AlertState.SNOOZED ? (\n \n Clear snooze\n \n ) : null}\n
\n
\n \n {creatingNewAlert ? 'Create alert' : 'Save'}\n
\n \n \n )}\n \n )\n}\n","import Fuse from 'fuse.js'\nimport {\n actions,\n afterMount,\n connect,\n kea,\n key,\n listeners,\n path,\n props,\n reducers,\n selectors,\n sharedListeners,\n} from 'kea'\nimport { forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { encodeParams, urlToAction } from 'kea-router'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { isDomain, isURL } from 'lib/utils'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { urls } from 'scenes/urls'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport { ExperimentIdType, ToolbarParams, ToolbarUserIntent } from '~/types'\n\nimport type { authorizedUrlListLogicType } from './authorizedUrlListLogicType'\n\nexport interface ProposeNewUrlFormType {\n url: string\n}\n\nexport enum AuthorizedUrlListType {\n TOOLBAR_URLS = 'TOOLBAR_URLS',\n RECORDING_DOMAINS = 'RECORDING_DOMAINS',\n WEB_EXPERIMENTS = 'WEB_EXPERIMENTS',\n}\n\n/**\n * Firefox does not allow you construct a new URL with e.g. https://*.example.com (which is to be fair more standards compliant than Chrome)\n * when used to probe for e.g. for authorized urls we only care if the proposed URL has a path so we can safely replace the wildcard with a character\n * NB this changes its input and shouldn't be used for general purpose URL parsing\n */\nexport function sanitizePossibleWildCardedURL(url: string): URL {\n const deWildCardedURL = url.replace(/\\*/g, 'x')\n return new URL(deWildCardedURL)\n}\n\n/**\n * Checks if the URL has a wildcard (*) in the port position e.g. http://localhost:*\n */\nexport function hasPortWildcard(input: unknown): boolean {\n if (!input || typeof input !== 'string') {\n return false\n }\n // This regex matches URLs with a wildcard (*) in the port position\n const portWildcardRegex = /^(https?:\\/\\/[^:/]+):\\*(.*)$/\n return portWildcardRegex.test(input.trim())\n}\n\nexport const validateProposedUrl = (\n proposedUrl: string,\n currentUrls: string[],\n onlyAllowDomains: boolean = false\n): string | undefined => {\n if (!isURL(proposedUrl)) {\n return 'Please enter a valid URL'\n }\n\n if (hasPortWildcard(proposedUrl)) {\n return 'Wildcards are not allowed in the port position'\n }\n\n if (onlyAllowDomains && !isDomain(sanitizePossibleWildCardedURL(proposedUrl))) {\n return \"Please enter a valid domain (URLs with a path aren't allowed)\"\n }\n\n if (proposedUrl.indexOf('*') > -1 && !proposedUrl.match(/^(.*)\\*[^*]*\\.[^*]+\\.[^*]+$/)) {\n return 'Wildcards can only be used for subdomains'\n }\n\n if (currentUrls.indexOf(proposedUrl) > -1) {\n return `This ${onlyAllowDomains ? 'domains' : 'URL'} already is registered`\n }\n\n return\n}\n\n/** defaultIntent: whether to launch with empty intent (i.e. toolbar mode is default) */\nexport function appEditorUrl(\n appUrl: string,\n options?: { actionId?: number | null; experimentId?: ExperimentIdType; userIntent?: ToolbarUserIntent }\n): string {\n // See https://github.com/PostHog/posthog-js/blob/f7119c/src/extensions/toolbar.ts#L52 for where these params\n // are passed. `appUrl` is an extra `redirect_to_site` param.\n const params: ToolbarParams & { appUrl: string } = {\n userIntent:\n options?.userIntent ??\n (options?.actionId ? 'edit-action' : options?.experimentId ? 'edit-experiment' : 'add-action'),\n // Make sure to pass the app url, otherwise the api_host will be used by\n // the toolbar, which isn't correct when used behind a reverse proxy as\n // we require e.g. SSO login to the app, which will not work when placed\n // behind a proxy unless we register each domain with the OAuth2 client.\n apiURL: apiHostOrigin(),\n appUrl,\n ...(options?.actionId ? { actionId: options.actionId } : {}),\n ...(options?.experimentId ? { experimentId: options.experimentId } : {}),\n }\n return '/api/user/redirect_to_site/' + encodeParams(params, '?')\n}\n\nexport const checkUrlIsAuthorized = (url: string | URL, authorizedUrls: string[]): boolean => {\n try {\n const parsedUrl = typeof url === 'string' ? sanitizePossibleWildCardedURL(url) : url\n const urlWithoutPath = parsedUrl.protocol + '//' + parsedUrl.host\n // Is this domain already in the list of urls?\n const exactMatch =\n authorizedUrls.filter((authorizedUrl) => authorizedUrl.indexOf(urlWithoutPath) > -1).length > 0\n\n if (exactMatch) {\n return true\n }\n\n const wildcardMatch = !!authorizedUrls.find((authorizedUrl) => {\n // Matches something like `https://*.example.com` against the urlWithoutPath\n const regex = new RegExp(authorizedUrl.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*'))\n return urlWithoutPath.match(regex)\n })\n\n if (wildcardMatch) {\n return true\n }\n } catch (error) {\n // Ignore invalid URLs\n }\n\n return false\n}\n\nexport interface SuggestedDomain {\n url: string\n count: number\n}\n\nexport const filterNotAuthorizedUrls = (\n suggestions: SuggestedDomain[],\n authorizedUrls: string[]\n): SuggestedDomain[] => {\n const suggestedDomains: SuggestedDomain[] = []\n\n suggestions.forEach(({ url, count }) => {\n const parsedUrl = sanitizePossibleWildCardedURL(url)\n const urlWithoutPath = parsedUrl.protocol + '//' + parsedUrl.host\n // Have we already added this domain?\n if (suggestedDomains.some((sd) => sd.url === urlWithoutPath)) {\n return\n }\n\n if (!checkUrlIsAuthorized(parsedUrl, authorizedUrls)) {\n suggestedDomains.push({ url: urlWithoutPath, count })\n }\n })\n\n return suggestedDomains\n}\n\nexport const NEW_URL = 'https://'\n\nexport interface KeyedAppUrl {\n url: string\n type: 'authorized' | 'suggestion'\n originalIndex: number\n // how many seen in the last three days\n count?: number\n}\n\nexport interface AuthorizedUrlListLogicProps {\n actionId: number | null\n experimentId: ExperimentIdType | null\n type: AuthorizedUrlListType\n query: string | null | undefined\n}\n\nexport const defaultAuthorizedUrlProperties = {\n actionId: null,\n experimentId: null,\n query: null,\n}\n\nexport const authorizedUrlListLogic = kea([\n path((key) => ['lib', 'components', 'AuthorizedUrlList', 'authorizedUrlListLogic', key]),\n key((props) => (props.experimentId ? `${props.type}-${props.experimentId}` : `${props.type}-${props.actionId}`)),\n props({} as AuthorizedUrlListLogicProps),\n connect({\n values: [teamLogic, ['currentTeam', 'currentTeamId']],\n actions: [teamLogic, ['updateCurrentTeam']],\n }),\n actions(() => ({\n setAuthorizedUrls: (authorizedUrls: string[]) => ({ authorizedUrls }),\n addUrl: (url: string, launch?: boolean) => ({ url, launch }),\n newUrl: true,\n removeUrl: (index: number) => ({ index }),\n updateUrl: (index: number, url: string) => ({ index, url }),\n launchAtUrl: (url: string) => ({ url }),\n setSearchTerm: (term: string) => ({ term }),\n setEditUrlIndex: (originalIndex: number | null) => ({ originalIndex }),\n cancelProposingUrl: true,\n })),\n loaders(({ values }) => ({\n suggestions: {\n __default: [] as SuggestedDomain[],\n loadSuggestions: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`select properties.$current_url, count()\n from events\n where event = '$pageview'\n and timestamp >= now() - interval 3 day \n and timestamp <= now()\n group by properties.$current_url\n order by count() desc\n limit 25`,\n }\n\n const response = await api.query(query)\n const result = response.results as [string, number][]\n\n if (result && result.length === 0) {\n return []\n }\n\n const suggestedDomains = filterNotAuthorizedUrls(\n result.map(([url, count]) => ({ url, count })),\n values.authorizedUrls\n )\n\n return suggestedDomains.slice(0, 20)\n },\n },\n })),\n subscriptions(({ props, actions }) => ({\n currentTeam: (currentTeam) => {\n actions.setAuthorizedUrls(\n (props.type === AuthorizedUrlListType.RECORDING_DOMAINS\n ? currentTeam.recording_domains\n : currentTeam.app_urls) || []\n )\n },\n })),\n afterMount(({ actions }) => {\n actions.loadSuggestions()\n }),\n forms(({ values, actions }) => ({\n proposedUrl: {\n defaults: { url: '' } as ProposeNewUrlFormType,\n errors: ({ url }) => ({\n url: validateProposedUrl(url, values.authorizedUrls, values.onlyAllowDomains),\n }),\n submit: async ({ url }) => {\n if (values.editUrlIndex !== null && values.editUrlIndex >= 0) {\n actions.updateUrl(values.editUrlIndex, url)\n } else {\n actions.addUrl(url)\n }\n },\n },\n })),\n reducers(() => ({\n showProposedURLForm: [\n false as boolean,\n {\n newUrl: () => true,\n submitProposedUrlSuccess: () => false,\n cancelProposingUrl: () => false,\n },\n ],\n authorizedUrls: [\n [] as string[],\n {\n setAuthorizedUrls: (_, { authorizedUrls }) => authorizedUrls,\n addUrl: (state, { url }) => (!state.includes(url) ? state.concat([url]) : state),\n updateUrl: (state, { index, url }) => Object.assign([...state], { [index]: url }),\n removeUrl: (state, { index }) => {\n const newUrls = [...state]\n newUrls.splice(index, 1)\n return newUrls\n },\n },\n ],\n suggestions: [\n [],\n {\n addUrl: (state, { url }) => [...state].filter((sd) => url !== sd.url),\n },\n ],\n searchTerm: [\n '',\n {\n setSearchTerm: (_, { term }) => term,\n },\n ],\n editUrlIndex: [\n null as number | null,\n {\n setEditUrlIndex: (_, { originalIndex }) => originalIndex,\n removeUrl: (editUrlIndex, { index }) =>\n editUrlIndex && index < editUrlIndex\n ? editUrlIndex - 1\n : index === editUrlIndex\n ? null\n : editUrlIndex,\n newUrl: () => -1,\n updateUrl: () => null,\n addUrl: () => null,\n cancelProposingUrl: () => null,\n },\n ],\n })),\n sharedListeners(({ values, props }) => ({\n saveUrls: async () => {\n if (props.type === AuthorizedUrlListType.RECORDING_DOMAINS) {\n await teamLogic.asyncActions.updateCurrentTeam({ recording_domains: values.authorizedUrls })\n } else {\n await teamLogic.asyncActions.updateCurrentTeam({ app_urls: values.authorizedUrls })\n }\n },\n })),\n listeners(({ sharedListeners, values, actions }) => ({\n setEditUrlIndex: () => {\n actions.setProposedUrlValue('url', values.urlToEdit)\n },\n newUrl: () => {\n actions.setProposedUrlValue('url', NEW_URL)\n },\n addUrl: [\n sharedListeners.saveUrls,\n ({ url, launch }) => {\n if (launch) {\n actions.launchAtUrl(url)\n }\n },\n ],\n removeUrl: sharedListeners.saveUrls,\n updateUrl: sharedListeners.saveUrls,\n launchAtUrl: ({ url }) => {\n window.location.href = values.launchUrl(url)\n },\n cancelProposingUrl: () => {\n actions.resetProposedUrl()\n },\n submitProposedUrlSuccess: () => {\n actions.setEditUrlIndex(null)\n actions.resetProposedUrl()\n },\n })),\n selectors({\n urlToEdit: [\n (s) => [s.authorizedUrls, s.editUrlIndex],\n (authorizedUrls, editUrlIndex) => {\n if (editUrlIndex === null || editUrlIndex === -1) {\n return NEW_URL\n }\n return authorizedUrls[editUrlIndex]\n },\n ],\n urlsKeyed: [\n (s) => [s.authorizedUrls, s.suggestions, s.searchTerm],\n (authorizedUrls, suggestions, searchTerm): KeyedAppUrl[] => {\n const keyedUrls = authorizedUrls\n .map((url, index) => ({\n url,\n type: 'authorized',\n originalIndex: index,\n }))\n .concat(\n suggestions.map(({ url, count }, index) => ({\n url,\n type: 'suggestion',\n originalIndex: index,\n count,\n }))\n ) as KeyedAppUrl[]\n\n if (!searchTerm) {\n return keyedUrls\n }\n\n return new Fuse(keyedUrls, {\n keys: ['url'],\n threshold: 0.3,\n })\n .search(searchTerm)\n .map((result) => result.item)\n },\n ],\n launchUrl: [\n (_, p) => [p.actionId, p.experimentId],\n (actionId, experimentId) => (url: string) => {\n if (experimentId) {\n return appEditorUrl(url, {\n experimentId,\n })\n }\n\n return appEditorUrl(url, {\n actionId,\n })\n },\n ],\n isAddUrlFormVisible: [(s) => [s.editUrlIndex], (editUrlIndex) => editUrlIndex === -1],\n onlyAllowDomains: [(_, p) => [p.type], (type) => type === AuthorizedUrlListType.RECORDING_DOMAINS],\n\n checkUrlIsAuthorized: [\n (s) => [s.authorizedUrls],\n (authorizedUrls) => (url: string) => {\n return checkUrlIsAuthorized(url, authorizedUrls)\n },\n ],\n }),\n urlToAction(({ actions }) => ({\n [urls.toolbarLaunch()]: (_, searchParams) => {\n if (searchParams.addNew) {\n actions.newUrl()\n }\n },\n })),\n])\n","import { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { featureFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport posthog from 'posthog-js'\nimport { teamLogic } from 'scenes/teamLogic'\n\nfunction snippetFunctions(arrayJs = '/static/array.js'): string {\n const methods: string[] = []\n const posthogPrototype = Object.getPrototypeOf(posthog)\n for (const key of Object.getOwnPropertyNames(posthogPrototype)) {\n if (\n typeof posthogPrototype[key] === 'function' &&\n !key.startsWith('_') &&\n !['constructor', 'toString', 'push'].includes(key)\n ) {\n methods.push(key)\n }\n }\n const snippetMethods = methods.join(' ')\n\n return `!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\")+\"${arrayJs}\",(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=\"${snippetMethods}\".split(\" \"),n=0;n',\n ` ${snippetFunctions(arrayJs)}`,\n ` posthog.init('${currentTeam?.api_token}', {\n api_host:'${apiHostOrigin()}'${\n isPersonProfilesDisabled\n ? ``\n : `,\\n person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well`\n }\n })`,\n '',\n ]\n .map((x) => ' '.repeat(indent) + x)\n .join('\\n')\n}\n\nexport function JSSnippet(): JSX.Element {\n const snippet = useJsSnippet()\n\n return {snippet}\n}\n\nexport function JSSnippetV2(): JSX.Element {\n const { currentTeam } = useValues(teamLogic)\n\n const snippet = useJsSnippet(0, `/array/${currentTeam?.api_token}/array.js`)\n\n return {snippet}\n}\n","import { connect, kea, path, selectors } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { membersLogic } from 'scenes/organization/membersLogic'\n\nimport { sidePanelContextLogic } from '~/layout/navigation-3000/sidepanel/panels/sidePanelContextLogic'\nimport { SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { metalyticsLogicType } from './metalyticsLogicType'\n\nexport const metalyticsLogic = kea([\n path(['lib', 'components', 'metalytics', 'metalyticsLogic']),\n connect({\n values: [sidePanelContextLogic, ['sceneSidePanelContext'], membersLogic, ['members']],\n }),\n\n loaders(({ values }) => ({\n viewCount: [\n null as { views: number; users: number } | null,\n {\n loadViewCount: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT SUM(count) AS count, COUNT(DISTINCT app_source_id) AS unique_users\n FROM app_metrics\n WHERE app_source = 'metalytics'\n AND instance_id = ${values.instanceId}`,\n }\n\n // NOTE: I think this gets cached heavily - how to correctly invalidate?\n const response = await api.query(query, undefined, undefined, true)\n const result = response.results as number[][]\n return {\n views: result[0][0],\n users: result[0][1],\n }\n },\n },\n ],\n recentUsers: [\n [] as string[],\n {\n loadUsersLast30days: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT DISTINCT app_source_id\n FROM app_metrics\n WHERE app_source = 'metalytics'\n AND instance_id = ${values.instanceId}\n AND timestamp >= NOW() - INTERVAL 30 DAY\n ORDER BY timestamp DESC`,\n }\n\n const response = await api.query(query, undefined, undefined, true)\n return response.results.map((result) => result[0]) as string[]\n },\n },\n ],\n })),\n\n selectors({\n instanceId: [\n (s) => [s.sceneSidePanelContext],\n (sidePanelContext: SidePanelSceneContext) =>\n sidePanelContext?.activity_item_id\n ? `${sidePanelContext.activity_scope}:${sidePanelContext.activity_item_id}`\n : null,\n ],\n scope: [\n (s) => [s.sceneSidePanelContext],\n (sidePanelContext: SidePanelSceneContext) => sidePanelContext?.activity_scope,\n ],\n\n recentUserMembers: [\n (s) => [s.recentUsers, s.members],\n (recentUsers, members) => {\n if (!members || !recentUsers) {\n return []\n }\n // Filter members whose IDs match the recentUsers array\n const filteredMembers = members.filter((member) => recentUsers.includes(String(member.user.id)))\n return filteredMembers\n },\n ],\n }),\n\n subscriptions(({ actions }) => ({\n instanceId: async (instanceId) => {\n if (instanceId) {\n actions.loadViewCount()\n actions.loadUsersLast30days()\n\n await api.create('/api/projects/@current/metalytics/', {\n metric_name: 'viewed',\n instance_id: instanceId,\n })\n }\n },\n })),\n])\n","import { IconBug, IconInfo, IconQuestion } from '@posthog/icons'\nimport {\n LemonInput,\n LemonSegmentedButton,\n LemonSegmentedButtonOption,\n lemonToast,\n Link,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { useUploadFiles } from 'lib/hooks/useUploadFiles'\nimport { IconFeedback } from 'lib/lemon-ui/icons'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonFileInput } from 'lib/lemon-ui/LemonFileInput/LemonFileInput'\nimport { LemonSelect } from 'lib/lemon-ui/LemonSelect/LemonSelect'\nimport { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { useRef } from 'react'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport {\n SEVERITY_LEVEL_TO_NAME,\n SUPPORT_TICKET_TEMPLATES,\n supportLogic,\n SupportTicketKind,\n TARGET_AREA_TO_NAME,\n} from './supportLogic'\n\nconst SUPPORT_TICKET_OPTIONS: LemonSegmentedButtonOption[] = [\n {\n value: 'support',\n label: 'Question',\n icon: ,\n },\n {\n value: 'feedback',\n label: 'Feedback',\n icon: ,\n },\n {\n value: 'bug',\n label: 'Bug',\n icon: ,\n },\n]\n\nconst SUPPORT_TICKET_KIND_TO_PROMPT: Record = {\n bug: \"What's the bug?\",\n feedback: 'What feedback do you have?',\n support: 'What can we help you with?',\n}\n\nexport function SupportForm(): JSX.Element | null {\n const { sendSupportRequest } = useValues(supportLogic)\n const { setSendSupportRequestValue } = useActions(supportLogic)\n const { objectStorageAvailable } = useValues(preflightLogic)\n // the support model can be shown when logged out, file upload is not offered to anonymous users\n const { user } = useValues(userLogic)\n // only allow authentication issues for logged out users\n\n const dropRef = useRef(null)\n\n const { setFilesToUpload, filesToUpload, uploading } = useUploadFiles({\n onUpload: (url, fileName) => {\n setSendSupportRequestValue('message', sendSupportRequest.message + `\\n\\nAttachment \"${fileName}\": ${url}`)\n },\n onError: (detail) => {\n lemonToast.error(`Error uploading image: ${detail}`)\n },\n })\n\n const changeKind = (kind: SupportTicketKind): void => {\n setSendSupportRequestValue('kind', kind)\n if (kind === 'bug') {\n setSendSupportRequestValue('severity_level', 'medium')\n } else {\n setSendSupportRequestValue('severity_level', 'low')\n }\n }\n\n return (\n \n {!user && (\n <>\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n \n \n {(props) => (\n
\n \n {objectStorageAvailable && !!user && (\n \n )}\n
\n )}\n \n
\n
\n \n \n Definitions\n \n
\n \n ({\n label: value,\n value: key,\n }))}\n />\n \n
\n \n )\n}\n","import { captureException } from '@sentry/react'\nimport * as Sentry from '@sentry/react'\nimport { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'\nimport { forms } from 'kea-forms'\nimport { urlToAction } from 'kea-router'\nimport { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'\nimport { uuid } from 'lib/utils'\nimport posthog from 'posthog-js'\nimport { organizationLogic } from 'scenes/organizationLogic'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'\nimport { AvailableFeature, OrganizationBasicType, Region, SidePanelTab, TeamPublicType, UserType } from '~/types'\n\nimport type { supportLogicType } from './supportLogicType'\nimport { openSupportModal } from './SupportModal'\n\nexport function getPublicSupportSnippet(\n cloudRegion: Region | null | undefined,\n currentOrganization: OrganizationBasicType | null,\n currentTeam: TeamPublicType | null,\n includeCurrentLocation = true\n): string {\n if (!cloudRegion) {\n return ''\n }\n return (\n (includeCurrentLocation ? getCurrentLocationLink() : '') +\n getSessionReplayLink() +\n `\\nAdmin: http://go/adminOrg${cloudRegion}/${currentOrganization?.id} (project ID ${currentTeam?.id})` +\n getSentryLink(cloudRegion, currentTeam)\n ).trimStart()\n}\n\nfunction getCurrentLocationLink(): string {\n const cleanedCurrentUrl = window.location.href.replace(/panel=support[^&]*(&)?/, '').replace(/#$/, '')\n return `\\nLocation: ${cleanedCurrentUrl}`\n}\n\nfunction getSessionReplayLink(): string {\n const replayUrl = posthog\n .get_session_replay_url({ withTimestamp: true, timestampLookBack: 30 })\n .replace(window.location.origin + '/replay/', 'http://go/session/')\n return `\\nSession: ${replayUrl}`\n}\n\nfunction getErrorTrackingLink(): string {\n const filterGroup = encodeURIComponent(\n JSON.stringify({\n type: 'AND',\n values: [\n {\n type: 'AND',\n values: [\n {\n key: '$session_id',\n value: [posthog.get_session_id()],\n operator: 'exact',\n type: 'event',\n },\n ],\n },\n ],\n })\n )\n\n return `\\nExceptions: https://us.posthog.com/project/2/error_tracking?filterGroup=${filterGroup}`\n}\n\nfunction getDjangoAdminLink(\n user: UserType | null,\n cloudRegion: Region | null | undefined,\n currentOrganization: OrganizationBasicType | null,\n currentTeam: TeamPublicType | null\n): string {\n if (!user || !cloudRegion) {\n return ''\n }\n const link = `http://go/admin${cloudRegion}/${user.email}`\n return `\\nAdmin: ${link} (organization ID ${currentOrganization?.id}: ${currentOrganization?.name}, project ID ${currentTeam?.id}: ${currentTeam?.name})`\n}\n\nfunction getBillingAdminLink(currentOrganization: OrganizationBasicType | null): string {\n if (!currentOrganization) {\n return ''\n }\n return `\\nBilling admin: http://go/billing/${currentOrganization.id}`\n}\n\nfunction getSentryLink(cloudRegion: Region | null | undefined, currentTeam: TeamPublicType | null): string {\n if (!cloudRegion || !currentTeam) {\n return ''\n }\n return `\\nSentry: http://go/sentry${cloudRegion}/${currentTeam.id}`\n}\n\nconst SUPPORT_TICKET_KIND_TO_TITLE: Record = {\n support: 'Contact support',\n feedback: 'Give feedback',\n bug: 'Report a bug',\n}\n\nexport const TARGET_AREA_TO_NAME = [\n {\n title: 'General',\n options: [\n {\n value: 'apps',\n 'data-attr': `support-form-target-area-apps`,\n label: 'Data pipelines',\n },\n {\n value: 'login',\n 'data-attr': `support-form-target-area-login`,\n label: 'Authentication (incl. login, sign-up, invites)',\n },\n {\n value: 'billing',\n 'data-attr': `support-form-target-area-billing`,\n label: 'Billing',\n },\n {\n value: 'onboarding',\n 'data-attr': `support-form-target-area-onboarding`,\n label: 'Onboarding',\n },\n {\n value: 'sdk',\n 'data-attr': `support-form-target-area-onboarding`,\n label: 'SDK / Implementation',\n },\n {\n value: 'cohorts',\n 'data-attr': `support-form-target-area-cohorts`,\n label: 'Cohorts',\n },\n {\n value: 'data_management',\n 'data-attr': `support-form-target-area-data_management`,\n label: 'Data management (incl. events, actions, properties)',\n },\n {\n value: 'notebooks',\n 'data-attr': `support-form-target-area-notebooks`,\n label: 'Notebooks',\n },\n {\n value: 'mobile',\n 'data-attr': `support-form-target-area-mobile`,\n label: 'Mobile',\n },\n ],\n },\n {\n title: 'Individual product',\n options: [\n {\n value: 'experiments',\n 'data-attr': `support-form-target-area-experiments`,\n label: 'Experiments',\n },\n {\n value: 'data_warehouse',\n 'data-attr': `support-form-target-area-data_warehouse`,\n label: 'Data warehouse',\n },\n {\n value: 'batch_exports',\n 'data-attr': `support-form-target-area-batch-exports`,\n label: 'Batch exports',\n },\n {\n value: 'feature_flags',\n 'data-attr': `support-form-target-area-feature_flags`,\n label: 'Feature flags',\n },\n {\n value: 'analytics',\n 'data-attr': `support-form-target-area-analytics`,\n label: 'Product analytics (incl. insights, dashboards, annotations)',\n },\n {\n value: 'session_replay',\n 'data-attr': `support-form-target-area-session_replay`,\n label: 'Session replay (incl. recordings)',\n },\n {\n value: 'toolbar',\n 'data-attr': `support-form-target-area-toolbar`,\n label: 'Toolbar (incl. heatmaps)',\n },\n {\n value: 'surveys',\n 'data-attr': `support-form-target-area-surveys`,\n label: 'Surveys',\n },\n {\n value: 'web_analytics',\n 'data-attr': `support-form-target-area-web_analytics`,\n label: 'Web Analytics',\n },\n {\n value: 'error_tracking',\n 'data-attr': `support-form-target-area-error_tracking`,\n label: 'Error tracking',\n },\n ],\n },\n]\n\nexport const SEVERITY_LEVEL_TO_NAME = {\n critical: 'Outage, data loss, or data breach',\n high: 'Feature is not working at all',\n medium: 'Feature not working as expected',\n low: 'Question or feature request',\n}\n\nexport const SUPPORT_KIND_TO_SUBJECT = {\n bug: 'Bug Report',\n feedback: 'Feedback',\n support: 'Support Ticket',\n}\n\nexport type SupportTicketTargetArea =\n | 'experiments'\n | 'apps'\n | 'login'\n | 'billing'\n | 'onboarding'\n | 'cohorts'\n | 'data_management'\n | 'notebooks'\n | 'data_warehouse'\n | 'feature_flags'\n | 'analytics'\n | 'session_replay'\n | 'toolbar'\n | 'surveys'\n | 'web_analytics'\n | 'error_tracking'\nexport type SupportTicketSeverityLevel = keyof typeof SEVERITY_LEVEL_TO_NAME\nexport type SupportTicketKind = keyof typeof SUPPORT_KIND_TO_SUBJECT\n\nexport const getLabelBasedOnTargetArea = (target_area: SupportTicketTargetArea): null | string => {\n for (const category of TARGET_AREA_TO_NAME) {\n for (const option of category.options) {\n if (option.value === target_area) {\n return option.label\n }\n }\n }\n return null // Return null if the value is not found\n}\n\nexport const URL_PATH_TO_TARGET_AREA: Record = {\n insights: 'analytics',\n recordings: 'session_replay',\n replay: 'session_replay',\n dashboard: 'analytics',\n feature_flags: 'feature_flags',\n experiments: 'experiments',\n 'web-performance': 'session_replay',\n events: 'analytics',\n 'data-management': 'data_management',\n cohorts: 'cohorts',\n annotations: 'analytics',\n persons: 'analytics',\n groups: 'analytics',\n app: 'apps',\n toolbar: 'session_replay',\n warehouse: 'data_warehouse',\n surveys: 'surveys',\n web: 'web_analytics',\n}\n\nexport const SUPPORT_TICKET_TEMPLATES = {\n bug: 'Please describe the bug you saw, and how to reproduce it.\\n\\nIf the bug appeared on a specific insight or dashboard, please include a link to it.',\n feedback:\n \"If your request is due to a problem, please describe the problem as best you can.\\n\\nPlease also describe the solution you'd like to see, and any alternatives you considered.\\n\\nYou can add images below to help illustrate your request, if needed!\",\n support:\n \"Please explain as fully as possible what you're aiming to do, and what you'd like help with.\\n\\nIf your question involves an existing insight or dashboard, please include a link to it.\",\n}\n\nexport function getURLPathToTargetArea(pathname: string): SupportTicketTargetArea | null {\n const first_part = pathname.split('/')[1]\n return URL_PATH_TO_TARGET_AREA[first_part] ?? null\n}\n\nexport type SupportFormLogicProps = {\n onClose?: () => void\n}\n\nexport type SupportFormFields = {\n name: string\n email: string\n kind: SupportTicketKind\n target_area: SupportTicketTargetArea | null\n severity_level: SupportTicketSeverityLevel | null\n message: string\n isEmailFormOpen?: boolean | 'true' | 'false'\n}\n\nexport const supportLogic = kea([\n props({} as SupportFormLogicProps),\n path(['lib', 'components', 'support', 'supportLogic']),\n connect(() => ({\n values: [\n userLogic,\n ['user'],\n preflightLogic,\n ['preflight'],\n sidePanelStateLogic,\n ['sidePanelAvailable'],\n userLogic,\n ['hasAvailableFeature'],\n ],\n actions: [sidePanelStateLogic, ['openSidePanel', 'setSidePanelOptions']],\n })),\n actions(() => ({\n closeSupportForm: true,\n openSupportForm: (values: Partial) => values,\n submitZendeskTicket: (form: SupportFormFields) => form,\n updateUrlParams: true,\n openEmailForm: true,\n closeEmailForm: true,\n })),\n reducers(() => ({\n isSupportFormOpen: [\n false,\n {\n openSupportForm: () => true,\n closeSupportForm: () => false,\n },\n ],\n isEmailFormOpen: [\n false,\n {\n openEmailForm: () => true,\n closeEmailForm: () => false,\n },\n ],\n })),\n forms(({ actions, values }) => ({\n sendSupportRequest: {\n defaults: {\n name: '',\n email: '',\n kind: 'support',\n severity_level: null,\n target_area: null,\n message: '',\n } as SupportFormFields,\n errors: ({ name, email, message, kind, target_area, severity_level }) => {\n return {\n name: !values.user ? (!name ? 'Please enter your name' : '') : '',\n email: !values.user ? (!email ? 'Please enter your email' : '') : '',\n message: !message ? 'Please enter a message' : '',\n kind: !kind ? 'Please choose' : undefined,\n severity_level: !severity_level ? 'Please choose' : undefined,\n target_area: !target_area ? 'Please choose' : undefined,\n }\n },\n submit: async (formValues) => {\n // name must be present for zendesk to accept the ticket\n formValues.name = values.user?.first_name ?? formValues.name ?? 'name not set'\n formValues.email = values.user?.email ?? formValues.email ?? ''\n actions.submitZendeskTicket(formValues)\n actions.closeSupportForm()\n actions.resetSendSupportRequest()\n },\n },\n })),\n selectors({\n title: [\n (s) => [s.sendSupportRequest ?? null],\n (sendSupportRequest) =>\n sendSupportRequest.kind\n ? SUPPORT_TICKET_KIND_TO_TITLE[sendSupportRequest.kind]\n : 'Leave a message with PostHog',\n ],\n }),\n listeners(({ actions, props, values }) => ({\n updateUrlParams: async () => {\n const panelOptions = [\n values.sendSupportRequest.kind ?? '',\n values.sendSupportRequest.target_area ?? '',\n values.sendSupportRequest.severity_level ?? '',\n values.isEmailFormOpen ?? 'false',\n ].join(':')\n\n if (panelOptions !== ':') {\n actions.setSidePanelOptions(panelOptions)\n }\n },\n openSupportForm: async ({ name, email, isEmailFormOpen, kind, target_area, severity_level, message }) => {\n let area = target_area ?? getURLPathToTargetArea(window.location.pathname)\n if (!userLogic.values.user) {\n area = 'login'\n }\n kind = kind ?? 'support'\n actions.resetSendSupportRequest({\n name: name ?? '',\n email: email ?? '',\n kind,\n target_area: area,\n severity_level: severity_level ?? null,\n message: message ?? '',\n })\n\n if (isEmailFormOpen === 'true' || isEmailFormOpen === true) {\n actions.openEmailForm()\n } else {\n actions.closeEmailForm()\n }\n\n if (values.sidePanelAvailable) {\n const panelOptions = [kind ?? '', area ?? ''].join(':')\n actions.openSidePanel(SidePanelTab.Support, panelOptions === ':' ? undefined : panelOptions)\n } else {\n openSupportModal()\n }\n\n actions.updateUrlParams()\n },\n submitZendeskTicket: async ({ name, email, kind, target_area, severity_level, message }) => {\n const zendesk_ticket_uuid = uuid()\n const subject =\n SUPPORT_KIND_TO_SUBJECT[kind ?? 'support'] +\n ': ' +\n (target_area\n ? getLabelBasedOnTargetArea(target_area) ?? `${target_area} (feature preview)`\n : 'General') +\n ' (' +\n zendesk_ticket_uuid +\n ')'\n const cloudRegion = preflightLogic.values.preflight?.region\n\n const payload = {\n request: {\n requester: { name: name, email: email },\n subject: subject,\n custom_fields: [\n {\n id: 22084126888475,\n value: severity_level,\n },\n {\n id: 22129191462555,\n value: posthog.get_distinct_id(),\n },\n {\n id: 27242745654043,\n value: target_area ?? '',\n },\n {\n id: 27031528411291,\n value: userLogic?.values?.user?.organization?.id ?? '',\n },\n {\n id: 26073267652251,\n value: values.hasAvailableFeature(AvailableFeature.PRIORITY_SUPPORT)\n ? 'priority_support'\n : values.hasAvailableFeature(AvailableFeature.EMAIL_SUPPORT)\n ? 'email_support'\n : 'free_support',\n },\n ],\n comment: {\n body:\n message +\n `\\n\\n-----` +\n `\\nKind: ${kind}` +\n `\\nTarget area: ${target_area}` +\n `\\nReport event: http://go/ticketByUUID/${zendesk_ticket_uuid}` +\n getSessionReplayLink() +\n getErrorTrackingLink() +\n getCurrentLocationLink() +\n getDjangoAdminLink(\n userLogic.values.user,\n cloudRegion,\n organizationLogic.values.currentOrganization,\n teamLogic.values.currentTeam\n ) +\n (target_area === 'billing' || target_area === 'login' || target_area === 'onboarding'\n ? getBillingAdminLink(organizationLogic.values.currentOrganization)\n : '') +\n getSentryLink(cloudRegion, teamLogic.values.currentTeam) +\n (cloudRegion && teamLogic.values.currentTeam\n ? '\\nPersons-on-events mode for project: ' +\n (teamLogic.values.currentTeam.modifiers?.personsOnEventsMode ??\n teamLogic.values.currentTeam.default_modifiers?.personsOnEventsMode ??\n 'unknown')\n : ''),\n },\n },\n }\n\n try {\n const zendeskRequestBody = JSON.stringify(payload, undefined, 4)\n const response = await fetch('https://posthoghelp.zendesk.com/api/v2/requests.json', {\n method: 'POST',\n body: zendeskRequestBody,\n headers: { 'Content-Type': 'application/json' },\n })\n if (!response.ok) {\n const error = new Error(`There was an error creating the support ticket with zendesk.`)\n const extra: Record = { zendeskBody: zendeskRequestBody }\n Object.entries(payload).forEach(([key, value]) => {\n extra[`payload_${key}`] = value\n })\n const body = await response.text()\n const contexts = {\n response: {\n status_code: response.status,\n data: body,\n body_size: body?.length,\n },\n }\n captureException(error, {\n extra,\n contexts,\n })\n lemonToast.error(`There was an error sending the message.`)\n return\n }\n\n const json = await response.json()\n\n const zendesk_ticket_id = json.request.id\n const zendesk_ticket_link = `https://posthoghelp.zendesk.com/agent/tickets/${zendesk_ticket_id}`\n const properties = {\n zendesk_ticket_uuid,\n kind,\n target_area,\n message,\n zendesk_ticket_id,\n zendesk_ticket_link,\n }\n posthog.capture('support_ticket', properties)\n Sentry.captureMessage('User submitted Zendesk ticket', {\n tags: {\n zendesk_ticket_uuid,\n zendesk_ticket_link,\n support_request_kind: kind,\n support_request_area: target_area,\n team_id: teamLogic.values.currentTeamId,\n },\n extra: properties,\n level: 'log',\n })\n lemonToast.success(\"Got the message! If we have follow-up information for you, we'll reply via email.\")\n } catch (e) {\n captureException(e)\n lemonToast.error(`There was an error sending the message.`)\n }\n },\n\n closeSupportForm: () => {\n props.onClose?.()\n },\n\n setSendSupportRequestValue: () => {\n actions.updateUrlParams()\n },\n })),\n\n urlToAction(({ actions, values }) => ({\n '*': (_, _search, hashParams) => {\n if (values.isSupportFormOpen) {\n return\n }\n\n const [panel, ...panelOptions] = (hashParams['panel'] ?? '').split(':')\n\n if (panel === SidePanelTab.Support) {\n const [kind, area, severity, isEmailFormOpen] = panelOptions\n\n actions.openSupportForm({\n kind: Object.keys(SUPPORT_KIND_TO_SUBJECT).includes(kind) ? kind : null,\n target_area: getLabelBasedOnTargetArea(area) ? area : null,\n severity_level: Object.keys(SEVERITY_LEVEL_TO_NAME).includes(severity) ? severity : null,\n isEmailFormOpen: isEmailFormOpen ?? 'false',\n })\n return\n }\n\n // Legacy supportModal param\n if ('supportModal' in hashParams) {\n const [kind, area, severity] = (hashParams['supportModal'] || '').split(':')\n\n actions.openSupportForm({\n kind: Object.keys(SUPPORT_KIND_TO_SUBJECT).includes(kind) ? kind : null,\n target_area: Object.keys(TARGET_AREA_TO_NAME).includes(area) ? area : null,\n severity_level: Object.keys(SEVERITY_LEVEL_TO_NAME).includes(severity) ? severity : null,\n })\n }\n },\n })),\n])\n","import { actions, afterMount, kea, key, listeners, path, props, reducers, sharedListeners } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\nimport { isNotNil } from 'lib/utils'\nimport {\n diffVersions,\n highestVersion,\n isEqualVersion,\n parseVersion,\n SemanticVersion,\n tryParseVersion,\n versionToString,\n} from 'lib/utils/semver'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\n\nimport type { versionCheckerLogicType } from './versionCheckerLogicType'\n\n// If you would like to deprecate all posthog-js versions older than a specific version\n// (i.e. after fixing an important bug) please edit\n// https://github.com/PostHog/posthog-js/blob/main/deprecation.json\n\nconst CHECK_INTERVAL_MS = 1000 * 60 * 60 * 6 // 6 hour\n\nexport type SDKVersion = {\n version: SemanticVersion\n timestamp?: string\n}\n\nexport type SDKVersionWarning = {\n latestUsedVersion: string\n latestAvailableVersion: string\n numVersionsBehind?: number\n level: 'warning' | 'info' | 'error'\n}\n\nexport interface PosthogJSDeprecation {\n deprecateBeforeVersion?: string\n deprecateOlderThanDays?: number\n}\n\nexport interface AvailableVersions {\n sdkVersions?: SemanticVersion[]\n deprecation?: PosthogJSDeprecation\n}\n\nexport interface VersionCheckerLogicProps {\n teamId: number | null\n}\n\nexport const versionCheckerLogic = kea([\n props({ teamId: null } as VersionCheckerLogicProps),\n key(({ teamId }) => teamId || 'no-team-id'),\n path((key) => ['components', 'VersionChecker', 'versionCheckerLogic', key]),\n actions({\n setVersionWarning: (versionWarning: SDKVersionWarning | null) => ({ versionWarning }),\n setSdkVersions: (sdkVersions: SDKVersion[]) => ({ sdkVersions }),\n }),\n loaders(({ values }) => ({\n availableVersions: [\n {} as AvailableVersions,\n {\n loadAvailableVersions: async (): Promise => {\n // Make both requests simultaneously and don't return until both have finished, to avoid a flash\n // of partial results in the UI.\n const availableVersionsPromise: Promise = fetch(\n 'https://api.github.com/repos/posthog/posthog-js/tags'\n )\n .then((r) => r.json())\n .then((r) => r.map((x: any) => tryParseVersion(x.name)).filter(isNotNil))\n const deprecationPromise: Promise = fetch(\n 'https://raw.githubusercontent.com/PostHog/posthog-js/main/deprecation.json'\n ).then((r) => r.json())\n const settled = await Promise.allSettled([availableVersionsPromise, deprecationPromise])\n const availableVersions = settled[0].status === 'fulfilled' ? settled[0].value : []\n const deprecation = settled[1].status === 'fulfilled' ? settled[1].value : {}\n // if one or more of the requests failed, merge in the previous value if we have one\n return {\n ...values.availableVersions,\n sdkVersions: availableVersions,\n deprecation: deprecation,\n }\n },\n },\n ],\n usedVersions: [\n null as SDKVersion[] | null,\n {\n loadUsedVersions: async () => {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$lib_version AS lib_version, max(timestamp) AS latest_timestamp, count(lib_version) as count\n FROM events\n WHERE timestamp >= now() - INTERVAL 1 DAY \n AND timestamp <= now()\n AND properties.$lib = 'web'\n GROUP BY lib_version\n ORDER BY latest_timestamp DESC\n limit 10`,\n }\n\n const res = await api.query(query, undefined, undefined, true)\n\n return (\n res.results\n ?.map((x) => {\n const version = tryParseVersion(x[0])\n if (!version) {\n return null\n }\n return {\n version,\n timestamp: x[1],\n }\n })\n .filter(isNotNil) ?? null\n )\n },\n },\n ],\n })),\n\n reducers({\n lastCheckTimestamp: [\n 0,\n { persist: true },\n {\n loadUsedVersionsSuccess: () => Date.now(),\n },\n ],\n versionWarning: [\n null as SDKVersionWarning | null,\n // bumping cache key due to an incorrect tag being cached on 2024-02-12\n { persist: true, prefix: '2024-02-12' },\n {\n setVersionWarning: (_, { versionWarning }) => versionWarning,\n },\n ],\n }),\n\n sharedListeners(({ values, actions }) => ({\n checkForVersionWarning: () => {\n if (!values.usedVersions?.length) {\n return\n }\n const { deprecation, sdkVersions } = values.availableVersions\n\n // We want the highest semantic version to be the latest used one, rather than\n // the one with the latest timestamp, because secondary installations can spew old versions\n const latestUsedVersion = highestVersion(values.usedVersions.map((v) => v.version))\n\n // the latest version published on github\n const latestAvailableVersion = sdkVersions?.[0]\n\n // the version where, anything before this deprecated (i.e. this version is allowed, before it is not)\n const deprecateBeforeVersion = deprecation?.deprecateBeforeVersion\n ? parseVersion(deprecation.deprecateBeforeVersion)\n : null\n\n let warning: SDKVersionWarning | null = null\n\n if (deprecateBeforeVersion) {\n const diff = diffVersions(deprecateBeforeVersion, latestUsedVersion)\n // if they are behind the deprecatedBeforeVersion by any amount, show an error\n if (diff && diff.diff > 0) {\n warning = {\n latestUsedVersion: versionToString(latestUsedVersion),\n latestAvailableVersion: versionToString(latestAvailableVersion || deprecateBeforeVersion),\n level: 'error',\n }\n }\n }\n\n if (!warning && sdkVersions && latestAvailableVersion) {\n const diff = diffVersions(latestAvailableVersion, latestUsedVersion)\n\n if (diff && diff.diff > 0) {\n // there's a difference between the latest used version and the latest available version\n\n let numVersionsBehind = sdkVersions.findIndex((v) => isEqualVersion(v, latestUsedVersion))\n if (numVersionsBehind === -1) {\n // if we couldn't find the versions, use the length of the list as a fallback\n numVersionsBehind = sdkVersions.length - 1\n }\n if (numVersionsBehind < diff.diff) {\n // we might have deleted versions, but if the actual diff is X then we must be at least X versions behind\n numVersionsBehind = diff.diff\n }\n\n let level: 'warning' | 'info' | 'error' | undefined\n if (diff.kind === 'major') {\n level = 'info' // it is desirable to be on the latest major version, but not critical\n } else if (diff.kind === 'minor') {\n level = numVersionsBehind >= 40 ? 'warning' : undefined\n }\n\n if (level === undefined && numVersionsBehind >= 50) {\n level = 'error'\n }\n\n // we check if there is a \"latest user version string\" to avoid returning odd data in unexpected cases\n if (level && !!versionToString(latestUsedVersion).trim().length) {\n warning = {\n latestUsedVersion: versionToString(latestUsedVersion),\n latestAvailableVersion: versionToString(latestAvailableVersion),\n level,\n numVersionsBehind,\n }\n }\n }\n }\n\n actions.setVersionWarning(warning)\n },\n })),\n\n listeners(({ sharedListeners }) => ({\n loadAvailableVersionsSuccess: sharedListeners.checkForVersionWarning,\n loadUsedVersionsSuccess: sharedListeners.checkForVersionWarning,\n })),\n\n afterMount(({ actions, values }) => {\n if (values.lastCheckTimestamp < Date.now() - CHECK_INTERVAL_MS) {\n actions.loadAvailableVersions()\n actions.loadUsedVersions()\n }\n }),\n])\n","import { useValues } from 'kea'\nimport { TextContent } from 'lib/components/Cards/TextCard/TextCard'\nimport { useUploadFiles } from 'lib/hooks/useUploadFiles'\nimport { IconMarkdown, IconTools } from 'lib/lemon-ui/icons'\nimport { LemonFileInput } from 'lib/lemon-ui/LemonFileInput'\nimport { LemonTabs } from 'lib/lemon-ui/LemonTabs'\nimport { LemonTextArea, LemonTextAreaProps } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { lemonToast } from 'lib/lemon-ui/LemonToast'\nimport { Link } from 'lib/lemon-ui/Link'\nimport { Tooltip } from 'lib/lemon-ui/Tooltip'\nimport posthog from 'posthog-js'\nimport React, { useRef, useState } from 'react'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\n\nexport const LemonTextAreaMarkdown = React.forwardRef(\n function _LemonTextAreaMarkdown({ value, onChange, ...editAreaProps }, ref): JSX.Element {\n const { objectStorageAvailable } = useValues(preflightLogic)\n\n const [isPreviewShown, setIsPreviewShown] = useState(false)\n const dropRef = useRef(null)\n\n const { setFilesToUpload, filesToUpload, uploading } = useUploadFiles({\n onUpload: (url, fileName) => {\n onChange?.(value + `\\n\\n![${fileName}](${url})`)\n posthog.capture('markdown image uploaded', { name: fileName })\n },\n onError: (detail) => {\n posthog.capture('markdown image upload failed', { error: detail })\n lemonToast.error(`Error uploading image: ${detail}`)\n },\n })\n\n return (\n setIsPreviewShown(key === 'preview')}\n tabs={[\n {\n key: 'write',\n label: 'Write',\n content: (\n
\n \n
\n \n Markdown formatting support\n
\n {objectStorageAvailable ? (\n \n ) : (\n
\n \n \n \n \n \n \n Add external images using{' '}\n \n {' '}\n Markdown image links\n \n .\n \n
\n )}\n
\n ),\n },\n {\n key: 'preview',\n label: 'Preview',\n content: value ? (\n \n ) : (\n Nothing to preview\n ),\n },\n ]}\n />\n )\n }\n)\n","// This file contains example queries, used in storybook and in the /query interface.\nimport { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils'\nimport {\n ActionsNode,\n DataTableNode,\n DataVisualizationNode,\n EventsNode,\n EventsQuery,\n FunnelsQuery,\n HogQLQuery,\n HogQuery,\n InsightVizNode,\n LifecycleQuery,\n Node,\n NodeKind,\n PathsQuery,\n PersonsNode,\n RetentionQuery,\n StickinessQuery,\n TrendsQuery,\n} from '~/queries/schema'\nimport {\n ChartDisplayType,\n FilterLogicalOperator,\n PropertyFilterType,\n PropertyGroupFilter,\n PropertyOperator,\n StepOrderValue,\n} from '~/types'\n\nconst Events: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: defaultDataTableColumns(NodeKind.EventsQuery),\n properties: [\n { type: PropertyFilterType.Event, key: '$browser', operator: PropertyOperator.Exact, value: 'Chrome' },\n ],\n after: '-24h',\n limit: 100,\n}\n\nconst EventsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n source: Events,\n}\nconst EventsTableFull: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: Events,\n}\n\nconst TotalEvents: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: ['count()'],\n}\n\nexport const TotalEventsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: TotalEvents,\n}\n\nconst PropertyFormulas: EventsQuery = {\n kind: NodeKind.EventsQuery,\n select: [\n '1 + 2 + 3',\n 'event',\n 'person.created_at',\n \"concat(properties['$browser'], ' 💚 ', properties['$geoip_city_name']) -- Browser 💚 City\",\n \"'random string'\",\n ],\n limit: 100,\n}\n\nconst PropertyFormulasTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: PropertyFormulas,\n}\n\nconst EventAggregations: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: {\n kind: NodeKind.EventsQuery,\n select: [\n \"concat(properties['$geoip_city_name'], ' ', 'Rocks') -- City\",\n 'event',\n 'count() + 100000 -- Inflamed total',\n '1 + 2',\n ],\n orderBy: ['-count()'],\n },\n}\n\nconst Persons: PersonsNode = {\n kind: NodeKind.PersonsNode,\n properties: [\n { type: PropertyFilterType.Person, key: '$browser', operator: PropertyOperator.Exact, value: 'Chrome' },\n ],\n}\n\nconst PersonsTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n columns: defaultDataTableColumns(NodeKind.PersonsNode),\n source: Persons,\n}\n\nconst PersonsTableFull: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n columns: defaultDataTableColumns(NodeKind.PersonsNode),\n source: Persons,\n}\n\nconst properties: PropertyGroupFilter = {\n type: FilterLogicalOperator.And,\n values: [\n {\n type: FilterLogicalOperator.Or,\n values: [\n {\n type: PropertyFilterType.Event,\n key: '$current_url',\n operator: PropertyOperator.Exact,\n value: ['https://hedgebox.net/files/'],\n },\n {\n type: PropertyFilterType.Event,\n key: '$geoip_country_code',\n operator: PropertyOperator.Exact,\n value: ['US', 'AU'],\n },\n ],\n },\n ],\n}\n\nconst filterTestAccounts = false\nconst series: (EventsNode | ActionsNode)[] = [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n custom_name: 'Views',\n event: '$pageview',\n properties: [\n {\n type: PropertyFilterType.Event,\n key: '$browser',\n operator: PropertyOperator.Exact,\n value: 'Chrome',\n },\n {\n type: PropertyFilterType.Cohort,\n key: 'id',\n operator: PropertyOperator.In,\n value: 2,\n },\n ],\n },\n // {\n // kind: NodeKind.ActionsNode,\n // id: 1,\n // name: 'Interacted with file',\n // custom_name: 'Interactions',\n // properties: [\n // {\n // type: PropertyFilterType.Event,\n // key: '$geoip_country_code',\n // operator: PropertyOperator.Exact,\n // value: ['US'],\n // },\n // ],\n // math: PropertyMathType.Average,\n // math_property: '$session_duration',\n // },\n]\n\nconst InsightTrendsQuery: TrendsQuery = {\n kind: NodeKind.TrendsQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n trendsFilter: {\n display: ChartDisplayType.ActionsAreaGraph,\n },\n breakdownFilter: {\n breakdown: '$geoip_country_code',\n breakdown_type: 'event',\n },\n}\n\nconst InsightFunnelsQuery: FunnelsQuery = {\n kind: NodeKind.FunnelsQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n funnelsFilter: {\n funnelOrderType: StepOrderValue.ORDERED,\n },\n breakdownFilter: {\n breakdown: '$geoip_country_code',\n breakdown_type: 'event',\n },\n}\n\nconst InsightRetentionQuery: RetentionQuery = {\n kind: NodeKind.RetentionQuery,\n properties,\n filterTestAccounts,\n retentionFilter: {\n // TODO: this should be typed as (EventsNode | ActionsNode)[] without math and properties\n targetEntity: { type: 'events', id: '$pageview', name: '$pageview' },\n returningEntity: { type: 'events', id: '$pageview', name: '$pageview' },\n },\n}\n\nconst InsightPathsQuery: PathsQuery = {\n kind: NodeKind.PathsQuery,\n properties,\n filterTestAccounts,\n pathsFilter: {},\n}\n\nconst InsightStickinessQuery: StickinessQuery = {\n kind: NodeKind.StickinessQuery,\n properties,\n filterTestAccounts,\n interval: 'day',\n dateRange: {\n date_from: '-7d',\n },\n series,\n stickinessFilter: {},\n}\n\nconst InsightLifecycleQuery: LifecycleQuery = {\n kind: NodeKind.LifecycleQuery,\n properties,\n filterTestAccounts,\n dateRange: {\n date_from: '-7d',\n },\n series, // TODO: Visualization only supports one event or action\n}\n\nconst HogQLRaw: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: ` select event,\n person.properties.email,\n properties.$browser,\n count()\n from events\n where {filters} -- replaced with global date and property filters\n and person.properties.email is not null\n group by event,\n properties.$browser,\n person.properties.email\n order by count() desc\n limit 100`,\n filters: {\n dateRange: {\n date_from: '-24h',\n },\n },\n}\n\nconst HogQLForDataVisualization: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `select toDate(timestamp) as timestamp, count()\nfrom events\nwhere {filters} and timestamp <= now()\ngroup by timestamp\norder by timestamp asc\nlimit 100`,\n explain: true,\n filters: {\n dateRange: {\n date_from: '-7d',\n },\n },\n}\n\nconst HogQLForDataWarehouse: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `select toDate(timestamp) as timestamp, count()\nfrom events\ngroup by timestamp\nlimit 100`,\n explain: true,\n}\n\nconst DataWarehouse: DataVisualizationNode = {\n kind: NodeKind.DataVisualizationNode,\n source: HogQLForDataWarehouse,\n}\n\nconst HogQLTable: DataTableNode = {\n kind: NodeKind.DataTableNode,\n full: true,\n source: HogQLRaw,\n}\n\nconst DataVisualization: DataVisualizationNode = {\n kind: NodeKind.DataVisualizationNode,\n source: HogQLForDataVisualization,\n tableSettings: {\n columns: [\n {\n column: 'timestamp',\n settings: {\n formatting: {\n prefix: '',\n suffix: '',\n },\n },\n },\n {\n column: 'count()',\n settings: {\n formatting: {\n prefix: '',\n suffix: '',\n },\n },\n },\n ],\n },\n chartSettings: { goalLines: undefined },\n}\n\nconst Hog: HogQuery = {\n kind: NodeKind.HogQuery,\n code: 'return 1 + 2;',\n}\n\nconst Hoggonacci: HogQuery = {\n kind: NodeKind.HogQuery,\n code: `fn fibonacci(number) {\n if (number < 2) {\n return number;\n } else {\n return fibonacci(number - 1) + fibonacci(number - 2);\n }\n}\nreturn fibonacci(16);`,\n}\n/* a subset of examples including only those we can show all users and that don't use HogQL */\nexport const queryExamples: Record = {\n Events,\n EventsTable,\n EventsTableFull,\n TotalEventsTable,\n PropertyFormulasTable,\n EventAggregations,\n Persons,\n PersonsTable,\n PersonsTableFull,\n InsightTrendsQuery,\n InsightTrends: { kind: NodeKind.InsightVizNode, source: InsightTrendsQuery } as InsightVizNode,\n InsightFunnelsQuery,\n InsightFunnels: { kind: NodeKind.InsightVizNode, source: InsightFunnelsQuery } as InsightVizNode,\n InsightRetentionQuery,\n InsightRetention: {\n kind: NodeKind.InsightVizNode,\n source: InsightRetentionQuery,\n } as InsightVizNode,\n InsightPathsQuery,\n InsightPaths: { kind: NodeKind.InsightVizNode, source: InsightPathsQuery } as InsightVizNode,\n InsightStickinessQuery,\n InsightStickiness: {\n kind: NodeKind.InsightVizNode,\n source: InsightStickinessQuery,\n } as InsightVizNode,\n InsightLifecycleQuery,\n InsightLifecycle: {\n kind: NodeKind.InsightVizNode,\n source: InsightLifecycleQuery,\n } as InsightVizNode,\n}\n\nexport const stringifiedQueryExamples: Record = Object.fromEntries(\n Object.entries(queryExamples).map(([key, node]) => [key, JSON.stringify(node)])\n)\n\nexport const examples: Record = {\n ...queryExamples,\n HogQLRaw,\n HogQLTable,\n DataVisualization,\n Hog,\n Hoggonacci,\n DataWarehouse,\n}\n\nexport const stringifiedExamples: Record = Object.fromEntries(\n Object.entries(examples).map(([key, node]) => [key, JSON.stringify(node)])\n)\n","import * as d3 from 'd3'\nimport * as Sankey from 'd3-sankey'\nimport { D3Selector } from 'lib/hooks/useD3'\nimport { stripHTTP } from 'lib/utils'\nimport { Dispatch, RefObject, SetStateAction } from 'react'\n\nimport { FunnelPathsFilter, PathsFilter } from '~/queries/schema'\n\nimport { FALLBACK_CANVAS_WIDTH, HIDE_PATH_CARD_HEIGHT } from './Paths'\nimport { PathNode } from './pathsDataLogic'\nimport { isSelectedPathStartOrEnd, PathNodeData, PathTargetLink, roundedRect } from './pathUtils'\n\nconst createCanvas = (canvasRef: RefObject, width: number, height: number): D3Selector => {\n return d3\n .select(canvasRef.current)\n .append('svg')\n .classed('Paths__canvas', true)\n .style('background', 'var(--item-background)')\n .style('width', `${width}px`)\n .style('height', `${height}px`)\n}\n\nconst createSankey = (width: number, height: number): Sankey.SankeyLayout => {\n // @ts-expect-error - d3 sankey typing things\n return new Sankey.sankey()\n .nodeId((d: PathNodeData) => d.name)\n .nodeAlign(Sankey.sankeyJustify)\n .nodeSort(null)\n .nodeWidth(15)\n .size([width, height])\n}\n\nconst appendPathNodes = (\n svg: any,\n nodes: PathNodeData[],\n pathsFilter: PathsFilter,\n funnelPathsFilter: FunnelPathsFilter,\n setNodeCards: Dispatch>\n): void => {\n svg.append('g')\n .selectAll('rect')\n .data(nodes)\n .join('rect')\n .attr('x', (d: PathNodeData) => d.x0 + 1)\n .attr('y', (d: PathNodeData) => d.y0)\n .attr('height', (d: PathNodeData) => d.y1 - d.y0)\n .attr('width', (d: PathNodeData) => d.x1 - d.x0 - 2)\n .attr('fill', (d: PathNodeData) => {\n let c\n for (const link of d.sourceLinks) {\n if (c === undefined) {\n c = link.color\n } else if (c !== link.color) {\n c = null\n }\n }\n if (c === undefined) {\n for (const link of d.targetLinks) {\n if (c === undefined) {\n c = link.color\n } else if (c !== link.color) {\n c = null\n }\n }\n }\n if (isSelectedPathStartOrEnd(pathsFilter, funnelPathsFilter, d)) {\n return d3.color('purple')\n }\n const startNodeColor = c && d3.color(c) ? d3.color(c) : d3.color('#5375ff')\n return startNodeColor\n })\n .on('mouseover', (_event: MouseEvent, data: PathNodeData) => {\n if (data.y1 - data.y0 > HIDE_PATH_CARD_HEIGHT) {\n return\n }\n setNodeCards(\n nodes.map((node: PathNodeData) =>\n node.index === data.index\n ? { ...node, visible: true }\n : { ...node, visible: node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT }\n )\n )\n })\n .append('title')\n .text((d: PathNodeData) => `${stripHTTP(d.name)}\\n${d.value.toLocaleString()}`)\n}\n\nconst appendDropoffs = (svg: D3Selector): void => {\n const dropOffGradient = svg\n .append('defs')\n .append('linearGradient')\n .attr('id', 'dropoff-gradient')\n .attr('gradientTransform', 'rotate(90)')\n\n dropOffGradient.append('stop').attr('offset', '0%').attr('stop-color', 'rgba(220,53,69,0.7)')\n\n dropOffGradient.append('stop').attr('offset', '100%').attr('stop-color', 'var(--bg-light)')\n}\n\nconst appendPathLinks = (\n svg: any,\n links: PathNodeData[],\n nodes: PathNodeData[],\n setNodeCards: Dispatch>\n): void => {\n const link = svg\n .append('g')\n .attr('fill', 'none')\n .selectAll('g')\n .data(links)\n .join('g')\n .attr('stroke', 'var(--primary)')\n .attr('opacity', 0.35)\n\n link.append('path')\n .attr('d', Sankey.sankeyLinkHorizontal())\n .attr('id', (d: PathNodeData) => `path-${d.index}`)\n .attr('stroke-width', (d: PathNodeData) => {\n return Math.max(1, d.width)\n })\n .on('mouseover', (_event: MouseEvent, data: PathNodeData) => {\n svg.select(`#path-${data.index}`).attr('stroke', 'blue')\n if (data?.source?.targetLinks.length === 0) {\n return\n }\n const nodesToColor = [data.source]\n const pathCardsToShow: number[] = []\n while (nodesToColor.length > 0) {\n const _node = nodesToColor.pop()\n _node?.targetLinks.forEach((_link: PathTargetLink) => {\n svg.select(`#path-${_link.index}`).attr('stroke', 'blue')\n nodesToColor.push(_link.source)\n pathCardsToShow.push(_link.source.index)\n })\n }\n const pathCards = [data.target]\n pathCardsToShow.push(data.target.index, data.source.index)\n while (pathCards.length > 0) {\n const node = pathCards.pop()\n node?.sourceLinks.forEach((l: PathTargetLink) => {\n pathCards.push(l.target)\n pathCardsToShow.push(l.target.index)\n })\n }\n setNodeCards(\n nodes.map((node: PathNodeData) => ({\n ...node,\n ...{\n visible: pathCardsToShow.includes(node.index)\n ? true\n : node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT,\n },\n }))\n )\n })\n .on('mouseleave', () => {\n svg.selectAll('path').attr('stroke', 'var(--primary)')\n })\n\n link.append('g')\n .append('path')\n .attr('d', (data: PathNodeData) => {\n if (data.source.layer === 0) {\n return\n }\n const _height =\n data.source.y1 - data.source.y0 - data.source.sourceLinks.reduce((prev, curr) => prev + curr.width, 0)\n return roundedRect(0, 0, 30, _height, Math.min(25, _height), false, true, false, false)\n })\n .attr('fill', 'url(#dropoff-gradient)')\n .attr('stroke-width', 0)\n .attr('transform', (data: PathNodeData) => {\n return (\n 'translate(' +\n Math.round(data.source.x1) +\n ',' +\n Math.round(data.source.y0 + data.source.sourceLinks.reduce((prev, curr) => prev + curr.width, 0)) +\n ')'\n )\n })\n}\n\nconst addChartAxisLines = (svg: D3Selector, height: number, nodes: PathNodeData[], maxLayer: number): void => {\n if (maxLayer > 5) {\n const arr = [...Array(maxLayer)]\n const minWidthApart = nodes[1].x0 - nodes[0].x0\n arr.forEach((_, i) => {\n svg.append('line')\n .style('stroke', 'var(--border)')\n .attr('stroke-width', 2)\n .attr('x1', minWidthApart * (i + 1) - 20)\n .attr('y1', 0)\n .attr('x2', minWidthApart * (i + 1) - 20)\n .attr('y2', height)\n })\n }\n}\n\nexport function renderPaths(\n canvasRef: RefObject,\n canvasWidth: number,\n canvasHeight: number,\n paths: { links: PathNode[]; nodes: any[] },\n pathsFilter: PathsFilter,\n funnelPathsFilter: FunnelPathsFilter,\n setNodeCards: Dispatch>\n): void {\n if (!paths || paths.nodes.length === 0) {\n return\n }\n\n const maxLayer = paths.links.reduce((prev, curr) => {\n // @ts-expect-error - sometimes target is an object instead of string\n const currNum = curr.target.name || curr.target\n return Math.max(prev, Number(currNum.match(/[^_]*/)))\n }, 0)\n\n const minWidth = canvasWidth > FALLBACK_CANVAS_WIDTH || maxLayer < 3 ? canvasWidth : FALLBACK_CANVAS_WIDTH\n\n const width = maxLayer > 5 && canvasWidth ? (minWidth / 5) * maxLayer : minWidth\n const height = canvasHeight\n\n const svg = createCanvas(canvasRef, width, height)\n const sankey = createSankey(width, height)\n const { nodes, links } = sankey({\n nodes: paths.nodes.map((d) => ({ ...d })),\n links: paths.links.map((d) => ({ ...d })),\n })\n\n setNodeCards(nodes.map((node: PathNodeData) => ({ ...node, visible: node.y1 - node.y0 > HIDE_PATH_CARD_HEIGHT })))\n\n appendPathNodes(svg, nodes, pathsFilter, funnelPathsFilter, setNodeCards)\n appendDropoffs(svg)\n appendPathLinks(svg, links, nodes, setNodeCards)\n addChartAxisLines(svg, height, nodes, maxLayer)\n}\n","import { LemonDialog, lemonToast, Link } from '@posthog/lemon-ui'\nimport { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'\nimport { FieldNamePath, forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { router, urlToAction } from 'kea-router'\nimport api, { getJSONOrNull } from 'lib/api'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { dayjs } from 'lib/dayjs'\nimport { LemonBannerAction } from 'lib/lemon-ui/LemonBanner/LemonBanner'\nimport { lemonBannerLogic } from 'lib/lemon-ui/LemonBanner/lemonBannerLogic'\nimport { LemonButtonPropsBase } from 'lib/lemon-ui/LemonButton'\nimport { featureFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { pluralize } from 'lib/utils'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport posthog from 'posthog-js'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { userLogic } from 'scenes/userLogic'\n\nimport { BillingPlanType, BillingProductV2Type, BillingType, ProductKey } from '~/types'\n\nimport type { billingLogicType } from './billingLogicType'\nimport { DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD } from './CreditCTAHero'\n\nexport const ALLOCATION_THRESHOLD_ALERT = 0.85 // Threshold to show warning of event usage near limit\nexport const ALLOCATION_THRESHOLD_BLOCK = 1.2 // Threshold to block usage\n\nexport interface BillingAlertConfig {\n status: 'info' | 'warning' | 'error'\n title: string\n message?: string\n contactSupport?: boolean\n buttonCTA?: string\n dismissKey?: string\n action?: LemonBannerAction\n pathName?: string\n onClose?: () => void\n}\n\nexport enum BillingAPIErrorCodes {\n OPEN_INVOICES_ERROR = 'open_invoices_error',\n NO_ACTIVE_PAYMENT_METHOD_ERROR = 'no_active_payment_method_error',\n COULD_NOT_PAY_INVOICES_ERROR = 'could_not_pay_invoices_error',\n}\n\nexport interface UnsubscribeError {\n detail: string | JSX.Element\n link: JSX.Element\n}\n\nexport interface BillingError {\n status: 'info' | 'warning' | 'error'\n message: string\n action: LemonButtonPropsBase\n}\n\nconst parseBillingResponse = (data: Partial): BillingType => {\n if (data.billing_period) {\n data.billing_period = {\n current_period_start: dayjs(data.billing_period.current_period_start),\n current_period_end: dayjs(data.billing_period.current_period_end),\n interval: data.billing_period.interval,\n }\n }\n\n data.free_trial_until = data.free_trial_until ? dayjs(data.free_trial_until) : undefined\n data.amount_off_expires_at = data.amount_off_expires_at ? dayjs(data.amount_off_expires_at) : undefined\n // If expiration is in the middle of the current period, we let it expire at the end of the period\n if (\n data.amount_off_expires_at &&\n data.billing_period &&\n data.amount_off_expires_at.isBefore(data.billing_period.current_period_end) &&\n data.amount_off_expires_at.isAfter(data.billing_period.current_period_start)\n ) {\n data.amount_off_expires_at = data.billing_period.current_period_end\n }\n\n return data as BillingType\n}\n\nexport const billingLogic = kea([\n path(['scenes', 'billing', 'billingLogic']),\n actions({\n setProductSpecificAlert: (productSpecificAlert: BillingAlertConfig | null) => ({ productSpecificAlert }),\n setScrollToProductKey: (scrollToProductKey: ProductKey | null) => ({ scrollToProductKey }),\n setShowLicenseDirectInput: (show: boolean) => ({ show }),\n reportBillingAlertShown: (alertConfig: BillingAlertConfig) => ({ alertConfig }),\n reportBillingAlertActionClicked: (alertConfig: BillingAlertConfig) => ({ alertConfig }),\n reportCreditsFormSubmitted: (creditInput: number) => ({ creditInput }),\n reportCreditsModalShown: true,\n reportBillingShown: true,\n registerInstrumentationProps: true,\n reportCreditsCTAShown: (creditOverview: any) => ({ creditOverview }),\n setRedirectPath: true,\n setIsOnboarding: true,\n determineBillingAlert: true,\n setUnsubscribeError: (error: null | UnsubscribeError) => ({ error }),\n resetUnsubscribeError: true,\n setBillingAlert: (billingAlert: BillingAlertConfig | null) => ({ billingAlert }),\n showPurchaseCreditsModal: (isOpen: boolean) => ({ isOpen }),\n toggleCreditCTAHeroDismissed: (isDismissed: boolean) => ({ isDismissed }),\n setComputedDiscount: (discount: number) => ({ discount }),\n }),\n connect(() => ({\n values: [featureFlagLogic, ['featureFlags'], preflightLogic, ['preflight']],\n actions: [\n userLogic,\n ['loadUser'],\n eventUsageLogic,\n ['reportProductUnsubscribed'],\n lemonBannerLogic({ dismissKey: 'usage-limit-exceeded' }),\n ['resetDismissKey as resetUsageLimitExceededKey'],\n lemonBannerLogic({ dismissKey: 'usage-limit-approaching' }),\n ['resetDismissKey as resetUsageLimitApproachingKey'],\n ],\n })),\n reducers({\n billingAlert: [\n null as BillingAlertConfig | null,\n {\n setBillingAlert: (_, { billingAlert }) => billingAlert,\n },\n ],\n scrollToProductKey: [\n null as ProductKey | null,\n {\n setScrollToProductKey: (_, { scrollToProductKey }) => scrollToProductKey,\n },\n ],\n productSpecificAlert: [\n null as BillingAlertConfig | null,\n {\n setProductSpecificAlert: (_, { productSpecificAlert }) => productSpecificAlert,\n },\n ],\n showLicenseDirectInput: [\n false,\n {\n setShowLicenseDirectInput: (_, { show }) => show,\n },\n ],\n redirectPath: [\n '' as string,\n {\n setRedirectPath: () => {\n return window.location.pathname.includes('/onboarding')\n ? window.location.pathname + window.location.search\n : ''\n },\n },\n ],\n isOnboarding: [\n false,\n {\n setIsOnboarding: () => window.location.pathname.includes('/onboarding'),\n },\n ],\n unsubscribeError: [\n null as null | UnsubscribeError,\n {\n resetUnsubscribeError: () => null,\n setUnsubscribeError: (_, { error }) => error,\n },\n ],\n timeRemainingInSeconds: [\n 0,\n {\n loadBillingSuccess: (_, { billing }) => {\n if (!billing?.billing_period) {\n return 0\n }\n const currentTime = dayjs()\n const periodEnd = dayjs(billing.billing_period.current_period_end)\n return periodEnd.diff(currentTime, 'second')\n },\n },\n ],\n timeTotalInSeconds: [\n 0,\n {\n loadBillingSuccess: (_, { billing }) => {\n if (!billing?.billing_period) {\n return 0\n }\n const periodStart = dayjs(billing.billing_period.current_period_start)\n const periodEnd = dayjs(billing.billing_period.current_period_end)\n return periodEnd.diff(periodStart, 'second')\n },\n },\n ],\n isPurchaseCreditsModalOpen: [\n false,\n {\n showPurchaseCreditsModal: (_, { isOpen }) => isOpen,\n },\n ],\n isCreditCTAHeroDismissed: [\n false,\n { persist: true },\n {\n toggleCreditCTAHeroDismissed: (_, { isDismissed }) => isDismissed,\n },\n ],\n computedDiscount: [\n 0,\n {\n setComputedDiscount: (_, { discount }) => discount,\n },\n ],\n }),\n loaders(({ actions, values }) => ({\n billing: [\n null as BillingType | null,\n {\n loadBilling: async () => {\n // Note: this is a temporary flag to skip forecasting in the billing page\n // for customers running into performance issues until we have a more permanent fix\n // of splitting the billing and forecasting data.\n const skipForecasting = values.featureFlags[FEATURE_FLAGS.BILLING_SKIP_FORECASTING]\n const response = await api.get(\n 'api/billing' + (skipForecasting ? '?include_forecasting=false' : '')\n )\n\n return parseBillingResponse(response)\n },\n\n updateBillingLimits: async (limits: { [key: string]: number | null }) => {\n try {\n const response = await api.update('api/billing', { custom_limits_usd: limits })\n lemonToast.success('Billing limits updated')\n return parseBillingResponse(response)\n } catch (error: any) {\n lemonToast.error(\n 'There was an error updating your billing limits. Please try again or contact support.'\n )\n throw error\n }\n },\n\n deactivateProduct: async (key: string) => {\n // clear upgrade params from URL\n // Note(@zach): This is not working properly. We need to look into this.\n const currentURL = new URL(window.location.href)\n currentURL.searchParams.delete('upgraded')\n currentURL.searchParams.delete('products')\n router.actions.push(currentURL.pathname + currentURL.search)\n\n actions.resetUnsubscribeError()\n try {\n const response = await api.getResponse('api/billing/deactivate?products=' + key)\n const jsonRes = await getJSONOrNull(response)\n\n lemonToast.success(\n \"You have been unsubscribed. We're sad to see you go. May the hedgehogs be ever in your favor.\"\n )\n actions.reportProductUnsubscribed(key)\n\n return parseBillingResponse(jsonRes)\n } catch (error: any) {\n if (error.code) {\n if (error.code === BillingAPIErrorCodes.OPEN_INVOICES_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n link: (\n \n View invoices\n \n ),\n } as UnsubscribeError)\n } else if (error.code === BillingAPIErrorCodes.NO_ACTIVE_PAYMENT_METHOD_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n } as UnsubscribeError)\n } else if (error.code === BillingAPIErrorCodes.COULD_NOT_PAY_INVOICES_ERROR) {\n actions.setUnsubscribeError({\n detail: error.detail,\n link: (\n \n {error.link ? 'View invoice' : 'View invoices'}\n \n ),\n } as UnsubscribeError)\n }\n } else {\n actions.setUnsubscribeError({\n detail:\n typeof error.detail === 'string'\n ? error.detail\n : `We encountered a problem. Please try again or submit a support ticket.`,\n } as UnsubscribeError)\n }\n console.error(error)\n // This is a bit of a hack to prevent the page from re-rendering.\n return values.billing\n }\n },\n },\n ],\n billingError: [\n null as BillingError | null,\n {\n getInvoices: async () => {\n // First check to see if there are open invoices\n try {\n const res = await api.getResponse('api/billing/get_invoices?status=open')\n const jsonRes = await getJSONOrNull(res)\n const numOpenInvoices = jsonRes['count']\n if (numOpenInvoices > 0) {\n const viewInvoicesButton = {\n to:\n numOpenInvoices == 1 && jsonRes['link']\n ? jsonRes['link']\n : values.billing?.stripe_portal_url,\n children: `View invoice${numOpenInvoices > 1 ? 's' : ''}`,\n targetBlank: true,\n }\n return {\n status: 'warning',\n message: `You have ${numOpenInvoices} open invoice${\n numOpenInvoices > 1 ? 's' : ''\n }. Please pay ${\n numOpenInvoices > 1 ? 'them' : 'it'\n } before adding items to your subscription.`,\n action: viewInvoicesButton,\n }\n }\n } catch (error: any) {\n console.error(error)\n }\n return null\n },\n },\n ],\n creditOverview: [\n {\n eligible: false,\n estimated_monthly_credit_amount_usd: DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n status: 'none',\n invoice_url: null,\n collection_method: null,\n cc_last_four: null,\n email: null,\n },\n {\n loadCreditOverview: async () => {\n // Check if the user is subscribed\n if (values.billing?.has_active_subscription) {\n const response = await api.get('api/billing/credits/overview')\n if (!values.creditForm.creditInput) {\n actions.setCreditFormValue(\n 'creditInput',\n Math.round(\n (response.estimated_monthly_credit_amount_usd ||\n DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD) * 12\n )\n )\n }\n\n if (response.eligible && response.status === 'none') {\n actions.reportCreditsCTAShown(response)\n }\n return response\n }\n // Return default values if not subscribed\n return {\n eligible: false,\n estimated_monthly_credit_amount_usd: DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n status: 'none',\n invoice_url: null,\n collection_method: null,\n cc_last_four: null,\n email: null,\n }\n },\n },\n ],\n products: [\n [] as BillingProductV2Type[],\n {\n loadProducts: async () => {\n const response = await api.get('api/billing/available_products')\n return response\n },\n },\n ],\n })),\n selectors({\n upgradeLink: [(s) => [s.preflight], (): string => '/organization/billing'],\n isUnlicensedDebug: [\n (s) => [s.preflight, s.billing],\n (preflight, billing): boolean => !!preflight?.is_debug && !billing?.billing_period,\n ],\n projectedTotalAmountUsdWithBillingLimits: [\n (s) => [s.billing],\n (billing: BillingType): number => {\n if (!billing) {\n return 0\n }\n let projectedTotal = 0\n for (const product of billing.products || []) {\n const billingLimit =\n billing?.custom_limits_usd?.[product.type] ||\n (product.usage_key ? billing?.custom_limits_usd?.[product.usage_key] || 0 : 0)\n projectedTotal += Math.min(parseFloat(product.projected_amount_usd || '0'), billingLimit)\n }\n return projectedTotal\n },\n ],\n supportPlans: [\n (s) => [s.billing],\n (billing: BillingType): BillingPlanType[] => {\n const platformAndSupportProduct = billing?.products?.find(\n (product) => product.type == ProductKey.PLATFORM_AND_SUPPORT\n )\n if (!platformAndSupportProduct?.plans) {\n return []\n }\n\n const addonPlans = platformAndSupportProduct?.addons?.map((addon) => addon.plans).flat()\n const insertionIndex = Math.max(0, (platformAndSupportProduct?.plans?.length ?? 1) - 1)\n const allPlans = platformAndSupportProduct?.plans?.slice(0) || []\n allPlans.splice(insertionIndex, 0, ...addonPlans)\n return allPlans\n },\n ],\n hasSupportAddonPlan: [\n (s) => [s.billing],\n (billing: BillingType): boolean => {\n return !!billing?.products\n ?.find((product) => product.type == ProductKey.PLATFORM_AND_SUPPORT)\n ?.addons.find((addon) => addon.plans.find((plan) => plan.current_plan))\n },\n ],\n creditDiscount: [(s) => [s.computedDiscount], (computedDiscount) => computedDiscount || 0],\n }),\n forms(({ actions, values }) => ({\n activateLicense: {\n defaults: { license: '' } as { license: string },\n errors: ({ license }) => ({\n license: !license ? 'Please enter your license key' : undefined,\n }),\n submit: async ({ license }, breakpoint) => {\n await breakpoint(500)\n try {\n await api.update('api/billing/license', {\n license,\n })\n\n // Reset the URL so we don't trigger the license submission again\n router.actions.replace(\n `/${values.isOnboarding ? 'ingestion' : 'organization'}/billing?success=true`\n )\n setTimeout(() => {\n window.location.reload() // Permissions, projects etc will be out of date at this point, so refresh\n }, 100)\n } catch (e: any) {\n actions.setActivateLicenseManualErrors({\n license: e.detail || 'License could not be activated. Please contact support.',\n })\n throw e\n }\n },\n },\n creditForm: {\n defaults: {\n creditInput: '',\n collectionMethod: 'charge_automatically',\n },\n submit: async ({ creditInput, collectionMethod }) => {\n await api.create('api/billing/credits/purchase', {\n annual_amount_usd: +Math.round(+creditInput - +creditInput * values.creditDiscount),\n discount_percent: values.computedDiscount * 100,\n collection_method: collectionMethod,\n })\n\n actions.showPurchaseCreditsModal(false)\n actions.loadCreditOverview()\n actions.reportCreditsFormSubmitted(+creditInput)\n\n LemonDialog.open({\n title: 'Your credit purchase has been submitted',\n width: 536,\n content:\n collectionMethod === 'send_invoice' ? (\n <>\n

\n The invoice for your credits has been created and it will be emailed to the email on\n file.\n

\n

\n Once the invoice is paid we will apply the credits to your account. Until the\n invoice is paid you will be charged for usage as normal.\n

\n \n ) : (\n <>\n

\n Your card will be charged soon and the credits will be applied to your account.\n Please make sure your{' '}\n \n card on file\n {' '}\n is up to date. You will receive an email when the credits are applied.\n

\n \n ),\n })\n },\n errors: ({ creditInput, collectionMethod }) => ({\n creditInput: !creditInput\n ? 'Please enter the amount of credits you want to purchase'\n : // This value is used because 3333 - 10% = 3000\n +creditInput < 3333\n ? 'Please enter a credit amount of at least $3,333'\n : undefined,\n collectionMethod: !collectionMethod ? 'Please select a collection method' : undefined,\n }),\n },\n })),\n listeners(({ actions, values }) => ({\n reportBillingShown: () => {\n posthog.capture('billing v2 shown')\n },\n reportBillingAlertShown: ({ alertConfig }) => {\n posthog.capture('billing alert shown', {\n ...alertConfig,\n })\n },\n reportBillingAlertActionClicked: ({ alertConfig }) => {\n posthog.capture('billing alert action clicked', {\n ...alertConfig,\n })\n },\n reportCreditsModalShown: () => {\n posthog.capture('credits modal shown')\n },\n reportCreditsFormSubmitted: ({ creditInput }) => {\n posthog.capture('credits modal credit form submitted', {\n credit_amount_usd: creditInput,\n })\n },\n reportCreditsCTAShown: ({ creditOverview }) => {\n posthog.capture('credits cta shown', {\n eligible: creditOverview.eligible,\n status: creditOverview.status,\n estimated_monthly_credit_amount_usd:\n creditOverview.estimated_monthly_credit_amount_usd || DEFAULT_ESTIMATED_MONTHLY_CREDIT_AMOUNT_USD,\n })\n },\n toggleCreditCTAHeroDismissed: ({ isDismissed }) => {\n if (isDismissed) {\n posthog.capture('credits cta hero dismissed')\n }\n },\n loadBillingSuccess: () => {\n if (\n router.values.location.pathname.includes('/organization/billing') &&\n router.values.searchParams['success']\n ) {\n // if the activation is successful, we reload the user to get the updated billing info on the organization\n actions.loadUser()\n router.actions.replace('/organization/billing')\n }\n actions.registerInstrumentationProps()\n\n actions.determineBillingAlert()\n\n actions.loadCreditOverview()\n },\n determineBillingAlert: () => {\n if (values.productSpecificAlert) {\n actions.setBillingAlert(values.productSpecificAlert)\n return\n }\n\n if (!values.billing || !values.preflight?.cloud) {\n return\n }\n\n if (values.billing.free_trial_until && values.billing.free_trial_until.isAfter(dayjs())) {\n const remainingDays = values.billing.free_trial_until.diff(dayjs(), 'days')\n const remainingHours = values.billing.free_trial_until.diff(dayjs(), 'hours')\n\n if (remainingHours > 72) {\n return\n }\n\n actions.setBillingAlert({\n status: 'info',\n title: `Your free trial will end in ${\n remainingHours < 24 ? pluralize(remainingHours, 'hour') : pluralize(remainingDays, 'day')\n }.`,\n message: `Setup billing now to ensure you don't lose access to premium features.`,\n })\n return\n }\n\n if (values.billing.deactivated) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Your organization has been temporarily suspended.',\n message: 'Please contact support to reactivate it.',\n contactSupport: true,\n })\n return\n }\n\n const productOverLimit = values.billing.products?.find((x: BillingProductV2Type) => {\n return x.percentage_usage > 1 && x.usage_key\n })\n\n if (productOverLimit) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Usage limit exceeded',\n message: `You have exceeded the usage limit for ${productOverLimit.name}. Please \n ${productOverLimit.subscribed ? 'increase your billing limit' : 'upgrade your plan'}\n or ${\n productOverLimit.name === 'Data warehouse'\n ? 'data will not be synced'\n : 'data loss may occur'\n }.`,\n dismissKey: 'usage-limit-exceeded',\n })\n return\n }\n\n actions.resetUsageLimitExceededKey()\n\n const productApproachingLimit = values.billing.products?.find(\n (x) => x.percentage_usage > ALLOCATION_THRESHOLD_ALERT\n )\n\n if (productApproachingLimit) {\n actions.setBillingAlert({\n status: 'info',\n title: 'You will soon hit your usage limit',\n message: `You have currently used ${parseFloat(\n (productApproachingLimit.percentage_usage * 100).toFixed(2)\n )}% of your ${\n productApproachingLimit.usage_key && productApproachingLimit.usage_key.toLowerCase()\n } allocation.`,\n dismissKey: 'usage-limit-approaching',\n })\n return\n }\n\n actions.resetUsageLimitApproachingKey()\n },\n setCreditFormValue: ({ name, value }) => {\n if (name === 'creditInput' || (name as FieldNamePath)?.[0] === 'creditInput') {\n const spend = +value\n let discount = 0\n if (spend >= 100000) {\n discount = 0.35\n } else if (spend >= 60000) {\n discount = 0.25\n } else if (spend >= 20000) {\n discount = 0.2\n } else if (spend >= 3000) {\n discount = 0.1\n }\n actions.setComputedDiscount(discount)\n }\n },\n registerInstrumentationProps: async (_, breakpoint) => {\n await breakpoint(100)\n if (posthog && values.billing) {\n const payload = {\n has_billing_plan: !!values.billing.has_active_subscription,\n free_trial_until: values.billing.free_trial_until?.toISOString(),\n customer_deactivated: values.billing.deactivated,\n current_total_amount_usd: values.billing.current_total_amount_usd,\n }\n if (values.billing.custom_limits_usd) {\n for (const product of Object.keys(values.billing.custom_limits_usd)) {\n payload[`custom_limits_usd.${product}`] = values.billing.custom_limits_usd[product]\n }\n }\n if (values.billing.products) {\n for (const product of values.billing.products) {\n const type = product.type.toLowerCase()\n payload[`percentage_usage.${type}`] = product.percentage_usage\n payload[`current_amount_usd.${type}`] = product.current_amount_usd\n payload[`unit_amount_usd.${type}`] = product.unit_amount_usd\n payload[`usage_limit.${type}`] = product.usage_limit\n payload[`current_usage.${type}`] = product.current_usage\n payload[`projected_usage.${type}`] = product.projected_usage\n payload[`free_allocation.${type}`] = product.free_allocation\n }\n }\n if (values.billing.billing_period) {\n payload['billing_period_start'] = values.billing.billing_period.current_period_start\n payload['billing_period_end'] = values.billing.billing_period.current_period_end\n }\n posthog.register(payload)\n }\n },\n showPurchaseCreditsModal: ({ isOpen }) => {\n if (isOpen) {\n actions.reportCreditsModalShown()\n }\n },\n })),\n afterMount(({ actions }) => {\n actions.loadBilling()\n actions.getInvoices()\n }),\n urlToAction(({ actions }) => ({\n // IMPORTANT: This needs to be above the \"*\" so it takes precedence\n '/*/billing': (_params, _search, hash) => {\n if (hash.license) {\n actions.setShowLicenseDirectInput(true)\n actions.setActivateLicenseValues({ license: hash.license })\n actions.submitActivateLicense()\n }\n if (_search.products) {\n const products = _search.products.split(',')\n actions.setScrollToProductKey(products[0])\n }\n if (_search.billing_error) {\n actions.setBillingAlert({\n status: 'error',\n title: 'Error',\n message: _search.billing_error,\n })\n }\n actions.setRedirectPath()\n actions.setIsOnboarding()\n },\n '*': () => {\n actions.setRedirectPath()\n actions.setIsOnboarding()\n },\n })),\n])\n","import { LemonCollapse, LemonModal, Link } from '@posthog/lemon-ui'\nimport { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport EarlyAccessFeatureImage from 'public/early-access-feature-demo.png'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\nimport { urls } from 'scenes/urls'\n\nimport { FeatureFlagType, PipelineStage, Region } from '~/types'\n\ninterface InstructionsModalProps {\n flag: FeatureFlagType['key']\n visible: boolean\n onClose: () => void\n}\n\nexport function InstructionsModal({ onClose, visible, flag }: InstructionsModalProps): JSX.Element {\n const { preflight } = useValues(preflightLogic)\n\n const getCloudPanels = (): JSX.Element => (\n \n Give your users a{' '}\n \n prebuilt widget\n {' '}\n to opt-in to features\n \n \n ),\n },\n {\n key: '2',\n header: 'Option 2: Custom implementation',\n content: (\n
\n Opt user in\n
\n \n
\n\n Opt user out\n
\n \n
\n\n Retrieve Previews\n
\n \n
\n
\n ),\n },\n ]}\n />\n )\n\n const getSelfHostedPanels = (): JSX.Element => (\n
\n Opt user in\n
\n \n
\n\n Opt user out\n
\n \n
\n\n Retrieve Previews\n
\n \n
\n
\n )\n\n const panels: JSX.Element = preflight?.cloud ? getCloudPanels() : getSelfHostedPanels()\n\n return (\n \n
\n
\n Implement manual release condition toggles to give your users the ability choose which features they\n want to try\n
\n {panels}\n
\n
\n )\n}\n\nfunction FeatureEnrollInstructions({ flag }: { flag: string }): JSX.Element {\n return (\n \n {`posthog.updateEarlyAccessFeatureEnrollment(\"${flag}\", true)\n`}\n \n )\n}\n\nfunction FeatureUnenrollInstructions({ flag }: { flag: string }): JSX.Element {\n return (\n \n {`posthog.updateEarlyAccessFeatureEnrollment(\"${flag}\", false)\n`}\n \n )\n}\n\nfunction RetrievePreviewsInstructions(): JSX.Element {\n return (\n \n {`posthog.getEarlyAccessFeatures((previewItemData) => {\n // do something with early access feature\n})\n`}\n \n )\n}\n","import { useValues } from 'kea'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { apiHostOrigin } from 'lib/utils/apiHost'\nimport { teamLogic } from 'scenes/teamLogic'\n\nimport { GroupType } from '~/types'\n\nexport const UTM_TAGS = '?utm_medium=in-product&utm_campaign=feature-flag'\n\nexport interface FeatureFlagSnippet {\n flagKey: string\n multivariant?: boolean\n groupType?: GroupType\n localEvaluation?: boolean\n payload?: boolean\n samplePropertyName?: string\n instantlyAvailableProperties?: boolean\n}\n\nconst LOCAL_EVAL_REMINDER = `Remember to set a personal API key in the SDK to enable local evaluation.\n`\n\nexport function NodeJSSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'await client.'\n const flagFunction = payload ? 'getFeatureFlagPayload' : multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n groupProperties: { ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n personProperties: {'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${\n payload\n ? `\n undefined,`\n : ''\n }\n {\n groups: { '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n }\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${\n payload\n ? `\n undefined,`\n : ''\n }\n {${localEvalAddition}\n }\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n\n const variableName = payload ? 'matchedFlagPayload' : multivariant ? 'enabledVariant' : 'isMyFlagEnabledForUser'\n\n const conditional = multivariant ? `${variableName} === 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif (${conditional}) {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`\n\n return (\n <>\n \n {`${\n localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''\n }const ${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function PHPSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHog::'\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // empty person properties\n [],\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n [${groupType.group_type} => ['${propertyName}' => 'value', 'name' => 'xyz']]`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n ['${propertyName}' => 'value']`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n // group types\n ['${groupType.group_type}' => '<${groupType.name_singular || 'group'} ID>'],${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = multivariant ? '$enabledVariant' : '$isMyFlagEnabledForUser'\n\n const conditional = multivariant ? `${variableName} === 'example-variant'` : `${variableName}`\n\n return (\n <>\n \n {`${localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}\n\nif (${conditional}) {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`}\n \n \n )\n}\n\nexport function GolangSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'client.'\n\n const flagFunction = multivariant ? 'GetFeatureFlag' : 'IsFeatureEnabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n // add group properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n groupProperties: map[string]Properties{\"${groupType.group_type}\": posthog.NewProperties().Set(\"${propertyName}\", \"value\").Set(\"name\", \"xyz\")}`\n : `\n // add person properties used in the flag to ensure the flag\n // is evaluated locally, vs. going to our servers\n PersonProperties: posthog.NewProperties().Set(\"${propertyName}\", \"value\")`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n FeatureFlagPayload{\n Key: \"${flagKey}\",\n DistinctId: \"distinct-id\",\n Groups: Groups{'${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>'},${localEvalAddition}\n }\n)`\n : `${clientSuffix}${flagFunction}(\n FeatureFlagPayload{\n Key: '${flagKey}',\n DistinctId: \"distinct-id\",${localEvalAddition}\n })`\n const variableName = multivariant ? 'enabledVariant, err' : 'isMyFlagEnabledForUser, err'\n\n const conditional = multivariant ? `enabledVariant == 'example-variant'` : `isMyFlagEnabledForUser`\n\n return (\n <>\n \n {`${localEvaluation ? '// ' + LOCAL_EVAL_REMINDER : ''}${variableName} := ${flagSnippet}\n\nif ${conditional} {\n // Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n}`}\n \n \n )\n}\n\nexport function RubySnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n const flagFunction = payload ? 'get_feature_flag_payload' : multivariant ? 'get_feature_flag' : 'is_feature_enabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n # add group properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n group_properties: { ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n # add person properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n person_properties: {'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n groups: { '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = payload ? 'matched_flag_payload' : multivariant ? 'enabled_variant' : 'is_my_flag_enabled'\n\n const conditional = multivariant ? `${variableName} == 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif ${conditional}\n # Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\nend`\n\n return (\n <>\n \n {`${localEvaluation ? '# ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function PythonSnippet({\n flagKey,\n groupType,\n multivariant,\n localEvaluation,\n payload,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n const flagFunction = payload ? 'get_feature_flag_payload' : multivariant ? 'get_feature_flag' : 'feature_enabled'\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const localEvalAddition = localEvaluation\n ? groupType\n ? `\n # add group properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n group_properties={ ${groupType.group_type}: {'${propertyName}': 'value', 'name': 'xyz'}}`\n : `\n # add person properties used in the flag to ensure the flag\n # is evaluated locally, vs. going to our servers\n person_properties={'${propertyName}': 'value'}`\n : ''\n\n const flagSnippet = groupType\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',\n groups={ '${groupType.group_type}': '<${groupType.name_singular || 'group'} ID>' },${localEvalAddition}\n)`\n : localEvalAddition\n ? `${clientSuffix}${flagFunction}(\n '${flagKey}',\n 'user distinct id',${localEvalAddition}\n)`\n : `${clientSuffix}${flagFunction}('${flagKey}', 'user distinct id')`\n const variableName = payload ? 'matched_flag_payload' : multivariant ? 'enabled_variant' : 'is_my_flag_enabled'\n\n const conditional = multivariant ? `${variableName} == 'example-variant'` : `${variableName}`\n\n const followUpCode = payload\n ? ''\n : `\n\nif ${conditional}:\n # Do something differently for this ${groupType ? groupType.name_singular || 'group' : 'user'}\n`\n\n return (\n <>\n \n {`${localEvaluation ? '# ' + LOCAL_EVAL_REMINDER : ''}${variableName} = ${flagSnippet}${followUpCode}`}\n \n \n )\n}\n\nexport function AndroidSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHog.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload(\"${flagKey}\")`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == \"example-variant\"` : ''\n return (\n \n {`if (${clientSuffix}${flagFunction}(\"${flagKey}\")${variantSuffix}) {\n // do something\n}\n `}\n \n )\n}\n\nexport function FlutterSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'await Posthog().'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload('${flagKey}');`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n\n return (\n \n {`if (${clientSuffix}${flagFunction}('${flagKey}')${variantSuffix}) {\n // do something\n}\n `}\n \n )\n}\n\nexport function iOSSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'PostHogSDK.shared.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload(\"${flagKey}\")`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? `as? String == \"example-variant\"` : ''\n return (\n \n {`if ${clientSuffix}${flagFunction}(\"${flagKey}\")${variantSuffix} {\n // do something\n}`}\n \n )\n}\n\nexport function ReactNativeSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const clientSuffix = 'posthog.'\n\n if (payload) {\n return (\n \n {`${clientSuffix}getFeatureFlagPayload('${flagKey}')`}\n \n )\n }\n\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n return (\n \n {`// With a hook\nimport { useFeatureFlag } from 'posthog-react-native'\n\nconst MyComponent = () => {\n const showFlaggedFeature = useFeatureFlag('${flagKey}')\n\n if (showFlaggedFeature === undefined) {\n // the response is undefined if the flags are being loaded\n return null\n }\n\n return showFlaggedFeature ${variantSuffix} ? Testing feature 😄 : Not Testing feature 😢\n}\n\n// Or calling on the method directly\n${clientSuffix}${flagFunction}('${flagKey}')\n `}\n \n )\n}\n\nexport function ReactSnippet({ flagKey, multivariant, payload }: FeatureFlagSnippet): JSX.Element {\n const flagFunction = payload\n ? 'useFeatureFlagPayload'\n : multivariant\n ? 'useFeatureFlagVariantKey'\n : 'useFeatureFlagEnabled'\n\n const variable = payload ? 'payload' : multivariant ? 'variant' : 'flagEnabled'\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n\n return (\n \n {`\nimport { ${flagFunction} } from 'posthog-js/react'\n\nfunction App() {\n const ${variable} = ${flagFunction}('${flagKey}')\n\n if (${variable}${variantSuffix}) {\n // do something\n }\n}`}\n \n )\n}\n\nexport function APISnippet({ groupType }: FeatureFlagSnippet): JSX.Element {\n const { currentTeam } = useValues(teamLogic)\n\n const groupAddition = groupType\n ? `\n \"groups\": { \"${groupType.group_type}\": \"<${groupType.name_singular || 'group'} ID>\" },`\n : ''\n\n return (\n <>\n \n {`curl ${apiHostOrigin()}/decide?v=3/ \\\\\n-X POST -H 'Content-Type: application/json' \\\\\n-d '{\n \"api_key\": \"${currentTeam ? currentTeam.api_token : '[project_api_key]'}\",\n \"distinct_id\": \"[user distinct id]\",${groupAddition}\n}'\n `}\n \n \n )\n}\n\nexport function JSSnippet({\n flagKey,\n multivariant,\n payload,\n groupType,\n instantlyAvailableProperties,\n samplePropertyName,\n}: FeatureFlagSnippet): JSX.Element {\n if (payload) {\n return (\n <>\n \n {`posthog.getFeatureFlagPayload('${flagKey ?? ''}')`}\n \n \n )\n }\n\n const propertyName = samplePropertyName || 'is_authorized'\n\n const propertyOverrideSnippet = `// Your flag depends on properties that are not instantly available. If you want\n// to make them available without waiting for server delays, send these properties for flag evaluation, like so:\n// Make sure to call this before evaluating flags. More info: https://posthog.com/docs/libraries/js#overriding-server-properties \nposthog.${\n groupType\n ? `setGroupPropertiesForFlags({ '${groupType.group_type}': {'${propertyName}': 'value'}})`\n : `setPersonPropertiesForFlags({'${propertyName}': 'value'})`\n }\n\n`\n\n const clientSuffix = 'posthog.'\n const flagFunction = multivariant ? 'getFeatureFlag' : 'isFeatureEnabled'\n\n const variantSuffix = multivariant ? ` == 'example-variant'` : ''\n return (\n <>\n \n {`${instantlyAvailableProperties ? '' : propertyOverrideSnippet}// Ensure flags are loaded before usage.\n// You'll only need to call this on the code for when the first time a user visits.\n${clientSuffix}onFeatureFlags(function() {\n // feature flags should be available at this point\n if (${clientSuffix}${flagFunction}('${flagKey ?? ''}') ${variantSuffix}) {\n // do something\n }\n})\n\n// Otherwise, you can just do:\nif (${clientSuffix}${flagFunction}('${flagKey ?? ''}') ${variantSuffix}) {\n // do something\n}`}\n \n \n )\n}\n\nexport function JSBootstrappingSnippet(): JSX.Element {\n return (\n \n {`// Initialise the posthog library with a distinct ID and feature flags for immediate loading\n// This avoids the delay between the library loading and feature flags becoming available to use.\n\nposthog.init('{project_api_key}', {\n api_host: '${apiHostOrigin()}'\n bootstrap:\n {\n distinctID: 'your-anonymous-id',\n featureFlags: {\n // input the flag values here from 'posthog.getAllFlags(distinct_id)' which you can find in the server-side libraries.\n // example:\n // 'flag-1': true,\n // 'variant-flag': 'control',\n // 'other-flag': false\n },\n }\n})\n `}\n \n )\n}\n","import { mergeAttributes, Node, NodeViewProps } from '@tiptap/core'\nimport { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'\nimport { NotebookNodeType, NotebookTarget } from '~/types'\nimport { dayjs } from 'lib/dayjs'\nimport { JSONContent } from '../Notebook/utils'\nimport clsx from 'clsx'\nimport { urls } from 'scenes/urls'\nimport { LemonButton } from '@posthog/lemon-ui'\nimport { notebookLogic } from '../Notebook/notebookLogic'\nimport { useValues } from 'kea'\nimport { useMemo } from 'react'\nimport { openNotebook } from '~/models/notebooksModel'\n\nexport interface NotebookNodeReplayTimestampAttrs {\n playbackTime?: number\n sessionRecordingId: string\n sourceNodeId?: string\n}\n\nconst Component = (props: NodeViewProps): JSX.Element => {\n const { shortId, findNodeLogic, findNodeLogicById } = useValues(notebookLogic)\n const { sessionRecordingId, playbackTime = 0, sourceNodeId } = props.node.attrs as NotebookNodeReplayTimestampAttrs\n\n const relatedNodeInNotebook = useMemo(() => {\n const logicById = sourceNodeId ? findNodeLogicById(sourceNodeId) : null\n\n return logicById ?? findNodeLogic(NotebookNodeType.Recording, { id: sessionRecordingId })\n }, [findNodeLogic])\n\n const handlePlayInNotebook = (): void => {\n // TODO: Figure out how to send this action info to the playlist OR the replay node...\n\n relatedNodeInNotebook?.values.sendMessage('play-replay', {\n sessionRecordingId,\n time: playbackTime ?? 0,\n })\n }\n\n return (\n \n openNotebook(shortId, NotebookTarget.Popover)\n }\n to={\n !relatedNodeInNotebook\n ? urls.replaySingle(sessionRecordingId) + `?t=${playbackTime / 1000}`\n : undefined\n }\n >\n {formatTimestamp(playbackTime)}\n \n \n )\n}\n\nexport const NotebookNodeReplayTimestamp = Node.create({\n name: NotebookNodeType.ReplayTimestamp,\n inline: true,\n group: 'inline',\n atom: true,\n\n serializedText: (attrs: NotebookNodeReplayTimestampAttrs): string => {\n // timestamp is not a block so `getText` does not add a separator.\n // we need to add it manually\n return `${attrs.playbackTime ? formatTimestamp(attrs.playbackTime) : '00:00'}:\\n`\n },\n\n addAttributes() {\n return {\n playbackTime: { default: null, keepOnSplit: false },\n sessionRecordingId: { default: null, keepOnSplit: true, isRequired: true },\n sourceNodeId: { default: null, keepOnSplit: true },\n }\n },\n\n parseHTML() {\n return [{ tag: NotebookNodeType.ReplayTimestamp }]\n },\n\n renderHTML({ HTMLAttributes }) {\n return [NotebookNodeType.ReplayTimestamp, mergeAttributes(HTMLAttributes)]\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(Component)\n },\n})\n\nexport function formatTimestamp(time: number): string {\n return dayjs.duration(time, 'milliseconds').format('HH:mm:ss').replace(/^00:/, '').trim()\n}\n\nexport function buildTimestampCommentContent(attrs: NotebookNodeReplayTimestampAttrs): JSONContent {\n return {\n type: 'paragraph',\n content: [\n {\n type: NotebookNodeType.ReplayTimestamp,\n attrs,\n },\n { type: 'text', text: ' ' },\n ],\n }\n}\n","import {\n IconCursor,\n IconFunnels,\n IconHogQL,\n IconLifecycle,\n IconPeople,\n IconRetention,\n IconRewindPlay,\n IconStickiness,\n IconTrends,\n IconUpload,\n IconUserPaths,\n} from '@posthog/icons'\nimport { IconCode } from '@posthog/icons'\nimport { LemonButton, LemonDivider, lemonToast } from '@posthog/lemon-ui'\nimport { Extension } from '@tiptap/core'\nimport { ReactRenderer } from '@tiptap/react'\nimport Suggestion from '@tiptap/suggestion'\nimport Fuse from 'fuse.js'\nimport { useValues } from 'kea'\nimport { IconBold, IconItalic } from 'lib/lemon-ui/icons'\nimport { Popover } from 'lib/lemon-ui/Popover'\nimport { selectFiles } from 'lib/utils/file-utils'\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useState } from 'react'\n\nimport { KeyboardShortcut } from '~/layout/navigation-3000/components/KeyboardShortcut'\nimport { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils'\nimport { NodeKind } from '~/queries/schema'\nimport { BaseMathType, ChartDisplayType, FunnelVizType, NotebookNodeType, PathType, RetentionPeriod } from '~/types'\n\nimport { buildNodeEmbed } from '../Nodes/NotebookNodeEmbed'\nimport { buildInsightVizQueryContent, buildNodeQueryContent } from '../Nodes/NotebookNodeQuery'\nimport NotebookIconHeading from './NotebookIconHeading'\nimport { notebookLogic } from './notebookLogic'\nimport { EditorCommands, EditorRange } from './utils'\n\ntype SlashCommandConditionalProps =\n | {\n mode: 'add'\n getPos: () => number\n range?: never\n }\n | {\n mode: 'slash'\n getPos?: never\n range: EditorRange\n }\n\ntype SlashCommandsProps = SlashCommandConditionalProps & {\n query?: string\n decorationNode?: any\n onClose?: () => void\n}\n\ntype SlashCommandsPopoverProps = SlashCommandsProps & {\n visible: boolean\n children?: JSX.Element\n}\n\ntype SlashCommandsRef = {\n onKeyDown: (event: KeyboardEvent) => boolean\n}\n\ntype SlashCommandsItem = {\n title: string\n search?: string\n icon?: JSX.Element\n command: (chain: EditorCommands, pos: number | EditorRange) => EditorCommands | Promise\n}\n\nconst TEXT_CONTROLS: SlashCommandsItem[] = [\n {\n title: 'h1',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 1 }),\n },\n {\n title: 'h2',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 2 }),\n },\n {\n title: 'h3',\n icon: ,\n command: (chain) => chain.toggleHeading({ level: 3 }),\n },\n {\n title: 'bold',\n icon: ,\n command: (chain) => chain.toggleBold(),\n },\n {\n title: 'italic',\n icon: ,\n command: (chain) => chain.toggleItalic(),\n },\n]\n\nconst SLASH_COMMANDS: SlashCommandsItem[] = [\n {\n title: 'Trend',\n search: 'graph trend insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.TrendsQuery,\n filterTestAccounts: false,\n series: [\n {\n kind: NodeKind.EventsNode,\n event: '$pageview',\n name: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n interval: 'day',\n trendsFilter: {\n display: ChartDisplayType.ActionsLineGraph,\n },\n })\n ),\n },\n {\n title: 'Funnel',\n search: 'funnel insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.FunnelsQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n },\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n },\n ],\n funnelsFilter: {\n funnelVizType: FunnelVizType.Steps,\n },\n })\n ),\n },\n {\n title: 'Retention',\n search: 'retention insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.RetentionQuery,\n retentionFilter: {\n period: RetentionPeriod.Day,\n totalIntervals: 11,\n targetEntity: {\n id: '$pageview',\n name: '$pageview',\n type: 'events',\n },\n returningEntity: {\n id: '$pageview',\n name: '$pageview',\n type: 'events',\n },\n retentionType: 'retention_first_time',\n },\n })\n ),\n },\n {\n title: 'Paths',\n search: 'user paths insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.PathsQuery,\n pathsFilter: {\n includeEventTypes: [PathType.PageView],\n },\n })\n ),\n },\n {\n title: 'Stickiness',\n search: 'stickiness insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.StickinessQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n stickinessFilter: {},\n })\n ),\n },\n {\n title: 'Lifecycle',\n search: 'lifecycle insight',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildInsightVizQueryContent({\n kind: NodeKind.LifecycleQuery,\n series: [\n {\n kind: NodeKind.EventsNode,\n name: '$pageview',\n event: '$pageview',\n math: BaseMathType.TotalCount,\n },\n ],\n })\n ),\n },\n {\n title: 'HogQL',\n search: 'sql',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.HogQLQuery,\n query: `select event,\n person.properties.email,\n properties.$browser,\n count()\n from events\n where {filters} -- replaced with global date and property filters\n and person.properties.email is not null\ngroup by event,\n properties.$browser,\n person.properties.email\norder by count() desc\n limit 100`,\n filters: {\n dateRange: {\n date_from: '-24h',\n },\n },\n },\n })\n ),\n },\n {\n title: 'Events',\n search: 'data explore',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.EventsQuery,\n select: defaultDataTableColumns(NodeKind.EventsQuery),\n properties: [],\n after: '-24h',\n limit: 100,\n },\n })\n ),\n },\n {\n title: 'People',\n search: 'persons users',\n icon: ,\n command: (chain, pos) =>\n chain.insertContentAt(\n pos,\n buildNodeQueryContent({\n kind: NodeKind.DataTableNode,\n columns: defaultDataTableColumns(NodeKind.ActorsQuery),\n source: {\n kind: NodeKind.ActorsQuery,\n properties: [],\n },\n })\n ),\n },\n {\n title: 'Session recordings',\n search: 'video replay',\n icon: ,\n command: (chain, pos) => chain.insertContentAt(pos, { type: NotebookNodeType.RecordingPlaylist, attrs: {} }),\n },\n {\n title: 'Image',\n search: 'picture gif',\n icon: ,\n command: async (chain, pos) => {\n // Trigger upload followed by insert\n try {\n const files = await selectFiles({ contentType: 'image/*', multiple: false })\n\n if (files.length) {\n return chain.insertContentAt(pos, { type: NotebookNodeType.Image, attrs: { file: files[0] } })\n }\n } catch (e) {\n lemonToast.error('Something went wrong when trying to select a file.')\n }\n\n return chain\n },\n },\n {\n title: 'Embedded iframe',\n search: 'iframe embed',\n icon: ,\n command: async (chain, pos) => {\n return chain.insertContentAt(pos, buildNodeEmbed())\n },\n },\n]\n\nexport const SlashCommands = forwardRef(function SlashCommands(\n { mode, range, getPos, onClose, query }: SlashCommandsProps,\n ref\n): JSX.Element | null {\n const { editor } = useValues(notebookLogic)\n // We start with 1 because the first item is the text controls\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [selectedHorizontalIndex, setSelectedHorizontalIndex] = useState(0)\n\n const allCommmands = [...TEXT_CONTROLS, ...SLASH_COMMANDS]\n\n const fuse = useMemo(() => {\n return new Fuse(allCommmands, {\n keys: ['title', 'search'],\n threshold: 0.3,\n })\n }, [allCommmands])\n\n const filteredCommands = useMemo(() => {\n if (!query) {\n return allCommmands\n }\n return fuse.search(query).map((result) => result.item)\n }, [query, fuse])\n\n const filteredSlashCommands = useMemo(\n () => filteredCommands.filter((item) => SLASH_COMMANDS.includes(item)),\n [filteredCommands]\n )\n\n useEffect(() => {\n setSelectedIndex(0)\n setSelectedHorizontalIndex(0)\n }, [query])\n\n const execute = async (item: SlashCommandsItem): Promise => {\n if (editor) {\n const selectedNode = editor.getSelectedNode()\n const isTextNode = selectedNode === null || selectedNode.isText\n const isTextCommand = TEXT_CONTROLS.map((c) => c.title).includes(item.title)\n\n const position = mode === 'slash' ? range.from : getPos()\n let chain = mode === 'slash' ? editor.deleteRange(range) : editor.chain()\n\n if (!isTextNode && isTextCommand) {\n chain = chain.insertContentAt(position, { type: 'paragraph' })\n }\n\n const partialCommand = await item.command(chain, position)\n partialCommand.run()\n\n onClose?.()\n }\n }\n\n const onPressEnter = async (): Promise => {\n const command =\n selectedIndex === -1 ? TEXT_CONTROLS[selectedHorizontalIndex] : filteredSlashCommands[selectedIndex]\n\n await execute(command)\n }\n const onPressUp = (): void => {\n setSelectedIndex(Math.max(selectedIndex - 1, -1))\n }\n const onPressDown = (): void => {\n setSelectedIndex(Math.min(selectedIndex + 1, SLASH_COMMANDS.length - 1))\n }\n\n const onPressLeft = (): void => {\n setSelectedHorizontalIndex(Math.max(selectedHorizontalIndex - 1, 0))\n }\n const onPressRight = (): void => {\n setSelectedHorizontalIndex(Math.min(selectedHorizontalIndex + 1, TEXT_CONTROLS.length - 1))\n }\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent): boolean => {\n const keyMappings = {\n ArrowUp: onPressUp,\n ArrowDown: onPressDown,\n ArrowLeft: onPressLeft,\n ArrowRight: onPressRight,\n Enter: onPressEnter,\n }\n\n if (keyMappings[event.key]) {\n keyMappings[event.key]()\n return true\n }\n\n return false\n },\n [selectedIndex, selectedHorizontalIndex, filteredCommands]\n )\n\n // Expose the keydown handler to the tiptap extension\n useImperativeHandle(ref, () => ({ onKeyDown }), [onKeyDown])\n\n useEffect(() => {\n if (mode !== 'add') {\n return\n }\n\n // If not opened from a slash command, we want to add our own keyboard listeners\n const keyDownListener = (event: KeyboardEvent): void => {\n const preventDefault = onKeyDown(event)\n if (preventDefault) {\n event.preventDefault()\n }\n }\n\n window.addEventListener('keydown', keyDownListener, true)\n\n return () => window.removeEventListener('keydown', keyDownListener, true)\n }, [onKeyDown, mode])\n\n if (!editor) {\n return null\n }\n\n return (\n
\n
\n {TEXT_CONTROLS.map((item, index) => (\n void execute(item)}\n icon={item.icon}\n />\n ))}\n
\n\n \n\n {filteredSlashCommands.map((item, index) => (\n void execute(item)}\n >\n {item.title}\n \n ))}\n\n {filteredSlashCommands.length === 0 && (\n
\n Nothing matching /{query}\n
\n )}\n\n {mode === 'add' && (\n <>\n \n
\n You can trigger this menu by typing \n
\n \n )}\n
\n )\n})\n\nexport const SlashCommandsPopover = forwardRef(\n function SlashCommandsPopover(\n { visible = true, decorationNode, children, onClose, ...props }: SlashCommandsPopoverProps,\n ref\n ): JSX.Element | null {\n return (\n }\n referenceElement={decorationNode}\n visible={visible}\n onClickOutside={onClose}\n >\n {children}\n \n )\n }\n)\n\nexport const SlashCommandsExtension = Extension.create({\n name: 'slash-commands',\n\n addProseMirrorPlugins() {\n return [\n Suggestion({\n editor: this.editor,\n char: '/',\n startOfLine: true,\n render: () => {\n let renderer: ReactRenderer\n\n return {\n onStart: (props) => {\n renderer = new ReactRenderer(SlashCommandsPopover, {\n props: { ...props, mode: 'slash' },\n editor: props.editor,\n })\n },\n\n onUpdate(props) {\n renderer.updateProps(props)\n\n if (!props.clientRect) {\n return\n }\n },\n\n onKeyDown(props) {\n if (props.event.key === 'Escape') {\n renderer.destroy()\n return true\n }\n return renderer.ref?.onKeyDown(props.event) ?? false\n },\n\n onExit() {\n renderer.destroy()\n },\n }\n },\n }),\n ]\n },\n})\n","import {\n addedNodeMutation,\n customEvent,\n EventType,\n fullSnapshotEvent,\n incrementalSnapshotEvent,\n IncrementalSource,\n metaEvent,\n mutationData,\n removedNodeMutation,\n} from '@rrweb/types'\nimport { captureMessage } from '@sentry/react'\nimport { isObject } from 'lib/utils'\nimport { PLACEHOLDER_SVG_DATA_IMAGE_URL } from 'scenes/session-recordings/player/rrweb'\n\nimport {\n attributes,\n documentNode,\n elementNode,\n fullSnapshotEvent as MobileFullSnapshotEvent,\n keyboardEvent,\n metaEvent as MobileMetaEvent,\n MobileIncrementalSnapshotEvent,\n MobileNodeMutation,\n MobileNodeType,\n NodeType,\n serializedNodeWithId,\n textNode,\n wireframe,\n wireframeButton,\n wireframeCheckBox,\n wireframeDiv,\n wireframeImage,\n wireframeInputComponent,\n wireframeNavigationBar,\n wireframePlaceholder,\n wireframeProgress,\n wireframeRadio,\n wireframeRadioGroup,\n wireframeRectangle,\n wireframeScreenshot,\n wireframeSelect,\n wireframeStatusBar,\n wireframeText,\n wireframeToggle,\n} from '../mobile.types'\nimport { makeNavigationBar, makeOpenKeyboardPlaceholder, makeStatusBar } from './screen-chrome'\nimport { ConversionContext, ConversionResult } from './types'\nimport {\n asStyleString,\n makeBodyStyles,\n makeColorStyles,\n makeDeterminateProgressStyles,\n makeHTMLStyles,\n makeIndeterminateProgressStyles,\n makeMinimalStyles,\n makePositionStyles,\n makeStylesString,\n} from './wireframeStyle'\n\nexport const BACKGROUND = '#f3f4ef'\nconst FOREGROUND = '#35373e'\n\n/**\n * generates a sequence of ids\n * from 100 to 9,999,999\n * the transformer reserves ids in the range 0 to 9,999,999\n * we reserve a range of ids because we need nodes to have stable ids across snapshots\n * in order for incremental snapshots to work\n * some mobile elements have to be wrapped in other elements in order to be styled correctly\n * which means the web version of a mobile replay will use ids that don't exist in the mobile replay,\n * and we need to ensure they don't clash\n * -----\n * id is typed as a number in rrweb\n * and there's a few places in their code where rrweb uses a check for `id === -1` to bail out of processing\n * so, it's safest to assume that id is expected to be a positive integer\n */\nfunction* ids(): Generator {\n let i = 100\n while (i < 9999999) {\n yield i++\n }\n}\n\nlet globalIdSequence = ids()\n\n// there are some fixed ids that we need to use for fixed elements or artificial mutations\nconst DOCUMENT_ID = 1\nconst HTML_DOC_TYPE_ID = 2\nconst HTML_ELEMENT_ID = 3\nconst HEAD_ID = 4\nconst BODY_ID = 5\n// the nav bar should always be the last item in the body so that it is at the top of the stack\nconst NAVIGATION_BAR_PARENT_ID = 7\nexport const NAVIGATION_BAR_ID = 8\n// the keyboard so that it is still before the nav bar\nconst KEYBOARD_PARENT_ID = 9\nexport const KEYBOARD_ID = 10\nexport const STATUS_BAR_PARENT_ID = 11\nexport const STATUS_BAR_ID = 12\n\nfunction isKeyboardEvent(x: unknown): x is keyboardEvent {\n return isObject(x) && 'data' in x && isObject(x.data) && 'tag' in x.data && x.data.tag === 'keyboard'\n}\n\nexport function _isPositiveInteger(id: unknown): id is number {\n return typeof id === 'number' && id > 0 && id % 1 === 0\n}\n\nfunction _isNullish(x: unknown): x is null | undefined {\n return x === null || x === undefined\n}\n\nfunction isRemovedNodeMutation(x: addedNodeMutation | removedNodeMutation): x is removedNodeMutation {\n return isObject(x) && 'id' in x\n}\n\nexport const makeCustomEvent = (\n mobileCustomEvent: (customEvent | keyboardEvent) & {\n timestamp: number\n delay?: number\n }\n): (customEvent | incrementalSnapshotEvent) & {\n timestamp: number\n delay?: number\n} => {\n if (isKeyboardEvent(mobileCustomEvent)) {\n // keyboard events are handled as incremental snapshots to add or remove a keyboard from the DOM\n // TODO eventually we can pass something to makeIncrementalEvent here\n const adds: addedNodeMutation[] = []\n const removes = []\n if (mobileCustomEvent.data.payload.open) {\n const keyboardPlaceHolder = makeOpenKeyboardPlaceholder(mobileCustomEvent, {\n timestamp: mobileCustomEvent.timestamp,\n idSequence: globalIdSequence,\n })\n if (keyboardPlaceHolder) {\n adds.push({\n parentId: KEYBOARD_PARENT_ID,\n nextId: null,\n node: keyboardPlaceHolder.result,\n })\n // mutations seem not to want a tree of nodes to add\n // so even though `keyboardPlaceholder` is a tree with content\n // we have to add the text content as well\n adds.push({\n parentId: keyboardPlaceHolder.result.id,\n nextId: null,\n node: {\n type: NodeType.Text,\n id: globalIdSequence.next().value,\n textContent: 'keyboard',\n },\n })\n } else {\n captureMessage('Failed to create keyboard placeholder', { extra: { mobileCustomEvent } })\n }\n } else {\n removes.push({\n parentId: KEYBOARD_PARENT_ID,\n id: KEYBOARD_ID,\n })\n }\n const mutation: mutationData = { adds, attributes: [], removes, source: IncrementalSource.Mutation, texts: [] }\n return {\n type: EventType.IncrementalSnapshot,\n data: mutation,\n timestamp: mobileCustomEvent.timestamp,\n }\n }\n return mobileCustomEvent\n}\n\nexport const makeMetaEvent = (\n mobileMetaEvent: MobileMetaEvent & {\n timestamp: number\n }\n): metaEvent & {\n timestamp: number\n delay?: number\n} => ({\n type: EventType.Meta,\n data: {\n href: mobileMetaEvent.data.href || '', // the replay doesn't use the href, so we safely ignore any absence\n // mostly we need width and height in order to size the viewport\n width: mobileMetaEvent.data.width,\n height: mobileMetaEvent.data.height,\n },\n timestamp: mobileMetaEvent.timestamp,\n})\n\nexport function makeDivElement(\n wireframe: wireframeDiv,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const _id = _isPositiveInteger(wireframe.id) ? wireframe.id : context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: asStyleString([makeStylesString(wireframe), 'overflow:hidden', 'white-space:nowrap']),\n 'data-rrweb-id': _id,\n },\n id: _id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction makeTextElement(\n wireframe: wireframeText,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (wireframe.type !== 'text') {\n console.error('Passed incorrect wireframe type to makeTextElement')\n return null\n }\n\n // because we might have to style the text, we always wrap it in a div\n // and apply styles to that\n const id = context.idSequence.next().value\n\n const childNodes = [...children]\n if (!_isNullish(wireframe.text)) {\n childNodes.unshift({\n type: NodeType.Text,\n textContent: wireframe.text,\n // since the text node is wrapped, we assign it a synthetic id\n id,\n })\n }\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: asStyleString([makeStylesString(wireframe), 'overflow:hidden', 'white-space:normal']),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes,\n },\n context,\n }\n}\n\nfunction makeWebViewElement(\n wireframe: wireframe,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const labelledWireframe: wireframePlaceholder = { ...wireframe } as wireframePlaceholder\n if ('url' in wireframe) {\n labelledWireframe.label = wireframe.url\n }\n\n return makePlaceholderElement(labelledWireframe, children, context)\n}\n\nexport function makePlaceholderElement(\n wireframe: wireframe,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const txt = 'label' in wireframe && wireframe.label ? wireframe.label : wireframe.type || 'PLACEHOLDER'\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe, {\n verticalAlign: 'center',\n horizontalAlign: 'center',\n backgroundColor: wireframe.style?.backgroundColor || BACKGROUND,\n color: wireframe.style?.color || FOREGROUND,\n backgroundImage: PLACEHOLDER_SVG_DATA_IMAGE_URL,\n backgroundSize: 'auto',\n backgroundRepeat: 'unset',\n ...context.styleOverride,\n }),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Text,\n // since the text node is wrapped, we assign it a synthetic id\n id: context.idSequence.next().value,\n textContent: txt,\n },\n ...children,\n ],\n },\n context,\n }\n}\n\nexport function dataURIOrPNG(src: string): string {\n // replace all new lines in src\n src = src.replace(/\\r?\\n|\\r/g, '')\n if (!src.startsWith('data:image/')) {\n return 'data:image/png;base64,' + src\n }\n return src\n}\n\nfunction makeImageElement(\n wireframe: wireframeImage | wireframeScreenshot,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (!wireframe.base64) {\n return makePlaceholderElement(wireframe, children, context)\n }\n\n const src = dataURIOrPNG(wireframe.base64)\n return {\n result: {\n type: NodeType.Element,\n tagName: 'img',\n attributes: {\n src: src,\n width: wireframe.width,\n height: wireframe.height,\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction inputAttributes(wireframe: T): attributes {\n const attributes = {\n style: makeStylesString(wireframe),\n type: wireframe.inputType,\n ...(wireframe.disabled ? { disabled: wireframe.disabled } : {}),\n 'data-rrweb-id': wireframe.id,\n }\n\n switch (wireframe.inputType) {\n case 'checkbox':\n return {\n ...attributes,\n style: null, // checkboxes are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n }\n case 'toggle':\n return {\n ...attributes,\n style: null, // toggle are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n }\n case 'radio':\n return {\n ...attributes,\n style: null, // radio buttons are styled by being combined with a label\n ...(wireframe.checked ? { checked: wireframe.checked } : {}),\n // radio value defaults to the string \"on\" if not specified\n // we're not really submitting the form, so it doesn't matter 🤞\n // radio name is used to correctly uncheck values when one is checked\n // mobile doesn't really have it, and we will be checking based on snapshots,\n // so we can ignore it for now\n }\n case 'button':\n return {\n ...attributes,\n }\n case 'text_area':\n return {\n ...attributes,\n value: wireframe.value || '',\n }\n case 'progress':\n return {\n ...attributes,\n // indeterminate when omitted\n value: wireframe.value || null,\n // defaults to 1 when omitted\n max: wireframe.max || null,\n type: null, // progress has no type attribute\n }\n default:\n return {\n ...attributes,\n value: wireframe.value || '',\n }\n }\n}\n\nfunction makeButtonElement(\n wireframe: wireframeButton,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const buttonText: textNode | null = wireframe.value\n ? {\n type: NodeType.Text,\n textContent: wireframe.value,\n }\n : null\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'button',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: buttonText ? [{ ...buttonText, id: context.idSequence.next().value }, ...children] : children,\n },\n context,\n }\n}\n\nfunction makeSelectOptionElement(\n option: string,\n selected: boolean,\n context: ConversionContext\n): ConversionResult {\n const optionId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'option',\n attributes: {\n ...(selected ? { selected: selected } : {}),\n 'data-rrweb-id': optionId,\n },\n id: optionId,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: option,\n id: context.idSequence.next().value,\n },\n ],\n },\n context,\n }\n}\n\nfunction makeSelectElement(\n wireframe: wireframeSelect,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const selectOptions: serializedNodeWithId[] = []\n if (wireframe.options) {\n let optionContext = context\n for (let i = 0; i < wireframe.options.length; i++) {\n const option = wireframe.options[i]\n const conversion = makeSelectOptionElement(option, wireframe.value === option, optionContext)\n selectOptions.push(conversion.result)\n optionContext = conversion.context\n }\n }\n return {\n result: {\n type: NodeType.Element,\n tagName: 'select',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: [...selectOptions, ...children],\n },\n context,\n }\n}\n\nfunction groupRadioButtons(children: serializedNodeWithId[], radioGroupName: string): serializedNodeWithId[] {\n return children.map((child) => {\n if (child.type === NodeType.Element && child.tagName === 'input' && child.attributes.type === 'radio') {\n return {\n ...child,\n attributes: {\n ...child.attributes,\n name: radioGroupName,\n 'data-rrweb-id': child.id,\n },\n }\n }\n return child\n })\n}\n\nfunction makeRadioGroupElement(\n wireframe: wireframeRadioGroup,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n const radioGroupName = 'radio_group_' + wireframe.id\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: groupRadioButtons(children, radioGroupName),\n },\n context,\n }\n}\n\nfunction makeStar(title: string, path: string, context: ConversionContext): serializedNodeWithId {\n const svgId = context.idSequence.next().value\n const titleId = context.idSequence.next().value\n const pathId = context.idSequence.next().value\n return {\n type: NodeType.Element,\n tagName: 'svg',\n isSVG: true,\n attributes: {\n style: asStyleString(['height: 100%', 'overflow-clip-margin: content-box', 'overflow:hidden']),\n viewBox: '0 0 24 24',\n fill: 'currentColor',\n 'data-rrweb-id': svgId,\n },\n id: svgId,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'title',\n isSVG: true,\n attributes: {\n 'data-rrweb-id': titleId,\n },\n id: titleId,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: title,\n id: context.idSequence.next().value,\n },\n ],\n },\n {\n type: NodeType.Element,\n tagName: 'path',\n isSVG: true,\n attributes: {\n d: path,\n 'data-rrweb-id': pathId,\n },\n id: pathId,\n childNodes: [],\n },\n ],\n }\n}\n\nfunction filledStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'filled star',\n 'M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z',\n context\n )\n}\n\nfunction halfStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'half-filled star',\n 'M12,15.4V6.1L13.71,10.13L18.09,10.5L14.77,13.39L15.76,17.67M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z',\n context\n )\n}\n\nfunction emptyStar(context: ConversionContext): serializedNodeWithId {\n return makeStar(\n 'empty star',\n 'M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z',\n context\n )\n}\n\nfunction makeRatingBar(\n wireframe: wireframeProgress,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n // max is the number of stars... and value is the number of stars to fill\n\n // deliberate double equals, because we want to allow null and undefined\n if (wireframe.value == null || wireframe.max == null) {\n return makePlaceholderElement(wireframe, children, context)\n }\n\n const numberOfFilledStars = Math.floor(wireframe.value)\n const numberOfHalfStars = wireframe.value - numberOfFilledStars > 0 ? 1 : 0\n const numberOfEmptyStars = wireframe.max - numberOfFilledStars - numberOfHalfStars\n\n const filledStars = Array(numberOfFilledStars)\n .fill(undefined)\n .map(() => filledStar(context))\n const halfStars = Array(numberOfHalfStars)\n .fill(undefined)\n .map(() => halfStar(context))\n const emptyStars = Array(numberOfEmptyStars)\n .fill(undefined)\n .map(() => emptyStar(context))\n\n const ratingBarId = context.idSequence.next().value\n const ratingBar = {\n type: NodeType.Element,\n tagName: 'div',\n id: ratingBarId,\n attributes: {\n style: asStyleString([\n makeColorStyles(wireframe),\n 'position: relative',\n 'display: flex',\n 'flex-direction: row',\n 'padding: 2px 4px',\n ]),\n 'data-rrweb-id': ratingBarId,\n },\n childNodes: [...filledStars, ...halfStars, ...emptyStars],\n } as serializedNodeWithId\n\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [ratingBar, ...children],\n },\n context,\n }\n}\n\nfunction makeProgressElement(\n wireframe: wireframeProgress,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (wireframe.style?.bar === 'circular') {\n // value needs to be expressed as a number between 0 and 100\n const max = wireframe.max || 1\n let value = wireframe.value || null\n if (_isPositiveInteger(value) && value <= max) {\n value = (value / max) * 100\n } else {\n value = null\n }\n\n const styleOverride = {\n color: wireframe.style?.color || FOREGROUND,\n backgroundColor: wireframe.style?.backgroundColor || BACKGROUND,\n }\n\n // if not _isPositiveInteger(value) then we render a spinner,\n // so we need to add a style element with the spin keyframe\n const stylingChildren: serializedNodeWithId[] = _isPositiveInteger(value)\n ? []\n : [\n {\n type: NodeType.Element,\n tagName: 'style',\n attributes: {\n type: 'text/css',\n },\n id: context.idSequence.next().value,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: `@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }`,\n id: context.idSequence.next().value,\n },\n ],\n },\n ]\n\n const wrappingDivId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeMinimalStyles(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // with no provided value we render a spinner\n style: _isPositiveInteger(value)\n ? makeDeterminateProgressStyles(wireframe, styleOverride)\n : makeIndeterminateProgressStyles(wireframe, styleOverride),\n 'data-rrweb-id': wrappingDivId,\n },\n id: wrappingDivId,\n childNodes: stylingChildren,\n },\n ...children,\n ],\n },\n context,\n }\n } else if (wireframe.style?.bar === 'rating') {\n return makeRatingBar(wireframe, children, context)\n }\n return {\n result: {\n type: NodeType.Element,\n tagName: 'progress',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction makeToggleParts(wireframe: wireframeToggle, context: ConversionContext): serializedNodeWithId[] {\n const togglePosition = wireframe.checked ? 'right' : 'left'\n const defaultColor = wireframe.checked ? '#1d4aff' : BACKGROUND\n const sliderPartId = context.idSequence.next().value\n const handlePartId = context.idSequence.next().value\n return [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-toggle-part': 'slider',\n style: asStyleString([\n 'position:absolute',\n 'top:33%',\n 'left:5%',\n 'display:inline-block',\n 'width:75%',\n 'height:33%',\n 'opacity: 0.2',\n 'border-radius:7.5%',\n `background-color:${wireframe.style?.color || defaultColor}`,\n ]),\n 'data-rrweb-id': sliderPartId,\n },\n id: sliderPartId,\n childNodes: [],\n },\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-toggle-part': 'handle',\n style: asStyleString([\n 'position:absolute',\n 'top:1.5%',\n `${togglePosition}:5%`,\n 'display:flex',\n 'align-items:center',\n 'justify-content:center',\n 'width:40%',\n 'height:75%',\n 'cursor:inherit',\n 'border-radius:50%',\n `background-color:${wireframe.style?.color || defaultColor}`,\n `border:2px solid ${wireframe.style?.borderColor || wireframe.style?.color || defaultColor}`,\n ]),\n 'data-rrweb-id': handlePartId,\n },\n id: handlePartId,\n childNodes: [],\n },\n ]\n}\n\nfunction makeToggleElement(\n wireframe: wireframeToggle,\n context: ConversionContext\n): ConversionResult<\n elementNode & {\n id: number\n }\n> | null {\n const isLabelled = 'label' in wireframe\n const wrappingDivId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // if labelled take up available space, otherwise use provided positioning\n style: isLabelled ? asStyleString(['height:100%', 'flex:1']) : makePositionStyles(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n // relative position, fills parent\n style: asStyleString(['position:relative', 'width:100%', 'height:100%']),\n 'data-rrweb-id': wrappingDivId,\n },\n id: wrappingDivId,\n childNodes: makeToggleParts(wireframe, context),\n },\n ],\n },\n context,\n }\n}\n\nfunction makeLabelledInput(\n wireframe: wireframeCheckBox | wireframeRadio | wireframeToggle,\n theInputElement: serializedNodeWithId,\n context: ConversionContext\n): ConversionResult {\n const theLabel: serializedNodeWithId = {\n type: NodeType.Text,\n textContent: wireframe.label || '',\n id: context.idSequence.next().value,\n }\n\n const orderedChildren = wireframe.inputType === 'toggle' ? [theLabel, theInputElement] : [theInputElement, theLabel]\n\n const labelId = context.idSequence.next().value\n return {\n result: {\n type: NodeType.Element,\n tagName: 'label',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': labelId,\n },\n id: labelId,\n childNodes: orderedChildren,\n },\n context,\n }\n}\n\nfunction makeInputElement(\n wireframe: wireframeInputComponent,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n if (!wireframe.inputType) {\n return null\n }\n\n if (wireframe.inputType === 'button') {\n return makeButtonElement(wireframe, children, context)\n }\n\n if (wireframe.inputType === 'select') {\n return makeSelectElement(wireframe, children, context)\n }\n\n if (wireframe.inputType === 'progress') {\n return makeProgressElement(wireframe, children, context)\n }\n\n const theInputElement: ConversionResult | null =\n wireframe.inputType === 'toggle'\n ? makeToggleElement(wireframe, context)\n : {\n result: {\n type: NodeType.Element,\n tagName: 'input',\n attributes: inputAttributes(wireframe),\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n\n if (!theInputElement) {\n return null\n }\n\n if ('label' in wireframe) {\n return makeLabelledInput(wireframe, theInputElement.result, theInputElement.context)\n }\n // when labelled no styles are needed, when un-labelled as here - we add the styling in.\n ;(theInputElement.result as elementNode).attributes.style = makeStylesString(wireframe)\n return theInputElement\n}\n\nfunction makeRectangleElement(\n wireframe: wireframeRectangle,\n children: serializedNodeWithId[],\n context: ConversionContext\n): ConversionResult | null {\n return {\n result: {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n style: makeStylesString(wireframe),\n 'data-rrweb-id': wireframe.id,\n },\n id: wireframe.id,\n childNodes: children,\n },\n context,\n }\n}\n\nfunction chooseConverter(\n wireframe: T\n): (\n wireframe: T,\n children: serializedNodeWithId[],\n context: ConversionContext\n) => ConversionResult | null {\n // in theory type is always present\n // but since this is coming over the wire we can't really be sure,\n // and so we default to div\n const converterType: MobileNodeType = wireframe.type || 'div'\n const converterMapping: Record<\n MobileNodeType,\n (wireframe: T, children: serializedNodeWithId[]) => ConversionResult | null\n > = {\n // KLUDGE: TS can't tell that the wireframe type of each function is safe based on the converter type\n text: makeTextElement as any,\n image: makeImageElement as any,\n rectangle: makeRectangleElement as any,\n div: makeDivElement as any,\n input: makeInputElement as any,\n radio_group: makeRadioGroupElement as any,\n web_view: makeWebViewElement as any,\n placeholder: makePlaceholderElement as any,\n status_bar: makeStatusBar as any,\n navigation_bar: makeNavigationBar as any,\n screenshot: makeImageElement as any,\n }\n return converterMapping[converterType]\n}\n\nfunction convertWireframe(\n wireframe: wireframe,\n context: ConversionContext\n): ConversionResult | null {\n const children = convertWireframesFor(wireframe.childWireframes, context)\n const converted = chooseConverter(wireframe)?.(wireframe, children.result, children.context)\n return converted || null\n}\n\nfunction convertWireframesFor(\n wireframes: wireframe[] | undefined,\n context: ConversionContext\n): ConversionResult {\n if (!wireframes) {\n return { result: [], context }\n }\n\n const result: serializedNodeWithId[] = []\n for (const wireframe of wireframes) {\n const converted = convertWireframe(wireframe, context)\n if (converted) {\n result.push(converted.result)\n context = converted.context\n }\n }\n return { result, context }\n}\n\nfunction isMobileIncrementalSnapshotEvent(x: unknown): x is MobileIncrementalSnapshotEvent {\n const isIncrementalSnapshot = isObject(x) && 'type' in x && x.type === EventType.IncrementalSnapshot\n if (!isIncrementalSnapshot) {\n return false\n }\n const hasData = isObject(x) && 'data' in x\n const data = hasData ? x.data : null\n\n const hasMutationSource = isObject(data) && 'source' in data && data.source === IncrementalSource.Mutation\n\n const adds = isObject(data) && 'adds' in data && Array.isArray(data.adds) ? data.adds : null\n const updates = isObject(data) && 'updates' in data && Array.isArray(data.updates) ? data.updates : null\n\n const hasUpdatedWireframe = !!updates && updates.length > 0 && isObject(updates[0]) && 'wireframe' in updates[0]\n const hasAddedWireframe = !!adds && adds.length > 0 && isObject(adds[0]) && 'wireframe' in adds[0]\n\n return hasMutationSource && (hasAddedWireframe || hasUpdatedWireframe)\n}\n\nfunction chooseParentId(nodeType: MobileNodeType, providedParentId: number): number {\n return nodeType === 'screenshot' ? BODY_ID : providedParentId\n}\n\nfunction makeIncrementalAdd(add: MobileNodeMutation, context: ConversionContext): addedNodeMutation[] | null {\n const converted = convertWireframe(add.wireframe, context)\n\n if (!converted) {\n return null\n }\n\n const addition: addedNodeMutation = {\n parentId: chooseParentId(add.wireframe.type, add.parentId),\n nextId: null,\n node: converted.result,\n }\n const adds: addedNodeMutation[] = []\n if (addition) {\n const flattened = flattenMutationAdds(addition)\n flattened.forEach((x) => adds.push(x))\n return adds\n }\n return null\n}\n\n/**\n * When processing an update we remove the entire item, and then add it back in.\n */\nfunction makeIncrementalRemoveForUpdate(update: MobileNodeMutation): removedNodeMutation {\n return {\n parentId: chooseParentId(update.wireframe.type, update.parentId),\n id: update.wireframe.id,\n }\n}\n\nfunction isNode(x: unknown): x is serializedNodeWithId {\n // KLUDGE: really we should check that x.type is valid, but we're safe enough already\n return isObject(x) && 'type' in x && 'id' in x\n}\n\nfunction isNodeWithChildren(x: unknown): x is elementNode | documentNode {\n return isNode(x) && 'childNodes' in x && Array.isArray(x.childNodes)\n}\n\n/**\n * when creating incremental adds we have to flatten the node tree structure\n * there's no point, then keeping those child nodes in place\n */\nfunction cloneWithoutChildren(converted: addedNodeMutation): addedNodeMutation {\n const cloned = { ...converted }\n const clonedNode: serializedNodeWithId = { ...converted.node }\n if (isNodeWithChildren(clonedNode)) {\n clonedNode.childNodes = []\n }\n cloned.node = clonedNode\n return cloned\n}\n\nfunction flattenMutationAdds(converted: addedNodeMutation): addedNodeMutation[] {\n const flattened: addedNodeMutation[] = []\n\n flattened.push(cloneWithoutChildren(converted))\n\n const node: unknown = converted.node\n const newParentId = converted.node.id\n if (isNodeWithChildren(node)) {\n node.childNodes.forEach((child) => {\n flattened.push(\n cloneWithoutChildren({\n parentId: newParentId,\n nextId: null,\n node: child,\n })\n )\n if (isNodeWithChildren(child)) {\n flattened.push(...flattenMutationAdds({ parentId: newParentId, nextId: null, node: child }))\n }\n })\n }\n return flattened\n}\n\n/**\n * each update wireframe carries the entire tree because we don't want to diff on the client\n * that means that we might create multiple mutations for the same node\n * we only want to add it once, so we dedupe the mutations\n * the app guarantees that for a given ID that is present more than once in a single snapshot\n * every instance of that ID is identical\n * it might change in the next snapshot but for a single incremental snapshot there is one\n * and only one version of any given ID\n */\nfunction dedupeMutations(mutations: T[]): T[] {\n // KLUDGE: it's slightly yucky to stringify everything but since synthetic nodes\n // introduce a new id, we can't just compare the id\n const seen = new Set()\n\n // in case later mutations are the ones we want to keep, we reverse the array\n // this does help with the deduping, so, it's likely that the view for a single ID\n // is not consistent over a snapshot, but it's cheap to reverse so :YOLO:\n return mutations\n .reverse()\n .filter((mutation: addedNodeMutation | removedNodeMutation) => {\n let toCompare: string\n if (isRemovedNodeMutation(mutation)) {\n toCompare = JSON.stringify(mutation)\n } else {\n // if this is a synthetic addition, then we need to ignore the id,\n // since duplicates won't have duplicate ids\n toCompare = JSON.stringify({\n ...mutation.node,\n id: 0,\n })\n }\n\n if (seen.has(toCompare)) {\n return false\n }\n seen.add(toCompare)\n return true\n })\n .reverse()\n}\n\n/**\n * We want to ensure that any events don't use id = 0.\n * They must always represent a valid ID from the dom, so we swap in the body id when the id = 0.\n *\n * For \"removes\", we don't need to do anything, the id of the element to be removed remains valid. We won't try and remove other elements that we added during transformation in order to show that element.\n *\n * \"adds\" are converted from wireframes to nodes and converted to `incrementalSnapshotEvent.adds`\n *\n * \"updates\" are converted to a remove and an add.\n *\n */\nexport const makeIncrementalEvent = (\n mobileEvent: (MobileIncrementalSnapshotEvent | incrementalSnapshotEvent) & {\n timestamp: number\n delay?: number\n }\n): incrementalSnapshotEvent & {\n timestamp: number\n delay?: number\n} => {\n const converted = mobileEvent as unknown as incrementalSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n if ('id' in converted.data && converted.data.id === 0) {\n converted.data.id = BODY_ID\n }\n\n if (isMobileIncrementalSnapshotEvent(mobileEvent)) {\n const adds: addedNodeMutation[] = []\n const removes: removedNodeMutation[] = mobileEvent.data.removes || []\n if ('adds' in mobileEvent.data && Array.isArray(mobileEvent.data.adds)) {\n const addsContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n\n mobileEvent.data.adds.forEach((add) => {\n makeIncrementalAdd(add, addsContext)?.forEach((x) => adds.push(x))\n })\n }\n if ('updates' in mobileEvent.data && Array.isArray(mobileEvent.data.updates)) {\n const updatesContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n const updateAdditions: addedNodeMutation[] = []\n mobileEvent.data.updates.forEach((update) => {\n const removal = makeIncrementalRemoveForUpdate(update)\n if (removal) {\n removes.push(removal)\n }\n makeIncrementalAdd(update, updatesContext)?.forEach((x) => updateAdditions.push(x))\n })\n dedupeMutations(updateAdditions).forEach((x) => adds.push(x))\n }\n\n converted.data = {\n source: IncrementalSource.Mutation,\n attributes: [],\n texts: [],\n adds: dedupeMutations(adds),\n // TODO: this assumes that removes are processed before adds 🤞\n removes: dedupeMutations(removes),\n }\n }\n\n return converted\n}\n\nfunction makeKeyboardParent(): serializedNodeWithId {\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-render-reason': 'a fixed placeholder to contain the keyboard in the correct stacking position',\n 'data-rrweb-id': KEYBOARD_PARENT_ID,\n },\n id: KEYBOARD_PARENT_ID,\n childNodes: [],\n }\n}\n\nfunction makeStatusBarNode(\n statusBar: wireframeStatusBar | undefined,\n context: ConversionContext\n): serializedNodeWithId {\n const childNodes = statusBar ? convertWireframesFor([statusBar], context).result : []\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-rrweb-id': STATUS_BAR_PARENT_ID,\n },\n id: STATUS_BAR_PARENT_ID,\n childNodes,\n }\n}\n\nfunction makeNavBarNode(\n navigationBar: wireframeNavigationBar | undefined,\n context: ConversionContext\n): serializedNodeWithId {\n const childNodes = navigationBar ? convertWireframesFor([navigationBar], context).result : []\n return {\n type: NodeType.Element,\n tagName: 'div',\n attributes: {\n 'data-rrweb-id': NAVIGATION_BAR_PARENT_ID,\n },\n id: NAVIGATION_BAR_PARENT_ID,\n childNodes,\n }\n}\n\nfunction stripBarsFromWireframe(wireframe: wireframe): {\n wireframe: wireframe | undefined\n statusBar: wireframeStatusBar | undefined\n navBar: wireframeNavigationBar | undefined\n} {\n if (wireframe.type === 'status_bar') {\n return { wireframe: undefined, statusBar: wireframe, navBar: undefined }\n } else if (wireframe.type === 'navigation_bar') {\n return { wireframe: undefined, statusBar: undefined, navBar: wireframe }\n }\n let statusBar: wireframeStatusBar | undefined\n let navBar: wireframeNavigationBar | undefined\n const wireframeToReturn: wireframe | undefined = { ...wireframe }\n wireframeToReturn.childWireframes = []\n for (const child of wireframe.childWireframes || []) {\n const {\n wireframe: childWireframe,\n statusBar: childStatusBar,\n navBar: childNavBar,\n } = stripBarsFromWireframe(child)\n statusBar = statusBar || childStatusBar\n navBar = navBar || childNavBar\n if (childWireframe) {\n wireframeToReturn.childWireframes.push(childWireframe)\n }\n }\n return { wireframe: wireframeToReturn, statusBar, navBar }\n}\n\n/**\n * We want to be able to place the status bar and navigation bar in the correct stacking order.\n * So, we lift them out of the tree, and return them separately.\n */\nexport function stripBarsFromWireframes(wireframes: wireframe[]): {\n statusBar: wireframeStatusBar | undefined\n navigationBar: wireframeNavigationBar | undefined\n appNodes: wireframe[]\n} {\n let statusBar: wireframeStatusBar | undefined\n let navigationBar: wireframeNavigationBar | undefined\n const copiedNodes: wireframe[] = []\n\n wireframes.forEach((w) => {\n const matches = stripBarsFromWireframe(w)\n if (matches.statusBar) {\n statusBar = matches.statusBar\n }\n if (matches.navBar) {\n navigationBar = matches.navBar\n }\n if (matches.wireframe) {\n copiedNodes.push(matches.wireframe)\n }\n })\n return { statusBar, navigationBar, appNodes: copiedNodes }\n}\n\nexport const makeFullEvent = (\n mobileEvent: MobileFullSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n): fullSnapshotEvent & {\n timestamp: number\n delay?: number\n} => {\n // we can restart the id sequence on each full snapshot\n globalIdSequence = ids()\n\n if (!('wireframes' in mobileEvent.data)) {\n return mobileEvent as unknown as fullSnapshotEvent & {\n timestamp: number\n delay?: number\n }\n }\n\n const conversionContext = {\n timestamp: mobileEvent.timestamp,\n idSequence: globalIdSequence,\n }\n\n const { statusBar, navigationBar, appNodes } = stripBarsFromWireframes(mobileEvent.data.wireframes)\n\n const nodeGroups = {\n appNodes: convertWireframesFor(appNodes, conversionContext).result || [],\n statusBarNode: makeStatusBarNode(statusBar, conversionContext),\n navBarNode: makeNavBarNode(navigationBar, conversionContext),\n }\n\n return {\n type: EventType.FullSnapshot,\n timestamp: mobileEvent.timestamp,\n data: {\n node: {\n type: NodeType.Document,\n childNodes: [\n {\n type: NodeType.DocumentType,\n name: 'html',\n publicId: '',\n systemId: '',\n id: HTML_DOC_TYPE_ID,\n },\n {\n type: NodeType.Element,\n tagName: 'html',\n attributes: { style: makeHTMLStyles(), 'data-rrweb-id': HTML_ELEMENT_ID },\n id: HTML_ELEMENT_ID,\n childNodes: [\n {\n type: NodeType.Element,\n tagName: 'head',\n attributes: { 'data-rrweb-id': HEAD_ID },\n id: HEAD_ID,\n childNodes: [makeCSSReset(conversionContext)],\n },\n {\n type: NodeType.Element,\n tagName: 'body',\n attributes: { style: makeBodyStyles(), 'data-rrweb-id': BODY_ID },\n id: BODY_ID,\n childNodes: [\n // in the order they should stack if they ever clash\n // lower is higher in the stacking context\n ...nodeGroups.appNodes,\n makeKeyboardParent(),\n nodeGroups.navBarNode,\n nodeGroups.statusBarNode,\n ],\n },\n ],\n },\n ],\n id: DOCUMENT_ID,\n },\n initialOffset: {\n top: 0,\n left: 0,\n },\n },\n }\n}\n\nfunction makeCSSReset(context: ConversionContext): serializedNodeWithId {\n // we need to normalize CSS so browsers don't do unexpected things\n return {\n type: NodeType.Element,\n tagName: 'style',\n attributes: {\n type: 'text/css',\n },\n id: context.idSequence.next().value,\n childNodes: [\n {\n type: NodeType.Text,\n textContent: `\n body {\n margin: unset;\n }\n input, button, select, textarea {\n font: inherit;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n padding-block: 0 !important;\n }\n .input:focus {\n outline: none;\n }\n img {\n border-style: none;\n }\n `,\n id: context.idSequence.next().value,\n },\n ],\n }\n}\n","import posthogEE from '@posthog/ee/exports'\nimport { customEvent, EventType, eventWithTime, fullSnapshotEvent, IncrementalSource } from '@rrweb/types'\nimport { captureException } from '@sentry/react'\nimport { gunzipSync, strFromU8, strToU8 } from 'fflate'\nimport {\n actions,\n afterMount,\n beforeUnmount,\n connect,\n defaults,\n kea,\n key,\n listeners,\n path,\n props,\n reducers,\n selectors,\n} from 'kea'\nimport { loaders } from 'kea-loaders'\nimport { subscriptions } from 'kea-subscriptions'\nimport api from 'lib/api'\nimport { FEATURE_FLAGS } from 'lib/constants'\nimport { Dayjs, dayjs } from 'lib/dayjs'\nimport { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic'\nimport { isObject } from 'lib/utils'\nimport { chainToElements } from 'lib/utils/elements-chain'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport posthog from 'posthog-js'\nimport { compressedEventWithTime } from 'posthog-js/lib/src/extensions/replay/sessionrecording'\nimport { RecordingComment } from 'scenes/session-recordings/player/inspector/playerInspectorLogic'\nimport { teamLogic } from 'scenes/teamLogic'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport {\n AnyPropertyFilter,\n EncodedRecordingSnapshot,\n PersonType,\n PropertyFilterType,\n PropertyOperator,\n RecordingEventsFilters,\n RecordingEventType,\n RecordingReportLoadTimes,\n RecordingSegment,\n RecordingSnapshot,\n SessionPlayerData,\n SessionRecordingId,\n SessionRecordingSnapshotParams,\n SessionRecordingSnapshotSource,\n SessionRecordingSnapshotSourceResponse,\n SessionRecordingType,\n SessionRecordingUsageType,\n SnapshotSourceType,\n} from '~/types'\n\nimport { PostHogEE } from '../../../../@posthog/ee/types'\nimport { ExportedSessionRecordingFileV2 } from '../file-playback/types'\nimport type { sessionRecordingDataLogicType } from './sessionRecordingDataLogicType'\nimport { createSegments, mapSnapshotsToWindowId } from './utils/segmenter'\n\nconst IS_TEST_MODE = process.env.NODE_ENV === 'test'\nconst BUFFER_MS = 60000 // +- before and after start and end of a recording to query for.\nconst DEFAULT_REALTIME_POLLING_MILLIS = 3000\n\nlet postHogEEModule: PostHogEE\n\nfunction isRecordingSnapshot(x: unknown): x is RecordingSnapshot {\n return typeof x === 'object' && x !== null && 'type' in x && 'timestamp' in x\n}\n\n/*\n there was a bug in mobile SDK that didn't consistently send a meta event with a full snapshot.\n rrweb player hides itself until it has seen the meta event 🤷\n but we can patch a meta event into the recording data to make it work\n*/\nfunction patchMetaEventIntoMobileData(parsedLines: RecordingSnapshot[]): RecordingSnapshot[] {\n let fullSnapshotIndex: number = -1\n let metaIndex: number = -1\n try {\n fullSnapshotIndex = parsedLines.findIndex((l) => l.type === EventType.FullSnapshot)\n metaIndex = parsedLines.findIndex((l) => l.type === EventType.Meta)\n\n // then we need to patch the meta event into the snapshot data\n if (fullSnapshotIndex > -1 && metaIndex === -1) {\n const fullSnapshot = parsedLines[fullSnapshotIndex] as RecordingSnapshot & fullSnapshotEvent & eventWithTime\n // a full snapshot (particularly from the mobile transformer) has a relatively fixed structure,\n // but the types exposed by rrweb don't quite cover what we need , so...\n const mainNode = fullSnapshot.data.node as any\n const targetNode = mainNode.childNodes[1].childNodes[1].childNodes[0]\n const { width, height } = targetNode.attributes\n const metaEvent: RecordingSnapshot = {\n windowId: fullSnapshot.windowId,\n type: EventType.Meta,\n timestamp: fullSnapshot.timestamp,\n data: {\n href: getHrefFromSnapshot(fullSnapshot) || '',\n width,\n height,\n },\n }\n parsedLines.splice(fullSnapshotIndex, 0, metaEvent)\n }\n } catch (e) {\n captureException(e, {\n tags: { feature: 'session-recording-missing-meta-patching' },\n extra: { fullSnapshotIndex, metaIndex },\n })\n }\n\n return parsedLines\n}\n\nfunction hasAnyWireframes(snapshotData: Record[]): boolean {\n return snapshotData.some((d) => {\n return isObject(d.data) && 'wireframes' in d.data\n })\n}\n\nfunction isCompressedEvent(ev: unknown): ev is compressedEventWithTime {\n return typeof ev === 'object' && ev !== null && 'cv' in ev\n}\n\nfunction unzip(compressedStr: string): any {\n return JSON.parse(strFromU8(gunzipSync(strToU8(compressedStr, true))))\n}\n\n/**\n *\n * takes an event that might be from web, might be from mobile,\n * and might be partially compressed,\n * and decompresses it when possible\n *\n * you can't return a union of `KnownType | unknown`\n * so even though this returns `eventWithTime | unknown`\n * it has to be typed as only unknown\n */\nfunction decompressEvent(ev: unknown): unknown {\n try {\n if (isCompressedEvent(ev)) {\n if (ev.cv === '2024-10') {\n if (ev.type === EventType.FullSnapshot) {\n return {\n ...ev,\n data: unzip(ev.data),\n }\n } else if (ev.type === EventType.IncrementalSnapshot) {\n if (ev.data.source === IncrementalSource.StyleSheetRule) {\n return {\n ...ev,\n data: {\n ...ev.data,\n source: IncrementalSource.StyleSheetRule,\n adds: unzip(ev.data.adds),\n removes: unzip(ev.data.removes),\n },\n }\n } else if (ev.data.source === IncrementalSource.Mutation) {\n return {\n ...ev,\n data: {\n ...ev.data,\n source: IncrementalSource.Mutation,\n adds: unzip(ev.data.adds),\n removes: unzip(ev.data.removes),\n texts: unzip(ev.data.texts),\n attributes: unzip(ev.data.attributes),\n },\n }\n }\n }\n } else {\n posthog.captureException(new Error('Unknown compressed event version'), {\n feature: 'session-recording-compressed-event-decompression',\n compressedEvent: ev,\n compressionVersion: ev.cv,\n })\n // probably unplayable but we don't know how to decompress it\n return ev\n }\n }\n return ev\n } catch (e) {\n posthog.captureException((e as Error) || new Error('Could not decompress event'), {\n feature: 'session-recording-compressed-event-decompression',\n compressedEvent: ev,\n })\n return ev\n }\n}\n\n/**\n * We can receive data in one of multiple formats, so we treat it as unknown\n * And if we can't process it force it into eventWithTime\n *\n * If it can't be case as eventWithTime by this point then it's probably not a valid event anyway\n */\nfunction coerceToEventWithTime(d: unknown, withMobileTransformer: boolean): eventWithTime {\n // we decompress first so that we could support partial compression on mobile in future\n const currentEvent = decompressEvent(d)\n return withMobileTransformer\n ? postHogEEModule?.mobileReplay?.transformEventToWeb(currentEvent) || (currentEvent as eventWithTime)\n : (currentEvent as eventWithTime)\n}\n\nexport const parseEncodedSnapshots = async (\n items: (RecordingSnapshot | EncodedRecordingSnapshot | string)[],\n sessionId: string,\n // this is only kept so that we can export the untransformed data for debugging\n withMobileTransformer: boolean = true\n): Promise => {\n if (!postHogEEModule) {\n postHogEEModule = await posthogEE()\n }\n\n const lineCount = items.length\n const unparseableLines: string[] = []\n let isMobileSnapshots = false\n\n const parsedLines: RecordingSnapshot[] = items.flatMap((l) => {\n if (!l) {\n // blob files have an empty line at the end\n return []\n }\n try {\n let snapshotLine: { windowId: string } | EncodedRecordingSnapshot\n if (typeof l === 'string') {\n // is loaded from blob or realtime storage\n snapshotLine = JSON.parse(l) as EncodedRecordingSnapshot\n } else {\n // is loaded from file export\n snapshotLine = l\n }\n let snapshotData: ({ windowId: string } | EncodedRecordingSnapshot)[]\n if (isRecordingSnapshot(snapshotLine)) {\n // is loaded from file export\n snapshotData = [snapshotLine]\n } else {\n // is loaded from blob or realtime storage\n snapshotData = snapshotLine['data']\n }\n\n if (!isMobileSnapshots) {\n isMobileSnapshots = hasAnyWireframes(snapshotData)\n }\n\n return snapshotData.map((d: unknown) => {\n const snap = coerceToEventWithTime(d, withMobileTransformer)\n\n return {\n // this handles parsing data that was loaded from blob storage \"window_id\"\n // and data that was exported from the front-end \"windowId\"\n // we have more than one format of data that we store/pass around\n // but only one that we play back\n windowId: snapshotLine['window_id'] || snapshotLine['windowId'],\n ...snap,\n }\n })\n } catch (e) {\n if (typeof l === 'string') {\n unparseableLines.push(l)\n }\n return []\n }\n })\n\n if (unparseableLines.length) {\n const extra = {\n playbackSessionId: sessionId,\n totalLineCount: lineCount,\n unparseableLinesCount: unparseableLines.length,\n exampleLines: unparseableLines.slice(0, 3),\n }\n posthog.capture('session recording had unparseable lines', {\n ...extra,\n feature: 'session-recording-snapshot-processing',\n })\n }\n\n return isMobileSnapshots ? patchMetaEventIntoMobileData(parsedLines) : parsedLines\n}\n\nconst getHrefFromSnapshot = (snapshot: unknown): string | undefined => {\n return isObject(snapshot) && 'data' in snapshot\n ? (snapshot.data as any)?.href || (snapshot.data as any)?.payload?.href\n : undefined\n}\n\n/*\n cyrb53 (c) 2018 bryc (github.com/bryc)\n License: Public domain. Attribution appreciated.\n A fast and simple 53-bit string hash function with decent collision resistance.\n Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity.\n*/\nconst cyrb53 = function (str: string, seed = 0): number {\n let h1 = 0xdeadbeef ^ seed,\n h2 = 0x41c6ce57 ^ seed\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i)\n h1 = Math.imul(h1 ^ ch, 2654435761)\n h2 = Math.imul(h2 ^ ch, 1597334677)\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507)\n h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909)\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507)\n h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909)\n return 4294967296 * (2097151 & h2) + (h1 >>> 0)\n}\n\nexport const deduplicateSnapshots = (snapshots: RecordingSnapshot[] | null): RecordingSnapshot[] => {\n const seenHashes: Set = new Set()\n\n return (snapshots ?? [])\n .filter((snapshot) => {\n // For a multitude of reasons, there can be duplicate snapshots in the same recording.\n // we have to stringify the snapshot to compare it to other snapshots.\n // so we can filter by storing them all in a set\n\n // we can see duplicates that only differ by delay - these still count as duplicates\n // even though the delay would hide that\n const { delay: _delay, ...delayFreeSnapshot } = snapshot\n // we check each item multiple times as new snapshots come in\n // so store the computer value on the object to save recalculating it so much\n const key = (snapshot as any).seen || cyrb53(JSON.stringify(delayFreeSnapshot))\n ;(snapshot as any).seen = key\n\n if (seenHashes.has(key)) {\n return false\n }\n seenHashes.add(key)\n return true\n })\n .sort((a, b) => a.timestamp - b.timestamp)\n}\n\nconst generateRecordingReportDurations = (cache: Record): RecordingReportLoadTimes => {\n return {\n metadata: cache.metadataLoadDuration || Math.round(performance.now() - cache.metaStartTime),\n snapshots: cache.snapshotsLoadDuration || Math.round(performance.now() - cache.snapshotsStartTime),\n events: cache.eventsLoadDuration || Math.round(performance.now() - cache.eventsStartTime),\n firstPaint: cache.firstPaintDuration,\n }\n}\n\nconst resetTimingsCache = (cache: Record): void => {\n cache.metaStartTime = null\n cache.metadataLoadDuration = null\n cache.snapshotsStartTime = null\n cache.snapshotsLoadDuration = null\n cache.eventsStartTime = null\n cache.eventsLoadDuration = null\n cache.firstPaintDuration = null\n}\n\nexport interface SessionRecordingDataLogicProps {\n sessionRecordingId: SessionRecordingId\n realTimePollingIntervalMilliseconds?: number\n}\n\nfunction makeEventsQuery(\n person: PersonType | null,\n distinctId: string | null,\n start: Dayjs,\n end: Dayjs,\n properties: AnyPropertyFilter[]\n): Promise {\n return api.query({\n kind: NodeKind.EventsQuery,\n // NOTE: Be careful adding fields here. We want to keep the payload as small as possible to load all events quickly\n select: [\n 'uuid',\n 'event',\n 'timestamp',\n 'elements_chain',\n 'properties.$window_id',\n 'properties.$current_url',\n 'properties.$event_type',\n ],\n orderBy: ['timestamp ASC'],\n limit: 1000000,\n personId: person ? String(person.id) : undefined,\n after: start.subtract(BUFFER_MS, 'ms').format(),\n before: end.add(BUFFER_MS, 'ms').format(),\n properties: properties,\n where: distinctId ? [`distinct_id = ('${distinctId}')`] : undefined,\n })\n}\n\nasync function processEncodedResponse(\n encodedResponse: (EncodedRecordingSnapshot | string)[],\n props: SessionRecordingDataLogicProps,\n featureFlags: FeatureFlagsSet\n): Promise<{ transformed: RecordingSnapshot[]; untransformed: RecordingSnapshot[] | null }> {\n let untransformed: RecordingSnapshot[] | null = null\n\n const transformed = await parseEncodedSnapshots(encodedResponse, props.sessionRecordingId)\n\n if (featureFlags[FEATURE_FLAGS.SESSION_REPLAY_EXPORT_MOBILE_DATA]) {\n untransformed = await parseEncodedSnapshots(\n encodedResponse,\n props.sessionRecordingId,\n false // don't transform mobile data\n )\n }\n\n return { transformed, untransformed }\n}\n\nconst getSourceKey = (source: SessionRecordingSnapshotSource): string => {\n // realtime sources vary so blob_key is not always present and is either null or undefined...\n // we only care about key when not realtime\n // and we'll always have a key when not realtime\n return `${source.source}-${source.blob_key || source.source}`\n}\n\nexport const sessionRecordingDataLogic = kea([\n path((key) => ['scenes', 'session-recordings', 'sessionRecordingDataLogic', key]),\n props({} as SessionRecordingDataLogicProps),\n key(({ sessionRecordingId }) => sessionRecordingId || 'no-session-recording-id'),\n connect({\n logic: [eventUsageLogic],\n values: [featureFlagLogic, ['featureFlags'], teamLogic, ['currentTeam']],\n }),\n defaults({\n sessionPlayerMetaData: null as SessionRecordingType | null,\n }),\n actions({\n setFilters: (filters: Partial) => ({ filters }),\n loadRecordingMeta: true,\n loadRecordingComments: true,\n maybeLoadRecordingMeta: true,\n loadSnapshots: true,\n loadSnapshotSources: true,\n loadNextSnapshotSource: true,\n loadSnapshotsForSource: (source: Pick) => ({ source }),\n loadEvents: true,\n loadFullEventData: (event: RecordingEventType | RecordingEventType[]) => ({ event }),\n markViewed: (delay?: number) => ({ delay }),\n reportUsageIfFullyLoaded: true,\n persistRecording: true,\n maybePersistRecording: true,\n pollRealtimeSnapshots: true,\n stopRealtimePolling: true,\n setTrackedWindow: (windowId: string | null) => ({ windowId }),\n setWasMarkedViewed: (wasMarkedViewed: boolean) => ({ wasMarkedViewed }),\n }),\n reducers(() => ({\n trackedWindow: [\n null as string | null,\n {\n setTrackedWindow: (_, { windowId }) => windowId,\n },\n ],\n filters: [\n {} as Partial,\n {\n setFilters: (state, { filters }) => ({ ...state, ...filters }),\n },\n ],\n isRealtimePolling: [\n false as boolean,\n {\n pollRealtimeSnapshots: () => true,\n stopRealtimePolling: () => false,\n },\n ],\n isNotFound: [\n false as boolean,\n {\n loadRecordingMeta: () => false,\n loadRecordingMetaSuccess: () => false,\n loadRecordingMetaFailure: () => true,\n },\n ],\n snapshotsBySource: [\n null as Record | null,\n {\n loadSnapshotsForSourceSuccess: (state, { snapshotsForSource }) => {\n const sourceKey = getSourceKey(snapshotsForSource.source)\n\n return {\n ...state,\n [sourceKey]: snapshotsForSource,\n }\n },\n },\n ],\n wasMarkedViewed: [\n false as boolean,\n {\n setWasMarkedViewed: (_, { wasMarkedViewed }) => wasMarkedViewed,\n },\n ],\n })),\n loaders(({ values, props, cache }) => ({\n sessionComments: {\n loadRecordingComments: async (_, breakpoint) => {\n const empty: RecordingComment[] = []\n if (!props.sessionRecordingId) {\n return empty\n }\n\n const response = await api.notebooks.recordingComments(props.sessionRecordingId)\n breakpoint()\n\n return response.results || empty\n },\n },\n sessionPlayerMetaData: {\n loadRecordingMeta: async (_, breakpoint) => {\n if (!props.sessionRecordingId) {\n return null\n }\n\n cache.metaStartTime = performance.now()\n\n const response = await api.recordings.get(props.sessionRecordingId)\n breakpoint()\n\n return response\n },\n\n persistRecording: async (_, breakpoint) => {\n if (!values.sessionPlayerMetaData) {\n return null\n }\n await breakpoint(100)\n await api.recordings.persist(props.sessionRecordingId)\n\n return {\n ...values.sessionPlayerMetaData,\n storage: 'object_storage_lts',\n }\n },\n },\n snapshotSources: [\n null as SessionRecordingSnapshotSource[] | null,\n {\n loadSnapshotSources: async () => {\n const response = await api.recordings.listSnapshotSources(props.sessionRecordingId)\n return response.sources ?? []\n },\n },\n ],\n snapshotsForSource: [\n null as SessionRecordingSnapshotSourceResponse | null,\n {\n loadSnapshotsForSource: async ({ source }, breakpoint) => {\n let params: SessionRecordingSnapshotParams\n\n if (source.source === SnapshotSourceType.blob) {\n if (!source.blob_key) {\n throw new Error('Missing key')\n }\n params = { blob_key: source.blob_key, source: 'blob' }\n } else if (source.source === SnapshotSourceType.realtime) {\n params = { source: 'realtime', version: '2024-04-30' }\n } else {\n throw new Error(`Unsupported source: ${source.source}`)\n }\n\n const snapshotLoadingStartTime = performance.now()\n\n if (!cache.snapshotsStartTime) {\n cache.snapshotsStartTime = snapshotLoadingStartTime\n }\n\n await breakpoint(1)\n\n const response = await api.recordings.getSnapshots(props.sessionRecordingId, params).catch((e) => {\n if (source.source === 'realtime' && e.status === 404) {\n // Realtime source is not always available so a 404 is expected\n return []\n }\n throw e\n })\n\n const { transformed, untransformed } = await processEncodedResponse(\n response,\n props,\n values.featureFlags\n )\n\n return { snapshots: transformed, untransformed_snapshots: untransformed ?? undefined, source }\n },\n },\n ],\n sessionEventsData: [\n null as null | RecordingEventType[],\n {\n loadEvents: async () => {\n if (!cache.eventsStartTime) {\n cache.eventsStartTime = performance.now()\n }\n\n const { start, end, person } = values.sessionPlayerData\n\n if (!person || !start || !end) {\n return null\n }\n\n const [sessionEvents, relatedEvents]: any[] = await Promise.all([\n // make one query for all events that are part of the session\n makeEventsQuery(null, null, start, end, [\n {\n key: '$session_id',\n value: [props.sessionRecordingId],\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n ]),\n // make a second for all events from that person,\n // not marked as part of the session\n // but in the same time range\n // these are probably e.g. backend events for the session\n // but with no session id\n // since posthog-js must always add session id we can also\n // take advantage of lib being materialized and further filter\n makeEventsQuery(null, values.sessionPlayerMetaData?.distinct_id || null, start, end, [\n {\n key: '$session_id',\n value: '',\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n {\n key: '$lib',\n value: ['web'],\n operator: PropertyOperator.IsNot,\n type: PropertyFilterType.Event,\n },\n ]),\n ])\n\n return [...sessionEvents.results, ...relatedEvents.results].map(\n (event: any): RecordingEventType => {\n const currentUrl = event[5]\n // We use the pathname to simplify the UI - we build it here instead of fetching it to keep data usage small\n let pathname: string | undefined\n try {\n pathname = event[5] ? new URL(event[5]).pathname : undefined\n } catch {\n pathname = undefined\n }\n\n return {\n id: event[0],\n event: event[1],\n timestamp: event[2],\n elements: chainToElements(event[3]),\n properties: {\n $window_id: event[4],\n $current_url: currentUrl,\n $event_type: event[6],\n $pathname: pathname,\n },\n playerTime: +dayjs(event[2]) - +start,\n fullyLoaded: false,\n }\n }\n )\n },\n\n loadFullEventData: async ({ event }) => {\n // box so we're always dealing with a list\n const events = Array.isArray(event) ? event : [event]\n\n let existingEvents = values.sessionEventsData?.filter((x) => events.some((e) => e.id === x.id))\n\n const allEventsAreFullyLoaded =\n existingEvents?.every((e) => e.fullyLoaded) && existingEvents.length === events.length\n if (!existingEvents || allEventsAreFullyLoaded) {\n return values.sessionEventsData\n }\n\n existingEvents = existingEvents.filter((e) => !e.fullyLoaded)\n const timestamps = existingEvents.map((ee) => dayjs(ee.timestamp).utc().valueOf())\n const eventNames = Array.from(new Set(existingEvents.map((ee) => ee.event)))\n const eventIds = existingEvents.map((ee) => ee.id)\n const earliestTimestamp = timestamps.reduce((a, b) => Math.min(a, b))\n const latestTimestamp = timestamps.reduce((a, b) => Math.max(a, b))\n try {\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties, uuid\n FROM events\n WHERE timestamp > ${(earliestTimestamp - 1000) / 1000}\n AND timestamp < ${(latestTimestamp + 1000) / 1000}\n AND event in ${eventNames}\n AND uuid in ${eventIds}`,\n }\n const response = await api.query(query)\n if (response.error) {\n throw new Error(response.error)\n }\n\n for (const event of existingEvents) {\n const result = response.results.find((x: any) => {\n return x[1] === event.id\n })\n\n if (result) {\n event.properties = JSON.parse(result[0])\n event.fullyLoaded = true\n }\n }\n } catch (e) {\n // NOTE: This is not ideal but should happen so rarely that it is tolerable.\n existingEvents.forEach((e) => (e.fullyLoaded = true))\n captureException(e, {\n tags: { feature: 'session-recording-load-full-event-data' },\n })\n }\n\n // here we map the events list because we want the result to be a new instance to trigger downstream recalculation\n return !values.sessionEventsData\n ? values.sessionEventsData\n : values.sessionEventsData.map((x) => {\n const event = existingEvents?.find((ee) => ee.id === x.id)\n return event\n ? ({\n ...x,\n properties: event.properties,\n fullyLoaded: event.fullyLoaded,\n } as RecordingEventType)\n : x\n })\n },\n },\n ],\n })),\n listeners(({ values, actions, cache, props }) => ({\n loadSnapshots: () => {\n // This kicks off the loading chain\n if (!values.snapshotSourcesLoading) {\n actions.loadSnapshotSources()\n }\n },\n maybeLoadRecordingMeta: () => {\n if (!values.sessionPlayerMetaDataLoading) {\n actions.loadRecordingMeta()\n }\n if (!values.sessionCommentsLoading) {\n actions.loadRecordingComments()\n }\n },\n loadSnapshotSources: () => {\n // We only load events once we actually start loading the recording\n actions.loadEvents()\n },\n loadRecordingMetaSuccess: () => {\n cache.metadataLoadDuration = Math.round(performance.now() - cache.metaStartTime)\n actions.reportUsageIfFullyLoaded()\n },\n loadRecordingMetaFailure: () => {\n cache.metadataLoadDuration = Math.round(performance.now() - cache.metaStartTime)\n },\n\n loadSnapshotSourcesSuccess: () => {\n // When we receive the list of sources we can kick off the loading chain\n actions.loadNextSnapshotSource()\n },\n\n loadSnapshotsForSourceSuccess: ({ snapshotsForSource }) => {\n const sources = values.snapshotSources\n const snapshots = snapshotsForSource.snapshots\n\n // Cache the last response count to detect if we're getting the same data over and over\n const newSnapshotsCount = snapshots.length\n\n if ((cache.lastSnapshotsCount ?? newSnapshotsCount) === newSnapshotsCount) {\n // if we're getting no results from realtime polling we can increment faster\n // so that we stop polling sooner\n const increment = newSnapshotsCount === 0 ? 2 : 1\n cache.lastSnapshotsUnchangedCount = (cache.lastSnapshotsUnchangedCount ?? 0) + increment\n } else {\n cache.lastSnapshotsUnchangedCount = 0\n }\n cache.lastSnapshotsCount = newSnapshotsCount\n\n if (!snapshots.length && sources?.length === 1) {\n // We got only a single source to load, loaded it successfully, but it had no snapshots.\n posthog.capture('recording_snapshots_v2_empty_response', {\n source: sources[0],\n })\n } else if (!cache.firstPaintDuration) {\n cache.firstPaintDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n }\n if (!values.wasMarkedViewed) {\n actions.markViewed()\n }\n\n actions.loadNextSnapshotSource()\n },\n\n loadNextSnapshotSource: () => {\n const nextSourceToLoad = values.snapshotSources?.find((s) => {\n const sourceKey = getSourceKey(s)\n return !values.snapshotsBySource?.[sourceKey]\n })\n\n if (nextSourceToLoad) {\n return actions.loadSnapshotsForSource(nextSourceToLoad)\n }\n\n // TODO: Move this to a one time check - only report once per recording\n cache.snapshotsLoadDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n actions.reportUsageIfFullyLoaded()\n\n // If we have a realtime source, start polling it\n const realTimeSource = values.snapshotSources?.find((s) => s.source === SnapshotSourceType.realtime)\n if (realTimeSource) {\n actions.pollRealtimeSnapshots()\n }\n },\n loadSnapshotsForSourceFailure: () => {\n cache.snapshotsLoadDuration = Math.round(performance.now() - cache.snapshotsStartTime)\n },\n pollRealtimeSnapshots: () => {\n // always make sure we've cleared up the last timeout\n clearTimeout(cache.realTimePollingTimeoutID)\n cache.realTimePollingTimeoutID = null\n\n // ten is an arbitrary limit to try to avoid sending requests to our backend unnecessarily\n // we could change this or add to it e.g. only poll if browser is visible to user\n if ((cache.lastSnapshotsUnchangedCount ?? 0) <= 10) {\n cache.realTimePollingTimeoutID = setTimeout(() => {\n actions.loadSnapshotsForSource({ source: SnapshotSourceType.realtime })\n }, props.realTimePollingIntervalMilliseconds || DEFAULT_REALTIME_POLLING_MILLIS)\n } else {\n actions.stopRealtimePolling()\n }\n },\n loadEventsSuccess: () => {\n cache.eventsLoadDuration = Math.round(performance.now() - cache.eventsStartTime)\n actions.reportUsageIfFullyLoaded()\n },\n loadEventsFailure: () => {\n cache.eventsLoadDuration = Math.round(performance.now() - cache.eventsStartTime)\n },\n reportUsageIfFullyLoaded: (_, breakpoint) => {\n breakpoint()\n if (values.fullyLoaded) {\n eventUsageLogic.actions.reportRecording(\n values.sessionPlayerData,\n generateRecordingReportDurations(cache),\n SessionRecordingUsageType.LOADED,\n values.sessionPlayerMetaData,\n 0\n )\n // Reset cache now that final usage report has been sent\n resetTimingsCache(cache)\n }\n },\n markViewed: async ({ delay }, breakpoint) => {\n const durations = generateRecordingReportDurations(cache)\n // Triggered on first paint\n breakpoint()\n if (values.wasMarkedViewed) {\n return\n }\n actions.setWasMarkedViewed(true) // this prevents us from calling the function multiple times\n\n await breakpoint(IS_TEST_MODE ? 1 : delay ?? 3000)\n await api.recordings.update(props.sessionRecordingId, {\n viewed: true,\n player_metadata: values.sessionPlayerMetaData,\n durations,\n })\n await breakpoint(IS_TEST_MODE ? 1 : 10000)\n await api.recordings.update(props.sessionRecordingId, {\n analyzed: true,\n player_metadata: values.sessionPlayerMetaData,\n durations,\n })\n },\n\n maybePersistRecording: () => {\n if (values.sessionPlayerMetaDataLoading) {\n return\n }\n\n if (values.sessionPlayerMetaData?.storage === 'object_storage') {\n actions.persistRecording()\n }\n },\n })),\n selectors(({ cache }) => ({\n webVitalsEvents: [\n (s) => [s.sessionEventsData],\n (sessionEventsData): RecordingEventType[] =>\n (sessionEventsData || []).filter((e) => e.event === '$web_vitals'),\n ],\n\n windowIdForTimestamp: [\n (s) => [s.segments],\n (segments) =>\n (timestamp: number): string | undefined => {\n return segments.find(\n (segment) => segment.startTimestamp <= timestamp && segment.endTimestamp >= timestamp\n )?.windowId\n },\n ],\n\n sessionPlayerData: [\n (s, p) => [\n s.sessionPlayerMetaData,\n s.snapshotsByWindowId,\n s.segments,\n s.bufferedToTime,\n s.start,\n s.end,\n s.durationMs,\n s.fullyLoaded,\n p.sessionRecordingId,\n ],\n (\n meta,\n snapshotsByWindowId,\n segments,\n bufferedToTime,\n start,\n end,\n durationMs,\n fullyLoaded,\n sessionRecordingId\n ): SessionPlayerData => ({\n person: meta?.person ?? null,\n start,\n end,\n durationMs,\n snapshotsByWindowId,\n segments,\n bufferedToTime,\n fullyLoaded,\n sessionRecordingId,\n }),\n ],\n\n snapshotsLoading: [\n (s) => [s.snapshotSourcesLoading, s.snapshotsForSourceLoading],\n (snapshotSourcesLoading, snapshotsForSourceLoading): boolean => {\n // if there's a realTimePollingTimeoutID, don't signal that we're loading\n // we don't want the UI to flip to \"loading\" every time we poll\n return !cache.realTimePollingTimeoutID && (snapshotSourcesLoading || snapshotsForSourceLoading)\n },\n ],\n\n snapshotsLoaded: [(s) => [s.snapshotSources], (snapshotSources): boolean => !!snapshotSources],\n\n fullyLoaded: [\n (s) => [s.snapshots, s.sessionPlayerMetaDataLoading, s.snapshotsLoading, s.sessionEventsDataLoading],\n (snapshots, sessionPlayerMetaDataLoading, snapshotsLoading, sessionEventsDataLoading): boolean => {\n // TODO: Do a proper check for all sources having been loaded\n return (\n !!snapshots.length &&\n !sessionPlayerMetaDataLoading &&\n !snapshotsLoading &&\n !sessionEventsDataLoading\n )\n },\n ],\n\n firstSnapshot: [\n (s) => [s.snapshots],\n (snapshots): RecordingSnapshot | null => {\n return snapshots[0] || null\n },\n ],\n\n lastSnapshot: [\n (s) => [s.snapshots],\n (snapshots): RecordingSnapshot | null => {\n return snapshots[snapshots.length - 1] || null\n },\n ],\n\n start: [\n (s) => [s.firstSnapshot, s.sessionPlayerMetaData],\n (firstSnapshot, meta): Dayjs | null => {\n const eventStart = meta?.start_time ? dayjs(meta.start_time) : null\n const snapshotStart = firstSnapshot ? dayjs(firstSnapshot.timestamp) : null\n\n // whichever is earliest\n if (eventStart && snapshotStart) {\n return eventStart.isBefore(snapshotStart) ? eventStart : snapshotStart\n }\n return eventStart || snapshotStart\n },\n ],\n\n end: [\n (s) => [s.lastSnapshot, s.sessionPlayerMetaData],\n (lastSnapshot, meta): Dayjs | null => {\n const eventEnd = meta?.end_time ? dayjs(meta.end_time) : null\n const snapshotEnd = lastSnapshot ? dayjs(lastSnapshot.timestamp) : null\n\n // whichever is latest\n if (eventEnd && snapshotEnd) {\n return eventEnd.isAfter(snapshotEnd) ? eventEnd : snapshotEnd\n }\n return eventEnd || snapshotEnd\n },\n ],\n\n durationMs: [\n (s) => [s.start, s.end],\n (start, end): number => {\n return !!start && !!end ? end.diff(start) : 0\n },\n ],\n\n segments: [\n (s) => [s.snapshots, s.start, s.end, s.trackedWindow],\n (snapshots, start, end, trackedWindow): RecordingSegment[] => {\n return createSegments(snapshots || [], start, end, trackedWindow)\n },\n ],\n\n urls: [\n (s) => [s.snapshots],\n (snapshots): { url: string; timestamp: number }[] => {\n return (\n snapshots\n .filter((snapshot) => getHrefFromSnapshot(snapshot))\n .map((snapshot) => {\n return {\n url: getHrefFromSnapshot(snapshot) as string,\n timestamp: snapshot.timestamp,\n }\n }) ?? []\n )\n },\n ],\n\n snapshots: [\n (s) => [s.snapshotSources, s.snapshotsBySource],\n (sources, snapshotsBySource): RecordingSnapshot[] => {\n const allSnapshots =\n sources?.flatMap((source) => {\n const sourceKey = getSourceKey(source)\n return snapshotsBySource?.[sourceKey]?.snapshots || []\n }) ?? []\n\n return deduplicateSnapshots(allSnapshots)\n },\n ],\n\n untransformedSnapshots: [\n (s) => [s.snapshotSources, s.snapshotsBySource],\n (sources, snapshotsBySource): RecordingSnapshot[] => {\n const allSnapshots =\n sources?.flatMap((source) => {\n const sourceKey = getSourceKey(source)\n return snapshotsBySource?.[sourceKey]?.untransformed_snapshots || []\n }) ?? []\n\n return deduplicateSnapshots(allSnapshots)\n },\n ],\n\n snapshotsByWindowId: [\n (s) => [s.snapshots],\n (snapshots): Record => {\n return mapSnapshotsToWindowId(snapshots || [])\n },\n ],\n\n snapshotsInvalid: [\n (s, p) => [s.snapshotsByWindowId, s.fullyLoaded, s.start, p.sessionRecordingId, s.currentTeam],\n (snapshotsByWindowId, fullyLoaded, start, sessionRecordingId, currentTeam): boolean => {\n if (!fullyLoaded || !start) {\n return false\n }\n\n const windowsHaveFullSnapshot = Object.entries(snapshotsByWindowId).reduce(\n (acc, [windowId, events]) => {\n acc[`window-id-${windowId}-has-full-snapshot`] = events.some(\n (event) => event.type === EventType.FullSnapshot\n )\n return acc\n },\n {}\n )\n const anyWindowMissingFullSnapshot = !Object.values(windowsHaveFullSnapshot).some((x) => x)\n const everyWindowMissingFullSnapshot = !Object.values(windowsHaveFullSnapshot).every((x) => x)\n\n if (everyWindowMissingFullSnapshot) {\n // video is definitely unplayable\n posthog.capture('recording_has_no_full_snapshot', {\n watchedSession: sessionRecordingId,\n teamId: currentTeam?.id,\n teamName: currentTeam?.name,\n })\n } else if (anyWindowMissingFullSnapshot) {\n posthog.capture('recording_window_missing_full_snapshot', {\n watchedSession: sessionRecordingId,\n teamID: currentTeam?.id,\n teamName: currentTeam?.name,\n })\n }\n\n return everyWindowMissingFullSnapshot\n },\n ],\n\n isRecentAndInvalid: [\n (s) => [s.start, s.snapshotsInvalid],\n (start, snapshotsInvalid) => {\n const lessThanFiveMinutesOld = dayjs().diff(start, 'minute') <= 5\n return snapshotsInvalid && lessThanFiveMinutesOld\n },\n ],\n\n bufferedToTime: [\n (s) => [s.segments],\n (segments): number | null => {\n if (!segments.length) {\n return null\n }\n\n const startTime = segments[0].startTimestamp\n const lastSegment = segments[segments.length - 1]\n\n if (lastSegment.kind === 'buffer') {\n return lastSegment.startTimestamp - startTime\n }\n\n return lastSegment.endTimestamp - startTime\n },\n ],\n\n windowIds: [\n (s) => [s.snapshotsByWindowId],\n (snapshotsByWindowId) => {\n return Object.keys(snapshotsByWindowId)\n },\n ],\n\n createExportJSON: [\n (s) => [s.sessionPlayerMetaData, s.snapshots, s.untransformedSnapshots],\n (\n sessionPlayerMetaData,\n snapshots,\n untransformedSnapshots\n ): ((exportUntransformedMobileSnapshotData: boolean) => ExportedSessionRecordingFileV2) => {\n return (exportUntransformedMobileSnapshotData: boolean) => ({\n version: '2023-04-28',\n data: {\n id: sessionPlayerMetaData?.id ?? '',\n person: sessionPlayerMetaData?.person,\n snapshots: exportUntransformedMobileSnapshotData ? untransformedSnapshots : snapshots,\n },\n })\n },\n ],\n\n customRRWebEvents: [\n (s) => [s.snapshots],\n (snapshots): customEvent[] => {\n return snapshots.filter((snapshot) => snapshot.type === EventType.Custom).map((x) => x as customEvent)\n },\n ],\n })),\n subscriptions(({ actions, values }) => ({\n webVitalsEvents: (value: RecordingEventType[]) => {\n // we preload all web vitals data, so it can be used before user interaction\n if (!values.sessionEventsDataLoading) {\n actions.loadFullEventData(value)\n }\n },\n isRecentAndInvalid: (prev: boolean, next: boolean) => {\n if (!prev && next) {\n posthog.capture('recording cannot playback yet', {\n watchedSession: values.sessionPlayerData.sessionRecordingId,\n })\n }\n },\n })),\n afterMount(({ cache }) => {\n resetTimingsCache(cache)\n }),\n beforeUnmount(({ cache }) => {\n resetTimingsCache(cache)\n }),\n])\n","import { actions, connect, kea, listeners, path, reducers } from 'kea'\nimport { loaders } from 'kea-loaders'\nimport api from 'lib/api'\nimport { dayjs } from 'lib/dayjs'\nimport { CORE_FILTER_DEFINITIONS_BY_GROUP } from 'lib/taxonomy'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\n\nimport { HogQLQuery, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport { SessionRecordingPropertiesType, SessionRecordingType } from '~/types'\n\nimport type { sessionRecordingsListPropertiesLogicType } from './sessionRecordingsListPropertiesLogicType'\n\n// This logic is used to fetch properties for a list of recordings\n// It is used in a global way as the cached values can be re-used\nexport const sessionRecordingsListPropertiesLogic = kea([\n path(() => ['scenes', 'session-recordings', 'playlist', 'sessionRecordingsListPropertiesLogic']),\n connect(() => ({\n actions: [eventUsageLogic, ['reportRecordingsListPropertiesFetched']],\n })),\n\n actions({\n loadPropertiesForSessions: (sessions: SessionRecordingType[]) => ({ sessions }),\n maybeLoadPropertiesForSessions: (sessions: SessionRecordingType[]) => ({ sessions }),\n }),\n\n loaders(({ actions }) => ({\n recordingProperties: [\n [] as SessionRecordingPropertiesType[],\n {\n loadPropertiesForSessions: async ({ sessions }, breakpoint) => {\n await breakpoint(100)\n\n const startTime = performance.now()\n const sessionIds = sessions.map((x) => x.id)\n\n const oldestTimestamp = sessions.map((x) => x.start_time).sort()[0]\n const newestTimestamp = sessions.map((x) => x.end_time).sort()[sessions.length - 1]\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`SELECT properties.$session_id as session_id, any(properties) as properties\n FROM events\n WHERE event IN ${Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP['events'])}\n AND session_id IN ${sessionIds}\n -- the timestamp range here is only to avoid querying too much of the events table\n -- we don't really care about the absolute value, \n -- but we do care about whether timezones have an odd impact\n -- so, we extend the range by a day on each side so that timezones don't cause issues\n AND timestamp >= ${dayjs(oldestTimestamp).subtract(1, 'day')}\n AND timestamp <= ${dayjs(newestTimestamp).add(1, 'day')}\n GROUP BY session_id`,\n }\n\n const response = await api.query(query)\n const loadTimeMs = performance.now() - startTime\n\n actions.reportRecordingsListPropertiesFetched(loadTimeMs)\n\n breakpoint()\n return (response.results || []).map(\n (x: any): SessionRecordingPropertiesType => ({\n id: x[0],\n properties: JSON.parse(x[1] || '{}'),\n })\n )\n },\n },\n ],\n })),\n\n listeners(({ actions, values }) => ({\n maybeLoadPropertiesForSessions: ({ sessions }) => {\n const newSessions = sessions.filter((session) => !values.recordingPropertiesById[session.id])\n\n if (newSessions.length > 0) {\n actions.loadPropertiesForSessions(newSessions)\n }\n },\n })),\n\n reducers({\n recordingPropertiesById: [\n {} as Record,\n {\n loadPropertiesForSessionsSuccess: (\n state,\n { recordingProperties }\n ): Record => {\n const newState = { ...state }\n recordingProperties.forEach((properties) => {\n newState[properties.id] = properties.properties\n })\n\n return newState\n },\n },\n ],\n }),\n])\n","import { Link } from '@posthog/lemon-ui'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { CopyToClipboardInline } from 'lib/components/CopyToClipboard'\nimport { LemonBanner } from 'lib/lemon-ui/LemonBanner'\nimport { LemonButton } from 'lib/lemon-ui/LemonButton'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonInput } from 'lib/lemon-ui/LemonInput/LemonInput'\nimport { LemonModal } from 'lib/lemon-ui/LemonModal'\nimport { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'\nimport { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'\n\nimport { verifiedDomainsLogic } from './verifiedDomainsLogic'\n\nexport function ConfigureSAMLModal(): JSX.Element {\n const { configureSAMLModalId, isSamlConfigSubmitting, samlConfig } = useValues(verifiedDomainsLogic)\n const { setConfigureSAMLModalId } = useActions(verifiedDomainsLogic)\n const { preflight } = useValues(preflightLogic)\n const siteUrl = preflight?.site_url ?? window.location.origin\n\n const samlReady = samlConfig.saml_acs_url && samlConfig.saml_entity_id && samlConfig.saml_x509_cert\n\n const handleClose = (): void => {\n setConfigureSAMLModalId(null)\n // clean()\n }\n\n return (\n \n
\n \n

Configure SAML authentication and provisioning

\n
\n \n

\n \n Read the docs\n \n

\n \n {`${siteUrl}/complete/saml/`}\n \n \n {configureSAMLModalId || 'unknown'}\n \n \n {siteUrl}\n \n \n \n \n \n \n \n \n \n \n {!samlReady && (\n \n SAML will not be enabled unless you enter all attributes above. However you can still\n settings as draft.\n \n )}\n
\n \n \n Save settings\n \n \n
\n
\n )\n}\n","import { IconEllipsis, IconInfo, IconPlus } from '@posthog/icons'\nimport {\n LemonBanner,\n LemonButton,\n LemonDialog,\n LemonInput,\n LemonMenu,\n LemonTable,\n LemonTableColumns,\n LemonTabs,\n Spinner,\n Tooltip,\n} from '@posthog/lemon-ui'\nimport clsx from 'clsx'\nimport { useActions, useValues } from 'kea'\nimport { Form } from 'kea-forms'\nimport { CodeSnippet, Language } from 'lib/components/CodeSnippet'\nimport { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'\nimport { RestrictionScope, useRestrictedArea } from 'lib/components/RestrictedArea'\nimport { OrganizationMembershipLevel } from 'lib/constants'\nimport { LemonField } from 'lib/lemon-ui/LemonField'\nimport { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'\n\nimport { AvailableFeature } from '~/types'\n\nimport { proxyLogic, ProxyRecord } from './proxyLogic'\n\nconst MAX_PROXY_RECORDS = 3\n\nconst statusText = {\n valid: 'live',\n timed_out: 'timed out',\n}\n\nexport function ManagedReverseProxy(): JSX.Element {\n const { formState, proxyRecords, proxyRecordsLoading } = useValues(proxyLogic)\n const { showForm, deleteRecord } = useActions(proxyLogic)\n\n const restrictionReason = useRestrictedArea({\n minimumAccessLevel: OrganizationMembershipLevel.Admin,\n scope: RestrictionScope.Organization,\n })\n\n const maxRecordsReached = proxyRecords.length >= MAX_PROXY_RECORDS\n\n const recordsWithMessages = proxyRecords.filter((record) => !!record.message)\n\n const columns: LemonTableColumns = [\n {\n title: 'Domain',\n dataIndex: 'domain',\n },\n {\n title: 'Status',\n dataIndex: 'status',\n render: function RenderStatus(status) {\n if (!status) {\n return Unknown\n }\n\n return (\n \n {status === 'issuing' && }\n {statusText[status] || status}\n {status === 'waiting' && (\n \n \n \n )}\n {status === 'timed_out' && (\n \n \n \n )}\n \n )\n },\n },\n {\n title: ,\n width: 20,\n className: 'flex justify-center',\n render: function Render(_, { id, status }) {\n return (\n status != 'deleting' &&\n !restrictionReason && (\n {\n LemonDialog.open({\n title: 'Delete managed proxy',\n width: '20rem',\n content:\n 'Are you sure you want to delete this managed proxy? This cannot be undone and if it is in use then events sent to the domain will not be processed.',\n primaryButton: {\n status: 'danger',\n onClick: () => deleteRecord(id),\n children: 'Delete',\n },\n secondaryButton: {\n children: 'Cancel',\n },\n })\n },\n },\n ]}\n >\n } />\n \n )\n )\n },\n },\n ]\n\n return (\n \n
\n {recordsWithMessages.map((r) => (\n \n {`**${r.domain}**\\n ${r.message}`}\n \n ))}\n ,\n }}\n />\n {formState === 'collapsed' ? (\n maxRecordsReached ? (\n \n There is a maximum of {MAX_PROXY_RECORDS} records allowed per organization\n \n ) : (\n
\n }\n disabledReason={restrictionReason}\n >\n New managed proxy\n \n
\n )\n ) : (\n \n )}\n
\n
\n )\n}\n\nconst ExpandedRow = ({ record }: { record: ProxyRecord }): JSX.Element => {\n return (\n
\n \n {record.target_cname}\n \n ),\n },\n ]}\n />\n
\n )\n}\n\nfunction CreateRecordForm(): JSX.Element {\n const { formState, proxyRecordsLoading, proxyRecords } = useValues(proxyLogic)\n const { collapseForm } = useActions(proxyLogic)\n\n const waitingRecords = proxyRecords.filter((r) => r.status === 'waiting')\n\n return (\n
\n {formState == 'active' ? (\n
\n \n \n \n
\n \n Cancel\n \n \n Add\n \n
\n
\n ) : (\n <>\n
Almost there
\n
\n You need to set the following CNAME records in your DNS provider:\n
\n {waitingRecords.map((r) => (\n
\n {r.domain}\n \n {r.target_cname}\n \n
\n ))}\n
\n \n Done\n \n
\n \n )}\n
\n )\n}\n","import { lemonToast } from '@posthog/lemon-ui'\nimport { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea'\nimport { forms } from 'kea-forms'\nimport { loaders } from 'kea-loaders'\nimport { actionToUrl, router, urlToAction } from 'kea-router'\nimport api from 'lib/api'\nimport { dayjs } from 'lib/dayjs'\nimport { featureFlagLogic as enabledFlagLogic } from 'lib/logic/featureFlagLogic'\nimport { hasFormErrors, isObject } from 'lib/utils'\nimport { eventUsageLogic } from 'lib/utils/eventUsageLogic'\nimport { Scene } from 'scenes/sceneTypes'\nimport { teamLogic } from 'scenes/teamLogic'\nimport { urls } from 'scenes/urls'\n\nimport { DataTableNode, HogQLQuery, InsightVizNode, NodeKind } from '~/queries/schema'\nimport { hogql } from '~/queries/utils'\nimport {\n BaseMathType,\n Breadcrumb,\n FeatureFlagFilters,\n MultipleSurveyQuestion,\n PropertyFilterType,\n PropertyOperator,\n RatingSurveyQuestion,\n Survey,\n SurveyQuestionBase,\n SurveyQuestionBranchingType,\n SurveyQuestionType,\n SurveyUrlMatchType,\n} from '~/types'\n\nimport { defaultSurveyAppearance, defaultSurveyFieldValues, NEW_SURVEY, NewSurvey } from './constants'\nimport type { surveyLogicType } from './surveyLogicType'\nimport { surveysLogic } from './surveysLogic'\nimport { sanitizeHTML } from './utils'\n\nexport enum SurveyEditSection {\n Steps = 'steps',\n Widget = 'widget',\n Presentation = 'presentation',\n Appearance = 'appearance',\n Customization = 'customization',\n DisplayConditions = 'DisplayConditions',\n Scheduling = 'scheduling',\n CompletionConditions = 'CompletionConditions',\n}\nexport interface SurveyLogicProps {\n /** Either a UUID or 'new'. */\n id: string\n}\n\nexport interface SurveyMetricsQueries {\n surveysShown: DataTableNode\n surveysDismissed: DataTableNode\n}\n\nexport interface SurveyUserStats {\n seen: number\n dismissed: number\n sent: number\n}\n\nexport interface SurveyRatingResults {\n [key: number]: {\n data: number[]\n total: number\n }\n}\n\nexport interface SurveyRecurringNPSResults {\n [key: number]: {\n data: number[]\n total: number\n }\n}\n\ntype SurveyNPSResult = {\n Promoters: number\n Detractors: number\n Passives: number\n}\n\nexport interface SurveySingleChoiceResults {\n [key: number]: {\n labels: string[]\n data: number[]\n total: number\n }\n}\n\nexport interface SurveyMultipleChoiceResults {\n [key: number]: {\n labels: string[]\n data: number[]\n }\n}\n\nexport interface SurveyOpenTextResults {\n [key: number]: {\n events: { distinct_id: string; properties: Record; personProperties: Record }[]\n }\n}\n\nexport interface QuestionResultsReady {\n [key: string]: boolean\n}\n\nexport type DataCollectionType = 'until_stopped' | 'until_limit' | 'until_adaptive_limit'\nexport type ScheduleType = 'once' | 'recurring'\n\nconst getResponseField = (i: number): string => (i === 0 ? '$survey_response' : `$survey_response_${i}`)\n\nfunction duplicateExistingSurvey(survey: Survey | NewSurvey): Partial {\n return {\n ...survey,\n id: NEW_SURVEY.id,\n name: `${survey.name} (copy)`,\n archived: false,\n start_date: null,\n end_date: null,\n targeting_flag_filters: survey.targeting_flag?.filters ?? NEW_SURVEY.targeting_flag_filters,\n linked_flag_id: survey.linked_flag?.id ?? NEW_SURVEY.linked_flag_id,\n }\n}\n\nexport const surveyLogic = kea([\n props({} as SurveyLogicProps),\n key(({ id }) => id),\n path((key) => ['scenes', 'surveys', 'surveyLogic', key]),\n connect(() => ({\n actions: [\n surveysLogic,\n ['loadSurveys'],\n eventUsageLogic,\n [\n 'reportSurveyCreated',\n 'reportSurveyEdited',\n 'reportSurveyArchived',\n 'reportSurveyViewed',\n 'reportSurveyCycleDetected',\n ],\n ],\n values: [enabledFlagLogic, ['featureFlags as enabledFlags'], surveysLogic, ['surveys']],\n })),\n actions({\n setSurveyMissing: true,\n editingSurvey: (editing: boolean) => ({ editing }),\n setDefaultForQuestionType: (\n idx: number,\n type: SurveyQuestionType,\n isEditingQuestion: boolean,\n isEditingDescription: boolean,\n isEditingThankYouMessage: boolean\n ) => ({\n idx,\n type,\n isEditingQuestion,\n isEditingDescription,\n isEditingThankYouMessage,\n }),\n setQuestionBranchingType: (questionIndex, type, specificQuestionIndex) => ({\n questionIndex,\n type,\n specificQuestionIndex,\n }),\n setResponseBasedBranchingForQuestion: (questionIndex, responseValue, nextStep, specificQuestionIndex) => ({\n questionIndex,\n responseValue,\n nextStep,\n specificQuestionIndex,\n }),\n setDataCollectionType: (dataCollectionType: DataCollectionType) => ({\n dataCollectionType,\n }),\n resetBranchingForQuestion: (questionIndex) => ({ questionIndex }),\n deleteBranchingLogic: true,\n archiveSurvey: true,\n setWritingHTMLDescription: (writingHTML: boolean) => ({ writingHTML }),\n setSurveyTemplateValues: (template: any) => ({ template }),\n setSelectedPageIndex: (idx: number | null) => ({ idx }),\n setSelectedSection: (section: SurveyEditSection | null) => ({ section }),\n\n setSchedule: (schedule: ScheduleType) => ({ schedule }),\n resetTargeting: true,\n resetSurveyAdaptiveSampling: true,\n resetSurveyResponseLimits: true,\n setFlagPropertyErrors: (errors: any) => ({ errors }),\n }),\n loaders(({ props, actions, values }) => ({\n responseSummary: {\n summarize: async ({ questionIndex }: { questionIndex?: number }) => {\n return api.surveys.summarize_responses(props.id, questionIndex)\n },\n },\n survey: {\n loadSurvey: async () => {\n if (props.id && props.id !== 'new') {\n try {\n const survey = await api.surveys.get(props.id)\n actions.reportSurveyViewed(survey)\n return survey\n } catch (error: any) {\n if (error.status === 404) {\n actions.setSurveyMissing()\n return { ...NEW_SURVEY }\n }\n throw error\n }\n }\n if (props.id === 'new' && router.values.hashParams.fromTemplate) {\n const templatedSurvey = values.survey\n templatedSurvey.appearance = {\n ...defaultSurveyAppearance,\n ...teamLogic.values.currentTeam?.survey_config?.appearance,\n ...templatedSurvey.appearance,\n }\n return templatedSurvey\n }\n\n const newSurvey = NEW_SURVEY\n newSurvey.appearance = {\n ...defaultSurveyAppearance,\n ...teamLogic.values.currentTeam?.survey_config?.appearance,\n ...newSurvey.appearance,\n }\n\n return newSurvey\n },\n createSurvey: async (surveyPayload: Partial) => {\n return await api.surveys.create(sanitizeQuestions(surveyPayload))\n },\n updateSurvey: async (surveyPayload: Partial) => {\n return await api.surveys.update(props.id, sanitizeQuestions(surveyPayload))\n },\n launchSurvey: async () => {\n const startDate = dayjs()\n return await api.surveys.update(props.id, { start_date: startDate.toISOString() })\n },\n stopSurvey: async () => {\n return await api.surveys.update(props.id, { end_date: dayjs().toISOString() })\n },\n resumeSurvey: async () => {\n return await api.surveys.update(props.id, { end_date: null })\n },\n },\n duplicatedSurvey: {\n duplicateSurvey: async () => {\n const { survey } = values\n const payload = duplicateExistingSurvey(survey)\n const createdSurvey = await api.surveys.create(sanitizeQuestions(payload))\n\n lemonToast.success('Survey duplicated.', {\n toastId: `survey-duplicated-${createdSurvey.id}`,\n button: {\n label: 'View Survey',\n action: () => {\n router.actions.push(urls.survey(createdSurvey.id))\n },\n },\n })\n\n actions.reportSurveyCreated(createdSurvey, true)\n return survey\n },\n },\n surveyUserStats: {\n loadSurveyUserStats: async (): Promise => {\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: hogql`\n SELECT\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey shown'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate}),\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey dismissed'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate}),\n (SELECT COUNT(DISTINCT person_id)\n FROM events\n WHERE event = 'survey sent'\n AND properties.$survey_id = ${props.id}\n AND timestamp >= ${startDate}\n AND timestamp <= ${endDate})\n `,\n }\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n if (results && results[0]) {\n const [totalSeen, dismissed, sent] = results[0]\n const onlySeen = totalSeen - dismissed - sent\n return { seen: onlySeen < 0 ? 0 : onlySeen, dismissed, sent }\n }\n return { seen: 0, dismissed: 0, sent: 0 }\n },\n },\n surveyRatingResults: {\n loadSurveyRatingResults: async ({\n questionIndex,\n iteration,\n }: {\n questionIndex: number\n iteration?: number | null | undefined\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Rating) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Rating}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n let iterationCondition = ''\n if (iteration && iteration > 0) {\n iterationCondition = ` AND properties.$survey_iteration='${iteration}' `\n }\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent' \n AND properties.$survey_id = '${props.id}'\n ${iterationCondition}\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response\n `,\n }\n const responseJSON = await api.query(query)\n // TODO:Dylan - I don't like how we lose our types here\n // would be cool if we could parse this in a more type-safe way\n const { results } = responseJSON\n\n let total = 0\n const dataSize = question.scale === 10 ? 11 : question.scale\n const data = new Array(dataSize).fill(0)\n results?.forEach(([value, count]) => {\n total += count\n\n const index = question.scale === 10 ? value : value - 1\n data[index] = count\n })\n\n return { ...values.surveyRatingResults, [questionIndex]: { total, data } }\n },\n },\n surveyRecurringNPSResults: {\n loadSurveyRecurringNPSResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Rating) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Rating}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '$survey_iteration') AS survey_iteration,\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent'\n AND properties.$survey_id = '${props.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response, survey_iteration\n `,\n }\n\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n let total = 100\n const data = new Array(survey.iteration_count).fill(0)\n\n const iterations = new Map()\n\n results?.forEach(([iteration, response, count]) => {\n let promoters = 0\n let passives = 0\n let detractors = 0\n\n if (parseInt(response) >= 9) {\n // a Promoter is someone who gives a survey response of 9 or 10\n promoters += parseInt(count)\n } else if (parseInt(response) > 6) {\n // a Passive is someone who gives a survey response of 7 or 8\n passives += parseInt(count)\n } else {\n // a Detractor is someone who gives a survey response of 0 - 6\n detractors += parseInt(count)\n }\n\n if (iterations.has(iteration)) {\n const currentValue = iterations.get(iteration)\n if (currentValue !== undefined) {\n currentValue.Detractors += detractors\n currentValue.Promoters += promoters\n currentValue.Passives += passives\n }\n } else {\n iterations.set(iteration, {\n Detractors: detractors,\n Passives: passives,\n Promoters: promoters,\n })\n }\n })\n\n iterations.forEach((value: SurveyNPSResult, key: string) => {\n // NPS score is calculated with this formula\n // (Promoters / (Promoters + Passives + Detractors) * 100) - (Detractors / (Promoters + Passives + Detractors)* 100)\n const totalResponses = value.Promoters + value.Passives + value.Detractors\n const npsScore =\n (value.Promoters / totalResponses) * 100 - (value.Detractors / totalResponses) * 100\n data[parseInt(key) - 1] = npsScore\n total += 100\n })\n\n return { ...values.surveyRecurringNPSResults, [questionIndex]: { total, data } }\n },\n },\n surveySingleChoiceResults: {\n loadSurveySingleChoiceResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT\n JSONExtractString(properties, '${getResponseField(questionIndex)}') AS survey_response,\n COUNT(survey_response)\n FROM events\n WHERE event = 'survey sent' \n AND properties.$survey_id = '${props.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY survey_response\n `,\n }\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n\n const labels = results?.map((r) => r[0])\n const data = results?.map((r) => r[1])\n const total = data?.reduce((a, b) => a + b, 0)\n\n return { ...values.surveySingleChoiceResults, [questionIndex]: { labels, data, total } }\n },\n },\n surveyMultipleChoiceResults: {\n loadSurveyMultipleChoiceResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.MultipleChoice) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.MultipleChoice}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT \n count(),\n arrayJoin(JSONExtractArrayRaw(properties, '${getResponseField(questionIndex)}')) AS choice\n FROM events\n WHERE event == 'survey sent'\n AND properties.$survey_id == '${survey.id}'\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n GROUP BY choice\n ORDER BY count() DESC\n `,\n }\n const responseJSON = await api.query(query)\n let { results } = responseJSON\n\n // Remove outside quotes\n results = results?.map((r) => {\n return [r[0], r[1].slice(1, r[1].length - 1)]\n })\n\n // Zero-fill choices that are not open-ended\n question.choices.forEach((choice, idx) => {\n const isOpenChoice = idx == question.choices.length - 1 && question?.hasOpenChoice\n if (results?.length && !isOpenChoice && !results.some((r) => r[1] === choice)) {\n results.push([0, choice])\n }\n })\n\n const data = results?.map((r) => r[0])\n const labels = results?.map((r) => r[1])\n\n return { ...values.surveyMultipleChoiceResults, [questionIndex]: { labels, data } }\n },\n },\n surveyOpenTextResults: {\n loadSurveyOpenTextResults: async ({\n questionIndex,\n }: {\n questionIndex: number\n }): Promise => {\n const question = values.survey.questions[questionIndex]\n if (question.type !== SurveyQuestionType.Open) {\n throw new Error(`Survey question type must be ${SurveyQuestionType.Open}`)\n }\n\n const survey: Survey = values.survey as Survey\n const startDate = dayjs(survey.start_date || survey.created_at).format('YYYY-MM-DD')\n const endDate = survey.end_date\n ? dayjs(survey.end_date).add(1, 'day').format('YYYY-MM-DD')\n : dayjs().add(1, 'day').format('YYYY-MM-DD')\n\n const query: HogQLQuery = {\n kind: NodeKind.HogQLQuery,\n query: `\n SELECT distinct_id, properties, person.properties\n FROM events\n WHERE event == 'survey sent'\n AND properties.$survey_id == '${survey.id}'\n AND trim(JSONExtractString(properties, '${getResponseField(questionIndex)}')) != ''\n AND timestamp >= '${startDate}'\n AND timestamp <= '${endDate}'\n LIMIT 20\n `,\n }\n\n const responseJSON = await api.query(query)\n const { results } = responseJSON\n\n const events =\n results?.map((r) => {\n const distinct_id = r[0]\n const properties = JSON.parse(r[1])\n const personProperties = JSON.parse(r[2])\n return { distinct_id, properties, personProperties }\n }) || []\n\n return { ...values.surveyOpenTextResults, [questionIndex]: { events } }\n },\n },\n })),\n listeners(({ actions, values }) => ({\n createSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} created)\n actions.loadSurveys()\n router.actions.replace(urls.survey(survey.id))\n actions.reportSurveyCreated(survey)\n },\n updateSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} updated)\n actions.editingSurvey(false)\n actions.reportSurveyEdited(survey)\n actions.loadSurveys()\n },\n duplicateSurveySuccess: () => {\n actions.loadSurveys()\n },\n launchSurveySuccess: ({ survey }) => {\n lemonToast.success(<>Survey {survey.name} launched)\n actions.loadSurveys()\n },\n stopSurveySuccess: () => {\n actions.loadSurveys()\n },\n resumeSurveySuccess: () => {\n actions.loadSurveys()\n },\n archiveSurvey: () => {\n actions.updateSurvey({ archived: true })\n },\n loadSurveySuccess: () => {\n actions.loadSurveyUserStats()\n },\n resetSurveyResponseLimits: () => {\n actions.setSurveyValue('responses_limit', null)\n },\n\n resetSurveyAdaptiveSampling: () => {\n actions.setSurveyValues({\n response_sampling_interval: null,\n response_sampling_interval_type: null,\n response_sampling_limit: null,\n response_sampling_start_date: null,\n response_sampling_daily_limits: null,\n })\n },\n resetTargeting: () => {\n actions.setSurveyValue('linked_flag_id', NEW_SURVEY.linked_flag_id)\n actions.setSurveyValue('targeting_flag_filters', NEW_SURVEY.targeting_flag_filters)\n actions.setSurveyValue('linked_flag', NEW_SURVEY.linked_flag)\n actions.setSurveyValue('targeting_flag', NEW_SURVEY.targeting_flag)\n actions.setSurveyValue('conditions', NEW_SURVEY.conditions)\n actions.setSurveyValue('remove_targeting_flag', true)\n actions.setSurveyValue('responses_limit', NEW_SURVEY.responses_limit)\n actions.setSurveyValues({\n iteration_count: NEW_SURVEY.iteration_count,\n iteration_frequency_days: NEW_SURVEY.iteration_frequency_days,\n })\n },\n submitSurveyFailure: async () => {\n // When errors occur, scroll to the error, but wait for errors to be set in the DOM first\n if (hasFormErrors(values.flagPropertyErrors) || values.urlMatchTypeValidationError) {\n actions.setSelectedSection(SurveyEditSection.DisplayConditions)\n } else {\n actions.setSelectedSection(SurveyEditSection.Steps)\n }\n setTimeout(\n () => document.querySelector(`.Field--error`)?.scrollIntoView({ block: 'center', behavior: 'smooth' }),\n 5\n )\n },\n })),\n reducers({\n isEditingSurvey: [\n false,\n {\n editingSurvey: (_, { editing }) => editing,\n },\n ],\n surveyMissing: [\n false,\n {\n setSurveyMissing: () => true,\n },\n ],\n dataCollectionType: [\n 'until_stopped' as DataCollectionType,\n {\n setDataCollectionType: (_, { dataCollectionType }) => dataCollectionType,\n },\n ],\n\n survey: [\n { ...NEW_SURVEY } as NewSurvey | Survey,\n {\n setDefaultForQuestionType: (\n state,\n { idx, type, isEditingQuestion, isEditingDescription, isEditingThankYouMessage }\n ) => {\n const question = isEditingQuestion\n ? state.questions[idx].question\n : defaultSurveyFieldValues[type].questions[0].question\n const description = isEditingDescription\n ? state.questions[idx].description\n : defaultSurveyFieldValues[type].questions[0].description\n const thankYouMessageHeader = isEditingThankYouMessage\n ? state.appearance?.thankYouMessageHeader\n : defaultSurveyFieldValues[type].appearance.thankYouMessageHeader\n const newQuestions = [...state.questions]\n newQuestions[idx] = {\n ...state.questions[idx],\n ...(defaultSurveyFieldValues[type].questions[0] as SurveyQuestionBase),\n question,\n description,\n }\n return {\n ...state,\n questions: newQuestions,\n appearance: {\n ...state.appearance,\n ...defaultSurveyFieldValues[type].appearance,\n thankYouMessageHeader,\n },\n }\n },\n setSurveyTemplateValues: (_, { template }) => {\n const newTemplateSurvey = { ...NEW_SURVEY, ...template }\n return newTemplateSurvey\n },\n setQuestionBranchingType: (state, { questionIndex, type, specificQuestionIndex }) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n\n if (type === SurveyQuestionBranchingType.NextQuestion) {\n delete question.branching\n } else if (type === SurveyQuestionBranchingType.End) {\n question.branching = {\n type: SurveyQuestionBranchingType.End,\n }\n } else if (type === SurveyQuestionBranchingType.ResponseBased) {\n if (\n question.type !== SurveyQuestionType.Rating &&\n question.type !== SurveyQuestionType.SingleChoice\n ) {\n throw new Error(\n `Survey question type must be ${SurveyQuestionType.Rating} or ${SurveyQuestionType.SingleChoice}`\n )\n }\n\n question.branching = {\n type: SurveyQuestionBranchingType.ResponseBased,\n responseValues: {},\n }\n } else if (type === SurveyQuestionBranchingType.SpecificQuestion) {\n question.branching = {\n type: SurveyQuestionBranchingType.SpecificQuestion,\n index: specificQuestionIndex,\n }\n }\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n setResponseBasedBranchingForQuestion: (\n state,\n { questionIndex, responseValue, nextStep, specificQuestionIndex }\n ) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n\n if (\n question.type !== SurveyQuestionType.Rating &&\n question.type !== SurveyQuestionType.SingleChoice\n ) {\n throw new Error(\n `Survey question type must be ${SurveyQuestionType.Rating} or ${SurveyQuestionType.SingleChoice}`\n )\n }\n\n if (question.branching?.type !== SurveyQuestionBranchingType.ResponseBased) {\n throw new Error(\n `Survey question branching type must be ${SurveyQuestionBranchingType.ResponseBased}`\n )\n }\n\n if ('responseValues' in question.branching) {\n if (nextStep === SurveyQuestionBranchingType.NextQuestion) {\n delete question.branching.responseValues[responseValue]\n } else if (nextStep === SurveyQuestionBranchingType.End) {\n question.branching.responseValues[responseValue] = SurveyQuestionBranchingType.End\n } else if (nextStep === SurveyQuestionBranchingType.SpecificQuestion) {\n question.branching.responseValues[responseValue] = specificQuestionIndex\n }\n }\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n resetBranchingForQuestion: (state, { questionIndex }) => {\n const newQuestions = [...state.questions]\n const question = newQuestions[questionIndex]\n delete question.branching\n\n newQuestions[questionIndex] = question\n return {\n ...state,\n questions: newQuestions,\n }\n },\n deleteBranchingLogic: (state) => {\n const newQuestions = [...state.questions]\n newQuestions.forEach((question) => {\n delete question.branching\n })\n\n return {\n ...state,\n questions: newQuestions,\n }\n },\n },\n ],\n selectedPageIndex: [\n 0 as number | null,\n {\n setSelectedPageIndex: (_, { idx }) => idx,\n },\n ],\n selectedSection: [\n SurveyEditSection.Steps as SurveyEditSection | null,\n {\n setSelectedSection: (_, { section }) => section,\n },\n ],\n surveyRatingResultsReady: [\n {},\n {\n loadSurveyRatingResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyRecurringNPSResultsReady: [\n {},\n {\n loadSurveyRecurringNPSResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveySingleChoiceResultsReady: [\n {},\n {\n loadSurveySingleChoiceResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyMultipleChoiceResultsReady: [\n {},\n {\n loadSurveyMultipleChoiceResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n surveyOpenTextResultsReady: [\n {},\n {\n loadSurveyOpenTextResultsSuccess: (state, { payload }) => {\n if (!payload || !payload.hasOwnProperty('questionIndex')) {\n return { ...state }\n }\n return { ...state, [payload.questionIndex]: true }\n },\n },\n ],\n writingHTMLDescription: [\n false,\n {\n setWritingHTMLDescription: (_, { writingHTML }) => writingHTML,\n },\n ],\n schedule: [\n 'once',\n {\n setSchedule: (_, { schedule }) => schedule,\n },\n ],\n flagPropertyErrors: [\n null as any,\n {\n setFlagPropertyErrors: (_, { errors }) => errors,\n },\n ],\n }),\n selectors({\n isSurveyRunning: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(survey.start_date && !survey.end_date)\n },\n ],\n surveyUsesLimit: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(survey.responses_limit && survey.responses_limit > 0)\n },\n ],\n surveyUsesAdaptiveLimit: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return !!(\n survey.response_sampling_interval &&\n survey.response_sampling_interval > 0 &&\n survey.response_sampling_interval_type !== '' &&\n survey.response_sampling_limit &&\n survey.response_sampling_limit > 0\n )\n },\n ],\n surveyShufflingQuestionsAvailable: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n return survey.questions.length > 1\n },\n ],\n showSurveyRepeatSchedule: [(s) => [s.schedule], (schedule: ScheduleType) => schedule == 'recurring'],\n descriptionContentType: [\n (s) => [s.survey],\n (survey: Survey) => (questionIndex: number) => {\n return survey.questions[questionIndex].descriptionContentType\n },\n ],\n surveyRepeatedActivationAvailable: [\n (s) => [s.survey],\n (survey: Survey): boolean =>\n survey.conditions?.events?.values != undefined && survey.conditions?.events?.values?.length > 0,\n ],\n hasTargetingSet: [\n (s) => [s.survey],\n (survey: Survey): boolean => {\n const hasLinkedFlag =\n !!survey.linked_flag_id || (survey.linked_flag && Object.keys(survey.linked_flag).length > 0)\n const hasTargetingFlag =\n (survey.targeting_flag && Object.keys(survey.targeting_flag).length > 0) ||\n (survey.targeting_flag_filters && Object.keys(survey.targeting_flag_filters).length > 0)\n const hasOtherConditions = survey.conditions && Object.keys(survey.conditions).length > 0\n return !!hasLinkedFlag || !!hasTargetingFlag || !!hasOtherConditions\n },\n ],\n breadcrumbs: [\n (s) => [s.survey],\n (survey: Survey): Breadcrumb[] => [\n {\n key: Scene.Surveys,\n name: 'Surveys',\n path: urls.surveys(),\n },\n { key: [Scene.Survey, survey?.id || 'new'], name: survey.name },\n ],\n ],\n dataTableQuery: [\n (s) => [s.survey],\n (survey): DataTableNode | null => {\n if (survey.id === 'new') {\n return null\n }\n const surveyWithResults = survey as Survey\n const startDate = surveyWithResults.start_date || surveyWithResults.created_at\n return {\n kind: NodeKind.DataTableNode,\n source: {\n kind: NodeKind.EventsQuery,\n select: [\n '*',\n ...survey.questions.map((q, i) => {\n if (q.type === SurveyQuestionType.MultipleChoice) {\n // Join array items into a string\n return `coalesce(arrayStringConcat(JSONExtractArrayRaw(properties, '${getResponseField(\n i\n )}'), ', ')) -- ${q.question}`\n }\n\n return `coalesce(JSONExtractString(properties, '${getResponseField(i)}')) -- ${\n q.question\n }`\n }),\n 'timestamp',\n 'person',\n `coalesce(JSONExtractString(properties, '$lib_version')) -- Library Version`,\n `coalesce(JSONExtractString(properties, '$lib')) -- Library`,\n `coalesce(JSONExtractString(properties, '$current_url')) -- URL`,\n ],\n orderBy: ['timestamp DESC'],\n where: [`event == 'survey sent'`],\n after: startDate,\n properties: [\n {\n type: PropertyFilterType.Event,\n key: '$survey_id',\n operator: PropertyOperator.Exact,\n value: survey.id,\n },\n ],\n },\n propertiesViaUrl: true,\n showExport: true,\n showReload: true,\n showEventFilter: false,\n showPropertyFilter: true,\n showTimings: false,\n }\n },\n ],\n targetingFlagFilters: [\n (s) => [s.survey],\n (survey): FeatureFlagFilters | undefined => {\n if (survey.targeting_flag_filters) {\n return {\n ...survey.targeting_flag_filters,\n groups: survey.targeting_flag_filters.groups,\n multivariate: null,\n payloads: {},\n super_groups: undefined,\n }\n }\n return survey.targeting_flag?.filters || undefined\n },\n ],\n urlMatchTypeValidationError: [\n (s) => [s.survey],\n (survey): string | null => {\n if (survey.conditions?.urlMatchType === SurveyUrlMatchType.Regex && survey.conditions.url) {\n try {\n new RegExp(survey.conditions.url)\n } catch (e: any) {\n return e.message\n }\n }\n return null\n },\n ],\n surveyNPSScore: [\n (s) => [s.surveyRatingResults],\n (surveyRatingResults) => {\n if (surveyRatingResults) {\n const questionIdx = Object.keys(surveyRatingResults)[0]\n const questionResults = surveyRatingResults[questionIdx]\n\n // If we don't have any results, return 'No data available' instead of NaN.\n if (questionResults.total === 0) {\n return 'No data available'\n }\n\n const data: number[] = questionResults.data\n if (data.length === 11) {\n const promoters = data.slice(9, 11).reduce((a, b) => a + b, 0)\n const passives = data.slice(7, 9).reduce((a, b) => a + b, 0)\n const detractors = data.slice(0, 7).reduce((a, b) => a + b, 0)\n const npsScore = ((promoters - detractors) / (promoters + passives + detractors)) * 100\n return npsScore.toFixed(1)\n }\n }\n },\n ],\n\n getBranchingDropdownValue: [\n (s) => [s.survey],\n (survey) => (questionIndex: number, question: RatingSurveyQuestion | MultipleSurveyQuestion) => {\n if (question.branching?.type) {\n const { type } = question.branching\n\n if (type === SurveyQuestionBranchingType.SpecificQuestion) {\n const nextQuestionIndex = question.branching.index\n return `${SurveyQuestionBranchingType.SpecificQuestion}:${nextQuestionIndex}`\n }\n\n return type\n }\n\n // No branching specified, default to Next question / Confirmation message\n if (questionIndex < survey.questions.length - 1) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n return SurveyQuestionBranchingType.End\n },\n ],\n getResponseBasedBranchingDropdownValue: [\n (s) => [s.survey],\n (survey) => (questionIndex: number, question: RatingSurveyQuestion | MultipleSurveyQuestion, response) => {\n if (!question.branching || !('responseValues' in question.branching)) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n // If a value is mapped onto an integer, we're redirecting to a specific question\n if (Number.isInteger(question.branching.responseValues[response])) {\n const nextQuestionIndex = question.branching.responseValues[response]\n return `${SurveyQuestionBranchingType.SpecificQuestion}:${nextQuestionIndex}`\n }\n\n // If any other value is present (practically only Confirmation message), return that value\n if (question.branching?.responseValues?.[response]) {\n return question.branching.responseValues[response]\n }\n\n // No branching specified, default to Next question / Confirmation message\n if (questionIndex < survey.questions.length - 1) {\n return SurveyQuestionBranchingType.NextQuestion\n }\n\n return SurveyQuestionBranchingType.End\n },\n ],\n hasCycle: [\n (s) => [s.survey],\n (survey) => {\n const graph = new Map()\n survey.questions.forEach((question, fromIndex: number) => {\n if (!graph.has(fromIndex)) {\n graph.set(fromIndex, new Set())\n }\n\n if (question.branching?.type === SurveyQuestionBranchingType.End) {\n return\n } else if (\n question.branching?.type === SurveyQuestionBranchingType.SpecificQuestion &&\n Number.isInteger(question.branching.index)\n ) {\n const toIndex = question.branching.index\n graph.get(fromIndex).add(toIndex)\n return\n } else if (\n question.branching?.type === SurveyQuestionBranchingType.ResponseBased &&\n isObject(question.branching?.responseValues)\n ) {\n for (const [_, toIndex] of Object.entries(question.branching?.responseValues)) {\n if (Number.isInteger(toIndex)) {\n graph.get(fromIndex).add(toIndex)\n }\n }\n }\n\n // No branching - still need to connect the next question\n if (fromIndex < survey.questions.length - 1) {\n const toIndex = fromIndex + 1\n graph.get(fromIndex).add(toIndex)\n }\n })\n\n let cycleDetected = false\n function dfs(node: number, seen: number[]): void {\n if (cycleDetected) {\n return\n }\n\n for (const neighbor of graph.get(node) || []) {\n if (seen.includes(neighbor)) {\n cycleDetected = true\n return\n }\n dfs(neighbor, seen.concat(neighbor))\n }\n }\n dfs(0, [0])\n\n return cycleDetected\n },\n ],\n hasBranchingLogic: [\n (s) => [s.survey],\n (survey) =>\n survey.questions.some((question) => question.branching && Object.keys(question.branching).length > 0),\n ],\n surveyAsInsightURL: [\n (s) => [s.survey],\n (survey) => {\n const query: InsightVizNode = {\n kind: NodeKind.InsightVizNode,\n source: {\n kind: NodeKind.TrendsQuery,\n properties: [\n {\n key: '$survey_id',\n value: survey.id,\n operator: PropertyOperator.Exact,\n type: PropertyFilterType.Event,\n },\n ],\n series: [\n {\n kind: NodeKind.EventsNode,\n event: 'survey sent',\n name: 'survey sent',\n math: BaseMathType.TotalCount,\n },\n {\n kind: NodeKind.EventsNode,\n event: 'survey shown',\n name: 'survey shown',\n math: BaseMathType.TotalCount,\n },\n {\n kind: NodeKind.EventsNode,\n event: 'survey dismissed',\n name: 'survey dismissed',\n math: BaseMathType.TotalCount,\n },\n ],\n },\n }\n\n return urls.insightNew(undefined, undefined, query)\n },\n ],\n }),\n forms(({ actions, props, values }) => ({\n survey: {\n defaults: { ...NEW_SURVEY } as NewSurvey | Survey,\n errors: ({ name, questions }) => ({\n // NOTE: When more validation errors are added, the submitSurveyFailure listener should be updated\n // to scroll to the right error section\n name: !name && 'Please enter a name.',\n questions: questions.map((question) => {\n const questionErrors = {\n question: !question.question && 'Please enter a question label.',\n }\n\n if (question.type === SurveyQuestionType.Rating) {\n return {\n ...questionErrors,\n display: !question.display && 'Please choose a display type.',\n scale: !question.scale && 'Please choose a scale.',\n lowerBoundLabel: !question.lowerBoundLabel && 'Please enter a lower bound label.',\n upperBoundLabel: !question.upperBoundLabel && 'Please enter an upper bound label.',\n }\n } else if (\n question.type === SurveyQuestionType.SingleChoice ||\n question.type === SurveyQuestionType.MultipleChoice\n ) {\n return {\n ...questionErrors,\n choices: question.choices.some((choice) => !choice.trim())\n ? 'Please ensure all choices are non-empty.'\n : undefined,\n }\n }\n\n return questionErrors\n }),\n // release conditions controlled using a PureField in the form\n targeting_flag_filters: values.flagPropertyErrors,\n // controlled using a PureField in the form\n urlMatchType: values.urlMatchTypeValidationError,\n }),\n submit: (surveyPayload) => {\n if (values.hasCycle) {\n actions.reportSurveyCycleDetected(values.survey)\n\n return lemonToast.error(\n 'Your survey contains an endless cycle. Please revisit your branching rules.'\n )\n }\n\n // when the survey is being submitted, we should turn off editing mode\n actions.editingSurvey(false)\n if (props.id && props.id !== 'new') {\n actions.updateSurvey(surveyPayload)\n } else {\n actions.createSurvey(surveyPayload)\n }\n },\n },\n })),\n urlToAction(({ actions, props }) => ({\n [urls.survey(props.id ?? 'new')]: (_, { edit }, __, { method }) => {\n // We always set the editingSurvey to true when we create a new survey\n if (props.id === 'new') {\n actions.editingSurvey(true)\n }\n // If the URL was pushed (user clicked on a link), reset the scene's data.\n // This avoids resetting form fields if you click back/forward.\n if (method === 'PUSH') {\n if (props.id) {\n actions.loadSurvey()\n } else {\n actions.resetSurvey()\n }\n }\n\n if (edit) {\n actions.editingSurvey(true)\n }\n },\n })),\n actionToUrl(({ values }) => ({\n setSurveyTemplateValues: () => {\n const hashParams = router.values.hashParams\n hashParams['fromTemplate'] = true\n\n return [urls.survey(values.survey.id), router.values.searchParams, hashParams]\n },\n editingSurvey: ({ editing }) => {\n const searchParams = router.values.searchParams\n if (editing) {\n searchParams['edit'] = true\n } else {\n delete searchParams['edit']\n }\n\n return [router.values.location.pathname, router.values.searchParams, router.values.hashParams]\n },\n })),\n afterMount(({ props, actions }) => {\n if (props.id !== 'new') {\n actions.loadSurvey()\n }\n if (props.id === 'new') {\n actions.resetSurvey()\n }\n }),\n])\n\nfunction sanitizeQuestions(surveyPayload: Partial): Partial {\n if (!surveyPayload.questions) {\n return surveyPayload\n }\n\n const sanitizedThankYouHeader = sanitizeHTML(surveyPayload.appearance?.thankYouMessageHeader || '')\n const sanitizedThankYouDescription = sanitizeHTML(surveyPayload.appearance?.thankYouMessageDescription || '')\n\n return {\n ...surveyPayload,\n questions: surveyPayload.questions?.map((rawQuestion) => {\n return {\n ...rawQuestion,\n description: sanitizeHTML(rawQuestion.description || ''),\n question: sanitizeHTML(rawQuestion.question || ''),\n }\n }),\n appearance: {\n ...surveyPayload.appearance,\n ...(sanitizedThankYouHeader && { thankYouMessageHeader: sanitizedThankYouHeader }),\n ...(sanitizedThankYouDescription && { thankYouMessageDescription: sanitizedThankYouDescription }),\n },\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/project.json b/docs/project.json index e130fa905..9fa3d3021 100644 --- a/docs/project.json +++ b/docs/project.json @@ -1 +1 @@ -{"generatedAt":1735854727761,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"packageManager":{"type":"pnpm","version":"8.10.5"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":true},"framework":{"name":"@storybook/react-webpack5","options":{"builder":{"useSWC":true}}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.6.4","storybookVersionSpecifier":"^7.6.4","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.4"},"@storybook/addons":{"version":"7.6.4"},"@storybook/api":{"version":"7.6.4"},"@storybook/blocks":{"version":"7.6.4"},"@storybook/components":{"version":"7.6.4"},"@storybook/core-events":{"version":"7.6.4"},"@storybook/csf":{"version":null},"@storybook/react":{"version":"7.6.4"},"@storybook/react-webpack5":{"version":"7.6.4"},"@storybook/test-runner":{"version":"0.16.0"},"@storybook/theming":{"version":"7.6.4"},"@storybook/types":{"version":"7.6.4"},"eslint-plugin-storybook":{"version":"0.6.15"},"storybook":{"version":"7.6.4"}},"addons":{"@storybook/addon-docs":{"version":"7.6.4"},"@storybook/addon-links":{"version":"7.6.4"},"@storybook/addon-essentials":{"version":"7.6.4"},"@storybook/addon-storysource":{"version":"7.6.4"},"@storybook/addon-a11y":{"version":"7.6.4"},"storybook-addon-pseudo-states":{"version":"2.1.2"}}} +{"generatedAt":1735856804274,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"packageManager":{"type":"pnpm","version":"8.10.5"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":true},"framework":{"name":"@storybook/react-webpack5","options":{"builder":{"useSWC":true}}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.6.4","storybookVersionSpecifier":"^7.6.4","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.4"},"@storybook/addons":{"version":"7.6.4"},"@storybook/api":{"version":"7.6.4"},"@storybook/blocks":{"version":"7.6.4"},"@storybook/components":{"version":"7.6.4"},"@storybook/core-events":{"version":"7.6.4"},"@storybook/csf":{"version":null},"@storybook/react":{"version":"7.6.4"},"@storybook/react-webpack5":{"version":"7.6.4"},"@storybook/test-runner":{"version":"0.16.0"},"@storybook/theming":{"version":"7.6.4"},"@storybook/types":{"version":"7.6.4"},"eslint-plugin-storybook":{"version":"0.6.15"},"storybook":{"version":"7.6.4"}},"addons":{"@storybook/addon-docs":{"version":"7.6.4"},"@storybook/addon-links":{"version":"7.6.4"},"@storybook/addon-essentials":{"version":"7.6.4"},"@storybook/addon-storysource":{"version":"7.6.4"},"@storybook/addon-a11y":{"version":"7.6.4"},"storybook-addon-pseudo-states":{"version":"2.1.2"}}} diff --git a/docs/runtime~main.f2870941.iframe.bundle.js b/docs/runtime~main.fe97118f.iframe.bundle.js similarity index 99% rename from docs/runtime~main.f2870941.iframe.bundle.js rename to docs/runtime~main.fe97118f.iframe.bundle.js index 1bc77bafd..ad4d46793 100644 --- a/docs/runtime~main.f2870941.iframe.bundle.js +++ b/docs/runtime~main.fe97118f.iframe.bundle.js @@ -1 +1 @@ -(()=>{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({68:"react-syntax-highlighter_languages_refractor_moonscript",131:"react-syntax-highlighter_languages_refractor_clike",271:"react-syntax-highlighter_languages_refractor_nevod",282:"react-syntax-highlighter_languages_refractor_bsl",589:"react-syntax-highlighter_languages_refractor_al",739:"scenes-session-recordings-apm-playerInspector-ItemPerformanceEvent-stories",741:"react-syntax-highlighter_languages_refractor_fsharp",948:"react-syntax-highlighter_languages_refractor_bison",986:"lib-components-Hogfetti-Hogfetti-stories",1094:"lib-lemon-ui-LemonCalendar-LemonCalendarSelectInput-stories",1621:"react-syntax-highlighter_languages_refractor_stylus",1808:"scenes-notebooks-Notebook-Notebook-stories",2013:"react-syntax-highlighter_languages_refractor_erlang",2065:"react-syntax-highlighter_languages_refractor_autohotkey",2313:"lib-components-ScrollableShadows-ScrollableShadows-stories",2335:"react-syntax-highlighter_languages_refractor_iecst",2413:"react-syntax-highlighter_languages_refractor_icon",2543:"lib-components-Cards-TextCard-TextCard-stories",2556:"react-syntax-highlighter_languages_refractor_aql",2677:"lib-lemon-ui-LemonRadio-LemonRadio-stories",3422:"react-syntax-highlighter_languages_refractor_purebasic",3933:"react-syntax-highlighter_languages_refractor_avroIdl",4372:"react-syntax-highlighter_languages_refractor_wolfram",4701:"react-syntax-highlighter_languages_refractor_j",4732:"react-syntax-highlighter_languages_refractor_latex",5180:"scenes-insights-views-BoldNumber-Textfit-stories",5793:"react-syntax-highlighter_languages_refractor_phpExtras",5797:"react-syntax-highlighter_languages_refractor_uorazor",5905:"react-syntax-highlighter_languages_refractor_gdscript",6319:"lib-components-EditableField-EditableField-stories",6396:"scenes-insights-filters-ActionFilter-ActionFilter-stories",6731:"react-syntax-highlighter_languages_refractor_squirrel",7422:"lib-lemon-ui-LemonField-LemonField-stories",8056:"stories-How-to-add-tabs-to-a-scene-stories-mdx",8680:"react-syntax-highlighter_languages_refractor_keepalived",8702:"react-syntax-highlighter_languages_refractor_cfscript",8771:"lib-components-VerticalNestedDND-VerticalNestedDND-stories",8819:"react-syntax-highlighter_languages_refractor_verilog",8966:"react-syntax-highlighter_languages_refractor_vala",9009:"react-syntax-highlighter_languages_refractor_gn",9111:"scenes-session-recordings-player-inspector-PlayerInspector-stories",9416:"scenes-authentication-signup-verify-email-VerifyEmail-stories",10057:"lib-components-PropertiesTable-PropertiesTable-stories",10223:"lib-lemon-ui-LemonInputSelect-LemonInputSelect-stories",10342:"react-syntax-highlighter_languages_refractor_powershell",10400:"react-syntax-highlighter_languages_refractor_batch",10749:"scenes-surveys-Surveys-stories",11438:"react-syntax-highlighter_languages_refractor_arff",11854:"scenes-authentication-signup-Signup-stories",11923:"lib-components-Playlist-Playlist-stories",12355:"react-syntax-highlighter_languages_refractor_t4Vb",12374:"react-syntax-highlighter_languages_refractor_cypher",12398:"lib-lemon-ui-LemonTable-LemonTable-stories",12547:"react-syntax-highlighter_languages_refractor_qore",13140:"react-syntax-highlighter_languages_refractor_hsts",13236:"react-syntax-highlighter_languages_refractor_roboconf",13502:"react-syntax-highlighter_languages_refractor_nsis",13694:"react-syntax-highlighter_languages_refractor_bro",14045:"react-syntax-highlighter_languages_refractor_prolog",14047:"scenes-Unsubscribe-Unsubscribe-stories",14052:"react-syntax-highlighter_languages_refractor_plsql",14527:"react-syntax-highlighter_languages_refractor_systemd",14879:"react-syntax-highlighter_languages_refractor_promql",14989:"lib-lemon-ui-Splotch-Splotch-stories",15545:"lib-lemon-ui-LemonBadge-LemonBadgeNumber-stories",15733:"react-syntax-highlighter_languages_refractor_idris",15773:"lib-components-PayGateMini-PayGateMini-stories",15778:"scenes-insights-Insights-stories",16023:"scenes-feature-flags-FeatureFlags-stories",16115:"scenes-session-recordings-player-inspector-components-Timing-NetworkRequestTiming-stories",16116:"scenes-products-Products-stories",16495:"scenes-insights-views-Funnels-FunnelCorrelationTable-stories",16498:"lib-lemon-ui-LemonProgressCircle-LemonProgressCircle-stories",16670:"react-syntax-highlighter_languages_refractor_apl",16680:"scenes-authentication-PasswordReset-stories",16818:"react-syntax-highlighter_languages_refractor_jq",17549:"stories-How-to-create-stories-stories-mdx",17723:"scenes-insights-EmptyStates-EmptyStates-stories",17842:"react-syntax-highlighter_languages_refractor_stan",18373:"lib-components-TaxonomicPopover-TaxonomicPopover-stories",18497:"react-syntax-highlighter_languages_refractor_bnf",18587:"lib-lemon-ui-PaginationControl-PaginationControl-stories",18692:"react-syntax-highlighter_languages_refractor_webIdl",18921:"react-syntax-highlighter_languages_refractor_graphql",19603:"react-syntax-highlighter_languages_refractor_icuMessageFormat",19797:"react-syntax-highlighter_languages_refractor_sass",19801:"lib-lemon-ui-LemonTextArea-LemonTextArea-stories",20226:"react-syntax-highlighter_languages_refractor_mel",20527:"stories-Hello-stories-mdx",20720:"react-syntax-highlighter_languages_refractor_jexl",20781:"react-syntax-highlighter_languages_refractor_lilypond",20979:"react-syntax-highlighter_languages_refractor_protobuf",21001:"react-syntax-highlighter_languages_refractor_rust",21167:"react-syntax-highlighter_languages_refractor_vhdl",21226:"lib-lemon-ui-LemonSegmentedSelect-LemonSegmentedSelect-stories",21599:"react-syntax-highlighter_languages_refractor_psl",22044:"react-syntax-highlighter_languages_refractor_fortran",22180:"react-syntax-highlighter_languages_refractor_json5",22244:"scenes-billing-BillingProduct-stories",23046:"scenes-activity-explore-Events-stories",23384:"stories-How-to-use-components-stories-mdx",23398:"lib-components-HogQLEditor-HogQLEditor-stories",23407:"lib-components-Cards-InsightCard-InsightCard-stories",23412:"react-syntax-highlighter_languages_refractor_abap",23708:"lib-lemon-ui-LemonRow-LemonRow-stories",23818:"react-syntax-highlighter_languages_refractor_scala",23846:"react-syntax-highlighter_languages_refractor_handlebars",24157:"react-syntax-highlighter_languages_refractor_perl",24378:"lib-lemon-ui-UploadedLogo-UploadedLogo-stories",24792:"lib-components-PropertyFilters-components-OperatorValueSelect-stories",25056:"react-syntax-highlighter_languages_refractor_ichigojam",25300:"react-syntax-highlighter_languages_refractor_smali",25508:"react-syntax-highlighter_languages_refractor_julia",25733:"lib-components-Subscriptions-SubscriptionsModal-stories",25755:"react-syntax-highlighter_languages_refractor_robotframework",26084:"react-syntax-highlighter_languages_refractor_ada",26174:"react-syntax-highlighter_languages_refractor_falselang",26657:"scenes-saved-insights-SavedInsights-stories",26963:"react-syntax-highlighter_languages_refractor_regex",27097:"react-syntax-highlighter_languages_refractor_textile",27504:"react-syntax-highlighter_languages_refractor_basic",27561:"react-syntax-highlighter_languages_refractor_jsonp",27801:"react-syntax-highlighter_languages_refractor_io",27838:"react-syntax-highlighter_languages_refractor_elm",28089:"lib-lemon-ui-Popover-Popover-stories",28308:"lib-lemon-ui-LemonBadge-LemonBadge-stories",28347:"react-syntax-highlighter_languages_refractor_qsharp",28462:"lib-lemon-ui-icons-icons-stories",28504:"react-syntax-highlighter_languages_refractor_sqf",29179:"scenes-cohorts-CohortFilters-CohortTextField-stories",29292:"react-syntax-highlighter_languages_refractor_hcl",29426:"react-syntax-highlighter_languages_refractor_hoon",29456:"lib-lemon-ui-LemonMarkdown-LemonMarkdown-stories",29788:"react-syntax-highlighter_languages_refractor_hlsl",30224:"react-syntax-highlighter_languages_refractor_nand2tetrisHdl",30348:"react-syntax-highlighter_languages_refractor_dataweave",30444:"lib-components-CompactList-CompactList-stories",30545:"react-syntax-highlighter_languages_refractor_sml",31130:"react-syntax-highlighter_languages_refractor_crystal",31340:"scenes-cohorts-CohortFilters-CohortCriteriaRowBuilder-stories",32146:"lib-components-NotFound-NotFound-stories",32375:"scenes-billing-Billing-stories",32728:"stories-Lemon-UI-stories-mdx",33196:"react-syntax-highlighter_languages_refractor_pascaligo",33214:"lib-lemon-ui-LemonCalendar-LemonCalendar-stories",33971:"react-syntax-highlighter_languages_refractor_pascal",34377:"scenes-session-recordings-SessionsRecordings-player-failure-stories",34659:"react-syntax-highlighter_languages_refractor_zig",35008:"react-syntax-highlighter_languages_refractor_css",35014:"react-syntax-highlighter_languages_refractor_n4js",35539:"react-syntax-highlighter_languages_refractor_brainfuck",35951:"react-syntax-highlighter_languages_refractor_less",36051:"react-syntax-highlighter_languages_refractor_gherkin",36125:"layout-navigation-3000-Navigation-stories",36247:"react-syntax-highlighter_languages_refractor_diff",36495:"react-syntax-highlighter_languages_refractor_ini",36501:"scenes-onboarding-Onboarding-stories",36795:"scenes-cohorts-CohortFilters-CohortSelectorField-stories",37253:"react-syntax-highlighter_languages_refractor_nasm",37576:"react-syntax-highlighter_languages_refractor_makefile",37619:"react-syntax-highlighter_languages_refractor_kusto",38383:"scenes-session-recordings-SessionsRecordings-player-success-stories",38396:"scenes-PreflightCheck-PreflightCheck-stories",38486:"react-syntax-highlighter_languages_refractor_birb",38597:"lib-lemon-ui-LemonCheckbox-LemonCheckbox-stories",38639:"scenes-insights-views-Funnels-FunnelPropertyCorrelationTable-stories",38825:"react-syntax-highlighter_languages_refractor_jsdoc",38827:"react-syntax-highlighter_languages_refractor_twig",39127:"lib-components-PropertiesTimeline-PropertiesTimeline-stories",39298:"layout-navigation-3000-components-KeyboardShortcut-stories",39513:"lib-lemon-ui-LemonDialog-LemonDialog-stories",39742:"react-syntax-highlighter_languages_refractor_flow",39979:"react-syntax-highlighter_languages_refractor_parigp",40206:"react-syntax-highlighter_languages_refractor_wasm",40722:"lib-components-Sharing-SharingModal-stories",40768:"react-syntax-highlighter_languages_refractor_solutionFile",40892:"stories-Missing-scenes-stories-mdx",40902:"react-syntax-highlighter_languages_refractor_javadoclike",40961:"scenes-insights-InsightTooltip-InsightTooltip-stories",40982:"react-syntax-highlighter_languages_refractor_xquery",41019:"react-syntax-highlighter_languages_refractor_jsstacktrace",41323:"react-syntax-highlighter_languages_refractor_liquid",41362:"react-syntax-highlighter_languages_refractor_warpscript",41694:"scenes-authentication-InviteSignup-stories",41751:"react-syntax-highlighter_languages_refractor_q",42153:"react-syntax-highlighter_languages_refractor_latte",42182:"react-syntax-highlighter_languages_refractor_eiffel",42883:"react-syntax-highlighter_languages_refractor_agda",43342:"stories-Missing-components-stories-mdx",43717:"react-syntax-highlighter_languages_refractor_d",43819:"react-syntax-highlighter_languages_refractor_keyman",43847:"layout-navigation-3000-components-Sidebar-stories",43971:"react-syntax-highlighter_languages_refractor_actionscript",44052:"react-syntax-highlighter_languages_refractor_nginx",44214:"queries-nodes-DataTable-DataTable-stories",44424:"react-syntax-highlighter_languages_refractor_factor",45021:"toolbar-Toolbar-stories",45508:"react-syntax-highlighter_languages_refractor_mermaid",45611:"react-syntax-highlighter_languages_refractor_gml",46460:"lib-components-HedgehogBuddy-HedgehogBuddy-stories",46925:"scenes-authentication-PasswordResetComplete-stories",47124:"lib-components-TaxonomicFilter-TaxonomicFilter-stories",47393:"react-syntax-highlighter_languages_refractor_yang",47719:"react-syntax-highlighter_languages_refractor_lolcode",47858:"scenes-dashboard-DashboardTemplateEditor-stories",47976:"react-syntax-highlighter_languages_refractor_shellSession",48333:"react-syntax-highlighter_languages_refractor_autoit",48379:"lib-lemon-ui-ProfilePicture-ProfileBubbles-stories",48389:"react-syntax-highlighter_languages_refractor_ftl",48419:"queries-nodes-InsightViz-PropertyGroupFilters-AndOrFilterSelect-stories",48440:"react-syntax-highlighter_languages_refractor_maxscript",48619:"react-syntax-highlighter_languages_refractor_javastacktrace",48752:"react-syntax-highlighter_languages_refractor_dot",48780:"scenes-dashboard-DashboardInsightCardLegend-stories",48811:"react-syntax-highlighter_languages_refractor_reason",48947:"react-syntax-highlighter_languages_refractor_javadoc",49136:"scenes-funnels-FunnelTooltip-stories",49315:"react-syntax-highlighter_languages_refractor_pure",49770:"react-syntax-highlighter_languages_refractor_processing",50026:"react-syntax-highlighter_languages_refractor_cil",50081:"react-syntax-highlighter_languages_refractor_properties",50339:"lib-lemon-ui-LemonCollapse-LemonCollapse-stories",50869:"react-syntax-highlighter_languages_refractor_rego",50962:"lib-lemon-ui-LemonToast-LemonToast-stories",50980:"react-syntax-highlighter_languages_refractor_firestoreSecurityRules",50991:"scenes-insights-views-InsightsTable-InsightsTable-stories",51554:"lib-lemon-ui-LemonSlider-LemonSlider-stories",52051:"react-syntax-highlighter_languages_refractor_docker",52087:"react-syntax-highlighter_languages_refractor_concurnas",52375:"lib-lemon-ui-LemonProgress-LemonProgress-stories",52425:"scenes-project-homepage-WatchNextList-stories",52789:"react-syntax-highlighter_languages_refractor_chaiscript",52996:"react-syntax-highlighter_languages_refractor_inform7",53152:"react-syntax-highlighter_languages_refractor_goModule",53318:"react-syntax-highlighter_languages_refractor_csharp",53444:"react-syntax-highlighter_languages_refractor_tt2",53617:"lib-lemon-ui-LemonFileInput-LemonFileInput-stories",54069:"react-syntax-highlighter_languages_refractor_mizar",54306:"react-syntax-highlighter_languages_refractor_solidity",54576:"react-syntax-highlighter_languages_refractor_ignore",55394:"lib-lemon-ui-LemonInput-LemonInput-stories",55409:"lib-lemon-ui-LemonBanner-LemonBanner-stories",56428:"lib-lemon-ui-LemonSkeleton-LemonSkeleton-stories",56487:"react-syntax-highlighter_languages_refractor_haml",56749:"react-syntax-highlighter_languages_refractor_hpkp",56975:"react-syntax-highlighter_languages_refractor_tap",57041:"react-syntax-highlighter_languages_refractor_apex",57176:"react-syntax-highlighter_languages_refractor_ejs",57195:"scenes-early-access-features-EarlyAccessFeatures-stories",57297:"lib-lemon-ui-colors-stories",57354:"lib-lemon-ui-LemonSelect-LemonSelect-stories",57475:"react-syntax-highlighter_languages_refractor_cssExtras",57578:"layout-FeaturePreviews-FeaturePreviews-stories",57996:"react-syntax-highlighter_languages_refractor_neon",58030:"react-syntax-highlighter_languages_refractor_aspnet",58168:"lib-lemon-ui-LemonDivider-LemonDivider-stories",58244:"react-syntax-highlighter_languages_refractor_turtle",58404:"react-syntax-highlighter_languages_refractor_matlab",58513:"react-syntax-highlighter_languages_refractor_monkey",59001:"scenes-web-analytics-SessionAttributionExplorer-sessionAttributionExplorer-stories",59545:"lib-components-HTMLElementsDisplay-HTMLElementsDisplay-stories",59692:"react-syntax-highlighter_languages_refractor_cpp",59931:"lib-components-PropertyFilters-components-PropertyFilterButton-stories",60048:"react-syntax-highlighter_languages_refractor_peoplecode",60171:"react-syntax-highlighter_languages_refractor_v",60255:"react-syntax-highlighter_languages_refractor_typoscript",60470:"react-syntax-highlighter_languages_refractor_bicep",60518:"lib-lemon-ui-LemonLabel-LemonLabel-stories",60665:"lib-components-PropertyKeyInfo-stories",60672:"react-syntax-highlighter_languages_refractor_parser",60711:"scenes-authentication-Login-stories",61007:"react-syntax-highlighter_languages_refractor_haskell",61201:"react-syntax-highlighter_languages_refractor_excelFormula",61387:"react-syntax-highlighter_languages_refractor_avisynth",61598:"react-syntax-highlighter_languages_refractor_brightscript",61768:"react-syntax-highlighter_languages_refractor_rip",62348:"react-syntax-highlighter_languages_refractor_rest",63361:"react-syntax-highlighter_languages_refractor_asmatmel",63833:"lib-components-hedgehogs-stories",64014:"lib-lemon-ui-LemonSnack-LemonSnack-stories",64098:"react-syntax-highlighter_languages_refractor_applescript",64698:"react-syntax-highlighter_languages_refractor_livescript",65085:"react-syntax-highlighter_languages_refractor_scheme",65259:"react-syntax-highlighter_languages_refractor_groovy",65524:"react-syntax-highlighter_languages_refractor_apacheconf",66118:"react-syntax-highlighter_languages_refractor_coffeescript",66558:"react-syntax-highlighter_languages_refractor_visualBasic",66646:"lib-lemon-ui-LemonModal-LemonModal-stories",67197:"layout-navigation-3000-sidepanel-SidePanel-stories",67417:"react-syntax-highlighter_languages_refractor_tremor",68097:"lib-components-PathCleanFilters-PathCleanFilters-stories",68126:"react-syntax-highlighter_languages_refractor_etlua",68142:"react-syntax-highlighter_languages_refractor_antlr4",68202:"react-syntax-highlighter_languages_refractor_dax",68330:"scenes-persons-management-PersonsManagementScene-stories",68712:"react-syntax-highlighter_languages_refractor_openqasm",68987:"lib-components-TZLabel-TZLabel-stories",69106:"lib-lemon-ui-Link-Link-stories",69242:"react-syntax-highlighter_languages_refractor_cobol",69256:"react-syntax-highlighter_languages_refractor_coq",69269:"scenes-session-recordings-player-inspector-components-ItemEvent-stories",69700:"scenes-settings-organization-VerifiedDomains-SSOSelect-stories",69887:"react-syntax-highlighter_languages_refractor_sparql",70138:"scenes-session-recordings-SessionsRecordings-playlist-listing-stories",70156:"react-syntax-highlighter_languages_refractor_t4Cs",70902:"react-syntax-highlighter_languages_refractor_jsTemplates",70904:"scenes-session-recordings-player-inspector-components-ItemComment-stories",71059:"queries-nodes-DataNode-DataNode-stories",71251:"scenes-settings-environment-SlackIntegration-stories",71423:"react-syntax-highlighter_languages_refractor_soy",71627:"react-syntax-highlighter_languages_refractor_kumir",71831:"lib-components-Cards-InsightCard-InsightDetails-stories",72013:"react-syntax-highlighter_languages_refractor_xmlDoc",72134:"scenes-settings-organization-Invites-stories",72281:"lib-lemon-ui-LemonCalendar-LemonCalendarSelect-stories",72526:"react-syntax-highlighter_languages_refractor_csv",72726:"react-syntax-highlighter_languages_refractor_pcaxis",72822:"react-syntax-highlighter_languages_refractor_smalltalk",72943:"react-syntax-highlighter_languages_refractor_uri",73086:"scenes-max-Max-stories",73224:"react-syntax-highlighter_languages_refractor_haxe",73570:"stories-How-to-build-a-scene-stories-mdx",73949:"lib-components-Errors-ErrorDisplay-stories",74710:"scenes-session-recordings-playlist-SessionRecordingPreview-stories",74730:"react-syntax-highlighter_languages_refractor_purescript",74884:"react-syntax-highlighter_languages_refractor_phpdoc",74973:"lib-lemon-ui-Lettermark-Lettermark-stories",75110:"lib-components-CommandBar-CommandBar-stories",75165:"react-syntax-highlighter_languages_refractor_tcl",77250:"react-syntax-highlighter_languages_refractor_bbcode",77309:"lib-lemon-ui-icons-icons3000-stories",77966:"react-syntax-highlighter_languages_refractor_clojure",78095:"lib-components-EmptyMessage-EmptyMessage-stories",78334:"lib-lemon-ui-LemonSegmentedButton-LemonSegmentedButton-stories",78817:"react-syntax-highlighter_languages_refractor_toml",78992:"react-syntax-highlighter_languages_refractor_ocaml",79073:"react-syntax-highlighter_languages_refractor_abnf",79291:"react-syntax-highlighter_languages_refractor_renpy",79799:"scenes-cohorts-CohortFilters-CohortPersonPropertiesValuesField-stories",79960:"stories-How-to-mock-requests-stories-mdx",80158:"react-syntax-highlighter_languages_refractor_glsl",80180:"react-syntax-highlighter_languages_refractor_gap",80844:"lib-lemon-ui-LemonSwitch-LemonSwitch-stories",81151:"react-syntax-highlighter_languages_refractor_editorconfig",81554:"react-syntax-highlighter_languages_refractor_asciidoc",81809:"lib-lemon-ui-LemonTag-LemonTag-stories",81929:"react-syntax-highlighter_languages_refractor_vim",81952:"react-syntax-highlighter_languages_refractor_mongodb",81975:"react-syntax-highlighter_languages_refractor_naniscript",82079:"react-syntax-highlighter_languages_refractor_cshtml",82250:"scenes-data-management-DataManagementScene-stories",82564:"react-syntax-highlighter_languages_refractor_git",82584:"react-syntax-highlighter_languages_refractor_erb",82723:"scenes-project-homepage-ProjectHomepage-stories",82821:"lib-lemon-ui-LemonTabs-LemonTabs-stories",83821:"react-syntax-highlighter_languages_refractor_nix",83914:"react-syntax-highlighter_languages_refractor_llvm",84213:"react-syntax-highlighter_languages_refractor_racket",84851:"scenes-dashboard-Dashboards-stories",85205:"lib-components-PropertyFilters-PropertyFilters-stories",85299:"react-syntax-highlighter_languages_refractor_csp",85566:"lib-components-Animation-Animation-stories",85696:"react-syntax-highlighter_languages_refractor_asm6502",85896:"react-syntax-highlighter_languages_refractor_vbnet",85903:"lib-lemon-ui-LemonCalendarRange-LemonCalendarRangeInline-stories",86574:"react-syntax-highlighter_languages_refractor_xeora",86721:"scenes-heatmaps-HeatmapsBrowser-stories",86861:"react-syntax-highlighter_languages_refractor_puppet",86910:"lib-lemon-ui-LemonCalendarRange-LemonCalendarRange-stories",86983:"scenes-feature-flags-FeatureFlagCodeInstructions-stories",87111:"lib-components-ProductIntroduction-ProductIntroduction-stories",87121:"scenes-annotations-Annotations-stories",87286:"react-syntax-highlighter_languages_refractor_scss",87332:"react-syntax-highlighter_languages_refractor_wren",87515:"react-syntax-highlighter_languages_refractor_magma",87658:"react-syntax-highlighter_languages_refractor_oz",87882:"react-syntax-highlighter_languages_refractor_r",88e3:"react-syntax-highlighter_languages_refractor_opencl",88082:"lib-components-ObjectTags-ObjectTags-stories",88119:"react-syntax-highlighter_languages_refractor_lua",89245:"exporter-Exporter-stories",89311:"react-syntax-highlighter_languages_refractor_powerquery",89461:"react-syntax-highlighter_languages_refractor_typescript",89582:"react-syntax-highlighter_languages_refractor_n1ql",89674:"react-syntax-highlighter_languages_refractor_gcode",89716:"layout-ErrorProjectUnavailable-stories",90001:"lib-lemon-ui-LemonButton-LemonButton-stories",90346:"lib-components-CodeSnippet-CodeSnippet-stories",90560:"react-syntax-highlighter_languages_refractor_unrealscript",90849:"react-syntax-highlighter_languages_refractor_smarty",90919:"react-syntax-highlighter_languages_refractor_cmake",91175:"lib-components-Map-Map-stories",91253:"react-syntax-highlighter_languages_refractor_wiki",91480:"scenes-error-tracking-ErrorTracking-stories",91736:"scenes-cohorts-CohortFilters-CohortNumberField-stories",92016:"react-syntax-highlighter_languages_refractor_splunkSpl",92029:"stories-How-to-build-a-form-stories-mdx",92168:"lib-lemon-ui-Spinner-Spinner-stories",92176:"lib-components-PropertySelect-PropertySelect-stories",92221:"react-syntax-highlighter_languages_refractor_qml",92223:"lib-components-ActivityLog-SentenceList-stories",92412:"scenes-actions-Action-stories",92509:"react-syntax-highlighter_languages_refractor_tsx",92816:"react-syntax-highlighter_languages_refractor_jsExtras",92980:"react-syntax-highlighter_languages_refractor_velocity",92991:"scenes-pipeline-Pipeline-stories",93025:"react-syntax-highlighter_languages_refractor_nim",93070:"scenes-notebooks-NotebookSelectButton-NotebookSelectButton-stories",93116:"react-syntax-highlighter_languages_refractor_xojo",93279:"react-syntax-highlighter_languages_refractor_t4Templating",93384:"react-syntax-highlighter_languages_refractor_arduino",93520:"react-syntax-highlighter_languages_refractor_lisp",94393:"react-syntax-highlighter_languages_refractor_dhall",94678:"scenes-settings-SettingsScene-stories",94831:"lib-components-ActivityLog-ActivityLog-stories",95082:"react-syntax-highlighter/refractor-core-import",95105:"react-syntax-highlighter_languages_refractor_dnsZoneFile",95844:"lib-lemon-ui-LemonMenu-LemonMenu-stories",95858:"lib-components-UniversalFilters-UniversalFilters-stories",95866:"scenes-trends-persons-modal-PersonsModal-stories",95867:"react-syntax-highlighter_languages_refractor_gedcom",96062:"lib-components-EventSelect-EventSelect-stories",96179:"react-syntax-highlighter_languages_refractor_log",97562:"scenes-cohorts-CohortFilters-CohortTaxonomicField-stories",97899:"react-syntax-highlighter_languages_refractor_django",98065:"scenes-session-recordings-player-inspector-components-NavigationItem-stories",98067:"react-syntax-highlighter_languages_refractor_sas",98458:"react-syntax-highlighter_languages_refractor_jolie",98614:"react-syntax-highlighter_languages_refractor_ebnf",99387:"lib-components-PropertyIcon-stories",99835:"react-syntax-highlighter_languages_refractor_markdown",99851:"react-syntax-highlighter_languages_refractor_pug"})[chunkId]||chunkId)+"."+({68:"4fb305cb",131:"47944158",162:"65ae3216",271:"f8cfb898",282:"c3a49b90",589:"2f71575c",596:"4c7f66f7",739:"6622c1eb",741:"db3ca5f6",948:"318d9dc1",986:"f0da054f",1020:"1bbd378d",1094:"d2d83ba6",1157:"bf3a98e9",1621:"fa3fd9ee",1808:"512ee215",2013:"cfd9f165",2065:"da154f47",2313:"a3c37fd1",2335:"e5546f46",2413:"1a24671a",2543:"90f4d641",2556:"f8f31a3f",2635:"cb65b8fa",2677:"4e5ef211",3143:"a0df7f7c",3422:"8e683ab8",3933:"94f62c4c",4042:"89f17b2e",4372:"8183a36f",4701:"5b74ac40",4732:"1ce6100f",5180:"79435cea",5793:"0475f6c8",5797:"65f69fd4",5905:"b848d4f2",6319:"2d9b4aff",6396:"9df47158",6541:"858bd952",6731:"3a6e612b",6813:"81606d32",6875:"0070f205",7215:"72604dc0",7300:"003417b5",7422:"f260c8d5",8056:"836ff92f",8680:"82845775",8702:"6c389a86",8771:"a9fe478b",8819:"1f207cd3",8966:"be0dc53d",9009:"eadcee49",9111:"c117fda9",9416:"364d1542",9551:"9d3f13a2",9785:"1377fe98",10034:"259c3501",10057:"f61cf813",10099:"dd08086e",10223:"d2279cde",10342:"d26ab5dc",10400:"99450400",10749:"6501478b",11438:"194250e4",11854:"9a8848a4",11923:"60900d50",12355:"98abefa9",12374:"564e4fd0",12398:"e6382413",12434:"385a515a",12547:"2dbe6991",12567:"84701498",12912:"9fa92862",12951:"19dbb611",13077:"25ed9c02",13140:"7342499d",13236:"7def8be7",13442:"b8195a4d",13474:"1109ad37",13502:"ca981889",13508:"fcf7ff27",13694:"8c53a446",14045:"eb5f7760",14047:"0da7c08b",14052:"aa9878f8",14527:"82a6ddd9",14606:"e175e1c7",14879:"db9836f3",14929:"a1b9bed3",14989:"848fd3d3",15545:"b6350c8b",15733:"078a325e",15773:"93c70359",15778:"a91f45a5",16023:"38e5ce4d",16115:"4b8f3282",16116:"9410b29f",16495:"c29ad166",16498:"3059d985",16670:"91215cb9",16680:"335bcbb2",16801:"cbed375b",16818:"71d8eae9",17066:"cf666454",17170:"466910c4",17549:"f75a90da",17723:"57772a79",17842:"61eac86f",18146:"6b61dda4",18373:"32eb10b3",18497:"d4272d35",18587:"9a8f8137",18610:"6c0cb3b0",18692:"00ed41de",18921:"2e32b65b",19170:"9cc5e304",19431:"612ae16e",19502:"f9baedc5",19603:"205c6302",19651:"7bb236ff",19745:"e726abe2",19797:"82299855",19801:"6defc8f3",20226:"3c1dd762",20305:"7d298dc3",20527:"9240bc45",20704:"61eef0fc",20720:"f7e4bbd3",20781:"4e527459",20979:"6c7a55b5",21001:"bdd8cb29",21167:"2bd4c222",21226:"2aeb186a",21443:"736e7245",21599:"a1f12e79",21955:"53167672",22044:"0e3c4b2c",22180:"889c8784",22244:"97e29538",22553:"b960caf6",22682:"dc4b267a",23046:"31373625",23162:"44995db2",23237:"16be3517",23384:"fb3b9f74",23398:"3a44ddb9",23407:"c0e67d07",23412:"f9a54383",23708:"cad704d9",23818:"56269fe6",23846:"6bf6d1bd",24157:"ba38a09c",24224:"4375caed",24231:"316534ad",24378:"bda4aff2",24792:"71bfa82e",24985:"1b0eff3e",25039:"b260a5b3",25056:"e0643efe",25175:"5780ab46",25300:"bf5c8ca4",25508:"06f8bc29",25733:"3d277a90",25755:"1886d7d3",26084:"bec5cc65",26174:"5420fec9",26299:"765a3577",26486:"0049fb51",26657:"edc84e91",26963:"0518b1da",27097:"76c51370",27292:"5c6c49e7",27488:"654f32c8",27504:"8289b4d7",27561:"ecb71df1",27801:"3a7fb611",27838:"fac30abd",28089:"b4258d12",28308:"3a5bf6f1",28347:"b2c986b2",28371:"2fd12f20",28462:"188013a6",28504:"23c31fc5",29179:"ad52f792",29292:"1208fda7",29426:"965dea35",29456:"2b88a73d",29668:"e6d4edee",29749:"143e905a",29788:"5d87a67e",30224:"e0daddfa",30348:"f68941e0",30444:"dc4f9e15",30545:"85afe0ce",30885:"8d6c29f6",31130:"efbe5689",31340:"a9d5d243",31667:"b3b0b822",32146:"5563fead",32375:"800c3bc9",32728:"fbd4a8b8",33196:"d9195453",33214:"17b3bf93",33502:"92521f77",33876:"50929a81",33971:"1f895d43",34377:"729f0107",34551:"5cb995ae",34657:"01445654",34659:"fe6a659f",34679:"7de9c201",35008:"ea930b0d",35014:"4205fd3a",35305:"655d9761",35538:"62db05dc",35539:"4f9a86af",35683:"052f64ba",35951:"0c8291c0",36051:"39bad482",36125:"d1efd340",36247:"9cde5008",36426:"942c24e6",36495:"90e821fe",36501:"9c267c9e",36795:"8786436f",37253:"d53818ec",37576:"a1bd2008",37619:"c40bf8fc",38014:"254e3ba4",38383:"917499f7",38396:"a8a8127b",38486:"fba8dab2",38597:"8b7d9d91",38639:"1d83c686",38717:"78d488d6",38825:"7ec3dde2",38827:"6efb1910",38895:"c8dd67da",39127:"ea3a66e4",39134:"4b19fe39",39298:"7b36ab41",39453:"1841c4d2",39513:"0f1a7570",39742:"ef46842d",39979:"f7a02223",40206:"54e3d9c6",40722:"e11d5a09",40768:"fd37dcab",40892:"3c952d2d",40902:"49e6729f",40961:"0d6283ca",40982:"1ff4c969",41019:"003d46b6",41031:"2d7c5e93",41323:"dd808180",41362:"d0b7e409",41694:"20fa1f3e",41751:"6d4f9578",41891:"4d9f8443",42153:"0bd3b53f",42182:"0428e0b2",42883:"b536b146",43342:"d3ffa004",43496:"87b1d1d6",43717:"336360ef",43819:"67bc1280",43847:"047f3a56",43971:"d3d8707b",44052:"795ecae7",44214:"7564de50",44424:"6fbfa899",45021:"32d6168c",45412:"ca294221",45419:"5979f7cd",45508:"26c202b8",45611:"c6e73095",46460:"712c7f08",46925:"e6bf9a79",47124:"05d7d57b",47393:"fe628d3c",47719:"d5ff64bb",47858:"179a8252",47976:"a80d122a",47988:"0f047ca0",48083:"1ca9709c",48333:"4b677185",48379:"472bbc7f",48389:"b0c273a1",48419:"eefec25b",48440:"e9fc388a",48619:"f3ff3cdf",48752:"9b3fe12f",48780:"c78508ce",48811:"02d6122b",48947:"76c58d6d",49136:"1d36c3c9",49284:"d9db701c",49315:"094fb866",49770:"8b3f0ab8",49793:"41967f69",50026:"508464ce",50081:"5af9239d",50297:"266b7721",50339:"a350a2ed",50548:"5b7839d0",50769:"1b6ed738",50869:"c8f5a13f",50962:"576943f5",50980:"d9570570",50991:"95ddb4d0",51008:"0f4ef861",51554:"3e1ecd46",51802:"a8548262",52051:"9cf85691",52087:"8cfed415",52375:"07979ac4",52425:"77f5eadf",52789:"1730f56e",52996:"9109f712",53152:"98e51afa",53318:"2e498266",53342:"8a517283",53444:"e6ed3726",53543:"6bc56f6c",53617:"bf583f45",53983:"608b03d7",54069:"9fdfaf29",54306:"280ba302",54346:"8d353ae5",54576:"5efab341",54584:"869effb2",55394:"a498c1e1",55409:"32a66744",56246:"ff054af1",56428:"e2414846",56487:"9fe5b058",56626:"61942594",56749:"5a3e3a20",56818:"b8cbecbf",56975:"96874676",57041:"0572e569",57105:"4dfcbdd6",57176:"fc54468a",57195:"e9986cc8",57297:"30e2e003",57354:"6e37af68",57475:"fba481f0",57578:"a36596be",57996:"ebf5e071",58030:"30535c0a",58168:"e001a755",58244:"2dfcd120",58404:"3e91c384",58453:"79d6cb29",58513:"96053c34",58633:"f2392cf6",58934:"c8bf6921",59001:"dd8d754d",59189:"448a9290",59545:"4531ae8e",59692:"55fab260",59931:"f96a5789",60048:"f31d9db1",60145:"47d210c5",60171:"e387f7a7",60255:"9568b03f",60265:"20ca10e6",60470:"560c8be0",60518:"03781f30",60552:"4908a7bf",60580:"4a31fe83",60665:"aa7238cf",60672:"2335adb2",60711:"6e43b2d7",61007:"ae16d1ae",61121:"e97f86e6",61201:"ad70f82b",61387:"eccf0551",61405:"5051922f",61406:"cb753f14",61473:"286a0890",61598:"0d851da3",61768:"246e832d",62053:"28dfb3e7",62250:"13c023fe",62348:"a7b8eb6f",62983:"f88d0c4d",63361:"7312d08d",63833:"44cec7f3",64014:"309e59ae",64098:"612a7ebf",64353:"02bb0fea",64632:"99c0b78f",64698:"11f71c9f",64900:"acbe486d",65085:"ef08f212",65137:"8b33e129",65259:"57260fcb",65524:"e5b5940c",65982:"d645cbc0",66118:"ba16205e",66558:"d6fee03f",66646:"a2ed0e19",67197:"da30d68a",67417:"fd67b111",67474:"2da4e33f",67691:"b96bc883",68097:"8783a788",68126:"af24939d",68142:"989444d6",68202:"de40667c",68330:"1f1370ce",68712:"76832fd4",68987:"faf37f8c",69106:"846af8e0",69242:"0cd705be",69256:"f50b6470",69269:"5f194fa6",69700:"101fcadf",69887:"9b190ce7",70129:"0f27c3c0",70138:"c61b97aa",70156:"e84e3c25",70163:"02c33a10",70775:"2091478a",70902:"60e688e2",70904:"82bbe802",71059:"e1cf42e2",71066:"b85b11c7",71073:"183d9eca",71251:"78ff5e84",71423:"b61964ff",71569:"79bce9e2",71627:"afc67f45",71831:"1b990fca",72013:"46be72ae",72134:"8df90f05",72154:"43a527a0",72281:"84a71a45",72526:"d8a10c2a",72726:"b1f03c8c",72822:"b75983ea",72943:"f2f32ebb",73086:"34d22054",73221:"f6e3acd3",73224:"1be3fbb9",73570:"175248c9",73949:"8df55c84",74381:"50edad17",74653:"e245769d",74710:"8a5f3f78",74730:"07556e64",74884:"46263abc",74973:"7d9c3cd7",75097:"4ef354b3",75110:"93c6d12b",75165:"6675bab2",75576:"21d54edf",75643:"677d8593",76282:"4cac83d5",76368:"d77bf4cc",76410:"7a9ccd65",76668:"42bebbde",77192:"8cc2f6dd",77250:"4a8ccb73",77309:"2e199781",77966:"26766b99",78095:"9e8a4178",78170:"8746df8c",78334:"2d043258",78663:"833df5ac",78787:"7b6548dd",78817:"51022e3b",78992:"d780939c",79073:"7450e8a6",79166:"b821cf76",79291:"4b44a364",79617:"6a4883b4",79799:"8a09eeba",79960:"94e0488e",80158:"788b04d5",80180:"3359efce",80801:"c885762b",80844:"581de287",81151:"de4975c3",81160:"07717213",81469:"d207651a",81554:"b99a35c1",81809:"c40099b5",81896:"b9fa01a6",81929:"19880572",81952:"84436fe9",81975:"5454c6fb",82079:"32305f94",82250:"7eda27ad",82429:"5d9ed034",82541:"811857f7",82564:"dff9edc1",82584:"835bd275",82723:"cc4ebf6c",82821:"aaaeb372",83082:"71dad355",83821:"d5e3615c",83872:"9adeff01",83914:"89351b73",84213:"6b369cab",84851:"bed9891f",85205:"359ed243",85299:"cf3b9124",85564:"d3e32c22",85566:"e17ad588",85696:"8bcfd36a",85896:"ccc62f06",85903:"2258b5f3",86238:"0f79045d",86574:"3bf6ee9a",86721:"6164e49f",86861:"1f4b0845",86910:"43fca7e2",86983:"ceb085dd",87057:"f4614312",87111:"89731b7e",87121:"59d316d3",87286:"5271febe",87332:"c107ea54",87515:"b9d2c852",87519:"a35da02c",87658:"ef903485",87882:"0358cdd6",88e3:"93f4070e",88069:"b9595925",88082:"93136f7b",88119:"ab0b7bd6",88236:"6950d315",88754:"38323ae1",89046:"437ca8fd",89053:"599bd96a",89194:"76d7aad6",89245:"d6f1465b",89290:"1f3f52b0",89311:"c93ace3d",89448:"a4a4de7e",89461:"77d5a245",89571:"0d2cc580",89579:"a5a09a65",89582:"a89ea56d",89674:"4957bd54",89716:"082e3eba",89949:"fb6a5124",90001:"feb141ab",90346:"d191c892",90560:"9b017839",90843:"60060ba2",90849:"b178121c",90853:"4677a2f1",90891:"c64e6f9b",90919:"ab75b7b2",91175:"6b20ec19",91253:"7f957060",91302:"f93f9e65",91480:"bd9c81f6",91736:"fc826873",92016:"0d2b36e1",92029:"aca1274b",92168:"f37e7286",92176:"dfbdba23",92221:"b1e9201d",92223:"6d825419",92412:"238e97c2",92437:"c737d6f1",92509:"7cb8c4c6",92816:"0ade4b36",92980:"4dbecf1f",92991:"feae6509",93025:"711497d3",93070:"32121c22",93116:"61e474bd",93279:"993e0c19",93384:"9fc46bd6",93520:"4e6e71ea",93836:"50627a72",94131:"1f05b100",94393:"abccf2d8",94678:"61f79c4a",94831:"8f840985",95082:"0940374c",95105:"aaca4e5b",95844:"f3285b14",95858:"23abd79a",95866:"aef4cd31",95867:"f9c6817a",96062:"849e6779",96179:"fede2a57",96553:"2cda01bc",96866:"11a356f6",97562:"35bd2414",97899:"15860aa9",98065:"2c71a9cc",98067:"0751e122",98095:"6f897eac",98458:"e74373ce",98501:"dd8437d4",98614:"b2e3e34a",98889:"425defd4",99203:"ebad0677",99387:"4d67d9ff",99460:"66119f8c",99534:"1d6f3222",99835:"3df0cc7a",99851:"9a190ba4",99954:"5fd1fc78"})[chunkId]+".iframe.bundle.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="posthog:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={51303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(51303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({68:"react-syntax-highlighter_languages_refractor_moonscript",131:"react-syntax-highlighter_languages_refractor_clike",271:"react-syntax-highlighter_languages_refractor_nevod",282:"react-syntax-highlighter_languages_refractor_bsl",589:"react-syntax-highlighter_languages_refractor_al",739:"scenes-session-recordings-apm-playerInspector-ItemPerformanceEvent-stories",741:"react-syntax-highlighter_languages_refractor_fsharp",948:"react-syntax-highlighter_languages_refractor_bison",986:"lib-components-Hogfetti-Hogfetti-stories",1094:"lib-lemon-ui-LemonCalendar-LemonCalendarSelectInput-stories",1621:"react-syntax-highlighter_languages_refractor_stylus",1808:"scenes-notebooks-Notebook-Notebook-stories",2013:"react-syntax-highlighter_languages_refractor_erlang",2065:"react-syntax-highlighter_languages_refractor_autohotkey",2313:"lib-components-ScrollableShadows-ScrollableShadows-stories",2335:"react-syntax-highlighter_languages_refractor_iecst",2413:"react-syntax-highlighter_languages_refractor_icon",2543:"lib-components-Cards-TextCard-TextCard-stories",2556:"react-syntax-highlighter_languages_refractor_aql",2677:"lib-lemon-ui-LemonRadio-LemonRadio-stories",3422:"react-syntax-highlighter_languages_refractor_purebasic",3933:"react-syntax-highlighter_languages_refractor_avroIdl",4372:"react-syntax-highlighter_languages_refractor_wolfram",4701:"react-syntax-highlighter_languages_refractor_j",4732:"react-syntax-highlighter_languages_refractor_latex",5180:"scenes-insights-views-BoldNumber-Textfit-stories",5793:"react-syntax-highlighter_languages_refractor_phpExtras",5797:"react-syntax-highlighter_languages_refractor_uorazor",5905:"react-syntax-highlighter_languages_refractor_gdscript",6319:"lib-components-EditableField-EditableField-stories",6396:"scenes-insights-filters-ActionFilter-ActionFilter-stories",6731:"react-syntax-highlighter_languages_refractor_squirrel",7422:"lib-lemon-ui-LemonField-LemonField-stories",8056:"stories-How-to-add-tabs-to-a-scene-stories-mdx",8680:"react-syntax-highlighter_languages_refractor_keepalived",8702:"react-syntax-highlighter_languages_refractor_cfscript",8771:"lib-components-VerticalNestedDND-VerticalNestedDND-stories",8819:"react-syntax-highlighter_languages_refractor_verilog",8966:"react-syntax-highlighter_languages_refractor_vala",9009:"react-syntax-highlighter_languages_refractor_gn",9111:"scenes-session-recordings-player-inspector-PlayerInspector-stories",9416:"scenes-authentication-signup-verify-email-VerifyEmail-stories",10057:"lib-components-PropertiesTable-PropertiesTable-stories",10223:"lib-lemon-ui-LemonInputSelect-LemonInputSelect-stories",10342:"react-syntax-highlighter_languages_refractor_powershell",10400:"react-syntax-highlighter_languages_refractor_batch",10749:"scenes-surveys-Surveys-stories",11438:"react-syntax-highlighter_languages_refractor_arff",11854:"scenes-authentication-signup-Signup-stories",11923:"lib-components-Playlist-Playlist-stories",12355:"react-syntax-highlighter_languages_refractor_t4Vb",12374:"react-syntax-highlighter_languages_refractor_cypher",12398:"lib-lemon-ui-LemonTable-LemonTable-stories",12547:"react-syntax-highlighter_languages_refractor_qore",13140:"react-syntax-highlighter_languages_refractor_hsts",13236:"react-syntax-highlighter_languages_refractor_roboconf",13502:"react-syntax-highlighter_languages_refractor_nsis",13694:"react-syntax-highlighter_languages_refractor_bro",14045:"react-syntax-highlighter_languages_refractor_prolog",14047:"scenes-Unsubscribe-Unsubscribe-stories",14052:"react-syntax-highlighter_languages_refractor_plsql",14527:"react-syntax-highlighter_languages_refractor_systemd",14879:"react-syntax-highlighter_languages_refractor_promql",14989:"lib-lemon-ui-Splotch-Splotch-stories",15545:"lib-lemon-ui-LemonBadge-LemonBadgeNumber-stories",15733:"react-syntax-highlighter_languages_refractor_idris",15773:"lib-components-PayGateMini-PayGateMini-stories",15778:"scenes-insights-Insights-stories",16023:"scenes-feature-flags-FeatureFlags-stories",16115:"scenes-session-recordings-player-inspector-components-Timing-NetworkRequestTiming-stories",16116:"scenes-products-Products-stories",16495:"scenes-insights-views-Funnels-FunnelCorrelationTable-stories",16498:"lib-lemon-ui-LemonProgressCircle-LemonProgressCircle-stories",16670:"react-syntax-highlighter_languages_refractor_apl",16680:"scenes-authentication-PasswordReset-stories",16818:"react-syntax-highlighter_languages_refractor_jq",17549:"stories-How-to-create-stories-stories-mdx",17723:"scenes-insights-EmptyStates-EmptyStates-stories",17842:"react-syntax-highlighter_languages_refractor_stan",18373:"lib-components-TaxonomicPopover-TaxonomicPopover-stories",18497:"react-syntax-highlighter_languages_refractor_bnf",18587:"lib-lemon-ui-PaginationControl-PaginationControl-stories",18692:"react-syntax-highlighter_languages_refractor_webIdl",18921:"react-syntax-highlighter_languages_refractor_graphql",19603:"react-syntax-highlighter_languages_refractor_icuMessageFormat",19797:"react-syntax-highlighter_languages_refractor_sass",19801:"lib-lemon-ui-LemonTextArea-LemonTextArea-stories",20226:"react-syntax-highlighter_languages_refractor_mel",20527:"stories-Hello-stories-mdx",20720:"react-syntax-highlighter_languages_refractor_jexl",20781:"react-syntax-highlighter_languages_refractor_lilypond",20979:"react-syntax-highlighter_languages_refractor_protobuf",21001:"react-syntax-highlighter_languages_refractor_rust",21167:"react-syntax-highlighter_languages_refractor_vhdl",21226:"lib-lemon-ui-LemonSegmentedSelect-LemonSegmentedSelect-stories",21599:"react-syntax-highlighter_languages_refractor_psl",22044:"react-syntax-highlighter_languages_refractor_fortran",22180:"react-syntax-highlighter_languages_refractor_json5",22244:"scenes-billing-BillingProduct-stories",23046:"scenes-activity-explore-Events-stories",23384:"stories-How-to-use-components-stories-mdx",23398:"lib-components-HogQLEditor-HogQLEditor-stories",23407:"lib-components-Cards-InsightCard-InsightCard-stories",23412:"react-syntax-highlighter_languages_refractor_abap",23708:"lib-lemon-ui-LemonRow-LemonRow-stories",23818:"react-syntax-highlighter_languages_refractor_scala",23846:"react-syntax-highlighter_languages_refractor_handlebars",24157:"react-syntax-highlighter_languages_refractor_perl",24378:"lib-lemon-ui-UploadedLogo-UploadedLogo-stories",24792:"lib-components-PropertyFilters-components-OperatorValueSelect-stories",25056:"react-syntax-highlighter_languages_refractor_ichigojam",25300:"react-syntax-highlighter_languages_refractor_smali",25508:"react-syntax-highlighter_languages_refractor_julia",25733:"lib-components-Subscriptions-SubscriptionsModal-stories",25755:"react-syntax-highlighter_languages_refractor_robotframework",26084:"react-syntax-highlighter_languages_refractor_ada",26174:"react-syntax-highlighter_languages_refractor_falselang",26657:"scenes-saved-insights-SavedInsights-stories",26963:"react-syntax-highlighter_languages_refractor_regex",27097:"react-syntax-highlighter_languages_refractor_textile",27504:"react-syntax-highlighter_languages_refractor_basic",27561:"react-syntax-highlighter_languages_refractor_jsonp",27801:"react-syntax-highlighter_languages_refractor_io",27838:"react-syntax-highlighter_languages_refractor_elm",28089:"lib-lemon-ui-Popover-Popover-stories",28308:"lib-lemon-ui-LemonBadge-LemonBadge-stories",28347:"react-syntax-highlighter_languages_refractor_qsharp",28462:"lib-lemon-ui-icons-icons-stories",28504:"react-syntax-highlighter_languages_refractor_sqf",29179:"scenes-cohorts-CohortFilters-CohortTextField-stories",29292:"react-syntax-highlighter_languages_refractor_hcl",29426:"react-syntax-highlighter_languages_refractor_hoon",29456:"lib-lemon-ui-LemonMarkdown-LemonMarkdown-stories",29788:"react-syntax-highlighter_languages_refractor_hlsl",30224:"react-syntax-highlighter_languages_refractor_nand2tetrisHdl",30348:"react-syntax-highlighter_languages_refractor_dataweave",30444:"lib-components-CompactList-CompactList-stories",30545:"react-syntax-highlighter_languages_refractor_sml",31130:"react-syntax-highlighter_languages_refractor_crystal",31340:"scenes-cohorts-CohortFilters-CohortCriteriaRowBuilder-stories",32146:"lib-components-NotFound-NotFound-stories",32375:"scenes-billing-Billing-stories",32728:"stories-Lemon-UI-stories-mdx",33196:"react-syntax-highlighter_languages_refractor_pascaligo",33214:"lib-lemon-ui-LemonCalendar-LemonCalendar-stories",33971:"react-syntax-highlighter_languages_refractor_pascal",34377:"scenes-session-recordings-SessionsRecordings-player-failure-stories",34659:"react-syntax-highlighter_languages_refractor_zig",35008:"react-syntax-highlighter_languages_refractor_css",35014:"react-syntax-highlighter_languages_refractor_n4js",35539:"react-syntax-highlighter_languages_refractor_brainfuck",35951:"react-syntax-highlighter_languages_refractor_less",36051:"react-syntax-highlighter_languages_refractor_gherkin",36125:"layout-navigation-3000-Navigation-stories",36247:"react-syntax-highlighter_languages_refractor_diff",36495:"react-syntax-highlighter_languages_refractor_ini",36501:"scenes-onboarding-Onboarding-stories",36795:"scenes-cohorts-CohortFilters-CohortSelectorField-stories",37253:"react-syntax-highlighter_languages_refractor_nasm",37576:"react-syntax-highlighter_languages_refractor_makefile",37619:"react-syntax-highlighter_languages_refractor_kusto",38383:"scenes-session-recordings-SessionsRecordings-player-success-stories",38396:"scenes-PreflightCheck-PreflightCheck-stories",38486:"react-syntax-highlighter_languages_refractor_birb",38597:"lib-lemon-ui-LemonCheckbox-LemonCheckbox-stories",38639:"scenes-insights-views-Funnels-FunnelPropertyCorrelationTable-stories",38825:"react-syntax-highlighter_languages_refractor_jsdoc",38827:"react-syntax-highlighter_languages_refractor_twig",39127:"lib-components-PropertiesTimeline-PropertiesTimeline-stories",39298:"layout-navigation-3000-components-KeyboardShortcut-stories",39513:"lib-lemon-ui-LemonDialog-LemonDialog-stories",39742:"react-syntax-highlighter_languages_refractor_flow",39979:"react-syntax-highlighter_languages_refractor_parigp",40206:"react-syntax-highlighter_languages_refractor_wasm",40722:"lib-components-Sharing-SharingModal-stories",40768:"react-syntax-highlighter_languages_refractor_solutionFile",40892:"stories-Missing-scenes-stories-mdx",40902:"react-syntax-highlighter_languages_refractor_javadoclike",40961:"scenes-insights-InsightTooltip-InsightTooltip-stories",40982:"react-syntax-highlighter_languages_refractor_xquery",41019:"react-syntax-highlighter_languages_refractor_jsstacktrace",41323:"react-syntax-highlighter_languages_refractor_liquid",41362:"react-syntax-highlighter_languages_refractor_warpscript",41694:"scenes-authentication-InviteSignup-stories",41751:"react-syntax-highlighter_languages_refractor_q",42153:"react-syntax-highlighter_languages_refractor_latte",42182:"react-syntax-highlighter_languages_refractor_eiffel",42883:"react-syntax-highlighter_languages_refractor_agda",43342:"stories-Missing-components-stories-mdx",43717:"react-syntax-highlighter_languages_refractor_d",43819:"react-syntax-highlighter_languages_refractor_keyman",43847:"layout-navigation-3000-components-Sidebar-stories",43971:"react-syntax-highlighter_languages_refractor_actionscript",44052:"react-syntax-highlighter_languages_refractor_nginx",44214:"queries-nodes-DataTable-DataTable-stories",44424:"react-syntax-highlighter_languages_refractor_factor",45021:"toolbar-Toolbar-stories",45508:"react-syntax-highlighter_languages_refractor_mermaid",45611:"react-syntax-highlighter_languages_refractor_gml",46460:"lib-components-HedgehogBuddy-HedgehogBuddy-stories",46925:"scenes-authentication-PasswordResetComplete-stories",47124:"lib-components-TaxonomicFilter-TaxonomicFilter-stories",47393:"react-syntax-highlighter_languages_refractor_yang",47719:"react-syntax-highlighter_languages_refractor_lolcode",47858:"scenes-dashboard-DashboardTemplateEditor-stories",47976:"react-syntax-highlighter_languages_refractor_shellSession",48333:"react-syntax-highlighter_languages_refractor_autoit",48379:"lib-lemon-ui-ProfilePicture-ProfileBubbles-stories",48389:"react-syntax-highlighter_languages_refractor_ftl",48419:"queries-nodes-InsightViz-PropertyGroupFilters-AndOrFilterSelect-stories",48440:"react-syntax-highlighter_languages_refractor_maxscript",48619:"react-syntax-highlighter_languages_refractor_javastacktrace",48752:"react-syntax-highlighter_languages_refractor_dot",48780:"scenes-dashboard-DashboardInsightCardLegend-stories",48811:"react-syntax-highlighter_languages_refractor_reason",48947:"react-syntax-highlighter_languages_refractor_javadoc",49136:"scenes-funnels-FunnelTooltip-stories",49315:"react-syntax-highlighter_languages_refractor_pure",49770:"react-syntax-highlighter_languages_refractor_processing",50026:"react-syntax-highlighter_languages_refractor_cil",50081:"react-syntax-highlighter_languages_refractor_properties",50339:"lib-lemon-ui-LemonCollapse-LemonCollapse-stories",50869:"react-syntax-highlighter_languages_refractor_rego",50962:"lib-lemon-ui-LemonToast-LemonToast-stories",50980:"react-syntax-highlighter_languages_refractor_firestoreSecurityRules",50991:"scenes-insights-views-InsightsTable-InsightsTable-stories",51554:"lib-lemon-ui-LemonSlider-LemonSlider-stories",52051:"react-syntax-highlighter_languages_refractor_docker",52087:"react-syntax-highlighter_languages_refractor_concurnas",52375:"lib-lemon-ui-LemonProgress-LemonProgress-stories",52425:"scenes-project-homepage-WatchNextList-stories",52789:"react-syntax-highlighter_languages_refractor_chaiscript",52996:"react-syntax-highlighter_languages_refractor_inform7",53152:"react-syntax-highlighter_languages_refractor_goModule",53318:"react-syntax-highlighter_languages_refractor_csharp",53444:"react-syntax-highlighter_languages_refractor_tt2",53617:"lib-lemon-ui-LemonFileInput-LemonFileInput-stories",54069:"react-syntax-highlighter_languages_refractor_mizar",54306:"react-syntax-highlighter_languages_refractor_solidity",54576:"react-syntax-highlighter_languages_refractor_ignore",55394:"lib-lemon-ui-LemonInput-LemonInput-stories",55409:"lib-lemon-ui-LemonBanner-LemonBanner-stories",56428:"lib-lemon-ui-LemonSkeleton-LemonSkeleton-stories",56487:"react-syntax-highlighter_languages_refractor_haml",56749:"react-syntax-highlighter_languages_refractor_hpkp",56975:"react-syntax-highlighter_languages_refractor_tap",57041:"react-syntax-highlighter_languages_refractor_apex",57176:"react-syntax-highlighter_languages_refractor_ejs",57195:"scenes-early-access-features-EarlyAccessFeatures-stories",57297:"lib-lemon-ui-colors-stories",57354:"lib-lemon-ui-LemonSelect-LemonSelect-stories",57475:"react-syntax-highlighter_languages_refractor_cssExtras",57578:"layout-FeaturePreviews-FeaturePreviews-stories",57996:"react-syntax-highlighter_languages_refractor_neon",58030:"react-syntax-highlighter_languages_refractor_aspnet",58168:"lib-lemon-ui-LemonDivider-LemonDivider-stories",58244:"react-syntax-highlighter_languages_refractor_turtle",58404:"react-syntax-highlighter_languages_refractor_matlab",58513:"react-syntax-highlighter_languages_refractor_monkey",59001:"scenes-web-analytics-SessionAttributionExplorer-sessionAttributionExplorer-stories",59545:"lib-components-HTMLElementsDisplay-HTMLElementsDisplay-stories",59692:"react-syntax-highlighter_languages_refractor_cpp",59931:"lib-components-PropertyFilters-components-PropertyFilterButton-stories",60048:"react-syntax-highlighter_languages_refractor_peoplecode",60171:"react-syntax-highlighter_languages_refractor_v",60255:"react-syntax-highlighter_languages_refractor_typoscript",60470:"react-syntax-highlighter_languages_refractor_bicep",60518:"lib-lemon-ui-LemonLabel-LemonLabel-stories",60665:"lib-components-PropertyKeyInfo-stories",60672:"react-syntax-highlighter_languages_refractor_parser",60711:"scenes-authentication-Login-stories",61007:"react-syntax-highlighter_languages_refractor_haskell",61201:"react-syntax-highlighter_languages_refractor_excelFormula",61387:"react-syntax-highlighter_languages_refractor_avisynth",61598:"react-syntax-highlighter_languages_refractor_brightscript",61768:"react-syntax-highlighter_languages_refractor_rip",62348:"react-syntax-highlighter_languages_refractor_rest",63361:"react-syntax-highlighter_languages_refractor_asmatmel",63833:"lib-components-hedgehogs-stories",64014:"lib-lemon-ui-LemonSnack-LemonSnack-stories",64098:"react-syntax-highlighter_languages_refractor_applescript",64698:"react-syntax-highlighter_languages_refractor_livescript",65085:"react-syntax-highlighter_languages_refractor_scheme",65259:"react-syntax-highlighter_languages_refractor_groovy",65524:"react-syntax-highlighter_languages_refractor_apacheconf",66118:"react-syntax-highlighter_languages_refractor_coffeescript",66558:"react-syntax-highlighter_languages_refractor_visualBasic",66646:"lib-lemon-ui-LemonModal-LemonModal-stories",67197:"layout-navigation-3000-sidepanel-SidePanel-stories",67417:"react-syntax-highlighter_languages_refractor_tremor",68097:"lib-components-PathCleanFilters-PathCleanFilters-stories",68126:"react-syntax-highlighter_languages_refractor_etlua",68142:"react-syntax-highlighter_languages_refractor_antlr4",68202:"react-syntax-highlighter_languages_refractor_dax",68330:"scenes-persons-management-PersonsManagementScene-stories",68712:"react-syntax-highlighter_languages_refractor_openqasm",68987:"lib-components-TZLabel-TZLabel-stories",69106:"lib-lemon-ui-Link-Link-stories",69242:"react-syntax-highlighter_languages_refractor_cobol",69256:"react-syntax-highlighter_languages_refractor_coq",69269:"scenes-session-recordings-player-inspector-components-ItemEvent-stories",69700:"scenes-settings-organization-VerifiedDomains-SSOSelect-stories",69887:"react-syntax-highlighter_languages_refractor_sparql",70138:"scenes-session-recordings-SessionsRecordings-playlist-listing-stories",70156:"react-syntax-highlighter_languages_refractor_t4Cs",70902:"react-syntax-highlighter_languages_refractor_jsTemplates",70904:"scenes-session-recordings-player-inspector-components-ItemComment-stories",71059:"queries-nodes-DataNode-DataNode-stories",71251:"scenes-settings-environment-SlackIntegration-stories",71423:"react-syntax-highlighter_languages_refractor_soy",71627:"react-syntax-highlighter_languages_refractor_kumir",71831:"lib-components-Cards-InsightCard-InsightDetails-stories",72013:"react-syntax-highlighter_languages_refractor_xmlDoc",72134:"scenes-settings-organization-Invites-stories",72281:"lib-lemon-ui-LemonCalendar-LemonCalendarSelect-stories",72526:"react-syntax-highlighter_languages_refractor_csv",72726:"react-syntax-highlighter_languages_refractor_pcaxis",72822:"react-syntax-highlighter_languages_refractor_smalltalk",72943:"react-syntax-highlighter_languages_refractor_uri",73086:"scenes-max-Max-stories",73224:"react-syntax-highlighter_languages_refractor_haxe",73570:"stories-How-to-build-a-scene-stories-mdx",73949:"lib-components-Errors-ErrorDisplay-stories",74710:"scenes-session-recordings-playlist-SessionRecordingPreview-stories",74730:"react-syntax-highlighter_languages_refractor_purescript",74884:"react-syntax-highlighter_languages_refractor_phpdoc",74973:"lib-lemon-ui-Lettermark-Lettermark-stories",75110:"lib-components-CommandBar-CommandBar-stories",75165:"react-syntax-highlighter_languages_refractor_tcl",77250:"react-syntax-highlighter_languages_refractor_bbcode",77309:"lib-lemon-ui-icons-icons3000-stories",77966:"react-syntax-highlighter_languages_refractor_clojure",78095:"lib-components-EmptyMessage-EmptyMessage-stories",78334:"lib-lemon-ui-LemonSegmentedButton-LemonSegmentedButton-stories",78817:"react-syntax-highlighter_languages_refractor_toml",78992:"react-syntax-highlighter_languages_refractor_ocaml",79073:"react-syntax-highlighter_languages_refractor_abnf",79291:"react-syntax-highlighter_languages_refractor_renpy",79799:"scenes-cohorts-CohortFilters-CohortPersonPropertiesValuesField-stories",79960:"stories-How-to-mock-requests-stories-mdx",80158:"react-syntax-highlighter_languages_refractor_glsl",80180:"react-syntax-highlighter_languages_refractor_gap",80844:"lib-lemon-ui-LemonSwitch-LemonSwitch-stories",81151:"react-syntax-highlighter_languages_refractor_editorconfig",81554:"react-syntax-highlighter_languages_refractor_asciidoc",81809:"lib-lemon-ui-LemonTag-LemonTag-stories",81929:"react-syntax-highlighter_languages_refractor_vim",81952:"react-syntax-highlighter_languages_refractor_mongodb",81975:"react-syntax-highlighter_languages_refractor_naniscript",82079:"react-syntax-highlighter_languages_refractor_cshtml",82250:"scenes-data-management-DataManagementScene-stories",82564:"react-syntax-highlighter_languages_refractor_git",82584:"react-syntax-highlighter_languages_refractor_erb",82723:"scenes-project-homepage-ProjectHomepage-stories",82821:"lib-lemon-ui-LemonTabs-LemonTabs-stories",83821:"react-syntax-highlighter_languages_refractor_nix",83914:"react-syntax-highlighter_languages_refractor_llvm",84213:"react-syntax-highlighter_languages_refractor_racket",84851:"scenes-dashboard-Dashboards-stories",85205:"lib-components-PropertyFilters-PropertyFilters-stories",85299:"react-syntax-highlighter_languages_refractor_csp",85566:"lib-components-Animation-Animation-stories",85696:"react-syntax-highlighter_languages_refractor_asm6502",85896:"react-syntax-highlighter_languages_refractor_vbnet",85903:"lib-lemon-ui-LemonCalendarRange-LemonCalendarRangeInline-stories",86574:"react-syntax-highlighter_languages_refractor_xeora",86721:"scenes-heatmaps-HeatmapsBrowser-stories",86861:"react-syntax-highlighter_languages_refractor_puppet",86910:"lib-lemon-ui-LemonCalendarRange-LemonCalendarRange-stories",86983:"scenes-feature-flags-FeatureFlagCodeInstructions-stories",87111:"lib-components-ProductIntroduction-ProductIntroduction-stories",87121:"scenes-annotations-Annotations-stories",87286:"react-syntax-highlighter_languages_refractor_scss",87332:"react-syntax-highlighter_languages_refractor_wren",87515:"react-syntax-highlighter_languages_refractor_magma",87658:"react-syntax-highlighter_languages_refractor_oz",87882:"react-syntax-highlighter_languages_refractor_r",88e3:"react-syntax-highlighter_languages_refractor_opencl",88082:"lib-components-ObjectTags-ObjectTags-stories",88119:"react-syntax-highlighter_languages_refractor_lua",89245:"exporter-Exporter-stories",89311:"react-syntax-highlighter_languages_refractor_powerquery",89461:"react-syntax-highlighter_languages_refractor_typescript",89582:"react-syntax-highlighter_languages_refractor_n1ql",89674:"react-syntax-highlighter_languages_refractor_gcode",89716:"layout-ErrorProjectUnavailable-stories",90001:"lib-lemon-ui-LemonButton-LemonButton-stories",90346:"lib-components-CodeSnippet-CodeSnippet-stories",90560:"react-syntax-highlighter_languages_refractor_unrealscript",90849:"react-syntax-highlighter_languages_refractor_smarty",90919:"react-syntax-highlighter_languages_refractor_cmake",91175:"lib-components-Map-Map-stories",91253:"react-syntax-highlighter_languages_refractor_wiki",91480:"scenes-error-tracking-ErrorTracking-stories",91736:"scenes-cohorts-CohortFilters-CohortNumberField-stories",92016:"react-syntax-highlighter_languages_refractor_splunkSpl",92029:"stories-How-to-build-a-form-stories-mdx",92168:"lib-lemon-ui-Spinner-Spinner-stories",92176:"lib-components-PropertySelect-PropertySelect-stories",92221:"react-syntax-highlighter_languages_refractor_qml",92223:"lib-components-ActivityLog-SentenceList-stories",92412:"scenes-actions-Action-stories",92509:"react-syntax-highlighter_languages_refractor_tsx",92816:"react-syntax-highlighter_languages_refractor_jsExtras",92980:"react-syntax-highlighter_languages_refractor_velocity",92991:"scenes-pipeline-Pipeline-stories",93025:"react-syntax-highlighter_languages_refractor_nim",93070:"scenes-notebooks-NotebookSelectButton-NotebookSelectButton-stories",93116:"react-syntax-highlighter_languages_refractor_xojo",93279:"react-syntax-highlighter_languages_refractor_t4Templating",93384:"react-syntax-highlighter_languages_refractor_arduino",93520:"react-syntax-highlighter_languages_refractor_lisp",94393:"react-syntax-highlighter_languages_refractor_dhall",94678:"scenes-settings-SettingsScene-stories",94831:"lib-components-ActivityLog-ActivityLog-stories",95082:"react-syntax-highlighter/refractor-core-import",95105:"react-syntax-highlighter_languages_refractor_dnsZoneFile",95844:"lib-lemon-ui-LemonMenu-LemonMenu-stories",95858:"lib-components-UniversalFilters-UniversalFilters-stories",95866:"scenes-trends-persons-modal-PersonsModal-stories",95867:"react-syntax-highlighter_languages_refractor_gedcom",96062:"lib-components-EventSelect-EventSelect-stories",96179:"react-syntax-highlighter_languages_refractor_log",97562:"scenes-cohorts-CohortFilters-CohortTaxonomicField-stories",97899:"react-syntax-highlighter_languages_refractor_django",98065:"scenes-session-recordings-player-inspector-components-NavigationItem-stories",98067:"react-syntax-highlighter_languages_refractor_sas",98458:"react-syntax-highlighter_languages_refractor_jolie",98614:"react-syntax-highlighter_languages_refractor_ebnf",99387:"lib-components-PropertyIcon-stories",99835:"react-syntax-highlighter_languages_refractor_markdown",99851:"react-syntax-highlighter_languages_refractor_pug"})[chunkId]||chunkId)+"."+({68:"4fb305cb",131:"47944158",162:"65ae3216",271:"f8cfb898",282:"c3a49b90",589:"2f71575c",596:"4c7f66f7",739:"6622c1eb",741:"db3ca5f6",948:"318d9dc1",986:"f0da054f",1020:"1bbd378d",1094:"d2d83ba6",1157:"bf3a98e9",1621:"fa3fd9ee",1808:"512ee215",2013:"cfd9f165",2065:"da154f47",2313:"a3c37fd1",2335:"e5546f46",2413:"1a24671a",2543:"90f4d641",2556:"f8f31a3f",2635:"cb65b8fa",2677:"4e5ef211",3143:"a0df7f7c",3422:"8e683ab8",3933:"94f62c4c",4042:"89f17b2e",4372:"8183a36f",4701:"5b74ac40",4732:"1ce6100f",5180:"79435cea",5793:"0475f6c8",5797:"65f69fd4",5905:"b848d4f2",6319:"2d9b4aff",6396:"9df47158",6541:"858bd952",6731:"3a6e612b",6813:"81606d32",6875:"0070f205",7215:"72604dc0",7300:"003417b5",7422:"f260c8d5",8056:"836ff92f",8680:"82845775",8702:"6c389a86",8771:"a9fe478b",8819:"1f207cd3",8966:"be0dc53d",9009:"eadcee49",9111:"c117fda9",9416:"364d1542",9551:"9d3f13a2",9785:"1377fe98",10034:"259c3501",10057:"f61cf813",10099:"dd08086e",10223:"d2279cde",10342:"d26ab5dc",10400:"99450400",10749:"6501478b",11438:"194250e4",11854:"9a8848a4",11923:"60900d50",12355:"98abefa9",12374:"564e4fd0",12398:"e6382413",12434:"385a515a",12547:"2dbe6991",12567:"84701498",12912:"9fa92862",12951:"19dbb611",13077:"25ed9c02",13140:"7342499d",13236:"7def8be7",13442:"b8195a4d",13474:"1109ad37",13502:"ca981889",13508:"fcf7ff27",13694:"8c53a446",14045:"eb5f7760",14047:"0da7c08b",14052:"aa9878f8",14527:"82a6ddd9",14606:"e175e1c7",14879:"db9836f3",14929:"a1b9bed3",14989:"848fd3d3",15545:"b6350c8b",15733:"078a325e",15773:"93c70359",15778:"a91f45a5",16023:"38e5ce4d",16115:"4b8f3282",16116:"9410b29f",16495:"c29ad166",16498:"3059d985",16670:"91215cb9",16680:"335bcbb2",16801:"cbed375b",16818:"71d8eae9",17066:"cf666454",17170:"466910c4",17549:"f75a90da",17723:"57772a79",17842:"61eac86f",18146:"6b61dda4",18373:"32eb10b3",18497:"d4272d35",18587:"9a8f8137",18610:"6c0cb3b0",18692:"00ed41de",18921:"2e32b65b",19170:"9cc5e304",19431:"612ae16e",19502:"f9baedc5",19603:"205c6302",19651:"7bb236ff",19745:"e726abe2",19797:"82299855",19801:"6defc8f3",20226:"3c1dd762",20305:"7d298dc3",20527:"9240bc45",20704:"61eef0fc",20720:"f7e4bbd3",20781:"4e527459",20979:"6c7a55b5",21001:"bdd8cb29",21167:"2bd4c222",21226:"2aeb186a",21443:"736e7245",21599:"a1f12e79",21955:"53167672",22044:"0e3c4b2c",22180:"889c8784",22244:"97e29538",22553:"b960caf6",22682:"dc4b267a",23046:"31373625",23162:"d4d7bb05",23237:"16be3517",23384:"fb3b9f74",23398:"3a44ddb9",23407:"c0e67d07",23412:"f9a54383",23708:"cad704d9",23818:"56269fe6",23846:"6bf6d1bd",24157:"ba38a09c",24224:"4375caed",24231:"316534ad",24378:"bda4aff2",24792:"71bfa82e",24985:"1b0eff3e",25039:"b260a5b3",25056:"e0643efe",25175:"5780ab46",25300:"bf5c8ca4",25508:"06f8bc29",25733:"3d277a90",25755:"1886d7d3",26084:"bec5cc65",26174:"5420fec9",26299:"765a3577",26486:"0049fb51",26657:"edc84e91",26963:"0518b1da",27097:"76c51370",27292:"5c6c49e7",27488:"654f32c8",27504:"8289b4d7",27561:"ecb71df1",27801:"3a7fb611",27838:"fac30abd",28089:"b4258d12",28308:"3a5bf6f1",28347:"b2c986b2",28371:"2fd12f20",28462:"188013a6",28504:"23c31fc5",29179:"ad52f792",29292:"1208fda7",29426:"965dea35",29456:"2b88a73d",29668:"e6d4edee",29749:"143e905a",29788:"5d87a67e",30224:"e0daddfa",30348:"f68941e0",30444:"dc4f9e15",30545:"85afe0ce",30885:"8d6c29f6",31130:"efbe5689",31340:"a9d5d243",31667:"b3b0b822",32146:"5563fead",32375:"800c3bc9",32728:"fbd4a8b8",33196:"d9195453",33214:"17b3bf93",33502:"92521f77",33876:"50929a81",33971:"1f895d43",34377:"729f0107",34551:"5cb995ae",34657:"01445654",34659:"fe6a659f",34679:"7de9c201",35008:"ea930b0d",35014:"4205fd3a",35305:"655d9761",35538:"62db05dc",35539:"4f9a86af",35683:"052f64ba",35951:"0c8291c0",36051:"39bad482",36125:"d1efd340",36247:"9cde5008",36426:"942c24e6",36495:"90e821fe",36501:"9c267c9e",36795:"8786436f",37253:"d53818ec",37576:"a1bd2008",37619:"c40bf8fc",38014:"254e3ba4",38383:"917499f7",38396:"a8a8127b",38486:"fba8dab2",38597:"8b7d9d91",38639:"1d83c686",38717:"78d488d6",38825:"7ec3dde2",38827:"6efb1910",38895:"c8dd67da",39127:"ea3a66e4",39134:"4b19fe39",39298:"7b36ab41",39453:"1841c4d2",39513:"0f1a7570",39742:"ef46842d",39979:"f7a02223",40206:"54e3d9c6",40722:"e11d5a09",40768:"fd37dcab",40892:"3c952d2d",40902:"49e6729f",40961:"0d6283ca",40982:"1ff4c969",41019:"003d46b6",41031:"2d7c5e93",41323:"dd808180",41362:"d0b7e409",41694:"20fa1f3e",41751:"6d4f9578",41891:"4d9f8443",42153:"0bd3b53f",42182:"0428e0b2",42883:"b536b146",43342:"d3ffa004",43496:"87b1d1d6",43717:"336360ef",43819:"67bc1280",43847:"047f3a56",43971:"d3d8707b",44052:"795ecae7",44214:"7564de50",44424:"6fbfa899",45021:"32d6168c",45412:"ca294221",45419:"5979f7cd",45508:"26c202b8",45611:"c6e73095",46460:"712c7f08",46925:"e6bf9a79",47124:"05d7d57b",47393:"fe628d3c",47719:"d5ff64bb",47858:"179a8252",47976:"a80d122a",47988:"0f047ca0",48083:"1ca9709c",48333:"4b677185",48379:"472bbc7f",48389:"b0c273a1",48419:"eefec25b",48440:"e9fc388a",48619:"f3ff3cdf",48752:"9b3fe12f",48780:"c78508ce",48811:"02d6122b",48947:"76c58d6d",49136:"1d36c3c9",49284:"d9db701c",49315:"094fb866",49770:"8b3f0ab8",49793:"41967f69",50026:"508464ce",50081:"5af9239d",50297:"266b7721",50339:"a350a2ed",50548:"5b7839d0",50769:"1b6ed738",50869:"c8f5a13f",50962:"576943f5",50980:"d9570570",50991:"95ddb4d0",51008:"0f4ef861",51554:"3e1ecd46",51802:"a8548262",52051:"9cf85691",52087:"8cfed415",52375:"07979ac4",52425:"77f5eadf",52789:"1730f56e",52996:"9109f712",53152:"98e51afa",53318:"2e498266",53342:"8a517283",53444:"e6ed3726",53543:"6bc56f6c",53617:"bf583f45",53983:"608b03d7",54069:"9fdfaf29",54306:"280ba302",54346:"8d353ae5",54576:"5efab341",54584:"869effb2",55394:"a498c1e1",55409:"32a66744",56246:"ff054af1",56428:"e2414846",56487:"9fe5b058",56626:"61942594",56749:"5a3e3a20",56818:"b8cbecbf",56975:"96874676",57041:"0572e569",57105:"4dfcbdd6",57176:"fc54468a",57195:"e9986cc8",57297:"30e2e003",57354:"6e37af68",57475:"fba481f0",57578:"a36596be",57996:"ebf5e071",58030:"30535c0a",58168:"e001a755",58244:"2dfcd120",58404:"3e91c384",58453:"79d6cb29",58513:"96053c34",58633:"f2392cf6",58934:"c8bf6921",59001:"dd8d754d",59189:"448a9290",59545:"4531ae8e",59692:"55fab260",59931:"f96a5789",60048:"f31d9db1",60145:"47d210c5",60171:"e387f7a7",60255:"9568b03f",60265:"20ca10e6",60470:"560c8be0",60518:"03781f30",60552:"4908a7bf",60580:"4a31fe83",60665:"aa7238cf",60672:"2335adb2",60711:"6e43b2d7",61007:"ae16d1ae",61121:"e97f86e6",61201:"ad70f82b",61387:"eccf0551",61405:"5051922f",61406:"cb753f14",61473:"286a0890",61598:"0d851da3",61768:"246e832d",62053:"28dfb3e7",62250:"13c023fe",62348:"a7b8eb6f",62983:"f88d0c4d",63361:"7312d08d",63833:"44cec7f3",64014:"309e59ae",64098:"612a7ebf",64353:"02bb0fea",64632:"99c0b78f",64698:"11f71c9f",64900:"acbe486d",65085:"ef08f212",65137:"8b33e129",65259:"57260fcb",65524:"e5b5940c",65982:"d645cbc0",66118:"ba16205e",66558:"d6fee03f",66646:"a2ed0e19",67197:"da30d68a",67417:"fd67b111",67474:"2da4e33f",67691:"b96bc883",68097:"8783a788",68126:"af24939d",68142:"989444d6",68202:"de40667c",68330:"1f1370ce",68712:"76832fd4",68987:"faf37f8c",69106:"846af8e0",69242:"0cd705be",69256:"f50b6470",69269:"5f194fa6",69700:"101fcadf",69887:"9b190ce7",70129:"0f27c3c0",70138:"c61b97aa",70156:"e84e3c25",70163:"02c33a10",70775:"2091478a",70902:"60e688e2",70904:"82bbe802",71059:"e1cf42e2",71066:"b85b11c7",71073:"183d9eca",71251:"78ff5e84",71423:"b61964ff",71569:"79bce9e2",71627:"afc67f45",71831:"1b990fca",72013:"46be72ae",72134:"8df90f05",72154:"43a527a0",72281:"84a71a45",72526:"d8a10c2a",72726:"b1f03c8c",72822:"b75983ea",72943:"f2f32ebb",73086:"34d22054",73221:"f6e3acd3",73224:"1be3fbb9",73570:"175248c9",73949:"8df55c84",74381:"50edad17",74653:"e245769d",74710:"8a5f3f78",74730:"07556e64",74884:"46263abc",74973:"7d9c3cd7",75097:"4ef354b3",75110:"93c6d12b",75165:"6675bab2",75576:"21d54edf",75643:"677d8593",76282:"4cac83d5",76368:"d77bf4cc",76410:"7a9ccd65",76668:"42bebbde",77192:"8cc2f6dd",77250:"4a8ccb73",77309:"2e199781",77966:"26766b99",78095:"9e8a4178",78170:"8746df8c",78334:"2d043258",78663:"833df5ac",78787:"7b6548dd",78817:"51022e3b",78992:"d780939c",79073:"7450e8a6",79166:"b821cf76",79291:"4b44a364",79617:"6a4883b4",79799:"8a09eeba",79960:"94e0488e",80158:"788b04d5",80180:"3359efce",80801:"c885762b",80844:"581de287",81151:"de4975c3",81160:"07717213",81469:"d207651a",81554:"b99a35c1",81809:"c40099b5",81896:"b9fa01a6",81929:"19880572",81952:"84436fe9",81975:"5454c6fb",82079:"32305f94",82250:"7eda27ad",82429:"5d9ed034",82541:"811857f7",82564:"dff9edc1",82584:"835bd275",82723:"cc4ebf6c",82821:"aaaeb372",83082:"71dad355",83821:"d5e3615c",83872:"9adeff01",83914:"89351b73",84213:"6b369cab",84851:"bed9891f",85205:"359ed243",85299:"cf3b9124",85564:"d3e32c22",85566:"e17ad588",85696:"8bcfd36a",85896:"ccc62f06",85903:"2258b5f3",86238:"0f79045d",86574:"3bf6ee9a",86721:"6164e49f",86861:"1f4b0845",86910:"43fca7e2",86983:"ceb085dd",87057:"f4614312",87111:"89731b7e",87121:"59d316d3",87286:"5271febe",87332:"c107ea54",87515:"b9d2c852",87519:"a35da02c",87658:"ef903485",87882:"0358cdd6",88e3:"93f4070e",88069:"b9595925",88082:"93136f7b",88119:"ab0b7bd6",88236:"6950d315",88754:"38323ae1",89046:"437ca8fd",89053:"599bd96a",89194:"76d7aad6",89245:"d6f1465b",89290:"1f3f52b0",89311:"c93ace3d",89448:"a4a4de7e",89461:"77d5a245",89571:"0d2cc580",89579:"a5a09a65",89582:"a89ea56d",89674:"4957bd54",89716:"082e3eba",89949:"fb6a5124",90001:"feb141ab",90346:"d191c892",90560:"9b017839",90843:"60060ba2",90849:"b178121c",90853:"4677a2f1",90891:"c64e6f9b",90919:"ab75b7b2",91175:"6b20ec19",91253:"7f957060",91302:"f93f9e65",91480:"bd9c81f6",91736:"fc826873",92016:"0d2b36e1",92029:"aca1274b",92168:"f37e7286",92176:"dfbdba23",92221:"b1e9201d",92223:"6d825419",92412:"238e97c2",92437:"c737d6f1",92509:"7cb8c4c6",92816:"0ade4b36",92980:"4dbecf1f",92991:"feae6509",93025:"711497d3",93070:"32121c22",93116:"61e474bd",93279:"993e0c19",93384:"9fc46bd6",93520:"4e6e71ea",93836:"50627a72",94131:"1f05b100",94393:"abccf2d8",94678:"61f79c4a",94831:"8f840985",95082:"0940374c",95105:"aaca4e5b",95844:"f3285b14",95858:"23abd79a",95866:"aef4cd31",95867:"f9c6817a",96062:"849e6779",96179:"fede2a57",96553:"2cda01bc",96866:"11a356f6",97562:"35bd2414",97899:"15860aa9",98065:"2c71a9cc",98067:"0751e122",98095:"6f897eac",98458:"e74373ce",98501:"dd8437d4",98614:"b2e3e34a",98889:"425defd4",99203:"ebad0677",99387:"4d67d9ff",99460:"66119f8c",99534:"1d6f3222",99835:"3df0cc7a",99851:"9a190ba4",99954:"5fd1fc78"})[chunkId]+".iframe.bundle.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="posthog:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={51303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(51303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i