PageSourceSearch

https://nuxie.ai/dashboard/assets/dashboard._orgSlug-DS0PU8FA.js

js nuxie.ai collected 2026-10-05 12:20:29 UTC 38,402 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c24bcf91-a885-5bf1-8805-5d4a4da050c4")}catch(e){}}();
3const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["dashboard/assets/profile-settings-client-B1voye8x.js","dashboard/assets/rolldown-runtime-CNC7AqOf.js","dashboard/assets/react-ieBswWmd.js","dashboard/assets/jsx-runtime-DiK4U9sA.js","dashboard/assets/server-zgdtPr2M.js","dashboard/assets/toast-BYTgaey7.js","dashboard/assets/preload-helper-Czpn1I53.js","dashboard/assets/create-nucleo-icon-BDDmt9LD.js","dashboard/assets/alert-warning-DcTYOvjo.js","dashboard/assets/utils-DJF9gtYK.js","dashboard/assets/bundle-mjs-ry-q0ArR.js","dashboard/assets/button-DWre8LhC.js","dashboard/assets/useRenderElement-C2vYWxS-.js","dashboard/assets/useButton-D73w4D9f.js","dashboard/assets/dist-DGFCZd-W.js","dashboard/assets/spinner-Bd1su5l2.js","dashboard/assets/input-r6m7WAv3.js","dashboard/assets/createBaseUIEventDetails-eIR9Mtq7.js","dashboard/assets/useField-kxj2hoJE.js","dashboard/assets/react-dom-Cw7fsdfo.js","dashboard/assets/element-DfS-sPYA.js","dashboard/assets/useControlled-C_AQjS9M.js","dashboard/assets/auth-client-C2OeGbWH.js","dashboard/assets/schemas-vfQDKMQp.js","dashboard/assets/root-loader-context-Buuu3BTS.js","dashboard/assets/zod-resolver-DZX8804O.js","dashboard/assets/form-DQPbbaqB.js","dashboard/assets/dist-C24GoqlN.js","dashboard/assets/label-CnezAwzz.js","dashboard/assets/security-settings-client-DWO73c2l.js","dashboard/assets/trash-DG3ZPQGN.js","dashboard/assets/globe-C3EyTMlA.js","dashboard/assets/mobile-2-DdrhXTtH.js","dashboard/assets/checkbox-CrlrmZk8.js","dashboard/assets/check-3-B2977VpR.js","dashboard/assets/theme-scope-w9LPRJdz.js","dashboard/assets/with-selector-3q7lP2mC.js","dashboard/assets/visuallyHidden-CrYY0HH5.js","dashboard/assets/FieldItemContext-fCX2bzgV.js","dashboard/assets/useValueChanged-0Zghn9ol.js","dashboard/assets/useAriaLabelledBy-Ctkff-6S.js","dashboard/assets/alert-dialog-CukGCbUq.js","dashboard/assets/DialogTitle-CZmN1V9q.js","dashboard/assets/composite-B_J8UEzK.js","dashboard/assets/useOpenInteractionType-B0tDkjSP.js","dashboard/assets/useSyncedFloatingRootContext-Dnan0--6.js","dashboard/assets/useRole-B3zEuHt2.js","dashboard/assets/DialogDescription-weYVxX7F.js","dashboard/assets/card-DTJ08axO.js","dashboard/assets/notifications-settings-client-DkAVJmlw.js","dashboard/assets/createServerFn-CNGVIv-O.js","dashboard/assets/not-found-i5RsCZif.js","dashboard/assets/redirect-DmtLUW0N.js","dashboard/assets/invariant-DEEwAagU.js","dashboard/assets/switch-BPPF9qdd.js","dashboard/assets/workspace-settings-client-tE5reckL.js","dashboard/assets/QueryClientProvider-BYW12AR6.js","dashboard/assets/api-service-B0D1j7rE.js","dashboard/assets/react-6B36xvUX.js","dashboard/assets/members-settings-client-C8zG4zKb.js","dashboard/assets/plus-BYxKYvCR.js","dashboard/assets/refresh-clockwise-PsJyEklY.js","dashboard/assets/xmark-T8TCxWGP.js","dashboard/assets/envelope-6fMInfdN.js","dashboard/assets/circle-user-I3aQhGQz.js","dashboard/assets/dialog-8aHYgxC8.js","dashboard/assets/DialogTrigger-DBlJoZV4.js","dashboard/assets/useClick-B9t76y3g.js","dashboard/assets/useOnFirstRender-CQbIWB7y.js","dashboard/assets/use-api-C337lMd5.js","dashboard/assets/query-identity-CR5ecl5z.js","dashboard/assets/org-context-DCiRLwi0.js","dashboard/assets/avatar-CtEmUlgy.js","dashboard/assets/use-root-loader-data-D_fGfCQV.js","dashboard/assets/select-glTWGMzi.js","dashboard/assets/chevrons-BwcEmluj.js","dashboard/assets/getDisabledMountTransitionStyles-BNtSegFx.js","dashboard/assets/getPseudoElementBounds-hX-jM4yk.js","dashboard/assets/CompositeList-B0cW7xsg.js","dashboard/assets/ToolbarRootContext-BgkYux_s.js","dashboard/assets/resolveValueLabel-BXtZFFVM.js","dashboard/assets/serializeValue-B_EucO5O.js","dashboard/assets/resolveAriaLabelledBy-B2ZzrlGb.js","dashboard/assets/clamp-D2vWjdkr.js","dashboard/assets/styles-NepNPFWG.js","dashboard/assets/badge-SXfGlcB-.js","dashboard/assets/useRender-BDBADuBr.
3js","dashboard/assets/select-label-gOdlp5tK.js","dashboard/assets/display-settings-client-Cu7Bg6QO.js","dashboard/assets/grip-dots-vertical-CEULFQSg.js","dashboard/assets/customer-display-Btml20WK.js","dashboard/assets/core.esm-GxhNINAM.js","dashboard/assets/sortable.esm-BjmPSfe4.js","dashboard/assets/settings-actions.functions-B-QsMdkj.js","dashboard/assets/action-invalidation-DU3hqxga.js","dashboard/assets/api-keys-settings-client-B0OHJIxF.js","dashboard/assets/settings-modal-navigation-CVo2ysPg.js","dashboard/assets/useMatch-7DDZ6E10.js","dashboard/assets/useRouter-BFYfOTx_.js","dashboard/assets/useSelector-CF5DGFt5.js","dashboard/assets/useNavigate-DL-fXrF9.js","dashboard/assets/use-apps-CCweI6vO.js","dashboard/assets/useQuery-CBdh2PF1.js","dashboard/assets/app-platform-label-DBQTrlSB.js","dashboard/assets/app-env-Ck6EHrEb.js","dashboard/assets/billing-settings-client-6e7k6d2m.js","dashboard/assets/useServerFn-Bq7gU8Gs.js","dashboard/assets/navigation-context-CXjv9ZDp.js","dashboard/assets/pricing-plans-vlmaQVG3.js","dashboard/assets/billing-credit-prompts-Dl0_Ogtn.js","dashboard/assets/skeleton-Bby5FfUq.js","dashboard/assets/billing-summary-BZb6cmef.js","dashboard/assets/segmented-control-DAw4d8s-.js","dashboard/assets/credit-reload-dialog-D2QRWOyG.js","dashboard/assets/chart-primitives-DzLWz3se.js","dashboard/assets/prop-types-BehTLZwu.js","dashboard/assets/es-D1rE_Ql8.js","dashboard/assets/table--JDeOtyS.js","dashboard/assets/trial-billing-CB_v1wbh.js","dashboard/assets/danger-zone-settings-client-CiQVhQJ-.js","dashboard/assets/new-app-settings-client-DPpJ7fKj.js","dashboard/assets/app-creation-form-C3zF4YQe.js","dashboard/assets/app-store-CPAVAi_K.js","dashboard/assets/apple-DfVrJ-t-.js","dashboard/assets/tslib.es6-Tae09705.js","dashboard/assets/toggle-group-B6Nb0LKb.js","dashboard/assets/CompositeItem-BcB-sZfG.js","dashboard/assets/CompositeRoot-p3XxdxBi.js","dashboard/assets/isElementDisabled-KSuuBj8D.js","dashboard/assets/upload-limits-BY56KaZK.js","dashboard/assets/session-realtime-context-Ck0m7Hm9.js","dashboard/assets/cf-image-Boa_pbVF.js","dashboard/assets/app-settings-content-CXLWY35_.js","dashboard/assets/useMutation-vsOGewg3.js","dashboard/assets/arrow-right-Dqd_emCZ.js","dashboard/assets/circle-check-2-UptnSdPD.js","dashboard/assets/copy-CRDBSmg3.js","dashboard/assets/pencil-D9FLnCoT.js","dashboard/assets/publish-dialog-xkjExyKT.js","dashboard/assets/arrow-up-right-6eYW6gs7.js","dashboard/assets/calendar-Dp3gdRl-.js","dashboard/assets/eye-open-CCYEVSS1.js","dashboard/assets/flag-x422M916.js","dashboard/assets/media-pause-D-MraZWN.js","dashboard/assets/media-play-D3s-tfCA.js","dashboard/assets/rocket-DqI7vJ98.js","dashboard/assets/marketing-target-TLbUuyFp.js","dashboard/assets/check-BVmgkNZb.js","dashboard/assets/experience-mini-map-BpMAiwUd.js","dashboard/assets/json-serialization-Bz7gQflt.js","dashboard/assets/node-kind-DZm76TrD.js","dashboard/assets/journey-route-module-u63QhmkU.js","dashboard/assets/tree-roots-Bg60mKoN.js","dashboard/assets/order-keys-DntulYeW.js","dashboard/assets/journey-route-BrTjii6d.js","dashboard/assets/json-ldUHTwzT.js","dashboard/assets/lib-DGysXIQd.js","dashboard/assets/dropdown-menu-CSS29ZQK.js","dashboard/assets/Separator-CWPZFw3E.js","dashboard/assets/safePolygon-BnGneVci.js","dashboard/assets/useFocus-C4-Jk0iu.js","dashboard/assets/use-track-event-4w9GAc5P.js","dashboard/assets/posthog-context-DrbbFbqF.js","dashboard/assets/textarea-DsYy_5L2.js","dashboard/assets/dashboard._orgSlug-BuwTy493.js","dashboard/assets/Match-C3KbCQQ2.js","dashboard/assets/ClientOnly-BitNUSv_.js"])))=>i.map(i=>d[i]);
4import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./react-ieBswWmd.js";import{n}from"./not-found-i5RsCZif.js";import{r}from"./redirect-DmtLUW0N.js";import{n as i,t as a}from"./lazyRouteComponent-nqXjPvjS.js";import{t as o}from"./jsx-runtime-DiK4U9sA.js";import{n as s}from"./Match-C3KbCQQ2.js";import{s as c}from"./shortcuts-Df3gZNmV.js";import{i as l,n as u,t as d}from"./settings-modal-navigation-CVo2ysPg.js";import{t as f}from"./useQuery-CBdh2PF1.js";import{t as p}from"./use-org-billing-summary-Yk8p1c2n.js";import{t as m}from"./preload-helper-Czpn1I53.js";import{n as h,t as g}from"./create-nucleo-icon-BDDmt9LD.js";import{t as _}from"./plus-BYxKYvCR.js";import{a as v,r as y,t as b}from"./chevrons-BwcEmluj.js";import{a as x,t as S}from"./halfsheet-Dj0Jt3Qq.js";import{t as C}from"./refresh-clockwise-PsJyEklY.js";import{t as w}from"./xmark-T8TCxWGP.js";import{t as T}from"./badge-check-Bcqh5tLz.js";import{t as E}from"./sack-coins-DenvycgH.js";import{t as ee}from"./credit-card-CxnIZRjo.js";import{t as te}from"./cube-CAMZ05fF.js";import{t as ne}from"./door-open-Chb8zNg-.js";import{a as re,c as ie,i as ae,o as oe,r as se,s as ce,t as le}from"./dashboard-chrome-context-W3ZF-BZR.js";import{t as ue}from"./bell-DU_fqMAg.js";import{t as de}from"./settings-modal-shell-FthbGFI_.js";import{t as fe}from"./gear-CwHH1jup.js";import{t as pe}from"./stars-DHrZ9AaL.js";import{t as me}from"./check-3-B2977VpR.js";import{t as he}from"./users-2-TjdhEY0B.js";import{t as ge}from"./user-_2DoOu-8.js";import{t as _e}from"./bolt-BB-FBQwq.js";import{t as ve}from"./utils-DJF9gtYK.js";import{t as D}from"./button-DWre8LhC.js";import{t as ye}from"./spinner-Bd1su5l2.js";import{t as be}from"./input-r6m7WAv3.js";import{t as xe}from"./auth-client-C2OeGbWH.js";import{a as Se,l as Ce,o as we,r as Te,t as Ee}from"./dialog-8aHYgxC8.js";import{n as O,t as De}from"./root-loader-context-Buuu3BTS.js";import{Kt as Oe}from"./views-CBYV0VlT.js";import{Ji as ke,Zr as Ae,fi as je}from"./jotai-p3X0kFY9.js";import{r as k,t as Me}from"./org-context-DCiRLwi0.js";import{a as A,i as j,s as Ne,t as M}from"./navigation-context-CXjv9ZDp.js";import{t as N}from"./protected-route-DUZvDb4k.js";import{n as Pe,r as Fe}from"./dashboard-data.functions-D3J5WE_p.js";import{g as Ie,r as P}from"./pricing-plans-vlmaQVG3.js";import{S as Le,_ as Re,a as F,d as I,f as ze,g as Be,h as Ve,l as L,m as R,o as He,p as z,s as Ue,t as We,u as B,v as Ge,x as V}from"./sidebar-BCoqpucM.js";import{n as Ke,t as qe}from"./billing-credit-prompts-Dl0_Ogtn.js";import{t as Je}from"./nuxie-logo-DaWtDJOx.js";import{i as H}from"./id-BsadIkgN.js";import{n as U,r as W,t as G}from"./avatar-CtEmUlgy.js";import{a as K,i as q,l as J,m as Y,o as Ye,r as X,t as Z}
4from"./dropdown-menu-CSS29ZQK.js";import{t as Xe}from"./use-root-loader-data-D_fGfCQV.js";import{n as Ze,t as Qe}from"./use-organizations-C3kEQVul.js";import{t as $e}from"./billing-summary-BZb6cmef.js";import{t as et}from"./app-platform-label-DBQTrlSB.js";import{t as tt}from"./use-chats-Tpa2QGhI.js";import{n as nt,r as rt,t as it}from"./collapsible-DkVwxwkG.js";import{t as at}from"./add-app-dialog-DL0DB2wk.js";import{t as ot}from"./app-icon-Cgr2TPC7.js";import{t as st}from"./settings-route-data.functions-Cp5w18om.js";var ct=g(`IconChart2`,`<g class="nc-icon-wrapper" fill="var(--nc-ui-color-1, #212121)"><path d="M9.25 2.75H8.75C8.19772 2.75 7.75 3.19772 7.75 3.75V14.25C7.75 14.8023 8.19772 15.25 8.75 15.25H9.25C9.80228 15.25 10.25 14.8023 10.25 14.25V3.75C10.25 3.19772 9.80228 2.75 9.25 2.75Z" fill="var(--nc-ui-color-2, #212121)" fill-opacity="0.3" data-color="color-2" data-stroke="none" stroke="none"></path> <path d="M3.75 2.75H3.25C2.69772 2.75 2.25 3.19772 2.25 3.75V9.25C2.25 9.80228 2.69772 10.25 3.25 10.25H3.75C4.30228 10.25 4.75 9.80228 4.75 9.25V3.75C4.75 3.19772 4.30228 2.75 3.75 2.75Z" fill="var(--nc-ui-color-2, #212121)" fill-opacity="0.3" data-color="color-2" data-stroke="none" stroke="none"></path> <path d="M14.75 2.75H14.25C13.6977 2.75 13.25 3.19772 13.25 3.75V6.25C13.25 6.80228 13.6977 7.25 14.25 7.25H14.75C15.3023 7.25 15.75 6.80228 15.75 6.25V3.75C15.75 3.19772 15.3023 2.75 14.75 2.75Z" fill="var(--nc-ui-color-2, #212121)" fill-opacity="0.3" data-color="color-2" data-stroke="none" stroke="none"></path> <path d="M9.25 2.75H8.75C8.19772 2.75 7.75 3.19772 7.75 3.75V14.25C7.75 14.8023 8.19772 15.25 8.75 15.25H9.25C9.80228 15.25 10.25 14.8023 10.25 14.25V3.75C10.25 3.19772 9.80228 2.75 9.25 2.75Z" stroke="var(--nc-ui-color-1, #212121)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> <path d="M3.75 2.75H3.25C2.69772 2.75 2.25 3.19772 2.25 3.75V9.25C2.25 9.80228 2.69772 10.25 3.25 10.25H3.75C4.30228 10.25 4.75 9.80228 4.75 9.25V3.75C4.75 3.19772 4.30228 2.75 3.75 2.75Z" stroke="var(--nc-ui-color-1, #212121)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> <path d="M14.75 2.75H14.25C13.6977 2.75 13.25 3.19772 13.25 3.75V6.25C13.25 6.80228 13.6977 7.25 14.25 7.25H14.75C15.3023 7.25 15.75 6.80228 15.75 6.25V3.75C15.75 3.19772 15.3023 2.75 14.75 2.75Z" stroke="var(--nc-ui-color-1, #212121)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path></g>`,`0 0 18 18`),lt=g(`IconCircleQuestion`,`<g class="nc-icon-wrapper" fill="var(--nc-ui-color-1, #212121)"><path d="M9 16.25C13.0041 16.25 16.25 13.0041 16.25 9C16.25 4.99594 13.0041 1.75 9 1.75C4.99594 1.75 1.75 4.99594 1.75 9C1.75 13.0041 4.99594 16.25 9 16.25Z" fill="var(--nc-ui-color-2, #212121)" fill-opacity="0.3" data-color="color-2" data-stroke="none" stroke="none"></path> <path d="M9 16.25C13.0041 16.25 16.25 13.0041 16.25 9C16.25 4.99594 13.0041 1.75 9 1.75C4.99594 1.75 1.75 4.99594 1.75 9C1.75 13.0041 4.99594 16.25 9 16.25Z" stroke="var(--nc-ui-color-1, #212121)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> <path d="M6.92499 6.61901C7.31299 5.56201 8.21899 5.12701 9.10499 5.12701C9.99999 5.12701 10.923 5.76501 10.923 6.93501C10.923 8.71901 9.10699 8.40301 8.82699 10" stroke="var(--nc-ui-color-1, #212121)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> <path d="M8.79099 13.567C8.23899 13.567 7.79099 13.118 7.79099 12.567C7.79099 12.016 8.23899 11.567 8.79099 11.567C9.34299 11.567 9.79099 12.016 9.79099 12.567C9.79099 13.118 9.34299 13.567 8.79099 13.567Z" fill="var(--nc-ui-color-1, #212121)" data-stroke="none" stroke="none"></path></g>`,`0 0 18 18`),Q=e(t(),1),$=o();function ut(e){return!e.plan||e.remainingCredits===null?null:e.remainingCredits===0?`credits-empty`:e.remainingCredits<=50?`credits-low`:null}function dt(e,t){return e===`credits-empty`?{title:`You're out of credits`,detail:`New generations need more.`}:{title:`Credits are running low`,detail:`${(t??0).toLocaleString(`en-US`)} left`}}function ft({workspaceId:e,orgSlug:t,reason:n}){if(!n)return null;let r=e??t;return r?`nuxie:floating-upgrade-banner:${r}:${n}`:null}function pt(){let e=j(),t=A(),n=k(),r=O(),i=n?.org.id??r?.workspaceId??null,a=n?.orgSlug??r?.organization?.slug??null,{data:o}=p(i),s=qe(o?.credits),c=Ke(o?.plan),l=(0,Q.useMemo)(()=>ut({plan:o?.plan,remainingCredits:s}),[o?.plan,s]),u=(0,Q.useMemo)(()=>ft({workspaceId:i,orgSlug:a,reason:l}),[a,l,i]),d=(0,Q.useMemo)(()=>P({orgSlug:a,workspaceId:i}),[a,i]),[f,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1);if((0,Q.useEffect)(()=>
4{if(v(!1),!u){m(null),g(null);return}typeof window>`u`||(m(window.localStorage.getItem(u)===`1`?u:null),g(u))},[u]),!l||Le(t)||_||u&&h!==u||u&&f===u)return null;let y=dt(l,s);return(0,$.jsx)(mt,{title:y.title,detail:y.detail,onOpenPricing:()=>{e(c?`${d}#credit-packs`:d)},onDismiss:()=>{u&&typeof window<`u`&&(window.localStorage.setItem(u,`1`),m(u)),v(!0)},actionLabel:c?`Reload credits`:`See plans`})}function mt({title:e,detail:t,onOpenPricing:n,onDismiss:r,actionLabel:i=`View plans`}){return(0,$.jsx)(`div`,{className:`pointer-events-none fixed bottom-3 right-3 z-[80] max-w-[calc(100vw-1.5rem)] sm:bottom-5 sm:right-5`,children:(0,$.jsxs)(`div`,{className:`pointer-events-auto relative`,children:[(0,$.jsx)(`div`,{className:`bg-glass/95 backdrop-blur-glass border-glass-edge text-popover-foreground relative w-[min(calc(100vw-1.5rem),26rem)] rounded-2xl border shadow-2xl`,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-left sm:flex-nowrap`,children:[(0,$.jsxs)(`span`,{className:`min-w-0 flex-1 text-sm leading-tight`,children:[(0,$.jsx)(`span`,{className:`font-medium`,children:e}
4),` `,(0,$.jsx)(`span`,{className:`text-popover-foreground/70`,children:t})]}),(0,$.jsx)(D,{type:`button`,size:`sm`,onClick:n,className:`pointer-events-auto h-8 px-3.5 text-sm font-medium`,children:i})]})}),(0,$.jsx)(D,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Dismiss upgrade prompt`,onClick:r,className:`bg-glass/95 backdrop-blur-glass border-glass-edge text-popover-foreground hover:bg-accent hover:text-foreground absolute -right-2 -top-2 size-7 rounded-full border shadow-2xl`,children:(0,$.jsx)(h,{icon:w,className:`size-4`})})]})})}function ht({sidebarChatsSlot:e,sidebarAppsSlot:t,className:n,subscriptionStatus:r}){let i=ce();return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(We,{variant:`glass`,className:n,children:(0,$.jsx)(ie,{subscriptionStatus:r,sidebarChatsSlot:e,sidebarAppsSlot:t,onSearchClick:()=>i.setOpen(!0),commandShortcutLabel:i.shortcutLabel})}),(0,$.jsx)(oe,{open:i.open,onOpenChange:i.setOpen})]})}function gt({children:e,className:t}){let{activePanel:n}=x(),r=Ge(),i=n===Ae.HALFSHEET,a=r?.sidebarBehind??!1;return(0,$.jsx)(`div`,{className:ve(`@container/workspace-content relative flex w-full flex-1 flex-col overflow-hidden`,i&&`!min-w-0`,t),style:{"--sidebar-panel-offset":a?`calc(var(--sidebar-width) + 16px)`:`16px`},children:e})}function _t({plan:e,credits:t}){let n=Ie(e),r=t?.used??0,i=t?.total??0,a=t?.unlimited??!1,o=a?null:Math.max(i-r,0),s=a||i<=0?100:Math.min(100,o/i*100),c=t?.resetDate?new Date(t.resetDate).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):null,l=2*Math.PI*16,u=a||i<=0?0:l*(1-s/100);return(0,$.jsx)(`div`,{className:`px-2 py-2`,children:(0,$.jsx)(`div`,{className:`rounded-xl bg-card px-3 py-3`,children:(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsxs)(`div`,{className:`relative h-11 w-11 shrink-0`,children:[(0,$.jsxs)(`svg`,{viewBox:`0 0 40 40`,className:`-rotate-90 h-11 w-11`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`20`,cy:`20`,r:16,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,className:`text-muted/70`}),(0,$.jsx)(`circle`,{cx:`20`,cy:`20`,r:16,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:l,strokeDashoffset:u,className:`text-primary transition-all duration-300 ease-out`})]}),(0,$.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-xs font-semibold text-foreground`,children:a?`∞`:Math.round(s)})]}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`truncate text-base font-semibold text-foreground`,children:a?`Unlimited Credits`:`${o?.toLocaleString(`en-US`)??`0`} Credits remaining`}),(0,$.jsx)(`p`,{className:`truncate text-sm text-muted-foreground`,children:n?`Free plan credits`:a?`Included with your current plan`:i>0?`Plan and purchased credits`:`Upgrade to get credits`}),c&&!n?(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:[`Resets `,c]}):null]})]})})})}function vt({variant:e=`sidebar`}){let t=Xe(),n=j(),r=l(t?.organization?.slug),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(``),{data:c}=Ze(),u=Qe(),d=t?.organization,f=d?.slug,m=t?.workspaceId??null,{data:g}=p(m);if(!d)return null;let y=e=>{e.id!==t?.workspaceId&&n(`/dashboard/${e.slug}`)},b=async e=>{if(e.preventDefault(),!o.trim())return;let t=await u.mutateAsync({name:o.trim()});a(!1),s(``),t.org?.slug&&n(`/dashboard/${t.org.slug}`)},x=d.name,S=d.logo,C=P({orgSlug:f,workspaceId:m}),w=`${C}#credit-packs`,T=x.split(/\s+/).map(e=>e[0]).join(``).toUpperCase().slice(0,2),E=(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(Ye,{children:`Workspaces`}),c?.map(e=>(0,$.jsxs)(K,{onClick:()=>y(e),children:[(0,$.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),e.id===t?.workspaceId&&(0,$.jsx)(h,{icon:me,className:`ml-2 h-4 w-4`})]},e.id)),(0,$.jsxs)(K,{onClick:()=>a(!0),children:[(0,$.jsx)(h,{icon:_,className:`mr-2 h-4 w-4`}),`New Workspace`]})]}),(0,$.jsx)(J,{}),(0,$.jsx)(_t,{plan:g?.plan,credits:g?.credits}),(0,$.jsx)(J,{}),(0,$.jsxs)(q,{children:[!$e(g?.plan)&&(0,$.jsxs)(K,{onClick:()=>n(w),children:[(0,$.jsx)(h,{icon:ee,className:`mr-2 h-4 w-4`}),`Buy Credits`]}),(0,$.jsxs)(K,{onClick:()=>n(C),children:[(0,$.jsx)(h,{icon:pe,className:`mr-2 h-4 w-4`}),`Upgrade Plan`]}),(0,$.jsxs)(K,{onClick:()=>{f&&r({section:`profile`})},disabled:!f,children:[(0,$.jsx)(h,{icon:fe,className:`mr-2 h-4 w-4`}),`Settings`]}),(0,$.jsxs)(K,{onClick:()=>n(`/updates`),children:[(0,$.jsx)(h,{icon:ue,className:`mr-2 h-4 w-4`}),`Updates`]}),(0,$.jsxs)(K,{onClick:()=>n(`/docs`),children:[(0,$.jsx)(h,{icon:lt,className:`mr-2 h-4 w-4`}),`Help`]})]}),(0,$.jsx)(J,{}),(0,$.jsxs)(K,{onClick:async()=>{await xe.signOut(),window.location.replace(`/`)},children:[(0,$.jsx)(h,{icon:ne,className:`mr-2 h-4 w-4`}),`Log out`]}
4)]});return(0,$.jsxs)($.Fragment,{children:[e===`sidebar`?(0,$.jsx)(L,{children:(0,$.jsx)(I,{children:(0,$.jsxs)(Z,{children:[(0,$.jsxs)(Y,{render:(0,$.jsx)(B,{size:`lg`,className:`data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`}),children:[(0,$.jsxs)(G,{className:`h-8 w-8 rounded-lg`,children:[(0,$.jsx)(W,{src:S||void 0,alt:x}),(0,$.jsx)(U,{className:`rounded-lg text-xs`,children:T})]}),(0,$.jsx)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:(0,$.jsx)(`span`,{className:`truncate font-semibold`,children:x})}),(0,$.jsx)(h,{icon:v,className:`ml-auto size-4 opacity-50`})]}),(0,$.jsx)(X,{className:`w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg`,side:`right`,align:`end`,sideOffset:8,children:E})]})})}):(0,$.jsxs)(Z,{children:[(0,$.jsxs)(Y,{render:(0,$.jsx)(`button`,{className:`flex h-9 w-fit max-w-full items-center gap-2 rounded-md px-2 text-left text-sm text-foreground hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`}),children:[(0,$.jsxs)(G,{className:`h-6 w-6 shrink-0 rounded-md`,children:[(0,$.jsx)(W,{src:S||void 0,alt:x}),(0,$.jsx)(U,{className:`rounded-md text-[10px]`,children:T})]}),(0,$.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:x}),(0,$.jsx)(h,{icon:v,className:`ml-1 size-4 shrink-0 text-muted-foreground`})]}),(0,$.jsx)(X,{className:`min-w-56 rounded-lg`,side:`bottom`,align:`start`,sideOffset:6,children:E})]}),(0,$.jsx)(Ee,{open:i,onOpenChange:a,children:(0,$.jsxs)(Te,{className:`sm:max-w-md`,children:[(0,$.jsx)(we,{children:(0,$.jsx)(Ce,{children:`Create Workspace`})}),(0,$.jsxs)(`form`,{onSubmit:b,children:[(0,$.jsx)(`div`,{className:`py-4`,children:(0,$.jsx)(be,{placeholder:`Workspace name`,value:o,onChange:e=>s(e.target.value),autoFocus:!0})}),(0,$.jsxs)(Se,{children:[(0,$.jsx)(D,{type:`button`,variant:`outline`,onClick:()=>a(!1),children:`Cancel`}),(0,$.jsx)(D,{type:`submit`,disabled:u.isPending||!o.trim(),loading:u.isPending,children:u.isPending?`Creating...`:`Create`})]})]})]})})]})}function yt({children:e,subscriptionStatus:t,sidebarChatsSlot:n,sidebarAppsSlot:r,showSidebar:i=!0}){let a=A(),o=V(a),s=/\/connectors\/[^/]+\/connect\/?$/.test(a),c=i&&!o&&!s,{pinnedCollapsed:l}=Be(),u=k()?.orgSlug??null,d=O()?.organization?.slug??null,f=u??d,p=f?`/dashboard/${f}`:`/dashboard`,m=(0,$.jsxs)($.Fragment,{children:[c?(0,$.jsx)(`header`,{className:`pointer-events-none fixed inset-x-0 top-0 z-50 flex h-[var(--app-header-height)] items-center pl-4 pr-3`,children:(0,$.jsxs)(`div`,{className:`pointer-events-auto flex w-[var(--sidebar-expanded-width)] items-center gap-1`,children:[l?(0,$.jsx)(ae,{logoVariant:`color`,logoClassName:`h-7 w-7`}):(0,$.jsx)(M,{href:p,"aria-label":`Home`,className:`flex shrink-0 items-center justify-center rounded-full p-1.5 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:(0,$.jsx)(Je,{variant:`color`,className:`h-7 w-7`})}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`select-none text-lg text-muted-foreground/40`,children:`/`}),(0,$.jsx)(`div`,{className:`min-w-0`,children:(0,$.jsx)(vt,{variant:`header`})})]})}):null,c?(0,$.jsx)(ht,{subscriptionStatus:t,sidebarChatsSlot:n,sidebarAppsSlot:r}):null,(0,$.jsxs)(S,{children:[(0,$.jsx)(gt,{children:(0,$.jsx)(`div`,{className:`flex-1 min-h-0 overflow-hidden`,children:e})}),(0,$.jsx)(pt,{})]})]});return(0,$.jsx)(le,{hasHeader:o,children:(0,$.jsx)(ke,{session:Oe(),children:(0,$.jsx)(re,{value:{subscriptionStatus:t,sidebarChatsSlot:n,sidebarAppsSlot:r},children:m})})})}var bt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./profile-settings-client-B1voye8x.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]))).ProfileSettingsClient})),xt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./security-settings-client-DWO73c2l.js`),__vite__mapDeps([29,1,2,3,4,5,6,7,30,31,32,11,9,10,12,13,14,15,16,17,18,19,20,21,33,34,35,36,37,38,39,40,22,23,41,42,43,44,45,46,47,48,25,26,27,28]))).SecuritySettingsClient})),St=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./notifications-settings-client-DkAVJmlw.js`),__vite__mapDeps([49,1,2,50,51,52,53,3,5,6,54,9,10,12,17,13,18,19,21,37,39,40,28,48]))).NotificationsSettingsClient})),Ct=(0,Q.lazy)(async()=>({default:(await m(()=>
4import(`./workspace-settings-client-tE5reckL.js`),__vite__mapDeps([55,1,2,3,56,4,5,6,11,9,10,12,13,14,15,16,17,18,19,20,21,23,24,57,58,25,26,27,28]))).WorkspaceSettingsClient})),wt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./members-settings-client-C8zG4zKb.js`),__vite__mapDeps([59,1,2,3,4,5,6,7,60,61,62,30,63,64,11,9,10,12,13,14,15,16,17,18,19,20,21,22,23,65,35,36,37,42,43,44,39,45,46,47,66,67,68,24,57,58,69,70,71,72,73,41,74,75,34,76,77,78,79,80,81,82,83,84,28,85,86,48,87]))).MembersSettingsClient})),Tt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./display-settings-client-Cu7Bg6QO.js`),__vite__mapDeps([88,1,2,3,5,6,7,60,30,89,11,9,10,12,13,14,15,16,17,18,19,20,21,24,90,48,91,92,93,50,51,52,53,94]))).DisplaySettingsClient})),Et=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./api-keys-settings-client-B0OHJIxF.js`),__vite__mapDeps([95,1,2,3,96,97,53,98,99,36,100,11,9,10,12,13,14,15,101,102,56,4,24,57,58,71,103,23,104]))).ApiKeysSettingsClient})),Dt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./billing-settings-client-6e7k6d2m.js`),__vite__mapDeps([105,1,2,50,51,52,53,3,96,97,98,99,36,100,106,102,56,4,5,6,7,75,10,11,9,12,13,14,15,16,17,18,19,20,21,65,62,35,37,42,43,44,39,45,46,47,66,67,68,57,58,71,107,108,109,110,111,112,113,114,115,116,48,117,118,22,23]))).BillingSettingsClient})),Ot=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./danger-zone-settings-client-CiQVhQJ-.js`),__vite__mapDeps([119,1,2,3,4,5,6,7,8,11,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,57,58,107,41,35,36,37,42,43,44,39,45,46,47,28,48]))).DangerZoneSettingsClient})),kt=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./new-app-settings-client-DPpJ7fKj.js`),__vite__mapDeps([120,1,2,3,96,97,53,98,99,36,100,11,9,10,12,13,14,15,121,19,50,51,52,4,5,6,7,122,123,75,62,34,17,35,20,37,18,21,16,44,43,39,67,76,77,68,24,57,58,71,107,94,110,69,124,78,115,80,81,82,125,79,126,127,128,28,129,130,23,131,48]))).NewAppSettingsClient})),At=(0,Q.lazy)(async()=>({default:(await m(()=>import(`./app-settings-content-CXLWY35_.js`),__vite__mapDeps([132,1,2,50,51,52,53,3,96,97,98,99,36,100,56,102,133,5,6,7,8,122,123,134,61,135,136,30,137,138,139,140,141,142,143,144,145,32,146,147,9,10,11,12,13,14,15,148,149,150,151,152,153,154,23,155,156,16,17,18,19,20,21,33,34,35,37,38,39,40,65,62,42,43,44,45,46,47,66,67,68,24,130,4,57,58,107,94,72,157,75,158,159,76,160,77,78,79,126,103,104,161,162,41,74,80,81,82,83,84,54,163,28,85,86,48,117,93,25]))).AppSettingsContent}));function jt(){return(0,$.jsx)(`div`,{className:`flex min-h-[240px] items-center justify-center`,children:(0,$.jsx)(ye,{className:`size-5`})})}function Mt({orgSlug:e,target:t,appData:n}){let r=null;switch(t.section){case`profile`:r=(0,$.jsx)(bt,{});break;case`security`:r=(0,$.jsx)(xt,{});break;case`notifications`:r=(0,$.jsx)(St,{orgSlug:e});break;case`workspace`:r=(0,$.jsx)(Ct,{});break;case`members`:r=(0,$.jsx)(wt,{});break;case`display`:r=(0,$.jsx)(Tt,{});break;case`api-keys`:r=(0,$.jsx)(Et,{});break;case`billing`:r=(0,$.jsx)(Dt,{});break;case`danger`:r=(0,$.jsx)(Ot,{});break;case`new-app`:r=(0,$.jsx)(kt,{orgSlug:e});break;case`app`:r=n?(0,$.jsx)(At,{app:n.app,webhooks:n.webhooks,orgSlug:e}):null;break;default:r=null}return(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(jt,{}),children:r})}function Nt({orgSlug:e,target:t,appData:n}){return(0,$.jsx)(u,{orgSlug:e,currentTarget:t,mode:`masked`,children:(0,$.jsx)(de,{orgSlug:e,closeBehavior:{type:`back`},wide:t.section===`billing`,children:(0,$.jsx)(Mt,{orgSlug:e,target:t,appData:n})})})}function Pt({children:e}){return(0,$.jsx)(c,{children:e})}function Ft({children:e}){let t=V(A()),n=t?`100`:`30`,r=t?`8px`:`var(--app-header-height)`,i=je();return(0,$.jsx)(Re,{children:(0,$.jsx)(Pt,{children:(0,$.jsx)(Ve,{className:`h-dvh cursor-default antialiased`,style:{...t?{backgroundColor:i.editorBg}:{},"--editor-bg":i.editorBg,"--panel-bg":t?i.panelBg:`var(--rail-panel)`,"--panel-border":t?i.panelBorder:`var(--glass-edge)`,"--app-header-height":`44px`,"--sidebar-top-gap":`8px`,"--sidebar-top-offset":r,"--sidebar-z-index":n},children:e})})})}function It({orgSlug:e}){let{data:t}=f({queryKey:[...tt,e],queryFn:async()=>{let t=await Fe({data:{orgSlug:e}});return t.status===`ok`?t.chats:[]}});return(0,$.jsx)(zt,{chats:t??[]})}function Lt({row:e,pathname:t,selectedChatId:n}
4){let r=H(e.chat.id),i=H(e.project.id),a=typeof e.chat.name==`string`&&e.chat.name.trim().length>0?e.chat.name.trim():`New conversation`,o=`/task/${r}`;return(0,$.jsx)(I,{children:(0,$.jsxs)(B,{render:(0,$.jsx)(M,{href:o}),isActive:t===o||n===r,"data-testid":`chat-recents-link`,"data-chat-id":r,"data-project-id":i,className:`h-8`,children:[(0,$.jsx)(`div`,{className:`h-4 w-4 shrink-0 rounded-full border border-dashed border-muted-foreground/35`}),(0,$.jsx)(`span`,{className:`truncate`,children:a})]})},e.chat.id)}function Rt({open:e,icon:t,label:n}){return(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-1.5`,children:[(0,$.jsx)(h,{icon:t,className:`h-3.5 w-3.5`}),(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:n}),(0,$.jsx)(h,{icon:e?b:y,className:`h-4 w-4 opacity-50`})]})}function zt({chats:e}){let t=A(),n=Ne(),r=se(),i=n.get(`chat`),a=r?.activeChatId??null,o=i?H(i):a?H(a):null,[s,c]=Q.useState(!0);return(0,$.jsx)($.Fragment,{children:(0,$.jsx)(F,{children:(0,$.jsx)(`div`,{"data-testid":`chat-recents-section`,children:(0,$.jsxs)(it,{open:s,onOpenChange:c,children:[(0,$.jsx)(rt,{render:(0,$.jsx)(`button`,{type:`button`,className:`text-foreground/70 ring-ring h-8 w-full rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[pinned-collapsed=true]/sidebar-wrapper:transition-none group-data-[collapsed=true]/sidebar-wrapper:-mt-8 group-data-[collapsed=true]/sidebar-wrapper:opacity-0 focus-visible:ring-2 flex shrink-0 items-center outline-hidden`}),children:(0,$.jsx)(Rt,{open:s,icon:C,label:`Recents`})}),(0,$.jsx)(nt,{children:(0,$.jsx)(L,{children:e.length===0?(0,$.jsx)(I,{children:(0,$.jsx)(B,{"aria-disabled":!0,className:`h-8 opacity-60`,children:(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`No recent chats yet.`})})}):e.map(e=>(0,$.jsx)(Lt,{row:e,pathname:t,selectedChatId:o},e.chat.id))})})]})})})})}function Bt({orgSlug:e,apps:t}){let n=A();j();let r=`/dashboard/${e}`,[i,a]=Q.useState(!1),[o,s]=Q.useState(()=>new Set(t.map(e=>e.id)));Q.useEffect(()=>{s(e=>{let n=!1,r=new Set(e);for(let e of t)r.has(e.id)||(r.add(e.id),n=!0);return n?r:e})},[t]);let c=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},l=(e,t)=>{let i=`${r}/apps/${e}`;return t===``?n===i:n.startsWith(`${i}/${t}`)};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(F,{children:[(0,$.jsx)(Ue,{children:`Apps`}),(0,$.jsx)(He,{onClick:()=>a(!0),title:`Create new app`,children:(0,$.jsx)(h,{icon:_})}),(0,$.jsx)(L,{children:t.length===0?(0,$.jsx)(I,{className:`mt-2`,children:(0,$.jsx)(`div`,{className:`rounded-lg border-2 border-border px-4 py-5`,children:(0,$.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Add an app`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Create an app to get started.`})]}),(0,$.jsxs)(D,{onClick:()=>a(!0),size:`sm`,className:`mt-4 px-4`,children:[(0,$.jsx)(h,{icon:_,strokeWidth:2}),`Create App`]})]})})}):t.map(e=>{let t=`${r}/apps/${e.slug}`,n=o.has(e.id),i=et(e);return(0,$.jsx)(it,{open:n,onOpenChange:()=>c(e.id),children:(0,$.jsxs)(I,{children:[(0,$.jsxs)(rt,{render:(0,$.jsx)(B,{className:`h-auto min-h-9 py-2 hover:bg-transparent active:bg-transparent`}),children:[(0,$.jsx)(ot,{name:e.name,iconUrl:e.iconUrl,size:`xs`,distribution:e.distribution}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate leading-tight`,children:e.name}),i?(0,$.jsx)(`span`,{className:`mt-0.5 block truncate text-xs font-normal leading-tight text-muted-foreground`,children:i}):null]}),(0,$.jsx)(h,{icon:n?b:y,className:`ml-auto h-4 w-4 opacity-50`})]}),(0,$.jsx)(nt,{children:(0,$.jsxs)(ze,{children:[(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:t}),isActive:l(e.slug,``),children:[(0,$.jsx)(h,{icon:ct}),(0,$.jsx)(`span`,{children:`Analytics`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/experiences`}),isActive:l(e.slug,`experiences`),children:[(0,$.jsx)(h,{icon:_e}),(0,$.jsx)(`span`,{children:`Experiences`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/products`}),isActive:l(e.slug,`products`),children:[(0,$.jsx)(h,{icon:te}),(0,$.jsx)(`span`,{children:`Products`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/features`}),isActive:l(e.slug,`features`),children:[(0,$.jsx)(h,{icon:T}),(0,$.jsx)(`span`,{children:`Features`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/credits`}),isActive:l(e.slug,`credits`),children:[(0,$.jsx)(h,{icon:E}),(0,$.jsx)(`span`,{children:`Credits`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/customers`}),isActive:l(e.slug,`customers`),children:[(0,$.jsx)(h,{icon:ge}),(0,$.jsx)(`span`,{children:`Customers`})]})}),(0,$.jsx)(R,{children:(0,$.jsxs)(z,{render:(0,$.jsx)(M,{href:`${t}/segments`}),isActive:l(e.slug,`segments`),children:[(0,$.jsx)(h,{icon:he}),(0,$.jsx)(`span`,{children:`Segments`})]})})]})})]})},e.id)})})]}
4),(0,$.jsx)(at,{trigger:null,open:i,onOpenChange:a,completion:{kind:`navigate`,href:r}})]})}var Vt=()=>m(()=>import(`./dashboard._orgSlug-BuwTy493.js`),__vite__mapDeps([164,1,2,3,165,51,166,98,99,36,24,71,73]));function Ht(e){return e instanceof Date?e.toISOString():typeof e==`string`?e:``}var Ut=i(`/dashboard/$orgSlug`)({validateSearch:e=>({...e.forYou===`notification`?{forYou:`notification`}:{},...e.overlay===`settings`?{overlay:`settings`}:{},...typeof e.settingsSection==`string`&&d.includes(e.settingsSection)?{settingsSection:e.settingsSection}:{},...typeof e.settingsAppSlug==`string`?{settingsAppSlug:e.settingsAppSlug}:{}}),loaderDeps:({search:e})=>({forYou:e.forYou,overlay:e.overlay,settingsSection:e.settingsSection,settingsAppSlug:e.settingsAppSlug}),loader:async({params:e,deps:t,location:i})=>{let a=await Pe({data:{orgSlug:e.orgSlug}});if(N(a,`/dashboard/${e.orgSlug}`),a.status===`not-found`)throw n();if(a.status===`ok`&&a.data.signupSetupRequired&&i.pathname.replace(/\/$/u,``)===`/dashboard/${e.orgSlug}`)throw r({to:`/dashboard/welcome/$orgSlug`,params:{orgSlug:e.orgSlug}});if(a.status===`ok`&&a.data.appOnboardingChatId&&t.forYou!==`notification`&&i.pathname.replace(/\/$/u,``)===`/dashboard/${e.orgSlug}`)throw r({to:`/task/$chatId`,params:{chatId:a.data.appOnboardingChatId}});let o=null;if(t.overlay===`settings`&&t.settingsSection===`app`&&t.settingsAppSlug){let n=await st({data:{orgSlug:e.orgSlug,appSlug:t.settingsAppSlug}});if(N(n,`/dashboard/${e.orgSlug}/settings/apps/${t.settingsAppSlug}`),n.status===`ok`)o=n.data;else if(n.status===`redirect`){let t=await st({data:{orgSlug:e.orgSlug,appSlug:n.appSlug}});N(t,`/dashboard/${e.orgSlug}/settings/apps/${n.appSlug}`),o=t.status===`ok`?t.data:null}}return{...a.data,maskedSettingsAppData:o}},component:a(Vt,`component`)});function Wt({children:e,data:t,search:n}){let r=Xe(),i=t.shell.billingSummary,a=t.sidebar.subscriptionStatus,o=r?.environment??null,c=Ht(a?.trialEndsAt);return(0,$.jsx)(De,{value:(0,Q.useMemo)(()=>r&&{...r,organization:t.shell.org,workspaceId:t.shell.workspaceId,orgBillingSummary:t.shell.billingSummary},[t.shell.billingSummary,t.shell.org,t.shell.workspaceId,r])??null,children:(0,$.jsx)(Me,{org:t.shell.org,orgSlug:t.shell.orgSlug,billingSummary:t.shell.billingSummary,apps:t.shell.apps,children:(0,$.jsx)(Ft,{children:(0,$.jsx)(yt,{subscriptionStatus:a,sidebarChatsSlot:(0,$.jsx)(It,{orgSlug:t.shell.orgSlug}),sidebarAppsSlot:(0,$.jsx)(Bt,{orgSlug:t.shell.orgSlug,apps:t.sidebar.apps}),children:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{hidden:!0,"aria-hidden":`true`,"data-testid":`workspace-billing-state`,"data-workspace-id":t.shell.workspaceId,"data-plan":i?.plan??``,"data-environment":o??``,"data-subscription-status":a?.status??``,"data-credit-total":i?.credits?.total??``,"data-credit-unlimited":i?.credits?String(i.credits.unlimited):``,"data-trial-ends-at":c}),e??(0,$.jsx)(s,{}),n.overlay===`settings`&&n.settingsSection?(0,$.jsx)(Nt,{orgSlug:t.shell.orgSlug,target:n.settingsSection===`app`&&n.settingsAppSlug?{section:`app`,appSlug:n.settingsAppSlug}:{section:n.settingsSection===`app`?`profile`:n.settingsSection},appData:t.maskedSettingsAppData}):null]})})})})})}export{Ft as a,It as i,Ut as n,Nt as o,Bt as r,yt as s,Wt as t};
5//# debugId=c24bcf91-a885-5bf1-8805-5d4a4da050c4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.