{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/wmts/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 14:54:09\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\wmts\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { AnyObject, VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject, VcRectangle } from 'casc-cesium-utils/types'\nimport { useProviders } from 'casc-cesium-composables'\nimport {\n  url,\n  format,\n  clock,\n  times,\n  tileWidth,\n  tileHeight,\n  tilingScheme,\n  rectangle,\n  minimumLevel,\n  maximumLevel,\n  ellipsoid,\n  credit,\n  subdomains\n} from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { providerEmits } from 'casc-cesium-utils/emits'\n\nexport const wmtsImageryProviderProps = {\n  ...url,\n  ...format,\n  layer: {\n    type: String,\n    required: true\n  },\n  wmtsStyle: {\n    type: String,\n    required: true\n  },\n  tileMatrixSetID: {\n    type: String,\n    required: true\n  },\n  tileMatrixLabels: Array,\n  ...clock,\n  ...times,\n  dimensions: Object,\n  ...tileWidth,\n  ...tileHeight,\n  ...tilingScheme,\n  ...rectangle,\n  ...minimumLevel,\n  ...maximumLevel,\n  ...ellipsoid,\n  ...credit,\n  ...subdomains\n}\nexport default defineComponent({\n  name: 'VcImageryProviderWmts',\n  props: wmtsImageryProviderProps,\n  emits: providerEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'WebMapTileServiceImageryProvider'\n    useProviders(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcImageryProviderWmtsProps = {\n  /**\n   * The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.\n   */\n  url: string | Cesium.Resource\n  /**\n   * The MIME type for images to retrieve from the server.\n   * Default value: 'image/jpeg'\n   */\n  format?: string\n  /**\n   * The layer name for WMTS requests.\n   */\n  layer: string\n  /**\n   * The style name for WMTS requests.\n   */\n  wmtsStyle: string\n  /**\n   * The identifier of the TileMatrixSet to use for WMTS requests.\n   */\n  tileMatrixSetID: string\n  /**\n   * A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.\n   */\n  tileMatrixLabels: Array<any>\n  /**\n   * A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.\n   */\n  clock?: Cesium.Clock\n  /**\n   * TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.\n   */\n  times?: Cesium.TimeIntervalCollection\n  /**\n   * A object containing static dimensions and their values.\n   */\n  dimensions?: AnyObject\n  /**\n   * The tile width in pixels.\n   * Default value: 256\n   */\n  tileWidth?: number\n  /**\n   * The tile height in pixels.\n   * Default value: 256\n   */\n  tileHeight?: number\n  /**\n   * The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.\n   */\n  tilingScheme?: Cesium.GeographicTilingScheme | Cesium.WebMercatorTilingScheme\n  /**\n   * The rectangle covered by the layer.\n   */\n  rectangle?: VcRectangle\n  /**\n   * The minimum level-of-detail supported by the imagery provider.\n   */\n  minimumLevel?: number\n  /**\n   * The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.\n   */\n  maximumLevel?: number\n  /**\n   * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * A credit for the data source, which is displayed on the canvas.\n   */\n  credit?: Cesium.Credit | string\n  /**\n   * The subdomains to use for the {s} placeholder in the URL template. If this parameter is a single string, each character in the string is a subdomain. If it is an array, each element in the array is a subdomain.\n   */\n  subdomains?: string | string[]\n  /**\n   * Triggers before the VcImageryProviderWmts is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcImageryProviderWmts is successfully loaded.\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component load failed.\n   */\n  onUnready?: (e: any) => void\n  /**\n   * Triggers when the VcImageryProviderWmts is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the imagery provider encounters an asynchronous error.\n   */\n  onErrorEvent?: (evt: Cesium.TileProviderError) => void\n  /**\n   * Triggers when the provider is ready for use.\n   */\n  onReadyPromise?: (evt: boolean, viewer: Cesium.Viewer, instance: VcComponentPublicInstance) => void\n}\n\nexport type VcImageryProviderWmtsRef = VcComponentPublicInstance<VcImageryProviderWmtsProps>\n"],"names":[],"mappings":";;;;;;;AAmBY,MAAC,wBAAwB,GAAG;AACxC,EAAE,GAAG,GAAG;AACR,EAAE,GAAG,MAAM;AACX,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,gBAAgB,EAAE,KAAK;AACzB,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,KAAK;AACV,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,UA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