{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/google-earth/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 13:41:28\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\google-earth\\index.ts\n */\nimport type { PropType } from 'vue'\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport { useProviders } from '@vue-cesium/composables'\nimport { url, ellipsoid, tileDiscardPolicy, credit } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { providerEmits } from '@vue-cesium/utils/emits'\n\nexport const googleImageryProviderProps = {\n  ...url,\n  ...ellipsoid,\n  ...tileDiscardPolicy,\n  ...credit,\n  metadata: Object as PropType<Cesium.GoogleEarthEnterpriseMetadata>\n}\nexport default defineComponent({\n  name: 'VcImageryProviderGoogle',\n  props: googleImageryProviderProps,\n  emits: providerEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'GoogleEarthEnterpriseImageryProvider'\n    useProviders(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcImageryProviderGoogleProps = {\n  /**\n   * The url of the Google Earth Enterprise server hosting the imagery.\n   */\n  url: string | Cesium.Resource\n  /**\n   * A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.\n   */\n  metadata: string\n  /**\n   * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * The policy that determines if a tile is invalid and should be discarded. If this value is not specified, a default is to discard tiles that fail to download.\n   */\n  tileDiscardPolicy?: Cesium.DiscardMissingTileImagePolicy | Cesium.NeverTileDiscardPolicy\n  /**\n   * A credit for the data source, which is displayed on the canvas.\n   */\n  credit?: Cesium.Credit | string\n  /**\n   * Triggers before the VcImageryProviderGoogle is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcImageryProviderGoogle 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 VcImageryProviderGoogle 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 VcImageryProviderGoogleRef = VcComponentPublicInstance<VcImageryProviderGoogleProps>\n"],"names":[],"mappings":";;;;;;;;AAgBO,MAAM,0BAA6B,GAAA;AAAA,EACxC,GAAG,GAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,QAAU,EAAA,MAAA;AACZ,EAAA;AACA,4BAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,yBAAA;AAAA,EACN,KAAO,EAAA,0BAAA;AAAA,EACP,KAAO,EAAA,aAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,sCAAA,CAAA;AACvB,IAAa,YAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AACjC,IAAA,OAAO,MAAG;AAhCd,MAAA,IAAA,EAAA,CAAA;AAgCiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}