@feltmaps/js-sdk 1.7.0-next.20 → 1.7.0-next.21

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.
@@ -10198,6 +10198,112 @@ type UIFlexibleSpaceElementCreateClonable = MakeClonableSchema<UIFlexibleSpaceEl
10198
10198
  interface UIFlexibleSpaceElementUpdate extends MakeUpdateSchema<UIFlexibleSpaceElement, UIFlexibleSpaceElementCreate> {
10199
10199
  }
10200
10200
 
10201
+ declare const uiIframeElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<{
10202
+ onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10203
+ id: ZodString;
10204
+ }, "strip", ZodTypeAny, {
10205
+ id: string;
10206
+ }, {
10207
+ id: string;
10208
+ }>], ZodUnknown>, ZodVoid>>;
10209
+ onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10210
+ id: ZodString;
10211
+ }, "strip", ZodTypeAny, {
10212
+ id: string;
10213
+ }, {
10214
+ id: string;
10215
+ }>], ZodUnknown>, ZodVoid>>;
10216
+ }, {
10217
+ id: ZodString;
10218
+ }>, {
10219
+ type: ZodLiteral<"Iframe">;
10220
+ /**
10221
+ * The height of the iframe.
10222
+ *
10223
+ * If not provided, the height will be automatically calculated following a 16:9 ratio.
10224
+ */
10225
+ height: ZodOptional<ZodUnion<[ZodNumber, ZodString]>>;
10226
+ /**
10227
+ * The URL of the iframe.
10228
+ */
10229
+ url: ZodString;
10230
+ }>, "strip", ZodTypeAny, {
10231
+ type: "Iframe";
10232
+ id: string;
10233
+ url: string;
10234
+ onCreate?: ((args_0: {
10235
+ id: string;
10236
+ }, ...args: unknown[]) => void) | undefined;
10237
+ onDestroy?: ((args_0: {
10238
+ id: string;
10239
+ }, ...args: unknown[]) => void) | undefined;
10240
+ height?: string | number | undefined;
10241
+ }, {
10242
+ type: "Iframe";
10243
+ id: string;
10244
+ url: string;
10245
+ onCreate?: ((args_0: {
10246
+ id: string;
10247
+ }, ...args: unknown[]) => void) | undefined;
10248
+ onDestroy?: ((args_0: {
10249
+ id: string;
10250
+ }, ...args: unknown[]) => void) | undefined;
10251
+ height?: string | number | undefined;
10252
+ }>;
10253
+ /**
10254
+ * Represents an iframe element in a panel.
10255
+ *
10256
+ * The height of the iframe can be set by using the `height` property
10257
+ * either as a number (measured in pixels) or a string (e.g. “100px” or “50%“).
10258
+ *
10259
+ * By default, the height is calculated following a 16:9 ratio.
10260
+ *
10261
+ * <figure>
10262
+ * <img src="./img/iframe-basic.png" alt="Iframe showing an example website" />
10263
+ * <figcaption>
10264
+ * Iframe with default height (16:9)
10265
+ * </figcaption>
10266
+ * </figure>
10267
+ *
10268
+ * ```typescript
10269
+ * { type: "Iframe", url: "https://www.example.com" }
10270
+ * ```
10271
+ *
10272
+ * <figure>
10273
+ * <img src="./img/iframe-custom-height.png" alt="Iframe showing an example website with a custom height" />
10274
+ * <figcaption>
10275
+ * Iframe with custom height
10276
+ * </figcaption>
10277
+ * </figure>
10278
+ *
10279
+ * ```typescript
10280
+ * { type: "Iframe", url: "https://www.example.com", height: 300 }
10281
+ * ```
10282
+ */
10283
+ interface UIIframeElement extends UIElementBase, Omit<zInfer<typeof uiIframeElementSchema>, "onCreate" | "onDestroy"> {
10284
+ }
10285
+ /**
10286
+ * The parameters for creating an iframe element.
10287
+ *
10288
+ * See {@link UIIframeElement} for more details.
10289
+ *
10290
+ * @remarks
10291
+ * `id` is optional but recommended if you want to be able to perform updates.
10292
+ */
10293
+ interface UIIframeElementCreate extends Omit<UIIframeElement, "id">, UIElementBaseCreateParams {
10294
+ }
10295
+ type UIIframeElementCreateClonable = MakeClonableSchema<UIIframeElementCreate>;
10296
+ /**
10297
+ * The parameters for updating an iframe element.
10298
+ *
10299
+ * See {@link UIIframeElement} for more details.
10300
+ *
10301
+ * @remarks
10302
+ * `id` and `type` are required to identify the element to update.
10303
+ */
10304
+ interface UIIframeElementUpdate extends MakeUpdateSchema<UIIframeElement, UIIframeElementCreate> {
10305
+ }
10306
+
10201
10307
  declare const uiToggleGroupElementSchema: ZodObject<objectUtil.extendShape<objectUtil.extendShape<objectUtil.extendShape<{
10202
10308
  onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
10203
10309
  id: ZodString;
@@ -11242,22 +11348,22 @@ type UIGridContainerElementCreateClonable = Omit<MakeClonableSchema<UIGridContai
11242
11348
  interface UIGridContainerElementUpdate extends MakeUpdateSchema<UIGridContainerElement, UIGridContainerElementCreate> {
11243
11349
  }
11244
11350
 
11245
- type UIPanelElement = UIButtonElement | UITextElement | UIDividerElement | UITextInputElement | UISelectElement | UIFlexibleSpaceElement | UIButtonRowElement | UICheckboxGroupElement | UIRadioGroupElement | UIToggleGroupElement | UIGridContainerElement;
11351
+ type UIPanelElement = UIButtonElement | UITextElement | UIDividerElement | UITextInputElement | UISelectElement | UIFlexibleSpaceElement | UIButtonRowElement | UICheckboxGroupElement | UIRadioGroupElement | UIToggleGroupElement | UIIframeElement | UIGridContainerElement;
11246
11352
  /**
11247
11353
  * This is a union of all the possible elements that can be created inside panel's body or footer.
11248
11354
  *
11249
11355
  * @remarks
11250
11356
  * For the sake of convenience, `id` is optional but recommended if you want to be able to perform updates.
11251
11357
  */
11252
- type UIPanelElementCreate = UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIGridContainerElementCreate;
11253
- type UIPanelElementCreateClonable = UIButtonElementCreateClonable | UITextElementCreateClonable | UIDividerElementCreateClonable | UITextInputElementCreateClonable | UISelectElementCreateClonable | UIFlexibleSpaceElementCreateClonable | UIButtonRowElementCreateClonable | UICheckboxGroupElementCreateClonable | UIRadioGroupElementCreateClonable | UIToggleGroupElementCreateClonable | UIGridContainerElementCreateClonable;
11358
+ type UIPanelElementCreate = UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate | UIGridContainerElementCreate;
11359
+ type UIPanelElementCreateClonable = UIButtonElementCreateClonable | UITextElementCreateClonable | UIDividerElementCreateClonable | UITextInputElementCreateClonable | UISelectElementCreateClonable | UIFlexibleSpaceElementCreateClonable | UIButtonRowElementCreateClonable | UICheckboxGroupElementCreateClonable | UIRadioGroupElementCreateClonable | UIToggleGroupElementCreateClonable | UIIframeElementCreateClonable | UIGridContainerElementCreateClonable;
11254
11360
  /**
11255
11361
  * This is a union of all the possible elements that can be updated inside panel's body or footer (excluding Divider and FlexibleSpace elements because they cannot be updated).
11256
11362
  *
11257
11363
  * @remarks
11258
11364
  * `id` and `type` are required to identify the element to update.
11259
11365
  */
11260
- type UIPanelElementUpdate = UIButtonElementUpdate | UITextElementUpdate | UITextInputElementUpdate | UISelectElementUpdate | UIDividerElementUpdate | UIButtonRowElementUpdate | UICheckboxGroupElementUpdate | UIRadioGroupElementUpdate | UIToggleGroupElementUpdate | UIGridContainerElementUpdate | UIFlexibleSpaceElementUpdate;
11366
+ type UIPanelElementUpdate = UIButtonElementUpdate | UITextElementUpdate | UITextInputElementUpdate | UISelectElementUpdate | UIDividerElementUpdate | UIButtonRowElementUpdate | UICheckboxGroupElementUpdate | UIRadioGroupElementUpdate | UIToggleGroupElementUpdate | UIGridContainerElementUpdate | UIFlexibleSpaceElementUpdate | UIIframeElementUpdate;
11261
11367
 
11262
11368
  declare const placementForUiElementSchema: ZodUnion<[ZodObject<{
11263
11369
  after: ZodString;
@@ -12973,6 +13079,47 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12973
13079
  id: string;
12974
13080
  }, ...args: unknown[]) => void) | undefined;
12975
13081
  alignment?: "start" | "end" | undefined;
13082
+ }>, ZodObject<{
13083
+ type: ZodLiteral<"Iframe">;
13084
+ height: ZodOptional<ZodOptional<ZodUnion<[ZodNumber, ZodString]>>>;
13085
+ url: ZodOptional<ZodString>;
13086
+ id: ZodString;
13087
+ onCreate: ZodOptional<ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
13088
+ id: ZodString;
13089
+ }, "strip", ZodTypeAny, {
13090
+ id: string;
13091
+ }, {
13092
+ id: string;
13093
+ }>], ZodUnknown>, ZodVoid>>>;
13094
+ onDestroy: ZodOptional<ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
13095
+ id: ZodString;
13096
+ }, "strip", ZodTypeAny, {
13097
+ id: string;
13098
+ }, {
13099
+ id: string;
13100
+ }>], ZodUnknown>, ZodVoid>>>;
13101
+ }, UnknownKeysParam, ZodTypeAny, {
13102
+ type: "Iframe";
13103
+ id: string;
13104
+ url?: string | undefined;
13105
+ onCreate?: ((args_0: {
13106
+ id: string;
13107
+ }, ...args: unknown[]) => void) | undefined;
13108
+ onDestroy?: ((args_0: {
13109
+ id: string;
13110
+ }, ...args: unknown[]) => void) | undefined;
13111
+ height?: string | number | undefined;
13112
+ }, {
13113
+ type: "Iframe";
13114
+ id: string;
13115
+ url?: string | undefined;
13116
+ onCreate?: ((args_0: {
13117
+ id: string;
13118
+ }, ...args: unknown[]) => void) | undefined;
13119
+ onDestroy?: ((args_0: {
13120
+ id: string;
13121
+ }, ...args: unknown[]) => void) | undefined;
13122
+ height?: string | number | undefined;
12976
13123
  }>, ZodObject<{
12977
13124
  type: ZodLiteral<"Grid">;
12978
13125
  id: ZodString;
@@ -12993,11 +13140,11 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
12993
13140
  grid: ZodOptional<ZodOptional<ZodString>>;
12994
13141
  verticalAlignment: ZodOptional<ZodOptional<ZodEnum<["top", "center", "bottom"]>>>;
12995
13142
  horizontalDistribution: ZodOptional<ZodOptional<ZodEnum<["start", "center", "end", "space-between", "space-around", "space-evenly"]>>>;
12996
- items: ZodOptional<ZodType<(UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[], ZodTypeDef, (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[]>>;
13143
+ items: ZodOptional<ZodType<(UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[], ZodTypeDef, (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[]>>;
12997
13144
  }, UnknownKeysParam, ZodTypeAny, {
12998
13145
  type: "Grid";
12999
13146
  id: string;
13000
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13147
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13001
13148
  onCreate?: ((args_0: {
13002
13149
  id: string;
13003
13150
  }, ...args: unknown[]) => void) | undefined;
@@ -13010,7 +13157,7 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13010
13157
  }, {
13011
13158
  type: "Grid";
13012
13159
  id: string;
13013
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13160
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13014
13161
  onCreate?: ((args_0: {
13015
13162
  id: string;
13016
13163
  }, ...args: unknown[]) => void) | undefined;
@@ -13201,10 +13348,21 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13201
13348
  id: string;
13202
13349
  }, ...args: unknown[]) => void) | undefined;
13203
13350
  alignment?: "start" | "end" | undefined;
13351
+ } | {
13352
+ type: "Iframe";
13353
+ id: string;
13354
+ url?: string | undefined;
13355
+ onCreate?: ((args_0: {
13356
+ id: string;
13357
+ }, ...args: unknown[]) => void) | undefined;
13358
+ onDestroy?: ((args_0: {
13359
+ id: string;
13360
+ }, ...args: unknown[]) => void) | undefined;
13361
+ height?: string | number | undefined;
13204
13362
  } | {
13205
13363
  type: "Grid";
13206
13364
  id: string;
13207
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13365
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13208
13366
  onCreate?: ((args_0: {
13209
13367
  id: string;
13210
13368
  }, ...args: unknown[]) => void) | undefined;
@@ -13395,10 +13553,21 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13395
13553
  id: string;
13396
13554
  }, ...args: unknown[]) => void) | undefined;
13397
13555
  alignment?: "start" | "end" | undefined;
13556
+ } | {
13557
+ type: "Iframe";
13558
+ id: string;
13559
+ url?: string | undefined;
13560
+ onCreate?: ((args_0: {
13561
+ id: string;
13562
+ }, ...args: unknown[]) => void) | undefined;
13563
+ onDestroy?: ((args_0: {
13564
+ id: string;
13565
+ }, ...args: unknown[]) => void) | undefined;
13566
+ height?: string | number | undefined;
13398
13567
  } | {
13399
13568
  type: "Grid";
13400
13569
  id: string;
13401
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13570
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13402
13571
  onCreate?: ((args_0: {
13403
13572
  id: string;
13404
13573
  }, ...args: unknown[]) => void) | undefined;
@@ -13592,10 +13761,21 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13592
13761
  id: string;
13593
13762
  }, ...args: unknown[]) => void) | undefined;
13594
13763
  alignment?: "start" | "end" | undefined;
13764
+ } | {
13765
+ type: "Iframe";
13766
+ id: string;
13767
+ url?: string | undefined;
13768
+ onCreate?: ((args_0: {
13769
+ id: string;
13770
+ }, ...args: unknown[]) => void) | undefined;
13771
+ onDestroy?: ((args_0: {
13772
+ id: string;
13773
+ }, ...args: unknown[]) => void) | undefined;
13774
+ height?: string | number | undefined;
13595
13775
  } | {
13596
13776
  type: "Grid";
13597
13777
  id: string;
13598
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13778
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13599
13779
  onCreate?: ((args_0: {
13600
13780
  id: string;
13601
13781
  }, ...args: unknown[]) => void) | undefined;
@@ -13789,10 +13969,21 @@ declare const UpdatePanelElementsParamsSchema: ZodObject<{
13789
13969
  id: string;
13790
13970
  }, ...args: unknown[]) => void) | undefined;
13791
13971
  alignment?: "start" | "end" | undefined;
13972
+ } | {
13973
+ type: "Iframe";
13974
+ id: string;
13975
+ url?: string | undefined;
13976
+ onCreate?: ((args_0: {
13977
+ id: string;
13978
+ }, ...args: unknown[]) => void) | undefined;
13979
+ onDestroy?: ((args_0: {
13980
+ id: string;
13981
+ }, ...args: unknown[]) => void) | undefined;
13982
+ height?: string | number | undefined;
13792
13983
  } | {
13793
13984
  type: "Grid";
13794
13985
  id: string;
13795
- items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate)[] | undefined;
13986
+ items?: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[] | undefined;
13796
13987
  onCreate?: ((args_0: {
13797
13988
  id: string;
13798
13989
  }, ...args: unknown[]) => void) | undefined;
@@ -14627,4 +14818,4 @@ interface FeltController extends ViewportController, UiController, LayersControl
14627
14818
  iframe: HTMLIFrameElement | null;
14628
14819
  }
14629
14820
 
14630
- export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type UICheckboxGroupElementCreate as b$, type MultiLineStringGeometry as b0, type MultiPointGeometry as b1, type MultiPolygonGeometry as b2, type PointGeometry as b3, type PolygonGeometry as b4, type SetVisibilityRequest as b5, type SortConfig as b6, type SortDirection as b7, type CircleToolSettings as b8, type ConfigurableToolType as b9, type UIButtonElementCreate as bA, type UIButtonElementUpdate as bB, type UITextElement as bC, type UITextElementCreate as bD, type UITextElementUpdate as bE, type UIFlexibleSpaceElement as bF, type UIFlexibleSpaceElementCreate as bG, type UIFlexibleSpaceElementUpdate as bH, type UIDividerElement as bI, type UIDividerElementCreate as bJ, type UIDividerElementUpdate as bK, type UITextInputElement as bL, type UITextInputElementCreate as bM, type UITextInputElementUpdate as bN, type UISelectElement as bO, type UISelectElementCreate as bP, type UISelectElementUpdate as bQ, type UIPanelElement as bR, type UIPanelElementCreate as bS, type UIPanelElementUpdate as bT, type UIGridContainerElement as bU, type UIGridContainerElementCreate as bV, type UIGridContainerElementUpdate as bW, type UIButtonRowElement as bX, type UIButtonRowElementCreate as bY, type UIButtonRowElementUpdate as bZ, type UICheckboxGroupElement as b_, type HighlighterToolSettings as ba, type InputToolSettings as bb, type LineToolSettings as bc, type MarkerToolSettings as bd, type NoteToolSettings as be, type PinToolSettings as bf, type PlaceFrame as bg, type PlaceSymbol as bh, type PolygonToolSettings as bi, type RouteToolSettings as bj, type TextToolSettings as bk, type ToolSettingsChangeEvent as bl, type ToolSettingsMap as bm, type ToolType as bn, type ToolsController as bo, type CreateActionTriggerParams as bp, type CreateOrUpdatePanelParams as bq, type CreatePanelElementsParams as br, type DeletePanelElementsParams as bs, type UiOnMapInteractionsOptions as bt, type UpdateActionTriggerParams as bu, type UpdatePanelElementsParams as bv, type PlacementForUIElement as bw, type UIPanel as bx, type UIPanelCreateOrUpdate as by, type UIButtonElement as bz, type ElementChangeCallbackParams as c, type UICheckboxGroupElementUpdate as c0, type UIRadioGroupElement as c1, type UIRadioGroupElementCreate as c2, type UIRadioGroupElementUpdate as c3, type UIToggleGroupElement as c4, type UIToggleGroupElementCreate as c5, type UIToggleGroupElementUpdate as c6, type UIControlElementOption as c7, type UIActionTriggerCreate as c8, type UiController as c9, type SetViewportCenterZoomParams as ca, type ViewportConstraints as cb, type ViewportFitBoundsParams as cc, type ViewportState as cd, type ViewportController as ce, type UnwrapPromise as cf, uiActionTriggerSchema as cg, type UIPanelElementCreateClonable as ch, uiPanelCreateSchema as ci, type UIButtonElementCreateClonable as cj, type MakeClonableSchema as ck, type UIButtonRowElementCreateClonable as cl, type PromiseOrNot as cm, type UnionToIntersection as cn, type ElementCreate as d, type ElementGroup as e, type ElementGroupChangeCallbackParams as f, type ElementUpdate as g, type GetElementsConstraint as h, type HighlighterElementRead as i, type HighlighterElementUpdate as j, type ImageElementRead as k, type ImageElementUpdate as l, type MarkerElementRead as m, type MarkerElementUpdate as n, type NoteElementRead as o, type NoteElementUpdate as p, type PathElementRead as q, type PathElementUpdate as r, type PlaceElementCreate as s, type PlaceElementRead as t, type PlaceElementUpdate as u, type PolygonElementCreate as v, type PolygonElementRead as w, type PolygonElementUpdate as x, type TextElementRead as y, type zInfer as z };
14821
+ export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type UICheckboxGroupElementCreate as b$, type MultiLineStringGeometry as b0, type MultiPointGeometry as b1, type MultiPolygonGeometry as b2, type PointGeometry as b3, type PolygonGeometry as b4, type SetVisibilityRequest as b5, type SortConfig as b6, type SortDirection as b7, type CircleToolSettings as b8, type ConfigurableToolType as b9, type UIButtonElementCreate as bA, type UIButtonElementUpdate as bB, type UITextElement as bC, type UITextElementCreate as bD, type UITextElementUpdate as bE, type UIFlexibleSpaceElement as bF, type UIFlexibleSpaceElementCreate as bG, type UIFlexibleSpaceElementUpdate as bH, type UIDividerElement as bI, type UIDividerElementCreate as bJ, type UIDividerElementUpdate as bK, type UITextInputElement as bL, type UITextInputElementCreate as bM, type UITextInputElementUpdate as bN, type UISelectElement as bO, type UISelectElementCreate as bP, type UISelectElementUpdate as bQ, type UIPanelElement as bR, type UIPanelElementCreate as bS, type UIPanelElementUpdate as bT, type UIGridContainerElement as bU, type UIGridContainerElementCreate as bV, type UIGridContainerElementUpdate as bW, type UIButtonRowElement as bX, type UIButtonRowElementCreate as bY, type UIButtonRowElementUpdate as bZ, type UICheckboxGroupElement as b_, type HighlighterToolSettings as ba, type InputToolSettings as bb, type LineToolSettings as bc, type MarkerToolSettings as bd, type NoteToolSettings as be, type PinToolSettings as bf, type PlaceFrame as bg, type PlaceSymbol as bh, type PolygonToolSettings as bi, type RouteToolSettings as bj, type TextToolSettings as bk, type ToolSettingsChangeEvent as bl, type ToolSettingsMap as bm, type ToolType as bn, type ToolsController as bo, type CreateActionTriggerParams as bp, type CreateOrUpdatePanelParams as bq, type CreatePanelElementsParams as br, type DeletePanelElementsParams as bs, type UiOnMapInteractionsOptions as bt, type UpdateActionTriggerParams as bu, type UpdatePanelElementsParams as bv, type PlacementForUIElement as bw, type UIPanel as bx, type UIPanelCreateOrUpdate as by, type UIButtonElement as bz, type ElementChangeCallbackParams as c, type UICheckboxGroupElementUpdate as c0, type UIRadioGroupElement as c1, type UIRadioGroupElementCreate as c2, type UIRadioGroupElementUpdate as c3, type UIToggleGroupElement as c4, type UIToggleGroupElementCreate as c5, type UIToggleGroupElementUpdate as c6, type UIIframeElement as c7, type UIIframeElementCreate as c8, type UIIframeElementUpdate as c9, type UIControlElementOption as ca, type UIActionTriggerCreate as cb, type UiController as cc, type SetViewportCenterZoomParams as cd, type ViewportConstraints as ce, type ViewportFitBoundsParams as cf, type ViewportState as cg, type ViewportController as ch, type UnwrapPromise as ci, uiActionTriggerSchema as cj, type UIPanelElementCreateClonable as ck, uiPanelCreateSchema as cl, type UIButtonElementCreateClonable as cm, type MakeClonableSchema as cn, type UIButtonRowElementCreateClonable as co, type PromiseOrNot as cp, type UnionToIntersection as cq, type ElementCreate as d, type ElementGroup as e, type ElementGroupChangeCallbackParams as f, type ElementUpdate as g, type GetElementsConstraint as h, type HighlighterElementRead as i, type HighlighterElementUpdate as j, type ImageElementRead as k, type ImageElementUpdate as l, type MarkerElementRead as m, type MarkerElementUpdate as n, type NoteElementRead as o, type NoteElementUpdate as p, type PathElementRead as q, type PathElementUpdate as r, type PlaceElementCreate as s, type PlaceElementRead as t, type PlaceElementUpdate as u, type PolygonElementCreate as v, type PolygonElementRead as w, type PolygonElementUpdate as x, type TextElementRead as y, type zInfer as z };
package/dist/handler.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var je=Object.defineProperty;var Na=Object.getOwnPropertyDescriptor;var Za=Object.getOwnPropertyNames;var Ha=Object.prototype.hasOwnProperty;var Ja=(a,g)=>{for(var K in g)je(a,K,{get:g[K],enumerable:!0})},qa=(a,g,K,$)=>{if(g&&typeof g=="object"||typeof g=="function")for(let N of Za(g))!Ha.call(a,N)&&N!==K&&je(a,N,{get:()=>g[N],enumerable:!($=Na(g,N))||$.enumerable});return a};var Ka=a=>qa(je({},"__esModule",{value:!0}),a);var Er={};Ja(Er,{createMessageHandler:()=>gr});module.exports=Ka(Er);var y=require("zod");var U=require("zod");var v=require("zod");function e(a,g){return v.z.strictObject({type:v.z.literal(a),params:g})}function z(a,g){return v.z.strictObject({eventName:v.z.literal(a),id:v.z.string(),options:g})}function x(a){return v.z.strictObject({eventName:v.z.literal(a),id:v.z.string()})}var m=require("zod"),Me=m.z.number(),Ge=m.z.number(),Te=m.z.object({latitude:Ge,longitude:Me}),Z=m.z.tuple([Me,Ge]),oe=m.z.object({type:m.z.literal("Polygon"),coordinates:m.z.array(m.z.array(Z).min(4).refine(a=>a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1],"The last point of each ring must be identical to the first"))}),Pe=m.z.object({type:m.z.literal("MultiPolygon"),coordinates:m.z.array(oe.shape.coordinates)}),Wa=m.z.object({type:m.z.literal("LineString"),coordinates:m.z.array(Z).min(2)}),ne=m.z.object({type:m.z.literal("MultiLineString"),coordinates:m.z.array(Wa.shape.coordinates)}),Ut=m.z.number().min(1).max(23),R=m.z.tuple([Me,Ge,Me,Ge]),W=m.z.object({show:m.z.array(m.z.string()).optional(),hide:m.z.array(m.z.string()).optional()}),_a=m.z.enum(["asc","desc"]),ze=m.z.object({attribute:m.z.string(),direction:_a});var t=require("zod");var k=t.z.object({id:t.z.string(),groupId:t.z.string().nullable(),color:t.z.string(),name:t.z.string().nullable(),description:t.z.string().nullable(),attributes:t.z.record(t.z.string(),t.z.unknown()),interaction:t.z.enum(["default","locked"]).optional()}),ve=t.z.object({imageUrl:t.z.string().nullable()}),De=t.z.object({strokeOpacity:t.z.number(),strokeWidth:t.z.number(),strokeStyle:t.z.enum(["solid","dashed","dotted"])}),Qa=t.z.enum(["meter","kilometer","foot","mile"]),ke=k.extend(ve.shape).extend({type:t.z.literal("Place"),coordinates:Z,symbol:t.z.string(),frame:t.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.z.boolean()}),re=k.extend(ve.shape).extend(De.shape).extend({type:t.z.literal("Path"),coordinates:ne.shape.coordinates,distanceMarker:t.z.boolean(),routingMode:t.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.z.boolean()}),ie=k.extend(ve.shape).extend(De.shape).extend({type:t.z.literal("Polygon"),coordinates:oe.shape.coordinates,fillOpacity:t.z.number().min(0).max(1),areaMarker:t.z.boolean()}),Fe=k.extend(ve.shape).extend(De.shape).extend({type:t.z.literal("Circle"),center:Z,radius:t.z.number(),radiusMarker:t.z.boolean(),radiusDisplayAngle:t.z.number(),radiusDisplayUnit:Qa.nullable(),fillOpacity:t.z.number().min(0).max(1)}),le=k.extend({type:t.z.literal("Marker"),coordinates:ne.shape.coordinates,opacity:t.z.number().min(0).max(1),size:t.z.number().min(0).max(100),zoom:t.z.number().min(0).max(23)}),se=k.extend({type:t.z.literal("Highlighter"),coordinates:Pe.shape.coordinates,renderHoles:t.z.boolean(),opacity:t.z.number().min(0).max(1)}),Lt=t.z.object({position:Z,rotation:t.z.number(),scale:t.z.number(),zoom:t.z.number().min(0).max(23),text:t.z.string(),align:t.z.enum(["left","center","right"]),style:t.z.enum(["italic","light","regular","caps"]),name:t.z.string()}),Ae=k.extend(Lt.shape).extend({type:t.z.literal("Text")}),Ve=k.extend(Lt.shape).extend({type:t.z.literal("Note"),widthScale:t.z.number().min(0)}),me=k.extend({type:t.z.literal("Image"),coordinates:ne.shape.coordinates,imageUrl:t.z.string(),opacity:t.z.number().min(0).max(1)}).omit({color:!0}),$a=k.extend({type:t.z.literal("Link"),coordinates:ne.shape.coordinates,url:t.z.string()}),X={type:!0,coordinates:!0},B={id:!0},Ne=ke.partial().extend(ke.pick(X).shape).omit(B),Re=re.partial().extend(re.pick(X).shape).omit(B),Ze=ie.partial().extend(ie.pick(X).shape).omit(B),He=Fe.partial().extend(Fe.pick({type:!0,center:!0,radius:!0}).shape).omit(B),Je=le.partial().extend(le.pick(X).shape).omit(B),qe=se.partial().extend(se.pick(X).shape).omit(B),Ke=Ae.partial().omit({...B,name:!0,type:!0}).extend({type:t.z.literal("Text"),text:t.z.string()}),We=Ve.partial().omit({...B,name:!0,type:!0}).extend({type:t.z.literal("Note"),text:t.z.string()}),Xa=me.partial().extend(me.pick({...X,imageUrl:!0}).shape).omit(B),Mt=t.z.discriminatedUnion("type",[Ne,Re,Ze,He,Je,qe,Xa,Ke,We]);var Tr=re.omit({coordinates:!0}),Pr=ie.omit({coordinates:!0});var zr=le.omit({coordinates:!0}),kr=se.omit({coordinates:!0});var Fr=me.omit({coordinates:!0}),vr=$a.omit({coordinates:!0}),O={type:!0,id:!0},Ya=ke.partial().extend(ke.pick(O).shape),eo=re.partial().extend(re.pick(O).shape),to=ie.partial().extend(ie.pick(O).shape),ao=Fe.partial().extend(Fe.pick(O).shape),oo=le.partial().extend(le.pick(O).shape),no=se.partial().extend(se.pick(O).shape),ro=Ae.partial().extend(Ae.pick(O).shape).omit({name:!0}),io=Ve.partial().extend(Ve.pick(O).shape).omit({name:!0}),lo=me.partial().extend(me.pick(O).shape),Gt=t.z.discriminatedUnion("type",[Ya,eo,to,ao,oo,no,ro,io,lo]),Tt=t.z.object({ids:t.z.array(t.z.string()).optional()}),Pt=t.z.object({ids:t.z.array(t.z.string()).optional()});var so=e("getElement",U.z.string()),mo=e("getElementGeometry",U.z.string()),po=e("getElements",Tt.optional()),co=e("getElementGroup",U.z.string()),yo=e("getElementGroups",Pt.optional()),uo=e("setElementGroupVisibility",W),go=z("onElementChange",U.z.object({id:U.z.string()})),ho=x("onElementCreate"),fo=x("onElementCreateEnd"),So=z("onElementDelete",U.z.object({id:U.z.string()})),xo=z("onElementGroupChange",U.z.object({id:U.z.string()})),Co=e("createElement",Mt),bo=e("updateElement",Gt),Eo=e("deleteElement",U.z.string()),zt={methods:[so,mo,po,co,yo,uo,Co,bo,Eo],listeners:[go,ho,fo,So,xo]};var Io=x("onPointerClick"),Uo=x("onPointerMove"),kt={methods:null,listeners:[Io,Uo]};var i=require("zod");var s=require("zod");var Lo=s.z.enum(["in","ni"]),Mo=s.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Nr=s.z.enum(["and","or"]),Ft=s.z.union([s.z.number(),s.z.string(),s.z.boolean(),s.z.null()]),vt=s.z.string().or(s.z.null()),Go=s.z.tuple([vt,Lo,s.z.array(Ft).or(s.z.null())]),To=s.z.tuple([vt,Mo,Ft]),_e=s.z.union([Go,To]),Qe=s.z.tuple([s.z.lazy(()=>s.z.union([Qe,_e,s.z.null(),s.z.boolean()])),s.z.enum(["and","or"]),s.z.lazy(()=>s.z.union([Qe,_e,s.z.null(),s.z.boolean()]))]),w=s.z.union([Qe,_e,s.z.null(),s.z.boolean()]),j=s.z.union([R,oe,Pe,s.z.array(Z)]);var o=require("zod");var Rt=o.z.enum(["avg","max","min","sum","median"]),Bt=o.z.enum(["avg","max","min","sum","count"]),Po=o.z.object({method:Rt,attribute:o.z.string()}),zo=o.z.object({methods:o.z.array(o.z.union([Rt,o.z.literal("count")])),attribute:o.z.string().optional()}),Ot=o.z.object({boundary:j.optional(),filters:w.optional(),aggregation:Po.optional()}),wt=o.z.object({layerId:o.z.string(),attribute:o.z.string(),limit:o.z.number().optional(),boundary:j.optional(),filters:w.optional(),values:Ot.optional()}),Jr=o.z.object({key:o.z.union([o.z.number(),o.z.string(),o.z.boolean()]),value:o.z.number().nullable()}),ko=o.z.object({type:o.z.literal("equal-intervals"),count:o.z.number()}),Fo=o.z.object({type:o.z.literal("time-interval"),interval:o.z.enum(["hour","day","week","month","year"])}),jt=o.z.object({layerId:o.z.string(),attribute:o.z.string(),steps:o.z.union([ko,Fo,o.z.array(o.z.number())]),boundary:j.optional(),filters:w.optional(),values:Ot.optional()}),qr=o.z.object({min:o.z.number(),max:o.z.number(),value:o.z.number()}),At=o.z.object({layerId:o.z.string(),boundary:j.optional(),filters:w.optional(),aggregation:zo}),Vt=o.z.enum(["h3"]),vo=o.z.object({type:Vt,resolution:o.z.number(),method:Bt.extract(["count"])}),Ro=o.z.object({type:Vt,resolution:o.z.number(),method:Bt.exclude(["count"]),attribute:o.z.string()}),Bo=o.z.union([vo,Ro]),Dt=o.z.object({layerId:o.z.string(),boundary:j.optional(),filters:w.optional(),gridConfig:Bo});var r=require("zod");var _r=r.z.enum(["processing","completed","failed","incomplete"]),Nt=r.z.object({type:r.z.literal("geoJsonUrl"),url:r.z.string().url(),refreshInterval:r.z.number().min(250).max(5*60*1e3).nullable().optional()}),Zt=r.z.object({type:r.z.literal("geoJsonData"),data:r.z.object({}).passthrough().or(r.z.instanceof(ArrayBuffer))}),Ht=r.z.object({type:r.z.literal("geoJsonFile"),file:r.z.instanceof(File)}),Jt=r.z.object({id:r.z.string(),style:r.z.object({}).passthrough().optional(),shownInLegend:r.z.boolean().optional(),name:r.z.string().optional(),caption:r.z.string().optional(),description:r.z.string().optional(),bounds:R.optional(),source:r.z.union([Nt,Zt,Ht]).optional()}),qt=r.z.object({ids:r.z.array(r.z.string()).optional()}),Kt=r.z.object({ids:r.z.array(r.z.string()).optional()}),Y=r.z.object({id:r.z.string(),layerId:r.z.string()}),Wt=r.z.object({ids:Y.array().optional(),layerIds:r.z.string().array().optional()}),_t=r.z.object({layerIds:r.z.array(r.z.string()).optional(),areaQuery:r.z.union([r.z.object({coordinates:Te}),r.z.object({boundary:R})]).optional()}),Oo=r.z.object({Point:r.z.object({}).passthrough().optional(),Line:r.z.object({}).passthrough().optional(),Polygon:r.z.object({}).passthrough().optional()}),Qt=r.z.object({source:r.z.union([Nt,Zt,Ht]),name:r.z.string(),bounds:R.optional(),caption:r.z.string().optional(),description:r.z.string().optional(),geometryStyles:Oo.optional()});var wo=e("getLayer",i.z.string()),jo=e("getLayers",qt.optional()),Ao=e("setLayerVisibility",W),Vo=z("onLayerChange",i.z.object({id:i.z.string()})),Do=e("setLayerStyle",i.z.object({id:i.z.string(),style:i.z.object({}).passthrough()})),No=e("setLayerLegendVisibility",W),Zo=e("createLayersFromGeoJson",Qt),Ho=e("updateLayer",Jt),Jo=e("deleteLayer",i.z.string()),qo=e("getLayerGroup",i.z.string()),Ko=e("getLayerGroups",Kt.optional()),Wo=e("setLayerGroupVisibility",W),_o=e("setLayerGroupLegendVisibility",W),Qo=z("onLayerGroupChange",i.z.object({id:i.z.string()})),$o=e("getLegendItem",Y),Xo=e("getLegendItems",Wt.optional()),Yo=z("onLegendItemChange",Y),en=e("setLegendItemVisibility",i.z.object({show:Y.array().optional(),hide:Y.array().optional()})),tn=e("getLayerFilters",i.z.string()),an=e("setLayerFilters",i.z.object({layerId:i.z.string(),filters:w,note:i.z.string().optional()})),on=z("onLayerFiltersChange",i.z.object({layerId:i.z.string()})),nn=e("getLayerBoundaries",i.z.string()),rn=e("setLayerBoundary",i.z.object({layerIds:i.z.array(i.z.string()),boundary:j.nullable()})),ln=z("onLayerBoundariesChange",i.z.object({layerId:i.z.string()})),sn=e("getRenderedFeatures",_t.optional()),mn=e("getFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),pn=e("getFeatures",i.z.object({layerId:i.z.string(),filters:w.optional(),sorting:ze.optional(),boundary:j.optional(),search:i.z.string().optional(),pagination:i.z.string().optional().nullish()})),cn=e("getGeoJsonFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),dn=e("getCategoryData",wt),yn=e("getHistogramData",jt),un=e("getAggregates",At),gn=e("getPrecomputedAggregates",Dt),hn=e("getLayerSchema",i.z.string()),$t={methods:[wo,jo,Ao,Do,No,Zo,Jo,Ho,qo,Ko,Wo,_o,$o,Xo,en,tn,an,nn,rn,sn,mn,pn,cn,dn,yn,un,gn,hn],listeners:[Vo,Qo,Yo,on,ln]};var Xt=require("zod");var fn=e("getMapDetails",Xt.z.undefined()),Yt={methods:[fn],listeners:[]};var pe=require("zod");var A=require("zod"),ea=A.z.object({id:A.z.string().or(A.z.number()),layerId:A.z.string(),showPopup:A.z.boolean().optional(),fitViewport:A.z.boolean().or(A.z.object({maxZoom:A.z.number()})).optional()});var Sn=e("getSelection",pe.z.undefined()),xn=x("onSelectionChange"),Cn=e("selectFeature",ea),bn=e("clearSelection",pe.z.object({features:pe.z.boolean().optional(),elements:pe.z.boolean().optional()}).optional()),ta={methods:[Sn,Cn,bn],listeners:[xn]};var ia=require("zod");var h=require("zod");var aa=["circle","highlighter","line","marker","note","pin","polygon","route","text"],En=[...aa,"link"],oa=h.z.enum(En),na=h.z.enum(aa),V={showInspector:h.z.boolean().optional()},In=Ne.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:h.z.enum(["enter name","add another","select"])}).required(),Un=Re.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Ln=Re.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Mn=Ze.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Gn=He.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Tn=Je.pick({color:!0,opacity:!0,size:!0}).required(),Pn=qe.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:h.z.number().min(0).max(200)}).required(),zn=Ke.pick({color:!0,align:!0,style:!0}).required(),kn=We.pick({color:!0,align:!0,style:!0}).required(),ra=h.z.discriminatedUnion("tool",[In.partial().extend({tool:h.z.literal("pin"),...V}),Un.partial().extend({tool:h.z.literal("line"),...V}),Ln.partial().extend({tool:h.z.literal("route"),...V}),Mn.partial().extend({tool:h.z.literal("polygon"),...V}),Gn.partial().extend({tool:h.z.literal("circle"),...V}),Tn.partial().extend({tool:h.z.literal("marker"),...V}),Pn.partial().extend({tool:h.z.literal("highlighter"),...V}),zn.partial().extend({tool:h.z.literal("text"),...V}),kn.partial().extend({tool:h.z.literal("note"),...V})]);var Fn=e("setTool",oa.nullable()),vn=e("getTool",ia.z.undefined()),Rn=x("onToolChange"),Bn=e("setToolSettings",ra),On=e("getToolSettings",na),wn=x("onToolSettingsChange"),la={methods:[Fn,vn,Bn,On],listeners:[Rn,wn]};var Q=require("zod");var n=require("zod");var H=require("zod"),_=H.z.union([H.z.object({after:H.z.string()}),H.z.object({before:H.z.string()}),H.z.object({at:H.z.enum(["start","end"])})]);var S=require("zod");var d=require("zod"),jn=d.z.object({onCreate:d.z.function().args(d.z.object({id:d.z.string()})).returns(d.z.void()).optional(),onDestroy:d.z.function().args(d.z.object({id:d.z.string()})).returns(d.z.void()).optional()}),An=d.z.object({onCreate:d.z.string().optional(),onDestroy:d.z.string().optional()}),f=jn.extend({id:d.z.string()}),sa=f.partial({id:!0}),c={params:sa,clonable:sa.extend(An.shape)},C=f.extend({label:d.z.string().optional()}),u={params:C.extend(c.params.shape),clonable:C.extend(c.clonable.shape)};function l(a){return a.partial().extend({id:d.z.string(),type:a.shape.type})}var L=d.z.object({label:d.z.string(),value:d.z.string(),disabled:d.z.boolean().optional()});var $e=S.z.object({type:S.z.literal("ActionTrigger"),label:S.z.string(),disabled:S.z.boolean().optional()}),ce={read:f.extend($e.shape).extend({onTrigger:S.z.function().args(S.z.object({id:S.z.string()})).returns(S.z.void())}),create:c.params.extend($e.shape).extend({type:S.z.undefined()}).extend({onTrigger:S.z.function().args(S.z.object({id:S.z.string()})).returns(S.z.void())}),clonable:c.clonable.extend($e.shape).extend({type:S.z.undefined()}).extend({onTrigger:S.z.string()})};var pa=require("zod");var Xe=f.extend({type:pa.z.literal("FlexibleSpace")}),ma=Xe.partial({id:!0}),de={params:ma,clonable:ma.extend(c.clonable.shape)},Ye={params:l(de.params),clonable:l(de.clonable)};var b=require("zod");var te=require("zod");var M=require("zod");var ye=f.extend({type:M.z.literal("Button"),label:M.z.string(),variant:M.z.enum(["filled","transparent","outlined"]).optional(),tint:M.z.enum(["default","primary","accent","danger"]).optional(),disabled:M.z.boolean().optional(),onClick:M.z.function().args(M.z.object({id:M.z.string()})).returns(M.z.void())}),ca=ye.extend(c.params.shape),J={params:ca,clonable:ca.extend(c.clonable.shape).extend({onClick:M.z.string()})},et={params:l(J.params),clonable:l(J.clonable)};var ee=require("zod");var tt=C.extend({type:ee.z.literal("ButtonRow"),align:ee.z.enum(["start","end"]).optional(),items:ee.z.array(ye)}),da=tt.extend(u.params.shape).omit({items:!0}).extend({items:ee.z.array(J.params)}),Vn=da.extend(u.clonable.shape).extend({items:ee.z.array(J.clonable)}),ue={params:da,clonable:Vn},at={params:l(ue.params),clonable:l(ue.clonable)};var D=require("zod");var ya=D.z.array(L.shape.value),ot=C.extend({type:D.z.literal("CheckboxGroup"),options:D.z.array(L),value:ya,onChange:D.z.function().args(D.z.object({value:ya,id:D.z.string()})).returns(D.z.void())}),ua=ot.extend(u.params.shape),ge={params:ua,clonable:ua.extend(u.clonable.shape).extend({onChange:D.z.string()})},nt={params:l(ge.params),clonable:l(ge.clonable)};var ha=require("zod");var rt=f.extend({type:ha.z.literal("Divider")}),ga=rt.partial({id:!0}),he={params:ga,clonable:ga.extend(c.clonable.shape)},it={params:l(he.params),clonable:l(he.clonable)};var G=require("zod");var Dn=G.z.lazy(()=>G.z.array(Se.refine(a=>a.type!=="Grid"))),Nn=G.z.lazy(()=>G.z.array(T.params.refine(a=>a.type!=="Grid"))),Zn=G.z.lazy(()=>G.z.array(T.clonable.refine(a=>a.type!=="Grid"))),lt=f.extend({type:G.z.literal("Grid"),grid:G.z.string().optional(),verticalAlignment:G.z.enum(["top","center","bottom"]).optional(),horizontalDistribution:G.z.enum(["start","center","end","space-between","space-around","space-evenly"]).optional(),items:Dn}),fa=lt.extend(c.params.shape).omit({items:!0}).extend({items:Nn}),Hn=fa.extend(c.clonable.shape).extend({items:Zn}),fe={params:fa,clonable:Hn},st={params:l(fe.params),clonable:l(fe.clonable)};var q=require("zod");var Sa=L.shape.value.optional(),mt=C.extend({type:q.z.literal("RadioGroup"),options:q.z.array(L),value:Sa,onChange:q.z.function().args(q.z.object({value:Sa,id:q.z.string()})).returns(q.z.void())}),xa=mt.extend(u.params.shape),xe={params:xa,clonable:xa.extend(u.clonable.shape).extend({onChange:q.z.string()})},pt={params:l(xe.params),clonable:l(xe.clonable)};var I=require("zod");var ct=C.extend({type:I.z.literal("Select"),options:I.z.array(L),value:I.z.string().optional(),placeholder:I.z.string().optional(),search:I.z.boolean().optional(),onChange:I.z.function().args(I.z.object({value:I.z.string(),id:I.z.string()})).returns(I.z.void())}),Ca=ct.extend(u.params.shape),Ce={params:Ca,clonable:Ca.extend(u.clonable.shape).extend({onChange:I.z.string()})},dt={params:l(Ce.params),clonable:l(Ce.clonable)};var yt=require("zod");var ut=f.extend({type:yt.z.literal("Text"),content:yt.z.string()}),ba=ut.extend(c.params.shape),be={params:ba,clonable:ba.extend(c.clonable.shape)},gt={params:l(be.params),clonable:l(be.clonable)};var p=require("zod");var ht=C.extend({type:p.z.literal("TextInput"),value:p.z.string(),placeholder:p.z.string().optional(),onChange:p.z.function().args(p.z.object({value:p.z.string(),id:p.z.string()})).returns(p.z.void()).optional(),onBlur:p.z.function().args(p.z.object({value:p.z.string(),id:p.z.string()})).returns(p.z.void()).optional(),onFocus:p.z.function().args(p.z.object({value:p.z.string(),id:p.z.string()})).returns(p.z.void()).optional()}),Ea=ht.extend(u.params.shape),Ee={params:Ea,clonable:Ea.extend(u.clonable.shape).extend({onChange:p.z.string().optional(),onBlur:p.z.string().optional(),onFocus:p.z.string().optional()})},ft={params:l(Ee.params),clonable:l(Ee.clonable)};var F=require("zod");var Ia=F.z.array(L.shape.value),St=C.extend({type:F.z.literal("ToggleGroup"),alignment:F.z.enum(["start","end"]).optional(),options:F.z.array(L),value:Ia,onChange:F.z.function().args(F.z.object({value:Ia,id:F.z.string()})).returns(F.z.void())}),Ua=St.extend(u.params.shape),Ie={params:Ua,clonable:Ua.extend(u.clonable.shape).extend({onChange:F.z.string()})},xt={params:l(Ie.params),clonable:l(Ie.clonable)};var Se=te.z.discriminatedUnion("type",[ye,ut,rt,ht,ct,Xe,tt,ot,mt,St,lt]),Jn=te.z.discriminatedUnion("type",[J.params,be.params,he.params,Ee.params,Ce.params,de.params,ue.params,ge.params,xe.params,Ie.params,fe.params]),qn=te.z.discriminatedUnion("type",[J.clonable,be.clonable,he.clonable,Ee.clonable,Ce.clonable,de.clonable,ue.clonable,ge.clonable,xe.clonable,Ie.clonable,fe.clonable]),T={params:Jn,clonable:qn},Ct={params:te.z.discriminatedUnion("type",[et.params,gt.params,ft.params,dt.params,it.params,Ye.params,at.params,nt.params,pt.params,xt.params,st.params]),clonable:te.z.discriminatedUnion("type",[et.clonable,gt.clonable,ft.clonable,dt.clonable,it.clonable,Ye.clonable,at.clonable,nt.clonable,pt.clonable,xt.clonable,st.clonable])};var Kn=f.extend({type:b.z.literal("Panel"),title:b.z.string().optional(),body:b.z.array(Se).optional(),footer:b.z.array(Se).optional(),onClickClose:b.z.function().args(b.z.object({id:b.z.string()})).returns(b.z.void()).optional()}),La=Kn.extend(c.params.shape).required({id:!0}).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:b.z.array(T.params).optional(),footer:b.z.array(T.params).optional()}),bt={params:La,clonable:La.extend(c.clonable.shape).required({id:!0}).extend({onClickClose:b.z.string().optional(),body:b.z.array(T.clonable).optional(),footer:b.z.array(T.clonable).optional()})};var sl=n.z.object({actionTrigger:ce.create,placement:_.optional()}),Ma=n.z.object({actionTrigger:ce.clonable,placement:_.optional()}),ml=ce.create.partial().required({id:!0}),Ga=ce.clonable.partial().required({id:!0}),pl=n.z.object({panel:bt.params,placement:_.optional()}),Ta=n.z.object({panel:bt.clonable,initialPlacement:_.optional()}),cl=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:T.params,container:n.z.union([n.z.literal("body"),n.z.literal("footer"),n.z.object({id:n.z.string()})]).optional(),placement:_.optional()}))}),Pa=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:T.clonable,container:n.z.union([n.z.literal("body"),n.z.literal("footer"),n.z.object({id:n.z.string()})]).optional(),placement:_.optional()}))}),dl=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:Ct.params}))}),za=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:Ct.clonable}))}),ka=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.string())}),Fa=n.z.object({showLegend:n.z.boolean().optional(),cooperativeGestures:n.z.boolean().optional(),fullScreenButton:n.z.boolean().optional(),geolocation:n.z.boolean().optional(),zoomControls:n.z.boolean().optional(),scaleBar:n.z.boolean().optional()}),va=n.z.object({featureSelectPanel:n.z.boolean().optional(),featureHoverPanel:n.z.boolean().optional(),elementSelectPanel:n.z.boolean().optional(),linkClickOpen:n.z.boolean().optional(),imageLightboxOpen:n.z.boolean().optional()});var Wn=e("createActionTrigger",Ma),_n=e("updateActionTrigger",Ga),Qn=e("deleteActionTrigger",Q.z.string()),$n=e("createPanelId",Q.z.void()),Xn=e("createOrUpdatePanel",Ta),Yn=e("deletePanel",Q.z.string()),er=e("createPanelElements",Pa),tr=e("updatePanelElements",za),ar=e("deletePanelElements",ka),or=e("updateUiControls",Fa),nr=e("setOnMapInteractionsUi",va),rr=e("showLayerDataTable",Q.z.object({layerId:Q.z.string(),sorting:ze.optional()}).optional()),ir=e("hideLayerDataTable",Q.z.undefined()),Ra={methods:[Wn,_n,Qn,$n,Xn,Yn,er,tr,ar,or,nr,rr,ir],listeners:null};var Et=require("zod");var Ue=require("zod");var Be=Ue.z.object({center:Te,zoom:Ut}),Ba=Ue.z.object({center:Be.shape.center.optional(),zoom:Be.shape.zoom.optional()}),Oa=Ue.z.object({minZoom:Be.shape.zoom.nullish(),maxZoom:Be.shape.zoom.nullish(),bounds:R.nullish()}).nullable(),wa=Ue.z.object({bounds:R});var lr=e("getViewport",Et.z.undefined()),sr=e("setViewport",Ba),mr=e("getViewportConstraints",Et.z.undefined()),pr=e("setViewportConstraints",Oa),cr=e("fitViewportToBounds",wa),dr=x("onViewportMove"),yr=x("onViewportMoveEnd"),ur=x("onMapIdle"),ja={methods:[sr,lr,mr,pr,cr],listeners:[dr,yr,ur]};var It=[Ra,ja,$t,zt,ta,kt,la,Yt];function gr(a,g,K){let $=new Map;async function N(P){if(!Cr.safeParse(P.data).success){K?.onUnknownMessage?.(P.data);return}let Le=Da.safeParse(P.data);if(!Le.success){K?.onInvalidMessage?.(P.data,Le.error),P.ports[0]?.postMessage(Aa(Le.error.message));return}let{data:E}=Le;if(E.type==="felt.ready")P.ports[0]?.postMessage(!0);else if(E.type==="felt.addListener"){if(E.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let ae="options"in E.event?{options:"options"in E.event?E.event.options:void 0,handler:we=>{P.ports[0]?.postMessage(we)}}:{handler:we=>{P.ports[0]?.postMessage(we)}},Oe=g.listeners[E.event.eventName](ae);$.set(E.event.id,Oe)}else if(E.type==="felt.removeListener")$.get(E.id)?.(),$.delete(E.id);else try{let ae=g.methods[E.type],Oe=await ae(E.params);P.ports[0]?.postMessage(Oe)}catch(ae){P.ports[0]?.postMessage(Aa(ae))}}return a.addEventListener("message",N),()=>{a.removeEventListener("message",N)}}var Va={methods:It.map(a=>a.methods??[]).flat(),listeners:It.map(a=>a.listeners??[]).flat()},hr=y.z.discriminatedUnion("eventName",[y.z.strictObject({eventName:y.z.literal("")}),y.z.strictObject({eventName:y.z.literal("onGenericEvent"),id:y.z.string(),options:y.z.object({id:y.z.string()})}),...Va.listeners]),fr=y.z.strictObject({type:y.z.literal("felt.addListener"),event:hr}),Sr=y.z.strictObject({type:y.z.literal("felt.removeListener"),id:y.z.string()}),xr=y.z.strictObject({type:y.z.literal("felt.ready")}),Da=y.z.discriminatedUnion("type",[xr,fr,Sr,...Va.methods]),Cr=y.z.object({type:y.z.enum(Da.options.map(a=>a.shape.type.value))});function Aa(a){return{__error__:br(a)}}function br(a){return a instanceof Error?a.message:typeof a=="object"&&a!==null&&"message"in a?String(a.message):typeof a=="string"?a:"Unknown error"}0&&(module.exports={createMessageHandler});
1
+ "use strict";var Ve=Object.defineProperty;var Ka=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var _a=Object.prototype.hasOwnProperty;var Qa=(a,h)=>{for(var K in h)Ve(a,K,{get:h[K],enumerable:!0})},$a=(a,h,K,$)=>{if(h&&typeof h=="object"||typeof h=="function")for(let N of Wa(h))!_a.call(a,N)&&N!==K&&Ve(a,N,{get:()=>h[N],enumerable:!($=Ka(h,N))||$.enumerable});return a};var Xa=a=>$a(Ve({},"__esModule",{value:!0}),a);var Gr={};Qa(Gr,{createMessageHandler:()=>Cr});module.exports=Xa(Gr);var y=require("zod");var U=require("zod");var v=require("zod");function e(a,h){return v.z.strictObject({type:v.z.literal(a),params:h})}function z(a,h){return v.z.strictObject({eventName:v.z.literal(a),id:v.z.string(),options:h})}function x(a){return v.z.strictObject({eventName:v.z.literal(a),id:v.z.string()})}var m=require("zod"),Te=m.z.number(),Pe=m.z.number(),ze=m.z.object({latitude:Pe,longitude:Te}),Z=m.z.tuple([Te,Pe]),oe=m.z.object({type:m.z.literal("Polygon"),coordinates:m.z.array(m.z.array(Z).min(4).refine(a=>a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1],"The last point of each ring must be identical to the first"))}),ke=m.z.object({type:m.z.literal("MultiPolygon"),coordinates:m.z.array(oe.shape.coordinates)}),Ya=m.z.object({type:m.z.literal("LineString"),coordinates:m.z.array(Z).min(2)}),ne=m.z.object({type:m.z.literal("MultiLineString"),coordinates:m.z.array(Ya.shape.coordinates)}),Tt=m.z.number().min(1).max(23),R=m.z.tuple([Te,Pe,Te,Pe]),W=m.z.object({show:m.z.array(m.z.string()).optional(),hide:m.z.array(m.z.string()).optional()}),eo=m.z.enum(["asc","desc"]),Fe=m.z.object({attribute:m.z.string(),direction:eo});var t=require("zod");var k=t.z.object({id:t.z.string(),groupId:t.z.string().nullable(),color:t.z.string(),name:t.z.string().nullable(),description:t.z.string().nullable(),attributes:t.z.record(t.z.string(),t.z.unknown()),interaction:t.z.enum(["default","locked"]).optional()}),Be=t.z.object({imageUrl:t.z.string().nullable()}),Ze=t.z.object({strokeOpacity:t.z.number(),strokeWidth:t.z.number(),strokeStyle:t.z.enum(["solid","dashed","dotted"])}),to=t.z.enum(["meter","kilometer","foot","mile"]),ve=k.extend(Be.shape).extend({type:t.z.literal("Place"),coordinates:Z,symbol:t.z.string(),frame:t.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.z.boolean()}),re=k.extend(Be.shape).extend(Ze.shape).extend({type:t.z.literal("Path"),coordinates:ne.shape.coordinates,distanceMarker:t.z.boolean(),routingMode:t.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.z.boolean()}),ie=k.extend(Be.shape).extend(Ze.shape).extend({type:t.z.literal("Polygon"),coordinates:oe.shape.coordinates,fillOpacity:t.z.number().min(0).max(1),areaMarker:t.z.boolean()}),Re=k.extend(Be.shape).extend(Ze.shape).extend({type:t.z.literal("Circle"),center:Z,radius:t.z.number(),radiusMarker:t.z.boolean(),radiusDisplayAngle:t.z.number(),radiusDisplayUnit:to.nullable(),fillOpacity:t.z.number().min(0).max(1)}),le=k.extend({type:t.z.literal("Marker"),coordinates:ne.shape.coordinates,opacity:t.z.number().min(0).max(1),size:t.z.number().min(0).max(100),zoom:t.z.number().min(0).max(23)}),se=k.extend({type:t.z.literal("Highlighter"),coordinates:ke.shape.coordinates,renderHoles:t.z.boolean(),opacity:t.z.number().min(0).max(1)}),Pt=t.z.object({position:Z,rotation:t.z.number(),scale:t.z.number(),zoom:t.z.number().min(0).max(23),text:t.z.string(),align:t.z.enum(["left","center","right"]),style:t.z.enum(["italic","light","regular","caps"]),name:t.z.string()}),De=k.extend(Pt.shape).extend({type:t.z.literal("Text")}),Ne=k.extend(Pt.shape).extend({type:t.z.literal("Note"),widthScale:t.z.number().min(0)}),me=k.extend({type:t.z.literal("Image"),coordinates:ne.shape.coordinates,imageUrl:t.z.string(),opacity:t.z.number().min(0).max(1)}).omit({color:!0}),ao=k.extend({type:t.z.literal("Link"),coordinates:ne.shape.coordinates,url:t.z.string()}),X={type:!0,coordinates:!0},B={id:!0},He=ve.partial().extend(ve.pick(X).shape).omit(B),Oe=re.partial().extend(re.pick(X).shape).omit(B),Je=ie.partial().extend(ie.pick(X).shape).omit(B),qe=Re.partial().extend(Re.pick({type:!0,center:!0,radius:!0}).shape).omit(B),Ke=le.partial().extend(le.pick(X).shape).omit(B),We=se.partial().extend(se.pick(X).shape).omit(B),_e=De.partial().omit({...B,name:!0,type:!0}).extend({type:t.z.literal("Text"),text:t.z.string()}),Qe=Ne.partial().omit({...B,name:!0,type:!0}).extend({type:t.z.literal("Note"),text:t.z.string()}),oo=me.partial().extend(me.pick({...X,imageUrl:!0}).shape).omit(B),zt=t.z.discriminatedUnion("type",[He,Oe,Je,qe,Ke,We,oo,_e,Qe]);var vr=re.omit({coordinates:!0}),Rr=ie.omit({coordinates:!0});var Br=le.omit({coordinates:!0}),Or=se.omit({coordinates:!0});var wr=me.omit({coordinates:!0}),jr=ao.omit({coordinates:!0}),O={type:!0,id:!0},no=ve.partial().extend(ve.pick(O).shape),ro=re.partial().extend(re.pick(O).shape),io=ie.partial().extend(ie.pick(O).shape),lo=Re.partial().extend(Re.pick(O).shape),so=le.partial().extend(le.pick(O).shape),mo=se.partial().extend(se.pick(O).shape),po=De.partial().extend(De.pick(O).shape).omit({name:!0}),co=Ne.partial().extend(Ne.pick(O).shape).omit({name:!0}),yo=me.partial().extend(me.pick(O).shape),kt=t.z.discriminatedUnion("type",[no,ro,io,lo,so,mo,po,co,yo]),Ft=t.z.object({ids:t.z.array(t.z.string()).optional()}),vt=t.z.object({ids:t.z.array(t.z.string()).optional()});var uo=e("getElement",U.z.string()),go=e("getElementGeometry",U.z.string()),ho=e("getElements",Ft.optional()),fo=e("getElementGroup",U.z.string()),So=e("getElementGroups",vt.optional()),xo=e("setElementGroupVisibility",W),Co=z("onElementChange",U.z.object({id:U.z.string()})),bo=x("onElementCreate"),Eo=x("onElementCreateEnd"),Io=z("onElementDelete",U.z.object({id:U.z.string()})),Uo=z("onElementGroupChange",U.z.object({id:U.z.string()})),Lo=e("createElement",zt),Mo=e("updateElement",kt),Go=e("deleteElement",U.z.string()),Rt={methods:[uo,go,ho,fo,So,xo,Lo,Mo,Go],listeners:[Co,bo,Eo,Io,Uo]};var To=x("onPointerClick"),Po=x("onPointerMove"),Bt={methods:null,listeners:[To,Po]};var i=require("zod");var s=require("zod");var zo=s.z.enum(["in","ni"]),ko=s.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Kr=s.z.enum(["and","or"]),Ot=s.z.union([s.z.number(),s.z.string(),s.z.boolean(),s.z.null()]),wt=s.z.string().or(s.z.null()),Fo=s.z.tuple([wt,zo,s.z.array(Ot).or(s.z.null())]),vo=s.z.tuple([wt,ko,Ot]),$e=s.z.union([Fo,vo]),Xe=s.z.tuple([s.z.lazy(()=>s.z.union([Xe,$e,s.z.null(),s.z.boolean()])),s.z.enum(["and","or"]),s.z.lazy(()=>s.z.union([Xe,$e,s.z.null(),s.z.boolean()]))]),w=s.z.union([Xe,$e,s.z.null(),s.z.boolean()]),j=s.z.union([R,oe,ke,s.z.array(Z)]);var o=require("zod");var jt=o.z.enum(["avg","max","min","sum","median"]),At=o.z.enum(["avg","max","min","sum","count"]),Ro=o.z.object({method:jt,attribute:o.z.string()}),Bo=o.z.object({methods:o.z.array(o.z.union([jt,o.z.literal("count")])),attribute:o.z.string().optional()}),Vt=o.z.object({boundary:j.optional(),filters:w.optional(),aggregation:Ro.optional()}),Dt=o.z.object({layerId:o.z.string(),attribute:o.z.string(),limit:o.z.number().optional(),boundary:j.optional(),filters:w.optional(),values:Vt.optional()}),Qr=o.z.object({key:o.z.union([o.z.number(),o.z.string(),o.z.boolean()]),value:o.z.number().nullable()}),Oo=o.z.object({type:o.z.literal("equal-intervals"),count:o.z.number()}),wo=o.z.object({type:o.z.literal("time-interval"),interval:o.z.enum(["hour","day","week","month","year"])}),Nt=o.z.object({layerId:o.z.string(),attribute:o.z.string(),steps:o.z.union([Oo,wo,o.z.array(o.z.number())]),boundary:j.optional(),filters:w.optional(),values:Vt.optional()}),$r=o.z.object({min:o.z.number(),max:o.z.number(),value:o.z.number()}),Zt=o.z.object({layerId:o.z.string(),boundary:j.optional(),filters:w.optional(),aggregation:Bo}),Ht=o.z.enum(["h3"]),jo=o.z.object({type:Ht,resolution:o.z.number(),method:At.extract(["count"])}),Ao=o.z.object({type:Ht,resolution:o.z.number(),method:At.exclude(["count"]),attribute:o.z.string()}),Vo=o.z.union([jo,Ao]),Jt=o.z.object({layerId:o.z.string(),boundary:j.optional(),filters:w.optional(),gridConfig:Vo});var r=require("zod");var ei=r.z.enum(["processing","completed","failed","incomplete"]),qt=r.z.object({type:r.z.literal("geoJsonUrl"),url:r.z.string().url(),refreshInterval:r.z.number().min(250).max(5*60*1e3).nullable().optional()}),Kt=r.z.object({type:r.z.literal("geoJsonData"),data:r.z.object({}).passthrough().or(r.z.instanceof(ArrayBuffer))}),Wt=r.z.object({type:r.z.literal("geoJsonFile"),file:r.z.instanceof(File)}),_t=r.z.object({id:r.z.string(),style:r.z.object({}).passthrough().optional(),shownInLegend:r.z.boolean().optional(),name:r.z.string().optional(),caption:r.z.string().optional(),description:r.z.string().optional(),bounds:R.optional(),source:r.z.union([qt,Kt,Wt]).optional()}),Qt=r.z.object({ids:r.z.array(r.z.string()).optional()}),$t=r.z.object({ids:r.z.array(r.z.string()).optional()}),Y=r.z.object({id:r.z.string(),layerId:r.z.string()}),Xt=r.z.object({ids:Y.array().optional(),layerIds:r.z.string().array().optional()}),Yt=r.z.object({layerIds:r.z.array(r.z.string()).optional(),areaQuery:r.z.union([r.z.object({coordinates:ze}),r.z.object({boundary:R})]).optional()}),Do=r.z.object({Point:r.z.object({}).passthrough().optional(),Line:r.z.object({}).passthrough().optional(),Polygon:r.z.object({}).passthrough().optional()}),ea=r.z.object({source:r.z.union([qt,Kt,Wt]),name:r.z.string(),bounds:R.optional(),caption:r.z.string().optional(),description:r.z.string().optional(),geometryStyles:Do.optional()});var No=e("getLayer",i.z.string()),Zo=e("getLayers",Qt.optional()),Ho=e("setLayerVisibility",W),Jo=z("onLayerChange",i.z.object({id:i.z.string()})),qo=e("setLayerStyle",i.z.object({id:i.z.string(),style:i.z.object({}).passthrough()})),Ko=e("setLayerLegendVisibility",W),Wo=e("createLayersFromGeoJson",ea),_o=e("updateLayer",_t),Qo=e("deleteLayer",i.z.string()),$o=e("getLayerGroup",i.z.string()),Xo=e("getLayerGroups",$t.optional()),Yo=e("setLayerGroupVisibility",W),en=e("setLayerGroupLegendVisibility",W),tn=z("onLayerGroupChange",i.z.object({id:i.z.string()})),an=e("getLegendItem",Y),on=e("getLegendItems",Xt.optional()),nn=z("onLegendItemChange",Y),rn=e("setLegendItemVisibility",i.z.object({show:Y.array().optional(),hide:Y.array().optional()})),ln=e("getLayerFilters",i.z.string()),sn=e("setLayerFilters",i.z.object({layerId:i.z.string(),filters:w,note:i.z.string().optional()})),mn=z("onLayerFiltersChange",i.z.object({layerId:i.z.string()})),pn=e("getLayerBoundaries",i.z.string()),cn=e("setLayerBoundary",i.z.object({layerIds:i.z.array(i.z.string()),boundary:j.nullable()})),dn=z("onLayerBoundariesChange",i.z.object({layerId:i.z.string()})),yn=e("getRenderedFeatures",Yt.optional()),un=e("getFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),gn=e("getFeatures",i.z.object({layerId:i.z.string(),filters:w.optional(),sorting:Fe.optional(),boundary:j.optional(),search:i.z.string().optional(),pagination:i.z.string().optional().nullish()})),hn=e("getGeoJsonFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),fn=e("getCategoryData",Dt),Sn=e("getHistogramData",Nt),xn=e("getAggregates",Zt),Cn=e("getPrecomputedAggregates",Jt),bn=e("getLayerSchema",i.z.string()),ta={methods:[No,Zo,Ho,qo,Ko,Wo,Qo,_o,$o,Xo,Yo,en,an,on,rn,ln,sn,pn,cn,yn,un,gn,hn,fn,Sn,xn,Cn,bn],listeners:[Jo,tn,nn,mn,dn]};var aa=require("zod");var En=e("getMapDetails",aa.z.undefined()),oa={methods:[En],listeners:[]};var pe=require("zod");var A=require("zod"),na=A.z.object({id:A.z.string().or(A.z.number()),layerId:A.z.string(),showPopup:A.z.boolean().optional(),fitViewport:A.z.boolean().or(A.z.object({maxZoom:A.z.number()})).optional()});var In=e("getSelection",pe.z.undefined()),Un=x("onSelectionChange"),Ln=e("selectFeature",na),Mn=e("clearSelection",pe.z.object({features:pe.z.boolean().optional(),elements:pe.z.boolean().optional()}).optional()),ra={methods:[In,Ln,Mn],listeners:[Un]};var pa=require("zod");var f=require("zod");var ia=["circle","highlighter","line","marker","note","pin","polygon","route","text"],Gn=[...ia,"link"],la=f.z.enum(Gn),sa=f.z.enum(ia),V={showInspector:f.z.boolean().optional()},Tn=He.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:f.z.enum(["enter name","add another","select"])}).required(),Pn=Oe.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),zn=Oe.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),kn=Je.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Fn=qe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),vn=Ke.pick({color:!0,opacity:!0,size:!0}).required(),Rn=We.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:f.z.number().min(0).max(200)}).required(),Bn=_e.pick({color:!0,align:!0,style:!0}).required(),On=Qe.pick({color:!0,align:!0,style:!0}).required(),ma=f.z.discriminatedUnion("tool",[Tn.partial().extend({tool:f.z.literal("pin"),...V}),Pn.partial().extend({tool:f.z.literal("line"),...V}),zn.partial().extend({tool:f.z.literal("route"),...V}),kn.partial().extend({tool:f.z.literal("polygon"),...V}),Fn.partial().extend({tool:f.z.literal("circle"),...V}),vn.partial().extend({tool:f.z.literal("marker"),...V}),Rn.partial().extend({tool:f.z.literal("highlighter"),...V}),Bn.partial().extend({tool:f.z.literal("text"),...V}),On.partial().extend({tool:f.z.literal("note"),...V})]);var wn=e("setTool",la.nullable()),jn=e("getTool",pa.z.undefined()),An=x("onToolChange"),Vn=e("setToolSettings",ma),Dn=e("getToolSettings",sa),Nn=x("onToolSettingsChange"),ca={methods:[wn,jn,Vn,Dn],listeners:[An,Nn]};var Q=require("zod");var n=require("zod");var H=require("zod"),_=H.z.union([H.z.object({after:H.z.string()}),H.z.object({before:H.z.string()}),H.z.object({at:H.z.enum(["start","end"])})]);var S=require("zod");var d=require("zod"),Zn=d.z.object({onCreate:d.z.function().args(d.z.object({id:d.z.string()})).returns(d.z.void()).optional(),onDestroy:d.z.function().args(d.z.object({id:d.z.string()})).returns(d.z.void()).optional()}),Hn=d.z.object({onCreate:d.z.string().optional(),onDestroy:d.z.string().optional()}),u=Zn.extend({id:d.z.string()}),da=u.partial({id:!0}),p={params:da,clonable:da.extend(Hn.shape)},C=u.extend({label:d.z.string().optional()}),g={params:C.extend(p.params.shape),clonable:C.extend(p.clonable.shape)};function l(a){return a.partial().extend({id:d.z.string(),type:a.shape.type})}var L=d.z.object({label:d.z.string(),value:d.z.string(),disabled:d.z.boolean().optional()});var Ye=S.z.object({type:S.z.literal("ActionTrigger"),label:S.z.string(),disabled:S.z.boolean().optional()}),ce={read:u.extend(Ye.shape).extend({onTrigger:S.z.function().args(S.z.object({id:S.z.string()})).returns(S.z.void())}),create:p.params.extend(Ye.shape).extend({type:S.z.undefined()}).extend({onTrigger:S.z.function().args(S.z.object({id:S.z.string()})).returns(S.z.void())}),clonable:p.clonable.extend(Ye.shape).extend({type:S.z.undefined()}).extend({onTrigger:S.z.string()})};var ua=require("zod");var et=u.extend({type:ua.z.literal("FlexibleSpace")}),ya=et.partial({id:!0}),de={params:ya,clonable:ya.extend(p.clonable.shape)},tt={params:l(de.params),clonable:l(de.clonable)};var b=require("zod");var te=require("zod");var M=require("zod");var ye=u.extend({type:M.z.literal("Button"),label:M.z.string(),variant:M.z.enum(["filled","transparent","outlined"]).optional(),tint:M.z.enum(["default","primary","accent","danger"]).optional(),disabled:M.z.boolean().optional(),onClick:M.z.function().args(M.z.object({id:M.z.string()})).returns(M.z.void())}),ga=ye.extend(p.params.shape),J={params:ga,clonable:ga.extend(p.clonable.shape).extend({onClick:M.z.string()})},at={params:l(J.params),clonable:l(J.clonable)};var ee=require("zod");var ot=C.extend({type:ee.z.literal("ButtonRow"),align:ee.z.enum(["start","end"]).optional(),items:ee.z.array(ye)}),ha=ot.extend(g.params.shape).omit({items:!0}).extend({items:ee.z.array(J.params)}),Jn=ha.extend(g.clonable.shape).extend({items:ee.z.array(J.clonable)}),ue={params:ha,clonable:Jn},nt={params:l(ue.params),clonable:l(ue.clonable)};var D=require("zod");var fa=D.z.array(L.shape.value),rt=C.extend({type:D.z.literal("CheckboxGroup"),options:D.z.array(L),value:fa,onChange:D.z.function().args(D.z.object({value:fa,id:D.z.string()})).returns(D.z.void())}),Sa=rt.extend(g.params.shape),ge={params:Sa,clonable:Sa.extend(g.clonable.shape).extend({onChange:D.z.string()})},it={params:l(ge.params),clonable:l(ge.clonable)};var Ca=require("zod");var lt=u.extend({type:Ca.z.literal("Divider")}),xa=lt.partial({id:!0}),he={params:xa,clonable:xa.extend(p.clonable.shape)},st={params:l(he.params),clonable:l(he.clonable)};var G=require("zod");var qn=G.z.lazy(()=>G.z.array(Se.refine(a=>a.type!=="Grid"))),Kn=G.z.lazy(()=>G.z.array(T.params.refine(a=>a.type!=="Grid"))),Wn=G.z.lazy(()=>G.z.array(T.clonable.refine(a=>a.type!=="Grid"))),mt=u.extend({type:G.z.literal("Grid"),grid:G.z.string().optional(),verticalAlignment:G.z.enum(["top","center","bottom"]).optional(),horizontalDistribution:G.z.enum(["start","center","end","space-between","space-around","space-evenly"]).optional(),items:qn}),ba=mt.extend(p.params.shape).omit({items:!0}).extend({items:Kn}),_n=ba.extend(p.clonable.shape).extend({items:Wn}),fe={params:ba,clonable:_n},pt={params:l(fe.params),clonable:l(fe.clonable)};var xe=require("zod");var ct=u.extend({type:xe.z.literal("Iframe"),height:xe.z.number().or(xe.z.string()).optional(),url:xe.z.string()}),Ea=ct.extend(p.params.shape),Ce={params:Ea,clonable:Ea.extend(p.clonable.shape)},dt={params:l(Ce.params),clonable:l(Ce.clonable)};var q=require("zod");var Ia=L.shape.value.optional(),yt=C.extend({type:q.z.literal("RadioGroup"),options:q.z.array(L),value:Ia,onChange:q.z.function().args(q.z.object({value:Ia,id:q.z.string()})).returns(q.z.void())}),Ua=yt.extend(g.params.shape),be={params:Ua,clonable:Ua.extend(g.clonable.shape).extend({onChange:q.z.string()})},ut={params:l(be.params),clonable:l(be.clonable)};var I=require("zod");var gt=C.extend({type:I.z.literal("Select"),options:I.z.array(L),value:I.z.string().optional(),placeholder:I.z.string().optional(),search:I.z.boolean().optional(),onChange:I.z.function().args(I.z.object({value:I.z.string(),id:I.z.string()})).returns(I.z.void())}),La=gt.extend(g.params.shape),Ee={params:La,clonable:La.extend(g.clonable.shape).extend({onChange:I.z.string()})},ht={params:l(Ee.params),clonable:l(Ee.clonable)};var ft=require("zod");var St=u.extend({type:ft.z.literal("Text"),content:ft.z.string()}),Ma=St.extend(p.params.shape),Ie={params:Ma,clonable:Ma.extend(p.clonable.shape)},xt={params:l(Ie.params),clonable:l(Ie.clonable)};var c=require("zod");var Ct=C.extend({type:c.z.literal("TextInput"),value:c.z.string(),placeholder:c.z.string().optional(),onChange:c.z.function().args(c.z.object({value:c.z.string(),id:c.z.string()})).returns(c.z.void()).optional(),onBlur:c.z.function().args(c.z.object({value:c.z.string(),id:c.z.string()})).returns(c.z.void()).optional(),onFocus:c.z.function().args(c.z.object({value:c.z.string(),id:c.z.string()})).returns(c.z.void()).optional()}),Ga=Ct.extend(g.params.shape),Ue={params:Ga,clonable:Ga.extend(g.clonable.shape).extend({onChange:c.z.string().optional(),onBlur:c.z.string().optional(),onFocus:c.z.string().optional()})},bt={params:l(Ue.params),clonable:l(Ue.clonable)};var F=require("zod");var Ta=F.z.array(L.shape.value),Et=C.extend({type:F.z.literal("ToggleGroup"),alignment:F.z.enum(["start","end"]).optional(),options:F.z.array(L),value:Ta,onChange:F.z.function().args(F.z.object({value:Ta,id:F.z.string()})).returns(F.z.void())}),Pa=Et.extend(g.params.shape),Le={params:Pa,clonable:Pa.extend(g.clonable.shape).extend({onChange:F.z.string()})},It={params:l(Le.params),clonable:l(Le.clonable)};var Se=te.z.discriminatedUnion("type",[ye,St,lt,Ct,gt,et,ot,rt,yt,Et,ct,mt]),Qn=te.z.discriminatedUnion("type",[J.params,Ie.params,he.params,Ue.params,Ee.params,de.params,ue.params,ge.params,be.params,Le.params,Ce.params,fe.params]),$n=te.z.discriminatedUnion("type",[J.clonable,Ie.clonable,he.clonable,Ue.clonable,Ee.clonable,de.clonable,ue.clonable,ge.clonable,be.clonable,Le.clonable,Ce.clonable,fe.clonable]),T={params:Qn,clonable:$n},Ut={params:te.z.discriminatedUnion("type",[at.params,xt.params,bt.params,ht.params,st.params,tt.params,nt.params,it.params,ut.params,It.params,dt.params,pt.params]),clonable:te.z.discriminatedUnion("type",[at.clonable,xt.clonable,bt.clonable,ht.clonable,st.clonable,tt.clonable,nt.clonable,it.clonable,ut.clonable,It.clonable,dt.clonable,pt.clonable])};var Xn=u.extend({type:b.z.literal("Panel"),title:b.z.string().optional(),body:b.z.array(Se).optional(),footer:b.z.array(Se).optional(),onClickClose:b.z.function().args(b.z.object({id:b.z.string()})).returns(b.z.void()).optional()}),za=Xn.extend(p.params.shape).required({id:!0}).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:b.z.array(T.params).optional(),footer:b.z.array(T.params).optional()}),Lt={params:za,clonable:za.extend(p.clonable.shape).required({id:!0}).extend({onClickClose:b.z.string().optional(),body:b.z.array(T.clonable).optional(),footer:b.z.array(T.clonable).optional()})};var hl=n.z.object({actionTrigger:ce.create,placement:_.optional()}),ka=n.z.object({actionTrigger:ce.clonable,placement:_.optional()}),fl=ce.create.partial().required({id:!0}),Fa=ce.clonable.partial().required({id:!0}),Sl=n.z.object({panel:Lt.params,placement:_.optional()}),va=n.z.object({panel:Lt.clonable,initialPlacement:_.optional()}),xl=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:T.params,container:n.z.union([n.z.literal("body"),n.z.literal("footer"),n.z.object({id:n.z.string()})]).optional(),placement:_.optional()}))}),Ra=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:T.clonable,container:n.z.union([n.z.literal("body"),n.z.literal("footer"),n.z.object({id:n.z.string()})]).optional(),placement:_.optional()}))}),Cl=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:Ut.params}))}),Ba=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.object({element:Ut.clonable}))}),Oa=n.z.object({panelId:n.z.string(),elements:n.z.array(n.z.string())}),wa=n.z.object({showLegend:n.z.boolean().optional(),cooperativeGestures:n.z.boolean().optional(),fullScreenButton:n.z.boolean().optional(),geolocation:n.z.boolean().optional(),zoomControls:n.z.boolean().optional(),scaleBar:n.z.boolean().optional()}),ja=n.z.object({featureSelectPanel:n.z.boolean().optional(),featureHoverPanel:n.z.boolean().optional(),elementSelectPanel:n.z.boolean().optional(),linkClickOpen:n.z.boolean().optional(),imageLightboxOpen:n.z.boolean().optional()});var Yn=e("createActionTrigger",ka),er=e("updateActionTrigger",Fa),tr=e("deleteActionTrigger",Q.z.string()),ar=e("createPanelId",Q.z.void()),or=e("createOrUpdatePanel",va),nr=e("deletePanel",Q.z.string()),rr=e("createPanelElements",Ra),ir=e("updatePanelElements",Ba),lr=e("deletePanelElements",Oa),sr=e("updateUiControls",wa),mr=e("setOnMapInteractionsUi",ja),pr=e("showLayerDataTable",Q.z.object({layerId:Q.z.string(),sorting:Fe.optional()}).optional()),cr=e("hideLayerDataTable",Q.z.undefined()),Aa={methods:[Yn,er,tr,ar,or,nr,rr,ir,lr,sr,mr,pr,cr],listeners:null};var Mt=require("zod");var Me=require("zod");var we=Me.z.object({center:ze,zoom:Tt}),Va=Me.z.object({center:we.shape.center.optional(),zoom:we.shape.zoom.optional()}),Da=Me.z.object({minZoom:we.shape.zoom.nullish(),maxZoom:we.shape.zoom.nullish(),bounds:R.nullish()}).nullable(),Na=Me.z.object({bounds:R});var dr=e("getViewport",Mt.z.undefined()),yr=e("setViewport",Va),ur=e("getViewportConstraints",Mt.z.undefined()),gr=e("setViewportConstraints",Da),hr=e("fitViewportToBounds",Na),fr=x("onViewportMove"),Sr=x("onViewportMoveEnd"),xr=x("onMapIdle"),Za={methods:[yr,dr,ur,gr,hr],listeners:[fr,Sr,xr]};var Gt=[Aa,Za,ta,Rt,ra,Bt,ca,oa];function Cr(a,h,K){let $=new Map;async function N(P){if(!Lr.safeParse(P.data).success){K?.onUnknownMessage?.(P.data);return}let Ge=qa.safeParse(P.data);if(!Ge.success){K?.onInvalidMessage?.(P.data,Ge.error),P.ports[0]?.postMessage(Ha(Ge.error.message));return}let{data:E}=Ge;if(E.type==="felt.ready")P.ports[0]?.postMessage(!0);else if(E.type==="felt.addListener"){if(E.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let ae="options"in E.event?{options:"options"in E.event?E.event.options:void 0,handler:Ae=>{P.ports[0]?.postMessage(Ae)}}:{handler:Ae=>{P.ports[0]?.postMessage(Ae)}},je=h.listeners[E.event.eventName](ae);$.set(E.event.id,je)}else if(E.type==="felt.removeListener")$.get(E.id)?.(),$.delete(E.id);else try{let ae=h.methods[E.type],je=await ae(E.params);P.ports[0]?.postMessage(je)}catch(ae){P.ports[0]?.postMessage(Ha(ae))}}return a.addEventListener("message",N),()=>{a.removeEventListener("message",N)}}var Ja={methods:Gt.map(a=>a.methods??[]).flat(),listeners:Gt.map(a=>a.listeners??[]).flat()},br=y.z.discriminatedUnion("eventName",[y.z.strictObject({eventName:y.z.literal("")}),y.z.strictObject({eventName:y.z.literal("onGenericEvent"),id:y.z.string(),options:y.z.object({id:y.z.string()})}),...Ja.listeners]),Er=y.z.strictObject({type:y.z.literal("felt.addListener"),event:br}),Ir=y.z.strictObject({type:y.z.literal("felt.removeListener"),id:y.z.string()}),Ur=y.z.strictObject({type:y.z.literal("felt.ready")}),qa=y.z.discriminatedUnion("type",[Ur,Er,Ir,...Ja.methods]),Lr=y.z.object({type:y.z.enum(qa.options.map(a=>a.shape.type.value))});function Ha(a){return{__error__:Mr(a)}}function Mr(a){return a instanceof Error?a.message:typeof a=="object"&&a!==null&&"message"in a?String(a.message):typeof a=="string"?a:"Unknown error"}0&&(module.exports={createMessageHandler});