@mappedin/mappedin-js 6.24.1 → 6.25.0

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.
@@ -1 +1 @@
1
- import{a as b,ea as x,ga as y,x as A,y as w,z as g}from"./chunk-KVOE73GU.js";b();function M(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=B(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=B(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}function B(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new x(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}function R(o,l){if(l===A)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===g||l===w){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===g)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}export{M as a,R as b};
1
+ import{a as b,fa as x,ha as y,x as A,y as w,z as g}from"./chunk-CO4ZOCZ7.js";b();function M(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=B(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=B(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}function B(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new x(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}function R(o,l){if(l===A)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===g||l===w){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===g)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}export{M as a,R as b};
@@ -4756,6 +4756,16 @@ type TNavigationPathOptions = TAddPathOptions & {
4756
4756
  * If not specified, connection paths use the main `color` property.
4757
4757
  */
4758
4758
  __EXPERIMENTAL__CONNECTION_COLOR?: string;
4759
+ /**
4760
+ * @experimental Override width for connection paths (vertical paths between floors).
4761
+ * Accepts the same values as `width`:
4762
+ * - `number` — meters
4763
+ * - `'Npx'` — screen-space pixels (ribbon geometry only)
4764
+ * - `Interpolation` — zoom-interpolated meters or pixels
4765
+ *
4766
+ * If not specified, connection paths use the main `width` property.
4767
+ */
4768
+ __EXPERIMENTAL__CONNECTION_WIDTH?: PathWidth$1;
4759
4769
  /**
4760
4770
  * @experimental Amount in meters to shorten connection path from each end.
4761
4771
  * Prevents visual overlap with floor paths at junctions.
@@ -4768,6 +4778,32 @@ type TNavigationPathOptions = TAddPathOptions & {
4768
4778
  * If not specified, connection paths use the main `dashed` property.
4769
4779
  */
4770
4780
  __EXPERIMENTAL__CONNECTION_DASHED?: boolean;
4781
+ /**
4782
+ * @experimental Override how connection-path dashes are drawn — a painted
4783
+ * mask, or discrete dashes. Mirrors
4784
+ * `__EXPERIMENTAL_DASH_OPTIONS.__EXPERIMENTAL_DASH_STYLE`. If not specified,
4785
+ * connection paths use the main dash style.
4786
+ *
4787
+ * `'discrete'` renders connections flat regardless of
4788
+ * {@link __EXPERIMENTAL__CONNECTION_GEOMETRY}.
4789
+ */
4790
+ __EXPERIMENTAL__CONNECTION_DASH_STYLE?: 'mask' | 'discrete';
4791
+ /**
4792
+ * @experimental Override arrow flow animation for connection paths (vertical
4793
+ * paths between floors). When `false`, connection paths keep their arrow
4794
+ * flow static while floor paths can still animate. If not specified,
4795
+ * connection paths use the main `animateArrowsOnPath` property.
4796
+ */
4797
+ __EXPERIMENTAL__CONNECTION_ANIMATE_ARROWS_ON_PATH?: boolean;
4798
+ /**
4799
+ * @experimental Override arrow display for connection paths (vertical paths
4800
+ * between floors). When `false`, connection paths render without directional
4801
+ * arrows (plain dashes/ribbon) while floor paths can still show arrows.
4802
+ * Animation is independent: arrow flow follows `animateArrowsOnPath`. If
4803
+ * not specified, connection paths use the main `displayArrowsOnPath`
4804
+ * property.
4805
+ */
4806
+ __EXPERIMENTAL__CONNECTION_DISPLAY_ARROWS_ON_PATH?: boolean;
4771
4807
  /**
4772
4808
  * @experimental Override geometry type for connection paths.
4773
4809
  * - 'tube': Original tube geometry with 8 radial segments
@@ -9522,10 +9558,10 @@ declare const markerStateSchema: ZodObject<{
9522
9558
  /** @internal */
9523
9559
  declare const markerStateSchemaPartial: ZodObject<{
9524
9560
  type: ZodOptional<ZodDefault<ZodLiteral<"marker">>>;
9525
- enabled: ZodOptional<ZodDefault<ZodBoolean>>;
9526
9561
  interactive: ZodOptional<ZodDefault<ZodUnion<readonly [ZodBoolean, ZodLiteral<"pointer-events-auto">]>>>;
9527
9562
  rank: ZodOptional<ZodCustom<"initial" | TCollisionRankingTier, "initial" | TCollisionRankingTier>>;
9528
9563
  occlude: ZodOptional<ZodDefault<ZodBoolean>>;
9564
+ enabled: ZodOptional<ZodDefault<ZodBoolean>>;
9529
9565
  placement: ZodOptional<ZodOptional<ZodUnion<readonly [ZodEnum<{
9530
9566
  hidden: "hidden";
9531
9567
  top: "top";
@@ -9575,6 +9611,13 @@ type TMarkerUpdateState = output<typeof markerStateSchemaPartial>;
9575
9611
  * @internal
9576
9612
  */
9577
9613
  type BorderColor = LiteralUnion<'darken', string>;
9614
+ /**
9615
+ * Core-side path fields that {@link translatePathStateToGeojsonCore} rewrites from
9616
+ * `__EXPERIMENTAL_*` option names. A `Partial` slice of the renderer's `PathState`,
9617
+ * so it stays in sync with the core type instead of being hand-maintained.
9618
+ * @internal
9619
+ */
9620
+
9578
9621
  /** @internal */
9579
9622
  declare const pathStateSchemaPartial: ZodObject<{
9580
9623
  type: ZodOptional<ZodDefault<ZodLiteral<"path">>>;
@@ -9596,15 +9639,32 @@ declare const pathStateSchemaPartial: ZodObject<{
9596
9639
  __EXPERIMENTAL_SMOOTHING_TENSION: ZodOptional<ZodDefault<ZodNumber>>;
9597
9640
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: ZodOptional<ZodDefault<ZodNumber>>;
9598
9641
  dashed: ZodOptional<ZodDefault<ZodBoolean>>;
9642
+ dashDiscrete: ZodOptional<ZodDefault<ZodBoolean>>;
9643
+ dashCornerRadius: ZodOptional<ZodDefault<ZodNumber>>;
9599
9644
  __EXPERIMENTAL_DASH_OPTIONS: ZodOptional<ZodOptional<ZodDiscriminatedUnion<[ZodObject<{
9645
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9646
+ mask: "mask";
9647
+ discrete: "discrete";
9648
+ }>>;
9649
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9600
9650
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"length-scaling">;
9601
9651
  __EXPERIMENTAL_DASH_LENGTH: ZodDefault<ZodNumber>;
9602
9652
  __EXPERIMENTAL_DASH_GAP: ZodDefault<ZodNumber>;
9603
9653
  }, $strip>, ZodObject<{
9654
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9655
+ mask: "mask";
9656
+ discrete: "discrete";
9657
+ }>>;
9658
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9604
9659
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"width-scaling">;
9605
9660
  __EXPERIMENTAL_DASH_SIZE: ZodDefault<ZodNumber>;
9606
9661
  __EXPERIMENTAL_GAP_SIZE: ZodDefault<ZodNumber>;
9607
9662
  }, $strip>, ZodObject<{
9663
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9664
+ mask: "mask";
9665
+ discrete: "discrete";
9666
+ }>>;
9667
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9608
9668
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"absolute">;
9609
9669
  __EXPERIMENTAL_DASH_METERS: ZodDefault<ZodNumber>;
9610
9670
  __EXPERIMENTAL_GAP_METERS: ZodDefault<ZodNumber>;
@@ -9649,15 +9709,32 @@ declare const pathStateSchemaStrict: ZodObject<{
9649
9709
  __EXPERIMENTAL_SMOOTHING_TENSION: ZodDefault<ZodNumber>;
9650
9710
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: ZodDefault<ZodNumber>;
9651
9711
  dashed: ZodDefault<ZodBoolean>;
9712
+ dashDiscrete: ZodDefault<ZodBoolean>;
9713
+ dashCornerRadius: ZodDefault<ZodNumber>;
9652
9714
  __EXPERIMENTAL_DASH_OPTIONS: ZodOptional<ZodDiscriminatedUnion<[ZodObject<{
9715
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9716
+ mask: "mask";
9717
+ discrete: "discrete";
9718
+ }>>;
9719
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9653
9720
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"length-scaling">;
9654
9721
  __EXPERIMENTAL_DASH_LENGTH: ZodDefault<ZodNumber>;
9655
9722
  __EXPERIMENTAL_DASH_GAP: ZodDefault<ZodNumber>;
9656
9723
  }, $strip>, ZodObject<{
9724
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9725
+ mask: "mask";
9726
+ discrete: "discrete";
9727
+ }>>;
9728
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9657
9729
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"width-scaling">;
9658
9730
  __EXPERIMENTAL_DASH_SIZE: ZodDefault<ZodNumber>;
9659
9731
  __EXPERIMENTAL_GAP_SIZE: ZodDefault<ZodNumber>;
9660
9732
  }, $strip>, ZodObject<{
9733
+ __EXPERIMENTAL_DASH_STYLE: ZodDefault<ZodEnum<{
9734
+ mask: "mask";
9735
+ discrete: "discrete";
9736
+ }>>;
9737
+ __EXPERIMENTAL_DASH_CORNER_RADIUS: ZodDefault<ZodNumber>;
9661
9738
  __EXPERIMENTAL_DASH_MODE: ZodLiteral<"absolute">;
9662
9739
  __EXPERIMENTAL_DASH_METERS: ZodDefault<ZodNumber>;
9663
9740
  __EXPERIMENTAL_GAP_METERS: ZodDefault<ZodNumber>;
@@ -11374,12 +11451,47 @@ type TDirectionZone = {
11374
11451
  */
11375
11452
  floor?: Floor;
11376
11453
  };
11454
+ /**
11455
+ * @experimental
11456
+ * How a dash is drawn, independent of how it is sized. Available in every dash
11457
+ * mode, so the sizing axis ({@link TExperimentalDashOptions}) and the appearance
11458
+ * axis stay orthogonal.
11459
+ */
11460
+ type TExperimentalDashStyleOptions = {
11461
+ /**
11462
+ * How each dash is rendered.
11463
+ * - `'mask'`: the dash pattern is painted onto one continuous path (default)
11464
+ * - `'discrete'`: each dash is its own rounded-rectangle primitive, with its own
11465
+ * travel arrow and zoom LOD, and keeps its exact shape around sharp corners
11466
+ *
11467
+ * `'discrete'` implies flat (ribbon) rendering — a dash has no tube analogue — so
11468
+ * it overrides {@link TAddPathOptions.__EXPERIMENTAL_GEOMETRY}.
11469
+ *
11470
+ * @default 'mask'
11471
+ */
11472
+ __EXPERIMENTAL_DASH_STYLE?: 'mask' | 'discrete';
11473
+ /**
11474
+ * Corner rounding of each dash, from `0` (sharp rectangle) to `1` (fully
11475
+ * rounded), as a fraction of the dash's short half-side — the same idea as a
11476
+ * CSS `border-radius` in percent, so it stays proportional as the dash resizes
11477
+ * with zoom. When the dash's length equals its width, `1` renders a circle and
11478
+ * `0` renders a square.
11479
+ *
11480
+ * Only meaningful when `__EXPERIMENTAL_DASH_STYLE` is `'discrete'`.
11481
+ *
11482
+ * @default 1
11483
+ */
11484
+ __EXPERIMENTAL_DASH_CORNER_RADIUS?: number;
11485
+ };
11377
11486
  /**
11378
11487
  * @experimental
11379
11488
  * Dash configuration options for dashed paths.
11380
11489
  * Uses discriminated union - mode determines which properties are valid.
11490
+ *
11491
+ * The mode picks how dashes are *sized*; {@link TExperimentalDashStyleOptions}
11492
+ * picks how they are *drawn*, and applies to every mode.
11381
11493
  */
11382
- type TExperimentalDashOptions = {
11494
+ type TExperimentalDashOptions = TExperimentalDashStyleOptions & ({
11383
11495
  /**
11384
11496
  * Length-scaling mode: dash/gap as fractions of path length (0-1)
11385
11497
  */
@@ -11424,7 +11536,7 @@ type TExperimentalDashOptions = {
11424
11536
  * @default 0.5
11425
11537
  */
11426
11538
  __EXPERIMENTAL_GAP_METERS?: number;
11427
- };
11539
+ });
11428
11540
  /**
11429
11541
  * Options for controlling the behavior of a {@link Path}.
11430
11542
  */
@@ -11512,7 +11624,7 @@ type TAddPathOptions = {
11512
11624
  */
11513
11625
  verticalOffset?: number;
11514
11626
  /**
11515
- * Whether the path should be dashed.
11627
+ * Whether the path should be broken into dashes.
11516
11628
  *
11517
11629
  * @defaultValue false
11518
11630
  */
@@ -11580,6 +11692,10 @@ type TAddPathOptions = {
11580
11692
  * - 'tube': Original tube geometry with 8 radial segments (default)
11581
11693
  * - 'ribbon': Flat ribbon geometry with 2 vertices per segment
11582
11694
  *
11695
+ * Ignored when `__EXPERIMENTAL_DASH_OPTIONS.__EXPERIMENTAL_DASH_STYLE` is
11696
+ * `'discrete'`: a dash is a flat screen-facing quad with no tube analogue, so the
11697
+ * discrete-dash style always renders flat.
11698
+ *
11583
11699
  * @defaultValue 'tube'
11584
11700
  */
11585
11701
  __EXPERIMENTAL_GEOMETRY?: 'tube' | 'ribbon';
@@ -17617,6 +17733,20 @@ type PathState$1 = {
17617
17733
  * Whether the path should be rendered as a dashed line.
17618
17734
  */
17619
17735
  dashed: boolean;
17736
+ /**
17737
+ * Whether the path should be rendered as a discrete-dash line: each dash becomes its
17738
+ * own rounded-rectangle primitive. The dash sizing options define both the
17739
+ * dash's length along the path (the "on" size) and the gap between dashes. Only
17740
+ * supported with ribbon geometry.
17741
+ */
17742
+ dashDiscrete: boolean;
17743
+ /**
17744
+ * Corner rounding of each dash, from 0 (sharp rectangle) to 1 (fully rounded).
17745
+ * Expressed as a fraction of the dash's short half-side, like a CSS
17746
+ * border-radius in percent, so it stays proportional as the dash resizes with
17747
+ * zoom. When the dash's length equals its width, 1 renders a circle.
17748
+ */
17749
+ dashCornerRadius: number;
17620
17750
  /**
17621
17751
  * Length of each dash segment as fraction of path (0-1).
17622
17752
  */
@@ -17730,6 +17860,21 @@ type AddPathOptions = {
17730
17860
  * Whether the path should be dashed.
17731
17861
  */
17732
17862
  dashed?: boolean;
17863
+ /**
17864
+ * Whether the path should be discrete-dash: each dash becomes its own
17865
+ * rounded-rectangle primitive. Dash sizing defines the dash's length and gap.
17866
+ * Only supported with ribbon geometry.
17867
+ */
17868
+ dashDiscrete?: boolean;
17869
+ /**
17870
+ * Corner rounding of each dash, from 0 (sharp rectangle) to 1 (fully rounded).
17871
+ * Expressed as a fraction of the dash's short half-side, like a CSS
17872
+ * border-radius in percent. When the dash's length equals its width, 1 renders
17873
+ * a circle and 0 renders a square.
17874
+ *
17875
+ * @defaultValue 1
17876
+ */
17877
+ dashCornerRadius?: number;
17733
17878
  /**
17734
17879
  * How much the path hovers above the floor plane in meters.
17735
17880
  */
@@ -17890,6 +18035,18 @@ declare class PathComponent {
17890
18035
  travelledEndFraction: number;
17891
18036
  travelledColor: string;
17892
18037
  dashed: boolean;
18038
+ /** Max dash instances baked into the discrete-dash geometry. Set at build
18039
+ * time; the per-frame `dashCount` uniform derives the effective count from it. */
18040
+ maxDashCount: number;
18041
+ dashCapWarned: boolean;
18042
+ /** Smoothed + endcap-extended curve length in metres. The per-frame
18043
+ * effective dash count is derived from this, not the raw `pathLength`
18044
+ * uniform (which is the un-smoothed input polyline) — the dashes ride the
18045
+ * smoothed curve, so the count's denominator must match the curve they're
18046
+ * placed on or the gap drifts. */
18047
+ curveLength: number;
18048
+ dashDiscrete: boolean;
18049
+ dashCornerRadius: number;
17893
18050
  smoothingTension: number;
17894
18051
  smoothingCornerRadius: number;
17895
18052
  dashLength: number;
@@ -17913,6 +18070,17 @@ declare class PathComponent {
17913
18070
  materialDirty: boolean;
17914
18071
  constructor(feature: FeatureCollection<Point, PathProperties>, options?: AddPathOptions);
17915
18072
  updateScreenSpaceState(): void;
18073
+ /**
18074
+ * True when this path renders as a flat strip (ribbon mode) rather than an
18075
+ * extruded tube — the mode that supports screen-space pixel width, billboarding,
18076
+ * and discrete dashes. A discrete-dash path is always flat: a dash is a
18077
+ * screen-facing quad with no tube analogue, so `dashDiscrete` implies ribbon
18078
+ * regardless of `__EXPERIMENTAL_GEOMETRY`. The single source of truth for flat
18079
+ * vs tube; prefer this over re-deriving `=== 'ribbon'` from the geometry option.
18080
+ * Read by `buildPath` as `component.isFlat` — a plain-object mock cast as
18081
+ * `PathComponent` must define this getter, or it reads `undefined` (tube).
18082
+ */
18083
+ get isFlat(): boolean;
17916
18084
  setColor(): void;
17917
18085
  setOpacity(): void;
17918
18086
  set visible(visible: boolean);
@@ -18248,7 +18416,9 @@ declare class Geometry3DObject3D extends Object3D {
18248
18416
  type PathMaterial = ShaderMaterial & {
18249
18417
  uniforms: PathUniforms;
18250
18418
  };
18251
- type PathMesh = Mesh<TubeGeometry | BufferGeometry, PathMaterial, Object3DEventMap>;
18419
+ type PathMesh = Mesh<TubeGeometry | BufferGeometry, PathMaterial, Object3DEventMap> & {
18420
+ userData: Geometry3DObject3D['userData'];
18421
+ };
18252
18422
  declare class PatMeshContainer extends Geometry3DObject3D {
18253
18423
  children: [PathMesh, PathMesh];
18254
18424
  }
@@ -18449,6 +18619,32 @@ interface PathUniforms {
18449
18619
  type: 'b';
18450
18620
  value: boolean;
18451
18621
  };
18622
+ isDiscreteDash: {
18623
+ type: 'b';
18624
+ value: boolean;
18625
+ };
18626
+ /** Dash corner rounding, 0 = sharp rectangle, 1 = fully rounded (circle when square). */
18627
+ dashCornerRadius: {
18628
+ type: 'f';
18629
+ value: number;
18630
+ };
18631
+ /** Curve samples (positions row 0, tangents row 1) used to re-place flowing dashes. */
18632
+ curveTexture: {
18633
+ type: 't';
18634
+ value: Texture | null;
18635
+ };
18636
+ /** Number of samples (texels) along the curve texture's width. */
18637
+ curveTextureSize: {
18638
+ type: 'f';
18639
+ value: number;
18640
+ };
18641
+ /** Effective number of dashes to render. Driven per frame from the dash sizing
18642
+ * config and current zoom (for screen-space paths); surplus baked instances
18643
+ * are culled in the vertex shader. */
18644
+ dashCount: {
18645
+ type: 'f';
18646
+ value: number;
18647
+ };
18452
18648
  billboardThreshold: {
18453
18649
  type: 'f';
18454
18650
  value: number;
@@ -18485,6 +18681,12 @@ interface PathUniforms {
18485
18681
  type: 'f';
18486
18682
  value: number;
18487
18683
  };
18684
+ /** Minimum path width in meters. Screen-space (pixel) paths are floored at this
18685
+ * value so their dash count stays bounded on zoom-in. See ADR 0005. */
18686
+ minPathWidthMeters: {
18687
+ type: 'f';
18688
+ value: number;
18689
+ };
18488
18690
  }
18489
18691
  //#endregion
18490
18692
  //#region ../renderer-three/src/services/renderer.d.ts
@@ -22989,4 +23191,4 @@ declare const getVersion: () => string | undefined;
22989
23191
  */
22990
23192
  declare const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
22991
23193
  //#endregion
22992
- export { ACTION_TYPE, ANIMATION_TWEENS, type AddText3DOptions, type AddText3DPointOptions, type Analytics, Annotation, Area, type AutoElements, BBox, BEARING_TYPE, CONNECTION_TYPE, type Camera, type CameraBounds, type CameraTransform, type CaptureEventsPayloadMap, type ColorString, Connection, Coordinate, DOORS, type Debug, type DebugState, DetailedMapData, Directions, Door, E_SDK_LOG_LEVEL, type EasingCurve, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue, type EnvMapOptions, type Environment, type Exporter, Facade, Feature, FeatureCollection, Floor, FloorStack, type FootprintConfig, GeoJSON$1 as GeoJSON, GeoJsonGeometryTypes, GeoJsonObject, GeoJsonProperties, GeoJsonTypes, Geometry, GeometryCollection, GeometryObject, type GlobalState, Hyperlink, type IAnchorable, type IFocusable, type IGeoJSONData, type INavigatable, type ISystemPlugin, type Image3D, type Image3DView, ImageMetaData, type InitializeModelState, type InitializeText3DState, type InsetPadding, type InsetPaddingOption, type InterpolateOn, type Interpolation, type Label, type LabelAppearance, type LabelTextPlacement, type Labels, LineString, type LineStyle, LocationCategory, LocationProfile, type LocationSocial, type LocationState, MAPPEDIN_COLORS, type MapData, type MapDataElements, type MapElementToGetRenderedState, type MapElementToGetState, type MapElementToUpdateState, type MapElementsWithState, type MapFeatureOfType, MapObject, MapView, type MapViewElements, type MapViewState, type MappedinError, type MappedinRenderError, type Marker, type Markers, type MatchInfo, type Model, type Models, type MultiFloorViewEffectState, MultiLineString, MultiPoint, MultiPolygon, type Navigation, type NavigationState, Node, type OpeningHours, type OperationHours, type Outdoor, type OutlinesOptions, type PaintStyle, type Path, type PathSegment$1 as PathSegment, type PathWidth, type Paths, type PixelWidth, type Places, Point, PointOfInterest, Polygon, type Position, type PubSub, type Query, type RendererCoreOptions, type Search, type SearchOptions, type SearchResult, type SearchResultEnterpriseCategory, type SearchResultEnterpriseLocations, type SearchResultItem, type SearchResultPlaces, type SetFloorHandler, type Shading, type Shape, type Shapes, type SiblingGroup, Space, type Style, type Suggestion, type TActionType, type TAddImageOptions, type TAddLabelOptions, type TAddMarkerOptions, type TAddModel, type TAddModelOptions, type TAddPathOptions, type TAddText3DAnchorableOptions, type TAddText3DOptions, type TAnalyticsUpdateState, type TAnimateStateResult, type TAnimationOptions, type TAntialiasingOptions, type TBearingType, type TCameraAnimationOptions, type TCameraInteractionsSetOptions, type TCameraTarget, type TCancellablePromise, type TClickPayload, type TCollisionRankingTier, type TConnectionPathOptions, type TConnectionType, type TCoordinateParams, type TCreateMarker, type TDirectionInstruction, type TDirectionInstructionAction, type TDirectionZone, type TDoorsState, type TDoorsUpdateState, type TEasingFunction, type TEventPayload, type TEvents, type TExperimentalDashOptions, type TFacadeState, type TFacadeUpdateState, type TFindNearestOptions, type TFindNearestResult, type TFindPreferredLanguageInVenueOptions, type TFloorAltitudeData, type TFloorChangePayload, type TFloorChangeReason, type TFloorState, type TFloorUpdateState, type TFocusOnOptions, type TFocusTarget, type TGeometryState, type TGeometryUpdateState, type TGetDirectionsOptions, type TGetMapDataOptions, type TGetMapDataSharedOptions, type TGetMapDataWithAccessTokenOptions, type TGetMapDataWithCredentialsOptions, type TGetState, type THoverPayload, type THydrateMapDataBundle, type TImage3DState as TImageState, type TImage3DUpdateState as TImageUpdateState, type TLabelState, type TLabelUpdateState, type TLogLevelName, type TMVF, type TMVFLineStringStyle, type TMVFPointStyle, type TMVFPolygonStyle, type TMVFStyle, type TMVFStyleCollection, type TMapDataEvents, type TMapDataObjectTypes, type TMapFeatureTypes, type TMapViewObjectTypes, type TMarkerPlacement, type TMarkerState, type TMarkerUpdateState, type TModelState, type TModelUpdateState, type TMultiFloorViewOptions, type TNavigationMarker, type TNavigationMarkerType, type TNavigationOptions, type TNavigationPathOptions, type TNavigationTarget, type TOutsideThresholdPathStyle, type TPathSectionHighlightOptions, type TPathState, type TPathUpdateState, type TQueriables, type TQueryAtResult, type RendererState as TRendererState, type TSearchOptions, type TSetFloorOptions, type TShapeState, type TShapeUpdateState, type TShow3DMapOptions, type TSpaceType, type TStateChangedInternalPayload, type TTakeScreenshotOptions, type TTetheredOptions as TTetherOptions, type TText3DState, type TText3DUpdateState, type TTrackCoordinateOptions, type TTravelledOptions, type TUpdateState, type TWallsState, type TWallsUpdateState, TWatermarkOptions, type Text3D, type Text3DView, type UpdateGlobalState, type VisibilityState, WALLS, type WithState, MAPPEDIN_LAYER_ID as __INTERNAL__MAPPEDIN_LAYER_ID, MapLibreOverlay as __INTERNAL__MapLibreOverlay, Core as __INTERNAL__RendererCore, convertToRendererCoreOptions as __INTERNAL__convertToRendererCoreOptions, __setWatermarkOnClickFn, checkWorkerUrls, disableText3DWorker, enableTestMode, findPreferredLanguageInVenue, forceEnterpriseLocations, getMapData, getMapDataEnterprise, getMultiFloorState, getVersion, hydrateMapData, hydrateMapDataFromMVF, parseLogLevel, parseMVFv2 as parseMVF, preloadFont, setLoggerLevel, setUseEnterpriseAPI, setWorkersUrl, shouldForceEnterpriseLocations, show3dMap, show3dMapGeojson, unzipAndParseMVFv2, unzipMVFv2 as unzipMVF };
23194
+ export { ACTION_TYPE, ANIMATION_TWEENS, type AddText3DOptions, type AddText3DPointOptions, type Analytics, Annotation, Area, type AutoElements, BBox, BEARING_TYPE, CONNECTION_TYPE, type Camera, type CameraBounds, type CameraTransform, type CaptureEventsPayloadMap, type ColorString, Connection, Coordinate, DOORS, type Debug, type DebugState, DetailedMapData, Directions, Door, E_SDK_LOG_LEVEL, type EasingCurve, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue, type EnvMapOptions, type Environment, type Exporter, Facade, Feature, FeatureCollection, Floor, FloorStack, type FootprintConfig, GeoJSON$1 as GeoJSON, GeoJsonGeometryTypes, GeoJsonObject, GeoJsonProperties, GeoJsonTypes, Geometry, GeometryCollection, GeometryObject, type GlobalState, Hyperlink, type IAnchorable, type IFocusable, type IGeoJSONData, type INavigatable, type ISystemPlugin, type Image3D, type Image3DView, ImageMetaData, type InitializeModelState, type InitializeText3DState, type InsetPadding, type InsetPaddingOption, type InterpolateOn, type Interpolation, type Label, type LabelAppearance, type LabelTextPlacement, type Labels, LineString, type LineStyle, LocationCategory, LocationProfile, type LocationSocial, type LocationState, MAPPEDIN_COLORS, type MapData, type MapDataElements, type MapElementToGetRenderedState, type MapElementToGetState, type MapElementToUpdateState, type MapElementsWithState, type MapFeatureOfType, MapObject, MapView, type MapViewElements, type MapViewState, type MappedinError, type MappedinRenderError, type Marker, type Markers, type MatchInfo, type Model, type Models, type MultiFloorViewEffectState, MultiLineString, MultiPoint, MultiPolygon, type Navigation, type NavigationState, Node, type OpeningHours, type OperationHours, type Outdoor, type OutlinesOptions, type PaintStyle, type Path, type PathSegment$1 as PathSegment, type PathWidth, type Paths, type PixelWidth, type Places, Point, PointOfInterest, Polygon, type Position, type PubSub, type Query, type RendererCoreOptions, type Search, type SearchOptions, type SearchResult, type SearchResultEnterpriseCategory, type SearchResultEnterpriseLocations, type SearchResultItem, type SearchResultPlaces, type SetFloorHandler, type Shading, type Shape, type Shapes, type SiblingGroup, Space, type Style, type Suggestion, type TActionType, type TAddImageOptions, type TAddLabelOptions, type TAddMarkerOptions, type TAddModel, type TAddModelOptions, type TAddPathOptions, type TAddText3DAnchorableOptions, type TAddText3DOptions, type TAnalyticsUpdateState, type TAnimateStateResult, type TAnimationOptions, type TAntialiasingOptions, type TBearingType, type TCameraAnimationOptions, type TCameraInteractionsSetOptions, type TCameraTarget, type TCancellablePromise, type TClickPayload, type TCollisionRankingTier, type TConnectionPathOptions, type TConnectionType, type TCoordinateParams, type TCreateMarker, type TDirectionInstruction, type TDirectionInstructionAction, type TDirectionZone, type TDoorsState, type TDoorsUpdateState, type TEasingFunction, type TEventPayload, type TEvents, type TExperimentalDashOptions, type TExperimentalDashStyleOptions, type TFacadeState, type TFacadeUpdateState, type TFindNearestOptions, type TFindNearestResult, type TFindPreferredLanguageInVenueOptions, type TFloorAltitudeData, type TFloorChangePayload, type TFloorChangeReason, type TFloorState, type TFloorUpdateState, type TFocusOnOptions, type TFocusTarget, type TGeometryState, type TGeometryUpdateState, type TGetDirectionsOptions, type TGetMapDataOptions, type TGetMapDataSharedOptions, type TGetMapDataWithAccessTokenOptions, type TGetMapDataWithCredentialsOptions, type TGetState, type THoverPayload, type THydrateMapDataBundle, type TImage3DState as TImageState, type TImage3DUpdateState as TImageUpdateState, type TLabelState, type TLabelUpdateState, type TLogLevelName, type TMVF, type TMVFLineStringStyle, type TMVFPointStyle, type TMVFPolygonStyle, type TMVFStyle, type TMVFStyleCollection, type TMapDataEvents, type TMapDataObjectTypes, type TMapFeatureTypes, type TMapViewObjectTypes, type TMarkerPlacement, type TMarkerState, type TMarkerUpdateState, type TModelState, type TModelUpdateState, type TMultiFloorViewOptions, type TNavigationMarker, type TNavigationMarkerType, type TNavigationOptions, type TNavigationPathOptions, type TNavigationTarget, type TOutsideThresholdPathStyle, type TPathSectionHighlightOptions, type TPathState, type TPathUpdateState, type TQueriables, type TQueryAtResult, type RendererState as TRendererState, type TSearchOptions, type TSetFloorOptions, type TShapeState, type TShapeUpdateState, type TShow3DMapOptions, type TSpaceType, type TStateChangedInternalPayload, type TTakeScreenshotOptions, type TTetheredOptions as TTetherOptions, type TText3DState, type TText3DUpdateState, type TTrackCoordinateOptions, type TTravelledOptions, type TUpdateState, type TWallsState, type TWallsUpdateState, TWatermarkOptions, type Text3D, type Text3DView, type UpdateGlobalState, type VisibilityState, WALLS, type WithState, MAPPEDIN_LAYER_ID as __INTERNAL__MAPPEDIN_LAYER_ID, MapLibreOverlay as __INTERNAL__MapLibreOverlay, Core as __INTERNAL__RendererCore, convertToRendererCoreOptions as __INTERNAL__convertToRendererCoreOptions, __setWatermarkOnClickFn, checkWorkerUrls, disableText3DWorker, enableTestMode, findPreferredLanguageInVenue, forceEnterpriseLocations, getMapData, getMapDataEnterprise, getMultiFloorState, getVersion, hydrateMapData, hydrateMapDataFromMVF, parseLogLevel, parseMVFv2 as parseMVF, preloadFont, setLoggerLevel, setUseEnterpriseAPI, setWorkersUrl, shouldForceEnterpriseLocations, show3dMap, show3dMapGeojson, unzipAndParseMVFv2, unzipMVFv2 as unzipMVF };
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{A as D,B as E,C as F,D as G,E as N,F as O,I as P,J as Q,K as R,L as S,M as T,N as U,O as V,P as W,Q as X,R as Y,S as Z,T as _,U as $,V as aa,W as ba,X as ca,a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t,r as u,s as v,t as w,u as x,v as y,w as z,x as A,y as B,z as C}from"./chunk-4723PBN2.js";import{x as L,z as M}from"./chunk-66VPLG5U.js";import{Ea as J,Q as H,Z as I,a,b,d as c,ob as K}from"./chunk-BZRV2IXY.js";import"./chunk-G2JJ2YLB.js";import"./chunk-KVOE73GU.js";import"./chunk-PWEV3AFA.js";export{z as ACTION_TYPE,H as ANIMATION_TWEENS,q as Annotation,j as Area,A as BEARING_TYPE,B as CONNECTION_TYPE,n as Connection,d as Coordinate,D as DOORS,h as DetailedMapData,E as Directions,k as Door,a as E_SDK_LOG_LEVEL,u as EnterpriseCategory,t as EnterpriseLocation,v as EnterpriseVenue,s as Facade,m as Floor,r as FloorStack,f as Hyperlink,g as ImageMetaData,G as LocationCategory,F as LocationProfile,i as MAPPEDIN_COLORS,o as MapObject,Q as MapView,e as Node,p as PointOfInterest,l as Space,C as WALLS,J as __INTERNAL__MAPPEDIN_LAYER_ID,M as __INTERNAL__MapLibreOverlay,L as __INTERNAL__RendererCore,S as __INTERNAL__convertToRendererCoreOptions,U as __setWatermarkOnClickFn,$ as checkWorkerUrls,O as disableText3DWorker,I as enableTestMode,T as findPreferredLanguageInVenue,X as forceEnterpriseLocations,Z as getMapData,_ as getMapDataEnterprise,N as getMultiFloorState,ba as getVersion,R as hydrateMapData,V as hydrateMapDataFromMVF,b as parseLogLevel,w as parseMVF,K as preloadFont,c as setLoggerLevel,W as setUseEnterpriseAPI,P as setWorkersUrl,Y as shouldForceEnterpriseLocations,aa as show3dMap,ca as show3dMapGeojson,y as unzipAndParseMVFv2,x as unzipMVF};
1
+ import{A as D,B as E,C as F,D as G,E as N,F as O,I as P,J as Q,K as R,L as S,M as T,N as U,O as V,P as W,Q as X,R as Y,S as Z,T as _,U as $,V as aa,W as ba,X as ca,a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t,r as u,s as v,t as w,u as x,v as y,w as z,x as A,y as B,z as C}from"./chunk-FYSWNSO7.js";import{x as L,z as M}from"./chunk-2ZEZ2HG5.js";import{Ea as J,Q as H,Z as I,a,b,d as c,pb as K}from"./chunk-I5GYZORE.js";import"./chunk-R4YYWOA4.js";import"./chunk-CO4ZOCZ7.js";import"./chunk-PWEV3AFA.js";export{z as ACTION_TYPE,H as ANIMATION_TWEENS,q as Annotation,j as Area,A as BEARING_TYPE,B as CONNECTION_TYPE,n as Connection,d as Coordinate,D as DOORS,h as DetailedMapData,E as Directions,k as Door,a as E_SDK_LOG_LEVEL,u as EnterpriseCategory,t as EnterpriseLocation,v as EnterpriseVenue,s as Facade,m as Floor,r as FloorStack,f as Hyperlink,g as ImageMetaData,G as LocationCategory,F as LocationProfile,i as MAPPEDIN_COLORS,o as MapObject,Q as MapView,e as Node,p as PointOfInterest,l as Space,C as WALLS,J as __INTERNAL__MAPPEDIN_LAYER_ID,M as __INTERNAL__MapLibreOverlay,L as __INTERNAL__RendererCore,S as __INTERNAL__convertToRendererCoreOptions,U as __setWatermarkOnClickFn,$ as checkWorkerUrls,O as disableText3DWorker,I as enableTestMode,T as findPreferredLanguageInVenue,X as forceEnterpriseLocations,Z as getMapData,_ as getMapDataEnterprise,N as getMultiFloorState,ba as getVersion,R as hydrateMapData,V as hydrateMapDataFromMVF,b as parseLogLevel,w as parseMVF,K as preloadFont,c as setLoggerLevel,W as setUseEnterpriseAPI,P as setWorkersUrl,Y as shouldForceEnterpriseLocations,aa as show3dMap,ca as show3dMapGeojson,y as unzipAndParseMVFv2,x as unzipMVF};
@@ -1,4 +1,4 @@
1
- import{G as N,H as ee,i as O,q as $,r as P}from"./chunk-4723PBN2.js";import"./chunk-66VPLG5U.js";import{j as S}from"./chunk-BZRV2IXY.js";import"./chunk-G2JJ2YLB.js";import{a as y}from"./chunk-KVOE73GU.js";import"./chunk-PWEV3AFA.js";y();y();y();y();var M=class n{constructor(e,i,t,o,r="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Y=class extends M{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function V(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}var be={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},ve={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},ye={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},Ce=[be,D,ve,ye];function xe(n){return Ce.find(e=>e.match(n))}var J=class extends M{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=xe(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=V(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},I=class extends M{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},X=class extends M{constructor(e,i,t,o,r,l){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(r);let s=l!==void 0;this.step(s?l:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=b=>{let x=parseFloat(this.$input.value);isNaN(x)||(this._snapClampSetValue(x+b),this.$input.value=this.getValue())},o=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},l=!1,s,c,f,d,a,p=5,h=b=>{s=b.clientX,c=f=b.clientY,l=!0,d=this.getValue(),a=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",m)},g=b=>{if(l){let x=b.clientX-s,L=b.clientY-c;Math.abs(L)>p?(b.preventDefault(),this.$input.blur(),l=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(x)>p&&m()}if(!l){let x=b.clientY-f;a-=x*this._step*this._arrowKeyMultiplier(b),d+a>this._max?a=this._max-d:d+a<this._min&&(a=this._min-d),this._snapClampSetValue(d+a)}f=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m)},v=()=>{this._inputFocused=!0},u=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",h),this.$input.addEventListener("focus",v),this.$input.addEventListener("blur",u)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(u,b,x,L,_)=>(u-b)/(x-b)*(_-L)+L,i=u=>{let b=this.$slider.getBoundingClientRect(),x=e(u,b.left,b.right,this._min,this._max);this._snapClampSetValue(x)},t=u=>{this._setDraggingStyle(!0),i(u.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",r)},o=u=>{i(u.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",r)},l=!1,s,c,f=u=>{u.preventDefault(),this._setDraggingStyle(!0),i(u.touches[0].clientX),l=!1},d=u=>{u.touches.length>1||(this._hasScrollBar?(s=u.touches[0].clientX,c=u.touches[0].clientY,l=!0):f(u),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",p))},a=u=>{if(l){let b=u.touches[0].clientX-s,x=u.touches[0].clientY-c;Math.abs(b)>Math.abs(x)?f(u):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p))}else u.preventDefault(),i(u.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p)},h=this._callOnFinishChange.bind(this),g=400,m,v=u=>{if(Math.abs(u.deltaX)<Math.abs(u.deltaY)&&this._hasScrollBar)return;u.preventDefault();let x=this._normalizeMouseWheel(u)*this._step;this._snapClampSetValue(this.getValue()+x),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(h,g)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",v,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${i}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},W=class extends M{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}},K=class extends M{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ae=`.lil-gui {
1
+ import{G as N,H as ee,i as O,q as $,r as P}from"./chunk-FYSWNSO7.js";import"./chunk-2ZEZ2HG5.js";import{j as S}from"./chunk-I5GYZORE.js";import"./chunk-R4YYWOA4.js";import{a as y}from"./chunk-CO4ZOCZ7.js";import"./chunk-PWEV3AFA.js";y();y();y();y();var M=class n{constructor(e,i,t,o,r="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Y=class extends M{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function V(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}var be={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},ve={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},ye={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},Ce=[be,D,ve,ye];function xe(n){return Ce.find(e=>e.match(n))}var J=class extends M{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=xe(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=V(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},I=class extends M{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},X=class extends M{constructor(e,i,t,o,r,l){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(r);let s=l!==void 0;this.step(s?l:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=b=>{let x=parseFloat(this.$input.value);isNaN(x)||(this._snapClampSetValue(x+b),this.$input.value=this.getValue())},o=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},l=!1,s,c,f,d,a,p=5,h=b=>{s=b.clientX,c=f=b.clientY,l=!0,d=this.getValue(),a=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",m)},g=b=>{if(l){let x=b.clientX-s,L=b.clientY-c;Math.abs(L)>p?(b.preventDefault(),this.$input.blur(),l=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(x)>p&&m()}if(!l){let x=b.clientY-f;a-=x*this._step*this._arrowKeyMultiplier(b),d+a>this._max?a=this._max-d:d+a<this._min&&(a=this._min-d),this._snapClampSetValue(d+a)}f=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m)},v=()=>{this._inputFocused=!0},u=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",h),this.$input.addEventListener("focus",v),this.$input.addEventListener("blur",u)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(u,b,x,L,_)=>(u-b)/(x-b)*(_-L)+L,i=u=>{let b=this.$slider.getBoundingClientRect(),x=e(u,b.left,b.right,this._min,this._max);this._snapClampSetValue(x)},t=u=>{this._setDraggingStyle(!0),i(u.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",r)},o=u=>{i(u.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",r)},l=!1,s,c,f=u=>{u.preventDefault(),this._setDraggingStyle(!0),i(u.touches[0].clientX),l=!1},d=u=>{u.touches.length>1||(this._hasScrollBar?(s=u.touches[0].clientX,c=u.touches[0].clientY,l=!0):f(u),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",p))},a=u=>{if(l){let b=u.touches[0].clientX-s,x=u.touches[0].clientY-c;Math.abs(b)>Math.abs(x)?f(u):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p))}else u.preventDefault(),i(u.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p)},h=this._callOnFinishChange.bind(this),g=400,m,v=u=>{if(Math.abs(u.deltaX)<Math.abs(u.deltaY)&&this._hasScrollBar)return;u.preventDefault();let x=this._normalizeMouseWheel(u)*this._step;this._snapClampSetValue(this.getValue()+x),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(h,g)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",v,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${i}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},W=class extends M{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}},K=class extends M{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ae=`.lil-gui {
2
2
  font-family: var(--font-family);
3
3
  font-size: var(--font-size);
4
4
  line-height: 1;
@@ -479,4 +479,4 @@ import{G as N,H as ee,i as O,q as $,r as P}from"./chunk-4723PBN2.js";import"./ch
479
479
  <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">${d.name}</span>
480
480
  <br>
481
481
  <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>
482
- </div>`,{rank:"always-visible"});f.add(p),n.push(h)}})})}return()=>{n.forEach(c=>o.Markers.remove(c))}}}}var T={duration:300,easing:"ease-in-out"},H=Ee();y();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ke(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}function ne(n,e,i){let t=new S,o=i.addFolder("Search");o.open();let r=o.add(w,"search").onChange(async d=>{let a=await e.Search.query(d,w.options);a&&(w.results=a,s(a,t))}),l=document.createElement("div");l.style.marginLeft="10px",r.domElement.parentElement?.appendChild(l);let{renderSearch:s,close:c}=Me(n,e,l,r.$input),f=o.addFolder("Advanced");return f.close(),ke(f),document.addEventListener("keydown",d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"?(d.preventDefault(),o._closed&&o.open(),r.$input.focus()):d.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}function Me(n,e,i,t){let o,r;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{let c=await e.Search.suggest(t.value);c&&c.length>0&&l(c[0]?.suggestion)},100))});function l(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return{renderSearch(s,c){if(s.places.length===0&&s.enterpriseCategories?.length===0&&s.enterpriseLocations?.length===0){i.textContent="No results found.";return}r=Le(i,s,n,c)},close(){r.destroy()}}}function Le(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,U.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,U.optionsList),r.style.display="block";let l=[],s=(p,h)=>{if(h&&h.length>0){let g=document.createElement("li");g.textContent=p,Object.assign(g.style,U.sectionHeader),r.appendChild(g),h.forEach((m,v)=>{let u=document.createElement("li");u.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(u.style,U.option),u.tabIndex=0,u.addEventListener("focus",()=>{f(l.indexOf(u))}),u.addEventListener("mouseover",()=>{u.style.backgroundColor="#f0f0f0"}),u.addEventListener("mouseout",()=>{u.style.backgroundColor=""}),u.addEventListener("click",()=>{}),u.setAttribute("data-type",p),u.setAttribute("data-index",v.toString()),r.appendChild(u),l.push(u)})}};s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(r),n.appendChild(o);let c=[],f=p=>{c.forEach(u=>u()),c=[],l.forEach((u,b)=>{b===p?u.style.backgroundColor="#e0e0e0":u.style.backgroundColor=""});let h=l[p],g=h.getAttribute("data-type"),m=parseInt(h.getAttribute("data-index")||"0",10);if(!g)return;let{item:v}=e[g.toLowerCase()][m];t.publish("highlight",v)},d=p=>{!o.contains(p.target)&&p.target!==n&&a()};document.addEventListener("click",d);let a=()=>{n.innerHTML="",document.removeEventListener("click",d)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var U={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function oe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=ne(n,e,i);o.on("highlight",d=>{if(d){t.forEach(p=>p()),t=[];let a=d instanceof $?d.spaces[0]:d;if(n.Camera.focusOn(d),a&&!O.is(a))return;t.push(H.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let r=i.addFolder("Click \u{1F447}").close(),{sub:l}=$e(n,r);l.on("click",d=>{t.forEach(a=>a()),t=[],d.spaces?.[0]&&(t=[H.highlightCard(n,d.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Se(n,s),f;c.on("hover",d=>{d.spaces?.[0]?(f?.(),t.length===0&&(f=H.highlightCard(n,d.spaces[0]))):(f?.(),f=void 0)})}function $e(n,e){let i=new S,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),r=[];function l(){r.forEach(c=>c()),r.length=0}let s=0;return n.on("click",c=>{let{labels:f,coordinate:d}=c;l(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([d.longitude,d.latitude]));let a=f?.[0];if(a!=null){let h=F(n,a,e);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let p=c.spaces?.[0]??c.objects?.[0];if(p){let h={...p,...n.getState(p),isInView:!1,isInViewCheck:G(n,p.id)},{cleanup:g}=B(n,h,e);s=setInterval(()=>{h.isInView=n.isInView(a||p)},500),r.push(g)}}),{sub:i}}function Se(n,e){let i=new S;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let r=[];function l(){r.forEach(s=>s()),r.length=0}return n.on("hover",s=>{let{coordinate:c,spaces:f,objects:d,markers:a,labels:p}=s;l(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let h=f?.[0]??d?.[0]??a?.[0]??p?.[0];if(!h)return;let g=n.getState(h);g&&(t.type=g.type,t.id=h.id)}),{sub:i}}function G(n,e){return function(){console.log("isInView",n.isInView(e))}}function re(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(h=>{this.labels[h.id]=h}),c()},removeAllLabels(){i.Labels.removeAll().forEach(h=>{delete this.labels[h.id]}),c()}},{addLabel:o,destroy:r}=Te(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let l=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.labels[m.id],s.get(m.id)?.destroy()}function h(m){let v=F(i,m,l,{onRemove:b=>{p(b)}});if(!v)return;let{labelItemFolder:u}=v;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("Label");for(let m in t.labels){let v=t.labels[m];h(v)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({labels:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.labels[h.id]=h;c()}return{populatelabels:a,destroy(){r()}}}function Ie(n,e,i,t,o){let{interactive:r,enabled:l,rank:s,anchor:c,dynamicResize:f,zIndex:d,contentHTML:a,lowPriorityPin:p}=t;if(r==null||l==null)throw new Error("incomplete marker state");let h={interactive:r,enabled:l,rank:s||"medium",anchor:Array.isArray(c)?c.join(", "):c||"center",dynamicResize:f||!1,zIndex:d||0,contentHTML:a||"",lowPriorityPin:{enabled:p?.enabled??!0,size:p?.size??8,color:E(p?.color??"#666")},remove(){n.Markers.remove(e),o?.(e),i.destroy()},isInView:G(n,e.id)};i.onChange(m=>{let v={interactive:h.interactive,enabled:h.enabled,rank:h.rank,dynamicResize:h.dynamicResize,contentHTML:h.contentHTML,lowPriorityPin:{enabled:h.lowPriorityPin.enabled,size:h.lowPriorityPin.size,color:h.lowPriorityPin.color}};h.rank==="always-visible"&&(v.zIndex=h.zIndex),n.updateState(e,v)}),i.add(h,"interactive"),i.add(h,"enabled"),i.add(h,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(h,"anchor").name("anchor (read-only)").disable(),i.add(h,"dynamicResize").name("dynamic resize"),h.rank==="always-visible"&&i.add(h,"zIndex",0,1e3,1).name("z-index"),i.add(h,"contentHTML").name("content HTML");let g=i.addFolder("Low Priority Pin");g.add(h.lowPriorityPin,"enabled"),g.add(h.lowPriorityPin,"size",1,20,1),g.addColor(h.lowPriorityPin,"color"),g.close(),i.add(h,"isInView"),i.add(h,"remove")}function De(n,e,i,t,o){let{appearance:r,interactive:l}=t;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let s={text:e.text,interactive:l,appearance:{...r,margin:r.margin||0,pinColor:r.pinColor?E(r.pinColor):"black",textColor:r.textColor?E(r.textColor):"black"},remove(){n.Labels.remove(e),o?.(e),i.destroy()},isInView:G(n,e.id)};i.onChange(c=>{n.updateState(e,{appearance:s.appearance,interactive:s.interactive})}),i.add(s.appearance,"margin",0,20).name("margin"),i.add(s,"text"),i.add(s,"interactive"),i.addColor(s.appearance,"pinColor").name("pin color"),i.addColor(s.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(s.appearance,"textColor").name("text color"),i.addColor(s.appearance,"textOutlineColor").name("text outline color"),i.add(s,"isInView"),i.add(s,"remove")}function F(n,e,i,{onRemove:t}={}){let o=n.getState(e);if(!o)throw new Error(`error getting state for entity: ${e.id}`);let r=o.type===N?e.text?.substring(0,12)||"Label":`Marker ${e.id.toString().substring(0,8)}`,l=i.addFolder(r);if(l.close(),o.type===N)De(n,e,l,o,t);else if(o.type===ee)Ie(n,e,l,o,t);else throw new Error(`unsupported entity type: ${o.type}`);return{labelItemFolder:l,destroy(){l.destroy()}}}function Te(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var se={};y();function ae(n,e,i){let t=n.addFolder("Camera \u{1F4F7}"),o=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(r);let l=()=>e.getDimensions(),[s,c,f,d]=i?.padding??[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],a={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i?.padding?"pixel":e.Camera.screenOffsets.type,inset_top:s,inset_left:d,inset_right:c,inset_bottom:f,animateOnLoad:!0,visualizeInset:!!(s||c||f||d),"Focus on click":i?.focusOnClick??!1,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function p(){a.inset_type=e.Camera.screenOffsets.type,a.inset_left=e.Camera.screenOffsets.left,a.inset_top=e.Camera.screenOffsets.top,a.inset_right=e.Camera.screenOffsets.right,a.inset_bottom=e.Camera.screenOffsets.bottom;let{width:C,height:k}=l();a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*C+"px",top:a.inset_top*k+"px",bottom:a.inset_bottom*k+"px",right:a.inset_right*C+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(C=>{e.Camera.setMinZoomLevel(C)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(C=>{e.Camera.setMaxZoomLevel(C)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange(q),q(a.visualizeInset);let h,g,m,v;function u(){let{width:C,height:k}=l(),R=e.Camera.screenOffsets.type,j=a.inset_type;R!==j&&(j==="portion"&&R==="pixel"?(a.inset_top=C>0?Math.min(a.inset_top/k,1):0,a.inset_bottom=C>0?Math.min(a.inset_bottom/k,1):0,a.inset_left=k>0?Math.min(a.inset_left/C,1):0,a.inset_right=k>0?Math.min(a.inset_right/C,1):0):j==="pixel"&&R==="portion"&&(a.inset_top=Math.round(a.inset_top*k),a.inset_bottom=Math.round(a.inset_bottom*k),a.inset_left=Math.round(a.inset_left*C),a.inset_right=Math.round(a.inset_right*C))),h&&h.destroy(),g&&g.destroy(),m&&m.destroy(),v&&v.destroy(),a.inset_type==="portion"?(h=t.add(a,"inset_top",0,1,.01).onChange(_),g=t.add(a,"inset_bottom",0,1,.01).onChange(_),m=t.add(a,"inset_left",0,1,.01).onChange(_),v=t.add(a,"inset_right",0,1,.01).onChange(_)):(h=t.add(a,"inset_top",0,k,1).onChange(_),g=t.add(a,"inset_bottom",0,k,1).onChange(_),m=t.add(a,"inset_left",0,C,1).onChange(_),v=t.add(a,"inset_right",0,C,1).onChange(_))}t.add(a,"inset_type",["pixel","portion"]).onChange(()=>{u(),_()}),u();let b=Oe(e);t.add(a,"Focus on click").onChange(C=>{C?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"Focus on current floor");let x=C=>{t._closed||(a.center_lat=C.center.latitude,a.center_lon=C.center.longitude,a.zoomLevel=C.zoomLevel,a.bearing=C.bearing,a.pitch=C.pitch)};e.on("camera-change",x);let L=[()=>{e.off("camera-change",x)}];function _(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),p()}(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&_();function q(C){p(),C?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),ie(L)}})}function Oe(n){return function(i){let{spaces:t,objects:o}=i,r=t?.[0]??o?.[0];r&&n.Camera.focusOn(r)}}y();function le(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(h=>{delete this.markers[h.id]}),c()}},{addMarker:o,destroy:r}=Pe(n,i);n.add(t,"removeAllMarkers");let l=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.markers[m.id],s.get(m.id)?.destroy()}function h(m){let v=F(i,m,l,{onRemove:b=>{p(b)}});if(!v)return;let{labelItemFolder:u}=v;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("marker");for(let m in t.markers){let v=t.markers[m];h(v)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({markers:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.markers[h.id]=h;c()}return{populateMarkers:a,destroy(){r()}}}function Pe(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let o=i.addFolder("Low Priority Pin");return o.add(t.lowPriorityPin,"enabled"),o.add(t.lowPriorityPin,"size",1,20,1),o.addColor(t.lowPriorityPin,"color"),o.close(),{destroy(){i.destroy()},addMarker(r){if(i._closed||!t.onClick)return;let l={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(l.zIndex=t.zIndex),e.Markers.add(r,t.contentHTML,l)}}}y();function de(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(l=>{e.updateState("exterior-walls",{visible:l})}),i.addColor(t,"topColor").onChange(l=>{e.updateState("exterior-walls",{topColor:l})}),i.addColor(t,"color").onChange(l=>{e.updateState("exterior-walls",{color:l})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{texture:{url:l}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{topTexture:{url:l}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}y();function ce(n,e,i){n.close();let t={language:i.currentLanguage?.code??"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o?.languages.map(r=>r.code)).onChange(r=>{i.changeLanguage(r)})}y();function he(n,e,i){let t=n.addFolder("Debug");t.close();let o=e.Debug.state,r={showPolygonLabelTextAreaMesh:o.showPolygonLabelTextAreaMesh,showCollisionBoxes:o.showCollisionBoxes,showEnvMap:o.showEnvMap};t.add(r,"showPolygonLabelTextAreaMesh").onChange(l=>{e.Debug.update({showPolygonLabelTextAreaMesh:l})}).name("Show Flat Label Text Area Mesh"),t.add(r,"showCollisionBoxes").onChange(l=>{e.Debug.update({showCollisionBoxes:l})}).name("Show Collision Boxes"),t.add(r,"showEnvMap").onChange(l=>{e.Debug.update({showEnvMap:l})}).name("Show Environment Map"),e.Debug.update(r)}y();function ue(n,e,i){let t=n.addFolder("Text3D").close(),o={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(o,"all").name("Show All"),t.add(o,"removeAll").name("Remove All")}y();function pe(n,e,i){let t=n.addFolder("Directions \u{1F5FA}\uFE0F");t.close();let o=localStorage.getItem("directionsMethod"),r=localStorage.getItem("directionsRadius"),l=localStorage.getItem("directionsIncludeDoorBufferNodes")==="true",s={enabled:!1,method:o||"dp-optimal",radius:r?parseFloat(r):.75,includeDoorBufferNodes:l,startCoordinate:"",endCoordinate:"",pathInfo:""},c,f,d;t.add(s,"enabled").name("Enable Click-to-Route").onChange(m=>{m||(c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0))}),t.add(s,"startCoordinate").name("Start").disable().listen(),t.add(s,"endCoordinate").name("End").disable().listen(),t.add(s,"method",{"Greedy LOS":"greedy-los",RDP:"rdp","DP Optimal":"dp-optimal"}).name("Smoothing Method").onChange(m=>{localStorage.setItem("directionsMethod",m),c&&f&&s.enabled&&h(c,f)}),t.add(s,"radius",.1,5,.1).name("Smoothing Radius").onChange(m=>{localStorage.setItem("directionsRadius",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"includeDoorBufferNodes").name("Door Buffers").onChange(m=>{localStorage.setItem("directionsIncludeDoorBufferNodes",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"pathInfo").name("Path Info").disable().listen();let a={clear:()=>p()};t.add(a,"clear").name("Clear Path");function p(){c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0)}async function h(m,v){d&&(e.Paths.remove(d),d=void 0);try{let u=await e.getDirections(m,v,{smoothing:{enabled:!0,__EXPERIMENTAL_METHOD:s.method,radius:s.radius,__EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES:s.includeDoorBufferNodes}});if(u){d=e.Paths.add(u.coordinates,{interactive:!0,color:"green",width:1});let x=u.distance?.toFixed(2)||"N/A";s.pathInfo=`${u.coordinates.length} pts, ${x}m`}else s.pathInfo="No path found"}catch(u){s.pathInfo=`Error: ${u instanceof Error?u.message:"Unknown"}`}}let g=async m=>{if(s.enabled)if(c){let v=m.coordinate;f=v,s.endCoordinate=`${v.latitude.toFixed(6)}, ${v.longitude.toFixed(6)}`,s.pathInfo="Calculating...",await h(c,f),c=void 0,f=void 0}else{let v=m.coordinate;c=v,s.startCoordinate=`${v.latitude.toFixed(6)}, ${v.longitude.toFixed(6)}`,s.pathInfo="Click to set end..."}};return e.on("click",g),{destroy(){e.off("click",g),t.destroy()}}}y();function fe(n,e){let i=n.addFolder("Spaces Open To Below Visual Effect").close(),t=e.getGlobalState().multiFloorView,o={enabled:t.spacesOpenToBelowVisualEffectEnabled,darkenAmount:t.spacesOpenToBelowVisualEffectDarkenAmount,darkenUseDepth:t.spacesOpenToBelowVisualEffectDarkenUseDepth,desaturateAmount:t.spacesOpenToBelowVisualEffectDesaturateAmount,desaturateUseDepth:t.spacesOpenToBelowVisualEffectDesaturateUseDepth,washOutAmount:t.spacesOpenToBelowVisualEffectWashOutAmount,washOutUseDepth:t.spacesOpenToBelowVisualEffectWashOutUseDepth};function r(){e.updateGlobalState({multiFloorView:{spacesOpenToBelowVisualEffectEnabled:o.enabled,spacesOpenToBelowVisualEffectDarkenAmount:o.darkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:o.darkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:o.desaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:o.desaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:o.washOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:o.washOutUseDepth}})}i.add(o,"enabled").name("Enabled").onChange(()=>r());let l=i.addFolder("Darken");l.add(o,"darkenAmount",0,1,.01).name("Amount").onChange(()=>r()),l.add(o,"darkenUseDepth").name("Use Depth").onChange(()=>r());let s=i.addFolder("Desaturate");s.add(o,"desaturateAmount",0,1,.01).name("Amount").onChange(()=>r()),s.add(o,"desaturateUseDepth").name("Use Depth").onChange(()=>r());let c=i.addFolder("Wash Out");c.add(o,"washOutAmount",0,1,.01).name("Amount").onChange(()=>r()),c.add(o,"washOutUseDepth").name("Use Depth").onChange(()=>r())}function me(n,e,i){ze();let t=new z({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),oe(e,n,t),ae(t,e,i?.camera);let o=t.addFolder("Levels").close(),r=t.addFolder("Scene Controls");r.close();let l=t.addFolder("Labels");ue(t,e,n);let s=t.addFolder("Markers");de(t,e);let c=t.addFolder("misc");he(t,e,n),fe(t,e),pe(t,e,n),ce(c,e,n);let f={level:e.currentFloor.id},{populatelabels:d}=re(l,n,e),{populateMarkers:a}=le(s,n,e),p=n.getByType("floor").reduce((g,m)=>(g[m.name]=m.id,g),{}),h=o.add(f,"level",p).onChange(g=>{e.setFloor(g),f.level=e.currentFloor.id,h.updateDisplay()});return e.on("floor-change-start",g=>{o.controllers[0].setValue(g.floor.id)}),n.getByType("space").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:d,sceneFolder:r,populateMarkers:a}}var ge="mappedin-sdk-debug-css";function ze(){if(document.getElementById(ge))return;let n=document.createElement("style");n.id=ge,n.textContent=se,document.head.appendChild(n)}var Q=class{_enabled=!1;mv;api;mapData;scenegraphVisualizerMounted=!1;storeStateToLocalStorageEnabled=!1;constructor(e,i){this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=me(this.mapData,this.mv,e);i.onOpenClose(async t=>{if(t===i&&!t._closed&&!this.scenegraphVisualizerMounted){this.scenegraphVisualizerMounted=!0;try{let{mountSceneGraphVisualizer:o}=await import("./src-DUHGJJAE.js");o(this.api.core,i)}catch{}}}),this.api.getMapDataInternal()?.spaces.forEach(t=>{this.mv.updateState(t,{interactive:!0})})}get enabled(){return this._enabled}};export{Q as Inspector};
482
+ </div>`,{rank:"always-visible"});f.add(p),n.push(h)}})})}return()=>{n.forEach(c=>o.Markers.remove(c))}}}}var T={duration:300,easing:"ease-in-out"},H=Ee();y();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ke(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}function ne(n,e,i){let t=new S,o=i.addFolder("Search");o.open();let r=o.add(w,"search").onChange(async d=>{let a=await e.Search.query(d,w.options);a&&(w.results=a,s(a,t))}),l=document.createElement("div");l.style.marginLeft="10px",r.domElement.parentElement?.appendChild(l);let{renderSearch:s,close:c}=Me(n,e,l,r.$input),f=o.addFolder("Advanced");return f.close(),ke(f),document.addEventListener("keydown",d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"?(d.preventDefault(),o._closed&&o.open(),r.$input.focus()):d.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}function Me(n,e,i,t){let o,r;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{let c=await e.Search.suggest(t.value);c&&c.length>0&&l(c[0]?.suggestion)},100))});function l(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return{renderSearch(s,c){if(s.places.length===0&&s.enterpriseCategories?.length===0&&s.enterpriseLocations?.length===0){i.textContent="No results found.";return}r=Le(i,s,n,c)},close(){r.destroy()}}}function Le(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,U.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,U.optionsList),r.style.display="block";let l=[],s=(p,h)=>{if(h&&h.length>0){let g=document.createElement("li");g.textContent=p,Object.assign(g.style,U.sectionHeader),r.appendChild(g),h.forEach((m,v)=>{let u=document.createElement("li");u.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(u.style,U.option),u.tabIndex=0,u.addEventListener("focus",()=>{f(l.indexOf(u))}),u.addEventListener("mouseover",()=>{u.style.backgroundColor="#f0f0f0"}),u.addEventListener("mouseout",()=>{u.style.backgroundColor=""}),u.addEventListener("click",()=>{}),u.setAttribute("data-type",p),u.setAttribute("data-index",v.toString()),r.appendChild(u),l.push(u)})}};s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(r),n.appendChild(o);let c=[],f=p=>{c.forEach(u=>u()),c=[],l.forEach((u,b)=>{b===p?u.style.backgroundColor="#e0e0e0":u.style.backgroundColor=""});let h=l[p],g=h.getAttribute("data-type"),m=parseInt(h.getAttribute("data-index")||"0",10);if(!g)return;let{item:v}=e[g.toLowerCase()][m];t.publish("highlight",v)},d=p=>{!o.contains(p.target)&&p.target!==n&&a()};document.addEventListener("click",d);let a=()=>{n.innerHTML="",document.removeEventListener("click",d)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var U={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function oe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=ne(n,e,i);o.on("highlight",d=>{if(d){t.forEach(p=>p()),t=[];let a=d instanceof $?d.spaces[0]:d;if(n.Camera.focusOn(d),a&&!O.is(a))return;t.push(H.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let r=i.addFolder("Click \u{1F447}").close(),{sub:l}=$e(n,r);l.on("click",d=>{t.forEach(a=>a()),t=[],d.spaces?.[0]&&(t=[H.highlightCard(n,d.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Se(n,s),f;c.on("hover",d=>{d.spaces?.[0]?(f?.(),t.length===0&&(f=H.highlightCard(n,d.spaces[0]))):(f?.(),f=void 0)})}function $e(n,e){let i=new S,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),r=[];function l(){r.forEach(c=>c()),r.length=0}let s=0;return n.on("click",c=>{let{labels:f,coordinate:d}=c;l(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([d.longitude,d.latitude]));let a=f?.[0];if(a!=null){let h=F(n,a,e);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let p=c.spaces?.[0]??c.objects?.[0];if(p){let h={...p,...n.getState(p),isInView:!1,isInViewCheck:G(n,p.id)},{cleanup:g}=B(n,h,e);s=setInterval(()=>{h.isInView=n.isInView(a||p)},500),r.push(g)}}),{sub:i}}function Se(n,e){let i=new S;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let r=[];function l(){r.forEach(s=>s()),r.length=0}return n.on("hover",s=>{let{coordinate:c,spaces:f,objects:d,markers:a,labels:p}=s;l(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let h=f?.[0]??d?.[0]??a?.[0]??p?.[0];if(!h)return;let g=n.getState(h);g&&(t.type=g.type,t.id=h.id)}),{sub:i}}function G(n,e){return function(){console.log("isInView",n.isInView(e))}}function re(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(h=>{this.labels[h.id]=h}),c()},removeAllLabels(){i.Labels.removeAll().forEach(h=>{delete this.labels[h.id]}),c()}},{addLabel:o,destroy:r}=Te(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let l=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.labels[m.id],s.get(m.id)?.destroy()}function h(m){let v=F(i,m,l,{onRemove:b=>{p(b)}});if(!v)return;let{labelItemFolder:u}=v;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("Label");for(let m in t.labels){let v=t.labels[m];h(v)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({labels:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.labels[h.id]=h;c()}return{populatelabels:a,destroy(){r()}}}function Ie(n,e,i,t,o){let{interactive:r,enabled:l,rank:s,anchor:c,dynamicResize:f,zIndex:d,contentHTML:a,lowPriorityPin:p}=t;if(r==null||l==null)throw new Error("incomplete marker state");let h={interactive:r,enabled:l,rank:s||"medium",anchor:Array.isArray(c)?c.join(", "):c||"center",dynamicResize:f||!1,zIndex:d||0,contentHTML:a||"",lowPriorityPin:{enabled:p?.enabled??!0,size:p?.size??8,color:E(p?.color??"#666")},remove(){n.Markers.remove(e),o?.(e),i.destroy()},isInView:G(n,e.id)};i.onChange(m=>{let v={interactive:h.interactive,enabled:h.enabled,rank:h.rank,dynamicResize:h.dynamicResize,contentHTML:h.contentHTML,lowPriorityPin:{enabled:h.lowPriorityPin.enabled,size:h.lowPriorityPin.size,color:h.lowPriorityPin.color}};h.rank==="always-visible"&&(v.zIndex=h.zIndex),n.updateState(e,v)}),i.add(h,"interactive"),i.add(h,"enabled"),i.add(h,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(h,"anchor").name("anchor (read-only)").disable(),i.add(h,"dynamicResize").name("dynamic resize"),h.rank==="always-visible"&&i.add(h,"zIndex",0,1e3,1).name("z-index"),i.add(h,"contentHTML").name("content HTML");let g=i.addFolder("Low Priority Pin");g.add(h.lowPriorityPin,"enabled"),g.add(h.lowPriorityPin,"size",1,20,1),g.addColor(h.lowPriorityPin,"color"),g.close(),i.add(h,"isInView"),i.add(h,"remove")}function De(n,e,i,t,o){let{appearance:r,interactive:l}=t;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let s={text:e.text,interactive:l,appearance:{...r,margin:r.margin||0,pinColor:r.pinColor?E(r.pinColor):"black",textColor:r.textColor?E(r.textColor):"black"},remove(){n.Labels.remove(e),o?.(e),i.destroy()},isInView:G(n,e.id)};i.onChange(c=>{n.updateState(e,{appearance:s.appearance,interactive:s.interactive})}),i.add(s.appearance,"margin",0,20).name("margin"),i.add(s,"text"),i.add(s,"interactive"),i.addColor(s.appearance,"pinColor").name("pin color"),i.addColor(s.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(s.appearance,"textColor").name("text color"),i.addColor(s.appearance,"textOutlineColor").name("text outline color"),i.add(s,"isInView"),i.add(s,"remove")}function F(n,e,i,{onRemove:t}={}){let o=n.getState(e);if(!o)throw new Error(`error getting state for entity: ${e.id}`);let r=o.type===N?e.text?.substring(0,12)||"Label":`Marker ${e.id.toString().substring(0,8)}`,l=i.addFolder(r);if(l.close(),o.type===N)De(n,e,l,o,t);else if(o.type===ee)Ie(n,e,l,o,t);else throw new Error(`unsupported entity type: ${o.type}`);return{labelItemFolder:l,destroy(){l.destroy()}}}function Te(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var se={};y();function ae(n,e,i){let t=n.addFolder("Camera \u{1F4F7}"),o=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(r);let l=()=>e.getDimensions(),[s,c,f,d]=i?.padding??[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],a={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i?.padding?"pixel":e.Camera.screenOffsets.type,inset_top:s,inset_left:d,inset_right:c,inset_bottom:f,animateOnLoad:!0,visualizeInset:!!(s||c||f||d),"Focus on click":i?.focusOnClick??!1,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function p(){a.inset_type=e.Camera.screenOffsets.type,a.inset_left=e.Camera.screenOffsets.left,a.inset_top=e.Camera.screenOffsets.top,a.inset_right=e.Camera.screenOffsets.right,a.inset_bottom=e.Camera.screenOffsets.bottom;let{width:C,height:k}=l();a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*C+"px",top:a.inset_top*k+"px",bottom:a.inset_bottom*k+"px",right:a.inset_right*C+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(C=>{e.Camera.setMinZoomLevel(C)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(C=>{e.Camera.setMaxZoomLevel(C)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange(q),q(a.visualizeInset);let h,g,m,v;function u(){let{width:C,height:k}=l(),R=e.Camera.screenOffsets.type,j=a.inset_type;R!==j&&(j==="portion"&&R==="pixel"?(a.inset_top=C>0?Math.min(a.inset_top/k,1):0,a.inset_bottom=C>0?Math.min(a.inset_bottom/k,1):0,a.inset_left=k>0?Math.min(a.inset_left/C,1):0,a.inset_right=k>0?Math.min(a.inset_right/C,1):0):j==="pixel"&&R==="portion"&&(a.inset_top=Math.round(a.inset_top*k),a.inset_bottom=Math.round(a.inset_bottom*k),a.inset_left=Math.round(a.inset_left*C),a.inset_right=Math.round(a.inset_right*C))),h&&h.destroy(),g&&g.destroy(),m&&m.destroy(),v&&v.destroy(),a.inset_type==="portion"?(h=t.add(a,"inset_top",0,1,.01).onChange(_),g=t.add(a,"inset_bottom",0,1,.01).onChange(_),m=t.add(a,"inset_left",0,1,.01).onChange(_),v=t.add(a,"inset_right",0,1,.01).onChange(_)):(h=t.add(a,"inset_top",0,k,1).onChange(_),g=t.add(a,"inset_bottom",0,k,1).onChange(_),m=t.add(a,"inset_left",0,C,1).onChange(_),v=t.add(a,"inset_right",0,C,1).onChange(_))}t.add(a,"inset_type",["pixel","portion"]).onChange(()=>{u(),_()}),u();let b=Oe(e);t.add(a,"Focus on click").onChange(C=>{C?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"Focus on current floor");let x=C=>{t._closed||(a.center_lat=C.center.latitude,a.center_lon=C.center.longitude,a.zoomLevel=C.zoomLevel,a.bearing=C.bearing,a.pitch=C.pitch)};e.on("camera-change",x);let L=[()=>{e.off("camera-change",x)}];function _(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),p()}(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&_();function q(C){p(),C?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),ie(L)}})}function Oe(n){return function(i){let{spaces:t,objects:o}=i,r=t?.[0]??o?.[0];r&&n.Camera.focusOn(r)}}y();function le(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(h=>{delete this.markers[h.id]}),c()}},{addMarker:o,destroy:r}=Pe(n,i);n.add(t,"removeAllMarkers");let l=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.markers[m.id],s.get(m.id)?.destroy()}function h(m){let v=F(i,m,l,{onRemove:b=>{p(b)}});if(!v)return;let{labelItemFolder:u}=v;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("marker");for(let m in t.markers){let v=t.markers[m];h(v)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({markers:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.markers[h.id]=h;c()}return{populateMarkers:a,destroy(){r()}}}function Pe(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let o=i.addFolder("Low Priority Pin");return o.add(t.lowPriorityPin,"enabled"),o.add(t.lowPriorityPin,"size",1,20,1),o.addColor(t.lowPriorityPin,"color"),o.close(),{destroy(){i.destroy()},addMarker(r){if(i._closed||!t.onClick)return;let l={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(l.zIndex=t.zIndex),e.Markers.add(r,t.contentHTML,l)}}}y();function de(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(l=>{e.updateState("exterior-walls",{visible:l})}),i.addColor(t,"topColor").onChange(l=>{e.updateState("exterior-walls",{topColor:l})}),i.addColor(t,"color").onChange(l=>{e.updateState("exterior-walls",{color:l})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{texture:{url:l}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{topTexture:{url:l}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}y();function ce(n,e,i){n.close();let t={language:i.currentLanguage?.code??"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o?.languages.map(r=>r.code)).onChange(r=>{i.changeLanguage(r)})}y();function he(n,e,i){let t=n.addFolder("Debug");t.close();let o=e.Debug.state,r={showPolygonLabelTextAreaMesh:o.showPolygonLabelTextAreaMesh,showCollisionBoxes:o.showCollisionBoxes,showEnvMap:o.showEnvMap};t.add(r,"showPolygonLabelTextAreaMesh").onChange(l=>{e.Debug.update({showPolygonLabelTextAreaMesh:l})}).name("Show Flat Label Text Area Mesh"),t.add(r,"showCollisionBoxes").onChange(l=>{e.Debug.update({showCollisionBoxes:l})}).name("Show Collision Boxes"),t.add(r,"showEnvMap").onChange(l=>{e.Debug.update({showEnvMap:l})}).name("Show Environment Map"),e.Debug.update(r)}y();function ue(n,e,i){let t=n.addFolder("Text3D").close(),o={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(o,"all").name("Show All"),t.add(o,"removeAll").name("Remove All")}y();function pe(n,e,i){let t=n.addFolder("Directions \u{1F5FA}\uFE0F");t.close();let o=localStorage.getItem("directionsMethod"),r=localStorage.getItem("directionsRadius"),l=localStorage.getItem("directionsIncludeDoorBufferNodes")==="true",s={enabled:!1,method:o||"dp-optimal",radius:r?parseFloat(r):.75,includeDoorBufferNodes:l,startCoordinate:"",endCoordinate:"",pathInfo:""},c,f,d;t.add(s,"enabled").name("Enable Click-to-Route").onChange(m=>{m||(c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0))}),t.add(s,"startCoordinate").name("Start").disable().listen(),t.add(s,"endCoordinate").name("End").disable().listen(),t.add(s,"method",{"Greedy LOS":"greedy-los",RDP:"rdp","DP Optimal":"dp-optimal"}).name("Smoothing Method").onChange(m=>{localStorage.setItem("directionsMethod",m),c&&f&&s.enabled&&h(c,f)}),t.add(s,"radius",.1,5,.1).name("Smoothing Radius").onChange(m=>{localStorage.setItem("directionsRadius",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"includeDoorBufferNodes").name("Door Buffers").onChange(m=>{localStorage.setItem("directionsIncludeDoorBufferNodes",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"pathInfo").name("Path Info").disable().listen();let a={clear:()=>p()};t.add(a,"clear").name("Clear Path");function p(){c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0)}async function h(m,v){d&&(e.Paths.remove(d),d=void 0);try{let u=await e.getDirections(m,v,{smoothing:{enabled:!0,__EXPERIMENTAL_METHOD:s.method,radius:s.radius,__EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES:s.includeDoorBufferNodes}});if(u){d=e.Paths.add(u.coordinates,{interactive:!0,color:"green",width:1});let x=u.distance?.toFixed(2)||"N/A";s.pathInfo=`${u.coordinates.length} pts, ${x}m`}else s.pathInfo="No path found"}catch(u){s.pathInfo=`Error: ${u instanceof Error?u.message:"Unknown"}`}}let g=async m=>{if(s.enabled)if(c){let v=m.coordinate;f=v,s.endCoordinate=`${v.latitude.toFixed(6)}, ${v.longitude.toFixed(6)}`,s.pathInfo="Calculating...",await h(c,f),c=void 0,f=void 0}else{let v=m.coordinate;c=v,s.startCoordinate=`${v.latitude.toFixed(6)}, ${v.longitude.toFixed(6)}`,s.pathInfo="Click to set end..."}};return e.on("click",g),{destroy(){e.off("click",g),t.destroy()}}}y();function fe(n,e){let i=n.addFolder("Spaces Open To Below Visual Effect").close(),t=e.getGlobalState().multiFloorView,o={enabled:t.spacesOpenToBelowVisualEffectEnabled,darkenAmount:t.spacesOpenToBelowVisualEffectDarkenAmount,darkenUseDepth:t.spacesOpenToBelowVisualEffectDarkenUseDepth,desaturateAmount:t.spacesOpenToBelowVisualEffectDesaturateAmount,desaturateUseDepth:t.spacesOpenToBelowVisualEffectDesaturateUseDepth,washOutAmount:t.spacesOpenToBelowVisualEffectWashOutAmount,washOutUseDepth:t.spacesOpenToBelowVisualEffectWashOutUseDepth};function r(){e.updateGlobalState({multiFloorView:{spacesOpenToBelowVisualEffectEnabled:o.enabled,spacesOpenToBelowVisualEffectDarkenAmount:o.darkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:o.darkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:o.desaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:o.desaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:o.washOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:o.washOutUseDepth}})}i.add(o,"enabled").name("Enabled").onChange(()=>r());let l=i.addFolder("Darken");l.add(o,"darkenAmount",0,1,.01).name("Amount").onChange(()=>r()),l.add(o,"darkenUseDepth").name("Use Depth").onChange(()=>r());let s=i.addFolder("Desaturate");s.add(o,"desaturateAmount",0,1,.01).name("Amount").onChange(()=>r()),s.add(o,"desaturateUseDepth").name("Use Depth").onChange(()=>r());let c=i.addFolder("Wash Out");c.add(o,"washOutAmount",0,1,.01).name("Amount").onChange(()=>r()),c.add(o,"washOutUseDepth").name("Use Depth").onChange(()=>r())}function me(n,e,i){ze();let t=new z({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),oe(e,n,t),ae(t,e,i?.camera);let o=t.addFolder("Levels").close(),r=t.addFolder("Scene Controls");r.close();let l=t.addFolder("Labels");ue(t,e,n);let s=t.addFolder("Markers");de(t,e);let c=t.addFolder("misc");he(t,e,n),fe(t,e),pe(t,e,n),ce(c,e,n);let f={level:e.currentFloor.id},{populatelabels:d}=re(l,n,e),{populateMarkers:a}=le(s,n,e),p=n.getByType("floor").reduce((g,m)=>(g[m.name]=m.id,g),{}),h=o.add(f,"level",p).onChange(g=>{e.setFloor(g),f.level=e.currentFloor.id,h.updateDisplay()});return e.on("floor-change-start",g=>{o.controllers[0].setValue(g.floor.id)}),n.getByType("space").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:d,sceneFolder:r,populateMarkers:a}}var ge="mappedin-sdk-debug-css";function ze(){if(document.getElementById(ge))return;let n=document.createElement("style");n.id=ge,n.textContent=se,document.head.appendChild(n)}var Q=class{_enabled=!1;mv;api;mapData;scenegraphVisualizerMounted=!1;storeStateToLocalStorageEnabled=!1;constructor(e,i){this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=me(this.mapData,this.mv,e);i.onOpenClose(async t=>{if(t===i&&!t._closed&&!this.scenegraphVisualizerMounted){this.scenegraphVisualizerMounted=!0;try{let{mountSceneGraphVisualizer:o}=await import("./src-2BZUPZLG.js");o(this.api.core,i)}catch{}}}),this.api.getMapDataInternal()?.spaces.forEach(t=>{this.mv.updateState(t,{interactive:!0})})}get enabled(){return this._enabled}};export{Q as Inspector};