@malloy-publisher/server 0.0.245 → 0.0.247

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.
@@ -1407,10 +1407,19 @@ paths:
1407
1407
  package-level properties. The package must exist and be accessible.
1408
1408
 
1409
1409
  A supplied `materialization` block REPLACES the one on disk, so re-send every
1410
- field of it you want to keep. Two exceptions, because neither is expressible
1411
- in the block a caller sends: `scope` (a top-level field) and `queryMetadata`
1412
- (orthogonal to the schedule and freshness policy this call usually carries) are
1413
- preserved when omitted. Send `queryMetadata: null` to clear it.
1410
+ field of it you want to keep. Two exceptions are preserved when omitted:
1411
+ `scope`, which is a top-level field and not expressible in the block at all,
1412
+ and `queryMetadata`, which is orthogonal to the schedule and freshness policy
1413
+ this call usually carries a client setting a schedule has no reason to
1414
+ re-send the package's tags, and dropping them silently untags every statement
1415
+ the package issues.
1416
+
1417
+ `queryMetadata` has two homes: the top-level field, which is canonical, and
1418
+ `materialization.queryMetadata`, which is DEPRECATED and still accepted. The
1419
+ canonical field wins if a request sends both, and both are populated on read.
1420
+ At EITHER home, omitting it preserves the package's tags and so does sending
1421
+ null — a client that serializes unset fields as null must not untag a package
1422
+ by accident. Send an empty object to clear.
1414
1423
  parameters:
1415
1424
  - name: environmentName
1416
1425
  in: path
@@ -2955,6 +2964,32 @@ components:
2955
2964
  URI (gs:// or s3://) of the externally-computed manifest for this package.
2956
2965
  On (re)load the publisher reads it and binds persist references
2957
2966
  (sourceEntityId -> physicalTableName). Null = serve live.
2967
+ queryMetadata:
2968
+ oneOf:
2969
+ - $ref: "#/components/schemas/QueryMetadata"
2970
+ - type: "null"
2971
+ description: |
2972
+ The package-level layer of per-query metadata. Applies to every
2973
+ statement the package's sources issue — a served query as much as a
2974
+ build — and is overridden per property by a model-file, source or
2975
+ per-request declaration.
2976
+
2977
+ **This is the canonical home, here and in `publisher.json`.**
2978
+ `materialization.queryMetadata` is the original one and is
2979
+ DEPRECATED: the properties are not a build setting, so carrying them
2980
+ inside the build-policy block described a scope the feature does not
2981
+ have.
2982
+
2983
+ Both are populated on read and both are accepted on write, so a
2984
+ client can migrate on its own schedule. On write the canonical field
2985
+ wins if a request sends both; in the manifest, the two declaring
2986
+ different bags warns and the root wins, rather than failing the load
2987
+ the way a conflicting `scope` does — a tag is observability only and
2988
+ must never be the reason a package refuses to load.
2989
+
2990
+ Omitting this on a PATCH preserves the package's existing tags, and
2991
+ so does sending null — a client that serializes unset fields as null
2992
+ must not untag a package by accident. Send an empty object to clear.
2958
2993
  materialization:
2959
2994
  oneOf:
2960
2995
  - $ref: "#/components/schemas/PackageMaterializationConfig"
@@ -3084,11 +3119,20 @@ components:
3084
3119
  - $ref: "#/components/schemas/QueryMetadata"
3085
3120
  - type: "null"
3086
3121
  description: >-
3087
- The manifest's `materialization.queryMetadata` block, verbatim. Null
3088
- = none declared. The package-level layer of per-query metadata: it
3089
- applies to every statement the package's sources issue, and a
3090
- model-file, source or per-request declaration overrides it property
3091
- by property.
3122
+ DEPRECATED home for the package's per-query metadata; read
3123
+ `Package.queryMetadata`, which is canonical. Null = none declared.
3124
+
3125
+ NOT the manifest's `materialization.queryMetadata` verbatim: it is
3126
+ the RESOLVED winner across both manifest homes, and it is synthesized
3127
+ for a package whose manifest has no `materialization` block at all —
3128
+ a package that declares tags the canonical way has no build policy to
3129
+ carry them, and its tags must not be lost for want of one. Both homes
3130
+ are populated on read, so this and `Package.queryMetadata` agree.
3131
+
3132
+ The package-level layer of per-query metadata: it applies to every
3133
+ statement the package's sources issue — a build and a served query
3134
+ alike — and a model-file, source or per-request declaration overrides
3135
+ it property by property.
3092
3136
 
3093
3137
  Freshness:
3094
3138
  type: object
@@ -3674,13 +3718,23 @@ components:
3674
3718
  grammar while other backends keep it.
3675
3719
 
3676
3720
  Layers, most specific wins per property: connection default < package
3677
- `materialization.queryMetadata` < model-file
3678
- `## materialization.queryMetadata.*` < `#@ persist queryMetadata.*` <
3679
- per-request `queryMetadata`. The publisher's own context (`class`,
3721
+ `queryMetadata` < model-file `## queryMetadata.*` < source
3722
+ `#@ queryMetadata.*` < per-request `queryMetadata`. The `materialization.`
3723
+ spellings of the package and model-file layers are deprecated and still
3724
+ read; where a file declares both, the canonical one wins per property. The publisher's own context (`class`,
3680
3725
  `environment`, `package`, `model`, `source`, `trigger`, `run_id`,
3681
- `query_id`) is applied on top and cannot be overwritten by a declaration
3682
- — it is what the server is actually doing, and a caller must not be able
3683
- to relabel it. Put no secrets or personal data here: a tag is visible to
3726
+ `query_id`, `version`) is applied on top and cannot be overwritten it
3727
+ is what the server is actually doing, and a caller must not be able to
3728
+ relabel it. Those names are also RESERVED against a MODEL-SIDE
3729
+ declaration: a package block, a model file or a `#@ persist` annotation
3730
+ declaring one has it DROPPED rather than attached. Context only
3731
+ overwrites a name it has a value for, and a served query has no
3732
+ `source`, `trigger` or `run_id` — so a declared one would otherwise ride
3733
+ interactive traffic and read, in the backend's own history, exactly like
3734
+ a build. A connection default and a per-request bag are not covered: a
3735
+ request setting `queryClass` is a caller describing its own call, while a
3736
+ model-side declaration rides every query against that source, including
3737
+ ones its author never sees. Put no secrets or personal data here: a tag is visible to
3684
3738
  anyone who can read the backend's query history, and on a backend with no
3685
3739
  native tag mechanism it is visible in the statement text.
3686
3740
 
@@ -4606,18 +4660,39 @@ components:
4606
4660
  properties:
4607
4661
  source:
4608
4662
  type: string
4609
- description: Malloy source code to compile
4663
+ description:
4664
+ Malloy source code to compile; never executed. Required at scope
4665
+ "append" and "file"; optional at scope "package", where it acts as
4666
+ a what-if replacement for the model in the URL.
4667
+ scope:
4668
+ type: string
4669
+ enum: ["append", "file", "package"]
4670
+ default: append
4671
+ description:
4672
+ What the source means, and how far the check reaches. "append"
4673
+ (default, the historical behavior) appends the source to the model
4674
+ in the URL and compiles it in that namespace — right for NEW
4675
+ definitions; an edit to an existing definition collides ("Cannot
4676
+ redefine"), and diagnostic positions land in the concatenated
4677
+ virtual file. "file" compiles the source AS that model, replacing
4678
+ its on-disk content for the check — validates an edit before
4679
+ saving, at true file coordinates. "package" runs the same worker
4680
+ compiler and file selection as reload over every .malloy and
4681
+ .malloynb file, without swapping the result into the served
4682
+ package; with a source, importers compile against the replacement.
4683
+ Package diagnostics can name files hidden from discovery. No rows
4684
+ or SQL are returned, and caller-provided source remains subject to
4685
+ authorize gates. includeSql is not available at "package". An
4686
+ invalid value is rejected with a 400 naming the valid set.
4610
4687
  includeSql:
4611
4688
  type: boolean
4612
4689
  default: false
4613
4690
  description:
4614
4691
  If true, returns the generated SQL alongside compilation results
4615
- (only available when compilation succeeds and the source contains a
4616
- runnable query).
4692
+ (only available at scope "append"/"file", when compilation succeeds
4693
+ and the source contains a runnable query).
4617
4694
  givens:
4618
4695
  $ref: "#/components/schemas/GivenValues"
4619
- required:
4620
- - source
4621
4696
 
4622
4697
  CompileResult:
4623
4698
  type: object
@@ -4654,6 +4729,14 @@ components:
4654
4729
  code:
4655
4730
  type: string
4656
4731
  description: Machine-readable error code
4732
+ model:
4733
+ type: string
4734
+ description:
4735
+ Package-relative path of the model file the problem points at,
4736
+ derived from `at.url`. Load-bearing at scope "package", where one
4737
+ array carries every file's problems; elsewhere it says when a
4738
+ diagnostic points at pre-existing content rather than the
4739
+ submitted source. Absent when the location is not a package file.
4657
4740
  at:
4658
4741
  type: object
4659
4742
  description: Source location of the problem
@@ -4961,14 +5044,24 @@ components:
4961
5044
  - type: "null"
4962
5045
  description: >-
4963
5046
  The source's EFFECTIVE per-query metadata after most-specific-wins
4964
- resolution per property (`#@ persist queryMetadata.*` > model-file
4965
- `## materialization.queryMetadata.*` > package
4966
- `materialization.queryMetadata`). Null = declared at no level. The
5047
+ resolution per property (`#@ queryMetadata.*` > model-file
5048
+ `## queryMetadata.*` > package `queryMetadata`; the deprecated
5049
+ `materialization.` spellings of the last two are still read and lose
5050
+ to the canonical ones). Null = declared at no level. The
4967
5051
  publisher attaches it — merged under its own context — to every
4968
- statement it issues while building this source, and reports it here so
4969
- a caller can see how a build will be tagged and tag its own queries
4970
- the same way. Observability only: excluded from `sourceEntityId`, so
4971
- editing it never re-addresses the source or orphans its table.
5052
+ statement it issues while building this source AND to every query
5053
+ served from it, and reports it here so a caller can see how the
5054
+ source's traffic will be tagged. Reported as DECLARED, not as
5055
+ attached: a property whose name the server owns (`class`,
5056
+ `environment`, `package`, `model`, `source`, `trigger`, `run_id`,
5057
+ `query_id`, `version`) appears here and is then dropped rather than
5058
+ attached. Copying this bag onto a request does NOT reproduce that
5059
+ drop: the reservation covers a MODEL-SIDE declaration only, so a
5060
+ `source`, `trigger` or `run_id` sent on a request layer ATTACHES, and
5061
+ the statement then reads, in the backend's own history, exactly like
5062
+ a build of this source. Strip the server-owned names before reusing
5063
+ it. Observability only: excluded from `sourceEntityId`, so editing it
5064
+ never re-addresses the source or orphans its table.
4972
5065
  columns:
4973
5066
  type: array
4974
5067
  description: Output schema of the source.
@@ -5376,27 +5469,88 @@ components:
5376
5469
  type: object
5377
5470
  additionalProperties:
5378
5471
  $ref: "#/components/schemas/ManifestEntry"
5379
- description: Map of sourceEntityId to manifest entry.
5472
+ description: >-
5473
+ Map of sourceEntityId to manifest entry. Every source that BUILT is
5474
+ here. A source that FAILED is reported in `failures`, and during the
5475
+ `ManifestEntry.error` deprecation window is also mirrored here
5476
+ carrying that field -- so a consumer resolving an entry to a real
5477
+ table must skip entries whose `error` is set until the field is
5478
+ removed, after which `entries` is built-only.
5479
+ failures:
5480
+ type: object
5481
+ additionalProperties:
5482
+ $ref: "#/components/schemas/SourceFailure"
5483
+ description: >-
5484
+ Map of sourceEntityId to the reason that source failed to
5485
+ materialize, for the sources that did NOT build. A build that loses
5486
+ some of its sources still returns the ones that succeeded in
5487
+ `entries`, so this is how a consumer tells a partial failure from a
5488
+ clean run and learns which source failed. Empty or absent on a run
5489
+ where every source built.
5380
5490
  strict:
5381
5491
  type: boolean
5382
5492
  description: Whether unresolved references should error.
5383
5493
 
5494
+ SourceFailure:
5495
+ type: object
5496
+ description: >-
5497
+ One source that failed to materialize, and why. Kept beside `entries`
5498
+ rather than inside a manifest entry because a failed source names no
5499
+ table that exists: an entry carries a required `physicalTableName`, so
5500
+ putting a failure there would hand every consumer a table name it must
5501
+ know not to resolve.
5502
+ required: [sourceEntityId, reason]
5503
+ properties:
5504
+ sourceEntityId:
5505
+ type: string
5506
+ description: The source's content address, as `entries` would have keyed it.
5507
+ sourceName:
5508
+ type: string
5509
+ description: The persist source's declared name, for reporting.
5510
+ reason:
5511
+ type: string
5512
+ description: >-
5513
+ Why this source failed, in the words the warehouse or compiler
5514
+ reported, redacted against that source's own connection.
5515
+ materializedTableId:
5516
+ type: string
5517
+ description: >-
5518
+ Echoes the caller-assigned id from the BuildInstruction, so an
5519
+ orchestrator can match this failure to the row it dispatched without
5520
+ deriving the content address itself.
5521
+ physicalTableName:
5522
+ type: string
5523
+ description: >-
5524
+ The table this source was HEADED for, echoing the instruction. NOT a
5525
+ table that exists -- the build that would have created it is what
5526
+ failed, and a source that failed a REBUILD leaves the prior
5527
+ generation's table in place under this same name, so resolving it
5528
+ serves stale data rather than missing. Present for correlating the
5529
+ failure with the request; a consumer must never resolve or read it.
5530
+
5384
5531
  ManifestEntry:
5385
5532
  type: object
5386
- description: A single entry in the build manifest.
5533
+ description: >-
5534
+ A single entry in the build manifest. An entry describing a source that
5535
+ BUILT names a table that exists; `error` marks the one exception, kept for
5536
+ one deprecation cycle (see that field).
5387
5537
  required: [sourceEntityId, physicalTableName]
5388
5538
  properties:
5389
5539
  sourceEntityId:
5390
5540
  type: string
5391
5541
  error:
5392
5542
  type: [string, "null"]
5543
+ deprecated: true
5393
5544
  description: >-
5394
- Why this source failed to materialize, in the words the warehouse or
5395
- compiler reported. Present only on a source that failed; absent on one
5396
- that built, whose table the remaining fields describe. A build that
5397
- loses some of its sources still returns the ones that succeeded, so an
5398
- entry carrying this is how a consumer tells a failed source from a
5399
- healthy one.
5545
+ DEPRECATED -- read `BuildManifest.failures` instead, which is where a
5546
+ failed source is now reported. Mirrors `SourceFailure.reason` for the
5547
+ same source, so a consumer written against 0.0.245-0.0.246 keeps
5548
+ working unchanged; it will be removed once those consumers have moved.
5549
+ An entry carrying this describes a source that FAILED, so its
5550
+ `physicalTableName` names a table the build did not create -- which is
5551
+ the defect the `failures` collection exists to remove, because the
5552
+ field is required and a consumer resolving an entry to a real table has
5553
+ no way to know it must check here first.
5400
5554
  sourceName:
5401
5555
  type: string
5402
5556
  description: >-
@@ -1 +1 @@
1
- import{$ as r,H as t,j as e,a1 as i,aa as o}from"./index-DJ-3RN5W.js";function m(){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{m as default};
1
+ import{$ as r,H as t,j as e,a1 as i,aa as o}from"./index-BwoU1Ko8.js";function m(){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{m as default};
@@ -1 +1 @@
1
- import{$ as n,j as t,e as o}from"./index-DJ-3RN5W.js";function s(){const e=n();return t.jsx(o,{onClickEnvironment:e})}export{s as default};
1
+ import{$ as n,j as t,e as o}from"./index-BwoU1Ko8.js";function s(){const e=n();return t.jsx(o,{onClickEnvironment:e})}export{s as default};
@@ -1 +1 @@
1
- import{c,j as s}from"./index-DJ-3RN5W.js";const t=c(s.jsx("path",{d:"M12 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"})),a=c(s.jsx("path",{d:"M12 7c-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"}));export{t as D,a as L};
1
+ import{c,j as s}from"./index-BwoU1Ko8.js";const t=c(s.jsx("path",{d:"M12 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"})),a=c(s.jsx("path",{d:"M12 7c-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"}));export{t as D,a as L};
@@ -1,2 +1,2 @@
1
- import{u as Pe,g as Ee,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as J,b as oe,d as le,f as ce,h as de,i as ze,k as O,l as pe,T as U,n as Z,o as Te,p as De,q as Re,t as ue,v as Be,w as se,x as Le,y as He,z as $e,A,C as $,M as Ne,P as Ae,D as We,E as Oe,S as Ve,F as Ue,G as Q,I as V,H as he,$ as q,J as f,K as Qe,L as xe,N as F,O as Fe,Q as Xe,U as ae,V as fe,W as me,X as ge,Y as Ye,Z as _e,_ as Ke}from"./index-DJ-3RN5W.js";import{D as Ge,L as Je}from"./LightMode-CM8J0nPB.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:x=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let m=typeof o=="function"?o(a):o;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
1
+ import{u as Pe,g as Ee,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as J,b as oe,d as le,f as ce,h as de,i as ze,k as O,l as pe,T as U,n as Z,o as Te,p as De,q as Re,t as ue,v as Be,w as se,x as Le,y as He,z as $e,A,C as $,M as Ne,P as Ae,D as We,E as Oe,S as Ve,F as Ue,G as Q,I as V,H as he,$ as q,J as f,K as Qe,L as xe,N as F,O as Fe,Q as Xe,U as ae,V as fe,W as me,X as ge,Y as Ye,Z as _e,_ as Ke}from"./index-BwoU1Ko8.js";import{D as Ge,L as Je}from"./LightMode-4Y7DEWAD.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:x=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let m=typeof o=="function"?o(a):o;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
2
2
  `)),(ye!==void 0?et:Ze)(m,c,h,x,p)}}be();const tt=S(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"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(J(({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:oe(e.palette.grey[200],.12)}:{backgroundColor:oe(e.palette.grey[600],.12)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:x="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:m=1,maxItems:y=8,separator:P="/",...H}=o,[z,E]=u.useState(!1),v={...o,component:i,expanded:z,expandText:x,itemsAfterCollapse:p,itemsBeforeCollapse:m,maxItems:y,separator:P},C=it(v),T=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{E(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return m+p>=d.length?d:[...d.slice(0,m),t.jsx(ot,{"aria-label":x,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:T},onClick:w},"ellipsis"),...d.slice(d.length-p,d.length)]},D=u.Children.toArray(s).filter(d=>u.isValidElement(d)).map((d,w)=>t.jsx("li",{className:C.li,children:d},`child-${w}`));return t.jsx(lt,{ref:n,component:i,color:"textSecondary",className:O(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&D.length<=y?D:k(D),C.separator,P,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const x=a.getComputedStyle(r);i=x.getPropertyValue("-webkit-transform")||x.getPropertyValue("transform")}let c=0,h=0;if(i&&i!=="none"&&typeof i=="string"){const x=i.split("(")[1].split(")")[0].split(",");c=parseInt(x[4],10),h=parseInt(x[5],10)}return e==="left"?s?`translateX(${s.right+c-o.left}px)`:`translateX(${a.innerWidth+c-o.left}px)`:e==="right"?s?`translateX(-${o.right-s.left-c}px)`:`translateX(-${o.left+o.width-c}px)`:e==="up"?s?`translateY(${s.bottom+h-o.top}px)`:`translateY(${a.innerHeight+h-o.top}px)`:s?`translateY(-${o.top-s.top+o.height-h}px)`:`translateY(-${o.top+o.height-h}px)`}function xt(e){return typeof e=="function"?e():e}function W(e,r,n){const o=xt(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ft=u.forwardRef(function(r,n){const o=Z(),s={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:c=!0,children:h,container:x,direction:p="down",easing:m=s,in:y,onEnter:P,onEntered:H,onEntering:z,onExit:E,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=Te,...D}=r,d=u.useRef(null),w=De(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},X=b((l,g)=>{W(p,l,x),Le(l),P&&P(l,g)}),te=b((l,g)=>{const L=se({timeout:j,style:T,easing:m},{mode:"enter"});l.style.webkitTransition=o.transitions.create("-webkit-transform",{...L}),l.style.transition=o.transitions.create("transform",{...L}),l.style.webkitTransform="none",l.style.transform="none",z&&z(l,g)}),R=b(H),B=b(C),I=b(l=>{const g=se({timeout:j,style:T,easing:m},{mode:"exit"});l.style.webkitTransition=o.transitions.create("-webkit-transform",g),l.style.transition=o.transitions.create("transform",g),W(p,l,x),E&&E(l)}),Y=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),_=l=>{i&&i(d.current,l)},N=u.useCallback(()=>{d.current&&W(p,d.current,x)},[p,x]);return u.useEffect(()=>{if(y||p==="down"||p==="right")return;const l=Be(()=>{d.current&&W(p,d.current,x)}),g=ue(d.current);return g.addEventListener("resize",l),()=>{l.clear(),g.removeEventListener("resize",l)}},[p,y,x]),u.useEffect(()=>{y||N()},[y,N]),t.jsx(k,{nodeRef:d,onEnter:X,onEntered:R,onEntering:te,onExit:I,onExited:Y,onExiting:B,addEndListener:_,appear:c,in:y,timeout:j,...D,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...T,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:We,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(J(({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 jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=Z(),a=He(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:h,children:x,className:p,elevation:m=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:P,...H}={},onClose:z,open:E=!1,PaperProps:v={},SlideProps:C,TransitionComponent:T,transitionDuration:j=i,variant:k="temporary",slots:D={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const X=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:m,open:E,variant:k,...w},B=gt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...P},{transitionDuration:j})}},[Y,_]=A("root",{ref:n,elementType:yt,className:O(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:E,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className:O(B.paper,v.className),ownerState:R,externalForwardedProps:I,additionalProps:{elevation:k==="temporary"?m:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[g,L]=A("docked",{elementType:bt,ref:n,className:O(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:ft,ownerState:R,externalForwardedProps:I,additionalProps:{in:E,direction:je[X],timeout:j,appear:b.current}}),re=t.jsx(N,{...l,children:x});if(k==="permanent")return t.jsx(g,{...L,children:re});const ne=t.jsx(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(Y,{..._,children:ne})}),St=be({themeId:Oe}),Pt=S([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")]),Et=S(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"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(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"})),Mt=S(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"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Tt=S(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"})),Dt=S([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")]);function G(e){return t.jsxs(Ve,{...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 Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Et:s==="dark"?Ge:Je;return t.jsx(Q,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function K({label:e,onClick:r}){return t.jsx(Qe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",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:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=q();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(f,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(K,{label:e.environmentName,onClick:o=>n(`/${e.environmentName}/`,o)}),e.packageName&&t.jsx(K,{label:e.packageName,onClick:o=>n(`/${e.environmentName}/${e.packageName}/`,o)}),r&&t.jsx(K,{label:r,onClick:o=>n(`/${e.environmentName}/${e.packageName}/${r}`,o)})]})})}const Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(f,{sx:{height:"100dvh",width:e?$t:Ht,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(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(f,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=q();return n?t.jsxs(f,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[n,t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(G,{fontSize:"small"})})]}):t.jsxs(f,{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(f,{onClick:s=>o("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(f,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(U,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(Q,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(G,{fontSize:"small"})})})]})}function At({isCollapsed:e}){const n=xe().pathname==="/";return t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Wt({isCollapsed:e}){const{apiClients:r}=Fe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{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(F,{sx:{py:0},children:s.map(a=>{const i=a.name??"";return t.jsx(ee,{icon:t.jsx(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Ot({isCollapsed:e}){const n=xe().pathname.startsWith("/settings/theme");return t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Settings"}),t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(Dt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})]})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Tt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(F,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=q(),i=t.jsxs(fe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:r,placement:"right",children:t.jsx(f,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(fe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:e,placement:"right",children:t.jsx(f,{children:a})}):a}function Qt({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{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(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function Yt({headerProps:e}){const r=Z(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(f,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(f,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(f,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ye.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(f,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(V,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(G,{fontSize:"small"})})}),t.jsx(f,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Lt,{})}),t.jsxs(f,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(f,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(_e,{})})})]}),t.jsx(Qt,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
@@ -1 +1 @@
1
- import{H as r,$ as t,j as e,a1 as c,a9 as o}from"./index-DJ-3RN5W.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{m as default};
1
+ import{H as r,$ as t,j as e,a1 as c,a9 as o}from"./index-BwoU1Ko8.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{m as default};
@@ -1 +1 @@
1
- import{H as f,L as u,$ as v,O as k,j as e,a0 as W,a1 as p,a2 as $,J as s,a3 as b,a4 as F,a5 as R,T as o,a6 as t,a7 as d}from"./index-DJ-3RN5W.js";function O(){const a=f(),n=a["*"],{search:h,hash:x}=u(),g=v(),{server:j}=k();if(!a.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});if(n?.startsWith("pages/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const r=`data-apps/${n.slice(6)}`,c=encodeURIComponent(a.environmentName),N=encodeURIComponent(a.packageName);return e.jsx(W,{to:`/${c}/${N}/${r}${h}${x}`,replace:!0})}const i={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const r=n.slice(10),c=p({environmentName:a.environmentName,packageName:a.packageName,modelPath:r});return e.jsx($,{resourceUri:c})}const m=p({environmentName:a.environmentName,packageName:a.packageName,modelPath:n});if(n?.endsWith(".malloy"))return e.jsx(s,{sx:i,children:e.jsx(b,{resourceUri:m,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return e.jsx(s,{sx:i,children:e.jsx(F,{resourceUri:m,maxResultSize:1024*1024,onNavigate:g})});const y=/\.[^./]+$/.test(n??""),l=R({server:j,environmentName:a.environmentName,packageName:a.packageName,path:n??""});return e.jsxs(s,{sx:i,children:[e.jsx(o,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsx(s,{component:"span",sx:{fontFamily:t},children:n})," ","does not name a"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","or"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","file in package"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:a.packageName}),". This address opens"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","and"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","files."]}),y&&e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:"public/"})," ","directory is served at ",e.jsx(d,{href:l,children:l}),"."]}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsxs(d,{href:`/${encodeURIComponent(a.environmentName)}/${encodeURIComponent(a.packageName)}`,children:["Back to ",a.packageName]})," ","lists this package's models, notebooks, and data apps."]})]})}export{O as default};
1
+ import{H as f,L as u,$ as v,O as k,j as e,a0 as W,a1 as p,a2 as $,J as s,a3 as b,a4 as F,a5 as R,T as o,a6 as t,a7 as d}from"./index-BwoU1Ko8.js";function O(){const a=f(),n=a["*"],{search:h,hash:x}=u(),g=v(),{server:j}=k();if(!a.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});if(n?.startsWith("pages/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const r=`data-apps/${n.slice(6)}`,c=encodeURIComponent(a.environmentName),N=encodeURIComponent(a.packageName);return e.jsx(W,{to:`/${c}/${N}/${r}${h}${x}`,replace:!0})}const i={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const r=n.slice(10),c=p({environmentName:a.environmentName,packageName:a.packageName,modelPath:r});return e.jsx($,{resourceUri:c})}const m=p({environmentName:a.environmentName,packageName:a.packageName,modelPath:n});if(n?.endsWith(".malloy"))return e.jsx(s,{sx:i,children:e.jsx(b,{resourceUri:m,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return e.jsx(s,{sx:i,children:e.jsx(F,{resourceUri:m,maxResultSize:1024*1024,onNavigate:g})});const y=/\.[^./]+$/.test(n??""),l=R({server:j,environmentName:a.environmentName,packageName:a.packageName,path:n??""});return e.jsxs(s,{sx:i,children:[e.jsx(o,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsx(s,{component:"span",sx:{fontFamily:t},children:n})," ","does not name a"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","or"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","file in package"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:a.packageName}),". This address opens"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","and"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","files."]}),y&&e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:"public/"})," ","directory is served at ",e.jsx(d,{href:l,children:l}),"."]}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsxs(d,{href:`/${encodeURIComponent(a.environmentName)}/${encodeURIComponent(a.packageName)}`,children:["Back to ",a.packageName]})," ","lists this package's models, notebooks, and data apps."]})]})}export{O as default};
@@ -1 +1 @@
1
- import{H as r,$ as t,j as e,a1 as c,a8 as o}from"./index-DJ-3RN5W.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{l as default};
1
+ import{H as r,$ as t,j as e,a1 as c,a8 as o}from"./index-BwoU1Ko8.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{l as default};
@@ -1 +1 @@
1
- import{ab as o,j as r,ac as s,ad as n,J as t,T as a}from"./index-DJ-3RN5W.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{ab as o,j as r,ac as s,ad as n,J as t,T as a}from"./index-BwoU1Ko8.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};