@itwin/core-frontend 5.3.0-dev.24 → 5.3.0-dev.26

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.
@@ -560,7 +560,7 @@ class IModelApp {
560
560
  static makeIModelJsLogoCard() {
561
561
  return this.makeLogoCard({
562
562
  iconSrc: `${this.publicPath}images/about-imodeljs.svg`,
563
- heading: `<span style="font-weight:normal">${this.localization.getLocalizedString("iModelJs:Notices.PoweredBy")}</span>&nbsp;iTwin.js`,
563
+ heading: `<span class="itwinjs-header-lead">${this.localization.getLocalizedString("iModelJs:Notices.PoweredBy")}</span>&nbsp;iTwin.js`,
564
564
  notice: `${exports.ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,
565
565
  });
566
566
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4HAA4H;AAC5H,wDAAwD;AACxD,sEAA6C;AAC7C,cAAc;AACD,QAAA,oBAAoB,GAAG,sBAAW,CAAC,OAAiB,CAAC;AAClE,MAAM,gBAAgB,GAAG,oBAAoB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,wGAAwG,CAAC;AAE9K,0DAAgD;AAChD,sDAAiL;AACjL,oDAAuK;AACvK,gDAAqD;AAErD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,+DAA4D;AAC5D,uEAAyD;AACzD,qEAAuD;AACvD,iEAA8D;AAC9D,+CAA0D;AAE1D,4EAAyE;AACzE,oEAAsD;AACtD,yDAA2C;AAC3C,+DAA4D;AAC5D,+EAAiI;AACjI,wDAAqD;AACrD,2DAAwD;AACxD,6DAA+C;AAC/C,qEAAuD;AACvD,qDAAkD;AAClD,2DAAwE;AACxE,8CAA8G;AAC9G,mEA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GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,oBAAoB;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,+CAA2B,EAAE,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,qBAAqB;QAClC,MAAM,cAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;QAC5C,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC;;AAjmBH,8BAkmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelApp\n */\n\n// @ts-expect-error package.json will resolve from the lib/{cjs,esm} dir without copying it into the build output we deliver\n// eslint-disable-next-line @itwin/import-within-package\nimport packageJson from \"../../package.json\";\n/** @public */\nexport const ITWINJS_CORE_VERSION = packageJson.version as string;\nconst COPYRIGHT_NOTICE = `Copyright © 2017-${new Date().getFullYear()} <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>`;\n\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, expectDefined, Guid, GuidString, IModelStatus, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity } from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { FormatsProvider } from \"@itwin/core-quantity\";\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\nimport { AccuDraw } from \"./AccuDraw\";\nimport { AccuSnap } from \"./AccuSnap\";\nimport * as auxCoordState from \"./AuxCoordSys\";\nimport * as categorySelectorState from \"./CategorySelectorState\";\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\nimport * as displayStyleState from \"./DisplayStyleState\";\nimport * as drawingViewState from \"./DrawingViewState\";\nimport { ElementLocateManager } from \"./ElementLocateManager\";\nimport { ElementState, EntityState } from \"./EntityState\";\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport * as modelselector from \"./ModelSelectorState\";\nimport * as modelState from \"./ModelState\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { FormatsProviderManager, QuantityFormatter, QuantityTypeFormatsProvider } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./internal/render/webgl/System\";\nimport * as sheetState from \"./SheetViewState\";\nimport * as spatialViewState from \"./SpatialViewState\";\nimport { TentativePoint } from \"./TentativePoint\";\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\nimport * as clipViewTool from \"./tools/ClipViewTool\";\nimport * as idleTool from \"./tools/IdleTool\";\nimport * as measureTool from \"./tools/MeasureTool\";\nimport * as selectTool from \"./tools/SelectTool\";\nimport { ToolRegistry } from \"./tools/Tool\";\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\nimport * as viewTool from \"./tools/ViewTool\";\nimport { UserPreferencesAccess } from \"./UserPreferences\";\nimport { ViewManager } from \"./ViewManager\";\nimport * as viewState from \"./ViewState\";\nimport \"./IModeljs-css\";\n\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\n\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\n * @public\n * @extensions\n */\nexport interface FrontendSecurityOptions {\n /** Configures protection from Cross Site Request Forgery attacks. */\n readonly csrfProtection?: {\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\n readonly enabled: boolean;\n /** Defaults to XSRF-TOKEN. */\n readonly cookieName?: string;\n /** Defaults to X-XSRF-TOKEN. */\n readonly headerName?: string;\n };\n}\n\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\n * @public\n */\nexport interface IModelAppOptions {\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\n hubAccess?: FrontendHubAccess;\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\n applicationId?: string;\n /** If present, supplies the version of this application. Must be set for usage logging. */\n applicationVersion?: string;\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\n * @beta\n */\n userPreferences?: UserPreferencesAccess;\n /** If present, supplies the [[ViewManager]] for this session. */\n viewManager?: ViewManager;\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\n * @beta\n */\n mapLayerOptions?: MapLayerOptions;\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\n tileAdmin?: TileAdmin.Props;\n /** If present, supplies the [[NotificationManager]] for this session. */\n notifications?: NotificationManager;\n /** If present, supplies the [[ToolAdmin]] for this session. */\n toolAdmin?: ToolAdmin;\n /** If present, supplies the [[AccuDraw]] for this session. */\n accuDraw?: AccuDraw;\n /** If present, supplies the [[AccuSnap]] for this session. */\n accuSnap?: AccuSnap;\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\n localization?: Localization;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n /** If present, supplies security options for the frontend. */\n security?: FrontendSecurityOptions;\n /** @internal */\n sessionId?: GuidString;\n /** @internal */\n locateManager?: ElementLocateManager;\n /** If present, supplies the [[TentativePoint]] for this session. */\n tentativePoint?: TentativePoint;\n /** @internal */\n quantityFormatter?: QuantityFormatter;\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\n renderSys?: RenderSystem | RenderSystem.Options;\n /** If present, supplies the [[UiAdmin]] for this session. */\n uiAdmin?: UiAdmin;\n /** If present, supplies the [[FormatsProvider]] for this session. */\n formatsProvider?: FormatsProvider;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n\n /**\n * @deprecated in 3.7 - might be removed in next major version. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\n */\n rpcInterfaces?: RpcInterfaceDefinition[];\n\n /** @beta */\n realityDataAccess?: RealityDataAccess;\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n publicPath?: string;\n}\n\n/** Options for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalOptions {\n /** Width for the Modal dialog box. */\n width?: number;\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\n autoClose?: boolean;\n /** Show an 'x' in the upper right corner to close the dialog */\n closeBox?: boolean;\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\n rootDiv?: HTMLElement;\n}\n\n/** Return type for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalReturn {\n /** The modal HTMLDivElement created. */\n modal: HTMLDivElement;\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if [[ModalOptions.autoClose]] or [[IModalOptions.closeBox]]\n * were not enabled for the dialog.\n */\n stop: (_ev: Event) => void;\n}\n\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\n * It's removed in IModelApp.shutdown.\n */\ninterface IModelAppForDebugger {\n iModelAppForDebugger?: typeof IModelApp;\n}\n\n/**\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\n *\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\n *\n * @public\n */\nexport class IModelApp {\n private static _initialized = false;\n private static _accuDraw: AccuDraw;\n private static _accuSnap: AccuSnap;\n private static _applicationId: string;\n private static _applicationVersion: string;\n private static _localization: Localization;\n private static _locateManager: ElementLocateManager;\n private static _notifications: NotificationManager;\n private static _quantityFormatter: QuantityFormatter;\n private static _renderSystem?: RenderSystem;\n private static _userPreferences?: UserPreferencesAccess;\n private static _tentativePoint: TentativePoint;\n private static _tileAdmin: TileAdmin;\n private static _toolAdmin: ToolAdmin;\n private static _viewManager: ViewManager;\n private static _uiAdmin: UiAdmin;\n private static _noRender: boolean;\n private static _wantEventLoop = false;\n private static _animationRequested = false;\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\n private static _animationIntervalId?: number;\n private static _securityOptions: FrontendSecurityOptions;\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\n private static _terrainProviderRegistry: TerrainProviderRegistry;\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\n private static _hubAccess?: FrontendHubAccess;\n private static _realityDataAccess?: RealityDataAccess;\n private static _publicPath: string;\n private static _formatsProviderManager: FormatsProviderManager;\n\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\n protected constructor() { }\n\n /** Event raised just before the frontend IModelApp is to be [[shutdown]]. */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** Event raised after IModelApp [[startup]] completes. */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n /** The [[ToolRegistry]] for this session. */\n public static readonly tools = new ToolRegistry();\n /** A uniqueId for this session */\n public static sessionId: GuidString;\n /** The [[MapLayerFormatRegistry]] for this session. */\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\n /** The [[TerrainProviderRegistry]] for this session. */\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\n /** The [[RealityDataSourceProviderRegistry]] for this session.\n * @beta\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return expectDefined(this._renderSystem); }\n /** The [[ViewManager]] for this session. */\n public static get viewManager(): ViewManager { return this._viewManager; }\n /** The [[NotificationManager]] for this session. */\n public static get notifications(): NotificationManager { return this._notifications; }\n /** The [[TileAdmin]] for this session. */\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\n /** The [[QuantityFormatter]] for this session. */\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\n /** The [[ToolAdmin]] for this session. */\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\n /** The [[AccuDraw]] for this session. */\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\n /** The [[AccuSnap]] for this session. */\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\n /** The [[TentativePoint]] for this session]]. */\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\n /** The [[Localization]] for this session. */\n public static get localization(): Localization { return this._localization; }\n /** The [[UserPreferencesAccess]] for this session.\n * @beta\n */\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\n public static get applicationId(): string { return this._applicationId; }\n /** The version of this application. Must be set for usage logging. */\n public static get applicationVersion(): string { return this._applicationVersion; }\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\n public static get initialized() { return this._initialized; }\n\n /** Provides access to IModelHub services. */\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the RealityData service implementation for this IModelApp\n * @beta\n */\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\n\n /** Whether the [renderSystem[]] has been successfully initialized.\n * This will always be `false` before calling [[startup]] and after calling [[shutdown]].\n * In rare circumstances (e.g., while executing in a headless test environment) it may remain `false` due to a failure to\n * obtain a [WebGL rendering context](https://www.google.com/search?channel=fs&client=ubuntu-sn&q=mdn+webglrenderingcontext).\n * As long as you have called [[startup]], you can generally assume it to be `true`.\n */\n public static get hasRenderSystem() {\n return this._renderSystem !== undefined && this._renderSystem.isValid;\n }\n\n /** The [[UiAdmin]] for this session. */\n public static get uiAdmin() { return this._uiAdmin; }\n /** The requested security options for the frontend. */\n public static get securityOptions() { return this._securityOptions; }\n\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n public static get publicPath() { return this._publicPath; }\n\n /** The [[FormatsProvider]] for this session.\n * @param provider The provider to use for formatting quantities.\n * @beta\n */\n public static get formatsProvider(): FormatsProvider { return this._formatsProviderManager; }\n public static set formatsProvider(provider: FormatsProvider) {\n this._formatsProviderManager.formatsProvider = provider;\n }\n\n /** @alpha */\n public static readonly extensionAdmin = this._createExtensionAdmin();\n\n /** Map of classFullName to EntityState class */\n private static _entityClasses = new Map<string, typeof EntityState>();\n\n /** Register all of the subclasses of EntityState from a module.\n * @internal\n */\n public static registerModuleEntities(moduleObj: any) {\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\n const thisEntityState = moduleObj[thisMember];\n if (thisEntityState.prototype instanceof EntityState) {\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\n }\n }\n }\n\n /** Register an EntityState class by its classFullName\n * @internal\n */\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\n const lowerName = classFullName.toLowerCase();\n if (this._entityClasses.has(lowerName)) {\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\n throw new Error(errMsg);\n }\n\n this._entityClasses.set(lowerName, classType);\n }\n\n /** @internal */\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\n\n /**\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\n * and/or performance.\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\n */\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\n return queryRenderCompatibility(true, (canvas, useWebGL2, inputContextAttributes) => System.createContext(canvas, useWebGL2, inputContextAttributes));\n }\n\n /**\n * This method must be called before any other `@itwin/core-frontend` methods are used.\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\n * ``` ts\n * await IModelApp.startup( {applicationId: myAppId} );\n * ```\n * @param opts The options for configuring IModelApp\n */\n public static async startup(opts?: IModelAppOptions): Promise<void> {\n if (this._initialized)\n return; // we're already initialized, do nothing.\n this._initialized = true;\n\n opts = opts ?? {};\n this._securityOptions = opts.security ?? {};\n\n if (process.env.NODE_ENV === \"development\") {\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\n }\n\n this.sessionId = opts.sessionId ?? Guid.createValue();\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\n this.authorizationClient = opts.authorizationClient;\n this._hubAccess = opts.hubAccess;\n this._noRender = opts.noRender ?? false;\n\n this._setupRpcRequestContext();\n\n this._localization = opts.localization ?? new ITwinLocalization();\n const toolsNs = \"CoreTools\";\n await this.localization.initialize([\"iModelJs\", toolsNs]);\n [\n selectTool,\n idleTool,\n viewTool,\n clipViewTool,\n measureTool,\n accudrawTool,\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\n\n this.registerEntityState(EntityState.classFullName, EntityState);\n this.registerEntityState(ElementState.classFullName, ElementState);\n [\n modelState,\n sheetState,\n viewState,\n drawingViewState,\n spatialViewState,\n displayStyleState,\n modelselector,\n categorySelectorState,\n auxCoordState,\n ].forEach((module) => this.registerModuleEntities(module));\n\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\n if (opts.userPreferences)\n this._userPreferences = opts.userPreferences;\n this._viewManager = opts.viewManager ?? new ViewManager();\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\n this._notifications = opts.notifications ?? new NotificationManager();\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\n this._terrainProviderRegistry = new TerrainProviderRegistry();\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\n this._realityDataAccess = opts.realityDataAccess;\n this._formatsProviderManager = new FormatsProviderManager(opts.formatsProvider ?? new QuantityTypeFormatsProvider());\n\n this._publicPath = opts.publicPath ?? \"\";\n if (this._publicPath !== \"\" && !this._publicPath.endsWith(\"/\")) {\n this._publicPath += \"/\";\n }\n\n [\n this.renderSystem,\n this.viewManager,\n this.toolAdmin,\n this.accuDraw,\n this.accuSnap,\n this.locateManager,\n this.tentativePoint,\n this.uiAdmin,\n ].forEach((sys) => sys.onInitialized());\n\n await this.quantityFormatter.onInitialized();\n this.onAfterStartup.raiseEvent();\n }\n\n /** Must be called before the application exits to release any held resources. */\n public static async shutdown() {\n if (!this._initialized)\n return;\n\n // notify listeners that this IModelApp is about to be shut down.\n this.onBeforeShutdown.raiseEvent();\n this.onBeforeShutdown.clear();\n\n if (process.env.NODE_ENV === \"development\") {\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\n }\n\n this._wantEventLoop = false;\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n this.clearIntervalAnimation();\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\n this.tools.shutdown();\n this._renderSystem = dispose(this._renderSystem);\n this._entityClasses.clear();\n this.authorizationClient = undefined;\n this._initialized = false;\n this.quantityFormatter[Symbol.dispose]();\n this.resetFormatsProvider();\n this.onAfterStartup.clear();\n }\n\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\n * @beta\n */\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\n public static set animationInterval(interval: BeDuration | undefined) {\n if (undefined !== interval && interval.isTowardsPast)\n interval = undefined;\n\n if (interval !== IModelApp._animationInterval) {\n IModelApp._animationInterval = interval;\n if (IModelApp._wantEventLoop)\n IModelApp.requestIntervalAnimation();\n }\n }\n\n /** Request that the event loop execute on the next [animation frame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n * There is generally no reason for applications to invoke this method directly.\n */\n public static requestNextAnimation() {\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\n if (IModelApp._noRender)\n return;\n\n if (!IModelApp._animationRequested) {\n IModelApp._animationRequested = true;\n requestAnimationFrame(() => IModelApp.eventLoop());\n }\n }\n\n /** @internal */\n private static clearIntervalAnimation(): void {\n if (undefined !== IModelApp._animationIntervalId) {\n window.clearInterval(IModelApp._animationIntervalId);\n IModelApp._animationIntervalId = undefined;\n }\n }\n\n /** @internal */\n private static requestIntervalAnimation(): void {\n IModelApp.clearIntervalAnimation();\n\n if (undefined !== IModelApp.animationInterval)\n IModelApp._animationIntervalId = window.setInterval(() => {\n IModelApp.requestNextAnimation();\n }, IModelApp.animationInterval.milliseconds);\n }\n\n /** Return true if the main event processing loop has been started.\n * @internal\n */\n public static get isEventLoopStarted() { return IModelApp._wantEventLoop; }\n\n /** @internal */\n public static startEventLoop() {\n if (!IModelApp._wantEventLoop) {\n IModelApp._wantEventLoop = true;\n window.addEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n IModelApp.requestIntervalAnimation();\n IModelApp.requestNextAnimation();\n }\n }\n\n /** Strictly for tests. @internal */\n public static stopEventLoop() {\n this._wantEventLoop = false;\n }\n\n /** The main event processing loop for Tools and rendering. */\n private static eventLoop() {\n IModelApp._animationRequested = false;\n if (!IModelApp._wantEventLoop) // flag turned on at startup\n return;\n\n try {\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\n IModelApp.viewManager.renderLoop();\n IModelApp.tileAdmin.process();\n } catch (exception) {\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\n\n IModelApp._wantEventLoop = false;\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n }\n }\n\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n /** @internal */\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\n\n private static _setupRpcRequestContext() {\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\n return Guid.createValue();\n };\n\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\n const id = _request.id;\n const serialized: SerializedRpcActivity = {\n id,\n applicationId: this.applicationId,\n applicationVersion: this.applicationVersion,\n sessionId: this.sessionId,\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\n };\n\n const csrf = IModelApp.securityOptions.csrfProtection;\n if (csrf && csrf.enabled) {\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\n\n if (cookieValue) {\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\n const headerValue = cookieValue.split(\"=\")[1];\n serialized.csrfToken = { headerName, headerValue };\n }\n }\n\n return serialized;\n };\n }\n\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText. */\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\n /** The parent for the new HTMLElement */\n parent?: HTMLElement;\n /** The className for the new HTMLElement */\n className?: string;\n /** The Id for the new HTMLElement */\n id?: string;\n /** innerHTML for the new HTMLElement */\n innerHTML?: string;\n /** innerText for the new HTMLElement */\n innerText?: string;\n }) {\n const el = document.createElement(type);\n if (undefined !== opt) {\n if (undefined !== opt.className)\n el.className = opt.className;\n if (undefined !== opt.id)\n el.id = opt.id;\n if (undefined !== opt.innerHTML)\n el.innerHTML = opt.innerHTML;\n if (undefined !== opt.innerText)\n el.innerText = opt.innerText;\n if (undefined !== opt.parent)\n opt.parent.appendChild(el);\n }\n return el;\n }\n\n /** Shortcut for making a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\n * @param options The options that describe how the modal should work.\n */\n public static makeModalDiv(options: ModalOptions): ModalReturn {\n const root = options.rootDiv ? options.rootDiv : document.body;\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\n overlay.tabIndex = -1; // so we can catch keystroke events\n\n // function to remove modal dialog\n const stop = (ev: Event) => {\n root.removeChild(overlay);\n ev.stopPropagation();\n };\n\n if (options.autoClose) {\n overlay.onclick = overlay.oncontextmenu = stop;\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\n switch (ev.key) {\n case \"Enter\":\n case \"Escape\":\n stop(ev);\n return;\n }\n ev.stopPropagation();\n };\n overlay.focus();\n }\n\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\n if (undefined !== options.width) {\n modal.style.width = `${options.width}px`;\n // allow the dialog to be smaller than the width\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\n }\n if (options.closeBox) {\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\n close.onclick = stop;\n }\n\n return { modal, stop };\n }\n\n /** Applications may implement this method to supply a Logo Card.\n * @beta\n */\n public static applicationLogoCard?: () => HTMLTableRowElement;\n\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\n * @param opts Options for Logo Card\n * @beta\n */\n public static makeLogoCard(\n opts: {\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\n heading: string | HTMLElement;\n /** The URL or HTMLImageElement for the icon on this logo card. */\n iconSrc?: string | HTMLImageElement;\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\n iconWidth?: number;\n /** A *notice* string to be shown on the logo card. May include HTML. */\n notice?: string | HTMLElement;\n }): HTMLTableRowElement {\n const card = IModelApp.makeHTMLElement(\"tr\");\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\n if (undefined !== opts.iconSrc) {\n if (typeof opts.iconSrc === \"string\") {\n const logo = IModelApp.makeHTMLElement(\"img\");\n logo.src = opts.iconSrc;\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\n opts.iconSrc = logo;\n }\n iconCell.appendChild(opts.iconSrc);\n }\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\n if (undefined !== opts.heading) {\n if (typeof opts.heading === \"string\")\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\n else\n noticeCell.appendChild(opts.heading);\n }\n if (undefined !== opts.notice) {\n if (typeof opts.notice === \"string\")\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\n else\n noticeCell.appendChild(opts.notice);\n }\n return card;\n }\n\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\n * @internal\n */\n public static makeIModelJsLogoCard() {\n return this.makeLogoCard({\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\n });\n }\n\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\n * @alpha\n */\n public static formatElementToolTip(msg: string[]): HTMLElement {\n let out = \"\";\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\n const div = document.createElement(\"div\");\n div.innerHTML = out;\n return div;\n }\n\n /** Localize an error status\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\n * @returns a localized error message\n * @beta\n */\n public static translateStatus(status: number) {\n let key: { scope: string, val: string, status?: string };\n if (typeof status !== \"number\") {\n key = { scope: \"Errors\", val: \"IllegalValue\" };\n } else {\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\n if (!key.val)\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\n if (!key.val)\n key = { scope: \"DbResult\", val: DbResult[status] };\n if (!key.val)\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\n }\n\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\n }\n\n /**\n * Resets the formatsProvider back to the default [[QuantityTypeFormatsProvider]].\n * @beta\n */\n public static resetFormatsProvider() {\n this.formatsProvider = new QuantityTypeFormatsProvider();\n }\n\n /**\n * Creates an instance of the ExtensionAdmin\n * and registers an event to execute after startup is complete\n * @returns an instance of ExtensionAdmin\n */\n private static _createExtensionAdmin(): ExtensionAdmin {\n const extensionAdmin = new ExtensionAdmin();\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\n return extensionAdmin;\n }\n}\n"]}
1
+ {"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4HAA4H;AAC5H,wDAAwD;AACxD,sEAA6C;AAC7C,cAAc;AACD,QAAA,oBAAoB,GAAG,sBAAW,CAAC,OAAiB,CAAC;AAClE,MAAM,gBAAgB,GAAG,oBAAoB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,wGAAwG,CAAC;AAE9K,0DAAgD;AAChD,sDAAiL;AACjL,oDAAuK;AACvK,gDAAqD;AAErD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,+DAA4D;AAC5D,uEAAyD;AACzD,qEAAuD;AACvD,iEAA8D;AAC9D,+CAA0D;AAE1D,4EAAyE;AACzE,oEAAsD;AACtD,yDAA2C;AAC3C,+DAA4D;AAC5D,+EAAiI;AACjI,wDAAqD;AACrD,2DAAwD;AACxD,6DAA+C;AAC/C,qEAAuD;AACvD,qDAAkD;AAClD,2DAAwE;AACxE,8CAA8G;AAC9G,mEAAqD;AACrD,mEAAqD;AACrD,2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AG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,oBAAoB;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,+CAA2B,EAAE,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,qBAAqB;QAClC,MAAM,cAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;QAC5C,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,cAAc,CAAC;IACxB,CAAC;;AAjmBH,8BAkmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelApp\n */\n\n// @ts-expect-error package.json will resolve from the lib/{cjs,esm} dir without copying it into the build output we deliver\n// eslint-disable-next-line @itwin/import-within-package\nimport packageJson from \"../../package.json\";\n/** @public */\nexport const ITWINJS_CORE_VERSION = packageJson.version as string;\nconst COPYRIGHT_NOTICE = `Copyright © 2017-${new Date().getFullYear()} <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>`;\n\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, expectDefined, Guid, GuidString, IModelStatus, Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity } from \"@itwin/core-common\";\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\nimport { FormatsProvider } from \"@itwin/core-quantity\";\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\nimport { AccuDraw } from \"./AccuDraw\";\nimport { AccuSnap } from \"./AccuSnap\";\nimport * as auxCoordState from \"./AuxCoordSys\";\nimport * as categorySelectorState from \"./CategorySelectorState\";\nimport { ExtensionAdmin } from \"./extension/ExtensionAdmin\";\nimport * as displayStyleState from \"./DisplayStyleState\";\nimport * as drawingViewState from \"./DrawingViewState\";\nimport { ElementLocateManager } from \"./ElementLocateManager\";\nimport { ElementState, EntityState } from \"./EntityState\";\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\nimport { FrontendLoggerCategory } from \"./common/FrontendLoggerCategory\";\nimport * as modelselector from \"./ModelSelectorState\";\nimport * as modelState from \"./ModelState\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { FormatsProviderManager, QuantityFormatter, QuantityTypeFormatsProvider } from \"./quantity-formatting/QuantityFormatter\";\nimport { RenderSystem } from \"./render/RenderSystem\";\nimport { System } from \"./internal/render/webgl/System\";\nimport * as sheetState from \"./SheetViewState\";\nimport * as spatialViewState from \"./SpatialViewState\";\nimport { TentativePoint } from \"./TentativePoint\";\nimport { RealityDataSourceProviderRegistry } from \"./RealityDataSource\";\nimport { MapLayerFormatRegistry, MapLayerOptions, TerrainProviderRegistry, TileAdmin } from \"./tile/internal\";\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\nimport * as clipViewTool from \"./tools/ClipViewTool\";\nimport * as idleTool from \"./tools/IdleTool\";\nimport * as measureTool from \"./tools/MeasureTool\";\nimport * as selectTool from \"./tools/SelectTool\";\nimport { ToolRegistry } from \"./tools/Tool\";\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\nimport * as viewTool from \"./tools/ViewTool\";\nimport { UserPreferencesAccess } from \"./UserPreferences\";\nimport { ViewManager } from \"./ViewManager\";\nimport * as viewState from \"./ViewState\";\nimport \"./IModeljs-css\";\n\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\n\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\n * @public\n * @extensions\n */\nexport interface FrontendSecurityOptions {\n /** Configures protection from Cross Site Request Forgery attacks. */\n readonly csrfProtection?: {\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\n readonly enabled: boolean;\n /** Defaults to XSRF-TOKEN. */\n readonly cookieName?: string;\n /** Defaults to X-XSRF-TOKEN. */\n readonly headerName?: string;\n };\n}\n\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\n * @public\n */\nexport interface IModelAppOptions {\n /** If present, supplies the [[FrontendHubAccess]] for this session. */\n hubAccess?: FrontendHubAccess;\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\n applicationId?: string;\n /** If present, supplies the version of this application. Must be set for usage logging. */\n applicationVersion?: string;\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\n * @beta\n */\n userPreferences?: UserPreferencesAccess;\n /** If present, supplies the [[ViewManager]] for this session. */\n viewManager?: ViewManager;\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\n * @beta\n */\n mapLayerOptions?: MapLayerOptions;\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\n tileAdmin?: TileAdmin.Props;\n /** If present, supplies the [[NotificationManager]] for this session. */\n notifications?: NotificationManager;\n /** If present, supplies the [[ToolAdmin]] for this session. */\n toolAdmin?: ToolAdmin;\n /** If present, supplies the [[AccuDraw]] for this session. */\n accuDraw?: AccuDraw;\n /** If present, supplies the [[AccuSnap]] for this session. */\n accuSnap?: AccuSnap;\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\n localization?: Localization;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n /** If present, supplies security options for the frontend. */\n security?: FrontendSecurityOptions;\n /** @internal */\n sessionId?: GuidString;\n /** @internal */\n locateManager?: ElementLocateManager;\n /** If present, supplies the [[TentativePoint]] for this session. */\n tentativePoint?: TentativePoint;\n /** @internal */\n quantityFormatter?: QuantityFormatter;\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\n renderSys?: RenderSystem | RenderSystem.Options;\n /** If present, supplies the [[UiAdmin]] for this session. */\n uiAdmin?: UiAdmin;\n /** If present, supplies the [[FormatsProvider]] for this session. */\n formatsProvider?: FormatsProvider;\n /** If present, determines whether iModelApp is a NoRenderApp\n * @internal\n */\n noRender?: boolean;\n\n /**\n * @deprecated in 3.7 - might be removed in next major version. Specify desired RPC interfaces in the platform-specific RPC manager call instead.\n * See [[MobileRpcManager.initializeClient]], [[ElectronRpcManager.initializeFrontend]], [[BentleyCloudRpcManager.initializeClient]].\n */\n rpcInterfaces?: RpcInterfaceDefinition[];\n\n /** @beta */\n realityDataAccess?: RealityDataAccess;\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n publicPath?: string;\n}\n\n/** Options for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalOptions {\n /** Width for the Modal dialog box. */\n width?: number;\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\n autoClose?: boolean;\n /** Show an 'x' in the upper right corner to close the dialog */\n closeBox?: boolean;\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\n rootDiv?: HTMLElement;\n}\n\n/** Return type for [[IModelApp.makeModalDiv]]\n * @public\n */\nexport interface ModalReturn {\n /** The modal HTMLDivElement created. */\n modal: HTMLDivElement;\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if [[ModalOptions.autoClose]] or [[IModalOptions.closeBox]]\n * were not enabled for the dialog.\n */\n stop: (_ev: Event) => void;\n}\n\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\n * It's removed in IModelApp.shutdown.\n */\ninterface IModelAppForDebugger {\n iModelAppForDebugger?: typeof IModelApp;\n}\n\n/**\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\n *\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\n *\n * @public\n */\nexport class IModelApp {\n private static _initialized = false;\n private static _accuDraw: AccuDraw;\n private static _accuSnap: AccuSnap;\n private static _applicationId: string;\n private static _applicationVersion: string;\n private static _localization: Localization;\n private static _locateManager: ElementLocateManager;\n private static _notifications: NotificationManager;\n private static _quantityFormatter: QuantityFormatter;\n private static _renderSystem?: RenderSystem;\n private static _userPreferences?: UserPreferencesAccess;\n private static _tentativePoint: TentativePoint;\n private static _tileAdmin: TileAdmin;\n private static _toolAdmin: ToolAdmin;\n private static _viewManager: ViewManager;\n private static _uiAdmin: UiAdmin;\n private static _noRender: boolean;\n private static _wantEventLoop = false;\n private static _animationRequested = false;\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\n private static _animationIntervalId?: number;\n private static _securityOptions: FrontendSecurityOptions;\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\n private static _terrainProviderRegistry: TerrainProviderRegistry;\n private static _realityDataSourceProviders: RealityDataSourceProviderRegistry;\n private static _hubAccess?: FrontendHubAccess;\n private static _realityDataAccess?: RealityDataAccess;\n private static _publicPath: string;\n private static _formatsProviderManager: FormatsProviderManager;\n\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\n protected constructor() { }\n\n /** Event raised just before the frontend IModelApp is to be [[shutdown]]. */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** Event raised after IModelApp [[startup]] completes. */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n /** The [[ToolRegistry]] for this session. */\n public static readonly tools = new ToolRegistry();\n /** A uniqueId for this session */\n public static sessionId: GuidString;\n /** The [[MapLayerFormatRegistry]] for this session. */\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\n /** The [[TerrainProviderRegistry]] for this session. */\n public static get terrainProviderRegistry(): TerrainProviderRegistry { return this._terrainProviderRegistry; }\n /** The [[RealityDataSourceProviderRegistry]] for this session.\n * @beta\n */\n public static get realityDataSourceProviders(): RealityDataSourceProviderRegistry { return this._realityDataSourceProviders; }\n /** The [[RenderSystem]] for this session. */\n public static get renderSystem(): RenderSystem { return expectDefined(this._renderSystem); }\n /** The [[ViewManager]] for this session. */\n public static get viewManager(): ViewManager { return this._viewManager; }\n /** The [[NotificationManager]] for this session. */\n public static get notifications(): NotificationManager { return this._notifications; }\n /** The [[TileAdmin]] for this session. */\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\n /** The [[QuantityFormatter]] for this session. */\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\n /** The [[ToolAdmin]] for this session. */\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\n /** The [[AccuDraw]] for this session. */\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\n /** The [[AccuSnap]] for this session. */\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\n /** The [[TentativePoint]] for this session]]. */\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\n /** The [[Localization]] for this session. */\n public static get localization(): Localization { return this._localization; }\n /** The [[UserPreferencesAccess]] for this session.\n * @beta\n */\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\n public static get applicationId(): string { return this._applicationId; }\n /** The version of this application. Must be set for usage logging. */\n public static get applicationVersion(): string { return this._applicationVersion; }\n /** True after [[startup]] has been called, until [[shutdown]] is called. */\n public static get initialized() { return this._initialized; }\n\n /** Provides access to IModelHub services. */\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the RealityData service implementation for this IModelApp\n * @beta\n */\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\n\n /** Whether the [renderSystem[]] has been successfully initialized.\n * This will always be `false` before calling [[startup]] and after calling [[shutdown]].\n * In rare circumstances (e.g., while executing in a headless test environment) it may remain `false` due to a failure to\n * obtain a [WebGL rendering context](https://www.google.com/search?channel=fs&client=ubuntu-sn&q=mdn+webglrenderingcontext).\n * As long as you have called [[startup]], you can generally assume it to be `true`.\n */\n public static get hasRenderSystem() {\n return this._renderSystem !== undefined && this._renderSystem.isValid;\n }\n\n /** The [[UiAdmin]] for this session. */\n public static get uiAdmin() { return this._uiAdmin; }\n /** The requested security options for the frontend. */\n public static get securityOptions() { return this._securityOptions; }\n\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\n * The path should always end with a trailing `/`.\n */\n public static get publicPath() { return this._publicPath; }\n\n /** The [[FormatsProvider]] for this session.\n * @param provider The provider to use for formatting quantities.\n * @beta\n */\n public static get formatsProvider(): FormatsProvider { return this._formatsProviderManager; }\n public static set formatsProvider(provider: FormatsProvider) {\n this._formatsProviderManager.formatsProvider = provider;\n }\n\n /** @alpha */\n public static readonly extensionAdmin = this._createExtensionAdmin();\n\n /** Map of classFullName to EntityState class */\n private static _entityClasses = new Map<string, typeof EntityState>();\n\n /** Register all of the subclasses of EntityState from a module.\n * @internal\n */\n public static registerModuleEntities(moduleObj: any) {\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\n const thisEntityState = moduleObj[thisMember];\n if (thisEntityState.prototype instanceof EntityState) {\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\n }\n }\n }\n\n /** Register an EntityState class by its classFullName\n * @internal\n */\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\n const lowerName = classFullName.toLowerCase();\n if (this._entityClasses.has(lowerName)) {\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\n throw new Error(errMsg);\n }\n\n this._entityClasses.set(lowerName, classType);\n }\n\n /** @internal */\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\n\n /**\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\n * and/or performance.\n * @note As of 4.x, iTwin.js requires WebGL 2. If the client does not support WebGL 2, the `status` field of the returned compatibility info will be [WebGLRenderCompatibilityStatus.CannotCreateContext]($webgl-compatibility).\n */\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\n return queryRenderCompatibility(true, (canvas, useWebGL2, inputContextAttributes) => System.createContext(canvas, useWebGL2, inputContextAttributes));\n }\n\n /**\n * This method must be called before any other `@itwin/core-frontend` methods are used.\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\n * ``` ts\n * await IModelApp.startup( {applicationId: myAppId} );\n * ```\n * @param opts The options for configuring IModelApp\n */\n public static async startup(opts?: IModelAppOptions): Promise<void> {\n if (this._initialized)\n return; // we're already initialized, do nothing.\n this._initialized = true;\n\n opts = opts ?? {};\n this._securityOptions = opts.security ?? {};\n\n if (process.env.NODE_ENV === \"development\") {\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\n }\n\n this.sessionId = opts.sessionId ?? Guid.createValue();\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\n this.authorizationClient = opts.authorizationClient;\n this._hubAccess = opts.hubAccess;\n this._noRender = opts.noRender ?? false;\n\n this._setupRpcRequestContext();\n\n this._localization = opts.localization ?? new ITwinLocalization();\n const toolsNs = \"CoreTools\";\n await this.localization.initialize([\"iModelJs\", toolsNs]);\n [\n selectTool,\n idleTool,\n viewTool,\n clipViewTool,\n measureTool,\n accudrawTool,\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\n\n this.registerEntityState(EntityState.classFullName, EntityState);\n this.registerEntityState(ElementState.classFullName, ElementState);\n [\n modelState,\n sheetState,\n viewState,\n drawingViewState,\n spatialViewState,\n displayStyleState,\n modelselector,\n categorySelectorState,\n auxCoordState,\n ].forEach((module) => this.registerModuleEntities(module));\n\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\n if (opts.userPreferences)\n this._userPreferences = opts.userPreferences;\n this._viewManager = opts.viewManager ?? new ViewManager();\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\n this._notifications = opts.notifications ?? new NotificationManager();\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\n this._terrainProviderRegistry = new TerrainProviderRegistry();\n this._realityDataSourceProviders = new RealityDataSourceProviderRegistry();\n this._realityDataAccess = opts.realityDataAccess;\n this._formatsProviderManager = new FormatsProviderManager(opts.formatsProvider ?? new QuantityTypeFormatsProvider());\n\n this._publicPath = opts.publicPath ?? \"\";\n if (this._publicPath !== \"\" && !this._publicPath.endsWith(\"/\")) {\n this._publicPath += \"/\";\n }\n\n [\n this.renderSystem,\n this.viewManager,\n this.toolAdmin,\n this.accuDraw,\n this.accuSnap,\n this.locateManager,\n this.tentativePoint,\n this.uiAdmin,\n ].forEach((sys) => sys.onInitialized());\n\n await this.quantityFormatter.onInitialized();\n this.onAfterStartup.raiseEvent();\n }\n\n /** Must be called before the application exits to release any held resources. */\n public static async shutdown() {\n if (!this._initialized)\n return;\n\n // notify listeners that this IModelApp is about to be shut down.\n this.onBeforeShutdown.raiseEvent();\n this.onBeforeShutdown.clear();\n\n if (process.env.NODE_ENV === \"development\") {\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\n }\n\n this._wantEventLoop = false;\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n this.clearIntervalAnimation();\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\n this.tools.shutdown();\n this._renderSystem = dispose(this._renderSystem);\n this._entityClasses.clear();\n this.authorizationClient = undefined;\n this._initialized = false;\n this.quantityFormatter[Symbol.dispose]();\n this.resetFormatsProvider();\n this.onAfterStartup.clear();\n }\n\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\n * @beta\n */\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\n public static set animationInterval(interval: BeDuration | undefined) {\n if (undefined !== interval && interval.isTowardsPast)\n interval = undefined;\n\n if (interval !== IModelApp._animationInterval) {\n IModelApp._animationInterval = interval;\n if (IModelApp._wantEventLoop)\n IModelApp.requestIntervalAnimation();\n }\n }\n\n /** Request that the event loop execute on the next [animation frame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n * There is generally no reason for applications to invoke this method directly.\n */\n public static requestNextAnimation() {\n // Only want to call requestAnimationFrame if it is defined. Need to check whether current iModelApp is a NoRenderApp.\n if (IModelApp._noRender)\n return;\n\n if (!IModelApp._animationRequested) {\n IModelApp._animationRequested = true;\n requestAnimationFrame(() => IModelApp.eventLoop());\n }\n }\n\n /** @internal */\n private static clearIntervalAnimation(): void {\n if (undefined !== IModelApp._animationIntervalId) {\n window.clearInterval(IModelApp._animationIntervalId);\n IModelApp._animationIntervalId = undefined;\n }\n }\n\n /** @internal */\n private static requestIntervalAnimation(): void {\n IModelApp.clearIntervalAnimation();\n\n if (undefined !== IModelApp.animationInterval)\n IModelApp._animationIntervalId = window.setInterval(() => {\n IModelApp.requestNextAnimation();\n }, IModelApp.animationInterval.milliseconds);\n }\n\n /** Return true if the main event processing loop has been started.\n * @internal\n */\n public static get isEventLoopStarted() { return IModelApp._wantEventLoop; }\n\n /** @internal */\n public static startEventLoop() {\n if (!IModelApp._wantEventLoop) {\n IModelApp._wantEventLoop = true;\n window.addEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n IModelApp.requestIntervalAnimation();\n IModelApp.requestNextAnimation();\n }\n }\n\n /** Strictly for tests. @internal */\n public static stopEventLoop() {\n this._wantEventLoop = false;\n }\n\n /** The main event processing loop for Tools and rendering. */\n private static eventLoop() {\n IModelApp._animationRequested = false;\n if (!IModelApp._wantEventLoop) // flag turned on at startup\n return;\n\n try {\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\n IModelApp.viewManager.renderLoop();\n IModelApp.tileAdmin.process();\n } catch (exception) {\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\n\n IModelApp._wantEventLoop = false;\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\n window.removeEventListener(\"resize\", () => IModelApp.requestNextAnimation());\n }\n }\n\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\n * @note Access tokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n /** @internal */\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\n\n private static _setupRpcRequestContext() {\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\n return Guid.createValue();\n };\n\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\n const id = _request.id;\n const serialized: SerializedRpcActivity = {\n id,\n applicationId: this.applicationId,\n applicationVersion: this.applicationVersion,\n sessionId: this.sessionId,\n authorization: ProcessDetector.isMobileAppFrontend ? \"\" : await this.getAccessToken(),\n };\n\n const csrf = IModelApp.securityOptions.csrfProtection;\n if (csrf && csrf.enabled) {\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\n\n if (cookieValue) {\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\n const headerValue = cookieValue.split(\"=\")[1];\n serialized.csrfToken = { headerName, headerValue };\n }\n }\n\n return serialized;\n };\n }\n\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText. */\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\n /** The parent for the new HTMLElement */\n parent?: HTMLElement;\n /** The className for the new HTMLElement */\n className?: string;\n /** The Id for the new HTMLElement */\n id?: string;\n /** innerHTML for the new HTMLElement */\n innerHTML?: string;\n /** innerText for the new HTMLElement */\n innerText?: string;\n }) {\n const el = document.createElement(type);\n if (undefined !== opt) {\n if (undefined !== opt.className)\n el.className = opt.className;\n if (undefined !== opt.id)\n el.id = opt.id;\n if (undefined !== opt.innerHTML)\n el.innerHTML = opt.innerHTML;\n if (undefined !== opt.innerText)\n el.innerText = opt.innerText;\n if (undefined !== opt.parent)\n opt.parent.appendChild(el);\n }\n return el;\n }\n\n /** Shortcut for making a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\n * @param options The options that describe how the modal should work.\n */\n public static makeModalDiv(options: ModalOptions): ModalReturn {\n const root = options.rootDiv ? options.rootDiv : document.body;\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\n overlay.tabIndex = -1; // so we can catch keystroke events\n\n // function to remove modal dialog\n const stop = (ev: Event) => {\n root.removeChild(overlay);\n ev.stopPropagation();\n };\n\n if (options.autoClose) {\n overlay.onclick = overlay.oncontextmenu = stop;\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\n switch (ev.key) {\n case \"Enter\":\n case \"Escape\":\n stop(ev);\n return;\n }\n ev.stopPropagation();\n };\n overlay.focus();\n }\n\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\n if (undefined !== options.width) {\n modal.style.width = `${options.width}px`;\n // allow the dialog to be smaller than the width\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\n }\n if (options.closeBox) {\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\n close.onclick = stop;\n }\n\n return { modal, stop };\n }\n\n /** Applications may implement this method to supply a Logo Card.\n * @beta\n */\n public static applicationLogoCard?: () => HTMLTableRowElement;\n\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\n * @param opts Options for Logo Card\n * @beta\n */\n public static makeLogoCard(\n opts: {\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\n heading: string | HTMLElement;\n /** The URL or HTMLImageElement for the icon on this logo card. */\n iconSrc?: string | HTMLImageElement;\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\n iconWidth?: number;\n /** A *notice* string to be shown on the logo card. May include HTML. */\n notice?: string | HTMLElement;\n }): HTMLTableRowElement {\n const card = IModelApp.makeHTMLElement(\"tr\");\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\n if (undefined !== opts.iconSrc) {\n if (typeof opts.iconSrc === \"string\") {\n const logo = IModelApp.makeHTMLElement(\"img\");\n logo.src = opts.iconSrc;\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\n opts.iconSrc = logo;\n }\n iconCell.appendChild(opts.iconSrc);\n }\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\n if (undefined !== opts.heading) {\n if (typeof opts.heading === \"string\")\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\n else\n noticeCell.appendChild(opts.heading);\n }\n if (undefined !== opts.notice) {\n if (typeof opts.notice === \"string\")\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\n else\n noticeCell.appendChild(opts.notice);\n }\n return card;\n }\n\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\n * @internal\n */\n public static makeIModelJsLogoCard() {\n return this.makeLogoCard({\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\n heading: `<span class=\"itwinjs-header-lead\">${this.localization.getLocalizedString(\"iModelJs:Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\n notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,\n });\n }\n\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\n * @alpha\n */\n public static formatElementToolTip(msg: string[]): HTMLElement {\n let out = \"\";\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\n const div = document.createElement(\"div\");\n div.innerHTML = out;\n return div;\n }\n\n /** Localize an error status\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\n * @returns a localized error message\n * @beta\n */\n public static translateStatus(status: number) {\n let key: { scope: string, val: string, status?: string };\n if (typeof status !== \"number\") {\n key = { scope: \"Errors\", val: \"IllegalValue\" };\n } else {\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\n if (!key.val)\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\n if (!key.val)\n key = { scope: \"DbResult\", val: DbResult[status] };\n if (!key.val)\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\n }\n\n return this.localization.getLocalizedString(`iModelJs:${key.scope}.${key.val}`, key);\n }\n\n /**\n * Resets the formatsProvider back to the default [[QuantityTypeFormatsProvider]].\n * @beta\n */\n public static resetFormatsProvider() {\n this.formatsProvider = new QuantityTypeFormatsProvider();\n }\n\n /**\n * Creates an instance of the ExtensionAdmin\n * and registers an event to execute after startup is complete\n * @returns an instance of ExtensionAdmin\n */\n private static _createExtensionAdmin(): ExtensionAdmin {\n const extensionAdmin = new ExtensionAdmin();\n IModelApp.onAfterStartup.addListener(extensionAdmin.onStartup);\n return extensionAdmin;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,GAAG,SAqIzB,CAAC"}
1
+ {"version":3,"file":"IModeljs-css.d.ts","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,GAAG,SAyIzB,CAAC"}
@@ -52,6 +52,10 @@ let iModelJsCss = `
52
52
  opacity:.7
53
53
  }
54
54
 
55
+ .itwinjs-header-lead {
56
+ font-weight:normal;
57
+ }
58
+
55
59
  .logo-card-header {
56
60
  margin:auto;
57
61
  font-size:18px;
@@ -1 +1 @@
1
- {"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n// cSpell:ignore segoe\n\n/**\n * @internal\n */\nlet iModelJsCss: string | undefined = `\n:root {\n --background-1:#ffffff;\n --background-2:#f8f9fb;\n --background-3:#eef0f3;\n --background-4:#dce0e3;\n --background-5:#c7ccd1;\n --foreground-body:#000000;\n --foreground-primary:#008be1;\n --foreground-success:#56a91c;\n --foreground-alert:#d30a0a;\n --foreground-warning:#f18b12;\n --safe-area-top: constant(safe-area-inset-top);\n --safe-area-top: env(safe-area-inset-top);\n --safe-area-left: constant(safe-area-inset-left);\n --safe-area-left: env(safe-area-inset-left);\n --safe-area-bottom: constant(safe-area-inset-bottom);\n --safe-area-bottom: env(safe-area-inset-bottom);\n --safe-area-right: constant(safe-area-inset-right);\n --safe-area-right: env(safe-area-inset-right);\n --logo-foreground-body:#000000;\n --logo-background-1:#ffffff;\n}\n\n.logo-card-logo {\n width:144px;\n overflow:hidden;\n vertical-align:text-top;\n text-align:center\n}\n\n.logo-card-logo img {\n margin-top:4px;\n border: solid 3px var(--logo-background-1)\n}\n\n.logo-card-message {\n font-size:13px;\n line-height:1.25;\n margin-block-start:.5em;\n margin-block-end:3em;\n width:90%;\n opacity:.7\n}\n\n.logo-card-header {\n margin:auto;\n font-size:18px;\n font-weight:bold;\n opacity:.85\n}\n\n.logo-cards {\n position:relative;\n width:100%\n}\n\n.imodeljs-modal-overlay {\n top:0;\n left:0;\n width:100%;\n height:100%;\n position:absolute;\n display:flex;\n justify-content:center;\n align-items:center;\n background-color:rgba(0,0,0,.5);\n z-index:10000;\n}\n\n.imodeljs-modal {\n border-radius:3px;\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\n color:var(--logo-foreground-body);\n background-color:var(--logo-background-1);\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\n font-weight:normal;\n font-stretch:normal;\n font-style:normal;\n letter-spacing:normal;\n text-align:left;\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\n max-height: calc(100% - (2 * var(--height-border)));\n overflow: auto;\n}\n\n@media (max-width:450px) {\n .imodeljs-about .logo-card-logo {\n width: 90px;\n }\n}\n\n@media (max-height:450px) {\n .imodeljs-about {\n max-width: calc(100% - (2 * var(--width-border))) !important;\n width: unset !important;\n }\n .imodeljs-about .logo-card-message p {\n margin-block-end: 1em;\n }\n .imodeljs-about .logo-cards {\n margin-bottom: 2em;\n }\n}\n\n.imodeljs-modal-close {\n font-size:32px;\n text-align:right;\n position:relative;\n cursor:pointer;\n right:10px;\n top:-4px;\n margin:0;\n margin-bottom:-10px\n}\n\n.imodeljs-icon {\n z-index:11;\n left:8px;\n bottom:8px;\n position:absolute;\n width:32px;\n cursor:pointer;\n opacity:.4;\n filter:drop-shadow(1px 1px 1px black)\n}\n\n@media (hover: hover) {\n .imodeljs-icon:hover {\n opacity:1.0;\n }\n}\n`;\n\n// add the iTwin.js frontend .css styles into DOM head when we load\n(() => {\n // Skip adding the css to document if document does not exist.\n if (\"undefined\" === typeof document)\n return;\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\n const openSans = document.createElement(\"link\");\n openSans.rel = \"stylesheet\";\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\n document.head.prepend(openSans);\n iModelJsCss = undefined; // can only be called once\n})();\n"]}
1
+ {"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n// cSpell:ignore segoe\n\n/**\n * @internal\n */\nlet iModelJsCss: string | undefined = `\n:root {\n --background-1:#ffffff;\n --background-2:#f8f9fb;\n --background-3:#eef0f3;\n --background-4:#dce0e3;\n --background-5:#c7ccd1;\n --foreground-body:#000000;\n --foreground-primary:#008be1;\n --foreground-success:#56a91c;\n --foreground-alert:#d30a0a;\n --foreground-warning:#f18b12;\n --safe-area-top: constant(safe-area-inset-top);\n --safe-area-top: env(safe-area-inset-top);\n --safe-area-left: constant(safe-area-inset-left);\n --safe-area-left: env(safe-area-inset-left);\n --safe-area-bottom: constant(safe-area-inset-bottom);\n --safe-area-bottom: env(safe-area-inset-bottom);\n --safe-area-right: constant(safe-area-inset-right);\n --safe-area-right: env(safe-area-inset-right);\n --logo-foreground-body:#000000;\n --logo-background-1:#ffffff;\n}\n\n.logo-card-logo {\n width:144px;\n overflow:hidden;\n vertical-align:text-top;\n text-align:center\n}\n\n.logo-card-logo img {\n margin-top:4px;\n border: solid 3px var(--logo-background-1)\n}\n\n.logo-card-message {\n font-size:13px;\n line-height:1.25;\n margin-block-start:.5em;\n margin-block-end:3em;\n width:90%;\n opacity:.7\n}\n\n.itwinjs-header-lead {\n font-weight:normal;\n}\n\n.logo-card-header {\n margin:auto;\n font-size:18px;\n font-weight:bold;\n opacity:.85\n}\n\n.logo-cards {\n position:relative;\n width:100%\n}\n\n.imodeljs-modal-overlay {\n top:0;\n left:0;\n width:100%;\n height:100%;\n position:absolute;\n display:flex;\n justify-content:center;\n align-items:center;\n background-color:rgba(0,0,0,.5);\n z-index:10000;\n}\n\n.imodeljs-modal {\n border-radius:3px;\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\n color:var(--logo-foreground-body);\n background-color:var(--logo-background-1);\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\n font-weight:normal;\n font-stretch:normal;\n font-style:normal;\n letter-spacing:normal;\n text-align:left;\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\n max-height: calc(100% - (2 * var(--height-border)));\n overflow: auto;\n}\n\n@media (max-width:450px) {\n .imodeljs-about .logo-card-logo {\n width: 90px;\n }\n}\n\n@media (max-height:450px) {\n .imodeljs-about {\n max-width: calc(100% - (2 * var(--width-border))) !important;\n width: unset !important;\n }\n .imodeljs-about .logo-card-message p {\n margin-block-end: 1em;\n }\n .imodeljs-about .logo-cards {\n margin-bottom: 2em;\n }\n}\n\n.imodeljs-modal-close {\n font-size:32px;\n text-align:right;\n position:relative;\n cursor:pointer;\n right:10px;\n top:-4px;\n margin:0;\n margin-bottom:-10px\n}\n\n.imodeljs-icon {\n z-index:11;\n left:8px;\n bottom:8px;\n position:absolute;\n width:32px;\n cursor:pointer;\n opacity:.4;\n filter:drop-shadow(1px 1px 1px black)\n}\n\n@media (hover: hover) {\n .imodeljs-icon:hover {\n opacity:1.0;\n }\n}\n`;\n\n// add the iTwin.js frontend .css styles into DOM head when we load\n(() => {\n // Skip adding the css to document if document does not exist.\n if (\"undefined\" === typeof document)\n return;\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\n const openSans = document.createElement(\"link\");\n openSans.rel = \"stylesheet\";\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\n document.head.prepend(openSans);\n iModelJsCss = undefined; // can only be called once\n})();\n"]}
@@ -62,7 +62,19 @@ export declare abstract class MapLayerImageryProvider {
62
62
  get mutualExclusiveSubLayer(): boolean;
63
63
  /** @internal */
64
64
  get useGeographicTilingScheme(): boolean;
65
- cartoRange?: MapCartoRectangle;
65
+ private _cartoRange?;
66
+ /** Validates a cartographic range for NaN and infinite values.
67
+ * @param range The cartographic range to validate.
68
+ * @returns true if the range is valid, false otherwise.
69
+ * @internal
70
+ */
71
+ private static isRangeValid;
72
+ /** Gets or sets the cartographic range for this provider.
73
+ * When setting, if the range is invalid (contains NaN or infinite values), it will be stored as undefined.
74
+ * When getting, returns undefined if the range was set to an invalid value.
75
+ */
76
+ get cartoRange(): MapCartoRectangle | undefined;
77
+ set cartoRange(range: MapCartoRectangle | undefined);
66
78
  /**
67
79
  * This value is used internally for various computations, this should not get overriden.
68
80
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerImageryProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerImageryProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAqB,MAAM,oBAAoB,CAAC;AAIzG,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAA6C,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,EAA2B,MAAM,aAAa,CAAC;AAC7N,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD;;GAEG;AACH,oBAAY,6BAA6B;IACvC,KAAK,IAAA;IACL,WAAW,IAAA;C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AAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK7E,gBAAgB;IACT,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO;IAM/G,gBAAgB;IACT,uBAAuB,CAAC,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO;IASpF;;OAEG;IACH,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM;CAQzC"}
@@ -68,7 +68,31 @@ class MapLayerImageryProvider {
68
68
  get mutualExclusiveSubLayer() { return false; }
69
69
  /** @internal */
70
70
  get useGeographicTilingScheme() { return false; }
71
- cartoRange;
71
+ _cartoRange;
72
+ /** Validates a cartographic range for NaN and infinite values.
73
+ * @param range The cartographic range to validate.
74
+ * @returns true if the range is valid, false otherwise.
75
+ * @internal
76
+ */
77
+ static isRangeValid(range) {
78
+ if (!range) {
79
+ return false;
80
+ }
81
+ return !Number.isNaN(range.low.x) && !Number.isNaN(range.low.y) &&
82
+ !Number.isNaN(range.high.x) && !Number.isNaN(range.high.y) &&
83
+ Number.isFinite(range.low.x) && Number.isFinite(range.low.y) &&
84
+ Number.isFinite(range.high.x) && Number.isFinite(range.high.y);
85
+ }
86
+ /** Gets or sets the cartographic range for this provider.
87
+ * When setting, if the range is invalid (contains NaN or infinite values), it will be stored as undefined.
88
+ * When getting, returns undefined if the range was set to an invalid value.
89
+ */
90
+ get cartoRange() {
91
+ return this._cartoRange;
92
+ }
93
+ set cartoRange(range) {
94
+ this._cartoRange = MapLayerImageryProvider.isRangeValid(range) ? range : undefined;
95
+ }
72
96
  /**
73
97
  * This value is used internally for various computations, this should not get overriden.
74
98
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerImageryProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,o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,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IAEvE,CAAC;IAED,gBAAgB;IACT,uBAAuB,CAAC,UAAuB,EAAE,mBAA4B;QAElF,IAAI,mBAAmB,EAAE,CAAC;YACxB,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvK,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvK,CAAC;IACH,CAAC;IAED;;OAEG;IACO,kBAAkB,CAAC,GAAW;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB;YACxE,OAAO,GAAG,CAAC;QAEb,IAAI,MAAM,GAAG,IAAA,4BAAiB,EAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,MAAM,GAAG,IAAA,4BAAiB,EAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAjdD,0DAidC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ImageSourceFormat } from \"@itwin/core-common\";\nimport { Angle } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { NotifyMessageDetails, OutputMessagePriority } from \"../../NotificationManager\";\nimport { ScreenViewport } from \"../../Viewport\";\nimport { appendQueryParams, GeographicTilingScheme, ImageryMapTile, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeatureInfo, MapTilingScheme, QuadId, WebMercatorTilingScheme } from \"../internal\";\nimport { HitDetail } from \"../../HitDetail\";\nimport { headersIncludeAuthMethod, setBasicAuthorization, setRequestTimeout } from \"../../request/utils\";\nimport { DecorateContext } from \"../../ViewContext\";\n\n/** @internal */\nconst tileImageSize = 256, untiledImageSize = 256;\nconst earthRadius = 6378137;\nconst doDebugToolTips = false;\n\n/** The status of the map layer imagery provider that lets you know if authentication is needed to request tiles.\n * @public\n */\nexport enum MapLayerImageryProviderStatus {\n Valid,\n RequireAuth,\n}\n\n/** @internal */\nexport interface WGS84Extent\n{\n longitudeLeft: number;\n longitudeRight: number;\n latitudeTop: number;\n latitudeBottom: number;\n}\n\n/** Abstract class for map layer imagery providers.\n * Map layer imagery providers request and provide tile images and other data. Each map layer from a separate source needs its own imagery provider object.\n * @beta\n */\nexport abstract class MapLayerImageryProvider {\n protected _hasSuccessfullyFetchedTile = false;\n public readonly onStatusChanged = new BeEvent<(provider: MapLayerImageryProvider) => void>();\n\n /** @internal */\n private readonly _mercatorTilingScheme = new WebMercatorTilingScheme();\n\n /** @internal */\n private readonly _geographicTilingScheme = new GeographicTilingScheme();\n\n /** @internal */\n private _status = MapLayerImageryProviderStatus.Valid;\n\n /** @internal */\n protected _includeUserCredentials = false;\n\n /** @internal */\n protected readonly onFirstRequestCompleted = new BeEvent<() => void>();\n\n /** @internal */\n protected _firstRequestPromise: Promise<void>|undefined;\n\n /** @internal */\n public get status() { return this._status; }\n\n /** Determine if this provider supports map feature info.\n * For example, this can be used to show the map feature info tool only when a provider is registered to support it.\n * @returns true if provider supports map feature info else return false.\n * @public\n */\n public get supportsMapFeatureInfo(): boolean { return false; }\n\n public resetStatus() { this.setStatus(MapLayerImageryProviderStatus.Valid); }\n\n /** @internal */\n public get tileSize(): number { return this._usesCachedTiles ? tileImageSize : untiledImageSize; }\n\n /** @internal */\n public get maximumScreenSize() { return 2 * this.tileSize; }\n\n public get minimumZoomLevel(): number { return this.defaultMinimumZoomLevel; }\n\n public get maximumZoomLevel(): number { return this.defaultMaximumZoomLevel; }\n\n /** @internal */\n public get usesCachedTiles() { return this._usesCachedTiles; }\n\n public get mutualExclusiveSubLayer(): boolean { return false; }\n\n /** @internal */\n public get useGeographicTilingScheme() { return false; }\n\n public cartoRange?: MapCartoRectangle;\n\n /**\n * This value is used internally for various computations, this should not get overriden.\n * @internal\n */\n protected readonly defaultMinimumZoomLevel = 0;\n\n /**\n * This value is used internally for various computations, this should not get overriden.\n * @internal\n */\n protected readonly defaultMaximumZoomLevel = 22;\n\n /** @internal */\n protected get _filterByCartoRange() { return true; }\n\n constructor(protected readonly _settings: ImageMapLayerSettings, protected _usesCachedTiles: boolean) {\n this._mercatorTilingScheme = new WebMercatorTilingScheme();\n this._geographicTilingScheme = new GeographicTilingScheme(2, 1, true);\n }\n\n /**\n * Initialize the provider by loading the first tile at its default maximum zoom level.\n * @beta\n */\n public async initialize(): Promise<void> {\n this.loadTile(0, 0, this.defaultMaximumZoomLevel).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (tileData !== undefined)\n this._missingTileData = tileData.data as Uint8Array;\n });\n }\n\n public abstract constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;\n\n public get tilingScheme(): MapTilingScheme { return this.useGeographicTilingScheme ? this._geographicTilingScheme : this._mercatorTilingScheme; }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */\n public addLogoCards(_cards: HTMLTableElement, _viewport: ScreenViewport): void { }\n\n /**\n * Add attribution logo cards for the data supplied by this provider to the [[Viewport]]'s logo div.\n * @param _cards Logo cards HTML element that may contain custom data attributes.\n * @param _viewport Viewport to add logo cards to.\n * @beta\n */\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n /** @internal */\n protected _missingTileData?: Uint8Array;\n\n /** @internal */\n public get transparentBackgroundString(): string { return this._settings.transparentBackground ? \"true\" : \"false\"; }\n\n /** @internal */\n protected async _areChildrenAvailable(_tile: ImageryMapTile): Promise<boolean> { return true; }\n\n /** @internal */\n public getPotentialChildIds(quadId: QuadId): QuadId[] {\n const childLevel = quadId.level + 1;\n return quadId.getChildIds(this.tilingScheme.getNumberOfXChildrenAtLevel(childLevel), this.tilingScheme.getNumberOfYChildrenAtLevel(childLevel));\n }\n\n /**\n * Get child IDs of a quad and generate tiles based on these child IDs.\n * See [[ImageryTileTree._loadChildren]] for the definition of `resolveChildren` where this function is commonly called.\n * @param quadId quad to generate child IDs for.\n * @param resolveChildren Function that creates tiles from child IDs.\n * @beta\n */\n protected _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\n resolveChildren(this.getPotentialChildIds(quadId));\n }\n\n /** @internal */\n public generateChildIds(tile: ImageryMapTile, resolveChildren: (childIds: QuadId[]) => void) {\n if (tile.depth >= this.maximumZoomLevel || (undefined !== this.cartoRange && this._filterByCartoRange && !this.cartoRange.intersectsRange(tile.rectangle))) {\n tile.setLeaf();\n return;\n }\n this._generateChildIds(tile.quadId, resolveChildren);\n }\n\n /**\n * Get tooltip text for a specific quad and cartographic position.\n * @param strings List of strings to contain tooltip text.\n * @param quadId Quad ID to get tooltip for.\n * @param _carto Cartographic that may be used to retrieve and/or format tooltip text.\n * @param tree Tree associated with the quad to get the tooltip for.\n * @internal\n */\n public async getToolTip(strings: string[], quadId: QuadId, _carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\n if (doDebugToolTips) {\n const range = quadId.getLatLongRangeDegrees(tree.tilingScheme);\n strings.push(`QuadId: ${quadId.debugString}, Lat: ${range.low.x} - ${range.high.x} Long: ${range.low.y} - ${range.high.y}`);\n }\n }\n\n /** @internal */\n public async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], _quadId: QuadId, _carto: Cartographic, _tree: ImageryMapTileTree, _hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<void> {\n // default implementation; simply return an empty feature info\n featureInfos.push({ layerName: this._settings.name });\n }\n\n /** @internal */\n public decorate(_context: DecorateContext): void {\n }\n\n /** @internal */\n protected async getImageFromTileResponse(tileResponse: Response, zoomLevel: number) {\n const arrayBuffer = await tileResponse.arrayBuffer();\n const byteArray: Uint8Array = new Uint8Array(arrayBuffer);\n if (!byteArray || (byteArray.length === 0))\n return undefined;\n if (this.matchesMissingTile(byteArray) && zoomLevel > 8)\n return undefined;\n\n const contentType = tileResponse.headers.get(\"content-type\")?.toLowerCase();\n let imageFormat: ImageSourceFormat | undefined;\n if (contentType) {\n // Note: 'includes' is used here instead of exact comparison because we encountered\n // some servers that would give content type such as 'image/png;charset=UTF-8'.\n if (contentType.includes(\"image/jpeg\"))\n imageFormat = ImageSourceFormat.Jpeg;\n else if (contentType.includes(\"image/png\"))\n imageFormat = ImageSourceFormat.Png;\n }\n\n if (imageFormat !== undefined)\n return new ImageSource(byteArray, imageFormat);\n\n assert(false, \"Invalid tile content type\");\n return undefined;\n }\n\n /**\n * Change the status of this provider.\n * Sub-classes should override 'onStatusUpdated' instead of this method.\n * @internal\n */\n public setStatus(status: MapLayerImageryProviderStatus) {\n if (this._status !== status) {\n this.onStatusUpdated(status);\n this._status = status;\n this.onStatusChanged.raiseEvent(this);\n }\n }\n\n /** Method called whenever the status changes, giving the opportunity to sub-classes to have a custom behavior.\n * @internal\n */\n protected onStatusUpdated(_newStatus: MapLayerImageryProviderStatus) { }\n\n /** @internal */\n protected setRequestAuthorization(headers: Headers) {\n if (this._settings.userName && this._settings.password) {\n setBasicAuthorization(headers, this._settings.userName, this._settings.password);\n }\n }\n\n /** @internal */\n public async makeTileRequest(url: string, timeoutMs?: number, authorization?: string): Promise<Response> {\n\n // We want to complete the first request before letting other requests go;\n // this done to avoid flooding server with requests missing credentials\n if (!this._firstRequestPromise)\n this._firstRequestPromise = new Promise<void>((resolve: any) => this.onFirstRequestCompleted.addOnce(()=>resolve()));\n else\n await this._firstRequestPromise;\n\n let response: Response|undefined;\n try {\n response = await this.makeRequest(url, timeoutMs, authorization);\n } finally {\n this.onFirstRequestCompleted.raiseEvent();\n }\n\n if (response === undefined)\n throw new Error(\"fetch call failed\");\n\n return response;\n }\n\n /** @internal */\n public async makeRequest(url: string, timeoutMs?: number, authorization?: string): Promise<Response> {\n\n let response: Response|undefined;\n\n let headers: Headers | undefined;\n let hasCreds = false;\n if (authorization) {\n headers = new Headers();\n headers.set(\"Authorization\", authorization);\n } else if (this._settings.userName && this._settings.password) {\n hasCreds = true;\n headers = new Headers();\n this.setRequestAuthorization(headers);\n }\n const opts: RequestInit = {\n method: \"GET\",\n headers,\n credentials: this._includeUserCredentials ? \"include\" : undefined,\n };\n\n if (timeoutMs !== undefined)\n setRequestTimeout(opts, timeoutMs);\n\n response = await fetch(url, opts);\n\n if (response.status === 401\n && headersIncludeAuthMethod(response.headers, [\"ntlm\", \"negotiate\"])\n && !this._includeUserCredentials\n && !hasCreds\n ) {\n // Removed the previous headers and make sure \"include\" credentials is set\n opts.headers = undefined;\n opts.credentials = \"include\";\n\n // We got a http 401 challenge, lets try again with SSO enabled (i.e. Windows Authentication)\n response = await fetch(url, opts);\n if (response.status === 200) {\n this._includeUserCredentials = true; // avoid going through 401 challenges over and over\n }\n }\n\n return response;\n }\n\n /** Returns a map layer tile at the specified settings. */\n public async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\n\n try {\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\n if (tileUrl.length === 0)\n return undefined;\n\n const tileResponse: Response = await this.makeTileRequest(tileUrl);\n\n if (!this._hasSuccessfullyFetchedTile) {\n this._hasSuccessfullyFetchedTile = true;\n }\n\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\n } catch (error: any) {\n if (error?.status === 401) {\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\n\n // Only report error to end-user if we were previously able to fetch tiles\n // and then encountered an error, otherwise I assume an error was already reported\n // through the source validation process.\n if (this._hasSuccessfullyFetchedTile) {\n const msg = IModelApp.localization.getLocalizedString(\"iModelJs:MapLayers.Messages.LoadTileTokenError\", { layerName: this._settings.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n }\n return undefined;\n }\n }\n\n /** @internal */\n protected async toolTipFromUrl(strings: string[], url: string): Promise<void> {\n const headers = new Headers();\n this.setRequestAuthorization(headers);\n\n try {\n const response = await fetch(url, {\n method: \"GET\",\n headers,\n credentials: this._includeUserCredentials ? \"include\" : undefined,\n });\n const text = await response.text();\n if (undefined !== text) {\n strings.push(text);\n }\n } catch {\n }\n }\n\n /** @internal */\n public matchesMissingTile(tileData: Uint8Array): boolean {\n if (!this._missingTileData)\n return false;\n if (tileData.length !== this._missingTileData.length)\n return false;\n for (let i: number = 0; i < tileData.length; i += 10) {\n if (this._missingTileData[i] !== tileData[i]) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Calculates the projected x cartesian coordinate in EPSG:3857 from the longitude in EPSG:4326 (WGS84)\n * @param longitude Longitude in EPSG:4326 (WGS84)\n * @internal\n */\n public getEPSG3857X(longitude: number): number {\n return longitude * 20037508.34 / 180.0;\n }\n\n /**\n * Calculates the projected y cartesian coordinate in EPSG:3857 from the latitude in EPSG:4326 (WGS84)\n * @param latitude Latitude in EPSG:4326 (WGS84)\n * @internal\n */\n public getEPSG3857Y(latitude: number): number {\n const y = Math.log(Math.tan((90.0 + latitude) * Math.PI / 360.0)) / (Math.PI / 180.0);\n return y * 20037508.34 / 180.0;\n }\n\n /**\n * Calculates the longitude in EPSG:4326 (WGS84) from the projected x cartesian coordinate in EPSG:3857\n * @param x3857 Projected x cartesian coordinate in EPSG:3857\n * @internal\n */\n public getEPSG4326Lon(x3857: number): number {\n return Angle.radiansToDegrees(x3857 / earthRadius);\n }\n\n /**\n * Calculates the latitude in EPSG:4326 (WGS84) from the projected y cartesian coordinate in EPSG:3857\n * @param y3857 Projected y cartesian coordinate in EPSG:3857\n * @internal\n */\n public getEPSG4326Lat(y3857: number): number {\n const y = 2 * Math.atan(Math.exp(y3857 / earthRadius)) - (Math.PI / 2);\n return Angle.radiansToDegrees(y);\n }\n\n /**\n * Get the bounding box/extents of a tile in EPSG:4326 (WGS84) format.\n * Map tile providers like Bing and Mapbox allow the URL to be constructed directly from the zoom level and tile coordinates.\n * However, WMS-based servers take a bounding box instead. This method can help get that bounding box from a tile.\n * @param row Row of the tile\n * @param column Column of the tile\n * @param zoomLevel Desired zoom level of the tile\n * @internal\n */\n public getEPSG4326Extent(row: number, column: number, zoomLevel: number): WGS84Extent {\n // Shift left (this.tileSize << zoomLevel) overflow when using 512 pixels tile at higher resolution,\n // so use Math.pow instead (I assume the performance lost to be minimal)\n const mapSize = this.tileSize * Math.pow(2, zoomLevel);\n const leftGrid = this.tileSize * column;\n const topGrid = this.tileSize * row;\n\n const longitudeLeft = 360 * ((leftGrid / mapSize) - 0.5);\n const y0 = 0.5 - ((topGrid + this.tileSize) / mapSize);\n const latitudeBottom = 90.0 - 360.0 * Math.atan(Math.exp(-y0 * 2 * Math.PI)) / Math.PI;\n\n const longitudeRight = 360 * (((leftGrid + this.tileSize) / mapSize) - 0.5);\n const y1 = 0.5 - (topGrid / mapSize);\n const latitudeTop = 90.0 - 360.0 * Math.atan(Math.exp(-y1 * 2 * Math.PI)) / Math.PI;\n\n return { longitudeLeft, longitudeRight, latitudeTop, latitudeBottom };\n }\n\n /**\n * Get the bounding box/extents of a tile in EPSG:3857 format.\n * @param row Row of the tile\n * @param column Column of the tile\n * @param zoomLevel Desired zoom level of the tile\n * @internal\n */\n public getEPSG3857Extent(row: number, column: number, zoomLevel: number): { left: number, right: number, top: number, bottom: number } {\n const epsg4326Extent = this.getEPSG4326Extent(row, column, zoomLevel);\n\n const left = this.getEPSG3857X(epsg4326Extent.longitudeLeft);\n const right = this.getEPSG3857X(epsg4326Extent.longitudeRight);\n const bottom = this.getEPSG3857Y(epsg4326Extent.latitudeBottom);\n const top = this.getEPSG3857Y(epsg4326Extent.latitudeTop);\n\n return { left, right, bottom, top };\n }\n\n /** @internal */\n public getEPSG3857ExtentString(row: number, column: number, zoomLevel: number) {\n const tileExtent = this.getEPSG3857Extent(row, column, zoomLevel);\n return `${tileExtent.left.toFixed(2)},${tileExtent.bottom.toFixed(2)},${tileExtent.right.toFixed(2)},${tileExtent.top.toFixed(2)}`;\n }\n\n /** @internal */\n public getEPSG4326TileExtentString(row: number, column: number, zoomLevel: number, latLongAxisOrdering: boolean) {\n const tileExtent = this.getEPSG4326Extent(row, column, zoomLevel);\n return this.getEPSG4326ExtentString(tileExtent, latLongAxisOrdering);\n\n }\n\n /** @internal */\n public getEPSG4326ExtentString(tileExtent: WGS84Extent, latLongAxisOrdering: boolean) {\n\n if (latLongAxisOrdering) {\n return `${tileExtent.latitudeBottom.toFixed(8)},${tileExtent.longitudeLeft.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)},${tileExtent.longitudeRight.toFixed(8)}`;\n } else {\n return `${tileExtent.longitudeLeft.toFixed(8)},${tileExtent.latitudeBottom.toFixed(8)},${tileExtent.longitudeRight.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)}`;\n }\n }\n\n /** Append custom parameters for settings to provided URL object.\n * @internal\n */\n protected appendCustomParams(url: string) {\n if (!this._settings.savedQueryParams && !this._settings.unsavedQueryParams)\n return url;\n\n let tmpUrl = appendQueryParams(url, this._settings.savedQueryParams);\n tmpUrl = appendQueryParams(tmpUrl, this._settings.unsavedQueryParams);\n return tmpUrl;\n }\n}\n"]}
1
+ {"version":3,"file":"MapLayerImageryProvider.js","sourceRoot":"","sources":["../../../../src/tile/map/MapLayerImageryProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,oDAAyG;AACzG,wDAA6C;AAC7C,+CAA4C;AAC5C,mEAAwF;AAExF,0CAA6N;AAE7N,+CAAyG;AAGzG,gBAAgB;AAChB,MAAM,aAAa,GAAG,GAAG,EAAE,gBAAgB,GAAG,GAAG,CAAC;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;GAEG;AACH,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACvC,mFAAK,CAAA;IACL,+FAAW,CAAA;AACb,CAAC,EAHW,6BAA6B,6CAA7B,6BAA6B,QAGxC;AAWD;;;GAGG;AACH,MAAsB,uBAAuB;IAiGZ;IAA4C;IAhGjE,2BAA2B,GAAG,KAAK,CAAC;IAC9B,eAAe,GAAG,IAAI,sBAAO,EAA+C,CAAC;IAE7F,gBAAgB;IACC,qBAAqB,GAAG,IAAI,kCAAuB,EAAE,CAAC;IAEvE,gBAAgB;IACC,uBAAuB,GAAG,IAAI,iCAAsB,EAAE,CAAC;IAExE,gBAAgB;IACR,OAAO,GAAG,6BAA6B,CAAC,KAAK,CAAC;IAEtD,gBAAgB;IACN,uBAAuB,GAAG,KAAK,CAAC;IAE1C,gBAAgB;IACG,uBAAuB,GAAG,IAAI,sBAAO,EAAc,CAAC;IAEvE,gBAAgB;IACN,oBAAoB,CAA0B;IAExD,gBAAgB;IAChB,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5C;;;;OAIG;IACH,IAAW,sBAAsB,KAAc,OAAO,KAAK,CAA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,MAAM,EAAE,SAAS,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IAEvE,CAAC;IAED,gBAAgB;IACT,uBAAuB,CAAC,UAAuB,EAAE,mBAA4B;QAElF,IAAI,mBAAmB,EAAE,CAAC;YACxB,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvK,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACvK,CAAC;IACH,CAAC;IAED;;OAEG;IACO,kBAAkB,CAAC,GAAW;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB;YACxE,OAAO,GAAG,CAAC;QAEb,IAAI,MAAM,GAAG,IAAA,4BAAiB,EAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,MAAM,GAAG,IAAA,4BAAiB,EAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA7eD,0DA6eC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\nimport { Cartographic, ImageMapLayerSettings, ImageSource, ImageSourceFormat } from \"@itwin/core-common\";\nimport { Angle } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { NotifyMessageDetails, OutputMessagePriority } from \"../../NotificationManager\";\nimport { ScreenViewport } from \"../../Viewport\";\nimport { appendQueryParams, GeographicTilingScheme, ImageryMapTile, ImageryMapTileTree, MapCartoRectangle, MapFeatureInfoOptions, MapLayerFeatureInfo, MapTilingScheme, QuadId, WebMercatorTilingScheme } from \"../internal\";\nimport { HitDetail } from \"../../HitDetail\";\nimport { headersIncludeAuthMethod, setBasicAuthorization, setRequestTimeout } from \"../../request/utils\";\nimport { DecorateContext } from \"../../ViewContext\";\n\n/** @internal */\nconst tileImageSize = 256, untiledImageSize = 256;\nconst earthRadius = 6378137;\nconst doDebugToolTips = false;\n\n/** The status of the map layer imagery provider that lets you know if authentication is needed to request tiles.\n * @public\n */\nexport enum MapLayerImageryProviderStatus {\n Valid,\n RequireAuth,\n}\n\n/** @internal */\nexport interface WGS84Extent\n{\n longitudeLeft: number;\n longitudeRight: number;\n latitudeTop: number;\n latitudeBottom: number;\n}\n\n/** Abstract class for map layer imagery providers.\n * Map layer imagery providers request and provide tile images and other data. Each map layer from a separate source needs its own imagery provider object.\n * @beta\n */\nexport abstract class MapLayerImageryProvider {\n protected _hasSuccessfullyFetchedTile = false;\n public readonly onStatusChanged = new BeEvent<(provider: MapLayerImageryProvider) => void>();\n\n /** @internal */\n private readonly _mercatorTilingScheme = new WebMercatorTilingScheme();\n\n /** @internal */\n private readonly _geographicTilingScheme = new GeographicTilingScheme();\n\n /** @internal */\n private _status = MapLayerImageryProviderStatus.Valid;\n\n /** @internal */\n protected _includeUserCredentials = false;\n\n /** @internal */\n protected readonly onFirstRequestCompleted = new BeEvent<() => void>();\n\n /** @internal */\n protected _firstRequestPromise: Promise<void>|undefined;\n\n /** @internal */\n public get status() { return this._status; }\n\n /** Determine if this provider supports map feature info.\n * For example, this can be used to show the map feature info tool only when a provider is registered to support it.\n * @returns true if provider supports map feature info else return false.\n * @public\n */\n public get supportsMapFeatureInfo(): boolean { return false; }\n\n public resetStatus() { this.setStatus(MapLayerImageryProviderStatus.Valid); }\n\n /** @internal */\n public get tileSize(): number { return this._usesCachedTiles ? tileImageSize : untiledImageSize; }\n\n /** @internal */\n public get maximumScreenSize() { return 2 * this.tileSize; }\n\n public get minimumZoomLevel(): number { return this.defaultMinimumZoomLevel; }\n\n public get maximumZoomLevel(): number { return this.defaultMaximumZoomLevel; }\n\n /** @internal */\n public get usesCachedTiles() { return this._usesCachedTiles; }\n\n public get mutualExclusiveSubLayer(): boolean { return false; }\n\n /** @internal */\n public get useGeographicTilingScheme() { return false; }\n\n private _cartoRange?: MapCartoRectangle;\n\n /** Validates a cartographic range for NaN and infinite values.\n * @param range The cartographic range to validate.\n * @returns true if the range is valid, false otherwise.\n * @internal\n */\n private static isRangeValid(range: MapCartoRectangle | undefined): boolean {\n if (!range) {\n return false;\n }\n\n return !Number.isNaN(range.low.x) && !Number.isNaN(range.low.y) &&\n !Number.isNaN(range.high.x) && !Number.isNaN(range.high.y) &&\n Number.isFinite(range.low.x) && Number.isFinite(range.low.y) &&\n Number.isFinite(range.high.x) && Number.isFinite(range.high.y);\n }\n\n /** Gets or sets the cartographic range for this provider.\n * When setting, if the range is invalid (contains NaN or infinite values), it will be stored as undefined.\n * When getting, returns undefined if the range was set to an invalid value.\n */\n public get cartoRange(): MapCartoRectangle | undefined {\n return this._cartoRange;\n }\n\n public set cartoRange(range: MapCartoRectangle | undefined) {\n this._cartoRange = MapLayerImageryProvider.isRangeValid(range) ? range : undefined;\n }\n\n /**\n * This value is used internally for various computations, this should not get overriden.\n * @internal\n */\n protected readonly defaultMinimumZoomLevel = 0;\n\n /**\n * This value is used internally for various computations, this should not get overriden.\n * @internal\n */\n protected readonly defaultMaximumZoomLevel = 22;\n\n /** @internal */\n protected get _filterByCartoRange() { return true; }\n\n constructor(protected readonly _settings: ImageMapLayerSettings, protected _usesCachedTiles: boolean) {\n this._mercatorTilingScheme = new WebMercatorTilingScheme();\n this._geographicTilingScheme = new GeographicTilingScheme(2, 1, true);\n }\n\n /**\n * Initialize the provider by loading the first tile at its default maximum zoom level.\n * @beta\n */\n public async initialize(): Promise<void> {\n this.loadTile(0, 0, this.defaultMaximumZoomLevel).then((tileData: ImageSource | undefined) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (tileData !== undefined)\n this._missingTileData = tileData.data as Uint8Array;\n });\n }\n\n public abstract constructUrl(row: number, column: number, zoomLevel: number): Promise<string>;\n\n public get tilingScheme(): MapTilingScheme { return this.useGeographicTilingScheme ? this._geographicTilingScheme : this._mercatorTilingScheme; }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */\n public addLogoCards(_cards: HTMLTableElement, _viewport: ScreenViewport): void { }\n\n /**\n * Add attribution logo cards for the data supplied by this provider to the [[Viewport]]'s logo div.\n * @param _cards Logo cards HTML element that may contain custom data attributes.\n * @param _viewport Viewport to add logo cards to.\n * @beta\n */\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n /** @internal */\n protected _missingTileData?: Uint8Array;\n\n /** @internal */\n public get transparentBackgroundString(): string { return this._settings.transparentBackground ? \"true\" : \"false\"; }\n\n /** @internal */\n protected async _areChildrenAvailable(_tile: ImageryMapTile): Promise<boolean> { return true; }\n\n /** @internal */\n public getPotentialChildIds(quadId: QuadId): QuadId[] {\n const childLevel = quadId.level + 1;\n return quadId.getChildIds(this.tilingScheme.getNumberOfXChildrenAtLevel(childLevel), this.tilingScheme.getNumberOfYChildrenAtLevel(childLevel));\n }\n\n /**\n * Get child IDs of a quad and generate tiles based on these child IDs.\n * See [[ImageryTileTree._loadChildren]] for the definition of `resolveChildren` where this function is commonly called.\n * @param quadId quad to generate child IDs for.\n * @param resolveChildren Function that creates tiles from child IDs.\n * @beta\n */\n protected _generateChildIds(quadId: QuadId, resolveChildren: (childIds: QuadId[]) => void) {\n resolveChildren(this.getPotentialChildIds(quadId));\n }\n\n /** @internal */\n public generateChildIds(tile: ImageryMapTile, resolveChildren: (childIds: QuadId[]) => void) {\n if (tile.depth >= this.maximumZoomLevel || (undefined !== this.cartoRange && this._filterByCartoRange && !this.cartoRange.intersectsRange(tile.rectangle))) {\n tile.setLeaf();\n return;\n }\n this._generateChildIds(tile.quadId, resolveChildren);\n }\n\n /**\n * Get tooltip text for a specific quad and cartographic position.\n * @param strings List of strings to contain tooltip text.\n * @param quadId Quad ID to get tooltip for.\n * @param _carto Cartographic that may be used to retrieve and/or format tooltip text.\n * @param tree Tree associated with the quad to get the tooltip for.\n * @internal\n */\n public async getToolTip(strings: string[], quadId: QuadId, _carto: Cartographic, tree: ImageryMapTileTree): Promise<void> {\n if (doDebugToolTips) {\n const range = quadId.getLatLongRangeDegrees(tree.tilingScheme);\n strings.push(`QuadId: ${quadId.debugString}, Lat: ${range.low.x} - ${range.high.x} Long: ${range.low.y} - ${range.high.y}`);\n }\n }\n\n /** @internal */\n public async getFeatureInfo(featureInfos: MapLayerFeatureInfo[], _quadId: QuadId, _carto: Cartographic, _tree: ImageryMapTileTree, _hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<void> {\n // default implementation; simply return an empty feature info\n featureInfos.push({ layerName: this._settings.name });\n }\n\n /** @internal */\n public decorate(_context: DecorateContext): void {\n }\n\n /** @internal */\n protected async getImageFromTileResponse(tileResponse: Response, zoomLevel: number) {\n const arrayBuffer = await tileResponse.arrayBuffer();\n const byteArray: Uint8Array = new Uint8Array(arrayBuffer);\n if (!byteArray || (byteArray.length === 0))\n return undefined;\n if (this.matchesMissingTile(byteArray) && zoomLevel > 8)\n return undefined;\n\n const contentType = tileResponse.headers.get(\"content-type\")?.toLowerCase();\n let imageFormat: ImageSourceFormat | undefined;\n if (contentType) {\n // Note: 'includes' is used here instead of exact comparison because we encountered\n // some servers that would give content type such as 'image/png;charset=UTF-8'.\n if (contentType.includes(\"image/jpeg\"))\n imageFormat = ImageSourceFormat.Jpeg;\n else if (contentType.includes(\"image/png\"))\n imageFormat = ImageSourceFormat.Png;\n }\n\n if (imageFormat !== undefined)\n return new ImageSource(byteArray, imageFormat);\n\n assert(false, \"Invalid tile content type\");\n return undefined;\n }\n\n /**\n * Change the status of this provider.\n * Sub-classes should override 'onStatusUpdated' instead of this method.\n * @internal\n */\n public setStatus(status: MapLayerImageryProviderStatus) {\n if (this._status !== status) {\n this.onStatusUpdated(status);\n this._status = status;\n this.onStatusChanged.raiseEvent(this);\n }\n }\n\n /** Method called whenever the status changes, giving the opportunity to sub-classes to have a custom behavior.\n * @internal\n */\n protected onStatusUpdated(_newStatus: MapLayerImageryProviderStatus) { }\n\n /** @internal */\n protected setRequestAuthorization(headers: Headers) {\n if (this._settings.userName && this._settings.password) {\n setBasicAuthorization(headers, this._settings.userName, this._settings.password);\n }\n }\n\n /** @internal */\n public async makeTileRequest(url: string, timeoutMs?: number, authorization?: string): Promise<Response> {\n\n // We want to complete the first request before letting other requests go;\n // this done to avoid flooding server with requests missing credentials\n if (!this._firstRequestPromise)\n this._firstRequestPromise = new Promise<void>((resolve: any) => this.onFirstRequestCompleted.addOnce(()=>resolve()));\n else\n await this._firstRequestPromise;\n\n let response: Response|undefined;\n try {\n response = await this.makeRequest(url, timeoutMs, authorization);\n } finally {\n this.onFirstRequestCompleted.raiseEvent();\n }\n\n if (response === undefined)\n throw new Error(\"fetch call failed\");\n\n return response;\n }\n\n /** @internal */\n public async makeRequest(url: string, timeoutMs?: number, authorization?: string): Promise<Response> {\n\n let response: Response|undefined;\n\n let headers: Headers | undefined;\n let hasCreds = false;\n if (authorization) {\n headers = new Headers();\n headers.set(\"Authorization\", authorization);\n } else if (this._settings.userName && this._settings.password) {\n hasCreds = true;\n headers = new Headers();\n this.setRequestAuthorization(headers);\n }\n const opts: RequestInit = {\n method: \"GET\",\n headers,\n credentials: this._includeUserCredentials ? \"include\" : undefined,\n };\n\n if (timeoutMs !== undefined)\n setRequestTimeout(opts, timeoutMs);\n\n response = await fetch(url, opts);\n\n if (response.status === 401\n && headersIncludeAuthMethod(response.headers, [\"ntlm\", \"negotiate\"])\n && !this._includeUserCredentials\n && !hasCreds\n ) {\n // Removed the previous headers and make sure \"include\" credentials is set\n opts.headers = undefined;\n opts.credentials = \"include\";\n\n // We got a http 401 challenge, lets try again with SSO enabled (i.e. Windows Authentication)\n response = await fetch(url, opts);\n if (response.status === 200) {\n this._includeUserCredentials = true; // avoid going through 401 challenges over and over\n }\n }\n\n return response;\n }\n\n /** Returns a map layer tile at the specified settings. */\n public async loadTile(row: number, column: number, zoomLevel: number): Promise<ImageSource | undefined> {\n\n try {\n const tileUrl: string = await this.constructUrl(row, column, zoomLevel);\n if (tileUrl.length === 0)\n return undefined;\n\n const tileResponse: Response = await this.makeTileRequest(tileUrl);\n\n if (!this._hasSuccessfullyFetchedTile) {\n this._hasSuccessfullyFetchedTile = true;\n }\n\n return await this.getImageFromTileResponse(tileResponse, zoomLevel);\n } catch (error: any) {\n if (error?.status === 401) {\n this.setStatus(MapLayerImageryProviderStatus.RequireAuth);\n\n // Only report error to end-user if we were previously able to fetch tiles\n // and then encountered an error, otherwise I assume an error was already reported\n // through the source validation process.\n if (this._hasSuccessfullyFetchedTile) {\n const msg = IModelApp.localization.getLocalizedString(\"iModelJs:MapLayers.Messages.LoadTileTokenError\", { layerName: this._settings.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n }\n return undefined;\n }\n }\n\n /** @internal */\n protected async toolTipFromUrl(strings: string[], url: string): Promise<void> {\n const headers = new Headers();\n this.setRequestAuthorization(headers);\n\n try {\n const response = await fetch(url, {\n method: \"GET\",\n headers,\n credentials: this._includeUserCredentials ? \"include\" : undefined,\n });\n const text = await response.text();\n if (undefined !== text) {\n strings.push(text);\n }\n } catch {\n }\n }\n\n /** @internal */\n public matchesMissingTile(tileData: Uint8Array): boolean {\n if (!this._missingTileData)\n return false;\n if (tileData.length !== this._missingTileData.length)\n return false;\n for (let i: number = 0; i < tileData.length; i += 10) {\n if (this._missingTileData[i] !== tileData[i]) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Calculates the projected x cartesian coordinate in EPSG:3857 from the longitude in EPSG:4326 (WGS84)\n * @param longitude Longitude in EPSG:4326 (WGS84)\n * @internal\n */\n public getEPSG3857X(longitude: number): number {\n return longitude * 20037508.34 / 180.0;\n }\n\n /**\n * Calculates the projected y cartesian coordinate in EPSG:3857 from the latitude in EPSG:4326 (WGS84)\n * @param latitude Latitude in EPSG:4326 (WGS84)\n * @internal\n */\n public getEPSG3857Y(latitude: number): number {\n const y = Math.log(Math.tan((90.0 + latitude) * Math.PI / 360.0)) / (Math.PI / 180.0);\n return y * 20037508.34 / 180.0;\n }\n\n /**\n * Calculates the longitude in EPSG:4326 (WGS84) from the projected x cartesian coordinate in EPSG:3857\n * @param x3857 Projected x cartesian coordinate in EPSG:3857\n * @internal\n */\n public getEPSG4326Lon(x3857: number): number {\n return Angle.radiansToDegrees(x3857 / earthRadius);\n }\n\n /**\n * Calculates the latitude in EPSG:4326 (WGS84) from the projected y cartesian coordinate in EPSG:3857\n * @param y3857 Projected y cartesian coordinate in EPSG:3857\n * @internal\n */\n public getEPSG4326Lat(y3857: number): number {\n const y = 2 * Math.atan(Math.exp(y3857 / earthRadius)) - (Math.PI / 2);\n return Angle.radiansToDegrees(y);\n }\n\n /**\n * Get the bounding box/extents of a tile in EPSG:4326 (WGS84) format.\n * Map tile providers like Bing and Mapbox allow the URL to be constructed directly from the zoom level and tile coordinates.\n * However, WMS-based servers take a bounding box instead. This method can help get that bounding box from a tile.\n * @param row Row of the tile\n * @param column Column of the tile\n * @param zoomLevel Desired zoom level of the tile\n * @internal\n */\n public getEPSG4326Extent(row: number, column: number, zoomLevel: number): WGS84Extent {\n // Shift left (this.tileSize << zoomLevel) overflow when using 512 pixels tile at higher resolution,\n // so use Math.pow instead (I assume the performance lost to be minimal)\n const mapSize = this.tileSize * Math.pow(2, zoomLevel);\n const leftGrid = this.tileSize * column;\n const topGrid = this.tileSize * row;\n\n const longitudeLeft = 360 * ((leftGrid / mapSize) - 0.5);\n const y0 = 0.5 - ((topGrid + this.tileSize) / mapSize);\n const latitudeBottom = 90.0 - 360.0 * Math.atan(Math.exp(-y0 * 2 * Math.PI)) / Math.PI;\n\n const longitudeRight = 360 * (((leftGrid + this.tileSize) / mapSize) - 0.5);\n const y1 = 0.5 - (topGrid / mapSize);\n const latitudeTop = 90.0 - 360.0 * Math.atan(Math.exp(-y1 * 2 * Math.PI)) / Math.PI;\n\n return { longitudeLeft, longitudeRight, latitudeTop, latitudeBottom };\n }\n\n /**\n * Get the bounding box/extents of a tile in EPSG:3857 format.\n * @param row Row of the tile\n * @param column Column of the tile\n * @param zoomLevel Desired zoom level of the tile\n * @internal\n */\n public getEPSG3857Extent(row: number, column: number, zoomLevel: number): { left: number, right: number, top: number, bottom: number } {\n const epsg4326Extent = this.getEPSG4326Extent(row, column, zoomLevel);\n\n const left = this.getEPSG3857X(epsg4326Extent.longitudeLeft);\n const right = this.getEPSG3857X(epsg4326Extent.longitudeRight);\n const bottom = this.getEPSG3857Y(epsg4326Extent.latitudeBottom);\n const top = this.getEPSG3857Y(epsg4326Extent.latitudeTop);\n\n return { left, right, bottom, top };\n }\n\n /** @internal */\n public getEPSG3857ExtentString(row: number, column: number, zoomLevel: number) {\n const tileExtent = this.getEPSG3857Extent(row, column, zoomLevel);\n return `${tileExtent.left.toFixed(2)},${tileExtent.bottom.toFixed(2)},${tileExtent.right.toFixed(2)},${tileExtent.top.toFixed(2)}`;\n }\n\n /** @internal */\n public getEPSG4326TileExtentString(row: number, column: number, zoomLevel: number, latLongAxisOrdering: boolean) {\n const tileExtent = this.getEPSG4326Extent(row, column, zoomLevel);\n return this.getEPSG4326ExtentString(tileExtent, latLongAxisOrdering);\n\n }\n\n /** @internal */\n public getEPSG4326ExtentString(tileExtent: WGS84Extent, latLongAxisOrdering: boolean) {\n\n if (latLongAxisOrdering) {\n return `${tileExtent.latitudeBottom.toFixed(8)},${tileExtent.longitudeLeft.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)},${tileExtent.longitudeRight.toFixed(8)}`;\n } else {\n return `${tileExtent.longitudeLeft.toFixed(8)},${tileExtent.latitudeBottom.toFixed(8)},${tileExtent.longitudeRight.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)}`;\n }\n }\n\n /** Append custom parameters for settings to provided URL object.\n * @internal\n */\n protected appendCustomParams(url: string) {\n if (!this._settings.savedQueryParams && !this._settings.unsavedQueryParams)\n return url;\n\n let tmpUrl = appendQueryParams(url, this._settings.savedQueryParams);\n tmpUrl = appendQueryParams(tmpUrl, this._settings.unsavedQueryParams);\n return tmpUrl;\n }\n}\n"]}
@@ -531,7 +531,7 @@ export class IModelApp {
531
531
  static makeIModelJsLogoCard() {
532
532
  return this.makeLogoCard({
533
533
  iconSrc: `${this.publicPath}images/about-imodeljs.svg`,
534
- heading: `<span style="font-weight:normal">${this.localization.getLocalizedString("iModelJs:Notices.PoweredBy")}</span>&nbsp;iTwin.js`,
534
+ heading: `<span class="itwinjs-header-lead">${this.localization.getLocalizedString("iModelJs:Notices.PoweredBy")}</span>&nbsp;iTwin.js`,
535
535
  notice: `${ITWINJS_CORE_VERSION}<br>${COPYRIGHT_NOTICE}`,
536
536
  });
537
537
  }