@malloy-publisher/server 0.9.4 → 0.9.5

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 (23) hide show
  1. package/dist/app/api-doc.yaml +104 -8
  2. package/dist/app/assets/{EnvironmentPage-uo3igcP9.js → EnvironmentPage-wGTml4WZ.js} +1 -1
  3. package/dist/app/assets/{HomePage-0OQVchl4.js → HomePage-BPFJHBxN.js} +1 -1
  4. package/dist/app/assets/{MainPage-D4SOACdm.js → MainPage-CNLgQje2.js} +1 -1
  5. package/dist/app/assets/{ModelPage-B5CpdEDl.js → ModelPage-Br6I_s4J.js} +2 -2
  6. package/dist/app/assets/{PackagePage-BzUfTQKy.js → PackagePage-B6lmG1Uq.js} +1 -1
  7. package/dist/app/assets/{RenderedResult-DwB0-9Yx.es-1MzhmBXH.js → RenderedResult-BUb2Xvr2.es-17Y63pbB.js} +14 -2
  8. package/dist/app/assets/{RouteError-BXcrPjvD.js → RouteError-B4yUUZFj.js} +1 -1
  9. package/dist/app/assets/{ThemeEditorPage-FpYg5NPt.js → ThemeEditorPage-CjK8EVnV.js} +1 -1
  10. package/dist/app/assets/{ToggleButtonGroup-Vkkjsbxx.js → ToggleButtonGroup-BKiI79mw.js} +1 -1
  11. package/dist/app/assets/{documentRoutes-BWHzvbNO.js → documentRoutes-D_78AAbq.js} +1 -1
  12. package/dist/app/assets/{index-DFvJYp4Q.js → index-B3woRPfQ.js} +1 -1
  13. package/dist/app/assets/{index-BZEvIUf-.js → index-BIqIsMFr.js} +100 -100
  14. package/dist/app/assets/{index-CprgMbE_.js → index-CfX148tj.js} +1 -1
  15. package/dist/app/assets/{index-NVPzfbUZ.js → index-dQ3jNgKw.js} +1 -1
  16. package/dist/app/assets/index.es-Bhhg6pWY.js +195 -0
  17. package/dist/app/index.html +1 -1
  18. package/dist/package_load_worker.mjs +128 -70
  19. package/dist/runtime/publisher.js +1 -1
  20. package/dist/server.mjs +3176 -2776
  21. package/dist/sshcrypto-cqb52edz.node +0 -0
  22. package/package.json +1 -1
  23. package/dist/app/assets/index.es-D2Ts8adM.js +0 -195
@@ -93,6 +93,20 @@ paths:
93
93
  Returns the current status of the Malloy Publisher server, including initialization state,
94
94
  available environments, and server timestamp. This endpoint is useful for health checks and
95
95
  monitoring server availability.
96
+ parameters:
97
+ - name: includeLoading
98
+ in: query
99
+ required: false
100
+ schema:
101
+ type: boolean
102
+ default: false
103
+ description: >-
104
+ Also list, in each environment's `packages`, a package that is
105
+ loading here for the first time and so cannot serve yet, as its
106
+ `name` and `status` only. Off by default: a listed package has
107
+ always meant one that can serve here, and only a caller that reads
108
+ `Package.status` can tell the two apart. A package being reloaded
109
+ while it serves is listed either way.
96
110
  responses:
97
111
  "200":
98
112
  description: Returns server status
@@ -1819,7 +1833,10 @@ paths:
1819
1833
  Ad-hoc query text that does not compile is a 400 whose `problems` locate each error in the
1820
1834
  submitted text. On a package with a discovery surface this holds when every `run:` in the
1821
1835
  text targets a source on the surface, or one the text derives only from such sources; text
1822
- reaching any other source is answered with the 404 a hidden or missing source gets.
1836
+ reaching any other source is answered with the 404 a hidden or missing source gets. Text that
1837
+ fails only at the grammar and names no source to run (for example `run` with no colon) is also
1838
+ a 400, because a grammar error says nothing about the model, unless the model carries any
1839
+ `#(authorize)` or `#(access_filter)`, or the text joins a source off the surface.
1823
1840
  parameters:
1824
1841
  - name: environmentName
1825
1842
  in: path
@@ -3259,7 +3276,15 @@ components:
3259
3276
  and live-reloads them instead. The mount is chosen when the
3260
3277
  environment is first loaded from config, so adding `--watch-env`
3261
3278
  to a later boot needs `--init` to re-mount a package already
3262
- copied.
3279
+ copied. On an update, a `location` equal to the one the package
3280
+ was installed from is a metadata update and nothing is fetched; a
3281
+ different one reinstalls the package from it, and an update that
3282
+ arrives while an install is in progress waits for it and is decided
3283
+ against the copy that install leaves resident. To fetch the same
3284
+ location again, reload the package (`GET …?reload=true`). The
3285
+ location a package was installed from is recorded by the server
3286
+ when it installs it and read back from that record; a `location`
3287
+ written into a package's own `publisher.json` is not.
3263
3288
  scope:
3264
3289
  type: string
3265
3290
  enum:
@@ -3679,6 +3704,41 @@ components:
3679
3704
  is a live reference regardless of `manifestBindingStatus` — see that
3680
3705
  field for the invariant a caller reclaiming superseded physical
3681
3706
  tables has to hold.
3707
+ status:
3708
+ type: object
3709
+ readOnly: true
3710
+ description: >-
3711
+ Server-computed, read-only: how this server holds the package right
3712
+ now. `serving` is whether a compiled copy answers queries here;
3713
+ `loading` is whether a load, reinstall or recompile of the package
3714
+ is in progress here. The two are independent. A first load reports
3715
+ `loading` without `serving`. A reload of a package that is already
3716
+ served reports both, because the previous copy keeps answering until
3717
+ the new one is swapped in. Steady state reports `serving` alone.
3718
+ `loadingSince` is when the in-progress load began, so a caller can
3719
+ bound one that never completes. Which tables a serving copy answers
3720
+ from is a separate question, answered by `manifestBindingStatus`.
3721
+
3722
+ A package that is loading for the first time, so is not yet
3723
+ serving, is listed only where a caller asks for it:
3724
+ `GET /status?includeLoading=true` includes it as its name and
3725
+ `status`. Every other listing, the environment resources included,
3726
+ shows packages that can be queried.
3727
+ required: [serving, loading]
3728
+ properties:
3729
+ serving:
3730
+ type: boolean
3731
+ description: A compiled copy of the package answers queries here now.
3732
+ loading:
3733
+ type: boolean
3734
+ description: >-
3735
+ A load, reinstall or recompile of the package is in progress
3736
+ here. While true, `manifestBindingStatus` describes the copy
3737
+ being replaced, not the one being built.
3738
+ loadingSince:
3739
+ type: string
3740
+ format: date-time
3741
+ description: When the in-progress load began. Present only while `loading` is true.
3682
3742
  storageServeBindings:
3683
3743
  type: array
3684
3744
  readOnly: true
@@ -6005,13 +6065,19 @@ components:
6005
6065
  DuckdbConnection:
6006
6066
  type: object
6007
6067
  description: >
6008
- DuckDB database connection configuration. Publisher intentionally
6009
- exposes only data-source intent here. Database files, working
6010
- directories, filesystem/network policy, extension loading, setup SQL,
6011
- temp directories, and resource knobs are owned by Publisher so
6012
- environment configs cannot widen deployment policy through low-level
6013
- DuckDB settings.
6068
+ DuckDB database connection configuration. Exposes data-source intent,
6069
+ attached foreign databases, and optional setup SQL for initialization
6070
+ (e.g. ATTACH commands for external lakehouses), subject to Publisher policy
6071
+ (setup SQL must be enabled with PUBLISHER_ALLOW_DUCKDB_SETUP_SQL=true and
6072
+ is refused under EXTENSION_FETCH_POLICY=local-only).
6014
6073
  properties:
6074
+ setupSQL:
6075
+ type: string
6076
+ description: >
6077
+ Optional initialization SQL script executed against the DuckDB
6078
+ session upon connection (e.g. ATTACH commands for external lakehouses).
6079
+ Multiple statements must be separated by a semicolon and newline (;\n).
6080
+ Refused unless the deployment sets PUBLISHER_ALLOW_DUCKDB_SETUP_SQL=true.
6015
6081
  attachedDatabases:
6016
6082
  type: array
6017
6083
  items:
@@ -7605,6 +7671,36 @@ components:
7605
7671
  has no per-statement tag to carry one. And a bag whose every
7606
7672
  property is unusable as a BigQuery label key renders no label, so
7607
7673
  such a read is issued the untagged way and reports null too.
7674
+ upstreamReuse:
7675
+ type: string
7676
+ enum: [reused, recomputed]
7677
+ description: >-
7678
+ For a source that reads another persisted source, how this table's
7679
+ rows were computed from it. `reused`: every persisted upstream was
7680
+ read from its already-materialized table, so the rows are a
7681
+ function of those snapshots and consistent with them. `recomputed`:
7682
+ at least one persisted upstream was recomputed from its definition
7683
+ and inlined into this build, because its table could not be read --
7684
+ on either tier, an upstream this build neither materialized nor was
7685
+ handed by reference; for a colocated build, an upstream that
7686
+ landed in a `storage=` destination; for a `storage=` build, a
7687
+ source that reaches the warehouse through a non-persisted source,
7688
+ or whose shape does not compile in the destination.
7689
+ `upstreamRecomputeReason` says which. Such a table reflects the
7690
+ warehouse at THIS build's time rather than the upstream's
7691
+ snapshot, so the two can disagree when their refresh cadences
7692
+ differ.
7693
+
7694
+ Not a location: it does not name the table the rows came from.
7695
+ Absent for a source that reads no persisted upstream, which has one
7696
+ way to build and no choice to report.
7697
+ upstreamRecomputeReason:
7698
+ type: string
7699
+ description: >-
7700
+ Why a persisted upstream was not read from its table, present only
7701
+ when `upstreamReuse` is `recomputed`: which upstream, and the
7702
+ compiler's or engine's own words for what could not be expressed
7703
+ over it, redacted against the connections involved.
7608
7704
  dataAsOf:
7609
7705
  type: string
7610
7706
  format: date-time
@@ -1 +1 @@
1
- import{q as r,E as t,j as e,a5 as i,am as o}from"./index-BZEvIUf-.js";function c(){const s=r(),{environmentName:n}=t();if(n){const a=i({environmentName:n});return e.jsx(o,{onSelectPackage:s,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{c as default};
1
+ import{q as r,E as t,j as e,a5 as i,am as o}from"./index-BIqIsMFr.js";function c(){const s=r(),{environmentName:n}=t();if(n){const a=i({environmentName:n});return e.jsx(o,{onSelectPackage:s,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{c as default};
@@ -1 +1 @@
1
- import{q as t,j as o,J as a}from"./index-BZEvIUf-.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
1
+ import{q as t,j as o,J as a}from"./index-BIqIsMFr.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
@@ -1 +1 @@
1
- import{c as g,j as t,s as E,B as Se,m as Q,e as le,g as he,a as xe,r as u,u as me,b as Me,d as V,f as fe,T as G,h as K,i as Ce,k as Pe,l as Ee,o as ge,n as ze,p as Ie,t as ce,v as De,w as Te,x as N,y as $,M as Re,P as Be,z as Le,S as He,A as Z,C as $e,D as Oe,I as de,E as ye,q as J,F as p,G as Ne,H as Y,K as W,L as ee,N as Ae,O as Ve,Q as pe,R as We,U as te,V as re,W as ne,X as Fe,Y as Ue,Z as _e,_ as Xe}from"./index-BZEvIUf-.js";import{e as Ye,s as qe}from"./documentRoutes-BWHzvbNO.js";const Qe=g(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Ge=E(Se,{name:"MuiBreadcrumbCollapsed"})(Q(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:le(e.palette.grey[200],.12)}:{backgroundColor:le(e.palette.grey[600],.12)}}}))),Ke=E(Qe)({width:24,height:16});function Ze(e){const{slots:r={},slotProps:o={},...n}=e,s=e;return t.jsx("li",{children:t.jsx(Ge,{focusRipple:!0,...n,ownerState:s,children:t.jsx(Ke,{as:r.CollapsedIcon,ownerState:s,...o.collapsedIcon})})})}function Je(e){return he("MuiBreadcrumbs",e)}const et=xe("MuiBreadcrumbs",["root","ol","li","separator"]),tt=e=>{const{classes:r}=e;return fe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Je,r)},rt=E(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${et.li}`]:r.li},r.root]})({}),nt=E("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ot=E("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function st(e,r,o,n){return e.reduce((s,l,i)=>(i<e.length-1?s=s.concat(l,t.jsx(ot,{"aria-hidden":!0,className:r,ownerState:n,children:o},`separator-${i}`)):s.push(l),s),[])}const at=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiBreadcrumbs"}),{children:s,className:l,component:i="nav",slots:d={},slotProps:f={},expandText:h="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:v=1,maxItems:y=8,separator:z="/",...H}=n,[I,M]=u.useState(!1),j={...n,component:i,expanded:I,expandText:h,itemsAfterCollapse:m,itemsBeforeCollapse:v,maxItems:y,separator:z},C=tt(j),D=Me({elementType:d.CollapsedIcon,externalSlotProps:f.collapsedIcon,ownerState:j}),k=u.useRef(null),w=c=>{const S=()=>{M(!0);const b=k.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return v+m>=c.length?c:[...c.slice(0,v),t.jsx(Ze,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:D},onClick:S},"ellipsis"),...c.slice(c.length-m,c.length)]},T=u.Children.toArray(s).filter(c=>u.isValidElement(c)).map((c,S)=>t.jsx("li",{className:C.li,children:c},`child-${S}`));return t.jsx(rt,{ref:o,component:i,color:"textSecondary",className:V(C.root,l),ownerState:j,...H,children:t.jsx(nt,{className:C.ol,ref:k,ownerState:j,children:st(I||y&&T.length<=y?T:w(T),C.separator,z,j)})})});function it(e,r,o){const n=r.getBoundingClientRect(),s=o&&o.getBoundingClientRect(),l=ge(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const h=l.getComputedStyle(r);i=h.getPropertyValue("-webkit-transform")||h.getPropertyValue("transform")}let d=0,f=0;if(i&&i!=="none"&&typeof i=="string"){const h=i.split("(")[1].split(")")[0].split(",");d=parseInt(h[4],10),f=parseInt(h[5],10)}return e==="left"?s?`translateX(${s.right+d-n.left}px)`:`translateX(${l.innerWidth+d-n.left}px)`:e==="right"?s?`translateX(-${n.right-s.left-d}px)`:`translateX(-${n.left+n.width-d}px)`:e==="up"?s?`translateY(${s.bottom+f-n.top}px)`:`translateY(${l.innerHeight+f-n.top}px)`:s?`translateY(-${n.top-s.top+n.height-f}px)`:`translateY(-${n.top+n.height-f}px)`}function lt(e){return typeof e=="function"?e():e}function A(e,r,o){const n=lt(o),s=it(e,r,n);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ct=u.forwardRef(function(r,o){const n=K(),s={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},l={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:d=!0,children:f,container:h,direction:m="down",easing:v=s,in:y,onEnter:z,onEntered:H,onEntering:I,onExit:M,onExited:j,onExiting:C,style:D,timeout:k=l,TransitionComponent:w=Ce,...T}=r,c=u.useRef(null),S=Pe(Ee(f),c,o),b=a=>x=>{a&&(x===void 0?a(c.current):a(c.current,x))},F=b((a,x)=>{A(m,a,h),Ie(a),z&&z(a,x)}),se=b((a,x)=>{const L=ce({timeout:k,style:D,easing:v},{mode:"enter"});a.style.webkitTransition=n.transitions.create("-webkit-transform",{...L}),a.style.transition=n.transitions.create("transform",{...L}),a.style.webkitTransform="none",a.style.transform="none",I&&I(a,x)}),R=b(H),B=b(C),P=b(a=>{const x=ce({timeout:k,style:D,easing:v},{mode:"exit"});a.style.webkitTransition=n.transitions.create("-webkit-transform",x),a.style.transition=n.transitions.create("transform",x),A(m,a,h),M&&M(a)}),U=b(a=>{a.style.webkitTransition="",a.style.transition="",j&&j(a)}),_=a=>{i&&i(c.current,a)},O=u.useCallback(()=>{c.current&&A(m,c.current,h)},[m,h]);return u.useEffect(()=>{if(y||m==="down"||m==="right")return;const a=ze(()=>{c.current&&A(m,c.current,h)}),x=ge(c.current);return x.addEventListener("resize",a),()=>{a.clear(),x.removeEventListener("resize",a)}},[m,y,h]),u.useEffect(()=>{y||O()},[y,O]),t.jsx(w,{nodeRef:c,onEnter:F,onEntered:R,onEntering:se,onExit:P,onExited:U,onExiting:B,addEndListener:_,appear:d,in:y,timeout:k,...T,children:(a,{ownerState:x,...L})=>u.cloneElement(f,{ref:S,style:{visibility:a==="exited"&&!y?"hidden":void 0,...D,...f.props.style},...L})})});function dt(e){return he("MuiDrawer",e)}xe("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const be=(e,r)=>{const{ownerState:o}=e;return[r.root,(o.variant==="permanent"||o.variant==="persistent")&&r.docked,r.modal]},pt=e=>{const{classes:r,anchor:o,variant:n}=e,s={root:["root",`anchor${$(o)}`],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(o)}`,n!=="temporary"&&`paperAnchorDocked${$(o)}`]};return fe(s,dt,r)},ut=E(Re,{name:"MuiDrawer",slot:"Root",overridesResolver:be})(Q(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),ht=E("div",{shouldForwardProp:Le,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:be})({flex:"0 0 auto"}),xt=E(Be,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.paper,r[`paperAnchor${$(o.anchor)}`],o.variant!=="temporary"&&r[`paperAnchorDocked${$(o.anchor)}`]]}})(Q(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:r})=>r.anchor==="left"&&r.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="top"&&r.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="right"&&r.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="bottom"&&r.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function mt(e){return["left","right"].includes(e)}function ft({direction:e},r){return e==="rtl"&&mt(r)?je[r]:r}const gt=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiDrawer"}),s=K(),l=De(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:f,children:h,className:m,elevation:v=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:z,...H}={},onClose:I,open:M=!1,PaperProps:j={},SlideProps:C,TransitionComponent:D,transitionDuration:k=i,variant:w="temporary",slots:T={},slotProps:c={},...S}=n,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const F=ft({direction:l?"rtl":"ltr"},d),R={...n,anchor:d,elevation:v,open:M,variant:w,...S},B=pt(R),P={slots:{transition:D,...T},slotProps:{paper:j,transition:C,...c,backdrop:Te(c.backdrop||{...f,...z},{transitionDuration:k})}},[U,_]=N("root",{ref:o,elementType:ut,className:V(B.root,B.modal,m),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,...S,...H},additionalProps:{open:M,onClose:I,hideBackdrop:y,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[O,a]=N("paper",{elementType:xt,shouldForwardComponentProp:!0,className:V(B.paper,j.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:w==="temporary"?v:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[x,L]=N("docked",{elementType:ht,ref:o,className:V(B.root,B.docked,m),ownerState:R,externalForwardedProps:P,additionalProps:S}),[ke,we]=N("transition",{elementType:ct,ownerState:R,externalForwardedProps:P,additionalProps:{in:M,direction:je[F],timeout:k,appear:b.current}}),ae=t.jsx(O,{...a,children:h});if(w==="permanent")return t.jsx(x,{...L,children:ae});const ie=t.jsx(ke,{...we,children:ae});return w==="persistent"?t.jsx(x,{...L,children:ie}):t.jsx(U,{..._,children:ie})}),yt=g([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),bt=g(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),jt=g(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),vt=g(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),kt=g(t.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),wt=g(t.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"})),St=g(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),Mt=g(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Ct=g(t.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),Pt=g(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Et=g([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]),zt=g(t.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}));function q(e){return t.jsxs(He,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const It=/^(.*\/[^/]+\/[^/]+\/(?:dashboards|notebooks)\/([^/]+?))(\/edit)?\/?$/,Dt=/\.malloy(nb)?$/;function Tt(){const{pathname:e}=Z(),r=$e(),o=Oe(),n=It.exec(e);if(!n||o)return null;const[,s,l,i]=n;return Dt.test(l)?null:i?t.jsx(de,{label:"View",icon:t.jsx(zt,{}),onClick:()=>r(s)}):t.jsx(de,{label:"Edit",icon:t.jsx(wt,{}),onClick:()=>r(Ye(s))})}function X({label:e,onClick:r}){return t.jsx(Ne,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:o=>({backgroundColor:"transparent",border:`1px solid ${o.palette.divider}`,color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:o.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Rt(){const e=ye(),r=e["*"]?qe(e["*"]).path:void 0,o=J();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(p,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(at,{"aria-label":"breadcrumb",separator:t.jsx(jt,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(X,{label:e.environmentName,onClick:n=>o(`/${e.environmentName}/`,n)}),e.packageName&&t.jsx(X,{label:e.packageName,onClick:n=>o(`/${e.environmentName}/${e.packageName}/`,n)}),r&&t.jsx(X,{label:r,onClick:n=>o(`/${e.environmentName}/${e.packageName}/${r}`,n)})]})})}const Bt=260,Lt=64;function ve({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){return t.jsxs(p,{sx:{height:"100dvh",width:e?Lt:Bt,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Ht,{isCollapsed:e,onToggleCollapse:r,logoHeader:o}),t.jsxs(p,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx($t,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Nt,{isCollapsed:e})]})}function Ht({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){const n=J();return o?t.jsxs(p,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[o,t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})]}):t.jsxs(p,{sx:{minHeight:56,display:"flex",flexDirection:e?"column":"row",alignItems:"center",justifyContent:e?"center":"space-between",gap:e?.5:0,py:e?1:0,px:e?0:2,flexShrink:0},children:[t.jsxs(p,{onClick:s=>n("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(p,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(G,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(W,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})})]})}function $t({isCollapsed:e}){const o=Z().pathname==="/";return t.jsx(ee,{sx:{py:0},children:t.jsx(oe,{icon:t.jsx(Mt,{fontSize:"small"}),label:"Home",to:"/",selected:o,isCollapsed:e})})}function Ot({isCollapsed:e}){const{apiClients:r}=Ae(),o=ye(),{data:n}=Ve({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=n?.data??[];return s.length===0?null:t.jsxs(p,{sx:{mt:1},children:[!e&&t.jsx(G,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Environments"}),t.jsx(ee,{sx:{py:0},children:s.map(l=>{const i=l.name??"";return t.jsx(oe,{icon:t.jsx(St,{fontSize:"small"}),label:i,to:`/${i}`,selected:o.environmentName===i,isCollapsed:e},i)})})]})}function Nt({isCollapsed:e}){const{pathname:r}=Z(),o=[{label:"Malloy Docs",href:pe.docsHome,icon:t.jsx(yt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:pe.publishing,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(vt,{fontSize:"small"}),external:!1}];return t.jsxs(ee,{sx:{py:1},children:[t.jsx(oe,{icon:t.jsx(Et,{fontSize:"small"}),label:"Theme",to:"/settings/theme",selected:r.startsWith("/settings/theme"),isCollapsed:e}),t.jsx(Ft,{isCollapsed:e}),o.map(n=>t.jsx(At,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))]})}function oe({icon:e,label:r,to:o,selected:n,isCollapsed:s}){const l=J(),i=t.jsxs(te,{selected:n,onClick:d=>l(o,d),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:n?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ne,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:r,placement:"right",children:t.jsx(p,{children:i})}):i}function At({label:e,href:r,icon:o,external:n,isCollapsed:s}){const l=t.jsxs(te,{component:"a",href:r,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:o}),!s&&t.jsx(ne,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:e,placement:"right",children:t.jsx(p,{children:l})}):l}const Vt={light:"dark",dark:"auto",auto:"light"},Wt={light:"Light mode",dark:"Dark mode",auto:"Auto mode"},ue={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Ft({isCollapsed:e}){const{mode:r,userChoice:o,setMode:n,allowUserToggle:s}=We();if(!s)return null;const l=o??r,i=l==="auto"?bt:l==="dark"?kt:Ct,d=t.jsxs(te,{"aria-label":ue[l],onClick:()=>n(Vt[l]),sx:{justifyContent:e?"center":"flex-start",px:e?0:2},children:[t.jsx(re,{sx:{minWidth:e?0:36,justifyContent:"center",color:"text.secondary"},children:t.jsx(i,{fontSize:"small"})}),!e&&t.jsx(ne,{primary:Wt[l],primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",whiteSpace:"nowrap"}}})]});return t.jsx(W,{title:ue[l],placement:"right",disableHoverListener:!e,children:t.jsx(p,{children:d})})}function Ut({open:e,onClose:r,logoHeader:o}){return t.jsx(gt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ve,{isCollapsed:!1,onToggleCollapse:r,logoHeader:o})})}function Yt({headerProps:e}){const r=K(),o=Fe(r.breakpoints.up("md")),[n,s]=u.useState(!1),[l,i]=u.useState(!1);return u.useEffect(()=>{o&&n&&s(!1)},[o,n]),t.jsxs(p,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[o&&t.jsx(ve,{isCollapsed:l,onToggleCollapse:()=>i(d=>!d),logoHeader:e?.logoHeader}),t.jsxs(p,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(p,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ue.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(p,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(Y,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(q,{fontSize:"small"})})}),t.jsx(p,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Rt,{})}),t.jsxs(p,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Tt,{}),e?.endCap]})]}),t.jsx(p,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Xe,{}),children:t.jsx(_e,{})})})]}),t.jsx(Ut,{open:n,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
1
+ import{c as g,j as t,s as E,B as Se,m as Q,e as le,g as he,a as xe,r as u,u as me,b as Me,d as V,f as fe,T as G,h as K,i as Ce,k as Pe,l as Ee,o as ge,n as ze,p as Ie,t as ce,v as De,w as Te,x as N,y as $,M as Re,P as Be,z as Le,S as He,A as Z,C as $e,D as Oe,I as de,E as ye,q as J,F as p,G as Ne,H as Y,K as W,L as ee,N as Ae,O as Ve,Q as pe,R as We,U as te,V as re,W as ne,X as Fe,Y as Ue,Z as _e,_ as Xe}from"./index-BIqIsMFr.js";import{e as Ye,s as qe}from"./documentRoutes-D_78AAbq.js";const Qe=g(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Ge=E(Se,{name:"MuiBreadcrumbCollapsed"})(Q(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:le(e.palette.grey[200],.12)}:{backgroundColor:le(e.palette.grey[600],.12)}}}))),Ke=E(Qe)({width:24,height:16});function Ze(e){const{slots:r={},slotProps:o={},...n}=e,s=e;return t.jsx("li",{children:t.jsx(Ge,{focusRipple:!0,...n,ownerState:s,children:t.jsx(Ke,{as:r.CollapsedIcon,ownerState:s,...o.collapsedIcon})})})}function Je(e){return he("MuiBreadcrumbs",e)}const et=xe("MuiBreadcrumbs",["root","ol","li","separator"]),tt=e=>{const{classes:r}=e;return fe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Je,r)},rt=E(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${et.li}`]:r.li},r.root]})({}),nt=E("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ot=E("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function st(e,r,o,n){return e.reduce((s,l,i)=>(i<e.length-1?s=s.concat(l,t.jsx(ot,{"aria-hidden":!0,className:r,ownerState:n,children:o},`separator-${i}`)):s.push(l),s),[])}const at=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiBreadcrumbs"}),{children:s,className:l,component:i="nav",slots:d={},slotProps:f={},expandText:h="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:v=1,maxItems:y=8,separator:z="/",...H}=n,[I,M]=u.useState(!1),j={...n,component:i,expanded:I,expandText:h,itemsAfterCollapse:m,itemsBeforeCollapse:v,maxItems:y,separator:z},C=tt(j),D=Me({elementType:d.CollapsedIcon,externalSlotProps:f.collapsedIcon,ownerState:j}),k=u.useRef(null),w=c=>{const S=()=>{M(!0);const b=k.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return v+m>=c.length?c:[...c.slice(0,v),t.jsx(Ze,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:D},onClick:S},"ellipsis"),...c.slice(c.length-m,c.length)]},T=u.Children.toArray(s).filter(c=>u.isValidElement(c)).map((c,S)=>t.jsx("li",{className:C.li,children:c},`child-${S}`));return t.jsx(rt,{ref:o,component:i,color:"textSecondary",className:V(C.root,l),ownerState:j,...H,children:t.jsx(nt,{className:C.ol,ref:k,ownerState:j,children:st(I||y&&T.length<=y?T:w(T),C.separator,z,j)})})});function it(e,r,o){const n=r.getBoundingClientRect(),s=o&&o.getBoundingClientRect(),l=ge(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const h=l.getComputedStyle(r);i=h.getPropertyValue("-webkit-transform")||h.getPropertyValue("transform")}let d=0,f=0;if(i&&i!=="none"&&typeof i=="string"){const h=i.split("(")[1].split(")")[0].split(",");d=parseInt(h[4],10),f=parseInt(h[5],10)}return e==="left"?s?`translateX(${s.right+d-n.left}px)`:`translateX(${l.innerWidth+d-n.left}px)`:e==="right"?s?`translateX(-${n.right-s.left-d}px)`:`translateX(-${n.left+n.width-d}px)`:e==="up"?s?`translateY(${s.bottom+f-n.top}px)`:`translateY(${l.innerHeight+f-n.top}px)`:s?`translateY(-${n.top-s.top+n.height-f}px)`:`translateY(-${n.top+n.height-f}px)`}function lt(e){return typeof e=="function"?e():e}function A(e,r,o){const n=lt(o),s=it(e,r,n);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ct=u.forwardRef(function(r,o){const n=K(),s={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},l={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:d=!0,children:f,container:h,direction:m="down",easing:v=s,in:y,onEnter:z,onEntered:H,onEntering:I,onExit:M,onExited:j,onExiting:C,style:D,timeout:k=l,TransitionComponent:w=Ce,...T}=r,c=u.useRef(null),S=Pe(Ee(f),c,o),b=a=>x=>{a&&(x===void 0?a(c.current):a(c.current,x))},F=b((a,x)=>{A(m,a,h),Ie(a),z&&z(a,x)}),se=b((a,x)=>{const L=ce({timeout:k,style:D,easing:v},{mode:"enter"});a.style.webkitTransition=n.transitions.create("-webkit-transform",{...L}),a.style.transition=n.transitions.create("transform",{...L}),a.style.webkitTransform="none",a.style.transform="none",I&&I(a,x)}),R=b(H),B=b(C),P=b(a=>{const x=ce({timeout:k,style:D,easing:v},{mode:"exit"});a.style.webkitTransition=n.transitions.create("-webkit-transform",x),a.style.transition=n.transitions.create("transform",x),A(m,a,h),M&&M(a)}),U=b(a=>{a.style.webkitTransition="",a.style.transition="",j&&j(a)}),_=a=>{i&&i(c.current,a)},O=u.useCallback(()=>{c.current&&A(m,c.current,h)},[m,h]);return u.useEffect(()=>{if(y||m==="down"||m==="right")return;const a=ze(()=>{c.current&&A(m,c.current,h)}),x=ge(c.current);return x.addEventListener("resize",a),()=>{a.clear(),x.removeEventListener("resize",a)}},[m,y,h]),u.useEffect(()=>{y||O()},[y,O]),t.jsx(w,{nodeRef:c,onEnter:F,onEntered:R,onEntering:se,onExit:P,onExited:U,onExiting:B,addEndListener:_,appear:d,in:y,timeout:k,...T,children:(a,{ownerState:x,...L})=>u.cloneElement(f,{ref:S,style:{visibility:a==="exited"&&!y?"hidden":void 0,...D,...f.props.style},...L})})});function dt(e){return he("MuiDrawer",e)}xe("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const be=(e,r)=>{const{ownerState:o}=e;return[r.root,(o.variant==="permanent"||o.variant==="persistent")&&r.docked,r.modal]},pt=e=>{const{classes:r,anchor:o,variant:n}=e,s={root:["root",`anchor${$(o)}`],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(o)}`,n!=="temporary"&&`paperAnchorDocked${$(o)}`]};return fe(s,dt,r)},ut=E(Re,{name:"MuiDrawer",slot:"Root",overridesResolver:be})(Q(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),ht=E("div",{shouldForwardProp:Le,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:be})({flex:"0 0 auto"}),xt=E(Be,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.paper,r[`paperAnchor${$(o.anchor)}`],o.variant!=="temporary"&&r[`paperAnchorDocked${$(o.anchor)}`]]}})(Q(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:r})=>r.anchor==="left"&&r.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="top"&&r.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="right"&&r.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="bottom"&&r.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function mt(e){return["left","right"].includes(e)}function ft({direction:e},r){return e==="rtl"&&mt(r)?je[r]:r}const gt=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiDrawer"}),s=K(),l=De(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:f,children:h,className:m,elevation:v=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:z,...H}={},onClose:I,open:M=!1,PaperProps:j={},SlideProps:C,TransitionComponent:D,transitionDuration:k=i,variant:w="temporary",slots:T={},slotProps:c={},...S}=n,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const F=ft({direction:l?"rtl":"ltr"},d),R={...n,anchor:d,elevation:v,open:M,variant:w,...S},B=pt(R),P={slots:{transition:D,...T},slotProps:{paper:j,transition:C,...c,backdrop:Te(c.backdrop||{...f,...z},{transitionDuration:k})}},[U,_]=N("root",{ref:o,elementType:ut,className:V(B.root,B.modal,m),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,...S,...H},additionalProps:{open:M,onClose:I,hideBackdrop:y,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[O,a]=N("paper",{elementType:xt,shouldForwardComponentProp:!0,className:V(B.paper,j.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:w==="temporary"?v:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[x,L]=N("docked",{elementType:ht,ref:o,className:V(B.root,B.docked,m),ownerState:R,externalForwardedProps:P,additionalProps:S}),[ke,we]=N("transition",{elementType:ct,ownerState:R,externalForwardedProps:P,additionalProps:{in:M,direction:je[F],timeout:k,appear:b.current}}),ae=t.jsx(O,{...a,children:h});if(w==="permanent")return t.jsx(x,{...L,children:ae});const ie=t.jsx(ke,{...we,children:ae});return w==="persistent"?t.jsx(x,{...L,children:ie}):t.jsx(U,{..._,children:ie})}),yt=g([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),bt=g(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),jt=g(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),vt=g(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),kt=g(t.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),wt=g(t.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"})),St=g(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),Mt=g(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Ct=g(t.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),Pt=g(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Et=g([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]),zt=g(t.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}));function q(e){return t.jsxs(He,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const It=/^(.*\/[^/]+\/[^/]+\/(?:dashboards|notebooks)\/([^/]+?))(\/edit)?\/?$/,Dt=/\.malloy(nb)?$/;function Tt(){const{pathname:e}=Z(),r=$e(),o=Oe(),n=It.exec(e);if(!n||o)return null;const[,s,l,i]=n;return Dt.test(l)?null:i?t.jsx(de,{label:"View",icon:t.jsx(zt,{}),onClick:()=>r(s)}):t.jsx(de,{label:"Edit",icon:t.jsx(wt,{}),onClick:()=>r(Ye(s))})}function X({label:e,onClick:r}){return t.jsx(Ne,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:o=>({backgroundColor:"transparent",border:`1px solid ${o.palette.divider}`,color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:o.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Rt(){const e=ye(),r=e["*"]?qe(e["*"]).path:void 0,o=J();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(p,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(at,{"aria-label":"breadcrumb",separator:t.jsx(jt,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(X,{label:e.environmentName,onClick:n=>o(`/${e.environmentName}/`,n)}),e.packageName&&t.jsx(X,{label:e.packageName,onClick:n=>o(`/${e.environmentName}/${e.packageName}/`,n)}),r&&t.jsx(X,{label:r,onClick:n=>o(`/${e.environmentName}/${e.packageName}/${r}`,n)})]})})}const Bt=260,Lt=64;function ve({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){return t.jsxs(p,{sx:{height:"100dvh",width:e?Lt:Bt,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Ht,{isCollapsed:e,onToggleCollapse:r,logoHeader:o}),t.jsxs(p,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx($t,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Nt,{isCollapsed:e})]})}function Ht({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){const n=J();return o?t.jsxs(p,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[o,t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})]}):t.jsxs(p,{sx:{minHeight:56,display:"flex",flexDirection:e?"column":"row",alignItems:"center",justifyContent:e?"center":"space-between",gap:e?.5:0,py:e?1:0,px:e?0:2,flexShrink:0},children:[t.jsxs(p,{onClick:s=>n("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(p,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(G,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(W,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})})]})}function $t({isCollapsed:e}){const o=Z().pathname==="/";return t.jsx(ee,{sx:{py:0},children:t.jsx(oe,{icon:t.jsx(Mt,{fontSize:"small"}),label:"Home",to:"/",selected:o,isCollapsed:e})})}function Ot({isCollapsed:e}){const{apiClients:r}=Ae(),o=ye(),{data:n}=Ve({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=n?.data??[];return s.length===0?null:t.jsxs(p,{sx:{mt:1},children:[!e&&t.jsx(G,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Environments"}),t.jsx(ee,{sx:{py:0},children:s.map(l=>{const i=l.name??"";return t.jsx(oe,{icon:t.jsx(St,{fontSize:"small"}),label:i,to:`/${i}`,selected:o.environmentName===i,isCollapsed:e},i)})})]})}function Nt({isCollapsed:e}){const{pathname:r}=Z(),o=[{label:"Malloy Docs",href:pe.docsHome,icon:t.jsx(yt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:pe.publishing,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(vt,{fontSize:"small"}),external:!1}];return t.jsxs(ee,{sx:{py:1},children:[t.jsx(oe,{icon:t.jsx(Et,{fontSize:"small"}),label:"Theme",to:"/settings/theme",selected:r.startsWith("/settings/theme"),isCollapsed:e}),t.jsx(Ft,{isCollapsed:e}),o.map(n=>t.jsx(At,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))]})}function oe({icon:e,label:r,to:o,selected:n,isCollapsed:s}){const l=J(),i=t.jsxs(te,{selected:n,onClick:d=>l(o,d),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:n?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ne,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:r,placement:"right",children:t.jsx(p,{children:i})}):i}function At({label:e,href:r,icon:o,external:n,isCollapsed:s}){const l=t.jsxs(te,{component:"a",href:r,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:o}),!s&&t.jsx(ne,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:e,placement:"right",children:t.jsx(p,{children:l})}):l}const Vt={light:"dark",dark:"auto",auto:"light"},Wt={light:"Light mode",dark:"Dark mode",auto:"Auto mode"},ue={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Ft({isCollapsed:e}){const{mode:r,userChoice:o,setMode:n,allowUserToggle:s}=We();if(!s)return null;const l=o??r,i=l==="auto"?bt:l==="dark"?kt:Ct,d=t.jsxs(te,{"aria-label":ue[l],onClick:()=>n(Vt[l]),sx:{justifyContent:e?"center":"flex-start",px:e?0:2},children:[t.jsx(re,{sx:{minWidth:e?0:36,justifyContent:"center",color:"text.secondary"},children:t.jsx(i,{fontSize:"small"})}),!e&&t.jsx(ne,{primary:Wt[l],primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",whiteSpace:"nowrap"}}})]});return t.jsx(W,{title:ue[l],placement:"right",disableHoverListener:!e,children:t.jsx(p,{children:d})})}function Ut({open:e,onClose:r,logoHeader:o}){return t.jsx(gt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ve,{isCollapsed:!1,onToggleCollapse:r,logoHeader:o})})}function Yt({headerProps:e}){const r=K(),o=Fe(r.breakpoints.up("md")),[n,s]=u.useState(!1),[l,i]=u.useState(!1);return u.useEffect(()=>{o&&n&&s(!1)},[o,n]),t.jsxs(p,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[o&&t.jsx(ve,{isCollapsed:l,onToggleCollapse:()=>i(d=>!d),logoHeader:e?.logoHeader}),t.jsxs(p,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(p,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ue.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(p,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(Y,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(q,{fontSize:"small"})})}),t.jsx(p,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Rt,{})}),t.jsxs(p,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Tt,{}),e?.endCap]})]}),t.jsx(p,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Xe,{}),children:t.jsx(_e,{})})})]}),t.jsx(Ut,{open:n,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-D2Ts8adM.js","assets/index-BZEvIUf-.js","assets/index-DUqldpo0.css","assets/ToggleButtonGroup-Vkkjsbxx.js"])))=>i.map(i=>d[i]);
2
- import{g as q,a as B,$ as f,a0 as G,r as d,u as O,h as H,j as o,d as K,y as P,f as J,s as Q,T as b,m as X,a1 as Y,a2 as L,q as S,a3 as C,D as _,F as m,a4 as Z,a5 as g,a6 as w,a7 as ee,a8 as ne,a9 as T,aa as te,ab as oe,_ as U,ac as F,ad as se,ae,af as re,E as ie,N as le,ag as ce,ah as ue,ai as de,aj as x}from"./index-BZEvIUf-.js";import{s as R}from"./documentRoutes-BWHzvbNO.js";function pe(e){return q("MuiLink",e)}const me=B("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),he=({theme:e,ownerState:n})=>{const t=n.color;if("colorSpace"in e&&e.colorSpace){const a=f(e,`palette.${t}.main`)||f(e,`palette.${t}`)||n.color;return e.alpha(a,.4)}const s=f(e,`palette.${t}.main`,!1)||f(e,`palette.${t}`,!1)||n.color,l=f(e,`palette.${t}.mainChannel`)||f(e,`palette.${t}Channel`);return"vars"in e&&l?`rgba(${l} / 0.4)`:G(s,.4)},$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},xe=e=>{const{classes:n,component:t,focusVisible:s,underline:l}=e,a={root:["root",`underline${P(l)}`,t==="button"&&"button",s&&"focusVisible"]};return J(a,pe,n)},fe=Q(b,{name:"MuiLink",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[`underline${P(t.underline)}`],t.component==="button"&&n.button]}})(X(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Y()).map(([n])=>({props:{underline:"always",color:n},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[n].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${me.focusVisible}`]:{outline:"auto"}}}]}))),ye=d.forwardRef(function(n,t){const s=O({props:n,name:"MuiLink"}),l=H(),{className:a,color:r="primary",component:u="a",onBlur:i,onFocus:c,TypographyClasses:p,underline:h="always",variant:v="inherit",sx:k,...D}=s,[M,E]=d.useState(!1),N=y=>{L(y.target)||E(!1),i&&i(y)},I=y=>{L(y.target)&&E(!0),c&&c(y)},j={...s,color:r,component:u,focusVisible:M,underline:h,variant:v},z=xe(j);return o.jsx(fe,{color:r,className:K(z.root,a),classes:p,component:u,onBlur:N,onFocus:I,ref:t,ownerState:j,variant:v,...D,sx:[...$[r]===void 0?[{color:r}]:[],...Array.isArray(k)?k:[k]],style:{...D.style,...h==="always"&&r!=="inherit"&&!$[r]&&{"--Link-underlineColor":he({theme:l,ownerState:j})}}})});function V(e,n){const t=S();return d.useCallback((s,l)=>{const a=new URLSearchParams(s.givens).toString(),r=encodeURIComponent(e),u=encodeURIComponent(n),i=encodeURIComponent(s.dashboard);t(`/${r}/${u}/dashboards/${i}`+(a?`?${a}`:""),l)},[t,e,n])}function A({environmentName:e,packageName:n,notebookPath:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=S(),u=t.endsWith(".malloy"),i=_();return d.useEffect(()=>{if(!u||i)return;const c=()=>void w(()=>import("./index.es-D2Ts8adM.js"),__vite__mapDeps([0,1,2,3])),p=window.requestIdleCallback;if(p){const v=p(c);return()=>window.cancelIdleCallback?.(v)}const h=setTimeout(c,1500);return()=>clearTimeout(h)},[u,i]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(Z,{resourceUri:g({environmentName:e,packageName:n,modelPath:t}),maxResultSize:1024*1024,givens:s,onGivensChange:l,onNavigate:r,onDrillNavigate:a})})}function be(){const[e,n]=d.useState(!1),t=d.useRef(!1),s=d.useRef(!1),l=d.useCallback(i=>{t.current=i,n(i)},[]),a=d.useCallback(()=>{s.current=!0},[]),r=ee(d.useCallback(({currentLocation:i,nextLocation:c})=>t.current&&!s.current&&i.pathname!==c.pathname,[]));d.useEffect(()=>{if(!e)return;const i=c=>{c.preventDefault(),c.returnValue=""};return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[e]);const u=o.jsx(ne,{open:r.state==="blocked",canSave:!1,onKeepEditing:()=>r.reset?.(),onDiscard:()=>r.proceed?.()});return{onDirtyChange:l,leaving:a,dialog:u}}const ge=se.lazy(()=>w(()=>import("./index.es-D2Ts8adM.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardEditor})));function ve({environmentName:e,packageName:n,dashboardName:t,kind:s="dashboard",path:l}){const a=be(),r=d.useMemo(()=>s==="dashboard"?T({environmentName:e,packageName:n,dashboardName:t}):te({environmentName:e,packageName:n,notebookName:t}),[s,e,n,t]);return o.jsxs(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[o.jsx(oe,{children:o.jsx(d.Suspense,{fallback:o.jsx(U,{text:F.opening("builder")}),children:o.jsx(ge,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,kind:s,path:l,onDirtyChange:a.onDirtyChange,onEvent:r},`${e}/${n}/${s}/${t}`)})}),a.dialog]})}function ke({environmentName:e,packageName:n,dashboardName:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=d.useMemo(()=>T({environmentName:e,packageName:n,dashboardName:t}),[e,n,t]),u=_();return d.useEffect(()=>{if(u)return;const i=()=>void w(()=>import("./index.es-D2Ts8adM.js"),__vite__mapDeps([0,1,2,3])),c=window.requestIdleCallback;if(c){const h=c(i);return()=>window.cancelIdleCallback?.(h)}const p=setTimeout(i,1500);return()=>clearTimeout(p)},[u]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(ae,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,givens:s,onGivensChange:l,onNavigate:a,onEvent:r,maxResultSize:1024*1024})})}function W({environmentName:e,packageName:n,routeKind:t,slug:s,edit:l}){const{location:a,settled:r}=re(e,n,t,s);if(!r)return o.jsx(U,{text:F.opening()});const u=a?.kind??t;return l?o.jsx(ve,{environmentName:e,packageName:n,dashboardName:s,kind:u,...a?{path:a.path}:{}}):u==="dashboard"?o.jsx(ke,{environmentName:e,packageName:n,dashboardName:s}):o.jsx(A,{environmentName:e,packageName:n,notebookPath:a?.path??`notebooks/${s}.malloy`})}function we(){const e=ie(),n=e["*"],{server:t}=le(),{params:s,onGivensChange:l}=C();if(!e.environmentName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing environment name"})});if(!e.packageName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing package name"})});const a={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(11),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"dashboard",slug:p,edit:h})}if(n?.startsWith("notebooks/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"notebook",slug:p,edit:h})}if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),p=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:c});return o.jsx(ce,{resourceUri:p})}const r=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:n});if(n?.endsWith(".malloy"))return o.jsx(m,{sx:a,children:o.jsx(ue,{resourceUri:r,runOnDemand:!0,maxResultSize:512*1024,givens:s,onGivensChange:l})});if(n?.endsWith(".malloynb"))return o.jsx(A,{environmentName:e.environmentName,packageName:e.packageName,notebookPath:n});const u=/\.[^./]+$/.test(n??""),i=de({server:t,environmentName:e.environmentName,packageName:e.packageName,path:n??""});return o.jsxs(m,{sx:a,children:[o.jsx(b,{variant:"h6",sx:{fontWeight:"fontWeightMedium"},children:"Nothing to open at this path"}),o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[o.jsx(m,{component:"span",sx:{fontFamily:x},children:n})," ","does not name a"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","or"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","file in package"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:e.packageName}),". This address opens"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","and"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","files."]}),u&&o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:"public/"})," ","directory is served at ",o.jsx(ye,{href:i,children:i}),"."]}),o.jsx(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The package lists its models, notebooks, and data apps."})]})}export{we as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-Bhhg6pWY.js","assets/index-BIqIsMFr.js","assets/index-DUqldpo0.css","assets/ToggleButtonGroup-BKiI79mw.js"])))=>i.map(i=>d[i]);
2
+ import{g as B,a as q,$ as f,a0 as G,r as d,u as O,h as H,j as o,d as K,y as P,f as J,s as Q,T as b,m as X,a1 as Y,a2 as L,q as S,a3 as C,D as _,F as m,a4 as Z,a5 as g,a6 as w,a7 as ee,a8 as ne,a9 as T,aa as te,ab as oe,_ as U,ac as F,ad as se,ae,af as re,E as ie,N as le,ag as ce,ah as ue,ai as de,aj as x}from"./index-BIqIsMFr.js";import{s as R}from"./documentRoutes-D_78AAbq.js";function pe(e){return B("MuiLink",e)}const me=q("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),he=({theme:e,ownerState:n})=>{const t=n.color;if("colorSpace"in e&&e.colorSpace){const a=f(e,`palette.${t}.main`)||f(e,`palette.${t}`)||n.color;return e.alpha(a,.4)}const s=f(e,`palette.${t}.main`,!1)||f(e,`palette.${t}`,!1)||n.color,l=f(e,`palette.${t}.mainChannel`)||f(e,`palette.${t}Channel`);return"vars"in e&&l?`rgba(${l} / 0.4)`:G(s,.4)},$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},xe=e=>{const{classes:n,component:t,focusVisible:s,underline:l}=e,a={root:["root",`underline${P(l)}`,t==="button"&&"button",s&&"focusVisible"]};return J(a,pe,n)},fe=Q(b,{name:"MuiLink",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[`underline${P(t.underline)}`],t.component==="button"&&n.button]}})(X(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Y()).map(([n])=>({props:{underline:"always",color:n},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[n].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${me.focusVisible}`]:{outline:"auto"}}}]}))),ye=d.forwardRef(function(n,t){const s=O({props:n,name:"MuiLink"}),l=H(),{className:a,color:r="primary",component:u="a",onBlur:i,onFocus:c,TypographyClasses:p,underline:h="always",variant:v="inherit",sx:k,...D}=s,[M,E]=d.useState(!1),N=y=>{L(y.target)||E(!1),i&&i(y)},I=y=>{L(y.target)&&E(!0),c&&c(y)},j={...s,color:r,component:u,focusVisible:M,underline:h,variant:v},z=xe(j);return o.jsx(fe,{color:r,className:K(z.root,a),classes:p,component:u,onBlur:N,onFocus:I,ref:t,ownerState:j,variant:v,...D,sx:[...$[r]===void 0?[{color:r}]:[],...Array.isArray(k)?k:[k]],style:{...D.style,...h==="always"&&r!=="inherit"&&!$[r]&&{"--Link-underlineColor":he({theme:l,ownerState:j})}}})});function V(e,n){const t=S();return d.useCallback((s,l)=>{const a=new URLSearchParams(s.givens).toString(),r=encodeURIComponent(e),u=encodeURIComponent(n),i=encodeURIComponent(s.dashboard);t(`/${r}/${u}/dashboards/${i}`+(a?`?${a}`:""),l)},[t,e,n])}function A({environmentName:e,packageName:n,notebookPath:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=S(),u=t.endsWith(".malloy"),i=_();return d.useEffect(()=>{if(!u||i)return;const c=()=>void w(()=>import("./index.es-Bhhg6pWY.js"),__vite__mapDeps([0,1,2,3])),p=window.requestIdleCallback;if(p){const v=p(c);return()=>window.cancelIdleCallback?.(v)}const h=setTimeout(c,1500);return()=>clearTimeout(h)},[u,i]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(Z,{resourceUri:g({environmentName:e,packageName:n,modelPath:t}),maxResultSize:1024*1024,givens:s,onGivensChange:l,onNavigate:r,onDrillNavigate:a})})}function be(){const[e,n]=d.useState(!1),t=d.useRef(!1),s=d.useRef(!1),l=d.useCallback(i=>{t.current=i,n(i)},[]),a=d.useCallback(()=>{s.current=!0},[]),r=ee(d.useCallback(({currentLocation:i,nextLocation:c})=>t.current&&!s.current&&i.pathname!==c.pathname,[]));d.useEffect(()=>{if(!e)return;const i=c=>{c.preventDefault(),c.returnValue=""};return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[e]);const u=o.jsx(ne,{open:r.state==="blocked",canSave:!1,onKeepEditing:()=>r.reset?.(),onDiscard:()=>r.proceed?.()});return{onDirtyChange:l,leaving:a,dialog:u}}const ge=se.lazy(()=>w(()=>import("./index.es-Bhhg6pWY.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardEditor})));function ve({environmentName:e,packageName:n,dashboardName:t,kind:s="dashboard",path:l}){const a=be(),r=d.useMemo(()=>s==="dashboard"?T({environmentName:e,packageName:n,dashboardName:t}):te({environmentName:e,packageName:n,notebookName:t}),[s,e,n,t]);return o.jsxs(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[o.jsx(oe,{children:o.jsx(d.Suspense,{fallback:o.jsx(U,{text:F.opening("builder")}),children:o.jsx(ge,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,kind:s,path:l,onDirtyChange:a.onDirtyChange,onEvent:r},`${e}/${n}/${s}/${t}`)})}),a.dialog]})}function ke({environmentName:e,packageName:n,dashboardName:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=d.useMemo(()=>T({environmentName:e,packageName:n,dashboardName:t}),[e,n,t]),u=_();return d.useEffect(()=>{if(u)return;const i=()=>void w(()=>import("./index.es-Bhhg6pWY.js"),__vite__mapDeps([0,1,2,3])),c=window.requestIdleCallback;if(c){const h=c(i);return()=>window.cancelIdleCallback?.(h)}const p=setTimeout(i,1500);return()=>clearTimeout(p)},[u]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(ae,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,givens:s,onGivensChange:l,onNavigate:a,onEvent:r,maxResultSize:1024*1024})})}function W({environmentName:e,packageName:n,routeKind:t,slug:s,edit:l}){const{location:a,settled:r}=re(e,n,t,s);if(!r)return o.jsx(U,{text:F.opening()});const u=a?.kind??t;return l?o.jsx(ve,{environmentName:e,packageName:n,dashboardName:s,kind:u,...a?{path:a.path}:{}}):u==="dashboard"?o.jsx(ke,{environmentName:e,packageName:n,dashboardName:s}):o.jsx(A,{environmentName:e,packageName:n,notebookPath:a?.path??`notebooks/${s}.malloy`})}function we(){const e=ie(),n=e["*"],{server:t}=le(),{params:s,onGivensChange:l}=C();if(!e.environmentName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing environment name"})});if(!e.packageName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing package name"})});const a={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(11),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"dashboard",slug:p,edit:h})}if(n?.startsWith("notebooks/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"notebook",slug:p,edit:h})}if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),p=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:c});return o.jsx(ce,{resourceUri:p})}const r=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:n});if(n?.endsWith(".malloy"))return o.jsx(m,{sx:a,children:o.jsx(ue,{resourceUri:r,runOnDemand:!0,maxResultSize:512*1024,givens:s,onGivensChange:l})});if(n?.endsWith(".malloynb"))return o.jsx(A,{environmentName:e.environmentName,packageName:e.packageName,notebookPath:n});const u=/\.[^./]+$/.test(n??""),i=de({server:t,environmentName:e.environmentName,packageName:e.packageName,path:n??""});return o.jsxs(m,{sx:a,children:[o.jsx(b,{variant:"h6",sx:{fontWeight:"fontWeightMedium"},children:"Nothing to open at this path"}),o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[o.jsx(m,{component:"span",sx:{fontFamily:x},children:n})," ","does not name a"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","or"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","file in package"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:e.packageName}),". This address opens"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","and"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","files."]}),u&&o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:"public/"})," ","directory is served at ",o.jsx(ye,{href:i,children:i}),"."]}),o.jsx(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The package lists its models, notebooks, and data apps."})]})}export{we as default};
@@ -1 +1 @@
1
- import{E as m,q as u,j as e,a5 as d,ak as l}from"./index-BZEvIUf-.js";import{d as g}from"./documentRoutes-BWHzvbNO.js";function h(){const{environmentName:n,packageName:a}=m(),s=u();if(n)if(a){const i=d({environmentName:n,packageName:a});return e.jsx(l,{onClickPackageFile:s,onOpenDocument:({kind:r,slug:t,mode:o},c)=>s(g(n,a,r,t,o),c),resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{h as default};
1
+ import{E as m,q as u,j as e,a5 as d,ak as l}from"./index-BIqIsMFr.js";import{d as g}from"./documentRoutes-D_78AAbq.js";function h(){const{environmentName:n,packageName:a}=m(),s=u();if(n)if(a){const i=d({environmentName:n,packageName:a});return e.jsx(l,{onClickPackageFile:s,onOpenDocument:({kind:r,slug:t,mode:o},c)=>s(g(n,a,r,t,o),c),resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{h as default};
@@ -1,4 +1,4 @@
1
- import{j as $,F as oe,r as f,aN as he,R as ue,h as me,aO as be,at as ye,aP as K,aQ as fe,aR as pe,aS as ge,aT as ve,aU as we,aV as ke,aW as ne}from"./index-BZEvIUf-.js";const v="publisher-drill";function xe(e,t){const r=new Set;let l;try{l=e.getMetadata()?.getAllFields()??[]}catch{return r}const a=new Set;for(const o of l)!o||t(o)||o.tag?.tag("hidden")===void 0&&a.add(o.tag?.text("label")??o.name);for(const o of l){if(!o||!t(o))continue;const n=o.tag?.text("label")??o.name;a.has(n)||r.add(n)}return r}function D(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function Ce(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const l=n=>n.closest(".malloy-table")===r,a=new Set;for(const n of r.querySelectorAll(".column-cell.th")){if(!l(n))continue;const i=(n.textContent??"").replace(/\u200b/g,"").trim(),b=D(n);b&&t.has(i)&&a.add(b)}if(a.size===0)continue;const o=new Set;for(const n of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!l(n))continue;const i=D(n);i&&(o.has(i)?n.tabIndex=-1:o.add(i))}for(const n of r.querySelectorAll(".column-cell.td")){if(!l(n))continue;const i=D(n),b=!n.querySelector(".value-null")&&(n.textContent??"").trim()!=="";if(i&&b&&a.has(i)&&!n.querySelector(".malloy-table")){if(n.classList.add(v),n.tabIndex===0)o.add(i);else{const p=o.has(i);p||o.add(i),n.tabIndex=p?-1:0}n.setAttribute("role","button")}}}}function Ae(e){const t=e.closest(".malloy-table"),r=D(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(l=>l.closest(".malloy-table")===t&&D(l)===r)}function le(e,t){const r=Ae(e),l=r.indexOf(e);if(l===-1)return;const a=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(l+t,0),r.length-1)];if(a){for(const o of r)o.tabIndex=o===a?0:-1;return a}}function Se(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function Ee(e){const{foreground:t,axisFaint:r,gridline:l,font:a}=e,o={background:e.background,font:a.family,title:{color:t,font:a.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:l,labelFont:a.family,titleFont:a.family},legend:{labelColor:t,titleColor:t,labelFont:a.family,titleFont:a.family},header:{labelColor:t,titleColor:t},range:{category:e.series}};return n=>o}function Fe(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},l=t.tag("palette");if(l){const o={},n=l.textArray("series");n&&n.length>0&&(o.series=n);for(const i of he){const b=l.tag(i);if(!b)continue;const p={},x=b.text("light"),w=b.text("dark");x&&(p.light=x),w&&(p.dark=w),Object.keys(p).length>0&&(o[i]=p)}Object.keys(o).length>0&&(r.palette=o)}const a=t.tag("font");if(a){const o={},n=a.text("family");n&&(o.family=n);const i=a.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(o.size=i),Object.keys(o).length>0&&(r.font=o)}return Object.keys(r).length>0?r:void 0}const B="data-publisher-fill",ze=async(e,t)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:r}=await pe();return new r({onClick:t,vegaConfigOverride:Ee(e),theme:Se(e),onError:l=>{console.error("Error rendering visualization:",typeof l,l)}}).createViz()};async function Re(e){if(!e||typeof e!="object")return;const t=e,r=[...Array.isArray(t.model_annotations)?t.model_annotations:[],...Array.isArray(t.source_annotations)?t.source_annotations:[],...Array.isArray(t.annotations)?t.annotations:[]].map(a=>typeof a?.value=="string"?a.value:void 0).filter(a=>!!a);if(r.length===0)return;let l;try{({parseAnnotation:l}=await fe())}catch{return}try{const{tag:a}=l(r);return Fe(a)}catch(a){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:a,lines:r});return}}function je(e,t,r){const l=ge(t,r);for(const[a,o]of Object.entries(l))e.style.setProperty(a,o)}const Oe=`
1
+ import{j as $,F as oe,r as p,aN as he,R as ue,h as me,aO as be,at as ye,aP as K,aQ as pe,aR as fe,aS as ge,aT as ve,aU as we,aV as ke,aW as ne}from"./index-BIqIsMFr.js";const v="publisher-drill";function xe(e,t){const r=new Set;let l;try{l=e.getMetadata()?.getAllFields()??[]}catch{return r}const o=new Set;for(const a of l)!a||t(a)||a.tag?.tag("hidden")===void 0&&o.add(a.tag?.text("label")??a.name);for(const a of l){if(!a||!t(a))continue;const n=a.tag?.text("label")??a.name;o.has(n)||r.add(n)}return r}function D(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function Ce(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const l=n=>n.closest(".malloy-table")===r,o=new Set;for(const n of r.querySelectorAll(".column-cell.th")){if(!l(n))continue;const i=(n.textContent??"").replace(/\u200b/g,"").trim(),b=D(n);b&&t.has(i)&&o.add(b)}if(o.size===0)continue;const a=new Set;for(const n of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!l(n))continue;const i=D(n);i&&(a.has(i)?n.tabIndex=-1:a.add(i))}for(const n of r.querySelectorAll(".column-cell.td")){if(!l(n))continue;const i=D(n),b=!n.querySelector(".value-null")&&(n.textContent??"").trim()!=="";if(i&&b&&o.has(i)&&!n.querySelector(".malloy-table")){if(n.classList.add(v),n.tabIndex===0)a.add(i);else{const f=a.has(i);f||a.add(i),n.tabIndex=f?-1:0}n.setAttribute("role","button")}}}}function Ae(e){const t=e.closest(".malloy-table"),r=D(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(l=>l.closest(".malloy-table")===t&&D(l)===r)}function le(e,t){const r=Ae(e),l=r.indexOf(e);if(l===-1)return;const o=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(l+t,0),r.length-1)];if(o){for(const a of r)a.tabIndex=a===o?0:-1;return o}}function Se(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function Ee(e){const{foreground:t,axisFaint:r,gridline:l,font:o}=e,a={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:l,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}},n={...a,legend:{...a.legend,orient:"bottom"}};return i=>i==="shape_map"?n:a}function ze(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},l=t.tag("palette");if(l){const a={},n=l.textArray("series");n&&n.length>0&&(a.series=n);for(const i of he){const b=l.tag(i);if(!b)continue;const f={},x=b.text("light"),w=b.text("dark");x&&(f.light=x),w&&(f.dark=w),Object.keys(f).length>0&&(a[i]=f)}Object.keys(a).length>0&&(r.palette=a)}const o=t.tag("font");if(o){const a={},n=o.text("family");n&&(a.family=n);const i=o.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(a.size=i),Object.keys(a).length>0&&(r.font=a)}return Object.keys(r).length>0?r:void 0}const B="data-publisher-fill",Re=async(e,t)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:r}=await fe();return new r({onClick:t,vegaConfigOverride:Ee(e),theme:Se(e),onError:l=>{console.error("Error rendering visualization:",typeof l,l)}}).createViz()};async function Fe(e){if(!e||typeof e!="object")return;const t=e,r=[...Array.isArray(t.model_annotations)?t.model_annotations:[],...Array.isArray(t.source_annotations)?t.source_annotations:[],...Array.isArray(t.annotations)?t.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(r.length===0)return;let l;try{({parseAnnotation:l}=await pe())}catch{return}try{const{tag:o}=l(r);return ze(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:r});return}}function Te(e,t,r){const l=ge(t,r);for(const[o,a]of Object.entries(l))e.style.setProperty(o,a)}const je=`
2
2
  /* Card geometry, through the renderer's OWN theme vars rather than over the top
3
3
  of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
4
4
  passes each through to the --malloy-render--* the card CSS reads, so a value
@@ -80,6 +80,18 @@ div.malloy-render .malloy-dashboard .dashboard-row-header {
80
80
  the border's job, and the border is already doing it. */
81
81
  box-shadow: none !important;
82
82
  }
83
+ /* The strip of big-value cards as a grid, so cards share a width and the last one does not wrap
84
+ alone. The renderer's wrapping flex row sizes each card to its own text. The 250px floor is the
85
+ widest realistic value: it is nowrap at 32px in an overflow:visible card, so a narrower track
86
+ would spill it onto its neighbour. Embedded (a nested big_value) is left as the renderer draws it. */
87
+ .malloy-render .malloy-big-value:not(.malloy-big-value--embedded) {
88
+ display: grid;
89
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
90
+ }
91
+ .malloy-render .malloy-big-value-card:not(.malloy-big-value-card--embedded) {
92
+ width: auto;
93
+ max-width: none;
94
+ }
83
95
  .malloy-render .malloy-dashboard .dashboard-row-header-separator {
84
96
  background: var(--malloy-render--table-border) !important;
85
97
  }
@@ -138,4 +150,4 @@ div.malloy-render .malloy-dashboard .dashboard-row-header {
138
150
  color: var(--publisher-drill-link) !important;
139
151
  text-decoration: underline;
140
152
  }
141
- `,se="publisher-malloy-renderer-overrides";function Te(){if(typeof document>"u"||document.getElementById(se))return;const e=document.createElement("style");e.id=se,e.textContent=Oe,document.head.appendChild(e)}function Me({result:e,height:t,drill:r,onSizeChange:l,onSizing:a,fill:o}){const n=f.useRef(null),i=f.useRef(r);i.current=r;const b=f.useCallback(c=>{i.current?.onClick(c)},[]),p=r!==void 0,x=f.useRef(!1),w=f.useRef(null),P=f.useRef(0),{theme:W,layers:G,mode:J}=ue(),Q=me().shape.borderRadius,X=f.useMemo(()=>({radius:`${Q}px`,padding:`${be}px`}),[Q]);return f.useEffect(()=>()=>{P.current+=1;const c=w.current;c?.viz.remove(),c?.node.remove(),w.current=null},[]),f.useLayoutEffect(()=>{if(!n.current||!e)return;Te();const c=n.current,ie=P.current+=1;let q=!1;const V=()=>!q&&ie===P.current;let d,m,L=null,H=0,I=null,N=null,_=null,R=null,j=null,O=null,Y=null,Z=0,A=null;x.current=!1;let g,S;const U=k=>{if(q||!k.firstElementChild||K(g,S)==="container")return;const T=ve(g,S);if(x.current&&!T)return;const M=c.hasAttribute(B);M&&c.removeAttribute(B);const E=we(k,ne(g));M&&c.setAttribute(B,""),E>0&&(x.current=!0,l&&E!==Z&&(Z=E,l(E)));const h=ke(k,ne(g));T&&h&&Y!==h&&(Y=h,O?.disconnect(),O=new ResizeObserver(()=>U(k)),O.observe(h))};return(async()=>{let k;try{k=JSON.parse(e)}catch(y){console.error("Error parsing visualization result:",y);return}const T=await Re(k),M=T?ye([...G,T],J):W;if(!V())return;try{m=await ze(M,b)}catch(y){console.error("Failed to create renderer:",y);return}if(!V()){m.remove(),m=void 0;return}const E=w.current;d=document.createElement("div"),d.style.width="100%",d.style.height="100%",je(d,M,X),c.childElementCount>0&&(c.style.position="relative",d.style.position="absolute",d.style.inset="0",d.style.visibility="hidden"),c.appendChild(d);const h=d;R=new MutationObserver(()=>{j&&clearTimeout(j),j=setTimeout(()=>{U(h),x.current&&R?.disconnect()},100)}),R.observe(d,{childList:!0,subtree:!0,attributes:!0});const de=m;let ee=!1;const te=()=>{if(!(ee||!V())){ee=!0,A&&(clearTimeout(A),A=null),E?.viz.remove();for(const y of Array.from(c.children))y!==h&&c.removeChild(y);h.style.position="",h.style.inset="",h.style.visibility="",c.style.position="",w.current={viz:de,node:h},U(h)}};try{m.setResult(k);try{const C=m.getMetadata(),F=C?.getRootField();g=F?.renderAs(),S=F?C?.getPluginsForField(F.key)?.[0]?.sizingStrategy:void 0}catch{g=void 0,S=void 0}a?.(K(g,S)),d.dataset.malloyRenderAs=g??"unknown",d.dataset.malloySizing=K(g,S),m.render(d);const y=i.current;try{if(y){const C=xe(m,y.canDrill),F=()=>{try{Ce(h,C)}catch(s){console.warn("Drill affordance skipped:",s)}};F();const re=s=>{const u=s.querySelector(".cell-content")??s,z=u.getBoundingClientRect();u.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:u.ownerDocument.defaultView,clientX:Math.round(z.left+z.width/2),clientY:Math.round(z.bottom)}))},ae=s=>s.target?.closest?.(`.${v}`)??null,ce=(s,u)=>{le(s,u)?.focus()};I=s=>{const u=ae(s);if(!u)return;const z=s.key==="ArrowDown"?1:s.key==="ArrowUp"?-1:s.key==="Home"?"first":s.key==="End"?"last":void 0;if(z!==void 0){s.preventDefault(),ce(u,z);return}s.key==="Enter"?(s.preventDefault(),re(u)):s.key===" "&&s.preventDefault()},N=s=>{if(s.key!==" ")return;const u=ae(s);u&&(s.preventDefault(),re(u))},_=s=>{const u=s.target?.closest?.(`.${v}`);u&&le(u,0)},h.addEventListener("keydown",I),h.addEventListener("keyup",N),h.addEventListener("focusin",_),C.size>0&&typeof MutationObserver<"u"&&(L=new MutationObserver(()=>{cancelAnimationFrame(H),H=requestAnimationFrame(F)}),L.observe(h,{childList:!0,subtree:!0}))}}catch(C){console.warn("Drill affordance skipped:",C)}m.onReady(te),A=setTimeout(te,1e4)}catch(y){console.error("Error rendering visualization:",y),R?.disconnect(),O?.disconnect(),L?.disconnect(),m.remove(),m=void 0,h.parentNode===c&&c.removeChild(h)}})(),()=>{q=!0,R?.disconnect(),O?.disconnect(),j&&clearTimeout(j),A&&clearTimeout(A),d&&w.current?.node!==d&&(I&&d.removeEventListener("keydown",I),N&&d.removeEventListener("keyup",N),_&&d.removeEventListener("focusin",_),L?.disconnect(),cancelAnimationFrame(H),m?.remove(),d.parentNode===c&&c.removeChild(d),c.style.position="")}},[e,b,p,l,a,W,G,J,X]),$.jsx("div",{ref:n,...o?{[B]:""}:{},style:{width:"100%",height:t?`${t}px`:"400px"}})}function $e(e){return typeof window>"u"?$.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):$.jsx(f.Suspense,{fallback:$.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:$.jsx(Me,{...e})})}const De=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));export{v as D,$e as R,Ee as a,Se as b,De as c,xe as d,Ce as m,Fe as r};
153
+ `,se="publisher-malloy-renderer-overrides";function Oe(){if(typeof document>"u"||document.getElementById(se))return;const e=document.createElement("style");e.id=se,e.textContent=je,document.head.appendChild(e)}function Me({result:e,height:t,drill:r,onSizeChange:l,onSizing:o,fill:a}){const n=p.useRef(null),i=p.useRef(r);i.current=r;const b=p.useCallback(c=>{i.current?.onClick(c)},[]),f=r!==void 0,x=p.useRef(!1),w=p.useRef(null),P=p.useRef(0),{theme:W,layers:G,mode:J}=ue(),Q=me().shape.borderRadius,X=p.useMemo(()=>({radius:`${Q}px`,padding:`${be}px`}),[Q]);return p.useEffect(()=>()=>{P.current+=1;const c=w.current;c?.viz.remove(),c?.node.remove(),w.current=null},[]),p.useLayoutEffect(()=>{if(!n.current||!e)return;Oe();const c=n.current,ie=P.current+=1;let q=!1;const V=()=>!q&&ie===P.current;let d,m,L=null,H=0,_=null,I=null,N=null,F=null,T=null,j=null,Y=null,Z=0,A=null;x.current=!1;let g,S;const U=k=>{if(q||!k.firstElementChild||K(g,S)==="container")return;const O=ve(g,S);if(x.current&&!O)return;const M=c.hasAttribute(B);M&&c.removeAttribute(B);const E=we(k,ne(g));M&&c.setAttribute(B,""),E>0&&(x.current=!0,l&&E!==Z&&(Z=E,l(E)));const h=ke(k,ne(g));O&&h&&Y!==h&&(Y=h,j?.disconnect(),j=new ResizeObserver(()=>U(k)),j.observe(h))};return(async()=>{let k;try{k=JSON.parse(e)}catch(y){console.error("Error parsing visualization result:",y);return}const O=await Fe(k),M=O?ye([...G,O],J):W;if(!V())return;try{m=await Re(M,b)}catch(y){console.error("Failed to create renderer:",y);return}if(!V()){m.remove(),m=void 0;return}const E=w.current;d=document.createElement("div"),d.style.width="100%",d.style.height="100%",Te(d,M,X),c.childElementCount>0&&(c.style.position="relative",d.style.position="absolute",d.style.inset="0",d.style.visibility="hidden"),c.appendChild(d);const h=d;F=new MutationObserver(()=>{T&&clearTimeout(T),T=setTimeout(()=>{U(h),x.current&&F?.disconnect()},100)}),F.observe(d,{childList:!0,subtree:!0,attributes:!0});const de=m;let ee=!1;const te=()=>{if(!(ee||!V())){ee=!0,A&&(clearTimeout(A),A=null),E?.viz.remove();for(const y of Array.from(c.children))y!==h&&c.removeChild(y);h.style.position="",h.style.inset="",h.style.visibility="",c.style.position="",w.current={viz:de,node:h},U(h)}};try{m.setResult(k);try{const C=m.getMetadata(),z=C?.getRootField();g=z?.renderAs(),S=z?C?.getPluginsForField(z.key)?.[0]?.sizingStrategy:void 0}catch{g=void 0,S=void 0}o?.(K(g,S)),d.dataset.malloyRenderAs=g??"unknown",d.dataset.malloySizing=K(g,S),m.render(d);const y=i.current;try{if(y){const C=xe(m,y.canDrill),z=()=>{try{Ce(h,C)}catch(s){console.warn("Drill affordance skipped:",s)}};z();const re=s=>{const u=s.querySelector(".cell-content")??s,R=u.getBoundingClientRect();u.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:u.ownerDocument.defaultView,clientX:Math.round(R.left+R.width/2),clientY:Math.round(R.bottom)}))},ae=s=>s.target?.closest?.(`.${v}`)??null,ce=(s,u)=>{le(s,u)?.focus()};_=s=>{const u=ae(s);if(!u)return;const R=s.key==="ArrowDown"?1:s.key==="ArrowUp"?-1:s.key==="Home"?"first":s.key==="End"?"last":void 0;if(R!==void 0){s.preventDefault(),ce(u,R);return}s.key==="Enter"?(s.preventDefault(),re(u)):s.key===" "&&s.preventDefault()},I=s=>{if(s.key!==" ")return;const u=ae(s);u&&(s.preventDefault(),re(u))},N=s=>{const u=s.target?.closest?.(`.${v}`);u&&le(u,0)},h.addEventListener("keydown",_),h.addEventListener("keyup",I),h.addEventListener("focusin",N),C.size>0&&typeof MutationObserver<"u"&&(L=new MutationObserver(()=>{cancelAnimationFrame(H),H=requestAnimationFrame(z)}),L.observe(h,{childList:!0,subtree:!0}))}}catch(C){console.warn("Drill affordance skipped:",C)}m.onReady(te),A=setTimeout(te,1e4)}catch(y){console.error("Error rendering visualization:",y),F?.disconnect(),j?.disconnect(),L?.disconnect(),m.remove(),m=void 0,h.parentNode===c&&c.removeChild(h)}})(),()=>{q=!0,F?.disconnect(),j?.disconnect(),T&&clearTimeout(T),A&&clearTimeout(A),d&&w.current?.node!==d&&(_&&d.removeEventListener("keydown",_),I&&d.removeEventListener("keyup",I),N&&d.removeEventListener("focusin",N),L?.disconnect(),cancelAnimationFrame(H),m?.remove(),d.parentNode===c&&c.removeChild(d),c.style.position="")}},[e,b,f,l,o,W,G,J,X]),$.jsx("div",{ref:n,...a?{[B]:""}:{},style:{width:"100%",height:t?`${t}px`:"400px"}})}function $e(e){return typeof window>"u"?$.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):$.jsx(p.Suspense,{fallback:$.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:$.jsx(Me,{...e})})}const De=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));export{v as D,$e as R,Ee as a,Se as b,De as c,xe as d,Ce as m,ze as r};
@@ -1 +1 @@
1
- import{an as o,j as r,ao as s,ap as n,F as t,T as a}from"./index-BZEvIUf-.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};
1
+ import{an as o,j as r,ao as s,ap as n,F as t,T as a}from"./index-BIqIsMFr.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};