react-semaphor 0.1.126 → 0.1.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/chunks/dashboard-controls-Dd27T34x.js +26 -0
  2. package/dist/chunks/dashboard-controls-I6kqudDF.js +1539 -0
  3. package/dist/chunks/dashboard-export-dialog-CiZbDQ5t.js +6 -0
  4. package/dist/chunks/dashboard-export-dialog-DEOlAtvs.js +601 -0
  5. package/dist/chunks/{dashboard-json-DpgglXTM.js → dashboard-json-A6ShtMJP.js} +1 -1
  6. package/dist/chunks/{dashboard-json-B7_R2nwz.js → dashboard-json-D_muUlA0.js} +1 -1
  7. package/dist/chunks/edit-dashboard-visual-BgRPk31F.js +195 -0
  8. package/dist/chunks/{edit-dashboard-visual-Dfdl-K74.js → edit-dashboard-visual-KhJjpeit.js} +5966 -4980
  9. package/dist/chunks/{editor-action-buttons-CsV8nUOI.js → editor-action-buttons-cJ_lq4jv.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-CMKMrnww.js → editor-action-buttons-umPHWm3K.js} +2 -2
  11. package/dist/chunks/{index-BdiWSBWd.js → index-Bko2LZ3Y.js} +5816 -5795
  12. package/dist/chunks/{index-GG6fcfuj.js → index-CM_yfKlN.js} +192 -187
  13. package/dist/chunks/{resource-management-panel-CdC7mFhx.js → resource-management-panel-DAdIhRme.js} +88 -88
  14. package/dist/chunks/{resource-management-panel-3Q8phtkW.js → resource-management-panel-DvgyBS2t.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-BE_5Rl3X.js → use-visual-utils-80E0OR0x.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-CxVLCLOf.js → use-visual-utils-C7QMpNLz.js} +8 -8
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +2 -2
  20. package/dist/index.js +88 -87
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. package/dist/types/dashboard.d.ts +1 -1
  25. package/dist/types/main.d.ts +19 -43
  26. package/dist/types/surfboard.d.ts +1 -1
  27. package/dist/types/types.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunks/dashboard-controls-BktHa763.js +0 -1473
  30. package/dist/chunks/dashboard-controls-DucLNOji.js +0 -26
  31. package/dist/chunks/dashboard-export-dialog-BNjL5KSw.js +0 -600
  32. package/dist/chunks/dashboard-export-dialog-M318NGd7.js +0 -6
  33. package/dist/chunks/edit-dashboard-visual-BaNXGTU-.js +0 -170
@@ -1,26 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-GG6fcfuj.js"),j=require("react");require("react-dom");const R=require("./dashboard-export-dialog-M318NGd7.js"),ne=require("./editor-action-buttons-CsV8nUOI.js");function Ce(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const S=Ce(j);/**
2
- * @license lucide-react v0.453.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Me=s.createLucideIcon("Glasses",[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]]);/**
7
- * @license lucide-react v0.453.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Le=s.createLucideIcon("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
12
- * @license lucide-react v0.453.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const ke=s.createLucideIcon("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
17
- * @license lucide-react v0.453.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Ie=s.createLucideIcon("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
22
- * @license lucide-react v0.453.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Te=s.createLucideIcon("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var Ae=s.requireShim();function Ee(){const{setTheme:t}=s.useTheme(),n=s.useDashboardStore(a=>a.actions.setDashboardTheme);return e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsxs(s.Button,{className:"h-7 p-2",variant:"ghost",size:"sm",children:[e.jsx(Te,{strokeWidth:1.5,className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),e.jsx(ke,{strokeWidth:1.5,className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),e.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),e.jsxs(s.DropdownMenuContent,{align:"end",children:[e.jsx(s.DropdownMenuItem,{onClick:()=>{t("light"),n("light")},children:"Light"}),e.jsx(s.DropdownMenuItem,{onClick:()=>{t("dark"),n("dark")},children:"Dark"}),e.jsx(s.DropdownMenuItem,{onClick:()=>{t("system"),n("system")},children:"System"})]})]})}async function Pe(t,n,a,r,i){if(!i)return null;const o=JSON.stringify(a),l=`${t}/v1/lens`;return await s.postRequest(l,i,{name:n,template:o,filterValues:r,operation:"create"})}async function W(t,n,a){if(!a)return null;const{id:r,template:i,filterValues:o,isDefault:l,shared:u}=n,h=`${t}/v1/lens`;return await s.postRequest(h,a,{lensId:r,template:i,filterValues:o,isDefault:l,shared:u,operation:"update"})}async function Fe(t,n,a){if(!a)return null;const r=`${t}/v1/lens`;return await s.postRequest(r,a,{operation:"delete",lensId:n})}function Re(){const[t,n]=j.useState(""),[a,r]=j.useState(!1),i=s.useDashboardStore(D=>D.lenses),{setLenses:o,setSelectedLensId:l}=s.useDashboardActions(),[u,h]=j.useState(!1),[g,d]=j.useState(!1),m=s.useDashboardStore(D=>D.dashboard),x=s.useDashboardStore(D=>D.filterValues),{authToken:f,tokenProps:b}=s.useSemaphorContext();async function N(){h(!0);const D=R.getDashbaordStateWithoutData(m),C=await Pe(b.apiServiceUrl,t,D,x,f==null?void 0:f.accessToken);C&&(o([...i||[],C]),l(C.id),d(!1)),h(!1)}return e.jsxs(s.Dialog,{open:g,onOpenChange:d,children:[e.jsx(s.DialogTrigger,{asChild:!0,children:e.jsxs(s.Button,{variant:"secondary",className:"h-7 p-2",size:"sm",children:[e.jsx(s.Plus,{className:"mr-2 h-4 w-4"}),"Lens"]})}),e.jsxs(s.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(s.DialogHeader,{children:[e.jsx(s.DialogTitle,{children:"Create Lens"}),e.jsx(s.DialogDescription,{children:"Lenses are private by default and are only visible to you."})]}),e.jsx("div",{className:"grid gap-4 py-4",children:e.jsxs("div",{className:"grid grid-cols-8 items-center gap-4",children:[e.jsx(s.Label,{className:"text-right",children:"Name"}),e.jsx(s.Input$1,{value:t,onChange:D=>{n(D.target.value)},id:"name",className:"col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"})]})}),a&&e.jsx("p",{className:"text-sm",children:"The lens name already exists. Use a differnet name."}),e.jsx(s.DialogFooter,{children:e.jsx(s.Button,{size:"sm",variant:"outline",type:"submit",onClick:N,disabled:u,children:u?"Creating...":"Add"})})]})]})}function Ge(){const[t,n]=j.useState(!1),a=s.useDashboardStore(m=>m.lenses),r=s.useDashboardStore(m=>m.selectedLensId),{setLenses:i,setSelectedLensId:o}=s.useDashboardActions(),{authToken:l,tokenProps:u}=s.useSemaphorContext();async function h(m){o(m)}async function g(m){if(await Fe(u.apiServiceUrl,m,l==null?void 0:l.accessToken)){const f=a==null?void 0:a.filter(b=>b.id!==m);i(f||[]),o("original")}}async function d(m){const x=a==null?void 0:a.map(N=>N.id===m.id?{...N,isDefault:!m.isDefault}:{...N,isDefault:!1});i(x||[]);const f={...m,isDefault:!m.isDefault};await W(u.apiServiceUrl,f,l==null?void 0:l.accessToken);const b=a==null?void 0:a.find(N=>N.isDefault);if(b&&b.id!==m.id){const N={...b,isDefault:!1};await W(u.apiServiceUrl,N,l==null?void 0:l.accessToken)}}return e.jsxs(s.DropdownMenu,{open:t,onOpenChange:n,children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.IconButton,{tooltip:"Lenses",className:"h-7 p-2",children:e.jsx(Me,{className:"h-4 w-4"})})}),e.jsxs(s.DropdownMenuContent,{align:"end",className:"w-60",children:[e.jsx(s.DropdownMenuLabel,{className:"px-3",children:"Lenses"}),e.jsx(s.DropdownMenuSeparator,{}),e.jsxs(s.DropdownMenuRadioGroup,{value:r,onValueChange:h,children:[e.jsx(s.DropdownMenuRadioItem,{value:"original",children:"Original"}),a==null?void 0:a.map(m=>e.jsxs(s.DropdownMenuRadioItem,{className:"group flex justify-between gap-2",value:m.id,children:[e.jsx("p",{children:m.name}),e.jsxs("span",{className:"flex items-center gap-3",children:[e.jsx(s.House,{onClick:x=>{x.preventDefault(),d(m)},className:s.cn("size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",{invisible:!m.isDefault,"text-green-500":m.isDefault}),strokeWidth:1.5}),e.jsx(s.Cross2Icon,{onClick:x=>{x.preventDefault(),g(m.id)},className:"invisible size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",strokeWidth:1.5})]})]},m.id))]})]})]})}function Oe({iconClassName:t}){const[n,a]=j.useState(!1),r=s.useDashboardStore(i=>i.isDownloadingPdf);return e.jsxs(e.Fragment,{children:[e.jsx(s.Button,{variant:"ghost",size:"sm",className:"h-7 p-2",disabled:r,onClick:()=>a(!0),children:e.jsx(s.Download,{className:s.cn("size-4",t)})}),e.jsx(R.DashboardExportDialog,{open:n,onOpenChange:a})]})}const Ue=async(t,n,a)=>{const r=`${t}/management/v1/groups`;return await s.postRequestRegular(r,n,a)},Be=async(t,n,a)=>{const r=`${t}/management/v1/groups/${a}`,i=await fetch(r,{method:"DELETE",headers:{Authorization:`Bearer ${n}`}});if(!i.ok){const o=await i.text();throw new Error(o||"Failed to delete group")}},qe=async(t,n,a,r)=>{const i=`${t}/management/v1/groups/${a}/members`;return await s.postRequestRegular(i,n,r)},$e=async(t,n,a,r)=>{const i=`${t}/management/v1/groups/${a}/members`,o=await fetch(i,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(r)});if(!o.ok){const l=await o.text();throw new Error(l||"Failed to remove group members")}};function _e(){const{authToken:t,tokenProps:n}=s.useSemaphorContext(),a=s.useQueryClient();return s.useMutation({mutationFn:r=>Ue(n.apiServiceUrl,(t==null?void 0:t.accessToken)||"",r),onSuccess:()=>{a.invalidateQueries({queryKey:["groups"]}),s.ue.success("Group created successfully")},onError:r=>{console.error("Failed to create group:",r),s.ue.error("Failed to create group",{description:r.message})}})}function ze(){const{authToken:t,tokenProps:n}=s.useSemaphorContext(),a=s.useQueryClient();return s.useMutation({mutationFn:r=>Be(n.apiServiceUrl,(t==null?void 0:t.accessToken)||"",r),onSuccess:(r,i)=>{a.invalidateQueries({queryKey:["groups"]}),a.removeQueries({queryKey:["group",i]}),s.ue.success("Group deleted successfully")},onError:r=>{console.error("Failed to delete group:",r),s.ue.error("Failed to delete group",{description:r.message})}})}function Qe(){const{authToken:t,tokenProps:n}=s.useSemaphorContext(),a=s.useQueryClient();return s.useMutation({mutationFn:({groupId:r,data:i})=>qe(n.apiServiceUrl,(t==null?void 0:t.accessToken)||"",r,i),onSuccess:(r,i)=>{a.invalidateQueries({queryKey:["group",i.groupId]}),a.invalidateQueries({queryKey:["group-members",i.groupId]}),a.invalidateQueries({queryKey:["groups"]}),s.ue.success("Members added successfully")},onError:r=>{console.error("Failed to add group members:",r),s.ue.error("Failed to add members",{description:r.message})}})}function He(){const{authToken:t,tokenProps:n}=s.useSemaphorContext(),a=s.useQueryClient();return s.useMutation({mutationFn:({groupId:r,data:i})=>$e(n.apiServiceUrl,(t==null?void 0:t.accessToken)||"",r,i),onSuccess:(r,i)=>{a.invalidateQueries({queryKey:["group",i.groupId]}),a.invalidateQueries({queryKey:["group-members",i.groupId]}),a.invalidateQueries({queryKey:["groups"]}),s.ue.success("Members removed successfully")},onError:r=>{console.error("Failed to remove group members:",r),s.ue.error("Failed to remove members",{description:r.message})}})}function Ve({onSuccess:t,tenantId:n,isTenantUser:a}){const[r,i]=j.useState(""),[o,l]=j.useState(""),[u,h]=j.useState({}),g=_e(),d=()=>{const x={};return r.trim()?r.length<3?x.name="Group name must be at least 3 characters":r.length>50&&(x.name="Group name must be less than 50 characters"):x.name="Group name is required",o&&o.length>200&&(x.description="Description must be less than 200 characters"),h(x),Object.keys(x).length===0},m=async x=>{if(x.preventDefault(),!d())return;const f={name:r.trim(),description:o.trim()||void 0,type:a?"TENANT_GROUP":"ORG_GROUP",...a&&n?{tenantId:n}:{}};try{await g.mutateAsync(f),i(""),l(""),h({}),t()}catch(b){console.error("Failed to create group:",b)}};return e.jsxs("form",{onSubmit:m,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(s.Label,{htmlFor:"group-name",children:["Group Name ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(s.Input$1,{id:"group-name",placeholder:"e.g., Marketing Team, Engineering Squad",value:r,onChange:x=>{i(x.target.value),u.name&&h(f=>({...f,name:""}))},className:u.name?"border-destructive":"",disabled:g.isPending}),u.name&&e.jsx("p",{className:"text-sm text-destructive",children:u.name})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(s.Label,{htmlFor:"group-description",children:["Description",e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"(optional)"})]}),e.jsx(s.Textarea,{id:"group-description",placeholder:"Describe the purpose of this group...",value:o,onChange:x=>{l(x.target.value),u.description&&h(f=>({...f,description:""}))},className:u.description?"border-destructive":"",disabled:g.isPending,rows:3}),u.description&&e.jsx("p",{className:"text-sm text-destructive",children:u.description}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.length,"/200 characters"]})]}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(s.CircleAlert,{className:"h-4 w-4 mt-0.5 text-muted-foreground"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"This group will be accessible to users in your workspace. You can add members after creating the group."})]})})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(s.Button,{type:"button",variant:"outline",onClick:()=>{i(""),l(""),h({})},disabled:g.isPending,children:"Clear"}),e.jsx(s.Button,{type:"submit",disabled:g.isPending||!r.trim(),children:g.isPending?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(s.Users,{className:"mr-2 h-4 w-4"}),"Create Group"]})})]})]})}function We(t,n=[]){let a=[];function r(o,l){const u=S.createContext(l),h=a.length;a=[...a,l];const g=m=>{var C;const{scope:x,children:f,...b}=m,N=((C=x==null?void 0:x[t])==null?void 0:C[h])||u,D=S.useMemo(()=>b,Object.values(b));return e.jsx(N.Provider,{value:D,children:f})};g.displayName=o+"Provider";function d(m,x){var N;const f=((N=x==null?void 0:x[t])==null?void 0:N[h])||u,b=S.useContext(f);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[g,d]}const i=()=>{const o=a.map(l=>S.createContext(l));return function(u){const h=(u==null?void 0:u[t])||o;return S.useMemo(()=>({[`__scope${t}`]:{...u,[t]:h}}),[u,h])}};return i.scopeName=t,[r,Ke(i,...n)]}function Ke(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:h,scopeName:g})=>{const m=h(o)[`__scope${g}`];return{...u,...m}},{});return S.useMemo(()=>({[`__scope${n.scopeName}`]:l}),[l])}};return a.scopeName=n.scopeName,a}function Je(t){const n=S.useRef(t);return S.useEffect(()=>{n.current=t}),S.useMemo(()=>(...a)=>{var r;return(r=n.current)==null?void 0:r.call(n,...a)},[])}var K=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Xe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=Xe.reduce((t,n)=>{const a=s.createSlot(`Primitive.${n}`),r=S.forwardRef((i,o)=>{const{asChild:l,...u}=i,h=l?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(h,{...u,ref:o})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{});function Ye(){return Ae.useSyncExternalStore(Ze,()=>!0,()=>!1)}function Ze(){return()=>{}}var X="Avatar",[es]=We(X),[ss,ie]=es(X),ce=S.forwardRef((t,n)=>{const{__scopeAvatar:a,...r}=t,[i,o]=S.useState("idle");return e.jsx(ss,{scope:a,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:e.jsx(J.span,{...r,ref:n})})});ce.displayName=X;var le="AvatarImage",de=S.forwardRef((t,n)=>{const{__scopeAvatar:a,src:r,onLoadingStatusChange:i=()=>{},...o}=t,l=ie(le,a),u=ts(r,o),h=Je(g=>{i(g),l.onImageLoadingStatusChange(g)});return K(()=>{u!=="idle"&&h(u)},[u,h]),u==="loaded"?e.jsx(J.img,{...o,ref:n,src:r}):null});de.displayName=le;var ue="AvatarFallback",me=S.forwardRef((t,n)=>{const{__scopeAvatar:a,delayMs:r,...i}=t,o=ie(ue,a),[l,u]=S.useState(r===void 0);return S.useEffect(()=>{if(r!==void 0){const h=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(h)}},[r]),l&&o.imageLoadingStatus!=="loaded"?e.jsx(J.span,{...i,ref:n}):null});me.displayName=ue;function oe(t,n){return t?n?(t.src!==n&&(t.src=n),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ts(t,{referrerPolicy:n,crossOrigin:a}){const r=Ye(),i=S.useRef(null),o=r?(i.current||(i.current=new window.Image),i.current):null,[l,u]=S.useState(()=>oe(o,t));return K(()=>{u(oe(o,t))},[o,t]),K(()=>{const h=m=>()=>{u(m)};if(!o)return;const g=h("loaded"),d=h("error");return o.addEventListener("load",g),o.addEventListener("error",d),n&&(o.referrerPolicy=n),typeof a=="string"&&(o.crossOrigin=a),()=>{o.removeEventListener("load",g),o.removeEventListener("error",d)}},[o,a,n]),l}var he=ce,pe=de,xe=me;const Y=S.forwardRef(({className:t,...n},a)=>e.jsx(he,{ref:a,className:s.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...n}));Y.displayName=he.displayName;const as=S.forwardRef(({className:t,...n},a)=>e.jsx(pe,{ref:a,className:s.cn("aspect-square h-full w-full",t),...n}));as.displayName=pe.displayName;const Z=S.forwardRef(({className:t,...n},a)=>e.jsx(xe,{ref:a,className:s.cn("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...n}));Z.displayName=xe.displayName;function rs({open:t,onOpenChange:n,group:a,onUpdate:r}){const[i,o]=j.useState("members"),[l,u]=j.useState(""),[h,g]=j.useState([]),[d,m]=j.useState([]),{data:x,isLoading:f,refetch:b}=s.useGroupMembers(a.id),N=a.type==="TENANT_GROUP"?"tenant":"organization",{users:D,isLoading:C}=s.useUnifiedUsers({type:N,tenantId:a.tenantId||void 0,active:!0,limit:100}),A=Qe(),T=He(),M=(x==null?void 0:x.members)||[],G=j.useMemo(()=>new Set(M.map(p=>p.userId)),[M]),v=j.useMemo(()=>D.filter(p=>!G.has(p.id)),[D,G]),I=j.useMemo(()=>{if(!l)return v;const p=l.toLowerCase();return v.filter(w=>{var L,P;return((L=w.name)==null?void 0:L.toLowerCase().includes(p))||((P=w.email)==null?void 0:P.toLowerCase().includes(p))})},[v,l]),y=j.useMemo(()=>{if(!l)return M;const p=l.toLowerCase();return M.filter(w=>{var L,P,q,F;return((P=(L=w.user)==null?void 0:L.name)==null?void 0:P.toLowerCase().includes(p))||((F=(q=w.user)==null?void 0:q.email)==null?void 0:F.toLowerCase().includes(p))})},[M,l]),E=async()=>{if(h.length!==0)try{await A.mutateAsync({groupId:a.id,data:{userIds:h,userType:N==="tenant"?"tenant":"org"}}),g([]),o("members"),b(),r==null||r()}catch(p){console.error("Failed to add members:",p)}},z=async()=>{if(d.length!==0)try{await T.mutateAsync({groupId:a.id,data:{userIds:d}}),m([]),b(),r==null||r()}catch(p){console.error("Failed to remove members:",p)}},Q=p=>{g(w=>w.includes(p)?w.filter(L=>L!==p):[...w,p])},U=p=>{m(w=>w.includes(p)?w.filter(L=>L!==p):[...w,p])};return e.jsx(e.Fragment,{children:e.jsx(s.Dialog,{open:t,onOpenChange:n,children:e.jsxs(s.DialogContent,{className:"max-w-3xl max-h-[80vh]","aria-describedby":"group-members-description",children:[e.jsxs(s.DialogHeader,{children:[e.jsx(s.DialogTitle,{children:a.name}),e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[M.length," ",M.length===1?"member":"members"]})}),e.jsxs("p",{id:"group-members-description",className:"sr-only",children:["Add or remove members from the ",a.name," group"]})]}),e.jsxs(s.Tabs,{value:i,onValueChange:p=>{o(p),u(""),m([])},className:"mt-4",children:[e.jsxs(s.TabsList,{className:"grid w-full grid-cols-2",children:[e.jsx(s.TabsTrigger,{value:"members",children:"Current Members"}),e.jsx(s.TabsTrigger,{value:"add",children:"Add Members"})]}),e.jsxs(s.TabsContent,{value:"members",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(s.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(s.Input$1,{placeholder:"Search members...",value:l,onChange:p=>u(p.target.value),className:"pl-10"})]}),e.jsx(s.ScrollArea,{className:d.length>0?"h-[300px]":"h-[350px]",children:f?e.jsx("div",{className:"space-y-2",children:[1,2,3].map(p=>e.jsx(s.Skeleton,{className:"h-16 w-full"},p))}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(s.Users,{className:"h-12 w-12 mb-3 opacity-50"}),e.jsx("p",{className:"text-sm font-medium",children:l?"No members found":"No members yet"}),e.jsx("p",{className:"text-xs mt-1",children:l?"Try a different search":'Switch to the "Add Members" tab to add people to this group'})]}):e.jsx("div",{className:"space-y-2",children:y.map(p=>e.jsx(ns,{member:p,selected:d.includes(p.userId),onToggle:()=>U(p.userId)},p.id))})}),d.length>0&&e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[d.length," member",d.length!==1?"s":""," selected"]}),e.jsx(s.Button,{variant:"destructive",size:"sm",onClick:z,disabled:T.isPending,children:T.isPending?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Removing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(s.Trash2,{className:"mr-2 h-4 w-4"}),"Remove Selected"]})})]})]}),e.jsxs(s.TabsContent,{value:"add",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(s.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(s.Input$1,{placeholder:"Search users to add...",value:l,onChange:p=>u(p.target.value),className:"pl-10"})]}),e.jsx(s.ScrollArea,{className:"h-[300px]",children:C?e.jsx("div",{className:"space-y-2",children:[1,2,3].map(p=>e.jsx(s.Skeleton,{className:"h-16 w-full"},p))}):I.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(s.UserPlus,{className:"h-12 w-12 mb-3 opacity-50"}),e.jsx("p",{className:"text-sm font-medium",children:"No available users"}),e.jsx("p",{className:"text-xs mt-1",children:l?"Try a different search":"All eligible users are already members"})]}):e.jsx("div",{className:"space-y-2",children:I.map(p=>e.jsx(os,{user:p,selected:h.includes(p.id),onToggle:()=>Q(p.id)},p.id))})}),h.length>0&&e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[h.length," user",h.length!==1?"s":""," selected"]}),e.jsx(s.Button,{onClick:E,disabled:A.isPending,children:A.isPending?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Adding..."]}):e.jsxs(e.Fragment,{children:[e.jsx(s.UserPlus,{className:"mr-2 h-4 w-4"}),"Add Members"]})})]})]})]})]})})})}function ns({member:t,selected:n,onToggle:a}){var i,o,l,u;const r=((o=(i=t.user)==null?void 0:i.name)==null?void 0:o.split(" ").map(h=>h[0]).join("").toUpperCase())||"?";return e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",onClick:a,children:[e.jsx(s.Checkbox,{checked:n}),e.jsx(Y,{className:"h-8 w-8",children:e.jsx(Z,{className:"text-xs",children:r})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:((l=t.user)==null?void 0:l.name)||"Unknown User"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:(u=t.user)==null?void 0:u.email})]})]})}function os({user:t,selected:n,onToggle:a}){var i;const r=((i=t.name)==null?void 0:i.split(" ").map(o=>o[0]).join("").toUpperCase())||"?";return e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",onClick:a,children:[e.jsx(s.Checkbox,{checked:n}),e.jsx(Y,{className:"h-8 w-8",children:e.jsx(Z,{className:"text-xs",children:r})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.email})]})]})}function is({open:t,onOpenChange:n}){const[a,r]=j.useState("groups"),[i,o]=j.useState(""),[l,u]=j.useState(null),[h,g]=j.useState(!1),[d,m]=j.useState(null),{tokenProps:x}=s.useSemaphorContext(),{currentUser:f}=s.useCurrentUserInfo(),b=ze(),N=(f==null?void 0:f.type)==="tenant",D=x==null?void 0:x.tenantId,{groups:C,isLoading:A,refetch:T}=s.useGroups({type:N?"TENANT_GROUP":"all",tenantId:N?D:void 0,includeMembers:!1}),M=C.filter(y=>{var E;return y.name.toLowerCase().includes(i.toLowerCase())||((E=y.description)==null?void 0:E.toLowerCase().includes(i.toLowerCase()))}),G=async()=>{if(d)try{await b.mutateAsync(d.id),m(null),T()}catch(y){console.error("Failed to delete group:",y)}},v=y=>{u(y),g(!0)},I=()=>{r("groups"),T()};return e.jsxs(e.Fragment,{children:[e.jsx(s.Dialog,{open:t,onOpenChange:n,children:e.jsxs(s.DialogContent,{className:"max-w-4xl max-h-[80vh]",children:[e.jsxs(s.DialogHeader,{children:[e.jsxs(s.DialogTitle,{className:"flex items-center gap-2",children:[e.jsx(s.Users,{className:"h-5 w-5"}),"Group Management"]}),e.jsx(s.DialogDescription,{children:"Manage your groups, create new groups, and control group membership"})]}),e.jsxs(s.Tabs,{value:a,onValueChange:r,className:"mt-4",children:[e.jsxs(s.TabsList,{className:"grid w-full grid-cols-2",children:[e.jsxs(s.TabsTrigger,{value:"groups",className:"flex items-center gap-2",children:[e.jsx(s.Users,{className:"h-4 w-4"}),"Groups"]}),e.jsxs(s.TabsTrigger,{value:"create",className:"flex items-center gap-2",children:[e.jsx(s.Plus,{className:"h-4 w-4"}),"Create Group"]})]}),e.jsx(s.TabsContent,{value:"groups",className:"mt-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(s.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(s.Input$1,{placeholder:"Search groups...",value:i,onChange:y=>o(y.target.value),className:"pl-10"})]}),e.jsx(s.ScrollArea,{className:"h-[400px]",children:A?e.jsx("div",{className:"space-y-3",children:[1,2,3].map(y=>e.jsx(s.Skeleton,{className:"h-24 w-full"},y))}):M.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(s.Users,{className:"h-12 w-12 mb-3 opacity-50"}),e.jsx("p",{className:"text-sm font-medium",children:"No groups found"}),e.jsx("p",{className:"text-xs mt-1",children:i?"Try a different search":"Create your first group to get started"})]}):e.jsx("div",{className:"space-y-3",children:M.map(y=>e.jsx(cs,{group:y,onManageMembers:()=>v(y),onDelete:()=>m(y),currentUserId:f==null?void 0:f.id},y.id))})})]})}),e.jsx(s.TabsContent,{value:"create",className:"mt-4",children:e.jsx(Ve,{onSuccess:I,tenantId:D,isTenantUser:N})})]})]})}),l&&e.jsx(rs,{open:h,onOpenChange:g,group:l,onUpdate:()=>T()}),e.jsx(s.AlertDialog,{open:!!d,onOpenChange:()=>m(null),children:e.jsxs(s.AlertDialogContent,{children:[e.jsxs(s.AlertDialogHeader,{children:[e.jsx(s.AlertDialogTitle,{children:"Delete Group"}),e.jsxs(s.AlertDialogDescription,{children:['Are you sure you want to delete "',d==null?void 0:d.name,'"? This action cannot be undone and will remove all members from the group.']})]}),e.jsxs(s.AlertDialogFooter,{children:[e.jsx(s.AlertDialogCancel,{children:"Cancel"}),e.jsx(s.AlertDialogAction,{onClick:G,disabled:b.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):"Delete Group"})]})]})})]})}function cs({group:t,onManageMembers:n,onDelete:a,currentUserId:r}){const i=t.createdBy===r;return e.jsx("div",{className:"rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t.description})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(s.Users,{className:"h-3 w-3"}),t.memberCount," ",t.memberCount===1?"member":"members"]}),e.jsxs("span",{children:["Created ",s.format(new Date(t.createdAt),"MMM d, yyyy")]})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(s.Button,{variant:"ghost",size:"sm",onClick:n,title:"Manage members",children:e.jsx(s.UserPlus,{className:"h-4 w-4"})}),i&&e.jsx(s.Button,{variant:"ghost",size:"sm",onClick:a,title:"Delete group",className:"text-destructive hover:text-destructive",children:e.jsx(s.Trash2,{className:"h-4 w-4"})})]})]})})}function ls(){var te,ae,re;const{authToken:t,tokenProps:n,id:a}=s.useSemaphorContext(),{isLocalDev:r}=s.useDashboardPreferences(),{permissions:i}=s.useRoleAwareDisplayPreferences(),o=s.useHasDashboardId(),{isLoading:l}=s.useDashboardQuery();s.useDashboardStore(c=>c.theme);const u=s.useDashboardStore(c=>c.lenses),h=s.useDashboardStore(c=>c.selectedLensId),g=u==null?void 0:u.find(c=>c.id===h),d=s.useDashboardStore(c=>c.dashboard);s.useDashboardStore(c=>c.selectedSheetId);const m=s.useDashboardStore(c=>c.isDashboardEditing),{setDashboardTitle:x}=s.useDashboardStore(c=>c.actions),[f,b]=j.useState(!1),[N,D]=j.useState(!1),[C,A]=j.useState(!1),T=s.useDashboardStore(c=>c.isDashboardPanelOpen),M=s.useDashboardStore(c=>c.actions.setIsDashboardPanelOpen),G=s.useDashboardStore(c=>c.filterValues),v=s.useDashboardStore(c=>c.isVisualEditing);s.useEditorStore(c=>c.card);const I=s.useManagementStore(c=>c.selectedDashboard),y=s.useManagementStore(c=>c.initialDashboard);s.useManagementStore(c=>c.selectedVisual),s.useDashboardStore(c=>c.selectedFrameId),s.useEditorStore(c=>c.frame);const E=I?(ae=I==null?void 0:I.permissions)==null?void 0:ae.canEdit:(te=y==null?void 0:y.permissions)==null?void 0:te.canEdit,z=s.useDashboardStore(c=>c.showFilters),Q=s.useDashboardStore(c=>c.showDashboardJSON),U=s.useDashboardStore(c=>c.onSaveFunction),p=s.useDashboardStore(c=>c.actions.setShowFilters),{setIsDashboardEditing:w,setShowDashboardJSON:L}=s.useDashboardStore(c=>c.actions),{setInitialDashboard:P,clearSelectedDashboard:q}=s.useManagementStore(c=>c.actions),{resources:F}=s.useResourceManagement(s.ResourceType.DASHBOARD),{currentUser:ge}=s.useCurrentUserInfo(),fe=s.canUserManageGroups(ge),O=I||y,ee=O?{id:O.id,title:(d==null?void 0:d.title)||O.title||"Dashboard"}:null,{handleAddNewFrame:je}=s.useAddNewFrame(),[H,V]=j.useState(!1),$=s.useUpdateResource(s.ResourceType.DASHBOARD),be=async(c,k)=>{if(!(d!=null&&d.id)){console.log("No dashboard ID found");return}console.log("Updating dashboard title:",{dashboardId:d.id,newTitle:c,previousTitle:k}),$.mutate({resourceId:d.id,data:{title:c}},{onSuccess:()=>{console.log("Dashboard title updated successfully"),s.ue.success("Dashboard title updated")},onError:B=>{console.error("Failed to update dashboard title:",B),s.ue.error("Failed to update dashboard title"),x(k)}})};j.useEffect(()=>{if(F&&F.length>0){const c=d==null?void 0:d.id;if(c){const k=F.find(B=>B.id===c);k&&P(k)}}},[F,d==null?void 0:d.id,P]);const _=n.orgUserId||n.tenantId,ve=m&&!v&&_&&E,Ne=()=>{w(!0)};async function ye(){const c=R.getDashbaordStateWithoutData(d);V(!0);const k={template:c};$.mutate({resourceId:c.id,data:k},{onSuccess:()=>{V(!1),s.ue.success("Dashboard saved!")},onError:()=>{V(!1),s.ue.error("Failed to save dashboard")}})}async function Se(){if(b(!0),!h||!g)return;const c=R.getDashbaordStateWithoutData(d),k=JSON.stringify(c),B={...g,template:k,filterValues:G};await W(n.apiServiceUrl,B,t==null?void 0:t.accessToken),s.ue.success("Lens saved"),U==null||U(c),b(!1)}const se=(g==null?void 0:g.name)||d.title;$.isPending&&console.log("Title during update:",{title:se,dashboardStateTitle:d.title,dashboardId:d==null?void 0:d.id,currentLensName:g==null?void 0:g.name});const De=n.orgUserId||n.tenantId&&n.endUserId&&n.endUserEmail,we=o;return e.jsxs("div",{className:"flex h-11 items-center justify-between gap-2 border-b px-4 py-2",role:"dashboard-controls",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[De&&e.jsxs(e.Fragment,{children:[e.jsx(s.IconButton,{"aria-label":"Manage Dashboards",tooltip:"Manage Dashboards",onClick:()=>{M(!T)},className:"h-7 p-2",children:e.jsx(Le,{className:"h-4 w-4"})}),we&&!v&&e.jsx(s.IconButton,{"aria-label":"Dashboard Hub",tooltip:"Dashboard Hub",onClick:()=>q(),className:"h-7 p-2",children:e.jsx(s.House,{className:"h-4 w-4"})})]}),!v&&o&&(l?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(s.LoaderCircle,{className:"h-3 w-3 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]}):e.jsx(s.EditableText,{value:se||"Untitled Dashboard",onSave:c=>{console.log("EditableText onSave called:",{newTitle:c,canEditDashboard:E,dashboardId:d==null?void 0:d.id});const k=(d==null?void 0:d.title)||"";x(c),be(c,k)},isEditable:E&&!g,displayClassName:"text-sm font-medium",inputClassName:"text-sm font-medium",placeholder:"Dashboard Title",isPending:$.isPending}))]}),e.jsxs("div",{className:"flex items-center gap-2",children:[v&&e.jsxs(e.Fragment,{children:[e.jsx(R.AdvancedModeToggle,{className:"mr-2"}),e.jsx(R.VisualEditingControls,{className:"h-7"})]}),r&&!v&&e.jsxs(e.Fragment,{children:[e.jsx(s.IconButton,{tooltip:"Copy Token",onClick:()=>{var c;t!=null&&t.accessToken&&((c=navigator==null?void 0:navigator.clipboard)!=null&&c.writeText?navigator.clipboard.writeText(t.accessToken).then(()=>s.ue.success("Token copied to clipboard")).catch(()=>s.ue.error("Unable to copy token")):s.ue.error("Clipboard not available"))},className:"h-7 p-2",children:e.jsx(s.Copy,{className:"h-4 w-4"})}),e.jsx(s.IconButton,{tooltip:"Invalidate Token",onClick:()=>s.invalidateToken(n.apiServiceUrl),className:"h-7 p-2",children:e.jsx(Ie,{className:"h-4 w-4"})})]}),!v&&o&&e.jsx(Oe,{}),!v&&o&&e.jsx(R.ScheduleDashboard,{}),!v&&o&&fe&&e.jsx(s.IconButton,{tooltip:"Manage Groups",onClick:()=>A(!0),className:"h-7 p-2",children:e.jsx(s.Users,{className:"h-4 w-4"})}),!v&&o&&((re=O==null?void 0:O.permissions)==null?void 0:re.canShare)&&e.jsx(s.IconButton,{tooltip:"Share Dashboard",onClick:()=>D(!0),className:"h-7 p-2",children:e.jsx(s.Share2,{className:"h-4 w-4"})}),!z&&!v&&m&&i.canUseFilters&&o&&e.jsx(s.Button,{className:"h-7 p-2",variant:"outline",onClick:()=>p(!0),size:"sm",children:e.jsx(s.Filter,{className:"h-4 w-4"})}),m&&!v&&_&&r&&o&&e.jsx(Re,{}),!v&&_&&r&&o&&e.jsx(Ge,{}),m&&!v&&_&&g&&r&&o&&e.jsxs(s.Button,{className:"h-7 p-2",variant:"secondary",disabled:f,onClick:Se,size:"sm",children:[e.jsx(ne.Save,{className:"mr-2 h-4 w-4"}),"Save Lens"]}),m&&!v&&o&&e.jsxs(s.Button,{variant:"outline",className:"h-7 p-2",size:"sm",disabled:!m,onClick:()=>je(),children:[e.jsx(s.Plus,{className:"mr-2 h-4 w-4"}),"Visual"]}),!v&&!m&&i.canEdit&&o&&e.jsxs(s.Button,{variant:"outline",className:"h-7 p-2",onClick:Ne,size:"sm",children:[e.jsx(s.Pencil,{className:"mr-2 h-4 w-4"}),"Edit"]}),ve&&o&&e.jsxs(s.Button,{className:"h-7 p-2",disabled:H,onClick:ye,size:"sm",children:[H?e.jsx(s.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(ne.Save,{className:"mr-2 h-4 w-4"}),H?"Saving...":"Save"]}),!v&&m&&r&&o&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(s.Button,{className:"h-7 p-2",onClick:()=>L(!Q),size:"sm",variant:"ghost",children:e.jsx(s.Code,{className:"h-4 w-4"})})}),!v&&r&&e.jsx(Ee,{}),m&&!v&&o&&e.jsxs(s.Button,{variant:"outline",className:"h-7 p-2",onClick:()=>{w(!1),L(!1)},children:[e.jsx(s.Cross2Icon,{className:"mr-2 h-4 w-4"}),"Close"]}),N&&ee&&e.jsx(s.ShareDialog,{resource:ee,resourceType:s.ResourceType.DASHBOARD,onClose:()=>D(!1)}),e.jsx(is,{open:C,onOpenChange:A})]})]})}exports.default=ls;