commit 12152c2db4a1f1844ad2af895c900b5a4c897422 Author: wong2 Date: Tue Feb 21 17:10:17 2023 +0800 init diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..27d8ea2 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "parser": "@typescript-eslint/parser", + "env": { + "browser": true + }, + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "prettier" + ], + "overrides": [], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "react/react-in-jsx-scope": "off" + }, + "ignorePatterns": ["build/**"] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..19d2606 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,16 @@ +{ + "printWidth": 120, + "semi": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all", + "bracketSpacing": true, + "overrides": [ + { + "files": ".prettierrc", + "options": { + "parser": "json" + } + } + ] +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..97561b7 --- /dev/null +++ b/manifest.json @@ -0,0 +1,12 @@ +{ + "manifest_version": 3, + "name": "ChatHub", + "version": "0.0.1", + "background": { + "service_worker": "src/background/index.ts", + "type": "module" + }, + "action": {}, + "host_permissions": ["https://*.bing.com/", "https://*.openai.com/"], + "permissions": ["storage"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a517f06 --- /dev/null +++ b/package.json @@ -0,0 +1,68 @@ +{ + "name": "chatbox-extension", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@crxjs/vite-plugin": "^2.0.0-beta.12", + "@parcel/config-webextension": "^2.8.3", + "@parcel/optimizer-data-url": "2.8.3", + "@parcel/transformer-inline-string": "2.8.3", + "@types/lodash-es": "^4.17.6", + "@types/react": "^18.0.28", + "@types/react-dom": "^18.0.11", + "@types/react-scroll-to-bottom": "^4.2.0", + "@types/uuid": "^9.0.0", + "@types/webextension-polyfill": "^0.10.0", + "@typescript-eslint/eslint-plugin": "^5.52.0", + "@typescript-eslint/parser": "^5.52.0", + "@vitejs/plugin-react": "^3.1.0", + "autoprefixer": "^10.4.13", + "eslint": "^8.34.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^4.6.0", + "parcel": "^2.8.3", + "postcss": "^8.4.21", + "postcss-nesting": "^11.2.1", + "prettier": "^2.8.4", + "process": "^0.11.10", + "tailwindcss": "^3.2.7", + "typescript": "^4.9.3", + "vite": "^4.1.0", + "vite-tsconfig-paths": "^4.0.5" + }, + "dependencies": { + "@chakra-ui/icons": "^2.0.17", + "@chakra-ui/react": "^2.5.1", + "@emotion/react": "^11.10.6", + "@emotion/styled": "^11.10.6", + "@tanstack/react-router": "^0.0.1-beta.83", + "eventsource-parser": "^0.1.0", + "expiry-map": "^2.0.0", + "framer-motion": "^9.0.4", + "github-markdown-css": "^5.2.0", + "immer": "^9.0.19", + "jotai": "^2.0.2", + "jotai-immer": "^0.2.0", + "lodash-es": "^4.17.21", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-ga4": "^2.0.0", + "react-markdown": "^8.0.5", + "react-scroll-to-bottom": "^4.2.0", + "remark-gfm": "^3.0.1", + "remark-supersub": "^1.0.0", + "use-immer": "^0.8.1", + "uuid": "^9.0.0", + "webextension-polyfill": "^0.10.0", + "websocket-as-promised": "^2.0.1", + "wretch": "^2.4.1", + "zustand": "^4.3.3" + } +} diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000..9c27a8c --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,8 @@ +module.exports = { + plugins: { + 'postcss-import': {}, + 'tailwindcss/nesting': 'postcss-nesting', + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/src/app/bots/abstract-bot.ts b/src/app/bots/abstract-bot.ts new file mode 100644 index 0000000..3c84092 --- /dev/null +++ b/src/app/bots/abstract-bot.ts @@ -0,0 +1,32 @@ +import { ErrorCode } from '~utils/errors' + +export type Event = + | { + type: 'UPDATE_ANSWER' + data: { + text: string + } + } + | { + type: 'DONE' + } + | { + type: 'ERROR' + data: { + code: ErrorCode + message: string + } + } + +export interface SendMessageParams { + prompt: string + onEvent: (event: Event) => void + signal?: AbortSignal +} + +export abstract class AbstractBot { + abstract name: string + abstract logo: string + abstract sendMessage(params: SendMessageParams): Promise + abstract resetConversation(): Promise +} diff --git a/src/app/bots/bing/api.ts b/src/app/bots/bing/api.ts new file mode 100644 index 0000000..ec16e6c --- /dev/null +++ b/src/app/bots/bing/api.ts @@ -0,0 +1,17 @@ +import wretch from 'wretch' +import { uuid } from '~utils' +import { ConversationResponse } from './types' + +export async function createConversation(): Promise { + const resp: ConversationResponse = await wretch('https://www.bing.com/turing/conversation/create') + .headers({ + 'x-ms-client-request-id': uuid(), + 'x-ms-useragent': 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/Win32', + }) + .get() + .json() + if (resp.result.value !== 'Success') { + throw new Error(`Failed to create conversation: ${resp.result.value} ${resp.result.message}`) + } + return resp +} diff --git a/src/app/bots/bing/code.js b/src/app/bots/bing/code.js new file mode 100644 index 0000000..2e8669a --- /dev/null +++ b/src/app/bots/bing/code.js @@ -0,0 +1,117557 @@ +/*! For license information please see cib.bundle.js.LICENSE.txt */ +;(() => { + var e = { + 7659: () => {}, + 5114: function (e, t) { + 'use strict' + var n, + i = + (this && this.__extends) || + ((n = function (e, t) { + return ( + (n = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + n(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + n(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.LoginRequestResponse = + t.ErrorResponse = + t.SuccessResponse = + t.ActivityResponse = + t.ActivityRequestError = + t.ActivityRequestTrigger = + void 0), + (function (e) { + ;(e.Automatic = 'automatic'), (e.Manual = 'manual') + })(t.ActivityRequestTrigger || (t.ActivityRequestTrigger = {})) + var ActivityRequestError = function (e, t) { + ;(this.code = e), (this.message = t) + } + t.ActivityRequestError = ActivityRequestError + var ActivityResponse = function (e) { + this.request = e + } + t.ActivityResponse = ActivityResponse + var r = (function (e) { + function SuccessResponse(t, n) { + var i = e.call(this, t) || this + return (i.request = t), (i.rawContent = n), i + } + return i(SuccessResponse, e), SuccessResponse + })(ActivityResponse) + t.SuccessResponse = r + var o = (function (e) { + function ErrorResponse(t, n) { + var i = e.call(this, t) || this + return (i.request = t), (i.error = n), i + } + return i(ErrorResponse, e), ErrorResponse + })(ActivityResponse) + t.ErrorResponse = o + var s = (function (e) { + function LoginRequestResponse(t, n) { + var i = e.call(this, t) || this + ;(i.request = t), (i._auth = n) + for (var r = 0, o = i._auth.buttons; r < o.length; r++) { + var s = o[r] + if ('signin' === s.type && void 0 !== s.value) + try { + new URL(s.value), (i.signinButton = s) + break + } catch (e) {} + } + return i + } + return ( + i(LoginRequestResponse, e), + Object.defineProperty(LoginRequestResponse.prototype, 'tokenExchangeResource', { + get: function () { + return this._auth.tokenExchangeResource + }, + enumerable: !1, + configurable: !0, + }), + LoginRequestResponse + ) + })(ActivityResponse) + t.LoginRequestResponse = s + }, + 3125: function (e, t, n) { + 'use strict' + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function fulfilled(e) { + try { + step(i.next(e)) + } catch (e) { + o(e) + } + } + function rejected(e) { + try { + step(i.throw(e)) + } catch (e) { + o(e) + } + } + function step(e) { + var t + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t) + })).then(fulfilled, rejected) + } + step((i = i.apply(e, t || [])).next()) + }) + }, + r = + (this && this.__generator) || + function (e, t) { + var n, + i, + r, + o, + s = { + label: 0, + sent: function () { + if (1 & r[0]) throw r[1] + return r[1] + }, + trys: [], + ops: [], + } + return ( + (o = { + next: verb(0), + throw: verb(1), + return: verb(2), + }), + 'function' == typeof Symbol && + (o[Symbol.iterator] = function () { + return this + }), + o + ) + function verb(o) { + return function (a) { + return (function (o) { + if (n) throw new TypeError('Generator is already executing.') + for (; s; ) + try { + if ( + ((n = 1), + i && + (r = 2 & o[0] ? i.return : o[0] ? i.throw || ((r = i.return) && r.call(i), 0) : i.next) && + !(r = r.call(i, o[1])).done) + ) + return r + switch (((i = 0), r && (o = [2 & o[0], r.value]), o[0])) { + case 0: + case 1: + r = o + break + case 4: + return ( + s.label++, + { + value: o[1], + done: !1, + } + ) + case 5: + s.label++, (i = o[1]), (o = [0]) + continue + case 7: + ;(o = s.ops.pop()), s.trys.pop() + continue + default: + if (!((r = s.trys), (r = r.length > 0 && r[r.length - 1]) || (6 !== o[0] && 2 !== o[0]))) { + s = 0 + continue + } + if (3 === o[0] && (!r || (o[1] > r[0] && o[1] < r[3]))) { + s.label = o[1] + break + } + if (6 === o[0] && s.label < r[1]) { + ;(s.label = r[1]), (r = o) + break + } + if (r && s.label < r[2]) { + ;(s.label = r[2]), s.ops.push(o) + break + } + r[2] && s.ops.pop(), s.trys.pop() + continue + } + o = t.call(e, s) + } catch (e) { + ;(o = [6, e]), (i = 0) + } finally { + n = r = 0 + } + if (5 & o[0]) throw o[1] + return { + value: o[0] ? o[1] : void 0, + done: !0, + } + })([o, a]) + } + } + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.AdaptiveApplet = void 0) + var o = n(9003), + s = n(7794), + a = n(8418), + l = n(5114), + c = n(6758), + d = n(7191), + p = n(2421) + function logEvent(e, t) { + for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i] + if (a.GlobalSettings.applets.logEnabled) + if (a.GlobalSettings.applets.onLogEvent) a.GlobalSettings.applets.onLogEvent(e, t, n) + else + switch (e) { + case o.LogLevel.Warning: + console.warn(t, n) + break + case o.LogLevel.Error: + console.error(t, n) + break + default: + console.log(t, n) + } + } + var u = (function () { + function ActivityRequest(e, t, n) { + ;(this.action = e), (this.trigger = t), (this.consecutiveRefreshes = n), (this.attemptNumber = 0) + } + return ( + (ActivityRequest.prototype.retryAsync = function () { + return i(this, void 0, void 0, function () { + return r(this, function (e) { + return this.onSend && this.onSend(this), [2] + }) + }) + }), + ActivityRequest + ) + })(), + h = (function () { + function AdaptiveApplet() { + ;(this._allowAutomaticCardUpdate = !1), + (this.renderedElement = document.createElement('div')), + (this.renderedElement.className = 'aaf-cardHost'), + (this.renderedElement.style.position = 'relative'), + (this.renderedElement.style.display = 'flex'), + (this.renderedElement.style.flexDirection = 'column'), + (this._cardHostElement = document.createElement('div')), + (this._refreshButtonHostElement = document.createElement('div')), + (this._refreshButtonHostElement.className = 'aaf-refreshButtonHost'), + (this._refreshButtonHostElement.style.display = 'none'), + this.renderedElement.appendChild(this._cardHostElement), + this.renderedElement.appendChild(this._refreshButtonHostElement) + } + return ( + (AdaptiveApplet.prototype.displayCard = function (e) { + if (!e.renderedElement) throw new Error('displayCard: undefined card.') + s.clearElementChildren(this._cardHostElement), + (this._refreshButtonHostElement.style.display = 'none'), + this._cardHostElement.appendChild(e.renderedElement) + }), + (AdaptiveApplet.prototype.showManualRefreshButton = function (e) { + var t = this + if (!this.onShowManualRefreshButton || this.onShowManualRefreshButton(this)) { + this._refreshButtonHostElement.style.display = 'none' + var n = void 0 + if (this.onRenderManualRefreshButton) n = this.onRenderManualRefreshButton(this) + else { + var i = c.Strings.runtime.refreshThisCard() + if (a.GlobalSettings.applets.refresh.mode === o.RefreshMode.Automatic) { + var r = c.Strings.runtime.automaticRefreshPaused() + ' ' !== r[r.length - 1] && (r += ' '), (i = c.Strings.runtime.clckToRestartAutomaticRefresh()) + } + var u = { + type: 'AdaptiveCard', + version: '1.2', + body: [ + { + type: 'RichTextBlock', + horizontalAlignment: 'right', + inlines: [ + { + type: 'TextRun', + text: i, + selectAction: { + type: 'Action.Submit', + id: 'refreshCard', + }, + }, + ], + }, + ], + }, + h = new d.AdaptiveCard() + h.parse(u, new d.SerializationContext(p.Versions.v1_2)), + (h.onExecuteAction = function (n) { + 'refreshCard' === n.id && + (s.clearElementChildren(t._refreshButtonHostElement), + t.internalExecuteAction(e, l.ActivityRequestTrigger.Automatic, 0)) + }), + (n = h.render()) + } + n && + (s.clearElementChildren(this._refreshButtonHostElement), + this._refreshButtonHostElement.appendChild(n), + this._refreshButtonHostElement.style.removeProperty('display')) + } + }), + (AdaptiveApplet.prototype.createActivityRequest = function (e, t, n) { + var i = this + if (this.card) { + var r = new u(e, t, n) + return ( + (r.onSend = function (e) { + e.attemptNumber++, i.internalSendActivityRequestAsync(r) + }), + !!this.onPrepareActivityRequest && !this.onPrepareActivityRequest(this, r, e) ? void 0 : r + ) + } + throw new Error('createActivityRequest: no card has been set.') + }), + (AdaptiveApplet.prototype.createMagicCodeInputCard = function (e) { + var t = { + type: 'AdaptiveCard', + version: '1.0', + body: [ + { + type: 'TextBlock', + color: 'attention', + text: 1 === e ? void 0 : "That didn't work... let's try again.", + wrap: !0, + horizontalAlignment: 'center', + }, + { + type: 'TextBlock', + text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"', + wrap: !0, + horizontalAlignment: 'center', + }, + { + type: 'Input.Text', + id: 'magicCode', + placeholder: 'Enter magic code', + }, + { + type: 'ActionSet', + horizontalAlignment: 'center', + actions: [ + { + type: 'Action.Submit', + id: AdaptiveApplet._submitMagicCodeActionId, + title: 'Submit', + }, + { + type: 'Action.Submit', + id: AdaptiveApplet._cancelMagicCodeAuthActionId, + title: 'Cancel', + }, + ], + }, + ], + }, + n = new d.AdaptiveCard() + return n.parse(t), n + }), + (AdaptiveApplet.prototype.cancelAutomaticRefresh = function () { + this._allowAutomaticCardUpdate && + logEvent( + o.LogLevel.Warning, + 'Automatic card refresh has been cancelled as a result of the user interacting with the card.', + ), + (this._allowAutomaticCardUpdate = !1) + }), + (AdaptiveApplet.prototype.createSerializationContext = function () { + return this.onCreateSerializationContext + ? this.onCreateSerializationContext(this) + : new d.SerializationContext() + }), + (AdaptiveApplet.prototype.internalSetCard = function (e, t) { + var n = this + if (('object' == typeof e && 'AdaptiveCard' === e.type && (this._cardPayload = e), this._cardPayload)) + try { + var i = new d.AdaptiveCard() + this.hostConfig && (i.hostConfig = this.hostConfig) + var r = this.createSerializationContext() + if ( + (i.parse(this._cardPayload, r), + (!this.onCardChanging || this.onCardChanging(this, this._cardPayload)) && + ((this._card = i), + this._card.authentication && + this._card.authentication.tokenExchangeResource && + this.onPrefetchSSOToken && + this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource), + (this._card.onExecuteAction = function (e) { + n.cancelAutomaticRefresh(), n.internalExecuteAction(e, l.ActivityRequestTrigger.Manual, 0) + }), + (this._card.onInputValueChanged = function (e) { + n.cancelAutomaticRefresh() + }), + this._card.render(), + this._card.renderedElement && + (this.displayCard(this._card), + this.onCardChanged && this.onCardChanged(this), + this._card.refresh))) + ) + if ( + a.GlobalSettings.applets.refresh.mode === o.RefreshMode.Automatic && + t < a.GlobalSettings.applets.refresh.maximumConsecutiveAutomaticRefreshes + ) + if (a.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <= 0) + logEvent(o.LogLevel.Info, 'Triggering automatic card refresh number ' + (t + 1)), + this.internalExecuteAction( + this._card.refresh.action, + l.ActivityRequestTrigger.Automatic, + t + 1, + ) + else { + logEvent( + o.LogLevel.Info, + 'Scheduling automatic card refresh number ' + + (t + 1) + + ' in ' + + a.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes + + 'ms', + ) + var s = this._card.refresh.action + ;(this._allowAutomaticCardUpdate = !0), + window.setTimeout(function () { + n._allowAutomaticCardUpdate && + n.internalExecuteAction(s, l.ActivityRequestTrigger.Automatic, t + 1) + }, a.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes) + } + else + a.GlobalSettings.applets.refresh.mode !== o.RefreshMode.Disabled && + (logEvent( + o.LogLevel.Warning, + t > 0 + ? 'Stopping automatic refreshes after ' + t + ' consecutive refreshes.' + : 'The card has a refresh section, but automatic refreshes are disabled.', + ), + (a.GlobalSettings.applets.refresh.allowManualRefreshesAfterAutomaticRefreshes || + a.GlobalSettings.applets.refresh.mode === o.RefreshMode.Manual) && + (logEvent(o.LogLevel.Info, 'Showing manual refresh button.'), + this.showManualRefreshButton(this._card.refresh.action))) + } catch (e) { + logEvent(o.LogLevel.Error, 'setCard: ' + e) + } + }), + (AdaptiveApplet.prototype.internalExecuteAction = function (e, t, n) { + if (e instanceof d.ExecuteAction) { + if (!this.channelAdapter) throw new Error('internalExecuteAction: No channel adapter set.') + var i = this.createActivityRequest(e, t, n) + i && i.retryAsync() + } + this.onAction && this.onAction(this, e) + }), + (AdaptiveApplet.prototype.createProgressOverlay = function (e) { + if (!this._progressOverlay) + if (this.onCreateProgressOverlay) this._progressOverlay = this.onCreateProgressOverlay(this, e) + else { + ;(this._progressOverlay = document.createElement('div')), + (this._progressOverlay.className = 'aaf-progress-overlay') + var t = document.createElement('div') + ;(t.className = 'aaf-spinner'), + (t.style.width = '28px'), + (t.style.height = '28px'), + this._progressOverlay.appendChild(t) + } + return this._progressOverlay + }), + (AdaptiveApplet.prototype.removeProgressOverlay = function (e) { + this.onRemoveProgressOverlay && this.onRemoveProgressOverlay(this, e), + void 0 !== this._progressOverlay && + (this.renderedElement.removeChild(this._progressOverlay), (this._progressOverlay = void 0)) + }), + (AdaptiveApplet.prototype.activityRequestSucceeded = function (e, t) { + this.onActivityRequestSucceeded && this.onActivityRequestSucceeded(this, e, t) + }), + (AdaptiveApplet.prototype.activityRequestFailed = function (e) { + return this.onActivityRequestFailed + ? this.onActivityRequestFailed(this, e) + : a.GlobalSettings.applets.defaultTimeBetweenRetryAttempts + }), + (AdaptiveApplet.prototype.showAuthCodeInputDialog = function (e) { + var t = this + if (!this.onShowAuthCodeInputDialog || this.onShowAuthCodeInputDialog(this, e)) { + var n = this.createMagicCodeInputCard(e.attemptNumber) + n.render(), + (n.onExecuteAction = function (n) { + if (t.card && n instanceof d.SubmitAction) + switch (n.id) { + case AdaptiveApplet._submitMagicCodeActionId: + var i = void 0 + n.data && 'string' == typeof n.data.magicCode && (i = n.data.magicCode), + i + ? (t.displayCard(t.card), (e.authCode = i), e.retryAsync()) + : alert('Please enter the magic code you received.') + break + case AdaptiveApplet._cancelMagicCodeAuthActionId: + logEvent(o.LogLevel.Warning, 'Authentication cancelled by user.'), t.displayCard(t.card) + break + default: + logEvent( + o.LogLevel.Error, + 'Unexpected action taken from magic code input card (id = ' + n.id + ')', + ), + alert(c.Strings.magicCodeInputCard.somethingWentWrong()) + } + }), + this.displayCard(n) + } + }), + (AdaptiveApplet.prototype.internalSendActivityRequestAsync = function (e) { + return i(this, void 0, void 0, function () { + var t, n, i, s + return r(this, function (d) { + switch (d.label) { + case 0: + if (!this.channelAdapter) + throw new Error('internalSendActivityRequestAsync: channelAdapter is not set.') + void 0 !== (t = this.createProgressOverlay(e)) && this.renderedElement.appendChild(t), + (n = !1), + (i = function () { + var t, i, d, p, u, h, m + return r(this, function (r) { + switch (r.label) { + case 0: + ;(t = void 0), + 1 === e.attemptNumber + ? logEvent( + o.LogLevel.Info, + 'Sending activity request to channel (attempt ' + e.attemptNumber + ')', + ) + : logEvent( + o.LogLevel.Info, + 'Re-sending activity request to channel (attempt ' + e.attemptNumber + ')', + ), + (r.label = 1) + case 1: + return r.trys.push([1, 3, , 4]), [4, s.channelAdapter.sendRequestAsync(e)] + case 2: + return (t = r.sent()), [3, 4] + case 3: + return ( + (i = r.sent()), + logEvent(o.LogLevel.Error, 'Activity request failed: ' + i), + s.removeProgressOverlay(e), + (n = !0), + [3, 4] + ) + case 4: + if (!t) return [3, 10] + if (!(t instanceof l.SuccessResponse)) return [3, 5] + if ((s.removeProgressOverlay(e), void 0 === t.rawContent)) + throw new Error( + 'internalSendActivityRequestAsync: Action.Execute result is undefined', + ) + d = t.rawContent + try { + d = JSON.parse(t.rawContent) + } catch (e) {} + if ('string' == typeof d) + logEvent( + o.LogLevel.Info, + 'The activity request returned a string after ' + + e.attemptNumber + + ' attempt(s).', + ), + s.activityRequestSucceeded(t, d) + else { + if ('object' != typeof d || 'AdaptiveCard' !== d.type) + throw new Error( + 'internalSendActivityRequestAsync: Action.Execute result is of unsupported type (' + + typeof t.rawContent + + ')', + ) + logEvent( + o.LogLevel.Info, + 'The activity request returned an Adaptive Card after ' + + e.attemptNumber + + ' attempt(s).', + ), + s.internalSetCard(d, e.consecutiveRefreshes), + s.activityRequestSucceeded(t, s.card) + } + return (n = !0), [3, 10] + case 5: + return t instanceof l.ErrorResponse + ? (p = s.activityRequestFailed(t)) >= 0 && + e.attemptNumber < a.GlobalSettings.applets.maximumRetryAttempts + ? (logEvent( + o.LogLevel.Warning, + 'Activity request failed: ' + .concat(t.error.message, '. Retrying in ') + .concat(p, 'ms'), + ), + e.attemptNumber++, + [ + 4, + new Promise(function (e, t) { + window.setTimeout(function () { + e() + }, p) + }), + ]) + : [3, 7] + : [3, 9] + case 6: + return r.sent(), [3, 8] + case 7: + logEvent( + o.LogLevel.Error, + 'Activity request failed: ' + .concat(t.error.message, '. Giving up after ') + .concat(e.attemptNumber, ' attempt(s)'), + ), + s.removeProgressOverlay(e), + (n = !0), + (r.label = 8) + case 8: + return [3, 10] + case 9: + if (t instanceof l.LoginRequestResponse) { + if ( + (logEvent( + o.LogLevel.Info, + 'The activity request returned a LoginRequestResponse after ' + + e.attemptNumber + + ' attempt(s).', + ), + e.attemptNumber <= a.GlobalSettings.applets.maximumRetryAttempts) + ) { + if ( + ((u = !0), + t.tokenExchangeResource && + s.onSSOTokenNeeded && + (u = !s.onSSOTokenNeeded(s, e, t.tokenExchangeResource)), + u) + ) { + if ((s.removeProgressOverlay(e), void 0 === t.signinButton)) + throw new Error( + "internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.", + ) + logEvent(o.LogLevel.Info, 'Login required at ' + t.signinButton.value), + s.onShowSigninPrompt + ? s.onShowSigninPrompt(s, e, t.signinButton) + : (s.showAuthCodeInputDialog(e), + (h = + window.screenX + + (window.outerWidth - a.GlobalSettings.applets.authPromptWidth) / 2), + (m = + window.screenY + + (window.outerHeight - a.GlobalSettings.applets.authPromptHeight) / 2), + window.open( + t.signinButton.value, + t.signinButton.title ? t.signinButton.title : 'Sign in', + 'width=' + .concat(a.GlobalSettings.applets.authPromptWidth, ',height=') + .concat(a.GlobalSettings.applets.authPromptHeight, ',left=') + .concat(h, ',top=') + .concat(m), + )) + } + } else + logEvent( + o.LogLevel.Error, + 'Authentication failed. Giving up after ' + e.attemptNumber + ' attempt(s)', + ), + alert(c.Strings.magicCodeInputCard.authenticationFailed()) + return [2, 'break'] + } + throw new Error('Unhandled response type: ' + JSON.stringify(t)) + case 10: + return [2] + } + }) + }), + (s = this), + (d.label = 1) + case 1: + return n ? [3, 3] : [5, i()] + case 2: + return 'break' === d.sent() ? [3, 3] : [3, 1] + case 3: + return [2] + } + }) + }) + }), + (AdaptiveApplet.prototype.refreshCard = function () { + this._card && + this._card.refresh && + this.internalExecuteAction(this._card.refresh.action, l.ActivityRequestTrigger.Manual, 0) + }), + (AdaptiveApplet.prototype.setCard = function (e) { + this.internalSetCard(e, 0) + }), + Object.defineProperty(AdaptiveApplet.prototype, 'card', { + get: function () { + return this._card + }, + enumerable: !1, + configurable: !0, + }), + (AdaptiveApplet._submitMagicCodeActionId = 'submitMagicCode'), + (AdaptiveApplet._cancelMagicCodeAuthActionId = 'cancelMagicCodeAuth'), + AdaptiveApplet + ) + })() + t.AdaptiveApplet = h + }, + 8911: function (e, t, n) { + 'use strict' + var i = + (this && this.__createBinding) || + (Object.create + ? function (e, t, n, i) { + void 0 === i && (i = n) + var r = Object.getOwnPropertyDescriptor(t, n) + ;(r && !('get' in r ? !t.__esModule : r.writable || r.configurable)) || + (r = { + enumerable: !0, + get: function () { + return t[n] + }, + }), + Object.defineProperty(e, i, r) + } + : function (e, t, n, i) { + void 0 === i && (i = n), (e[i] = t[n]) + }), + r = + (this && this.__exportStar) || + function (e, t) { + for (var n in e) 'default' === n || Object.prototype.hasOwnProperty.call(t, n) || i(t, e, n) + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + r(n(6758), t), + r(n(9003), t), + r(n(8418), t), + r(n(7794), t), + r(n(2421), t), + r(n(9779), t), + r(n(351), t), + r(n(9301), t), + r(n(182), t), + r(n(7191), t), + r(n(7516), t), + r(n(6629), t), + r(n(160), t), + r(n(5114), t), + r(n(3125), t) + }, + 7191: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }), + o = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + s = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i) + else + for (var a = e.length - 1; a >= 0; a--) + (r = e[a]) && (s = (o < 3 ? r(s) : o > 3 ? r(t, n, s) : r(t, n)) || s) + return o > 3 && s && Object.defineProperty(t, n, s), s + }, + s = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function fulfilled(e) { + try { + step(i.next(e)) + } catch (e) { + o(e) + } + } + function rejected(e) { + try { + step(i.throw(e)) + } catch (e) { + o(e) + } + } + function step(e) { + var t + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t) + })).then(fulfilled, rejected) + } + step((i = i.apply(e, t || [])).next()) + }) + }, + a = + (this && this.__generator) || + function (e, t) { + var n, + i, + r, + o, + s = { + label: 0, + sent: function () { + if (1 & r[0]) throw r[1] + return r[1] + }, + trys: [], + ops: [], + } + return ( + (o = { + next: verb(0), + throw: verb(1), + return: verb(2), + }), + 'function' == typeof Symbol && + (o[Symbol.iterator] = function () { + return this + }), + o + ) + function verb(o) { + return function (a) { + return (function (o) { + if (n) throw new TypeError('Generator is already executing.') + for (; s; ) + try { + if ( + ((n = 1), + i && + (r = 2 & o[0] ? i.return : o[0] ? i.throw || ((r = i.return) && r.call(i), 0) : i.next) && + !(r = r.call(i, o[1])).done) + ) + return r + switch (((i = 0), r && (o = [2 & o[0], r.value]), o[0])) { + case 0: + case 1: + r = o + break + case 4: + return ( + s.label++, + { + value: o[1], + done: !1, + } + ) + case 5: + s.label++, (i = o[1]), (o = [0]) + continue + case 7: + ;(o = s.ops.pop()), s.trys.pop() + continue + default: + if (!((r = s.trys), (r = r.length > 0 && r[r.length - 1]) || (6 !== o[0] && 2 !== o[0]))) { + s = 0 + continue + } + if (3 === o[0] && (!r || (o[1] > r[0] && o[1] < r[3]))) { + s.label = o[1] + break + } + if (6 === o[0] && s.label < r[1]) { + ;(s.label = r[1]), (r = o) + break + } + if (r && s.label < r[2]) { + ;(s.label = r[2]), s.ops.push(o) + break + } + r[2] && s.ops.pop(), s.trys.pop() + continue + } + o = t.call(e, s) + } catch (e) { + ;(o = [6, e]), (i = 0) + } finally { + n = r = 0 + } + if (5 & o[0]) throw o[1] + return { + value: o[0] ? o[1] : void 0, + done: !0, + } + })([o, a]) + } + } + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.ContainerWithActions = + t.ColumnSet = + t.Column = + t.Container = + t.BackgroundImage = + t.ContainerBase = + t.StylableCardElementContainer = + t.ContainerStyleProperty = + t.ActionSet = + t.ShowCardAction = + t.HttpAction = + t.HttpHeader = + t.ToggleVisibilityAction = + t.OpenUrlAction = + t.ExecuteAction = + t.SubmitAction = + t.SubmitActionBase = + t.Action = + t.TimeInput = + t.TimeProperty = + t.DateInput = + t.NumberInput = + t.ChoiceSetInput = + t.Choice = + t.ToggleInput = + t.TextInput = + t.Input = + t.Media = + t.YouTubePlayer = + t.DailymotionPlayer = + t.VimeoPlayer = + t.IFrameMediaMediaPlayer = + t.CustomMediaPlayer = + t.HTML5MediaPlayer = + t.MediaPlayer = + t.MediaSource = + t.CaptionSource = + t.ContentSource = + t.ImageSet = + t.CardElementContainer = + t.Image = + t.FactSet = + t.Fact = + t.RichTextBlock = + t.TextRun = + t.TextBlock = + t.BaseTextBlock = + t.ActionProperty = + t.CardElement = + t.renderSeparation = + void 0), + (t.SerializationContext = + t.AdaptiveCard = + t.Authentication = + t.TokenExchangeResource = + t.AuthCardButton = + t.RefreshDefinition = + t.RefreshActionProperty = + void 0) + var l = n(9003), + c = n(8418), + d = n(7794), + p = n(351), + u = n(9514), + h = n(182), + m = n(2421), + g = n(9301), + _ = n(6758), + f = n(9336) + function clearElement(e) { + var t, + n, + i = + 'undefined' == typeof window + ? '' + : null !== (n = null === (t = window.trustedTypes) || void 0 === t ? void 0 : t.emptyHTML) && + void 0 !== n + ? n + : '' + e.innerHTML = i + } + function renderSeparation(e, t, n) { + if (t.spacing > 0 || (t.lineThickness && t.lineThickness > 0)) { + var i = document.createElement('div') + ;(i.className = e.makeCssClassName( + 'ac-' + (n === l.Orientation.Horizontal ? 'horizontal' : 'vertical') + '-separator', + )), + i.setAttribute('aria-hidden', 'true') + var r = t.lineColor ? d.stringToCssColor(t.lineColor) : '' + return ( + n === l.Orientation.Horizontal + ? t.lineThickness + ? ((i.style.paddingTop = t.spacing / 2 + 'px'), + (i.style.marginBottom = t.spacing / 2 + 'px'), + (i.style.borderBottom = t.lineThickness + 'px solid ' + r)) + : (i.style.height = t.spacing + 'px') + : t.lineThickness + ? ((i.style.paddingLeft = t.spacing / 2 + 'px'), + (i.style.marginRight = t.spacing / 2 + 'px'), + (i.style.borderRight = t.lineThickness + 'px solid ' + r)) + : (i.style.width = t.spacing + 'px'), + (i.style.overflow = 'hidden'), + (i.style.flex = '0 0 auto'), + i + ) + } + } + t.renderSeparation = renderSeparation + var y = (function (e) { + function CardElement() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._truncatedDueToOverflow = !1), t + } + return ( + r(CardElement, e), + Object.defineProperty(CardElement.prototype, 'lang', { + get: function () { + var e = this.getValue(CardElement.langProperty) + return e || (this.parent ? this.parent.lang : void 0) + }, + set: function (e) { + this.setValue(CardElement.langProperty, e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'isVisible', { + get: function () { + return this.getValue(CardElement.isVisibleProperty) + }, + set: function (e) { + c.GlobalSettings.useAdvancedCardBottomTruncation && !e && this.undoOverflowTruncation(), + this.isVisible !== e && + (this.setValue(CardElement.isVisibleProperty, e), + this.updateRenderedElementVisibility(), + this._renderedElement && raiseElementVisibilityChangedEvent(this)), + this._renderedElement && this._renderedElement.setAttribute('aria-expanded', e.toString()) + }, + enumerable: !1, + configurable: !0, + }), + (CardElement.prototype.internalRenderSeparator = function () { + var e = renderSeparation( + this.hostConfig, + { + spacing: this.hostConfig.getEffectiveSpacing(this.spacing), + lineThickness: this.separator ? this.hostConfig.separator.lineThickness : void 0, + lineColor: this.separator ? this.hostConfig.separator.lineColor : void 0, + }, + this.separatorOrientation, + ) + if ( + c.GlobalSettings.alwaysBleedSeparators && + e && + this.separatorOrientation === l.Orientation.Horizontal + ) { + var t = this.getParentContainer() + if (t && t.getEffectivePadding()) { + var n = this.hostConfig.paddingDefinitionToSpacingDefinition(t.getEffectivePadding()) + ;(e.style.marginLeft = '-' + n.left + 'px'), (e.style.marginRight = '-' + n.right + 'px') + } + } + return e + }), + (CardElement.prototype.updateRenderedElementVisibility = function () { + var e = this.isDesignMode() || this.isVisible ? this._defaultRenderedElementDisplayMode : 'none' + this._renderedElement && + (e ? (this._renderedElement.style.display = e) : this._renderedElement.style.removeProperty('display')), + this._separatorElement && + (this.parent && this.parent.isFirstElement(this) + ? (this._separatorElement.style.display = 'none') + : e + ? (this._separatorElement.style.display = e) + : this._separatorElement.style.removeProperty('display')) + }), + (CardElement.prototype.hideElementDueToOverflow = function () { + this._renderedElement && + this.isVisible && + ((this._renderedElement.style.visibility = 'hidden'), + (this.isVisible = !1), + raiseElementVisibilityChangedEvent(this, !1)) + }), + (CardElement.prototype.showElementHiddenDueToOverflow = function () { + this._renderedElement && + !this.isVisible && + (this._renderedElement.style.removeProperty('visibility'), + (this.isVisible = !0), + raiseElementVisibilityChangedEvent(this, !1)) + }), + (CardElement.prototype.handleOverflow = function (e) { + if (this.isVisible || this.isHiddenDueToOverflow()) { + var t = this.truncateOverflow(e) + ;(this._truncatedDueToOverflow = t || this._truncatedDueToOverflow), + t ? t && !this.isVisible && this.showElementHiddenDueToOverflow() : this.hideElementDueToOverflow() + } + }), + (CardElement.prototype.resetOverflow = function () { + var e = !1 + return ( + this._truncatedDueToOverflow && + (this.undoOverflowTruncation(), (this._truncatedDueToOverflow = !1), (e = !0)), + this.isHiddenDueToOverflow() && this.showElementHiddenDueToOverflow(), + e + ) + }), + (CardElement.prototype.getDefaultSerializationContext = function () { + return new Ie() + }), + (CardElement.prototype.createPlaceholderElement = function () { + var e = this.getEffectiveStyleDefinition(), + t = d.stringToCssColor(e.foregroundColors.default.subtle), + n = document.createElement('div') + return ( + (n.style.border = '1px dashed ' + t), + (n.style.padding = '4px'), + (n.style.minHeight = '32px'), + (n.style.fontSize = '10px'), + t && (n.style.color = t), + (n.innerText = 'Empty ' + this.getJsonTypeName()), + n + ) + }), + (CardElement.prototype.adjustRenderedElementSize = function (e) { + 'auto' === this.height ? (e.style.flex = '0 0 auto') : (e.style.flex = '1 1 auto') + }), + (CardElement.prototype.isDisplayed = function () { + return void 0 !== this._renderedElement && this.isVisible && this._renderedElement.offsetHeight > 0 + }), + (CardElement.prototype.overrideInternalRender = function () { + return this.internalRender() + }), + (CardElement.prototype.applyPadding = function () { + if (this.separatorElement && this.separatorOrientation === l.Orientation.Horizontal) + if (c.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) { + var e = new c.PaddingDefinition() + this.getImmediateSurroundingPadding(e) + var t = this.hostConfig.paddingDefinitionToSpacingDefinition(e) + ;(this.separatorElement.style.marginLeft = '-' + t.left + 'px'), + (this.separatorElement.style.marginRight = '-' + t.right + 'px') + } else (this.separatorElement.style.marginRight = '0'), (this.separatorElement.style.marginLeft = '0') + }), + (CardElement.prototype.truncateOverflow = function (e) { + return !1 + }), + (CardElement.prototype.undoOverflowTruncation = function () {}), + (CardElement.prototype.getDefaultPadding = function () { + return new c.PaddingDefinition() + }), + (CardElement.prototype.getHasBackground = function (e) { + return void 0 === e && (e = !1), !1 + }), + (CardElement.prototype.getHasBorder = function () { + return !1 + }), + (CardElement.prototype.getPadding = function () { + return this._padding + }), + (CardElement.prototype.setPadding = function (e) { + this._padding = e + }), + (CardElement.prototype.shouldSerialize = function (e) { + return void 0 !== e.elementRegistry.findByName(this.getJsonTypeName()) + }), + Object.defineProperty(CardElement.prototype, 'useDefaultSizing', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'separatorOrientation', { + get: function () { + return l.Orientation.Horizontal + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'defaultStyle', { + get: function () { + return l.ContainerStyle.Default + }, + enumerable: !1, + configurable: !0, + }), + (CardElement.prototype.parse = function (t, n) { + e.prototype.parse.call(this, t, n || new Ie()) + }), + (CardElement.prototype.asString = function () { + return '' + }), + (CardElement.prototype.isBleeding = function () { + return !1 + }), + (CardElement.prototype.getEffectiveStyle = function () { + return this.parent ? this.parent.getEffectiveStyle() : this.defaultStyle + }), + (CardElement.prototype.getEffectiveStyleDefinition = function () { + return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle()) + }), + (CardElement.prototype.getEffectiveTextStyleDefinition = function () { + return this.parent ? this.parent.getEffectiveTextStyleDefinition() : this.hostConfig.textStyles.default + }), + (CardElement.prototype.getForbiddenActionTypes = function () { + return [] + }), + (CardElement.prototype.getImmediateSurroundingPadding = function (e, t, n, i, r) { + if ( + (void 0 === t && (t = !0), + void 0 === n && (n = !0), + void 0 === i && (i = !0), + void 0 === r && (r = !0), + this.parent) + ) { + var o = t && this.parent.isTopElement(this), + s = n && this.parent.isRightMostElement(this), + a = i && this.parent.isBottomElement(this), + c = r && this.parent.isLeftMostElement(this), + d = this.parent.getEffectivePadding() + d && + (o && d.top !== l.Spacing.None && ((e.top = d.top), (o = !1)), + s && d.right !== l.Spacing.None && ((e.right = d.right), (s = !1)), + a && d.bottom !== l.Spacing.None && ((e.bottom = d.bottom), (a = !1)), + c && d.left !== l.Spacing.None && ((e.left = d.left), (c = !1))), + (o || s || a || c) && this.parent.getImmediateSurroundingPadding(e, o, s, a, c) + } + }), + (CardElement.prototype.getActionCount = function () { + return 0 + }), + (CardElement.prototype.getActionAt = function (e) { + throw new Error(_.Strings.errors.indexOutOfRange(e)) + }), + (CardElement.prototype.indexOfAction = function (e) { + for (var t = 0; t < this.getActionCount(); t++) if (this.getActionAt(t) === e) return t + return -1 + }), + (CardElement.prototype.remove = function () { + return !!(this.parent && this.parent instanceof R) && this.parent.removeItem(this) + }), + (CardElement.prototype.render = function () { + return ( + (this._renderedElement = this.overrideInternalRender()), + (this._separatorElement = this.internalRenderSeparator()), + this._renderedElement + ? (this.id && (this._renderedElement.id = this.id), + this.customCssSelector && this._renderedElement.classList.add(this.customCssSelector), + (this._renderedElement.style.boxSizing = 'border-box'), + (this._defaultRenderedElementDisplayMode = this._renderedElement.style.display + ? this._renderedElement.style.display + : void 0), + this.adjustRenderedElementSize(this._renderedElement), + this.updateLayout(!1)) + : this.isDesignMode() && (this._renderedElement = this.createPlaceholderElement()), + this.getRootElement().updateActionsEnabledState(), + this._renderedElement + ) + }), + (CardElement.prototype.updateLayout = function (e) { + void 0 === e && (e = !0), this.updateRenderedElementVisibility(), this.applyPadding() + }), + (CardElement.prototype.updateActionsEnabledState = function () { + for (var e = 0, t = this.getRootElement().getAllActions(); e < t.length; e++) { + t[e].updateEnabledState() + } + }), + (CardElement.prototype.indexOf = function (e) { + return -1 + }), + (CardElement.prototype.isDesignMode = function () { + var e = this.getRootElement() + return e instanceof Ee && e.designMode + }), + (CardElement.prototype.isFirstElement = function (e) { + return !0 + }), + (CardElement.prototype.isLastElement = function (e) { + return !0 + }), + (CardElement.prototype.isAtTheVeryLeft = function () { + return !this.parent || (this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft()) + }), + (CardElement.prototype.isAtTheVeryRight = function () { + return !this.parent || (this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight()) + }), + (CardElement.prototype.isAtTheVeryTop = function () { + return !this.parent || (this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop()) + }), + (CardElement.prototype.isAtTheVeryBottom = function () { + return !this.parent || (this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom()) + }), + (CardElement.prototype.isBleedingAtTop = function () { + return !1 + }), + (CardElement.prototype.isBleedingAtBottom = function () { + return !1 + }), + (CardElement.prototype.isLeftMostElement = function (e) { + return !0 + }), + (CardElement.prototype.isRightMostElement = function (e) { + return !0 + }), + (CardElement.prototype.isTopElement = function (e) { + return this.isFirstElement(e) + }), + (CardElement.prototype.isBottomElement = function (e) { + return this.isLastElement(e) + }), + (CardElement.prototype.isHiddenDueToOverflow = function () { + return void 0 !== this._renderedElement && 'hidden' === this._renderedElement.style.visibility + }), + (CardElement.prototype.getRootElement = function () { + return this.getRootObject() + }), + (CardElement.prototype.getParentContainer = function () { + for (var e = this.parent; e; ) { + if (e instanceof me) return e + e = e.parent + } + }), + (CardElement.prototype.getAllInputs = function (e) { + return void 0 === e && (e = !0), [] + }), + (CardElement.prototype.getAllActions = function () { + for (var e = [], t = 0; t < this.getActionCount(); t++) { + var n = this.getActionAt(t) + n && e.push(n) + } + return e + }), + (CardElement.prototype.getResourceInformation = function () { + return [] + }), + (CardElement.prototype.getElementById = function (e) { + return this.id === e ? this : void 0 + }), + (CardElement.prototype.getActionById = function (e) {}), + (CardElement.prototype.getEffectivePadding = function () { + var e = this.getPadding() + return e || this.getDefaultPadding() + }), + (CardElement.prototype.getEffectiveHorizontalAlignment = function () { + return void 0 !== this.horizontalAlignment + ? this.horizontalAlignment + : this.parent + ? this.parent.getEffectiveHorizontalAlignment() + : l.HorizontalAlignment.Left + }), + Object.defineProperty(CardElement.prototype, 'hostConfig', { + get: function () { + return this._hostConfig ? this._hostConfig : this.parent ? this.parent.hostConfig : p.defaultHostConfig + }, + set: function (e) { + this._hostConfig = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'index', { + get: function () { + return this.parent ? this.parent.indexOf(this) : 0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'isInteractive', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'isStandalone', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'isInline', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'hasVisibleSeparator', { + get: function () { + return ( + !(!this.parent || !this.separatorElement) && + !this.parent.isFirstElement(this) && + (this.isVisible || this.isDesignMode()) + ) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'separatorElement', { + get: function () { + return this._separatorElement + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardElement.prototype, 'parent', { + get: function () { + return this._parent + }, + enumerable: !1, + configurable: !0, + }), + (CardElement.langProperty = new m.StringProperty(m.Versions.v1_1, 'lang', !0, /^[a-z]{2,3}$/gi)), + (CardElement.isVisibleProperty = new m.BoolProperty(m.Versions.v1_2, 'isVisible', !0)), + (CardElement.separatorProperty = new m.BoolProperty(m.Versions.v1_0, 'separator', !1)), + (CardElement.heightProperty = new m.ValueSetProperty( + m.Versions.v1_1, + 'height', + [ + { + value: 'auto', + }, + { + value: 'stretch', + }, + ], + 'auto', + )), + (CardElement.horizontalAlignmentProperty = new m.EnumProperty( + m.Versions.v1_0, + 'horizontalAlignment', + l.HorizontalAlignment, + )), + (CardElement.spacingProperty = new m.EnumProperty( + m.Versions.v1_0, + 'spacing', + l.Spacing, + l.Spacing.Default, + )), + o( + [(0, m.property)(CardElement.horizontalAlignmentProperty)], + CardElement.prototype, + 'horizontalAlignment', + void 0, + ), + o([(0, m.property)(CardElement.spacingProperty)], CardElement.prototype, 'spacing', void 0), + o([(0, m.property)(CardElement.separatorProperty)], CardElement.prototype, 'separator', void 0), + o([(0, m.property)(CardElement.heightProperty)], CardElement.prototype, 'height', void 0), + o([(0, m.property)(CardElement.langProperty)], CardElement.prototype, 'lang', null), + o([(0, m.property)(CardElement.isVisibleProperty)], CardElement.prototype, 'isVisible', null), + CardElement + ) + })(h.CardObject) + t.CardElement = y + var v = (function (e) { + function ActionProperty(t, n, i) { + void 0 === i && (i = []) + var r = e.call(this, t, n, void 0) || this + return (r.targetVersion = t), (r.name = n), (r.forbiddenActionTypes = i), r + } + return ( + r(ActionProperty, e), + (ActionProperty.prototype.parse = function (e, t, n) { + var i = e + return n.parseAction(i, t[this.name], this.forbiddenActionTypes, i.isDesignMode()) + }), + (ActionProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, n ? n.toJSON(i) : void 0, void 0, !0) + }), + ActionProperty + ) + })(m.PropertyDefinition) + t.ActionProperty = v + var b = (function (e) { + function BaseTextBlock(t) { + var n = e.call(this) || this + return (n.ariaHidden = !1), t && (n.text = t), n + } + return ( + r(BaseTextBlock, e), + (BaseTextBlock.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), t.remove(BaseTextBlock.selectActionProperty) + }), + Object.defineProperty(BaseTextBlock.prototype, 'text', { + get: function () { + return this.getValue(BaseTextBlock.textProperty) + }, + set: function (e) { + this.setText(e) + }, + enumerable: !1, + configurable: !0, + }), + (BaseTextBlock.prototype.getFontSize = function (e) { + switch (this.effectiveSize) { + case l.TextSize.Small: + return e.fontSizes.small + case l.TextSize.Medium: + return e.fontSizes.medium + case l.TextSize.Large: + return e.fontSizes.large + case l.TextSize.ExtraLarge: + return e.fontSizes.extraLarge + default: + return e.fontSizes.default + } + }), + (BaseTextBlock.prototype.getColorDefinition = function (e, t) { + switch (t) { + case l.TextColor.Accent: + return e.accent + case l.TextColor.Dark: + return e.dark + case l.TextColor.Light: + return e.light + case l.TextColor.Good: + return e.good + case l.TextColor.Warning: + return e.warning + case l.TextColor.Attention: + return e.attention + default: + return e.default + } + }), + (BaseTextBlock.prototype.setText = function (e) { + this.setValue(BaseTextBlock.textProperty, e) + }), + (BaseTextBlock.prototype.init = function (e) { + ;(this.size = e.size), (this.weight = e.weight), (this.color = e.color), (this.isSubtle = e.isSubtle) + }), + (BaseTextBlock.prototype.asString = function () { + return this.text + }), + (BaseTextBlock.prototype.applyStylesTo = function (e) { + var t, + n = this.hostConfig.getFontTypeDefinition(this.effectiveFontType) + switch ((n.fontFamily && (e.style.fontFamily = n.fontFamily), this.effectiveSize)) { + case l.TextSize.Small: + t = n.fontSizes.small + break + case l.TextSize.Medium: + t = n.fontSizes.medium + break + case l.TextSize.Large: + t = n.fontSizes.large + break + case l.TextSize.ExtraLarge: + t = n.fontSizes.extraLarge + break + default: + t = n.fontSizes.default + } + e.style.fontSize = t + 'px' + var i, + r = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor), + o = d.stringToCssColor(this.effectiveIsSubtle ? r.subtle : r.default) + switch ((o && (e.style.color = o), this.effectiveWeight)) { + case l.TextWeight.Lighter: + i = n.fontWeights.lighter + break + case l.TextWeight.Bolder: + i = n.fontWeights.bolder + break + default: + i = n.fontWeights.default + } + ;(e.style.fontWeight = i.toString()), this.ariaHidden && e.setAttribute('aria-hidden', 'true') + }), + (BaseTextBlock.prototype.getAllActions = function () { + var t = e.prototype.getAllActions.call(this) + return this.selectAction && t.push(this.selectAction), t + }), + Object.defineProperty(BaseTextBlock.prototype, 'effectiveColor', { + get: function () { + return void 0 !== this.color ? this.color : this.getEffectiveTextStyleDefinition().color + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(BaseTextBlock.prototype, 'effectiveFontType', { + get: function () { + return void 0 !== this.fontType ? this.fontType : this.getEffectiveTextStyleDefinition().fontType + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(BaseTextBlock.prototype, 'effectiveIsSubtle', { + get: function () { + return void 0 !== this.isSubtle ? this.isSubtle : this.getEffectiveTextStyleDefinition().isSubtle + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(BaseTextBlock.prototype, 'effectiveSize', { + get: function () { + return void 0 !== this.size ? this.size : this.getEffectiveTextStyleDefinition().size + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(BaseTextBlock.prototype, 'effectiveWeight', { + get: function () { + return void 0 !== this.weight ? this.weight : this.getEffectiveTextStyleDefinition().weight + }, + enumerable: !1, + configurable: !0, + }), + (BaseTextBlock.textProperty = new m.StringProperty(m.Versions.v1_0, 'text', !0)), + (BaseTextBlock.sizeProperty = new m.EnumProperty(m.Versions.v1_0, 'size', l.TextSize)), + (BaseTextBlock.weightProperty = new m.EnumProperty(m.Versions.v1_0, 'weight', l.TextWeight)), + (BaseTextBlock.colorProperty = new m.EnumProperty(m.Versions.v1_0, 'color', l.TextColor)), + (BaseTextBlock.isSubtleProperty = new m.BoolProperty(m.Versions.v1_0, 'isSubtle')), + (BaseTextBlock.fontTypeProperty = new m.EnumProperty(m.Versions.v1_2, 'fontType', l.FontType)), + (BaseTextBlock.selectActionProperty = new v(m.Versions.v1_1, 'selectAction', ['Action.ShowCard'])), + o([(0, m.property)(BaseTextBlock.sizeProperty)], BaseTextBlock.prototype, 'size', void 0), + o([(0, m.property)(BaseTextBlock.weightProperty)], BaseTextBlock.prototype, 'weight', void 0), + o([(0, m.property)(BaseTextBlock.colorProperty)], BaseTextBlock.prototype, 'color', void 0), + o([(0, m.property)(BaseTextBlock.fontTypeProperty)], BaseTextBlock.prototype, 'fontType', void 0), + o([(0, m.property)(BaseTextBlock.isSubtleProperty)], BaseTextBlock.prototype, 'isSubtle', void 0), + o([(0, m.property)(BaseTextBlock.textProperty)], BaseTextBlock.prototype, 'text', null), + o([(0, m.property)(BaseTextBlock.selectActionProperty)], BaseTextBlock.prototype, 'selectAction', void 0), + BaseTextBlock + ) + })(y) + t.BaseTextBlock = b + var S = (function (e) { + function TextBlock() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.wrap = !1), (t._treatAsPlainText = !0), (t.useMarkdown = !0), t + } + var t, n + return ( + r(TextBlock, e), + (TextBlock.prototype.restoreOriginalContent = function () { + var e, t + if (void 0 !== this.renderedElement) { + this.maxLines && + this.maxLines > 0 && + (this.renderedElement.style.maxHeight = this._computedLineHeight * this.maxLines + 'px') + var n = + null !== + (t = + null === (e = TextBlock._ttRoundtripPolicy) || void 0 === e + ? void 0 + : e.createHTML(this._originalInnerHtml)) && void 0 !== t + ? t + : this._originalInnerHtml + this.renderedElement.innerHTML = n + } + }), + (TextBlock.prototype.truncateIfSupported = function (e) { + if (void 0 !== this.renderedElement) { + var t = this.renderedElement.children, + n = !t.length + if (n || (1 === t.length && 'p' === t[0].tagName.toLowerCase() && !t[0].children.length)) { + var i = n ? this.renderedElement : t[0] + return d.truncateText(i, e, this._computedLineHeight), !0 + } + } + return !1 + }), + (TextBlock.prototype.setText = function (t) { + e.prototype.setText.call(this, t), (this._processedText = void 0) + }), + (TextBlock.prototype.internalRender = function () { + var e, + t, + n = this + if (((this._processedText = void 0), this.text)) { + var i = this.preProcessPropertyValue(b.textProperty), + r = this.hostConfig, + o = void 0 + if (this.forElementId) { + var s = document.createElement('label') + ;(s.htmlFor = this.forElementId), (o = s) + } else o = document.createElement('div') + if ( + (o.classList.add(r.makeCssClassName('ac-textBlock')), + (o.style.overflow = 'hidden'), + this.applyStylesTo(o), + 'heading' === this.style) + ) { + o.setAttribute('role', 'heading') + var a = this.hostConfig.textBlock.headingLevel + void 0 !== a && a > 0 && o.setAttribute('aria-level', a.toString()) + } + if ( + (this.selectAction && + r.supportsInteractivity && + ((o.onclick = function (e) { + n.selectAction && + n.selectAction.isEffectivelyEnabled() && + (e.preventDefault(), (e.cancelBubble = !0), n.selectAction.execute()) + }), + this.selectAction.setupElementForAccessibility(o), + this.selectAction.isEffectivelyEnabled() && o.classList.add(r.makeCssClassName('ac-selectable'))), + !this._processedText) + ) { + this._treatAsPlainText = !0 + var l = u.formatText(this.lang, i) + if (this.useMarkdown && l) { + c.GlobalSettings.allowMarkForTextHighlighting && + (l = l.replace(//g, '===').replace(/<\/mark>/g, '/==/')) + var p = Ee.applyMarkdown(l) + if (p.didProcess && p.outputHtml) { + if ( + ((this._processedText = p.outputHtml), + (this._treatAsPlainText = !1), + c.GlobalSettings.allowMarkForTextHighlighting && this._processedText) + ) { + var h = '', + m = this.getEffectiveStyleDefinition() + m.highlightBackgroundColor && (h += 'background-color: ' + m.highlightBackgroundColor + ';'), + m.highlightForegroundColor && (h += 'color: ' + m.highlightForegroundColor + ';'), + h && (h = 'style="' + h + '"'), + (this._processedText = this._processedText + .replace(/===/g, '') + .replace(/\/==\//g, '')) + } + } else (this._processedText = l), (this._treatAsPlainText = !0) + } else (this._processedText = l), (this._treatAsPlainText = !0) + } + if ((this._processedText || (this._processedText = ''), this._treatAsPlainText)) + o.innerText = this._processedText + else { + var g = + null !== + (t = + null === (e = TextBlock._ttMarkdownPolicy) || void 0 === e + ? void 0 + : e.createHTML(this._processedText)) && void 0 !== t + ? t + : this._processedText + o.innerHTML = g + } + if (o.firstElementChild instanceof HTMLElement) { + var _ = o.firstElementChild + ;(_.style.marginTop = '0px'), + (_.style.width = '100%'), + this.wrap || ((_.style.overflow = 'hidden'), (_.style.textOverflow = 'ellipsis')) + } + o.lastElementChild instanceof HTMLElement && (o.lastElementChild.style.marginBottom = '0px') + for ( + var f = o.getElementsByTagName('a'), + _loop_1 = function (e) { + e.classList.add(r.makeCssClassName('ac-anchor')), + (e.target = '_blank'), + (e.onclick = function (t) { + raiseAnchorClickedEvent(n, e, t) && (t.preventDefault(), (t.cancelBubble = !0)) + }), + (e.oncontextmenu = function (t) { + return !raiseAnchorClickedEvent(n, e, t) || (t.preventDefault(), (t.cancelBubble = !0), !1) + }) + }, + y = 0, + v = Array.from(f); + y < v.length; + y++ + ) { + _loop_1(v[y]) + } + return ( + this.wrap + ? ((o.style.wordWrap = 'break-word'), + this.maxLines && + this.maxLines > 0 && + ((o.style.overflow = 'hidden'), + d.isInternetExplorer() || !c.GlobalSettings.useWebkitLineClamp + ? (o.style.maxHeight = this._computedLineHeight * this.maxLines + 'px') + : (o.style.removeProperty('line-height'), + (o.style.display = '-webkit-box'), + (o.style.webkitBoxOrient = 'vertical'), + (o.style.webkitLineClamp = this.maxLines.toString())))) + : ((o.style.whiteSpace = 'nowrap'), (o.style.textOverflow = 'ellipsis')), + (c.GlobalSettings.useAdvancedTextBlockTruncation || + c.GlobalSettings.useAdvancedCardBottomTruncation) && + (this._originalInnerHtml = o.innerHTML), + o + ) + } + }), + (TextBlock.prototype.truncateOverflow = function (e) { + return e >= this._computedLineHeight && this.truncateIfSupported(e) + }), + (TextBlock.prototype.undoOverflowTruncation = function () { + if ((this.restoreOriginalContent(), c.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines)) { + var e = this._computedLineHeight * this.maxLines + this.truncateIfSupported(e) + } + }), + (TextBlock.prototype.applyStylesTo = function (t) { + switch ((e.prototype.applyStylesTo.call(this, t), this.getEffectiveHorizontalAlignment())) { + case l.HorizontalAlignment.Center: + t.style.textAlign = 'center' + break + case l.HorizontalAlignment.Right: + t.style.textAlign = 'end' + break + default: + t.style.textAlign = 'start' + } + var n = this.hostConfig.lineHeights + if (n) + switch (this.effectiveSize) { + case l.TextSize.Small: + this._computedLineHeight = n.small + break + case l.TextSize.Medium: + this._computedLineHeight = n.medium + break + case l.TextSize.Large: + this._computedLineHeight = n.large + break + case l.TextSize.ExtraLarge: + this._computedLineHeight = n.extraLarge + break + default: + this._computedLineHeight = n.default + } + else + this._computedLineHeight = + 1.33 * this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) + t.style.lineHeight = this._computedLineHeight + 'px' + }), + (TextBlock.prototype.getJsonTypeName = function () { + return 'TextBlock' + }), + (TextBlock.prototype.getEffectiveTextStyleDefinition = function () { + return this.style + ? this.hostConfig.textStyles.getStyleByName(this.style) + : e.prototype.getEffectiveTextStyleDefinition.call(this) + }), + (TextBlock.prototype.updateLayout = function (t) { + void 0 === t && (t = !1), + e.prototype.updateLayout.call(this, t), + c.GlobalSettings.useAdvancedTextBlockTruncation && + this.maxLines && + this.isDisplayed() && + (this.restoreOriginalContent(), this.truncateIfSupported(this._computedLineHeight * this.maxLines)) + }), + (TextBlock.wrapProperty = new m.BoolProperty(m.Versions.v1_0, 'wrap', !1)), + (TextBlock.maxLinesProperty = new m.NumProperty(m.Versions.v1_0, 'maxLines')), + (TextBlock.styleProperty = new m.ValueSetProperty(m.Versions.v1_5, 'style', [ + { + value: 'default', + }, + { + value: 'columnHeader', + }, + { + value: 'heading', + }, + ])), + (TextBlock._ttMarkdownPolicy = + 'undefined' == typeof window || null === (t = window.trustedTypes) || void 0 === t + ? void 0 + : t.createPolicy('adaptivecards#markdownPassthroughPolicy', { + createHTML: function (e) { + return e + }, + })), + (TextBlock._ttRoundtripPolicy = + 'undefined' == typeof window || null === (n = window.trustedTypes) || void 0 === n + ? void 0 + : n.createPolicy('adaptivecards#restoreContentsPolicy', { + createHTML: function (e) { + return e + }, + })), + o([(0, m.property)(TextBlock.wrapProperty)], TextBlock.prototype, 'wrap', void 0), + o([(0, m.property)(TextBlock.maxLinesProperty)], TextBlock.prototype, 'maxLines', void 0), + o([(0, m.property)(TextBlock.styleProperty)], TextBlock.prototype, 'style', void 0), + TextBlock + ) + })(b) + t.TextBlock = S + var C = (function (e) { + function TextRun() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.italic = !1), (t.strikethrough = !1), (t.highlight = !1), (t.underline = !1), t + } + return ( + r(TextRun, e), + (TextRun.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), t.add(b.selectActionProperty) + }), + (TextRun.prototype.internalRender = function () { + var e = this + if (this.text) { + var t = this.preProcessPropertyValue(b.textProperty), + n = this.hostConfig, + i = u.formatText(this.lang, t) + i || (i = '') + var r = document.createElement('span') + if ( + (r.classList.add(n.makeCssClassName('ac-textRun')), + this.applyStylesTo(r), + this.selectAction && n.supportsInteractivity) + ) { + var o = document.createElement('a') + o.classList.add(n.makeCssClassName('ac-anchor')) + var s = this.selectAction.getHref() + ;(o.href = s || ''), + (o.target = '_blank'), + (o.onclick = function (t) { + e.selectAction && + e.selectAction.isEffectivelyEnabled() && + (t.preventDefault(), (t.cancelBubble = !0), e.selectAction.execute()) + }), + this.selectAction.setupElementForAccessibility(o), + (o.innerText = i), + r.appendChild(o) + } else r.innerText = i + return r + } + }), + (TextRun.prototype.applyStylesTo = function (t) { + if ( + (e.prototype.applyStylesTo.call(this, t), + this.italic && (t.style.fontStyle = 'italic'), + this.strikethrough && (t.style.textDecoration = 'line-through'), + this.highlight) + ) { + var n = this.getColorDefinition( + this.getEffectiveStyleDefinition().foregroundColors, + this.effectiveColor, + ), + i = d.stringToCssColor(this.effectiveIsSubtle ? n.highlightColors.subtle : n.highlightColors.default) + i && (t.style.backgroundColor = i) + } + this.underline && (t.style.textDecoration = 'underline') + }), + (TextRun.prototype.getJsonTypeName = function () { + return 'TextRun' + }), + Object.defineProperty(TextRun.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(TextRun.prototype, 'isInline', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (TextRun.italicProperty = new m.BoolProperty(m.Versions.v1_2, 'italic', !1)), + (TextRun.strikethroughProperty = new m.BoolProperty(m.Versions.v1_2, 'strikethrough', !1)), + (TextRun.highlightProperty = new m.BoolProperty(m.Versions.v1_2, 'highlight', !1)), + (TextRun.underlineProperty = new m.BoolProperty(m.Versions.v1_3, 'underline', !1)), + o([(0, m.property)(TextRun.italicProperty)], TextRun.prototype, 'italic', void 0), + o([(0, m.property)(TextRun.strikethroughProperty)], TextRun.prototype, 'strikethrough', void 0), + o([(0, m.property)(TextRun.highlightProperty)], TextRun.prototype, 'highlight', void 0), + o([(0, m.property)(TextRun.underlineProperty)], TextRun.prototype, 'underline', void 0), + TextRun + ) + })(b) + t.TextRun = C + var E = (function (e) { + function RichTextBlock() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._inlines = []), t + } + return ( + r(RichTextBlock, e), + (RichTextBlock.prototype.internalAddInline = function (e, t) { + if ((void 0 === t && (t = !1), !e.isInline)) + throw new Error(_.Strings.errors.elementCannotBeUsedAsInline()) + if (!(void 0 === e.parent || t) && e.parent !== this) + throw new Error(_.Strings.errors.inlineAlreadyParented()) + e.setParent(this), this._inlines.push(e) + }), + (RichTextBlock.prototype.internalParse = function (t, n) { + if ((e.prototype.internalParse.call(this, t, n), (this._inlines = []), Array.isArray(t.inlines))) + for (var i = 0, r = t.inlines; i < r.length; i++) { + var o = r[i], + s = void 0 + if ('string' == typeof o) { + var a = new C() + ;(a.text = o), (s = a) + } else s = n.parseElement(this, o, [], !1) + s && this.internalAddInline(s, !0) + } + }), + (RichTextBlock.prototype.internalToJSON = function (t, n) { + if ((e.prototype.internalToJSON.call(this, t, n), this._inlines.length > 0)) { + for (var i = [], r = 0, o = this._inlines; r < o.length; r++) { + var s = o[r] + i.push(s.toJSON(n)) + } + n.serializeValue(t, 'inlines', i) + } + }), + (RichTextBlock.prototype.internalRender = function () { + if (this._inlines.length > 0) { + var e = void 0 + if (this.forElementId) { + var t = document.createElement('label') + ;(t.htmlFor = this.forElementId), (e = t) + } else e = document.createElement('div') + switch ( + ((e.className = this.hostConfig.makeCssClassName('ac-richTextBlock')), + this.getEffectiveHorizontalAlignment()) + ) { + case l.HorizontalAlignment.Center: + e.style.textAlign = 'center' + break + case l.HorizontalAlignment.Right: + e.style.textAlign = 'end' + break + default: + e.style.textAlign = 'start' + } + for (var n = 0, i = 0, r = this._inlines; i < r.length; i++) { + var o = r[i].render() + o && (e.appendChild(o), n++) + } + if (n > 0) return e + } + }), + (RichTextBlock.prototype.asString = function () { + for (var e = '', t = 0, n = this._inlines; t < n.length; t++) { + e += n[t].asString() + } + return e + }), + (RichTextBlock.prototype.getJsonTypeName = function () { + return 'RichTextBlock' + }), + (RichTextBlock.prototype.getInlineCount = function () { + return this._inlines.length + }), + (RichTextBlock.prototype.getInlineAt = function (e) { + if (e >= 0 && e < this._inlines.length) return this._inlines[e] + throw new Error(_.Strings.errors.indexOutOfRange(e)) + }), + (RichTextBlock.prototype.addInline = function (e) { + 'string' == typeof e ? this.internalAddInline(new C(e)) : this.internalAddInline(e) + }), + (RichTextBlock.prototype.removeInline = function (e) { + var t = this._inlines.indexOf(e) + return t >= 0 && (this._inlines[t].setParent(void 0), this._inlines.splice(t, 1), !0) + }), + RichTextBlock + ) + })(y) + t.RichTextBlock = E + var T = (function (e) { + function Fact(t, n) { + var i = e.call(this) || this + return (i.name = t), (i.value = n), i + } + return ( + r(Fact, e), + (Fact.prototype.getSchemaKey = function () { + return 'Fact' + }), + (Fact.titleProperty = new m.StringProperty(m.Versions.v1_0, 'title')), + (Fact.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + o([(0, m.property)(Fact.titleProperty)], Fact.prototype, 'name', void 0), + o([(0, m.property)(Fact.valueProperty)], Fact.prototype, 'value', void 0), + Fact + ) + })(m.SerializableObject) + t.Fact = T + var I = (function (e) { + function FactSet() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(FactSet, e), + Object.defineProperty(FactSet.prototype, 'useDefaultSizing', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (FactSet.prototype.internalRender = function () { + var e = void 0, + t = this.hostConfig + if (this.facts.length > 0) { + ;((e = document.createElement('table')).style.borderWidth = '0px'), + (e.style.borderSpacing = '0px'), + (e.style.borderStyle = 'none'), + (e.style.borderCollapse = 'collapse'), + (e.style.display = 'block'), + (e.style.overflow = 'hidden'), + e.classList.add(t.makeCssClassName('ac-factset')), + e.setAttribute('role', 'presentation') + for (var n = 0; n < this.facts.length; n++) { + var i = document.createElement('tr') + n > 0 && (i.style.marginTop = t.factSet.spacing + 'px') + var r = document.createElement('td') + ;(r.style.padding = '0'), + r.classList.add(t.makeCssClassName('ac-fact-title')), + t.factSet.title.maxWidth && (r.style.maxWidth = t.factSet.title.maxWidth + 'px'), + (r.style.verticalAlign = 'top') + var o = new S() + o.setParent(this), + (o.text = !this.facts[n].name && this.isDesignMode() ? 'Title' : this.facts[n].name), + (o.size = t.factSet.title.size), + (o.color = t.factSet.title.color), + (o.isSubtle = t.factSet.title.isSubtle), + (o.weight = t.factSet.title.weight), + (o.wrap = t.factSet.title.wrap), + (o.spacing = l.Spacing.None), + d.appendChild(r, o.render()), + d.appendChild(i, r), + ((r = document.createElement('td')).style.width = '10px'), + d.appendChild(i, r), + ((r = document.createElement('td')).style.padding = '0'), + (r.style.verticalAlign = 'top'), + r.classList.add(t.makeCssClassName('ac-fact-value')), + (o = new S()).setParent(this), + (o.text = this.facts[n].value), + (o.size = t.factSet.value.size), + (o.color = t.factSet.value.color), + (o.isSubtle = t.factSet.value.isSubtle), + (o.weight = t.factSet.value.weight), + (o.wrap = t.factSet.value.wrap), + (o.spacing = l.Spacing.None), + d.appendChild(r, o.render()), + d.appendChild(i, r), + d.appendChild(e, i) + } + } + return e + }), + (FactSet.prototype.getJsonTypeName = function () { + return 'FactSet' + }), + (FactSet.factsProperty = new m.SerializableObjectCollectionProperty(m.Versions.v1_0, 'facts', T)), + o([(0, m.property)(FactSet.factsProperty)], FactSet.prototype, 'facts', void 0), + FactSet + ) + })(y) + t.FactSet = I + var w = (function (e) { + function ImageDimensionProperty(t, n, i, r) { + var o = e.call(this, t, n) || this + return (o.targetVersion = t), (o.name = n), (o.internalName = i), (o.fallbackProperty = r), o + } + return ( + r(ImageDimensionProperty, e), + (ImageDimensionProperty.prototype.getInternalName = function () { + return this.internalName + }), + (ImageDimensionProperty.prototype.parse = function (e, t, n) { + var i = void 0, + r = t[this.name] + if (void 0 === r) return this.defaultValue + var o = !1 + if ('string' == typeof r) { + try { + var s = c.SizeAndUnit.parse(r, !0) + s.unit === l.SizeUnit.Pixel && ((i = s.physicalSize), (o = !0)) + } catch (e) {} + !o && this.fallbackProperty && (o = this.fallbackProperty.isValidValue(r, n)) + } + return ( + o || + n.logParseEvent( + e, + l.ValidationEvent.InvalidPropertyValue, + _.Strings.errors.invalidPropertyValue(r, this.name), + ), + i + ) + }), + (ImageDimensionProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, 'number' != typeof n || isNaN(n) ? void 0 : n + 'px') + }), + ImageDimensionProperty + ) + })(m.PropertyDefinition), + A = (function (e) { + function Image() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.size = l.Size.Auto), (t.style = l.ImageStyle.Default), t + } + return ( + r(Image, e), + (Image.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), t.remove(y.heightProperty) + }), + (Image.prototype.applySize = function (e) { + if (this.pixelWidth || this.pixelHeight) + this.pixelWidth && (e.style.width = this.pixelWidth + 'px'), + this.pixelHeight && (e.style.height = this.pixelHeight + 'px') + else if (this.maxHeight) { + switch (this.size) { + case l.Size.Small: + e.style.height = this.hostConfig.imageSizes.small + 'px' + break + case l.Size.Large: + e.style.height = this.hostConfig.imageSizes.large + 'px' + break + default: + e.style.height = this.hostConfig.imageSizes.medium + 'px' + } + e.style.maxHeight = this.maxHeight + 'px' + } else { + switch (this.size) { + case l.Size.Stretch: + e.style.width = '100%' + break + case l.Size.Auto: + e.style.maxWidth = '100%' + break + case l.Size.Small: + e.style.width = this.hostConfig.imageSizes.small + 'px' + break + case l.Size.Large: + e.style.width = this.hostConfig.imageSizes.large + 'px' + break + case l.Size.Medium: + e.style.width = this.hostConfig.imageSizes.medium + 'px' + } + e.style.maxHeight = '100%' + } + }), + Object.defineProperty(Image.prototype, 'useDefaultSizing', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (Image.prototype.internalRender = function () { + var e = this, + t = void 0 + if (this.url) { + ;((t = document.createElement('div')).style.display = 'flex'), (t.style.alignItems = 'flex-start') + var n = this.hostConfig + switch (this.getEffectiveHorizontalAlignment()) { + case l.HorizontalAlignment.Center: + t.style.justifyContent = 'center' + break + case l.HorizontalAlignment.Right: + t.style.justifyContent = 'flex-end' + break + default: + t.style.justifyContent = 'flex-start' + } + var i = document.createElement('img') + ;(i.onload = function (t) { + raiseImageLoadedEvent(e) + }), + (i.onerror = function (t) { + if (e.renderedElement) { + var n = e.getRootElement() + if ((clearElement(e.renderedElement), n && n.designMode)) { + var i = document.createElement('div') + ;(i.style.display = 'flex'), + (i.style.alignItems = 'center'), + (i.style.justifyContent = 'center'), + (i.style.backgroundColor = '#EEEEEE'), + (i.style.color = 'black'), + (i.innerText = ':-('), + (i.style.padding = '10px'), + e.applySize(i), + e.renderedElement.appendChild(i) + } + } + raiseImageLoadedEvent(e) + }), + (i.style.minWidth = '0'), + i.classList.add(n.makeCssClassName('ac-image')), + this.selectAction && + n.supportsInteractivity && + ((i.onkeypress = function (t) { + e.selectAction && + e.selectAction.isEffectivelyEnabled() && + ('Enter' === t.code || 'Space' === t.code) && + (t.preventDefault(), (t.cancelBubble = !0), e.selectAction.execute()) + }), + (i.onclick = function (t) { + e.selectAction && + e.selectAction.isEffectivelyEnabled() && + (t.preventDefault(), (t.cancelBubble = !0), e.selectAction.execute()) + }), + this.selectAction.setupElementForAccessibility(i), + this.selectAction.isEffectivelyEnabled() && i.classList.add(n.makeCssClassName('ac-selectable'))), + this.applySize(i), + this.style === l.ImageStyle.Person && + ((i.style.borderRadius = '50%'), + (i.style.backgroundPosition = '50% 50%'), + (i.style.backgroundRepeat = 'no-repeat')) + var r = d.stringToCssColor(this.backgroundColor) + r && (i.style.backgroundColor = r), (i.src = this.preProcessPropertyValue(Image.urlProperty)) + var o = this.preProcessPropertyValue(Image.altTextProperty) + o && (i.alt = o), t.appendChild(i) + } + return t + }), + (Image.prototype.getJsonTypeName = function () { + return 'Image' + }), + (Image.prototype.getAllActions = function () { + var t = e.prototype.getAllActions.call(this) + return this.selectAction && t.push(this.selectAction), t + }), + (Image.prototype.getActionById = function (t) { + var n = e.prototype.getActionById.call(this, t) + return !n && this.selectAction && (n = this.selectAction.getActionById(t)), n + }), + (Image.prototype.getResourceInformation = function () { + return this.url + ? [ + { + url: this.url, + mimeType: 'image', + }, + ] + : [] + }), + (Image.urlProperty = new m.StringProperty(m.Versions.v1_0, 'url')), + (Image.altTextProperty = new m.StringProperty(m.Versions.v1_0, 'altText')), + (Image.backgroundColorProperty = new m.StringProperty(m.Versions.v1_1, 'backgroundColor')), + (Image.styleProperty = new m.EnumProperty(m.Versions.v1_0, 'style', l.ImageStyle, l.ImageStyle.Default)), + (Image.sizeProperty = new m.EnumProperty(m.Versions.v1_0, 'size', l.Size, l.Size.Auto)), + (Image.pixelWidthProperty = new w(m.Versions.v1_1, 'width', 'pixelWidth')), + (Image.pixelHeightProperty = new w(m.Versions.v1_1, 'height', 'pixelHeight', y.heightProperty)), + (Image.selectActionProperty = new v(m.Versions.v1_1, 'selectAction', ['Action.ShowCard'])), + o([(0, m.property)(Image.urlProperty)], Image.prototype, 'url', void 0), + o([(0, m.property)(Image.altTextProperty)], Image.prototype, 'altText', void 0), + o([(0, m.property)(Image.backgroundColorProperty)], Image.prototype, 'backgroundColor', void 0), + o([(0, m.property)(Image.sizeProperty)], Image.prototype, 'size', void 0), + o([(0, m.property)(Image.styleProperty)], Image.prototype, 'style', void 0), + o([(0, m.property)(Image.pixelWidthProperty)], Image.prototype, 'pixelWidth', void 0), + o([(0, m.property)(Image.pixelHeightProperty)], Image.prototype, 'pixelHeight', void 0), + o([(0, m.property)(Image.selectActionProperty)], Image.prototype, 'selectAction', void 0), + Image + ) + })(y) + t.Image = A + var R = (function (e) { + function CardElementContainer() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.allowVerticalOverflow = !1), t + } + return ( + r(CardElementContainer, e), + (CardElementContainer.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), + this.isSelectable || t.remove(CardElementContainer.selectActionProperty) + }), + (CardElementContainer.prototype.isElementAllowed = function (e) { + return this.hostConfig.supportsInteractivity || !e.isInteractive + }), + (CardElementContainer.prototype.applyPadding = function () { + if ((e.prototype.applyPadding.call(this), this.renderedElement)) { + var t = new c.SpacingDefinition() + this.getEffectivePadding() && + (t = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding())), + (this.renderedElement.style.paddingTop = t.top + 'px'), + (this.renderedElement.style.paddingRight = t.right + 'px'), + (this.renderedElement.style.paddingBottom = t.bottom + 'px'), + (this.renderedElement.style.paddingLeft = t.left + 'px'), + (this.renderedElement.style.marginRight = '0'), + (this.renderedElement.style.marginLeft = '0') + } + }), + Object.defineProperty(CardElementContainer.prototype, 'isSelectable', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (CardElementContainer.prototype.forbiddenChildElements = function () { + return [] + }), + (CardElementContainer.prototype.releaseDOMResources = function () { + e.prototype.releaseDOMResources.call(this) + for (var t = 0; t < this.getItemCount(); t++) this.getItemAt(t).releaseDOMResources() + }), + (CardElementContainer.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t) + for (var n = 0; n < this.getItemCount(); n++) { + var i = this.getItemAt(n) + !this.hostConfig.supportsInteractivity && + i.isInteractive && + t.addFailure( + this, + l.ValidationEvent.InteractivityNotAllowed, + _.Strings.errors.interactivityNotAllowed(), + ), + this.isElementAllowed(i) || + t.addFailure( + this, + l.ValidationEvent.InteractivityNotAllowed, + _.Strings.errors.elementTypeNotAllowed(i.getJsonTypeName()), + ), + i.internalValidateProperties(t) + } + this._selectAction && this._selectAction.internalValidateProperties(t) + }), + (CardElementContainer.prototype.render = function () { + var t = this, + n = e.prototype.render.call(this) + if (n) { + var i = this.hostConfig + this.allowVerticalOverflow && ((n.style.overflowX = 'hidden'), (n.style.overflowY = 'auto')), + n && + this.isSelectable && + this._selectAction && + i.supportsInteractivity && + ((n.onclick = function (e) { + t._selectAction && + t._selectAction.isEffectivelyEnabled() && + (e.preventDefault(), (e.cancelBubble = !0), t._selectAction.execute()) + }), + (n.onkeypress = function (e) { + t._selectAction && + t._selectAction.isEffectivelyEnabled() && + ('Enter' === e.code || 'Space' === e.code) && + (e.preventDefault(), (e.cancelBubble = !0), t._selectAction.execute()) + }), + this._selectAction.setupElementForAccessibility(n), + this._selectAction.isEffectivelyEnabled() && n.classList.add(i.makeCssClassName('ac-selectable'))) + } + return n + }), + (CardElementContainer.prototype.updateLayout = function (t) { + if ((void 0 === t && (t = !0), e.prototype.updateLayout.call(this, t), t)) + for (var n = 0; n < this.getItemCount(); n++) this.getItemAt(n).updateLayout() + }), + (CardElementContainer.prototype.getAllInputs = function (e) { + void 0 === e && (e = !0) + for (var t = [], n = 0; n < this.getItemCount(); n++) t.push.apply(t, this.getItemAt(n).getAllInputs(e)) + return t + }), + (CardElementContainer.prototype.getAllActions = function () { + for (var t = e.prototype.getAllActions.call(this), n = 0; n < this.getItemCount(); n++) + t.push.apply(t, this.getItemAt(n).getAllActions()) + return this._selectAction && t.push(this._selectAction), t + }), + (CardElementContainer.prototype.getResourceInformation = function () { + for (var e = [], t = 0; t < this.getItemCount(); t++) + e.push.apply(e, this.getItemAt(t).getResourceInformation()) + return e + }), + (CardElementContainer.prototype.getElementById = function (t) { + var n = e.prototype.getElementById.call(this, t) + if (!n) for (var i = 0; i < this.getItemCount() && !(n = this.getItemAt(i).getElementById(t)); i++); + return n + }), + (CardElementContainer.prototype.findDOMNodeOwner = function (t) { + for (var n, i = void 0, r = 0; r < this.getItemCount(); r++) + if ((i = this.getItemAt(r).findDOMNodeOwner(t))) return i + for (r = 0; r < this.getActionCount(); r++) + if ((i = null === (n = this.getActionAt(r)) || void 0 === n ? void 0 : n.findDOMNodeOwner(t))) return i + return e.prototype.findDOMNodeOwner.call(this, t) + }), + (CardElementContainer.selectActionProperty = new v(m.Versions.v1_1, 'selectAction', ['Action.ShowCard'])), + o( + [(0, m.property)(CardElementContainer.selectActionProperty)], + CardElementContainer.prototype, + '_selectAction', + void 0, + ), + CardElementContainer + ) + })(y) + t.CardElementContainer = R + var x = (function (e) { + function ImageSet() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._images = []), (t.imageSize = l.ImageSize.Medium), t + } + return ( + r(ImageSet, e), + (ImageSet.prototype.internalRender = function () { + var e = void 0 + if (this._images.length > 0) { + ;((e = document.createElement('div')).style.display = 'flex'), (e.style.flexWrap = 'wrap') + for (var t = 0, n = this._images; t < n.length; t++) { + var i = n[t] + switch (this.imageSize) { + case l.ImageSize.Small: + i.size = l.Size.Small + break + case l.ImageSize.Large: + i.size = l.Size.Large + break + default: + i.size = l.Size.Medium + } + i.maxHeight = this.hostConfig.imageSet.maxImageHeight + var r = i.render() + r && + ((r.style.display = 'inline-flex'), + (r.style.margin = '0px'), + (r.style.marginRight = '10px'), + d.appendChild(e, r)) + } + } + return e + }), + (ImageSet.prototype.getItemCount = function () { + return this._images.length + }), + (ImageSet.prototype.getItemAt = function (e) { + return this._images[e] + }), + (ImageSet.prototype.getFirstVisibleRenderedItem = function () { + return this._images && this._images.length > 0 ? this._images[0] : void 0 + }), + (ImageSet.prototype.getLastVisibleRenderedItem = function () { + return this._images && this._images.length > 0 ? this._images[this._images.length - 1] : void 0 + }), + (ImageSet.prototype.removeItem = function (e) { + if (e instanceof A) { + var t = this._images.indexOf(e) + if (t >= 0) return this._images.splice(t, 1), e.setParent(void 0), this.updateLayout(), !0 + } + return !1 + }), + (ImageSet.prototype.getJsonTypeName = function () { + return 'ImageSet' + }), + (ImageSet.prototype.addImage = function (e) { + if (e.parent) throw new Error('This image already belongs to another ImageSet') + this._images.push(e), e.setParent(this) + }), + (ImageSet.prototype.indexOf = function (e) { + return e instanceof A ? this._images.indexOf(e) : -1 + }), + (ImageSet.imagesProperty = new m.SerializableObjectCollectionProperty( + m.Versions.v1_0, + 'images', + A, + function (e, t) { + t.setParent(e) + }, + )), + (ImageSet.imageSizeProperty = new m.EnumProperty( + m.Versions.v1_0, + 'imageSize', + l.ImageSize, + l.ImageSize.Medium, + )), + o([(0, m.property)(ImageSet.imagesProperty)], ImageSet.prototype, '_images', void 0), + o([(0, m.property)(ImageSet.imageSizeProperty)], ImageSet.prototype, 'imageSize', void 0), + ImageSet + ) + })(R) + t.ImageSet = x + var O = (function (e) { + function ContentSource(t, n) { + var i = e.call(this) || this + return (i.url = t), (i.mimeType = n), i + } + return ( + r(ContentSource, e), + (ContentSource.prototype.isValid = function () { + return !(!this.mimeType || !this.url) + }), + (ContentSource.mimeTypeProperty = new m.StringProperty(m.Versions.v1_1, 'mimeType')), + (ContentSource.urlProperty = new m.StringProperty(m.Versions.v1_1, 'url')), + o([(0, m.property)(ContentSource.mimeTypeProperty)], ContentSource.prototype, 'mimeType', void 0), + o([(0, m.property)(ContentSource.urlProperty)], ContentSource.prototype, 'url', void 0), + ContentSource + ) + })(m.SerializableObject) + t.ContentSource = O + var N = (function (e) { + function CaptionSource(t, n, i) { + var r = e.call(this, t, n) || this + return (r.label = i), r + } + return ( + r(CaptionSource, e), + (CaptionSource.prototype.getSchemaKey = function () { + return 'CaptionSource' + }), + (CaptionSource.prototype.render = function () { + var e = void 0 + return ( + this.isValid() && + (((e = document.createElement('track')).src = this.url), + (e.kind = 'captions'), + (e.label = this.label)), + e + ) + }), + (CaptionSource.labelProperty = new m.StringProperty(m.Versions.v1_6, 'label')), + o([(0, m.property)(CaptionSource.labelProperty)], CaptionSource.prototype, 'label', void 0), + CaptionSource + ) + })(O) + t.CaptionSource = N + var P = (function (e) { + function MediaSource() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(MediaSource, e), + (MediaSource.prototype.getSchemaKey = function () { + return 'MediaSource' + }), + (MediaSource.prototype.render = function () { + var e = void 0 + return ( + this.isValid() && (((e = document.createElement('source')).src = this.url), (e.type = this.mimeType)), e + ) + }), + MediaSource + ) + })(O) + t.MediaSource = P + var D = (function () { + function MediaPlayer() {} + return ( + (MediaPlayer.prototype.play = function () {}), + Object.defineProperty(MediaPlayer.prototype, 'posterUrl', { + get: function () { + return this._posterUrl + }, + set: function (e) { + this._posterUrl = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(MediaPlayer.prototype, 'selectedMediaType', { + get: function () {}, + enumerable: !1, + configurable: !0, + }), + MediaPlayer + ) + })() + t.MediaPlayer = D + var M = (function (e) { + function HTML5MediaPlayer(t) { + var n = e.call(this) || this + return (n.owner = t), (n._selectedSources = []), (n._captionSources = []), n.processSources(), n + } + return ( + r(HTML5MediaPlayer, e), + (HTML5MediaPlayer.prototype.processSources = function () { + var e + ;(this._selectedSources = []), (this._captionSources = []), (this._selectedMediaType = void 0) + for (var t = 0, n = this.owner.sources; t < n.length; t++) { + var i = n[t], + r = i.mimeType ? i.mimeType.split('/') : [] + if (2 === r.length) { + if (!this._selectedMediaType) { + var o = HTML5MediaPlayer.supportedMediaTypes.indexOf(r[0]) + o >= 0 && (this._selectedMediaType = HTML5MediaPlayer.supportedMediaTypes[o]) + } + r[0] === this._selectedMediaType && this._selectedSources.push(i) + } + } + ;(e = this._captionSources).push.apply(e, this.owner.captionSources) + }), + (HTML5MediaPlayer.prototype.canPlay = function () { + return this._selectedSources.length > 0 + }), + (HTML5MediaPlayer.prototype.fetchVideoDetails = function () { + return s(this, void 0, void 0, function () { + return a(this, function (e) { + return [2] + }) + }) + }), + (HTML5MediaPlayer.prototype.render = function () { + 'video' === this._selectedMediaType + ? (this._mediaElement = document.createElement('video')) + : (this._mediaElement = document.createElement('audio')), + this._mediaElement.setAttribute( + 'aria-label', + this.owner.altText ? this.owner.altText : _.Strings.defaults.mediaPlayerAriaLabel(), + ), + this._mediaElement.setAttribute('webkit-playsinline', ''), + this._mediaElement.setAttribute('playsinline', ''), + this._mediaElement.setAttribute('crossorigin', ''), + (this._mediaElement.autoplay = !0), + (this._mediaElement.controls = !0), + d.isMobileOS() && (this._mediaElement.muted = !0), + (this._mediaElement.preload = 'none'), + (this._mediaElement.style.width = '100%') + for (var e = 0, t = this.owner.sources; e < t.length; e++) { + var n = t[e].render() + d.appendChild(this._mediaElement, n) + } + for (var i = 0, r = this.owner.captionSources; i < r.length; i++) { + var o = r[i] + if ('vtt' == o.mimeType) { + var s = o.render() + d.appendChild(this._mediaElement, s) + } + } + return this._mediaElement + }), + (HTML5MediaPlayer.prototype.play = function () { + this._mediaElement && this._mediaElement.play() + }), + Object.defineProperty(HTML5MediaPlayer.prototype, 'selectedMediaType', { + get: function () { + return this._selectedMediaType + }, + enumerable: !1, + configurable: !0, + }), + (HTML5MediaPlayer.supportedMediaTypes = ['audio', 'video']), + HTML5MediaPlayer + ) + })(D) + t.HTML5MediaPlayer = M + var L = (function (e) { + function CustomMediaPlayer(t) { + return e.call(this) || this + } + return r(CustomMediaPlayer, e), CustomMediaPlayer + })(D) + t.CustomMediaPlayer = L + var k = (function (e) { + function IFrameMediaMediaPlayer(t, n) { + var i = e.call(this, t) || this + return (i.iFrameTitle = n), t.length >= 2 && (i._videoId = t[1]), i + } + return ( + r(IFrameMediaMediaPlayer, e), + (IFrameMediaMediaPlayer.prototype.canPlay = function () { + return void 0 !== this._videoId + }), + (IFrameMediaMediaPlayer.prototype.render = function () { + var e = document.createElement('div') + ;(e.style.position = 'relative'), + (e.style.width = '100%'), + (e.style.height = '0'), + (e.style.paddingBottom = '56.25%') + var t = document.createElement('iframe') + return ( + (t.style.position = 'absolute'), + (t.style.top = '0'), + (t.style.left = '0'), + (t.style.width = '100%'), + (t.style.height = '100%'), + (t.src = this.getEmbedVideoUrl()), + (t.frameBorder = '0'), + this.iFrameTitle && (t.title = this.iFrameTitle), + (t.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'), + (t.allowFullscreen = !0), + e.appendChild(t), + e + ) + }), + Object.defineProperty(IFrameMediaMediaPlayer.prototype, 'videoId', { + get: function () { + return this._videoId + }, + enumerable: !1, + configurable: !0, + }), + IFrameMediaMediaPlayer + ) + })(L) + t.IFrameMediaMediaPlayer = k + var F = (function (e) { + function VimeoPlayer() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(VimeoPlayer, e), + (VimeoPlayer.prototype.fetchVideoDetails = function () { + return s(this, void 0, void 0, function () { + var e, t, n + return a(this, function (i) { + switch (i.label) { + case 0: + return ( + (e = 'https://vimeo.com/api/oembed.json?url='.concat(this.getEmbedVideoUrl())), [4, fetch(e)] + ) + case 1: + return (t = i.sent()).ok ? [4, t.json()] : [3, 3] + case 2: + ;(n = i.sent()), (this.posterUrl = n.thumbnail_url), (i.label = 3) + case 3: + return [2] + } + }) + }) + }), + (VimeoPlayer.prototype.getEmbedVideoUrl = function () { + return 'https://player.vimeo.com/video/'.concat(this.videoId, '?autoplay=1') + }), + VimeoPlayer + ) + })(k) + t.VimeoPlayer = F + var B = (function (e) { + function DailymotionPlayer() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(DailymotionPlayer, e), + (DailymotionPlayer.prototype.fetchVideoDetails = function () { + return s(this, void 0, void 0, function () { + var e, t, n + return a(this, function (i) { + switch (i.label) { + case 0: + return ( + (e = 'https://api.dailymotion.com/video/'.concat(this.videoId, '?fields=thumbnail_720_url')), + [4, fetch(e)] + ) + case 1: + return (t = i.sent()).ok ? [4, t.json()] : [3, 3] + case 2: + ;(n = i.sent()), (this.posterUrl = n.thumbnail_720_url), (i.label = 3) + case 3: + return [2] + } + }) + }) + }), + (DailymotionPlayer.prototype.getEmbedVideoUrl = function () { + return 'https://www.dailymotion.com/embed/video/'.concat(this.videoId, '?autoplay=1') + }), + DailymotionPlayer + ) + })(k) + t.DailymotionPlayer = B + var G = (function (e) { + function YouTubePlayer(t, n) { + var i = e.call(this, t, n) || this + return (i.iFrameTitle = n), t.length >= 3 && void 0 !== t[2] && (i._startTimeIndex = parseInt(t[2])), i + } + return ( + r(YouTubePlayer, e), + (YouTubePlayer.prototype.fetchVideoDetails = function () { + return s(this, void 0, void 0, function () { + return a(this, function (e) { + return ( + (this.posterUrl = this.videoId + ? 'https://img.youtube.com/vi/'.concat(this.videoId, '/maxresdefault.jpg') + : void 0), + [2] + ) + }) + }) + }), + (YouTubePlayer.prototype.getEmbedVideoUrl = function () { + var e = 'https://www.youtube.com/embed/'.concat(this.videoId, '?autoplay=1') + return void 0 !== this._startTimeIndex && (e += '&start='.concat(this._startTimeIndex)), e + }), + YouTubePlayer + ) + })(k) + t.YouTubePlayer = G + var U = (function (e) { + function Media() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.sources = []), (t.captionSources = []), t + } + return ( + r(Media, e), + (Media.prototype.createMediaPlayer = function () { + for (var e = 0, t = Media.customMediaPlayers; e < t.length; e++) + for (var n = t[e], i = 0, r = this.sources; i < r.length; i++) { + var o = r[i] + if (o.url) + for (var s = 0, a = n.urlPatterns; s < a.length; s++) { + var l = a[s].exec(o.url) + if (null !== l) return n.createMediaPlayer(l) + } + } + return new M(this) + }), + (Media.prototype.handlePlayButtonInvoke = function (e) { + if (this.hostConfig.media.allowInlinePlayback) { + if ((e.preventDefault(), (e.cancelBubble = !0), this.renderedElement)) { + var t = this._mediaPlayer.render() + clearElement(this.renderedElement), + this.renderedElement.appendChild(t), + this._mediaPlayer.play(), + t.focus() + } + } else Media.onPlay && (e.preventDefault(), (e.cancelBubble = !0), Media.onPlay(this)) + }), + (Media.prototype.displayPoster = function () { + return s(this, void 0, void 0, function () { + var e, + t, + n, + i, + r, + o, + s = this + return a(this, function (a) { + return ( + this.renderedElement && + (12, + 15, + ((e = document.createElement('div')).className = + this.hostConfig.makeCssClassName('ac-media-poster')), + e.setAttribute('role', 'contentinfo'), + e.setAttribute( + 'aria-label', + this.altText ? this.altText : _.Strings.defaults.mediaPlayerAriaLabel(), + ), + (e.style.position = 'relative'), + (e.style.display = 'flex'), + (t = this.poster ? this.poster : this._mediaPlayer.posterUrl) || + (t = this.hostConfig.media.defaultPoster), + t + ? (((n = document.createElement('img')).style.width = '100%'), + (n.style.height = '100%'), + n.setAttribute('role', 'presentation'), + (n.onerror = function (t) { + n.parentNode && n.parentNode.removeChild(n), + e.classList.add('empty'), + (e.style.minHeight = '150px') + }), + (n.src = t), + e.appendChild(n)) + : (e.classList.add('empty'), (e.style.minHeight = '150px')), + this.hostConfig.supportsInteractivity && + this._mediaPlayer.canPlay() && + (((i = document.createElement('div')).tabIndex = 0), + i.setAttribute('role', 'button'), + i.setAttribute('aria-label', _.Strings.defaults.mediaPlayerPlayMedia()), + (i.className = this.hostConfig.makeCssClassName('ac-media-playButton')), + (i.style.display = 'flex'), + (i.style.alignItems = 'center'), + (i.style.justifyContent = 'center'), + (i.onclick = function (e) { + s.handlePlayButtonInvoke(e) + }), + (i.onkeypress = function (e) { + ;('Enter' !== e.code && 'Space' !== e.code) || s.handlePlayButtonInvoke(e) + }), + ((r = document.createElement('div')).className = + this.hostConfig.makeCssClassName('ac-media-playButton-arrow')), + (r.style.width = '12px'), + (r.style.height = '15px'), + (r.style.borderTopWidth = '7.5px'), + (r.style.borderBottomWidth = '7.5px'), + (r.style.borderLeftWidth = '12px'), + (r.style.borderRightWidth = '0'), + (r.style.borderStyle = 'solid'), + (r.style.borderTopColor = 'transparent'), + (r.style.borderRightColor = 'transparent'), + (r.style.borderBottomColor = 'transparent'), + (r.style.transform = 'translate(1.2px,0px)'), + i.appendChild(r), + ((o = document.createElement('div')).style.position = 'absolute'), + (o.style.left = '0'), + (o.style.top = '0'), + (o.style.width = '100%'), + (o.style.height = '100%'), + (o.style.display = 'flex'), + (o.style.justifyContent = 'center'), + (o.style.alignItems = 'center'), + o.appendChild(i), + e.appendChild(o)), + clearElement(this.renderedElement), + this.renderedElement.appendChild(e)), + [2] + ) + }) + }) + }), + (Media.prototype.internalRender = function () { + var e = document.createElement('div') + return (e.className = this.hostConfig.makeCssClassName('ac-media')), e + }), + (Media.prototype.render = function () { + var t = this, + n = e.prototype.render.call(this) + return ( + n && + ((this._mediaPlayer = this.createMediaPlayer()), + this._mediaPlayer.fetchVideoDetails().then(function () { + return t.displayPoster() + })), + n + ) + }), + (Media.prototype.releaseDOMResources = function () { + e.prototype.releaseDOMResources.call(this), this.displayPoster() + }), + (Media.prototype.getJsonTypeName = function () { + return 'Media' + }), + (Media.prototype.getResourceInformation = function () { + var e = [] + if (this._mediaPlayer) { + var t = this.poster ? this.poster : this.hostConfig.media.defaultPoster + t && + e.push({ + url: t, + mimeType: 'image', + }) + } + for (var n = 0, i = this.sources; n < i.length; n++) { + var r = i[n] + r.isValid() && + e.push({ + url: r.url, + mimeType: r.mimeType, + }) + } + for (var o = 0, s = this.captionSources; o < s.length; o++) { + var a = s[o] + a.isValid() && + e.push({ + url: a.url, + mimeType: a.mimeType, + }) + } + return e + }), + Object.defineProperty(Media.prototype, 'selectedMediaType', { + get: function () { + return this._mediaPlayer.selectedMediaType + }, + enumerable: !1, + configurable: !0, + }), + (Media.customMediaPlayers = [ + { + urlPatterns: [ + /^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi, + /^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi, + ], + createMediaPlayer: function (e) { + return new G(e, _.Strings.defaults.youTubeVideoPlayer()) + }, + }, + { + urlPatterns: [/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi], + createMediaPlayer: function (e) { + return new F(e, _.Strings.defaults.vimeoVideoPlayer()) + }, + }, + { + urlPatterns: [/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi], + createMediaPlayer: function (e) { + return new B(e, _.Strings.defaults.dailymotionVideoPlayer()) + }, + }, + ]), + (Media.sourcesProperty = new m.SerializableObjectCollectionProperty(m.Versions.v1_1, 'sources', P)), + (Media.captionSourcesProperty = new m.SerializableObjectCollectionProperty( + m.Versions.v1_6, + 'captionSources', + N, + )), + (Media.posterProperty = new m.StringProperty(m.Versions.v1_1, 'poster')), + (Media.altTextProperty = new m.StringProperty(m.Versions.v1_1, 'altText')), + o([(0, m.property)(Media.sourcesProperty)], Media.prototype, 'sources', void 0), + o([(0, m.property)(Media.captionSourcesProperty)], Media.prototype, 'captionSources', void 0), + o([(0, m.property)(Media.posterProperty)], Media.prototype, 'poster', void 0), + o([(0, m.property)(Media.altTextProperty)], Media.prototype, 'altText', void 0), + Media + ) + })(y) + t.Media = U + var z = (function (e) { + function Input() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(Input, e), + (Input.prototype.getAllLabelIds = function () { + var e = [] + return ( + this.labelledBy && e.push(this.labelledBy), + this._renderedLabelElement && e.push(this._renderedLabelElement.id), + this._renderedErrorMessageElement && e.push(this._renderedErrorMessageElement.id), + e + ) + }), + (Input.prototype.updateInputControlAriaLabelledBy = function () { + if (this._renderedInputControlElement) { + var e = this.getAllLabelIds() + e.length > 0 + ? this._renderedInputControlElement.setAttribute('aria-labelledby', e.join(' ')) + : this._renderedInputControlElement.removeAttribute('aria-labelledby') + } + }), + Object.defineProperty(Input.prototype, 'isNullable', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Input.prototype, 'renderedInputControlElement', { + get: function () { + return this._renderedInputControlElement + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Input.prototype, 'inputControlContainerElement', { + get: function () { + return this._inputControlContainerElement + }, + enumerable: !1, + configurable: !0, + }), + (Input.prototype.overrideInternalRender = function () { + var e = this.hostConfig + ;(this._outerContainerElement = document.createElement('div')), + (this._outerContainerElement.style.display = 'flex'), + (this._outerContainerElement.style.flexDirection = 'column') + var t = d.generateUniqueId() + if (this.label) { + var n = new E() + n.setParent(this), (n.forElementId = t) + var i = new C(this.label) + if ((n.addInline(i), this.isRequired)) { + i.init(e.inputs.label.requiredInputs) + var r = new C(e.inputs.label.requiredInputs.suffix) + ;(r.color = e.inputs.label.requiredInputs.suffixColor), (r.ariaHidden = !0), n.addInline(r) + } else i.init(e.inputs.label.optionalInputs) + ;(this._renderedLabelElement = n.render()), + this._renderedLabelElement && + ((this._renderedLabelElement.id = d.generateUniqueId()), + (this._renderedLabelElement.style.marginBottom = + e.getEffectiveSpacing(e.inputs.label.inputSpacing) + 'px'), + this._outerContainerElement.appendChild(this._renderedLabelElement)) + } + if ( + ((this._inputControlContainerElement = document.createElement('div')), + (this._inputControlContainerElement.className = e.makeCssClassName('ac-input-container')), + (this._inputControlContainerElement.style.display = 'flex'), + 'stretch' === this.height && + ((this._inputControlContainerElement.style.alignItems = 'stretch'), + (this._inputControlContainerElement.style.flex = '1 1 auto')), + (this._renderedInputControlElement = this.internalRender()), + this._renderedInputControlElement) + ) + return ( + (this._renderedInputControlElement.id = t), + (this._renderedInputControlElement.style.minWidth = '0px'), + this.isNullable && + this.isRequired && + (this._renderedInputControlElement.setAttribute('aria-required', 'true'), + this._renderedInputControlElement.classList.add(e.makeCssClassName('ac-input-required'))), + this._inputControlContainerElement.appendChild(this._renderedInputControlElement), + this._outerContainerElement.appendChild(this._inputControlContainerElement), + this.updateInputControlAriaLabelledBy(), + this._outerContainerElement + ) + this.resetDirtyState() + }), + (Input.prototype.valueChanged = function () { + var e, t, n + this.getRootElement().updateActionsEnabledState(), + this.isValid() && this.resetValidationFailureCue(), + this.onValueChanged && this.onValueChanged(this), + (t = (e = this).getRootElement()), + (n = t && t.onInputValueChanged ? t.onInputValueChanged : Ee.onInputValueChanged) && n(e) + }), + (Input.prototype.resetValidationFailureCue = function () { + this.renderedInputControlElement && + (this.renderedInputControlElement.classList.remove( + this.hostConfig.makeCssClassName('ac-input-validation-failed'), + ), + this.updateInputControlAriaLabelledBy(), + this._renderedErrorMessageElement && + (this._outerContainerElement.removeChild(this._renderedErrorMessageElement), + (this._renderedErrorMessageElement = void 0))) + }), + (Input.prototype.showValidationErrorMessage = function () { + if (this.renderedElement && this.errorMessage && c.GlobalSettings.displayInputValidationErrors) { + var e = new S() + e.setParent(this), + (e.text = this.errorMessage), + (e.wrap = !0), + e.init(this.hostConfig.inputs.errorMessage), + (this._renderedErrorMessageElement = e.render()), + this._renderedErrorMessageElement && + ((this._renderedErrorMessageElement.id = d.generateUniqueId()), + this._outerContainerElement.appendChild(this._renderedErrorMessageElement), + this.updateInputControlAriaLabelledBy()) + } + }), + (Input.prototype.focus = function () { + this._renderedInputControlElement && this._renderedInputControlElement.focus() + }), + (Input.prototype.isValid = function () { + return !0 + }), + (Input.prototype.isDirty = function () { + return this.value !== this._oldValue + }), + (Input.prototype.resetDirtyState = function () { + this._oldValue = this.value + }), + (Input.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + this.id || + t.addFailure(this, l.ValidationEvent.PropertyCantBeNull, _.Strings.errors.inputsMustHaveUniqueId()), + this.isRequired && + (this.label || + t.addFailure( + this, + l.ValidationEvent.RequiredInputsShouldHaveLabel, + 'Required inputs should have a label', + ), + this.errorMessage || + t.addFailure( + this, + l.ValidationEvent.RequiredInputsShouldHaveErrorMessage, + 'Required inputs should have an error message', + )) + }), + (Input.prototype.validateValue = function () { + this.resetValidationFailureCue() + var e = this.isRequired ? this.isSet() && this.isValid() : this.isValid() + return ( + !e && + this.renderedInputControlElement && + (this.renderedInputControlElement.classList.add( + this.hostConfig.makeCssClassName('ac-input-validation-failed'), + ), + this.showValidationErrorMessage()), + e + ) + }), + (Input.prototype.getAllInputs = function (e) { + return void 0 === e && (e = !0), [this] + }), + (Input.prototype.render = function () { + var t = e.prototype.render.call(this) + return this.resetDirtyState(), t + }), + Object.defineProperty(Input.prototype, 'isInteractive', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (Input.labelProperty = new m.StringProperty(m.Versions.v1_3, 'label', !0)), + (Input.isRequiredProperty = new m.BoolProperty(m.Versions.v1_3, 'isRequired', !1)), + (Input.errorMessageProperty = new m.StringProperty(m.Versions.v1_3, 'errorMessage', !0)), + o([(0, m.property)(Input.labelProperty)], Input.prototype, 'label', void 0), + o([(0, m.property)(Input.isRequiredProperty)], Input.prototype, 'isRequired', void 0), + o([(0, m.property)(Input.errorMessageProperty)], Input.prototype, 'errorMessage', void 0), + Input + ) + })(y) + t.Input = z + var V = (function (e) { + function TextInput() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.isMultiline = !1), (t.style = l.InputTextStyle.Text), t + } + return ( + r(TextInput, e), + (TextInput.prototype.setupInput = function (e) { + var t = this + ;(e.style.flex = '1 1 auto'), + (e.tabIndex = this.isDesignMode() ? -1 : 0), + this.placeholder && + ((e.placeholder = this.placeholder), e.setAttribute('aria-label', this.placeholder)), + this.defaultValue && (e.value = this.defaultValue), + this.maxLength && this.maxLength > 0 && (e.maxLength = this.maxLength), + (e.oninput = function () { + t.valueChanged() + }), + (e.onkeypress = function (e) { + e.ctrlKey && + 'Enter' === e.code && + t.inlineAction && + t.inlineAction.isEffectivelyEnabled() && + t.inlineAction.execute() + }) + }), + (TextInput.prototype.internalRender = function () { + var e + return ( + this.isMultiline && this.style !== l.InputTextStyle.Password + ? (((e = document.createElement('textarea')).className = this.hostConfig.makeCssClassName( + 'ac-input', + 'ac-textInput', + 'ac-multiline', + )), + 'stretch' === this.height && (e.style.height = 'initial')) + : (((e = document.createElement('input')).className = this.hostConfig.makeCssClassName( + 'ac-input', + 'ac-textInput', + )), + (e.type = l.InputTextStyle[this.style].toLowerCase())), + this.setupInput(e), + e + ) + }), + (TextInput.prototype.overrideInternalRender = function () { + var t = this, + n = e.prototype.overrideInternalRender.call(this) + if (this.inlineAction) { + var i = document.createElement('button') + if ( + ((i.className = this.hostConfig.makeCssClassName( + this.inlineAction.isEffectivelyEnabled() + ? 'ac-inlineActionButton' + : 'ac-inlineActionButton-disabled', + )), + (i.onclick = function (e) { + t.inlineAction && + t.inlineAction.isEffectivelyEnabled() && + (e.preventDefault(), (e.cancelBubble = !0), t.inlineAction.execute()) + }), + this.inlineAction.iconUrl) + ) { + i.classList.add('iconOnly') + var r = document.createElement('img') + ;(r.style.height = '100%'), + r.setAttribute('role', 'presentation'), + (r.style.display = 'none'), + (r.onload = function () { + r.style.removeProperty('display') + }), + (r.onerror = function () { + i.removeChild(r), + i.classList.remove('iconOnly'), + i.classList.add('textOnly'), + (i.textContent = + t.inlineAction && t.inlineAction.title + ? t.inlineAction.title + : _.Strings.defaults.inlineActionTitle()) + }), + (r.src = this.inlineAction.iconUrl), + i.appendChild(r), + (i.title = this.inlineAction.title + ? this.inlineAction.title + : _.Strings.defaults.inlineActionTitle()) + } else + i.classList.add('textOnly'), + (i.textContent = this.inlineAction.title + ? this.inlineAction.title + : _.Strings.defaults.inlineActionTitle()) + this.inlineAction.setupElementForAccessibility(i, !0), + (i.style.marginLeft = '8px'), + this.inputControlContainerElement.appendChild(i) + } + return n + }), + (TextInput.prototype.getJsonTypeName = function () { + return 'Input.Text' + }), + (TextInput.prototype.getAllActions = function () { + var t = e.prototype.getAllActions.call(this) + return this.inlineAction && t.push(this.inlineAction), t + }), + (TextInput.prototype.getActionById = function (t) { + var n = e.prototype.getActionById.call(this, t) + return !n && this.inlineAction && (n = this.inlineAction.getActionById(t)), n + }), + (TextInput.prototype.isSet = function () { + return !!this.value + }), + (TextInput.prototype.isValid = function () { + return !this.value || !this.regex || new RegExp(this.regex, 'g').test(this.value) + }), + Object.defineProperty(TextInput.prototype, 'value', { + get: function () { + return this.renderedInputControlElement + ? (this.isMultiline, this.renderedInputControlElement.value) + : void 0 + }, + enumerable: !1, + configurable: !0, + }), + (TextInput.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + (TextInput.maxLengthProperty = new m.NumProperty(m.Versions.v1_0, 'maxLength')), + (TextInput.isMultilineProperty = new m.BoolProperty(m.Versions.v1_0, 'isMultiline', !1)), + (TextInput.placeholderProperty = new m.StringProperty(m.Versions.v1_0, 'placeholder')), + (TextInput.styleProperty = new m.EnumProperty( + m.Versions.v1_0, + 'style', + l.InputTextStyle, + l.InputTextStyle.Text, + [ + { + value: l.InputTextStyle.Text, + }, + { + value: l.InputTextStyle.Tel, + }, + { + value: l.InputTextStyle.Url, + }, + { + value: l.InputTextStyle.Email, + }, + { + value: l.InputTextStyle.Password, + targetVersion: m.Versions.v1_5, + }, + ], + )), + (TextInput.inlineActionProperty = new v(m.Versions.v1_0, 'inlineAction', ['Action.ShowCard'])), + (TextInput.regexProperty = new m.StringProperty(m.Versions.v1_3, 'regex', !0)), + o([(0, m.property)(TextInput.valueProperty)], TextInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(TextInput.maxLengthProperty)], TextInput.prototype, 'maxLength', void 0), + o([(0, m.property)(TextInput.isMultilineProperty)], TextInput.prototype, 'isMultiline', void 0), + o([(0, m.property)(TextInput.placeholderProperty)], TextInput.prototype, 'placeholder', void 0), + o([(0, m.property)(TextInput.styleProperty)], TextInput.prototype, 'style', void 0), + o([(0, m.property)(TextInput.inlineActionProperty)], TextInput.prototype, 'inlineAction', void 0), + o([(0, m.property)(TextInput.regexProperty)], TextInput.prototype, 'regex', void 0), + TextInput + ) + })(z) + t.TextInput = V + var H = (function (e) { + function ToggleInput() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.valueOn = 'true'), (t.valueOff = 'false'), (t.wrap = !1), t + } + return ( + r(ToggleInput, e), + (ToggleInput.prototype.updateInputControlAriaLabelledBy = function () { + if (this._checkboxInputElement) { + var e = this.getAllLabelIds().join(' ') + this._checkboxInputLabelElement && + this._checkboxInputLabelElement.id && + (e += ' ' + this._checkboxInputLabelElement.id), + e + ? this._checkboxInputElement.setAttribute('aria-labelledby', e) + : this._checkboxInputElement.removeAttribute('aria-labelledby') + } + }), + (ToggleInput.prototype.internalRender = function () { + var e = this, + t = document.createElement('div') + if ( + ((t.className = this.hostConfig.makeCssClassName('ac-input', 'ac-toggleInput')), + (t.style.width = '100%'), + (t.style.display = 'flex'), + (t.style.alignItems = 'center'), + (this._checkboxInputElement = document.createElement('input')), + (this._checkboxInputElement.id = d.generateUniqueId()), + (this._checkboxInputElement.type = 'checkbox'), + (this._checkboxInputElement.style.display = 'inline-block'), + (this._checkboxInputElement.style.verticalAlign = 'middle'), + (this._checkboxInputElement.style.margin = '0'), + (this._checkboxInputElement.style.flex = '0 0 auto'), + this.title && this._checkboxInputElement.setAttribute('aria-label', this.title), + this.isRequired && this._checkboxInputElement.setAttribute('aria-required', 'true'), + (this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0), + this.defaultValue === this.valueOn && (this._checkboxInputElement.checked = !0), + (this._oldCheckboxValue = this._checkboxInputElement.checked), + (this._checkboxInputElement.onchange = function () { + e.valueChanged() + }), + d.appendChild(t, this._checkboxInputElement), + this.title || this.isDesignMode()) + ) { + var n = new S() + if ( + (n.setParent(this), + (n.forElementId = this._checkboxInputElement.id), + (n.hostConfig = this.hostConfig), + (n.text = this.title ? this.title : this.getJsonTypeName()), + (n.useMarkdown = c.GlobalSettings.useMarkdownInRadioButtonAndCheckbox), + (n.wrap = this.wrap), + (this._checkboxInputLabelElement = n.render()), + this._checkboxInputLabelElement) + ) { + ;(this._checkboxInputLabelElement.id = d.generateUniqueId()), + (this._checkboxInputLabelElement.style.display = 'inline-block'), + (this._checkboxInputLabelElement.style.flex = '1 1 auto'), + (this._checkboxInputLabelElement.style.marginLeft = '6px'), + (this._checkboxInputLabelElement.style.verticalAlign = 'middle') + var i = document.createElement('div') + ;(i.style.width = '6px'), d.appendChild(t, i), d.appendChild(t, this._checkboxInputLabelElement) + } + } + return t + }), + Object.defineProperty(ToggleInput.prototype, 'isNullable', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (ToggleInput.prototype.getJsonTypeName = function () { + return 'Input.Toggle' + }), + (ToggleInput.prototype.focus = function () { + this._checkboxInputElement && this._checkboxInputElement.focus() + }), + (ToggleInput.prototype.isSet = function () { + return this.isRequired ? this.value === this.valueOn : !!this.value + }), + (ToggleInput.prototype.isDirty = function () { + return !!this._checkboxInputElement && this._checkboxInputElement.checked !== this._oldCheckboxValue + }), + Object.defineProperty(ToggleInput.prototype, 'value', { + get: function () { + return this._checkboxInputElement + ? this._checkboxInputElement.checked + ? this.valueOn + : this.valueOff + : void 0 + }, + enumerable: !1, + configurable: !0, + }), + (ToggleInput.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + (ToggleInput.titleProperty = new m.StringProperty(m.Versions.v1_0, 'title')), + (ToggleInput.valueOnProperty = new m.StringProperty( + m.Versions.v1_0, + 'valueOn', + !0, + void 0, + 'true', + function (e) { + return 'true' + }, + )), + (ToggleInput.valueOffProperty = new m.StringProperty( + m.Versions.v1_0, + 'valueOff', + !0, + void 0, + 'false', + function (e) { + return 'false' + }, + )), + (ToggleInput.wrapProperty = new m.BoolProperty(m.Versions.v1_2, 'wrap', !1)), + o([(0, m.property)(ToggleInput.valueProperty)], ToggleInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(ToggleInput.titleProperty)], ToggleInput.prototype, 'title', void 0), + o([(0, m.property)(ToggleInput.valueOnProperty)], ToggleInput.prototype, 'valueOn', void 0), + o([(0, m.property)(ToggleInput.valueOffProperty)], ToggleInput.prototype, 'valueOff', void 0), + o([(0, m.property)(ToggleInput.wrapProperty)], ToggleInput.prototype, 'wrap', void 0), + ToggleInput + ) + })(z) + t.ToggleInput = H + var q = (function (e) { + function Choice(t, n) { + var i = e.call(this) || this + return (i.title = t), (i.value = n), i + } + return ( + r(Choice, e), + (Choice.prototype.getSchemaKey = function () { + return 'Choice' + }), + (Choice.titleProperty = new m.StringProperty(m.Versions.v1_0, 'title')), + (Choice.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + o([(0, m.property)(Choice.titleProperty)], Choice.prototype, 'title', void 0), + o([(0, m.property)(Choice.valueProperty)], Choice.prototype, 'value', void 0), + Choice + ) + })(m.SerializableObject) + t.Choice = q + var j = (function (e) { + function ChoiceSetInput() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.isMultiSelect = !1), (t.wrap = !1), (t.choices = []), t + } + return ( + r(ChoiceSetInput, e), + Object.defineProperty(ChoiceSetInput.prototype, 'isCompact', { + get: function () { + return !this.style || 'compact' === this.style + }, + set: function (e) { + this.style = e ? void 0 : 'expanded' + }, + enumerable: !1, + configurable: !0, + }), + (ChoiceSetInput.getUniqueCategoryName = function () { + var e = '__ac-category' + ChoiceSetInput._uniqueCategoryCounter + return ChoiceSetInput._uniqueCategoryCounter++, e + }), + (ChoiceSetInput.prototype.internalApplyAriaCurrent = function () { + if (this._selectElement) { + var e = this._selectElement.options + if (e) + for (var t = 0, n = Array.from(e); t < n.length; t++) { + var i = n[t] + i.selected ? i.setAttribute('aria-current', 'true') : i.removeAttribute('aria-current') + } + } + }), + (ChoiceSetInput.prototype.renderCompoundInput = function (e, t, n) { + var i = this, + r = document.createElement('div') + ;(r.className = this.hostConfig.makeCssClassName('ac-input', e)), + (r.style.width = '100%'), + (r.tabIndex = this.isDesignMode() ? -1 : 0), + (this._toggleInputs = []), + (this._labels = []) + for (var o = 0, s = this.choices; o < s.length; o++) { + var a = s[o], + l = document.createElement('input') + ;(l.id = d.generateUniqueId()), + (l.type = t), + (l.style.margin = '0'), + (l.style.display = 'inline-block'), + (l.style.verticalAlign = 'middle'), + (l.style.flex = '0 0 auto'), + (l.name = this.id ? this.id : this._uniqueCategoryName), + this.isRequired && l.setAttribute('aria-required', 'true'), + (l.tabIndex = this.isDesignMode() ? -1 : 0), + a.value && (l.value = a.value), + a.title && l.setAttribute('aria-label', a.title), + n && a.value && n.indexOf(a.value) >= 0 && (l.checked = !0), + (l.onchange = function () { + i.valueChanged() + }), + this._toggleInputs.push(l) + var p = document.createElement('div') + ;(p.style.display = 'flex'), (p.style.alignItems = 'center'), d.appendChild(p, l) + var u = new S() + u.setParent(this), + (u.forElementId = l.id), + (u.hostConfig = this.hostConfig), + (u.text = a.title ? a.title : 'Choice ' + this._toggleInputs.length), + (u.useMarkdown = c.GlobalSettings.useMarkdownInRadioButtonAndCheckbox), + (u.wrap = this.wrap) + var h = u.render() + if ((this._labels.push(h), h)) { + ;(h.id = d.generateUniqueId()), + (h.style.display = 'inline-block'), + (h.style.flex = '1 1 auto'), + (h.style.marginLeft = '6px'), + (h.style.verticalAlign = 'middle') + var m = document.createElement('div') + ;(m.style.width = '6px'), d.appendChild(p, m), d.appendChild(p, h) + } + d.appendChild(r, p) + } + return r + }), + (ChoiceSetInput.prototype.updateInputControlAriaLabelledBy = function () { + if ((this.isMultiSelect || 'expanded' === this.style) && this._toggleInputs && this._labels) + for (var t = this.getAllLabelIds(), n = 0; n < this._toggleInputs.length; n++) { + var i = t.join(' '), + r = this._labels[n] + r && r.id && (i += ' ' + r.id), + i + ? this._toggleInputs[n].setAttribute('aria-labelledby', i) + : this._toggleInputs[n].removeAttribute('aria-labelledby') + } + else e.prototype.updateInputControlAriaLabelledBy.call(this) + }), + (ChoiceSetInput.prototype.internalRender = function () { + var e = this + if (((this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName()), this.isMultiSelect)) + return this.renderCompoundInput( + 'ac-choiceSetInput-multiSelect', + 'checkbox', + this.defaultValue ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator) : void 0, + ) + if ('expanded' === this.style) + return this.renderCompoundInput( + 'ac-choiceSetInput-expanded', + 'radio', + this.defaultValue ? [this.defaultValue] : void 0, + ) + if ('filtered' === this.style) { + var t = document.createElement('div') + ;(t.style.width = '100%'), + (this._textInput = document.createElement('input')), + (this._textInput.className = this.hostConfig.makeCssClassName( + 'ac-input', + 'ac-multichoiceInput', + 'ac-choiceSetInput-filtered', + )), + (this._textInput.type = 'text'), + (this._textInput.style.width = '100%'), + (this._textInput.oninput = function () { + e.valueChanged(), + e._textInput && + (e.value + ? (e._textInput.removeAttribute('placeholder'), e._textInput.removeAttribute('aria-label')) + : e.placeholder && + ((e._textInput.placeholder = e.placeholder), + e._textInput.setAttribute('aria-label', e.placeholder))) + }), + this.defaultValue && (this._textInput.value = this.defaultValue), + this.placeholder && + !this._textInput.value && + ((this._textInput.placeholder = this.placeholder), + this._textInput.setAttribute('aria-label', this.placeholder)), + (this._textInput.tabIndex = this.isDesignMode() ? -1 : 0) + var n = document.createElement('datalist') + n.id = d.generateUniqueId() + for (var i = 0, r = this.choices; i < r.length; i++) { + var o = r[i], + s = document.createElement('option') + o.title && ((s.value = o.title), s.setAttribute('aria-label', o.title)), + (s.tabIndex = this.isDesignMode() ? -1 : 0), + n.appendChild(s) + } + return this._textInput.setAttribute('list', n.id), t.append(this._textInput, n), t + } + ;(this._selectElement = document.createElement('select')), + (this._selectElement.className = this.hostConfig.makeCssClassName( + 'ac-input', + 'ac-multichoiceInput', + 'ac-choiceSetInput-compact', + )), + (this._selectElement.style.width = '100%'), + (this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0) + var a = document.createElement('option') + ;(a.selected = !0), + (a.disabled = !0), + (a.hidden = !0), + (a.value = ''), + this.placeholder && (a.text = this.placeholder), + d.appendChild(this._selectElement, a) + for (var l = 0, c = this.choices; l < c.length; l++) { + o = c[l] + ;((s = document.createElement('option')).value = o.value), + o.title && ((s.text = o.title), s.setAttribute('aria-label', o.title)), + (s.tabIndex = this.isDesignMode() ? -1 : 0), + o.value === this.defaultValue && (s.selected = !0), + d.appendChild(this._selectElement, s) + } + return ( + (this._selectElement.onchange = function () { + e.internalApplyAriaCurrent(), e.valueChanged() + }), + this.internalApplyAriaCurrent(), + this._selectElement + ) + }), + (ChoiceSetInput.prototype.getJsonTypeName = function () { + return 'Input.ChoiceSet' + }), + (ChoiceSetInput.prototype.focus = function () { + this._toggleInputs && (this.isMultiSelect || 'expanded' === this.style) + ? this._toggleInputs.length > 0 && this._toggleInputs[0].focus() + : this._textInput + ? this._textInput.focus() + : e.prototype.focus.call(this) + }), + (ChoiceSetInput.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + 0 === this.choices.length && + t.addFailure( + this, + l.ValidationEvent.CollectionCantBeEmpty, + _.Strings.errors.choiceSetMustHaveAtLeastOneChoice(), + ) + for (var n = 0, i = this.choices; n < i.length; n++) { + var r = i[n] + ;(r.title && r.value) || + t.addFailure( + this, + l.ValidationEvent.PropertyCantBeNull, + _.Strings.errors.choiceSetChoicesMustHaveTitleAndValue(), + ) + } + }), + (ChoiceSetInput.prototype.isSet = function () { + return !!this.value + }), + (ChoiceSetInput.prototype.isValid = function () { + if (this._textInput) { + if ('' === this.value || this.value === this.placeholder) return !0 + for (var t = 0, n = this.choices; t < n.length; t++) { + var i = n[t] + if (this.value === i.value) return !0 + } + return !1 + } + return e.prototype.isValid.call(this) + }), + Object.defineProperty(ChoiceSetInput.prototype, 'value', { + get: function () { + if (this.isMultiSelect) { + if (!this._toggleInputs || 0 === this._toggleInputs.length) return + for (var e = '', t = 0, n = this._toggleInputs; t < n.length; t++) { + ;(l = n[t]).checked && + ('' !== e && (e += this.hostConfig.choiceSetInputValueSeparator), (e += l.value)) + } + return e || void 0 + } + if (this._selectElement) + return this._selectElement.selectedIndex > 0 ? this._selectElement.value : void 0 + if (this._textInput) { + for (var i = 0, r = this.choices; i < r.length; i++) { + var o = r[i] + if (o.title && this._textInput.value === o.title) return o.value + } + return this._textInput.value + } + if (this._toggleInputs && this._toggleInputs.length > 0) + for (var s = 0, a = this._toggleInputs; s < a.length; s++) { + var l + if ((l = a[s]).checked) return l.value + } + }, + enumerable: !1, + configurable: !0, + }), + (ChoiceSetInput.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + (ChoiceSetInput.choicesProperty = new m.SerializableObjectCollectionProperty( + m.Versions.v1_0, + 'choices', + q, + )), + (ChoiceSetInput.styleProperty = new m.ValueSetProperty( + m.Versions.v1_0, + 'style', + [ + { + value: 'compact', + }, + { + value: 'expanded', + }, + { + value: 'filtered', + targetVersion: m.Versions.v1_5, + }, + ], + 'compact', + )), + (ChoiceSetInput.isMultiSelectProperty = new m.BoolProperty(m.Versions.v1_0, 'isMultiSelect', !1)), + (ChoiceSetInput.placeholderProperty = new m.StringProperty(m.Versions.v1_0, 'placeholder')), + (ChoiceSetInput.wrapProperty = new m.BoolProperty(m.Versions.v1_2, 'wrap', !1)), + (ChoiceSetInput._uniqueCategoryCounter = 0), + o([(0, m.property)(ChoiceSetInput.valueProperty)], ChoiceSetInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(ChoiceSetInput.styleProperty)], ChoiceSetInput.prototype, 'style', void 0), + o( + [(0, m.property)(ChoiceSetInput.isMultiSelectProperty)], + ChoiceSetInput.prototype, + 'isMultiSelect', + void 0, + ), + o([(0, m.property)(ChoiceSetInput.placeholderProperty)], ChoiceSetInput.prototype, 'placeholder', void 0), + o([(0, m.property)(ChoiceSetInput.wrapProperty)], ChoiceSetInput.prototype, 'wrap', void 0), + o([(0, m.property)(ChoiceSetInput.choicesProperty)], ChoiceSetInput.prototype, 'choices', void 0), + ChoiceSetInput + ) + })(z) + t.ChoiceSetInput = j + var W = (function (e) { + function NumberInput() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(NumberInput, e), + (NumberInput.prototype.internalRender = function () { + var e = this + return ( + (this._numberInputElement = document.createElement('input')), + this._numberInputElement.setAttribute('type', 'number'), + void 0 !== this.min && this._numberInputElement.setAttribute('min', this.min.toString()), + void 0 !== this.max && this._numberInputElement.setAttribute('max', this.max.toString()), + (this._numberInputElement.className = this.hostConfig.makeCssClassName('ac-input', 'ac-numberInput')), + (this._numberInputElement.style.width = '100%'), + (this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0), + void 0 !== this.defaultValue && (this._numberInputElement.valueAsNumber = this.defaultValue), + this.placeholder && + ((this._numberInputElement.placeholder = this.placeholder), + this._numberInputElement.setAttribute('aria-label', this.placeholder)), + (this._numberInputElement.oninput = function () { + e.valueChanged() + }), + this._numberInputElement + ) + }), + (NumberInput.prototype.getJsonTypeName = function () { + return 'Input.Number' + }), + (NumberInput.prototype.isSet = function () { + return void 0 !== this.value && !isNaN(this.value) + }), + (NumberInput.prototype.isValid = function () { + if (void 0 === this.value) return !this.isRequired + var e = !0 + return ( + void 0 !== this.min && (e = e && this.value >= this.min), + void 0 !== this.max && (e = e && this.value <= this.max), + e + ) + }), + Object.defineProperty(NumberInput.prototype, 'value', { + get: function () { + return this._numberInputElement ? this._numberInputElement.valueAsNumber : void 0 + }, + set: function (e) { + e && this._numberInputElement && (this._numberInputElement.value = e.toString()) + }, + enumerable: !1, + configurable: !0, + }), + (NumberInput.valueProperty = new m.NumProperty(m.Versions.v1_0, 'value')), + (NumberInput.placeholderProperty = new m.StringProperty(m.Versions.v1_0, 'placeholder')), + (NumberInput.minProperty = new m.NumProperty(m.Versions.v1_0, 'min')), + (NumberInput.maxProperty = new m.NumProperty(m.Versions.v1_0, 'max')), + o([(0, m.property)(NumberInput.valueProperty)], NumberInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(NumberInput.minProperty)], NumberInput.prototype, 'min', void 0), + o([(0, m.property)(NumberInput.maxProperty)], NumberInput.prototype, 'max', void 0), + o([(0, m.property)(NumberInput.placeholderProperty)], NumberInput.prototype, 'placeholder', void 0), + NumberInput + ) + })(z) + t.NumberInput = W + var Y = (function (e) { + function DateInput() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(DateInput, e), + (DateInput.prototype.internalRender = function () { + var e = this + return ( + (this._dateInputElement = document.createElement('input')), + this._dateInputElement.setAttribute('type', 'date'), + this.min && this._dateInputElement.setAttribute('min', this.min), + this.max && this._dateInputElement.setAttribute('max', this.max), + this.placeholder && + ((this._dateInputElement.placeholder = this.placeholder), + this._dateInputElement.setAttribute('aria-label', this.placeholder)), + (this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0), + (this._dateInputElement.className = this.hostConfig.makeCssClassName('ac-input', 'ac-dateInput')), + (this._dateInputElement.style.width = '100%'), + (this._dateInputElement.oninput = function () { + e.valueChanged() + }), + this.defaultValue && (this._dateInputElement.value = this.defaultValue), + this._dateInputElement + ) + }), + (DateInput.prototype.getJsonTypeName = function () { + return 'Input.Date' + }), + (DateInput.prototype.isSet = function () { + return !!this.value + }), + (DateInput.prototype.isValid = function () { + if (!this.value) return !this.isRequired + var e = new Date(this.value), + t = !0 + if (this.min) { + var n = new Date(this.min) + t = t && e >= n + } + if (this.max) { + var i = new Date(this.max) + t = t && e <= i + } + return t + }), + Object.defineProperty(DateInput.prototype, 'value', { + get: function () { + return this._dateInputElement ? this._dateInputElement.value : void 0 + }, + enumerable: !1, + configurable: !0, + }), + (DateInput.valueProperty = new m.StringProperty(m.Versions.v1_0, 'value')), + (DateInput.placeholderProperty = new m.StringProperty(m.Versions.v1_0, 'placeholder')), + (DateInput.minProperty = new m.StringProperty(m.Versions.v1_0, 'min')), + (DateInput.maxProperty = new m.StringProperty(m.Versions.v1_0, 'max')), + o([(0, m.property)(DateInput.valueProperty)], DateInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(DateInput.minProperty)], DateInput.prototype, 'min', void 0), + o([(0, m.property)(DateInput.maxProperty)], DateInput.prototype, 'max', void 0), + o([(0, m.property)(DateInput.placeholderProperty)], DateInput.prototype, 'placeholder', void 0), + DateInput + ) + })(z) + t.DateInput = Y + var K = (function (e) { + function TimeProperty(t, n) { + var i = + e.call( + this, + t, + n, + function (e, t, n, i) { + var r = n[t.name] + if ('string' == typeof r && r && /^[0-9]{2}:[0-9]{2}$/.test(r)) return r + }, + function (e, t, n, i, r) { + r.serializeValue(n, t.name, i) + }, + ) || this + return (i.targetVersion = t), (i.name = n), i + } + return r(TimeProperty, e), TimeProperty + })(m.CustomProperty) + t.TimeProperty = K + var Q = (function (e) { + function TimeInput() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(TimeInput, e), + (TimeInput.convertTimeStringToDate = function (e) { + return new Date('1973-09-04T' + e + ':00Z') + }), + (TimeInput.prototype.internalRender = function () { + var e = this + return ( + (this._timeInputElement = document.createElement('input')), + this._timeInputElement.setAttribute('type', 'time'), + this.min && this._timeInputElement.setAttribute('min', this.min), + this.max && this._timeInputElement.setAttribute('max', this.max), + (this._timeInputElement.className = this.hostConfig.makeCssClassName('ac-input', 'ac-timeInput')), + (this._timeInputElement.style.width = '100%'), + (this._timeInputElement.oninput = function () { + e.valueChanged() + }), + this.placeholder && + ((this._timeInputElement.placeholder = this.placeholder), + this._timeInputElement.setAttribute('aria-label', this.placeholder)), + (this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0), + this.defaultValue && (this._timeInputElement.value = this.defaultValue), + this._timeInputElement + ) + }), + (TimeInput.prototype.getJsonTypeName = function () { + return 'Input.Time' + }), + (TimeInput.prototype.isSet = function () { + return !!this.value + }), + (TimeInput.prototype.isValid = function () { + if (!this.value) return !this.isRequired + var e = TimeInput.convertTimeStringToDate(this.value), + t = !0 + if (this.min) { + var n = TimeInput.convertTimeStringToDate(this.min) + t = t && e >= n + } + if (this.max) { + var i = TimeInput.convertTimeStringToDate(this.max) + t = t && e <= i + } + return t + }), + Object.defineProperty(TimeInput.prototype, 'value', { + get: function () { + return this._timeInputElement ? this._timeInputElement.value : void 0 + }, + enumerable: !1, + configurable: !0, + }), + (TimeInput.valueProperty = new K(m.Versions.v1_0, 'value')), + (TimeInput.placeholderProperty = new m.StringProperty(m.Versions.v1_0, 'placeholder')), + (TimeInput.minProperty = new K(m.Versions.v1_0, 'min')), + (TimeInput.maxProperty = new K(m.Versions.v1_0, 'max')), + o([(0, m.property)(TimeInput.valueProperty)], TimeInput.prototype, 'defaultValue', void 0), + o([(0, m.property)(TimeInput.minProperty)], TimeInput.prototype, 'min', void 0), + o([(0, m.property)(TimeInput.maxProperty)], TimeInput.prototype, 'max', void 0), + o([(0, m.property)(TimeInput.placeholderProperty)], TimeInput.prototype, 'placeholder', void 0), + TimeInput + ) + })(z) + t.TimeInput = Q + var Z = (function (e) { + function Action() { + var t = (null !== e && e.apply(this, arguments)) || this + return ( + (t.style = l.ActionStyle.Default), + (t.mode = l.ActionMode.Primary), + (t._state = 0), + (t._isFocusable = !0), + t + ) + } + return ( + r(Action, e), + (Action.prototype.renderButtonContent = function () { + if (this.renderedElement) { + var e = this.hostConfig, + t = document.createElement('div') + if ( + ((t.style.overflow = 'hidden'), + (t.style.textOverflow = 'ellipsis'), + e.actions.iconPlacement === l.ActionIconPlacement.AboveTitle || + e.actions.allowTitleToWrap || + (t.style.whiteSpace = 'nowrap'), + this.title && (t.innerText = this.title), + this.iconUrl) + ) { + var n = document.createElement('img') + ;(n.src = this.iconUrl), + (n.style.width = e.actions.iconSize + 'px'), + (n.style.height = e.actions.iconSize + 'px'), + (n.style.flex = '0 0 auto'), + e.actions.iconPlacement === l.ActionIconPlacement.AboveTitle + ? (this.renderedElement.classList.add('iconAbove'), + (this.renderedElement.style.flexDirection = 'column'), + this.title && (n.style.marginBottom = '6px')) + : (this.renderedElement.classList.add('iconLeft'), + (n.style.maxHeight = '100%'), + this.title && (n.style.marginRight = '6px')), + this.renderedElement.appendChild(n), + this.renderedElement.appendChild(t) + } else this.renderedElement.classList.add('noIcon'), this.renderedElement.appendChild(t) + } + }), + (Action.prototype.getParentContainer = function () { + return this.parent instanceof me ? this.parent : this.parent ? this.parent.getParentContainer() : void 0 + }), + (Action.prototype.isDesignMode = function () { + var e = this.getRootObject() + return e instanceof y && e.isDesignMode() + }), + (Action.prototype.updateCssClasses = function () { + var e, t + if (this.parent && this.renderedElement) { + var n = this.parent.hostConfig + this.renderedElement.className = n.makeCssClassName( + this.isEffectivelyEnabled() ? 'ac-pushButton' : 'ac-pushButton-disabled', + ) + var i = this.getParentContainer() + if (i) { + var r = i.getEffectiveStyle() + r && this.renderedElement.classList.add('style-' + r) + } + switch ( + ((this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1), this._state) + ) { + case 0: + break + case 1: + this.renderedElement.classList.add(n.makeCssClassName('expanded')) + break + case 2: + this.renderedElement.classList.add(n.makeCssClassName('subdued')) + } + this.style && + this.isEffectivelyEnabled() && + (this.style === l.ActionStyle.Positive + ? (e = this.renderedElement.classList).add.apply( + e, + n.makeCssClassNames('primary', 'style-positive'), + ) + : (t = this.renderedElement.classList).add.apply( + t, + n.makeCssClassNames('style-' + this.style.toLowerCase()), + )) + } + }), + (Action.prototype.getDefaultSerializationContext = function () { + return new Ie() + }), + (Action.prototype.internalGetReferencedInputs = function () { + return {} + }), + (Action.prototype.internalPrepareForExecution = function (e) {}), + (Action.prototype.internalValidateInputs = function (e) { + var t = [] + if (e) + for (var n = 0, i = Object.keys(e); n < i.length; n++) { + var r = e[i[n]] + r.validateValue() || t.push(r) + } + return t + }), + (Action.prototype.shouldSerialize = function (e) { + return void 0 !== e.actionRegistry.findByName(this.getJsonTypeName()) + }), + (Action.prototype.raiseExecuteActionEvent = function () { + var e, t, n + this.onExecute && this.onExecute(this), + (t = (e = this).parent ? e.parent.getRootElement() : void 0), + (n = t && t.onExecuteAction ? t.onExecuteAction : Ee.onExecuteAction), + e.prepareForExecution() && n && n(e) + }), + (Action.prototype.internalAfterExecute = function () { + var e = this.getRootObject() + e instanceof y && e.updateActionsEnabledState() + }), + (Action.prototype.getHref = function () { + return '' + }), + (Action.prototype.getAriaRole = function () { + return 'button' + }), + (Action.prototype.setupElementForAccessibility = function (e, t) { + if ( + (void 0 === t && (t = !1), + (e.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1), + e.setAttribute('role', this.getAriaRole()), + e instanceof HTMLButtonElement && (e.disabled = !this.isEffectivelyEnabled()), + this.isEffectivelyEnabled() + ? (e.removeAttribute('aria-disabled'), + e.classList.add(this.hostConfig.makeCssClassName('ac-selectable'))) + : e.setAttribute('aria-disabled', 'true'), + this.title + ? (e.setAttribute('aria-label', this.title), (e.title = this.title)) + : (e.removeAttribute('aria-label'), e.removeAttribute('title')), + this.tooltip) + ) { + var n = t ? (this.title ? 'aria-description' : 'aria-label') : 'aria-description' + e.setAttribute(n, this.tooltip), (e.title = this.tooltip) + } + }), + (Action.prototype.parse = function (t, n) { + return e.prototype.parse.call(this, t, n || new Ie()) + }), + (Action.prototype.render = function () { + var e = this, + t = document.createElement('button') + ;(t.type = 'button'), + (t.style.display = 'flex'), + (t.style.alignItems = 'center'), + (t.style.justifyContent = 'center'), + (t.onclick = function (t) { + e.isEffectivelyEnabled() && (t.preventDefault(), (t.cancelBubble = !0), e.execute()) + }), + (this._renderedElement = t), + this.renderButtonContent(), + this.updateCssClasses(), + this.setupElementForAccessibility(t) + }), + (Action.prototype.execute = function () { + this._actionCollection && this._actionCollection.actionExecuted(this), + this.raiseExecuteActionEvent(), + this.internalAfterExecute() + }), + (Action.prototype.prepareForExecution = function () { + var e = this.getReferencedInputs(), + t = this.internalValidateInputs(e) + return t.length > 0 ? (t[0].focus(), !1) : (this.internalPrepareForExecution(e), !0) + }), + (Action.prototype.remove = function () { + return !!this._actionCollection && this._actionCollection.removeAction(this) + }), + (Action.prototype.getAllInputs = function (e) { + return void 0 === e && (e = !0), [] + }), + (Action.prototype.getAllActions = function () { + return [this] + }), + (Action.prototype.getResourceInformation = function () { + return this.iconUrl + ? [ + { + url: this.iconUrl, + mimeType: 'image', + }, + ] + : [] + }), + (Action.prototype.getActionById = function (e) { + return this.id === e ? this : void 0 + }), + (Action.prototype.getReferencedInputs = function () { + return this.internalGetReferencedInputs() + }), + (Action.prototype.validateInputs = function () { + return this.internalValidateInputs(this.getReferencedInputs()) + }), + (Action.prototype.updateEnabledState = function () {}), + (Action.prototype.isEffectivelyEnabled = function () { + return this.isEnabled + }), + Object.defineProperty(Action.prototype, 'isPrimary', { + get: function () { + return this.style === l.ActionStyle.Positive + }, + set: function (e) { + e + ? (this.style = l.ActionStyle.Positive) + : this.style === l.ActionStyle.Positive && (this.style = l.ActionStyle.Default) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Action.prototype, 'hostConfig', { + get: function () { + return this.parent ? this.parent.hostConfig : p.defaultHostConfig + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Action.prototype, 'parent', { + get: function () { + return this._parent + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Action.prototype, 'state', { + get: function () { + return this._state + }, + set: function (e) { + this._state !== e && ((this._state = e), this.updateCssClasses()) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Action.prototype, 'isFocusable', { + get: function () { + return this._isFocusable + }, + set: function (e) { + this._isFocusable !== e && ((this._isFocusable = e), this.updateCssClasses()) + }, + enumerable: !1, + configurable: !0, + }), + (Action.titleProperty = new m.StringProperty(m.Versions.v1_0, 'title')), + (Action.iconUrlProperty = new m.StringProperty(m.Versions.v1_1, 'iconUrl')), + (Action.styleProperty = new m.ValueSetProperty( + m.Versions.v1_2, + 'style', + [ + { + value: l.ActionStyle.Default, + }, + { + value: l.ActionStyle.Positive, + }, + { + value: l.ActionStyle.Destructive, + }, + ], + l.ActionStyle.Default, + )), + (Action.modeProperty = new m.ValueSetProperty( + m.Versions.v1_5, + 'mode', + [ + { + value: l.ActionMode.Primary, + }, + { + value: l.ActionMode.Secondary, + }, + ], + l.ActionMode.Primary, + )), + (Action.tooltipProperty = new m.StringProperty(m.Versions.v1_5, 'tooltip')), + (Action.isEnabledProperty = new m.BoolProperty(m.Versions.v1_5, 'isEnabled', !0)), + o([(0, m.property)(Action.titleProperty)], Action.prototype, 'title', void 0), + o([(0, m.property)(Action.iconUrlProperty)], Action.prototype, 'iconUrl', void 0), + o([(0, m.property)(Action.styleProperty)], Action.prototype, 'style', void 0), + o([(0, m.property)(Action.modeProperty)], Action.prototype, 'mode', void 0), + o([(0, m.property)(Action.tooltipProperty)], Action.prototype, 'tooltip', void 0), + o([(0, m.property)(Action.isEnabledProperty)], Action.prototype, 'isEnabled', void 0), + Action + ) + })(h.CardObject) + t.Action = Z + var X = (function (e) { + function SubmitActionBase() { + var t = (null !== e && e.apply(this, arguments)) || this + return ( + (t.disabledUnlessAssociatedInputsChange = !1), (t._isPrepared = !1), (t._areReferencedInputsDirty = !1), t + ) + } + return ( + r(SubmitActionBase, e), + (SubmitActionBase.prototype.internalGetReferencedInputs = function () { + var e = {} + if ('none' !== this.associatedInputs) { + for (var t = this.parent, n = []; t; ) n.push.apply(n, t.getAllInputs(!1)), (t = t.parent) + for (var i = 0, r = n; i < r.length; i++) { + var o = r[i] + o.id && (e[o.id] = o) + } + } + return e + }), + (SubmitActionBase.prototype.internalPrepareForExecution = function (e) { + if ( + (this._originalData + ? (this._processedData = JSON.parse(JSON.stringify(this._originalData))) + : (this._processedData = {}), + this._processedData && e) + ) + for (var t = 0, n = Object.keys(e); t < n.length; t++) { + var i = e[n[t]] + i.id && + i.isSet() && + (this._processedData[i.id] = 'string' == typeof i.value ? i.value : i.value.toString()) + } + this._isPrepared = !0 + }), + (SubmitActionBase.prototype.internalAfterExecute = function () { + c.GlobalSettings.resetInputsDirtyStateAfterActionExecution && this.resetReferencedInputsDirtyState() + }), + (SubmitActionBase.prototype.resetReferencedInputsDirtyState = function () { + var e = this.getReferencedInputs() + if (((this._areReferencedInputsDirty = !1), e)) + for (var t = 0, n = Object.keys(e); t < n.length; t++) { + e[n[t]].resetDirtyState() + } + }), + (SubmitActionBase.prototype.updateEnabledState = function () { + this._areReferencedInputsDirty = !1 + var e = this.getReferencedInputs() + if (e) + for (var t = 0, n = Object.keys(e); t < n.length; t++) { + if (e[n[t]].isDirty()) { + this._areReferencedInputsDirty = !0 + break + } + } + this.updateCssClasses(), this._renderedElement && this.setupElementForAccessibility(this._renderedElement) + }), + (SubmitActionBase.prototype.isEffectivelyEnabled = function () { + var t = e.prototype.isEffectivelyEnabled.call(this) + return this.disabledUnlessAssociatedInputsChange ? t && this._areReferencedInputsDirty : t + }), + Object.defineProperty(SubmitActionBase.prototype, 'data', { + get: function () { + return this._isPrepared ? this._processedData : this._originalData + }, + set: function (e) { + ;(this._originalData = e), (this._isPrepared = !1) + }, + enumerable: !1, + configurable: !0, + }), + (SubmitActionBase.dataProperty = new m.PropertyDefinition(m.Versions.v1_0, 'data')), + (SubmitActionBase.associatedInputsProperty = new m.CustomProperty( + m.Versions.v1_3, + 'associatedInputs', + function (e, t, n, i) { + var r = n[t.name] + if (void 0 !== r && 'string' == typeof r) return 'none' === r.toLowerCase() ? 'none' : 'auto' + }, + function (e, t, n, i, r) { + r.serializeValue(n, t.name, i) + }, + )), + (SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty = new m.BoolProperty( + m.Versions.v1_6, + 'disabledUnlessAssociatedInputsChange', + !1, + )), + o([(0, m.property)(SubmitActionBase.dataProperty)], SubmitActionBase.prototype, '_originalData', void 0), + o( + [(0, m.property)(SubmitActionBase.associatedInputsProperty)], + SubmitActionBase.prototype, + 'associatedInputs', + void 0, + ), + o( + [(0, m.property)(SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty)], + SubmitActionBase.prototype, + 'disabledUnlessAssociatedInputsChange', + void 0, + ), + SubmitActionBase + ) + })(Z) + t.SubmitActionBase = X + var J = (function (e) { + function SubmitAction() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(SubmitAction, e), + (SubmitAction.prototype.getJsonTypeName = function () { + return SubmitAction.JsonTypeName + }), + (SubmitAction.JsonTypeName = 'Action.Submit'), + SubmitAction + ) + })(X) + t.SubmitAction = J + var ee = (function (e) { + function ExecuteAction() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(ExecuteAction, e), + (ExecuteAction.prototype.getJsonTypeName = function () { + return ExecuteAction.JsonTypeName + }), + (ExecuteAction.JsonTypeName = 'Action.Execute'), + (ExecuteAction.verbProperty = new m.StringProperty(m.Versions.v1_4, 'verb')), + o([(0, m.property)(ExecuteAction.verbProperty)], ExecuteAction.prototype, 'verb', void 0), + ExecuteAction + ) + })(X) + t.ExecuteAction = ee + var te = (function (e) { + function OpenUrlAction() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(OpenUrlAction, e), + (OpenUrlAction.prototype.getJsonTypeName = function () { + return OpenUrlAction.JsonTypeName + }), + (OpenUrlAction.prototype.getAriaRole = function () { + return 'link' + }), + (OpenUrlAction.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + this.url || + t.addFailure(this, l.ValidationEvent.PropertyCantBeNull, _.Strings.errors.propertyMustBeSet('url')) + }), + (OpenUrlAction.prototype.getHref = function () { + return this.url + }), + (OpenUrlAction.urlProperty = new m.StringProperty(m.Versions.v1_0, 'url')), + (OpenUrlAction.JsonTypeName = 'Action.OpenUrl'), + o([(0, m.property)(OpenUrlAction.urlProperty)], OpenUrlAction.prototype, 'url', void 0), + OpenUrlAction + ) + })(Z) + t.OpenUrlAction = te + var ne = (function (e) { + function ToggleVisibilityAction() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.targetElements = {}), t + } + return ( + r(ToggleVisibilityAction, e), + (ToggleVisibilityAction.prototype.updateAriaControlsAttribute = function () { + if (this.targetElements) { + var e = Object.keys(this.targetElements) + this._renderedElement && + (e.length > 0 + ? this._renderedElement.setAttribute('aria-controls', e.join(' ')) + : this._renderedElement.removeAttribute('aria-controls')) + } + }), + (ToggleVisibilityAction.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + this.targetElements || + t.addFailure( + this, + l.ValidationEvent.PropertyCantBeNull, + _.Strings.errors.propertyMustBeSet('targetElements'), + ) + }), + (ToggleVisibilityAction.prototype.getJsonTypeName = function () { + return ToggleVisibilityAction.JsonTypeName + }), + (ToggleVisibilityAction.prototype.render = function () { + e.prototype.render.call(this), this.updateAriaControlsAttribute() + }), + (ToggleVisibilityAction.prototype.execute = function () { + if ((e.prototype.execute.call(this), this.parent)) + for (var t = 0, n = Object.keys(this.targetElements); t < n.length; t++) { + var i = n[t], + r = this.parent.getRootElement().getElementById(i) + r && + ('boolean' == typeof this.targetElements[i] + ? (r.isVisible = this.targetElements[i]) + : (r.isVisible = !r.isVisible)) + } + }), + (ToggleVisibilityAction.prototype.addTargetElement = function (e, t) { + void 0 === t && (t = void 0), (this.targetElements[e] = t), this.updateAriaControlsAttribute() + }), + (ToggleVisibilityAction.prototype.removeTargetElement = function (e) { + delete this.targetElements[e], this.updateAriaControlsAttribute() + }), + (ToggleVisibilityAction.targetElementsProperty = new m.CustomProperty( + m.Versions.v1_2, + 'targetElements', + function (e, t, n, i) { + var r = {} + if (Array.isArray(n[t.name])) + for (var o = 0, s = n[t.name]; o < s.length; o++) { + var a = s[o] + if ('string' == typeof a) r[a] = void 0 + else if ('object' == typeof a) { + var l = a.elementId + 'string' == typeof l && (r[l] = d.parseBool(a.isVisible)) + } + } + return r + }, + function (e, t, n, i, r) { + for (var o = [], s = 0, a = Object.keys(i); s < a.length; s++) { + var l = a[s] + 'boolean' == typeof i[l] + ? o.push({ + elementId: l, + isVisible: i[l], + }) + : o.push(l) + } + r.serializeArray(n, t.name, o) + }, + {}, + function (e) { + return {} + }, + )), + (ToggleVisibilityAction.JsonTypeName = 'Action.ToggleVisibility'), + o( + [(0, m.property)(ToggleVisibilityAction.targetElementsProperty)], + ToggleVisibilityAction.prototype, + 'targetElements', + void 0, + ), + ToggleVisibilityAction + ) + })(Z) + t.ToggleVisibilityAction = ne + var ie = (function (e) { + function StringWithSubstitutionProperty(t, n) { + var i = + e.call(this, t, n, void 0, function () { + return new c.StringWithSubstitutions() + }) || this + return (i.targetVersion = t), (i.name = n), i + } + return ( + r(StringWithSubstitutionProperty, e), + (StringWithSubstitutionProperty.prototype.parse = function (e, t, n) { + var i = new c.StringWithSubstitutions() + return i.set(d.parseString(t[this.name])), i + }), + (StringWithSubstitutionProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, n.getOriginal()) + }), + StringWithSubstitutionProperty + ) + })(m.PropertyDefinition), + re = (function (e) { + function HttpHeader(t, n) { + void 0 === t && (t = ''), void 0 === n && (n = '') + var i = e.call(this) || this + return (i.name = t), (i.value = n), i + } + return ( + r(HttpHeader, e), + (HttpHeader.prototype.getSchemaKey = function () { + return 'HttpHeader' + }), + (HttpHeader.prototype.getReferencedInputs = function (e, t) { + this._value.getReferencedInputs(e, t) + }), + (HttpHeader.prototype.prepareForExecution = function (e) { + this._value.substituteInputValues(e, c.ContentTypes.applicationXWwwFormUrlencoded) + }), + Object.defineProperty(HttpHeader.prototype, 'value', { + get: function () { + return this._value.get() + }, + set: function (e) { + this._value.set(e) + }, + enumerable: !1, + configurable: !0, + }), + (HttpHeader.nameProperty = new m.StringProperty(m.Versions.v1_0, 'name')), + (HttpHeader.valueProperty = new ie(m.Versions.v1_0, 'value')), + o([(0, m.property)(HttpHeader.nameProperty)], HttpHeader.prototype, 'name', void 0), + o([(0, m.property)(HttpHeader.valueProperty)], HttpHeader.prototype, '_value', void 0), + HttpHeader + ) + })(m.SerializableObject) + t.HttpHeader = re + var oe = (function (e) { + function HttpAction() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._ignoreInputValidation = !1), t + } + return ( + r(HttpAction, e), + (HttpAction.prototype.internalGetReferencedInputs = function () { + var e = this.parent ? this.parent.getRootElement().getAllInputs() : [], + t = {} + this._url.getReferencedInputs(e, t) + for (var n = 0, i = this.headers; n < i.length; n++) { + i[n].getReferencedInputs(e, t) + } + return this._body.getReferencedInputs(e, t), t + }), + (HttpAction.prototype.internalPrepareForExecution = function (e) { + if (e) { + this._url.substituteInputValues(e, c.ContentTypes.applicationXWwwFormUrlencoded) + for (var t = c.ContentTypes.applicationJson, n = 0, i = this.headers; n < i.length; n++) { + var r = i[n] + r.prepareForExecution(e), r.name && 'content-type' === r.name.toLowerCase() && (t = r.value) + } + this._body.substituteInputValues(e, t) + } + }), + (HttpAction.prototype.getJsonTypeName = function () { + return HttpAction.JsonTypeName + }), + (HttpAction.prototype.internalValidateProperties = function (t) { + if ( + (e.prototype.internalValidateProperties.call(this, t), + this.url || + t.addFailure(this, l.ValidationEvent.PropertyCantBeNull, _.Strings.errors.propertyMustBeSet('url')), + this.headers.length > 0) + ) + for (var n = 0, i = this.headers; n < i.length; n++) { + i[n].name || + t.addFailure( + this, + l.ValidationEvent.PropertyCantBeNull, + _.Strings.errors.actionHttpHeadersMustHaveNameAndValue(), + ) + } + }), + Object.defineProperty(HttpAction.prototype, 'ignoreInputValidation', { + get: function () { + return this._ignoreInputValidation + }, + set: function (e) { + this._ignoreInputValidation = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(HttpAction.prototype, 'url', { + get: function () { + return this._url.get() + }, + set: function (e) { + this._url.set(e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(HttpAction.prototype, 'body', { + get: function () { + return this._body.get() + }, + set: function (e) { + this._body.set(e) + }, + enumerable: !1, + configurable: !0, + }), + (HttpAction.urlProperty = new ie(m.Versions.v1_0, 'url')), + (HttpAction.bodyProperty = new ie(m.Versions.v1_0, 'body')), + (HttpAction.methodProperty = new m.StringProperty(m.Versions.v1_0, 'method')), + (HttpAction.headersProperty = new m.SerializableObjectCollectionProperty(m.Versions.v1_0, 'headers', re)), + (HttpAction.ignoreInputValidationProperty = new m.BoolProperty( + m.Versions.v1_3, + 'ignoreInputValidation', + !1, + )), + (HttpAction.JsonTypeName = 'Action.Http'), + o([(0, m.property)(HttpAction.urlProperty)], HttpAction.prototype, '_url', void 0), + o([(0, m.property)(HttpAction.bodyProperty)], HttpAction.prototype, '_body', void 0), + o([(0, m.property)(HttpAction.methodProperty)], HttpAction.prototype, 'method', void 0), + o([(0, m.property)(HttpAction.headersProperty)], HttpAction.prototype, 'headers', void 0), + o( + [(0, m.property)(HttpAction.ignoreInputValidationProperty)], + HttpAction.prototype, + '_ignoreInputValidation', + void 0, + ), + HttpAction + ) + })(Z) + t.HttpAction = oe + var se = (function (e) { + function ShowCardAction() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.card = new Te()), t + } + return ( + r(ShowCardAction, e), + (ShowCardAction.prototype.updateCssClasses = function () { + if ((e.prototype.updateCssClasses.call(this), this.renderedElement)) { + var t = this.parent ? this.parent.hostConfig : p.defaultHostConfig + this.renderedElement.classList.add(t.makeCssClassName('expandable')), + this.renderedElement.setAttribute('aria-expanded', (1 === this.state).toString()) + } + }), + (ShowCardAction.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n) + var i = t.card + i + ? this.card.parse(i, n) + : n.logParseEvent(this, l.ValidationEvent.PropertyCantBeNull, _.Strings.errors.showCardMustHaveCard()) + }), + (ShowCardAction.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), this.card && n.serializeValue(t, 'card', this.card.toJSON(n)) + }), + (ShowCardAction.prototype.raiseExecuteActionEvent = function () { + this.hostConfig.actions.showCard.actionMode === l.ShowCardActionMode.Popup && + e.prototype.raiseExecuteActionEvent.call(this) + }), + (ShowCardAction.prototype.releaseDOMResources = function () { + e.prototype.releaseDOMResources.call(this), this.card.releaseDOMResources() + }), + (ShowCardAction.prototype.getJsonTypeName = function () { + return ShowCardAction.JsonTypeName + }), + (ShowCardAction.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), this.card.internalValidateProperties(t) + }), + (ShowCardAction.prototype.setParent = function (t) { + e.prototype.setParent.call(this, t), this.card.setParent(t) + }), + (ShowCardAction.prototype.getAllInputs = function (e) { + return void 0 === e && (e = !0), this.card.getAllInputs(e) + }), + (ShowCardAction.prototype.getAllActions = function () { + var t = e.prototype.getAllActions.call(this) + return t.push.apply(t, this.card.getAllActions()), t + }), + (ShowCardAction.prototype.getResourceInformation = function () { + var t = e.prototype.getResourceInformation.call(this) + return t.push.apply(t, this.card.getResourceInformation()), t + }), + (ShowCardAction.prototype.getActionById = function (t) { + var n = e.prototype.getActionById.call(this, t) + return n || (n = this.card.getActionById(t)), n + }), + (ShowCardAction.JsonTypeName = 'Action.ShowCard'), + ShowCardAction + ) + })(Z) + t.ShowCardAction = se + var ae = (function (e) { + function OverflowAction(t) { + var n = e.call(this) || this + return ( + (n._actions = t), + (n.title = _.Strings.defaults.overflowButtonText()), + (n.tooltip = _.Strings.defaults.overflowButtonTooltip()), + n + ) + } + return ( + r(OverflowAction, e), + (OverflowAction.prototype.getActions = function () { + return this._actions + }), + (OverflowAction.prototype.getAllActions = function () { + var t = e.prototype.getAllActions.call(this) + return t.push.apply(t, this._actions), t + }), + (OverflowAction.prototype.getJsonTypeName = function () { + return se.JsonTypeName + }), + (OverflowAction.prototype.execute = function () { + var e, + t, + n, + i, + r, + o = this + if ( + ((t = this), + (n = this.renderedElement), + (i = t.parent ? t.parent.getRootElement() : void 0), + !( + void 0 !== + (r = + i && i.onDisplayOverflowActionMenu + ? i.onDisplayOverflowActionMenu + : Ee.onDisplayOverflowActionMenu) && r(t.getActions(), n) + )) && + this.renderedElement + ) { + var s = new f.PopupMenu() + s.hostConfig = this.hostConfig + for ( + var _loop_2 = function (t) { + var n = new f.MenuItem( + t.toString(), + null !== (e = a._actions[t].title) && void 0 !== e ? e : '', + ) + ;(n.isEnabled = a._actions[t].isEnabled), + (n.onClick = function () { + var e = o._actions[t] + s.closePopup(!1), e.isEnabled && e.execute() + }), + s.items.add(n) + }, + a = this, + l = 0; + l < this._actions.length; + l++ + ) + _loop_2(l) + ;(s.onClose = function () { + var e + null === (e = o.renderedElement) || void 0 === e || e.setAttribute('aria-expanded', 'false') + }), + this.renderedElement.setAttribute('aria-expanded', 'true'), + s.popup(this.renderedElement) + } + }), + (OverflowAction.prototype.setupElementForAccessibility = function (t, n) { + void 0 === n && (n = !1), + e.prototype.setupElementForAccessibility.call(this, t, n), + t.setAttribute('aria-label', _.Strings.defaults.overflowButtonTooltip()), + t.setAttribute('aria-expanded', 'false') + }), + (OverflowAction.JsonTypeName = 'Action.Overflow'), + OverflowAction + ) + })(Z), + le = (function () { + function ActionCollection(e) { + ;(this._items = []), (this._renderedActions = []), (this._owner = e) + } + return ( + (ActionCollection.prototype.isActionAllowed = function (e) { + var t = this._owner.getForbiddenActionTypes() + if (t) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n] + if (e.constructor === r) return !1 + } + return !0 + }), + (ActionCollection.prototype.refreshContainer = function () { + if ((clearElement(this._actionCardContainer), this._actionCard)) { + this._actionCardContainer.style.marginTop = + this.renderedActionCount > 0 + ? this._owner.hostConfig.actions.showCard.inlineTopMargin + 'px' + : '0px' + var e = this._owner.getEffectivePadding() + this._owner.getImmediateSurroundingPadding(e) + var t = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(e) + this._actionCard && + ((this._actionCard.style.paddingLeft = t.left + 'px'), + (this._actionCard.style.paddingRight = t.right + 'px'), + (this._actionCard.style.marginLeft = '-' + t.left + 'px'), + (this._actionCard.style.marginRight = '-' + t.right + 'px'), + 0 === t.bottom || + this._owner.isDesignMode() || + ((this._actionCard.style.paddingBottom = t.bottom + 'px'), + (this._actionCard.style.marginBottom = '-' + t.bottom + 'px')), + d.appendChild(this._actionCardContainer, this._actionCard)) + } else this._actionCardContainer.style.marginTop = '0px' + }), + (ActionCollection.prototype.layoutChanged = function () { + this._owner.getRootElement().updateLayout() + }), + (ActionCollection.prototype.showActionCard = function (e, t, n) { + void 0 === t && (t = !1), void 0 === n && (n = !0), (e.card.suppressStyle = t) + var i = e.card.renderedElement && !this._owner.isDesignMode() ? e.card.renderedElement : e.card.render() + ;(this._actionCard = i), + (this._expandedAction = e), + this.refreshContainer(), + n && (this.layoutChanged(), raiseInlineCardExpandedEvent(e, !0)) + }), + (ActionCollection.prototype.collapseExpandedAction = function () { + for (var e = 0, t = this._renderedActions; e < t.length; e++) { + t[e].state = 0 + } + var n = this._expandedAction + ;(this._expandedAction = void 0), + (this._actionCard = void 0), + this.refreshContainer(), + n && (this.layoutChanged(), raiseInlineCardExpandedEvent(n, !1)) + }), + (ActionCollection.prototype.expandShowCardAction = function (e, t) { + for (var n = this, i = !1, r = 0, o = this._renderedActions; r < o.length; r++) { + var s = o[r] + this._owner.hostConfig.actions.actionsOrientation == l.Orientation.Horizontal && + i && + (s.isFocusable = !1), + s !== e + ? (s.state = 2) + : ((s.state = 1), + (i = !0), + s.renderedElement && + (s.renderedElement.onblur = function (e) { + for (var t = 0, i = n._renderedActions; t < i.length; t++) { + i[t].isFocusable = !0 + } + })) + } + this.showActionCard(e, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), t) + }), + (ActionCollection.prototype.releaseDOMResources = function () { + for (var e = 0, t = this._renderedActions; e < t.length; e++) { + t[e].releaseDOMResources() + } + }), + (ActionCollection.prototype.actionExecuted = function (e) { + e instanceof se + ? e === this._expandedAction + ? this.collapseExpandedAction() + : this._owner.hostConfig.actions.showCard.actionMode === l.ShowCardActionMode.Inline && + this.expandShowCardAction(e, !0) + : this.collapseExpandedAction() + }), + (ActionCollection.prototype.parse = function (e, t) { + if ((this.clear(), Array.isArray(e))) + for (var n = 0, i = e; n < i.length; n++) { + var r = i[n], + o = [] + this._owner instanceof fe && (o = this._owner.getForbiddenActionNames()) + var s = t.parseAction(this._owner, r, o, !this._owner.isDesignMode()) + s && this.addAction(s) + } + }), + (ActionCollection.prototype.toJSON = function (e, t, n) { + n.serializeArray(e, t, this._items) + }), + (ActionCollection.prototype.getActionAt = function (e) { + return this._items[e] + }), + (ActionCollection.prototype.getActionCount = function () { + return this._items.length + }), + (ActionCollection.prototype.getActionById = function (e) { + for (var t = void 0, n = 0, i = this._items; n < i.length; n++) { + if ((t = i[n].getActionById(e))) break + } + return t + }), + (ActionCollection.prototype.validateProperties = function (e) { + this._owner.hostConfig.actions.maxActions && + this._items.length > this._owner.hostConfig.actions.maxActions && + e.addFailure( + this._owner, + l.ValidationEvent.TooManyActions, + _.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions), + ), + this._items.length > 0 && + !this._owner.hostConfig.supportsInteractivity && + e.addFailure( + this._owner, + l.ValidationEvent.InteractivityNotAllowed, + _.Strings.errors.interactivityNotAllowed(), + ) + for (var t = 0, n = this._items; t < n.length; t++) { + var i = n[t] + this.isActionAllowed(i) || + e.addFailure( + this._owner, + l.ValidationEvent.ActionTypeNotAllowed, + _.Strings.errors.actionTypeNotAllowed(i.getJsonTypeName()), + ), + i.internalValidateProperties(e) + } + }), + (ActionCollection.prototype.render = function (e) { + var t = this._owner.hostConfig + if (t.supportsInteractivity) { + var n = document.createElement('div'), + i = t.actions.maxActions ? Math.min(t.actions.maxActions, this._items.length) : this._items.length + if ( + ((this._actionCardContainer = document.createElement('div')), + (this._renderedActions = []), + t.actions.preExpandSingleShowCardAction && + 1 === i && + this._items[0] instanceof se && + this.isActionAllowed(this._items[0])) + ) + this.showActionCard(this._items[0], !0), this._renderedActions.push(this._items[0]) + else { + var r = document.createElement('div') + if ( + ((r.className = t.makeCssClassName('ac-actionSet')), + (r.style.display = 'flex'), + e === l.Orientation.Horizontal) + ) + if ( + ((r.style.flexDirection = 'row'), + this._owner.horizontalAlignment && t.actions.actionAlignment !== l.ActionAlignment.Stretch) + ) + switch (this._owner.horizontalAlignment) { + case l.HorizontalAlignment.Center: + r.style.justifyContent = 'center' + break + case l.HorizontalAlignment.Right: + r.style.justifyContent = 'flex-end' + break + default: + r.style.justifyContent = 'flex-start' + } + else + switch (t.actions.actionAlignment) { + case l.ActionAlignment.Center: + r.style.justifyContent = 'center' + break + case l.ActionAlignment.Right: + r.style.justifyContent = 'flex-end' + break + default: + r.style.justifyContent = 'flex-start' + } + else if ( + ((r.style.flexDirection = 'column'), + this._owner.horizontalAlignment && t.actions.actionAlignment !== l.ActionAlignment.Stretch) + ) + switch (this._owner.horizontalAlignment) { + case l.HorizontalAlignment.Center: + r.style.alignItems = 'center' + break + case l.HorizontalAlignment.Right: + r.style.alignItems = 'flex-end' + break + default: + r.style.alignItems = 'flex-start' + } + else + switch (t.actions.actionAlignment) { + case l.ActionAlignment.Center: + r.style.alignItems = 'center' + break + case l.ActionAlignment.Right: + r.style.alignItems = 'flex-end' + break + case l.ActionAlignment.Stretch: + r.style.alignItems = 'stretch' + break + default: + r.style.alignItems = 'flex-start' + } + var o = this._items.filter(this.isActionAllowed.bind(this)), + s = [], + a = [] + if (this._owner.isDesignMode()) s = o + else { + o.forEach(function (e) { + return e.mode === l.ActionMode.Secondary ? a.push(e) : s.push(e) + }) + var p = s.splice(t.actions.maxActions) + c.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu && a.push.apply(a, p) + var u = !0 + if (a.length > 0) { + this._overflowAction || + ((this._overflowAction = new ae(a)), + this._overflowAction.setParent(this._owner), + (this._overflowAction._actionCollection = this)) + var h = this._owner instanceof Ee && !this._owner.parent + u = !(function (e, t) { + var n = e.parent ? e.parent.getRootElement() : void 0, + i = n && n.onRenderOverflowActions ? n.onRenderOverflowActions : Ee.onRenderOverflowActions + return void 0 !== i && i(e.getActions(), t) + })(this._overflowAction, h) + } + this._overflowAction && u && s.push(this._overflowAction) + } + for (var m = 0; m < s.length; m++) { + var g = s[m] + if ( + (g.render(), + g.renderedElement && + (t.actions.actionsOrientation === l.Orientation.Horizontal && + t.actions.actionAlignment === l.ActionAlignment.Stretch + ? (g.renderedElement.style.flex = '0 1 100%') + : (g.renderedElement.style.flex = '0 1 auto'), + r.appendChild(g.renderedElement), + this._renderedActions.push(g), + m < s.length - 1 && t.actions.buttonSpacing > 0)) + ) { + var _ = document.createElement('div') + e === l.Orientation.Horizontal + ? ((_.style.flex = '0 0 auto'), (_.style.width = t.actions.buttonSpacing + 'px')) + : (_.style.height = t.actions.buttonSpacing + 'px'), + d.appendChild(r, _) + } + } + var f = document.createElement('div') + ;(f.style.overflow = 'hidden'), f.appendChild(r), d.appendChild(n, f) + } + d.appendChild(n, this._actionCardContainer) + for (var y = 0, v = this._renderedActions; y < v.length; y++) { + var b = v[y] + if (1 === b.state) { + this.expandShowCardAction(b, !1) + break + } + } + return this._renderedActions.length > 0 ? n : void 0 + } + }), + (ActionCollection.prototype.addAction = function (e) { + if (!e) throw new Error('The action parameter cannot be null.') + if ((e.parent && e.parent !== this._owner) || !(this._items.indexOf(e) < 0)) + throw new Error(_.Strings.errors.actionAlreadyParented()) + this._items.push(e), e.parent || e.setParent(this._owner), (e._actionCollection = this) + }), + (ActionCollection.prototype.removeAction = function (e) { + this.expandedAction && this._expandedAction === e && this.collapseExpandedAction() + var t = this._items.indexOf(e) + if (t >= 0) { + this._items.splice(t, 1), e.setParent(void 0), (e._actionCollection = void 0) + for (var n = 0; n < this._renderedActions.length; n++) + if (this._renderedActions[n] === e) { + this._renderedActions.splice(n, 1) + break + } + return !0 + } + return !1 + }), + (ActionCollection.prototype.clear = function () { + ;(this._items = []), (this._renderedActions = []), (this._expandedAction = void 0) + }), + (ActionCollection.prototype.getAllInputs = function (e) { + void 0 === e && (e = !0) + var t = [] + if (e) + for (var n = 0, i = this._items; n < i.length; n++) { + var r = i[n] + t.push.apply(t, r.getAllInputs()) + } + return t + }), + (ActionCollection.prototype.getResourceInformation = function () { + for (var e = [], t = 0, n = this._items; t < n.length; t++) { + var i = n[t] + e.push.apply(e, i.getResourceInformation()) + } + return e + }), + Object.defineProperty(ActionCollection.prototype, 'renderedActionCount', { + get: function () { + return this._renderedActions.length + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ActionCollection.prototype, 'expandedAction', { + get: function () { + return this._expandedAction + }, + enumerable: !1, + configurable: !0, + }), + ActionCollection + ) + })(), + ce = (function (e) { + function ActionSet() { + var t = e.call(this) || this + return (t._actionCollection = new le(t)), t + } + return ( + r(ActionSet, e), + (ActionSet.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), this._actionCollection.parse(t.actions, n) + }), + (ActionSet.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), this._actionCollection.toJSON(t, 'actions', n) + }), + (ActionSet.prototype.internalRender = function () { + return this._actionCollection.render( + void 0 !== this.orientation ? this.orientation : this.hostConfig.actions.actionsOrientation, + ) + }), + (ActionSet.prototype.releaseDOMResources = function () { + e.prototype.releaseDOMResources.call(this), this._actionCollection.releaseDOMResources() + }), + (ActionSet.prototype.isBleedingAtBottom = function () { + return 0 === this._actionCollection.renderedActionCount + ? e.prototype.isBleedingAtBottom.call(this) + : 1 === this._actionCollection.getActionCount() + ? void 0 !== this._actionCollection.expandedAction && + !this.hostConfig.actions.preExpandSingleShowCardAction + : void 0 !== this._actionCollection.expandedAction + }), + (ActionSet.prototype.getJsonTypeName = function () { + return 'ActionSet' + }), + (ActionSet.prototype.getActionCount = function () { + return this._actionCollection.getActionCount() + }), + (ActionSet.prototype.getActionAt = function (t) { + return t >= 0 && t < this.getActionCount() + ? this._actionCollection.getActionAt(t) + : e.prototype.getActionAt.call(this, t) + }), + (ActionSet.prototype.getActionById = function (t) { + var n = this._actionCollection.getActionById(t) + return n || e.prototype.getActionById.call(this, t) + }), + (ActionSet.prototype.getAllActions = function () { + for (var t = e.prototype.getAllActions.call(this), n = 0; n < this.getActionCount(); n++) { + var i = this.getActionAt(n) + i && t.push(i) + } + return t + }), + (ActionSet.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), this._actionCollection.validateProperties(t) + }), + (ActionSet.prototype.addAction = function (e) { + this._actionCollection.addAction(e) + }), + (ActionSet.prototype.getAllInputs = function (e) { + return void 0 === e && (e = !0), e ? this._actionCollection.getAllInputs() : [] + }), + (ActionSet.prototype.getResourceInformation = function () { + return this._actionCollection.getResourceInformation() + }), + (ActionSet.prototype.findDOMNodeOwner = function (t) { + for (var n = void 0, i = 0; i < this.getActionCount(); i++) { + var r = this.getActionAt(i) + if (r && (n = r.findDOMNodeOwner(t))) return n + } + return e.prototype.findDOMNodeOwner.call(this, t) + }), + Object.defineProperty(ActionSet.prototype, 'isInteractive', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (ActionSet.orientationProperty = new m.EnumProperty(m.Versions.v1_1, 'orientation', l.Orientation)), + o([(0, m.property)(ActionSet.orientationProperty)], ActionSet.prototype, 'orientation', void 0), + ActionSet + ) + })(y) + t.ActionSet = ce + var de = (function (e) { + function ContainerStyleProperty(t, n, i, r) { + var o = + e.call( + this, + t, + n, + [ + { + value: l.ContainerStyle.Default, + }, + { + value: l.ContainerStyle.Emphasis, + }, + { + targetVersion: m.Versions.v1_2, + value: l.ContainerStyle.Accent, + }, + { + targetVersion: m.Versions.v1_2, + value: l.ContainerStyle.Good, + }, + { + targetVersion: m.Versions.v1_2, + value: l.ContainerStyle.Attention, + }, + { + targetVersion: m.Versions.v1_2, + value: l.ContainerStyle.Warning, + }, + ], + i, + r, + ) || this + return (o.targetVersion = t), (o.name = n), (o.defaultValue = i), (o.onGetInitialValue = r), o + } + return r(ContainerStyleProperty, e), ContainerStyleProperty + })(m.ValueSetProperty) + t.ContainerStyleProperty = de + var pe = (function (e) { + function StylableCardElementContainer() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(StylableCardElementContainer, e), + Object.defineProperty(StylableCardElementContainer.prototype, 'style', { + get: function () { + if (this.allowCustomStyle) { + var e = this.getValue(StylableCardElementContainer.styleProperty) + if (e && this.hostConfig.containerStyles.getStyleByName(e)) return e + } + }, + set: function (e) { + this.setValue(StylableCardElementContainer.styleProperty, e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(StylableCardElementContainer.prototype, 'allowCustomStyle', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(StylableCardElementContainer.prototype, 'hasExplicitStyle', { + get: function () { + return void 0 !== this.getValue(StylableCardElementContainer.styleProperty) + }, + enumerable: !1, + configurable: !0, + }), + (StylableCardElementContainer.prototype.applyBorder = function () {}), + (StylableCardElementContainer.prototype.applyBackground = function () { + if (this.renderedElement) { + var e = this.hostConfig.containerStyles.getStyleByName( + this.style, + this.hostConfig.containerStyles.getStyleByName(this.defaultStyle), + ) + if (e.backgroundColor) { + var t = d.stringToCssColor(e.backgroundColor) + t && (this.renderedElement.style.backgroundColor = t) + } + } + }), + (StylableCardElementContainer.prototype.applyPadding = function () { + if ((e.prototype.applyPadding.call(this), this.renderedElement)) { + var t = new c.SpacingDefinition() + if ( + (this.getEffectivePadding() && + (t = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding())), + (this.renderedElement.style.paddingTop = t.top + 'px'), + (this.renderedElement.style.paddingRight = t.right + 'px'), + (this.renderedElement.style.paddingBottom = t.bottom + 'px'), + (this.renderedElement.style.paddingLeft = t.left + 'px'), + this.isBleeding()) + ) { + var n = new c.PaddingDefinition() + this.getImmediateSurroundingPadding(n) + var i = this.hostConfig.paddingDefinitionToSpacingDefinition(n) + ;(this.renderedElement.style.marginRight = '-' + i.right + 'px'), + (this.renderedElement.style.marginLeft = '-' + i.left + 'px'), + this.isDesignMode() || + ((this.renderedElement.style.marginTop = '-' + i.top + 'px'), + (this.renderedElement.style.marginBottom = '-' + i.bottom + 'px')), + this.separatorElement && + this.separatorOrientation === l.Orientation.Horizontal && + ((this.separatorElement.style.marginLeft = '-' + i.left + 'px'), + (this.separatorElement.style.marginRight = '-' + i.right + 'px')) + } else + (this.renderedElement.style.marginRight = '0'), + (this.renderedElement.style.marginLeft = '0'), + (this.renderedElement.style.marginTop = '0'), + (this.renderedElement.style.marginBottom = '0'), + this.separatorElement && + this.separatorOrientation === l.Orientation.Horizontal && + ((this.separatorElement.style.marginRight = '0'), (this.separatorElement.style.marginLeft = '0')) + } + }), + (StylableCardElementContainer.prototype.getHasBackground = function (e) { + void 0 === e && (e = !1) + for (var t = this.parent; t; ) { + var n = !1 + if ( + ((n = !e && t instanceof me && t.backgroundImage.isValid()), + t instanceof StylableCardElementContainer && + this.hasExplicitStyle && + (t.getEffectiveStyle() !== this.getEffectiveStyle() || n)) + ) + return !0 + t = t.parent + } + return !1 + }), + (StylableCardElementContainer.prototype.getDefaultPadding = function () { + return this.getHasBackground() || this.getHasBorder() + ? new c.PaddingDefinition(l.Spacing.Padding, l.Spacing.Padding, l.Spacing.Padding, l.Spacing.Padding) + : e.prototype.getDefaultPadding.call(this) + }), + (StylableCardElementContainer.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t) + var n = this.getValue(StylableCardElementContainer.styleProperty) + void 0 !== n && + (this.hostConfig.containerStyles.getStyleByName(n) || + t.addFailure( + this, + l.ValidationEvent.InvalidPropertyValue, + _.Strings.errors.invalidPropertyValue(n, 'style'), + )) + }), + (StylableCardElementContainer.prototype.render = function () { + var t = e.prototype.render.call(this) + return t && this.getHasBackground() && this.applyBackground(), this.applyBorder(), t + }), + (StylableCardElementContainer.prototype.getEffectiveStyle = function () { + var t = this.style + return t || e.prototype.getEffectiveStyle.call(this) + }), + (StylableCardElementContainer.styleProperty = new de(m.Versions.v1_0, 'style')), + o( + [(0, m.property)(StylableCardElementContainer.styleProperty)], + StylableCardElementContainer.prototype, + 'style', + null, + ), + StylableCardElementContainer + ) + })(R) + t.StylableCardElementContainer = pe + var ue = (function (e) { + function ContainerBase() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._bleed = !1), t + } + return ( + r(ContainerBase, e), + (ContainerBase.prototype.adjustRenderedElementSize = function (t) { + e.prototype.adjustRenderedElementSize.call(this, t), + this.minPixelHeight && (t.style.minHeight = this.minPixelHeight + 'px') + }), + (ContainerBase.prototype.getHasExpandedAction = function () { + return !1 + }), + (ContainerBase.prototype.getBleed = function () { + return this._bleed + }), + (ContainerBase.prototype.setBleed = function (e) { + this._bleed = e + }), + Object.defineProperty(ContainerBase.prototype, 'renderedActionCount', { + get: function () { + return 0 + }, + enumerable: !1, + configurable: !0, + }), + (ContainerBase.prototype.isBleeding = function () { + return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed() + }), + (ContainerBase.bleedProperty = new m.BoolProperty(m.Versions.v1_2, 'bleed', !1)), + (ContainerBase.minHeightProperty = new m.PixelSizeProperty(m.Versions.v1_2, 'minHeight')), + o([(0, m.property)(ContainerBase.bleedProperty)], ContainerBase.prototype, '_bleed', void 0), + o([(0, m.property)(ContainerBase.minHeightProperty)], ContainerBase.prototype, 'minPixelHeight', void 0), + ContainerBase + ) + })(pe) + t.ContainerBase = ue + var he = (function (e) { + function BackgroundImage() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(BackgroundImage, e), + (BackgroundImage.prototype.getSchemaKey = function () { + return 'BackgroundImage' + }), + (BackgroundImage.prototype.internalParse = function (t, n) { + if ('string' != typeof t) return e.prototype.internalParse.call(this, t, n) + this.resetDefaultValues(), (this.url = t) + }), + (BackgroundImage.prototype.apply = function (e) { + if (this.url && e.renderedElement) { + switch ( + ((e.renderedElement.style.backgroundImage = + "url('" + e.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) + "')"), + this.fillMode) + ) { + case l.FillMode.Repeat: + e.renderedElement.style.backgroundRepeat = 'repeat' + break + case l.FillMode.RepeatHorizontally: + e.renderedElement.style.backgroundRepeat = 'repeat-x' + break + case l.FillMode.RepeatVertically: + e.renderedElement.style.backgroundRepeat = 'repeat-y' + break + case l.FillMode.Cover: + default: + ;(e.renderedElement.style.backgroundRepeat = 'no-repeat'), + (e.renderedElement.style.backgroundSize = 'cover') + } + switch (this.horizontalAlignment) { + case l.HorizontalAlignment.Left: + break + case l.HorizontalAlignment.Center: + e.renderedElement.style.backgroundPositionX = 'center' + break + case l.HorizontalAlignment.Right: + e.renderedElement.style.backgroundPositionX = 'right' + } + switch (this.verticalAlignment) { + case l.VerticalAlignment.Top: + break + case l.VerticalAlignment.Center: + e.renderedElement.style.backgroundPositionY = 'center' + break + case l.VerticalAlignment.Bottom: + e.renderedElement.style.backgroundPositionY = 'bottom' + } + } + }), + (BackgroundImage.prototype.isValid = function () { + return !!this.url + }), + (BackgroundImage.urlProperty = new m.StringProperty(m.Versions.v1_0, 'url')), + (BackgroundImage.fillModeProperty = new m.EnumProperty( + m.Versions.v1_2, + 'fillMode', + l.FillMode, + l.FillMode.Cover, + )), + (BackgroundImage.horizontalAlignmentProperty = new m.EnumProperty( + m.Versions.v1_2, + 'horizontalAlignment', + l.HorizontalAlignment, + l.HorizontalAlignment.Left, + )), + (BackgroundImage.verticalAlignmentProperty = new m.EnumProperty( + m.Versions.v1_2, + 'verticalAlignment', + l.VerticalAlignment, + l.VerticalAlignment.Top, + )), + o([(0, m.property)(BackgroundImage.urlProperty)], BackgroundImage.prototype, 'url', void 0), + o([(0, m.property)(BackgroundImage.fillModeProperty)], BackgroundImage.prototype, 'fillMode', void 0), + o( + [(0, m.property)(BackgroundImage.horizontalAlignmentProperty)], + BackgroundImage.prototype, + 'horizontalAlignment', + void 0, + ), + o( + [(0, m.property)(BackgroundImage.verticalAlignmentProperty)], + BackgroundImage.prototype, + 'verticalAlignment', + void 0, + ), + BackgroundImage + ) + })(m.SerializableObject) + t.BackgroundImage = he + var me = (function (e) { + function Container() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._items = []), (t._renderedItems = []), t + } + return ( + r(Container, e), + Object.defineProperty(Container.prototype, 'backgroundImage', { + get: function () { + return this.getValue(Container.backgroundImageProperty) + }, + enumerable: !1, + configurable: !0, + }), + (Container.prototype.insertItemAt = function (e, t, n) { + if (e.parent && !n) throw new Error(_.Strings.errors.elementAlreadyParented()) + if (!e.isStandalone) throw new Error(_.Strings.errors.elementTypeNotStandalone(e.getJsonTypeName())) + t < 0 || t >= this._items.length ? this._items.push(e) : this._items.splice(t, 0, e), e.setParent(this) + }), + (Container.prototype.getItemsCollectionPropertyName = function () { + return 'items' + }), + (Container.prototype.applyBackground = function () { + this.backgroundImage.isValid() && this.renderedElement && this.backgroundImage.apply(this), + e.prototype.applyBackground.call(this) + }), + (Container.prototype.applyRTL = function (e) { + void 0 !== this.rtl && (e.dir = this.rtl ? 'rtl' : 'ltr') + }), + (Container.prototype.internalRender = function () { + this._renderedItems = [] + var e = this.hostConfig, + t = document.createElement('div') + switch ( + (this.applyRTL(t), + t.classList.add(e.makeCssClassName('ac-container')), + (t.style.display = 'flex'), + (t.style.flexDirection = 'column'), + c.GlobalSettings.useAdvancedCardBottomTruncation && (t.style.minHeight = '-webkit-min-content'), + this.getEffectiveVerticalContentAlignment()) + ) { + case l.VerticalAlignment.Center: + t.style.justifyContent = 'center' + break + case l.VerticalAlignment.Bottom: + t.style.justifyContent = 'flex-end' + break + default: + t.style.justifyContent = 'flex-start' + } + if (this._items.length > 0) + for (var n = 0, i = this._items; n < i.length; n++) { + var r = i[n], + o = this.isElementAllowed(r) ? r.render() : void 0 + o && + (this._renderedItems.length > 0 && + r.separatorElement && + ((r.separatorElement.style.flex = '0 0 auto'), d.appendChild(t, r.separatorElement)), + d.appendChild(t, o), + this._renderedItems.push(r)) + } + else if (this.isDesignMode()) { + var s = this.createPlaceholderElement() + ;(s.style.width = '100%'), (s.style.height = '100%'), t.appendChild(s) + } + return t + }), + (Container.prototype.truncateOverflow = function (e) { + if (this.renderedElement) { + for ( + var t = this.renderedElement.offsetTop + e + 1, + handleElement_1 = function (e) { + var n = e.renderedElement + if (n) + switch (d.getFitStatus(n, t)) { + case l.ContainerFitStatus.FullyInContainer: + e.resetOverflow() && handleElement_1(e) + break + case l.ContainerFitStatus.Overflowing: + var i = t - n.offsetTop + e.handleOverflow(i) + break + case l.ContainerFitStatus.FullyOutOfContainer: + e.handleOverflow(0) + } + }, + n = 0, + i = this._items; + n < i.length; + n++ + ) { + var r = i[n] + handleElement_1(r) + } + return !0 + } + return !1 + }), + (Container.prototype.undoOverflowTruncation = function () { + for (var e = 0, t = this._items; e < t.length; e++) { + t[e].resetOverflow() + } + }), + (Container.prototype.getHasBackground = function (t) { + return ( + void 0 === t && (t = !1), + (!t && this.backgroundImage.isValid()) || e.prototype.getHasBackground.call(this, t) + ) + }), + (Container.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), this.clear(), this.setShouldFallback(!1) + var i = t[this.getItemsCollectionPropertyName()] + if (Array.isArray(i)) + for (var r = 0, o = i; r < o.length; r++) { + var s = o[r], + a = n.parseElement(this, s, this.forbiddenChildElements(), !this.isDesignMode()) + a && this.insertItemAt(a, -1, !0) + } + }), + (Container.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n) + var i = this.getItemsCollectionPropertyName() + n.serializeArray(t, i, this._items) + }), + Object.defineProperty(Container.prototype, 'isSelectable', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (Container.prototype.getEffectivePadding = function () { + return c.GlobalSettings.removePaddingFromContainersWithBackgroundImage && !this.getHasBackground(!0) + ? new c.PaddingDefinition() + : e.prototype.getEffectivePadding.call(this) + }), + (Container.prototype.getEffectiveVerticalContentAlignment = function () { + if (void 0 !== this.verticalContentAlignment) return this.verticalContentAlignment + var e = this.getParentContainer() + return e ? e.getEffectiveVerticalContentAlignment() : l.VerticalAlignment.Top + }), + (Container.prototype.getItemCount = function () { + return this._items.length + }), + (Container.prototype.getItemAt = function (e) { + return this._items[e] + }), + (Container.prototype.getFirstVisibleRenderedItem = function () { + if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) + for (var e = 0, t = this._renderedItems; e < t.length; e++) { + var n = t[e] + if (n.isVisible) return n + } + }), + (Container.prototype.getLastVisibleRenderedItem = function () { + if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) + for (var e = this._renderedItems.length - 1; e >= 0; e--) + if (this._renderedItems[e].isVisible) return this._renderedItems[e] + }), + (Container.prototype.getJsonTypeName = function () { + return 'Container' + }), + (Container.prototype.isFirstElement = function (e) { + for (var t = this.isDesignMode(), n = 0, i = this._items; n < i.length; n++) { + var r = i[n] + if (r.isVisible || t) return r === e + } + return !1 + }), + (Container.prototype.isLastElement = function (e) { + for (var t = this.isDesignMode(), n = this._items.length - 1; n >= 0; n--) + if (this._items[n].isVisible || t) return this._items[n] === e + return !1 + }), + (Container.prototype.isRtl = function () { + if (void 0 !== this.rtl) return this.rtl + var e = this.getParentContainer() + return !!e && e.isRtl() + }), + (Container.prototype.isBleedingAtTop = function () { + var e = this.getFirstVisibleRenderedItem() + return this.isBleeding() || (!!e && e.isBleedingAtTop()) + }), + (Container.prototype.isBleedingAtBottom = function () { + var e = this.getLastVisibleRenderedItem() + return ( + this.isBleeding() || + (!!e && e.isBleedingAtBottom() && e.getEffectiveStyle() === this.getEffectiveStyle()) + ) + }), + (Container.prototype.indexOf = function (e) { + return this._items.indexOf(e) + }), + (Container.prototype.addItem = function (e) { + this.insertItemAt(e, -1, !1) + }), + (Container.prototype.insertItemBefore = function (e, t) { + this.insertItemAt(e, this._items.indexOf(t), !1) + }), + (Container.prototype.insertItemAfter = function (e, t) { + this.insertItemAt(e, this._items.indexOf(t) + 1, !1) + }), + (Container.prototype.removeItem = function (e) { + var t = this._items.indexOf(e) + return t >= 0 && (this._items.splice(t, 1), e.setParent(void 0), this.updateLayout(), !0) + }), + (Container.prototype.clear = function () { + ;(this._items = []), (this._renderedItems = []) + }), + (Container.prototype.getResourceInformation = function () { + var t = e.prototype.getResourceInformation.call(this) + return ( + this.backgroundImage.isValid() && + t.push({ + url: this.backgroundImage.url, + mimeType: 'image', + }), + t + ) + }), + (Container.prototype.getActionById = function (t) { + var n = e.prototype.getActionById.call(this, t) + if (!n && (this.selectAction && (n = this.selectAction.getActionById(t)), !n)) + for (var i = 0, r = this._items; i < r.length; i++) { + if ((n = r[i].getActionById(t))) break + } + return n + }), + Object.defineProperty(Container.prototype, 'padding', { + get: function () { + return this.getPadding() + }, + set: function (e) { + this.setPadding(e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Container.prototype, 'selectAction', { + get: function () { + return this._selectAction + }, + set: function (e) { + this._selectAction = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Container.prototype, 'bleed', { + get: function () { + return this.getBleed() + }, + set: function (e) { + this.setBleed(e) + }, + enumerable: !1, + configurable: !0, + }), + (Container.backgroundImageProperty = new m.SerializableObjectProperty( + m.Versions.v1_0, + 'backgroundImage', + he, + )), + (Container.verticalContentAlignmentProperty = new m.EnumProperty( + m.Versions.v1_1, + 'verticalContentAlignment', + l.VerticalAlignment, + )), + (Container.rtlProperty = new m.BoolProperty(m.Versions.v1_0, 'rtl')), + o([(0, m.property)(Container.backgroundImageProperty)], Container.prototype, 'backgroundImage', null), + o( + [(0, m.property)(Container.verticalContentAlignmentProperty)], + Container.prototype, + 'verticalContentAlignment', + void 0, + ), + o([(0, m.property)(Container.rtlProperty)], Container.prototype, 'rtl', void 0), + Container + ) + })(ue) + t.Container = me + var ge = (function (e) { + function Column(t) { + void 0 === t && (t = 'stretch') + var n = e.call(this) || this + return (n.width = 'stretch'), (n._computedWeight = 0), (n.width = t), n + } + return ( + r(Column, e), + (Column.prototype.adjustRenderedElementSize = function (e) { + this.isDesignMode() + ? ((e.style.minWidth = '20px'), + (e.style.minHeight = (this.minPixelHeight ? Math.max(this.minPixelHeight, 20) : 20) + 'px')) + : ((e.style.minWidth = '0'), this.minPixelHeight && (e.style.minHeight = this.minPixelHeight + 'px')), + 'auto' === this.width + ? (e.style.flex = '0 1 auto') + : 'stretch' === this.width + ? (e.style.flex = '1 1 50px') + : this.width instanceof c.SizeAndUnit && + (this.width.unit === l.SizeUnit.Pixel + ? ((e.style.flex = '0 0 auto'), (e.style.width = this.width.physicalSize + 'px')) + : (e.style.flex = + '1 1 ' + (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) + '%')) + }), + (Column.prototype.shouldSerialize = function (e) { + return !0 + }), + Object.defineProperty(Column.prototype, 'separatorOrientation', { + get: function () { + return l.Orientation.Vertical + }, + enumerable: !1, + configurable: !0, + }), + (Column.prototype.getJsonTypeName = function () { + return 'Column' + }), + Object.defineProperty(Column.prototype, 'hasVisibleSeparator', { + get: function () { + return ( + !!(this.parent && this.parent instanceof _e) && + void 0 !== this.separatorElement && + !this.parent.isLeftMostElement(this) + ) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Column.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (Column.widthProperty = new m.CustomProperty( + m.Versions.v1_0, + 'width', + function (e, t, n, i) { + var r = t.defaultValue, + o = n[t.name], + s = !1 + if ('number' != typeof o || isNaN(o)) + if ('auto' === o || 'stretch' === o) r = o + else if ('string' == typeof o) + try { + ;(r = c.SizeAndUnit.parse(o)).unit === l.SizeUnit.Pixel && + t.targetVersion.compareTo(i.targetVersion) > 0 && + (s = !0) + } catch (e) { + s = !0 + } + else s = !0 + else r = new c.SizeAndUnit(o, l.SizeUnit.Weight) + return ( + s && + (i.logParseEvent(e, l.ValidationEvent.InvalidPropertyValue, _.Strings.errors.invalidColumnWidth(o)), + (r = 'auto')), + r + ) + }, + function (e, t, n, i, r) { + i instanceof c.SizeAndUnit + ? i.unit === l.SizeUnit.Pixel + ? r.serializeValue(n, 'width', i.physicalSize + 'px') + : r.serializeNumber(n, 'width', i.physicalSize) + : r.serializeValue(n, 'width', i) + }, + 'stretch', + )), + o([(0, m.property)(Column.widthProperty)], Column.prototype, 'width', void 0), + Column + ) + })(me) + t.Column = ge + var _e = (function (e) { + function ColumnSet() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._columns = []), t + } + return ( + r(ColumnSet, e), + (ColumnSet.prototype.createColumnInstance = function (e, t) { + return t.parseCardObject( + this, + e, + [], + !this.isDesignMode(), + function (e) { + return e && 'Column' !== e ? void 0 : new ge() + }, + function (e, n) { + t.logParseEvent( + void 0, + l.ValidationEvent.ElementTypeNotAllowed, + _.Strings.errors.elementTypeNotAllowed(e), + ) + }, + ) + }), + (ColumnSet.prototype.internalRender = function () { + if (((this._renderedColumns = []), this._columns.length > 0)) { + var e = this.hostConfig, + t = document.createElement('div') + switch ( + ((t.className = e.makeCssClassName('ac-columnSet')), + (t.style.display = 'flex'), + c.GlobalSettings.useAdvancedCardBottomTruncation && (t.style.minHeight = '-webkit-min-content'), + this.getEffectiveHorizontalAlignment()) + ) { + case l.HorizontalAlignment.Center: + t.style.justifyContent = 'center' + break + case l.HorizontalAlignment.Right: + t.style.justifyContent = 'flex-end' + break + default: + t.style.justifyContent = 'flex-start' + } + for (var n = 0, i = 0, r = this._columns; i < r.length; i++) { + ;(a = r[i]).width instanceof c.SizeAndUnit && + a.width.unit === l.SizeUnit.Weight && + (n += a.width.physicalSize) + } + for (var o = 0, s = this._columns; o < s.length; o++) { + var a + if ((a = s[o]).width instanceof c.SizeAndUnit && a.width.unit === l.SizeUnit.Weight && n > 0) { + var p = (100 / n) * a.width.physicalSize + a._computedWeight = p + } + var u = a.render() + u && + (this._renderedColumns.length > 0 && + a.separatorElement && + ((a.separatorElement.style.flex = '0 0 auto'), d.appendChild(t, a.separatorElement)), + d.appendChild(t, u), + this._renderedColumns.push(a)) + } + return this._renderedColumns.length > 0 ? t : void 0 + } + }), + (ColumnSet.prototype.truncateOverflow = function (e) { + for (var t = 0, n = this._columns; t < n.length; t++) { + n[t].handleOverflow(e) + } + return !0 + }), + (ColumnSet.prototype.undoOverflowTruncation = function () { + for (var e = 0, t = this._columns; e < t.length; e++) { + t[e].resetOverflow() + } + }), + Object.defineProperty(ColumnSet.prototype, 'isSelectable', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (ColumnSet.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), (this._columns = []), (this._renderedColumns = []) + var i = t.columns + if (Array.isArray(i)) + for (var r = 0, o = i; r < o.length; r++) { + var s = o[r], + a = this.createColumnInstance(s, n) + a && this._columns.push(a) + } + }), + (ColumnSet.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), n.serializeArray(t, 'columns', this._columns) + }), + (ColumnSet.prototype.isFirstElement = function (e) { + for (var t = 0, n = this._columns; t < n.length; t++) { + var i = n[t] + if (i.isVisible) return i === e + } + return !1 + }), + (ColumnSet.prototype.isBleedingAtTop = function () { + if (this.isBleeding()) return !0 + if (this._renderedColumns && this._renderedColumns.length > 0) + for (var e = 0, t = this._columns; e < t.length; e++) { + if (t[e].isBleedingAtTop()) return !0 + } + return !1 + }), + (ColumnSet.prototype.isBleedingAtBottom = function () { + if (this.isBleeding()) return !0 + if (this._renderedColumns && this._renderedColumns.length > 0) + for (var e = 0, t = this._columns; e < t.length; e++) { + if (t[e].isBleedingAtBottom()) return !0 + } + return !1 + }), + (ColumnSet.prototype.getItemCount = function () { + return this._columns.length + }), + (ColumnSet.prototype.getFirstVisibleRenderedItem = function () { + return this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0 + ? this._renderedColumns[0] + : void 0 + }), + (ColumnSet.prototype.getLastVisibleRenderedItem = function () { + return this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0 + ? this._renderedColumns[this._renderedColumns.length - 1] + : void 0 + }), + (ColumnSet.prototype.getColumnAt = function (e) { + return this._columns[e] + }), + (ColumnSet.prototype.getItemAt = function (e) { + return this.getColumnAt(e) + }), + (ColumnSet.prototype.getJsonTypeName = function () { + return 'ColumnSet' + }), + (ColumnSet.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t) + for (var n = 0, i = 0, r = 0, o = this._columns; r < o.length; r++) { + var s = o[r] + 'number' == typeof s.width ? n++ : 'stretch' === s.width && i++ + } + n > 0 && + i > 0 && + t.addFailure( + this, + l.ValidationEvent.Hint, + _.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet(), + ) + }), + (ColumnSet.prototype.addColumn = function (e) { + if (e.parent) throw new Error(_.Strings.errors.columnAlreadyBelongsToAnotherSet()) + this._columns.push(e), e.setParent(this) + }), + (ColumnSet.prototype.removeItem = function (e) { + if (e instanceof ge) { + var t = this._columns.indexOf(e) + if (t >= 0) return this._columns.splice(t, 1), e.setParent(void 0), this.updateLayout(), !0 + } + return !1 + }), + (ColumnSet.prototype.indexOf = function (e) { + return e instanceof ge ? this._columns.indexOf(e) : -1 + }), + (ColumnSet.prototype.isLeftMostElement = function (e) { + return 0 === this._columns.indexOf(e) + }), + (ColumnSet.prototype.isRightMostElement = function (e) { + return this._columns.indexOf(e) === this._columns.length - 1 + }), + (ColumnSet.prototype.isTopElement = function (e) { + return this._columns.indexOf(e) >= 0 + }), + (ColumnSet.prototype.isBottomElement = function (e) { + return this._columns.indexOf(e) >= 0 + }), + (ColumnSet.prototype.getActionById = function (e) { + for (var t = void 0, n = 0, i = this._columns; n < i.length; n++) { + if ((t = i[n].getActionById(e))) break + } + return t + }), + Object.defineProperty(ColumnSet.prototype, 'bleed', { + get: function () { + return this.getBleed() + }, + set: function (e) { + this.setBleed(e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ColumnSet.prototype, 'padding', { + get: function () { + return this.getPadding() + }, + set: function (e) { + this.setPadding(e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ColumnSet.prototype, 'selectAction', { + get: function () { + return this._selectAction + }, + set: function (e) { + this._selectAction = e + }, + enumerable: !1, + configurable: !0, + }), + ColumnSet + ) + })(ue) + function raiseImageLoadedEvent(e) { + var t = e.getRootElement(), + n = t && t.onImageLoaded ? t.onImageLoaded : Ee.onImageLoaded + n && n(e) + } + function raiseAnchorClickedEvent(e, t, n) { + var i = e.getRootElement(), + r = i && i.onAnchorClicked ? i.onAnchorClicked : Ee.onAnchorClicked + return void 0 !== r && r(e, t, n) + } + function raiseInlineCardExpandedEvent(e, t) { + var n = e.parent ? e.parent.getRootElement() : void 0, + i = n && n.onInlineCardExpanded ? n.onInlineCardExpanded : Ee.onInlineCardExpanded + i && i(e, t) + } + function raiseElementVisibilityChangedEvent(e, t) { + void 0 === t && (t = !0) + var n = e.getRootElement() + t && n.updateLayout() + var i = n, + r = i && i.onElementVisibilityChanged ? i.onElementVisibilityChanged : Ee.onElementVisibilityChanged + void 0 !== r && r(e) + } + t.ColumnSet = _e + var fe = (function (e) { + function ContainerWithActions() { + var t = e.call(this) || this + return (t._actionCollection = new le(t)), t + } + return ( + r(ContainerWithActions, e), + (ContainerWithActions.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), this.parseActions(t, n) + }), + (ContainerWithActions.prototype.parseActions = function (e, t) { + this._actionCollection.parse(e.actions, t) + }), + (ContainerWithActions.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), this._actionCollection.toJSON(t, 'actions', n) + }), + (ContainerWithActions.prototype.internalRender = function () { + var t = e.prototype.internalRender.call(this) + if (t) { + var n = this._actionCollection.render(this.hostConfig.actions.actionsOrientation) + return ( + n && + (d.appendChild( + t, + renderSeparation( + this.hostConfig, + { + spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing), + }, + l.Orientation.Horizontal, + ), + ), + d.appendChild(t, n)), + this.renderIfEmpty || t.children.length > 0 ? t : void 0 + ) + } + }), + (ContainerWithActions.prototype.getHasExpandedAction = function () { + return ( + 0 !== this.renderedActionCount && + (1 === this.renderedActionCount + ? void 0 !== this._actionCollection.expandedAction && + !this.hostConfig.actions.preExpandSingleShowCardAction + : void 0 !== this._actionCollection.expandedAction) + ) + }), + Object.defineProperty(ContainerWithActions.prototype, 'renderedActionCount', { + get: function () { + return this._actionCollection.renderedActionCount + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ContainerWithActions.prototype, 'renderIfEmpty', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (ContainerWithActions.prototype.releaseDOMResources = function () { + e.prototype.releaseDOMResources.call(this), this._actionCollection.releaseDOMResources() + }), + (ContainerWithActions.prototype.getActionCount = function () { + return this._actionCollection.getActionCount() + }), + (ContainerWithActions.prototype.getActionAt = function (t) { + return t >= 0 && t < this.getActionCount() + ? this._actionCollection.getActionAt(t) + : e.prototype.getActionAt.call(this, t) + }), + (ContainerWithActions.prototype.getActionById = function (t) { + var n = this._actionCollection.getActionById(t) + return n || e.prototype.getActionById.call(this, t) + }), + (ContainerWithActions.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + this._actionCollection && this._actionCollection.validateProperties(t) + }), + (ContainerWithActions.prototype.isLastElement = function (t) { + return e.prototype.isLastElement.call(this, t) && 0 === this._actionCollection.getActionCount() + }), + (ContainerWithActions.prototype.addAction = function (e) { + this._actionCollection.addAction(e) + }), + (ContainerWithActions.prototype.clear = function () { + e.prototype.clear.call(this), this._actionCollection.clear() + }), + (ContainerWithActions.prototype.getAllInputs = function (t) { + void 0 === t && (t = !0) + var n = e.prototype.getAllInputs.call(this, t) + return t && n.push.apply(n, this._actionCollection.getAllInputs(t)), n + }), + (ContainerWithActions.prototype.getResourceInformation = function () { + var t = e.prototype.getResourceInformation.call(this) + return t.push.apply(t, this._actionCollection.getResourceInformation()), t + }), + (ContainerWithActions.prototype.isBleedingAtBottom = function () { + return 0 === this._actionCollection.renderedActionCount + ? e.prototype.isBleedingAtBottom.call(this) + : 1 === this._actionCollection.getActionCount() + ? void 0 !== this._actionCollection.expandedAction && + !this.hostConfig.actions.preExpandSingleShowCardAction + : void 0 !== this._actionCollection.expandedAction + }), + (ContainerWithActions.prototype.getForbiddenActionNames = function () { + return [] + }), + Object.defineProperty(ContainerWithActions.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + ContainerWithActions + ) + })(me) + t.ContainerWithActions = fe + var ye = (function (e) { + function RefreshActionProperty(t, n) { + var i = e.call(this, t, n, void 0) || this + return (i.targetVersion = t), (i.name = n), i + } + return ( + r(RefreshActionProperty, e), + (RefreshActionProperty.prototype.parse = function (e, t, n) { + var i = n.parseAction(e.parent, t[this.name], [], !1) + if (void 0 !== i) { + if (i instanceof ee) return i + n.logParseEvent( + e, + l.ValidationEvent.ActionTypeNotAllowed, + _.Strings.errors.actionTypeNotAllowed(i.getJsonTypeName()), + ) + } + n.logParseEvent(e, l.ValidationEvent.PropertyCantBeNull, _.Strings.errors.propertyMustBeSet('action')) + }), + (RefreshActionProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, n ? n.toJSON(i) : void 0, void 0, !0) + }), + RefreshActionProperty + ) + })(m.PropertyDefinition) + t.RefreshActionProperty = ye + var ve = (function (e) { + function RefreshDefinition() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(RefreshDefinition, e), + Object.defineProperty(RefreshDefinition.prototype, 'action', { + get: function () { + return this.getValue(RefreshDefinition.actionProperty) + }, + set: function (e) { + this.setValue(RefreshDefinition.actionProperty, e), e && e.setParent(this.parent) + }, + enumerable: !1, + configurable: !0, + }), + (RefreshDefinition.prototype.getSchemaKey = function () { + return 'RefreshDefinition' + }), + (RefreshDefinition.actionProperty = new ye(m.Versions.v1_4, 'action')), + (RefreshDefinition.userIdsProperty = new m.StringArrayProperty(m.Versions.v1_4, 'userIds')), + o([(0, m.property)(RefreshDefinition.actionProperty)], RefreshDefinition.prototype, 'action', null), + o([(0, m.property)(RefreshDefinition.userIdsProperty)], RefreshDefinition.prototype, 'userIds', void 0), + RefreshDefinition + ) + })(m.SerializableObject) + t.RefreshDefinition = ve + var be = (function (e) { + function AuthCardButton() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(AuthCardButton, e), + (AuthCardButton.prototype.getSchemaKey = function () { + return 'AuthCardButton' + }), + (AuthCardButton.typeProperty = new m.StringProperty(m.Versions.v1_4, 'type')), + (AuthCardButton.titleProperty = new m.StringProperty(m.Versions.v1_4, 'title')), + (AuthCardButton.imageProperty = new m.StringProperty(m.Versions.v1_4, 'image')), + (AuthCardButton.valueProperty = new m.StringProperty(m.Versions.v1_4, 'value')), + o([(0, m.property)(AuthCardButton.typeProperty)], AuthCardButton.prototype, 'type', void 0), + o([(0, m.property)(AuthCardButton.titleProperty)], AuthCardButton.prototype, 'title', void 0), + o([(0, m.property)(AuthCardButton.imageProperty)], AuthCardButton.prototype, 'image', void 0), + o([(0, m.property)(AuthCardButton.valueProperty)], AuthCardButton.prototype, 'value', void 0), + AuthCardButton + ) + })(m.SerializableObject) + t.AuthCardButton = be + var Se = (function (e) { + function TokenExchangeResource() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(TokenExchangeResource, e), + (TokenExchangeResource.prototype.getSchemaKey = function () { + return 'TokenExchangeResource' + }), + (TokenExchangeResource.idProperty = new m.StringProperty(m.Versions.v1_4, 'id')), + (TokenExchangeResource.uriProperty = new m.StringProperty(m.Versions.v1_4, 'uri')), + (TokenExchangeResource.providerIdProperty = new m.StringProperty(m.Versions.v1_4, 'providerId')), + o([(0, m.property)(TokenExchangeResource.idProperty)], TokenExchangeResource.prototype, 'id', void 0), + o([(0, m.property)(TokenExchangeResource.uriProperty)], TokenExchangeResource.prototype, 'uri', void 0), + o( + [(0, m.property)(TokenExchangeResource.providerIdProperty)], + TokenExchangeResource.prototype, + 'providerId', + void 0, + ), + TokenExchangeResource + ) + })(m.SerializableObject) + t.TokenExchangeResource = Se + var Ce = (function (e) { + function Authentication() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(Authentication, e), + (Authentication.prototype.getSchemaKey = function () { + return 'Authentication' + }), + (Authentication.textProperty = new m.StringProperty(m.Versions.v1_4, 'text')), + (Authentication.connectionNameProperty = new m.StringProperty(m.Versions.v1_4, 'connectionName')), + (Authentication.buttonsProperty = new m.SerializableObjectCollectionProperty( + m.Versions.v1_4, + 'buttons', + be, + )), + (Authentication.tokenExchangeResourceProperty = new m.SerializableObjectProperty( + m.Versions.v1_4, + 'tokenExchangeResource', + Se, + !0, + )), + o([(0, m.property)(Authentication.textProperty)], Authentication.prototype, 'text', void 0), + o( + [(0, m.property)(Authentication.connectionNameProperty)], + Authentication.prototype, + 'connectionName', + void 0, + ), + o([(0, m.property)(Authentication.buttonsProperty)], Authentication.prototype, 'buttons', void 0), + o( + [(0, m.property)(Authentication.tokenExchangeResourceProperty)], + Authentication.prototype, + 'tokenExchangeResource', + void 0, + ), + Authentication + ) + })(m.SerializableObject) + t.Authentication = Ce + var Ee = (function (e) { + function AdaptiveCard() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.designMode = !1), t + } + return ( + r(AdaptiveCard, e), + Object.defineProperty(AdaptiveCard.prototype, 'refresh', { + get: function () { + return this.getValue(AdaptiveCard.refreshProperty) + }, + set: function (e) { + this.setValue(AdaptiveCard.refreshProperty, e), e && (e.parent = this) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(AdaptiveCard, 'processMarkdown', { + get: function () { + throw new Error(_.Strings.errors.processMarkdownEventRemoved()) + }, + set: function (e) { + throw new Error(_.Strings.errors.processMarkdownEventRemoved()) + }, + enumerable: !1, + configurable: !0, + }), + (AdaptiveCard.applyMarkdown = function (e) { + var t = { + didProcess: !1, + } + if (AdaptiveCard.onProcessMarkdown) AdaptiveCard.onProcessMarkdown(e, t) + else if (window.markdownit) { + var n = window.markdownit + ;(t.outputHtml = n().render(e)), (t.didProcess = !0) + } else + AdaptiveCard._haveWarnedAboutNoMarkdownProcessing || + (console.warn(_.Strings.errors.markdownProcessingNotEnabled), + (AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = !0)) + return t + }), + (AdaptiveCard.prototype.isVersionSupported = function () { + return ( + !!this.bypassVersionCheck || + !( + !this.version || + !this.version.isValid || + this.maxVersion.major < this.version.major || + (this.maxVersion.major === this.version.major && this.maxVersion.minor < this.version.minor) + ) + ) + }), + (AdaptiveCard.prototype.getDefaultSerializationContext = function () { + return new Ie(this.version) + }), + (AdaptiveCard.prototype.getItemsCollectionPropertyName = function () { + return 'body' + }), + (AdaptiveCard.prototype.internalParse = function (t, n) { + this._fallbackCard = void 0 + var i = n.parseElement(void 0, t.fallback, this.forbiddenChildElements(), !this.isDesignMode()) + i && ((this._fallbackCard = new AdaptiveCard()), this._fallbackCard.addItem(i)), + e.prototype.internalParse.call(this, t, n) + }), + (AdaptiveCard.prototype.internalToJSON = function (t, n) { + this.setValue(AdaptiveCard.versionProperty, n.targetVersion), e.prototype.internalToJSON.call(this, t, n) + }), + (AdaptiveCard.prototype.internalRender = function () { + var t = e.prototype.internalRender.call(this) + return c.GlobalSettings.useAdvancedCardBottomTruncation && t && t.style.removeProperty('minHeight'), t + }), + (AdaptiveCard.prototype.getHasBackground = function (e) { + return void 0 === e && (e = !1), !0 + }), + (AdaptiveCard.prototype.getDefaultPadding = function () { + return new c.PaddingDefinition(l.Spacing.Padding, l.Spacing.Padding, l.Spacing.Padding, l.Spacing.Padding) + }), + (AdaptiveCard.prototype.shouldSerialize = function (e) { + return !0 + }), + Object.defineProperty(AdaptiveCard.prototype, 'renderIfEmpty', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(AdaptiveCard.prototype, 'bypassVersionCheck', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(AdaptiveCard.prototype, 'allowCustomStyle', { + get: function () { + return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(AdaptiveCard.prototype, 'hasBackground', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + (AdaptiveCard.prototype.getJsonTypeName = function () { + return 'AdaptiveCard' + }), + (AdaptiveCard.prototype.internalValidateProperties = function (t) { + e.prototype.internalValidateProperties.call(this, t), + 'AdaptiveCard' !== this.getValue(y.typeNameProperty) && + t.addFailure(this, l.ValidationEvent.MissingCardType, _.Strings.errors.invalidCardType()), + this.bypassVersionCheck || this.version + ? this.isVersionSupported() || + t.addFailure( + this, + l.ValidationEvent.UnsupportedCardVersion, + _.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()), + ) + : t.addFailure( + this, + l.ValidationEvent.PropertyCantBeNull, + _.Strings.errors.propertyMustBeSet('version'), + ) + }), + (AdaptiveCard.prototype.render = function (t) { + var n + return ( + this.shouldFallback() && this._fallbackCard + ? ((this._fallbackCard.hostConfig = this.hostConfig), (n = this._fallbackCard.render())) + : (n = e.prototype.render.call(this)) && + (n.classList.add(this.hostConfig.makeCssClassName('ac-adaptiveCard')), + c.GlobalSettings.setTabIndexAtCardRoot && (n.tabIndex = 0), + this.speak && n.setAttribute('aria-label', this.speak)), + t && (d.appendChild(t, n), this.updateLayout()), + n + ) + }), + (AdaptiveCard.prototype.updateLayout = function (t) { + if ( + (void 0 === t && (t = !0), + e.prototype.updateLayout.call(this, t), + c.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) + ) { + var n = this.hostConfig.getEffectiveSpacing(l.Spacing.Default) + this.handleOverflow(this.renderedElement.offsetHeight - n) + } + }), + (AdaptiveCard.prototype.shouldFallback = function () { + return e.prototype.shouldFallback.call(this) || !this.isVersionSupported() + }), + Object.defineProperty(AdaptiveCard.prototype, 'hasVisibleSeparator', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (AdaptiveCard.schemaUrl = 'http://adaptivecards.io/schemas/adaptive-card.json'), + (AdaptiveCard.$schemaProperty = new m.CustomProperty( + m.Versions.v1_0, + '$schema', + function (e, t, n, i) { + return AdaptiveCard.schemaUrl + }, + function (e, t, n, i, r) { + r.serializeValue(n, t.name, AdaptiveCard.schemaUrl) + }, + )), + (AdaptiveCard.versionProperty = new m.CustomProperty( + m.Versions.v1_0, + 'version', + function (e, t, n, i) { + var r = m.Version.parse(n[t.name], i) + return ( + void 0 === r && + ((r = m.Versions.latest), + i.logParseEvent( + e, + l.ValidationEvent.InvalidPropertyValue, + _.Strings.errors.invalidCardVersion(r.toString()), + )), + r + ) + }, + function (e, t, n, i, r) { + void 0 !== i && r.serializeValue(n, t.name, i.toString()) + }, + m.Versions.v1_0, + )), + (AdaptiveCard.fallbackTextProperty = new m.StringProperty(m.Versions.v1_0, 'fallbackText')), + (AdaptiveCard.speakProperty = new m.StringProperty(m.Versions.v1_0, 'speak')), + (AdaptiveCard.refreshProperty = new m.SerializableObjectProperty(m.Versions.v1_4, 'refresh', ve, !0)), + (AdaptiveCard.authenticationProperty = new m.SerializableObjectProperty( + m.Versions.v1_4, + 'authentication', + Ce, + !0, + )), + (AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = !1), + o([(0, m.property)(AdaptiveCard.versionProperty)], AdaptiveCard.prototype, 'version', void 0), + o([(0, m.property)(AdaptiveCard.fallbackTextProperty)], AdaptiveCard.prototype, 'fallbackText', void 0), + o([(0, m.property)(AdaptiveCard.speakProperty)], AdaptiveCard.prototype, 'speak', void 0), + o([(0, m.property)(AdaptiveCard.refreshProperty)], AdaptiveCard.prototype, 'refresh', null), + o([(0, m.property)(AdaptiveCard.authenticationProperty)], AdaptiveCard.prototype, 'authentication', void 0), + AdaptiveCard + ) + })(fe) + t.AdaptiveCard = Ee + var Te = (function (e) { + function InlineAdaptiveCard() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.suppressStyle = !1), t + } + return ( + r(InlineAdaptiveCard, e), + (InlineAdaptiveCard.prototype.getSchemaKey = function () { + return 'InlineAdaptiveCard' + }), + (InlineAdaptiveCard.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), t.remove(Ee.$schemaProperty, Ee.versionProperty) + }), + (InlineAdaptiveCard.prototype.getDefaultPadding = function () { + return new c.PaddingDefinition( + this.suppressStyle ? l.Spacing.None : l.Spacing.Padding, + l.Spacing.Padding, + this.suppressStyle ? l.Spacing.None : l.Spacing.Padding, + l.Spacing.Padding, + ) + }), + Object.defineProperty(InlineAdaptiveCard.prototype, 'bypassVersionCheck', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(InlineAdaptiveCard.prototype, 'defaultStyle', { + get: function () { + return this.suppressStyle + ? l.ContainerStyle.Default + : this.hostConfig.actions.showCard.style + ? this.hostConfig.actions.showCard.style + : l.ContainerStyle.Emphasis + }, + enumerable: !1, + configurable: !0, + }), + (InlineAdaptiveCard.prototype.render = function (t) { + var n = e.prototype.render.call(this, t) + return n && (n.setAttribute('aria-live', 'polite'), n.removeAttribute('tabindex')), n + }), + InlineAdaptiveCard + ) + })(Ee), + Ie = (function (e) { + function SerializationContext() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._forbiddenTypes = new Set()), t + } + return ( + r(SerializationContext, e), + (SerializationContext.prototype.internalParseCardObject = function (e, t, n, i, r, o) { + var s = this, + a = void 0 + if (t && 'object' == typeof t) { + var p = new Set() + this._forbiddenTypes.forEach(function (e) { + p.add(e) + }), + n.forEach(function (e) { + s._forbiddenTypes.add(e) + }) + var u = d.parseString(t.type) + if (u && this._forbiddenTypes.has(u)) o(u, l.TypeErrorType.ForbiddenType) + else { + var h = !1 + if ( + ((a = r(u)) + ? (a.setParent(e), + a.parse(t, this), + (h = c.GlobalSettings.enableFallback && i && a.shouldFallback())) + : ((h = c.GlobalSettings.enableFallback && i), o(u, l.TypeErrorType.UnknownType)), + h) + ) { + var m = t.fallback + !m && e && e.setShouldFallback(!0), + 'string' == typeof m && 'drop' === m.toLowerCase() + ? (a = void 0) + : 'object' == typeof m && (a = this.internalParseCardObject(e, m, n, !0, r, o)) + } + } + this._forbiddenTypes = p + } + return a + }), + (SerializationContext.prototype.cardObjectParsed = function (e, t) { + e instanceof Z && this.onParseAction + ? this.onParseAction(e, t, this) + : e instanceof y && this.onParseElement && this.onParseElement(e, t, this) + }), + (SerializationContext.prototype.shouldSerialize = function (e) { + return e instanceof Z + ? void 0 !== this.actionRegistry.findByName(e.getJsonTypeName()) + : !(e instanceof y) || void 0 !== this.elementRegistry.findByName(e.getJsonTypeName()) + }), + (SerializationContext.prototype.parseCardObject = function (e, t, n, i, r, o) { + var s = new Set(n), + a = this.internalParseCardObject(e, t, s, i, r, o) + return void 0 !== a && this.cardObjectParsed(a, t), a + }), + (SerializationContext.prototype.parseElement = function (e, t, n, i) { + var r = this + return this.parseCardObject( + e, + t, + n, + i, + function (e) { + return r.elementRegistry.createInstance(e, r.targetVersion) + }, + function (e, t) { + t === l.TypeErrorType.UnknownType + ? r.logParseEvent( + void 0, + l.ValidationEvent.UnknownElementType, + _.Strings.errors.unknownElementType(e), + ) + : r.logParseEvent( + void 0, + l.ValidationEvent.ElementTypeNotAllowed, + _.Strings.errors.elementTypeNotAllowed(e), + ) + }, + ) + }), + (SerializationContext.prototype.parseAction = function (e, t, n, i) { + var r = this + return this.parseCardObject( + e, + t, + n, + i, + function (e) { + return r.actionRegistry.createInstance(e, r.targetVersion) + }, + function (e, t) { + t === l.TypeErrorType.UnknownType + ? r.logParseEvent( + void 0, + l.ValidationEvent.UnknownActionType, + _.Strings.errors.unknownActionType(e), + ) + : r.logParseEvent( + void 0, + l.ValidationEvent.ActionTypeNotAllowed, + _.Strings.errors.actionTypeNotAllowed(e), + ) + }, + ) + }), + Object.defineProperty(SerializationContext.prototype, 'elementRegistry', { + get: function () { + var e + return null !== (e = this._elementRegistry) && void 0 !== e ? e : g.GlobalRegistry.elements + }, + enumerable: !1, + configurable: !0, + }), + (SerializationContext.prototype.setElementRegistry = function (e) { + this._elementRegistry = e + }), + Object.defineProperty(SerializationContext.prototype, 'actionRegistry', { + get: function () { + var e + return null !== (e = this._actionRegistry) && void 0 !== e ? e : g.GlobalRegistry.actions + }, + enumerable: !1, + configurable: !0, + }), + (SerializationContext.prototype.setActionRegistry = function (e) { + this._actionRegistry = e + }), + SerializationContext + ) + })(m.BaseSerializationContext) + ;(t.SerializationContext = Ie), + g.GlobalRegistry.defaultElements.register('Container', me), + g.GlobalRegistry.defaultElements.register('TextBlock', S), + g.GlobalRegistry.defaultElements.register('RichTextBlock', E, m.Versions.v1_2), + g.GlobalRegistry.defaultElements.register('TextRun', C, m.Versions.v1_2), + g.GlobalRegistry.defaultElements.register('Image', A), + g.GlobalRegistry.defaultElements.register('ImageSet', x), + g.GlobalRegistry.defaultElements.register('Media', U, m.Versions.v1_1), + g.GlobalRegistry.defaultElements.register('FactSet', I), + g.GlobalRegistry.defaultElements.register('ColumnSet', _e), + g.GlobalRegistry.defaultElements.register('ActionSet', ce, m.Versions.v1_2), + g.GlobalRegistry.defaultElements.register('Input.Text', V), + g.GlobalRegistry.defaultElements.register('Input.Date', Y), + g.GlobalRegistry.defaultElements.register('Input.Time', Q), + g.GlobalRegistry.defaultElements.register('Input.Number', W), + g.GlobalRegistry.defaultElements.register('Input.ChoiceSet', j), + g.GlobalRegistry.defaultElements.register('Input.Toggle', H), + g.GlobalRegistry.defaultActions.register(te.JsonTypeName, te), + g.GlobalRegistry.defaultActions.register(J.JsonTypeName, J), + g.GlobalRegistry.defaultActions.register(se.JsonTypeName, se), + g.GlobalRegistry.defaultActions.register(ne.JsonTypeName, ne, m.Versions.v1_2), + g.GlobalRegistry.defaultActions.register(ee.JsonTypeName, ee, m.Versions.v1_4) + }, + 182: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }), + o = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + s = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i) + else + for (var a = e.length - 1; a >= 0; a--) + (r = e[a]) && (s = (o < 3 ? r(s) : o > 3 ? r(t, n, s) : r(t, n)) || s) + return o > 3 && s && Object.defineProperty(t, n, s), s + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.CardObject = t.ValidationResults = void 0) + var s = n(9003), + a = n(6758), + l = n(8418), + c = n(9779), + d = n(2421), + p = (function () { + function ValidationResults() { + ;(this.allIds = {}), (this.validationEvents = []) + } + return ( + (ValidationResults.prototype.addFailure = function (e, t, n) { + this.validationEvents.push({ + phase: s.ValidationPhase.Validation, + source: e, + event: t, + message: n, + }) + }), + ValidationResults + ) + })() + t.ValidationResults = p + var u = (function (e) { + function CardObject() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._shouldFallback = !1), t + } + return ( + r(CardObject, e), + (CardObject.prototype.getSchemaKey = function () { + return this.getJsonTypeName() + }), + Object.defineProperty(CardObject.prototype, 'requires', { + get: function () { + return this.getValue(CardObject.requiresProperty) + }, + enumerable: !1, + configurable: !0, + }), + (CardObject.prototype.contains = function (e) { + return !!this._renderedElement && this._renderedElement.contains(e) + }), + (CardObject.prototype.preProcessPropertyValue = function (e, t) { + var n = void 0 === t ? this.getValue(e) : t + if (l.GlobalSettings.allowPreProcessingPropertyValues) { + for (var i = this; i && !i.onPreProcessPropertyValue; ) i = i.parent + if (i && i.onPreProcessPropertyValue) return i.onPreProcessPropertyValue(this, e, n) + } + return n + }), + (CardObject.prototype.setParent = function (e) { + this._parent = e + }), + (CardObject.prototype.setShouldFallback = function (e) { + this._shouldFallback = e + }), + (CardObject.prototype.shouldFallback = function () { + return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities) + }), + (CardObject.prototype.getRootObject = function () { + for (var e = this; e.parent; ) e = e.parent + return e + }), + (CardObject.prototype.internalValidateProperties = function (e) { + this.id && + (e.allIds.hasOwnProperty(this.id) + ? (1 === e.allIds[this.id] && + e.addFailure(this, s.ValidationEvent.DuplicateId, a.Strings.errors.duplicateId(this.id)), + (e.allIds[this.id] += 1)) + : (e.allIds[this.id] = 1)) + }), + (CardObject.prototype.validateProperties = function () { + var e = new p() + return this.internalValidateProperties(e), e + }), + (CardObject.prototype.findDOMNodeOwner = function (e) { + return this.contains(e) ? this : void 0 + }), + (CardObject.prototype.releaseDOMResources = function () {}), + Object.defineProperty(CardObject.prototype, 'parent', { + get: function () { + return this._parent + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CardObject.prototype, 'renderedElement', { + get: function () { + return this._renderedElement + }, + enumerable: !1, + configurable: !0, + }), + (CardObject.typeNameProperty = new d.StringProperty( + d.Versions.v1_0, + 'type', + void 0, + void 0, + void 0, + function (e) { + return e.getJsonTypeName() + }, + )), + (CardObject.idProperty = new d.StringProperty(d.Versions.v1_0, 'id')), + (CardObject.requiresProperty = new d.SerializableObjectProperty( + d.Versions.v1_2, + 'requires', + c.HostCapabilities, + !1, + new c.HostCapabilities(), + )), + o([(0, d.property)(CardObject.idProperty)], CardObject.prototype, 'id', void 0), + o([(0, d.property)(CardObject.requiresProperty)], CardObject.prototype, 'requires', null), + CardObject + ) + })(d.SerializableObject) + t.CardObject = u + }, + 7516: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }), + o = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + s = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i) + else + for (var a = e.length - 1; a >= 0; a--) + (r = e[a]) && (s = (o < 3 ? r(s) : o > 3 ? r(t, n, s) : r(t, n)) || s) + return o > 3 && s && Object.defineProperty(t, n, s), s + }, + s = + (this && this.__spreadArray) || + function (e, t, n) { + if (n || 2 === arguments.length) + for (var i, r = 0, o = t.length; r < o; r++) + (!i && r in t) || (i || (i = Array.prototype.slice.call(t, 0, r)), (i[r] = t[r])) + return e.concat(i || Array.prototype.slice.call(t)) + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.CarouselEvent = t.Carousel = t.CarouselPage = void 0) + var a = n(7191), + l = n(9003), + c = n(2421), + d = n(9301), + p = n(9003), + u = n(6758), + h = n(5679), + m = n(7794), + g = n(8418), + _ = (function (e) { + function CarouselPage() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(CarouselPage, e), + (CarouselPage.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), + t.remove(a.Container.styleProperty), + t.remove(a.Container.bleedProperty), + t.remove(a.Container.isVisibleProperty) + }), + (CarouselPage.prototype.internalRender = function () { + var t = document.createElement('div') + ;(t.className = this.hostConfig.makeCssClassName('swiper-slide')), (this.rtl = this.isRtl()) + var n = e.prototype.internalRender.call(this) + return m.appendChild(t, n), t + }), + (CarouselPage.prototype.getForbiddenActionTypes = function () { + return [a.ShowCardAction, a.ToggleVisibilityAction] + }), + (CarouselPage.prototype.getForbiddenChildElements = function () { + return this.forbiddenChildElements() + }), + (CarouselPage.prototype.forbiddenChildElements = function () { + return s( + [ + a.ToggleVisibilityAction.JsonTypeName, + a.ShowCardAction.JsonTypeName, + 'Media', + 'ActionSet', + 'Input.Text', + 'Input.Date', + 'Input.Time', + 'Input.Number', + 'Input.ChoiceSet', + 'Input.Toggle', + 'Carousel', + ], + e.prototype.forbiddenChildElements.call(this), + !0, + ) + }), + (CarouselPage.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), this.setShouldFallback(!1) + }), + (CarouselPage.prototype.shouldSerialize = function (e) { + return !0 + }), + (CarouselPage.prototype.getJsonTypeName = function () { + return 'CarouselPage' + }), + Object.defineProperty(CarouselPage.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(CarouselPage.prototype, 'hasVisibleSeparator', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + CarouselPage + ) + })(a.Container) + t.CarouselPage = _ + var f = (function (e) { + function Carousel() { + var t = (null !== e && e.apply(this, arguments)) || this + return ( + (t._pages = []), (t._currentIndex = 0), (t._previousEventType = l.CarouselInteractionEvent.Pagination), t + ) + } + return ( + r(Carousel, e), + (Carousel.prototype.populateSchema = function (t) { + e.prototype.populateSchema.call(this, t), + t.remove(a.Container.styleProperty), + t.remove(a.Container.bleedProperty), + t.remove(a.Container.isVisibleProperty) + }), + Object.defineProperty(Carousel.prototype, 'timer', { + get: function () { + var e = this.getValue(Carousel.timerProperty) + return ( + e && + e < this.hostConfig.carousel.minAutoplayDelay && + (console.warn(u.Strings.errors.tooLittleTimeDelay), + (e = this.hostConfig.carousel.minAutoplayDelay)), + e + ) + }, + set: function (e) { + e && e < this.hostConfig.carousel.minAutoplayDelay + ? (console.warn(u.Strings.errors.tooLittleTimeDelay), + this.setValue(Carousel.timerProperty, this.hostConfig.carousel.minAutoplayDelay)) + : this.setValue(Carousel.timerProperty, e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Carousel.prototype, 'initialPageIndex', { + get: function () { + return this.getValue(Carousel.initialPageProperty) + }, + set: function (e) { + this.isValidParsedPageIndex(e) + ? this.setValue(Carousel.initialPageProperty, e) + : (console.warn(u.Strings.errors.invalidInitialPageIndex(e)), + this.setValue(Carousel.initialPageProperty, 0)) + }, + enumerable: !1, + configurable: !0, + }), + (Carousel.prototype.isValidParsedPageIndex = function (e) { + return !!this._pages && this.isValidPageIndex(e, this._pages.length) + }), + (Carousel.prototype.isValidRenderedPageIndex = function (e) { + return !!this._renderedPages && this.isValidPageIndex(e, this._renderedPages.length) + }), + (Carousel.prototype.isValidPageIndex = function (e, t) { + return t > 0 && 0 <= e && e < t + }), + Object.defineProperty(Carousel.prototype, 'previousEventType', { + get: function () { + return this._previousEventType + }, + set: function (e) { + this._previousEventType = e + }, + enumerable: !1, + configurable: !0, + }), + (Carousel.prototype.forbiddenChildElements = function () { + return s( + [ + a.ToggleVisibilityAction.JsonTypeName, + a.ShowCardAction.JsonTypeName, + 'Media', + 'ActionSet', + 'Input.Text', + 'Input.Date', + 'Input.Time', + 'Input.Number', + 'Input.ChoiceSet', + 'Input.Toggle', + ], + e.prototype.forbiddenChildElements.call(this), + !0, + ) + }), + (Carousel.prototype.adjustRenderedElementSize = function (t) { + e.prototype.adjustRenderedElementSize.call(this, t), + 'stretch' == this.height && + void 0 !== this._containerForAdorners && + (this._containerForAdorners.style.height = '100%') + }), + (Carousel.prototype.getJsonTypeName = function () { + return 'Carousel' + }), + (Carousel.prototype.getItemCount = function () { + return this._pages.length + }), + (Carousel.prototype.getItemAt = function (e) { + return this._pages[e] + }), + (Carousel.prototype.addPage = function (e) { + this._pages.push(e), e.setParent(this) + }), + (Carousel.prototype.removeItem = function (e) { + if (e instanceof _) { + var t = this._pages.indexOf(e) + if (t >= 0) return this._pages.splice(t, 1), e.setParent(void 0), this.updateLayout(), !0 + } + return !1 + }), + (Carousel.prototype.getFirstVisibleRenderedItem = function () { + var e + return this.renderedElement && + (null === (e = this._renderedPages) || void 0 === e ? void 0 : e.length) > 0 + ? this._renderedPages[0] + : void 0 + }), + (Carousel.prototype.getLastVisibleRenderedItem = function () { + var e + return this.renderedElement && + (null === (e = this._renderedPages) || void 0 === e ? void 0 : e.length) > 0 + ? this._renderedPages[this._renderedPages.length - 1] + : void 0 + }), + Object.defineProperty(Carousel.prototype, 'currentPageId', { + get: function () { + var e, t + if ( + null === (t = null === (e = this._carousel) || void 0 === e ? void 0 : e.slides) || void 0 === t + ? void 0 + : t.length + ) + return this._carousel.slides[this._carousel.activeIndex].id + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Carousel.prototype, 'currentPageIndex', { + get: function () { + var e + return null === (e = this._carousel) || void 0 === e ? void 0 : e.realIndex + }, + enumerable: !1, + configurable: !0, + }), + (Carousel.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), (this._pages = []) + var i = t.pages + if (Array.isArray(i)) + for (var r = 0, o = i; r < o.length; r++) { + var s = o[r], + a = this.createCarouselPageInstance(s, n) + a && this._pages.push(a) + } + this.validateParsing(n) + }), + (Carousel.prototype.validateParsing = function (e) { + this.isValidParsedPageIndex(this.initialPageIndex) || + e.logParseEvent( + this, + l.ValidationEvent.InvalidPropertyValue, + u.Strings.errors.invalidInitialPageIndex(this.initialPageIndex), + ) + }), + (Carousel.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), n.serializeArray(t, 'pages', this._pages) + }), + (Carousel.prototype.internalRender = function () { + var e, + t = this + if (((this._renderedPages = []), !(this._pages.length <= 0))) { + var n = document.createElement('div') + n.className = this.hostConfig.makeCssClassName('ac-carousel-card-level-container') + var i = document.createElement('div') + i.className = this.hostConfig.makeCssClassName('swiper', 'ac-carousel') + var r = document.createElement('div') + ;(r.className = this.hostConfig.makeCssClassName('ac-carousel-container')), + (this._containerForAdorners = r), + n.appendChild(r) + var o = document.createElement('div') + switch ( + ((o.className = this.hostConfig.makeCssClassName('swiper-wrapper', 'ac-carousel-card-container')), + (o.style.display = 'flex'), + this.getEffectiveVerticalContentAlignment()) + ) { + case l.VerticalAlignment.Top: + o.style.alignItems = 'flex-start' + break + case l.VerticalAlignment.Bottom: + o.style.alignItems = 'flex-end' + break + default: + o.style.alignItems = 'center' + } + g.GlobalSettings.useAdvancedCardBottomTruncation && (o.style.minHeight = '-webkit-min-content') + var s = document.createElement('div') + ;(s.className = this.hostConfig.makeCssClassName('swiper-button-prev', 'ac-carousel-left')), + r.appendChild(s), + m.addCancelSelectActionEventHandler(s) + var a = document.createElement('div') + ;(a.className = this.hostConfig.makeCssClassName('swiper-button-next', 'ac-carousel-right')), + r.appendChild(a), + m.addCancelSelectActionEventHandler(a) + var c = document.createElement('div') + ;(c.className = this.hostConfig.makeCssClassName('swiper-pagination', 'ac-carousel-pagination')), + m.addCancelSelectActionEventHandler(c), + r.appendChild(c), + this.isDesignMode() && ((s.style.zIndex = '20'), (a.style.zIndex = '20'), (c.style.zIndex = '20')) + var d = Math.min(this._pages.length, this.hostConfig.carousel.maxCarouselPages) + if ( + (this._pages.length > this.hostConfig.carousel.maxCarouselPages && + console.warn(u.Strings.errors.tooManyCarouselPages), + this._pages.length > 0) + ) + for (var p = 0; p < d; p++) { + var h = this._pages[p], + _ = this.isElementAllowed(h) ? h.render() : void 0 + null == _ || _.classList.add('ac-carousel-page'), + null === (e = null == _ ? void 0 : _.children[0]) || + void 0 === e || + e.classList.add('ac-carousel-page-container'), + _ && (m.appendChild(o, _), this._renderedPages.push(h)) + } + return ( + i.appendChild(o), + (i.tabIndex = this.isDesignMode() ? -1 : 0), + r.appendChild(i), + (this._carouselPageContainer = i), + (this.rtl = this.isRtl()), + this.applyRTL(i), + this.isDesignMode() || + (this.isValidRenderedPageIndex(this.initialPageIndex) + ? (this._currentIndex = this.initialPageIndex) + : (console.warn(u.Strings.errors.invalidInitialPageIndex(this.initialPageIndex)), + (this._currentIndex = 0))), + this.initializeCarouselControl(i, a, s, c, this.rtl), + n.addEventListener( + 'keydown', + function (e) { + var n, + r, + o = null === (n = t._carousel) || void 0 === n ? void 0 : n.activeIndex + t.initializeCarouselControl(i, a, s, c, t.rtl), + o && (null === (r = t._carousel) || void 0 === r || r.slideTo(o)) + }, + { + once: !0, + }, + ), + this._renderedPages.length > 0 ? n : void 0 + ) + } + }), + (Carousel.prototype.initializeCarouselControl = function (e, t, n, i, r) { + var o, + s = this, + a = { + loop: !this.isDesignMode(), + modules: [h.Navigation, h.Pagination, h.Scrollbar, h.A11y, h.History, h.Keyboard], + pagination: { + el: i, + clickable: !0, + }, + navigation: { + prevEl: void 0 !== r && r ? t : n, + nextEl: void 0 !== r && r ? n : t, + }, + a11y: { + enabled: !0, + }, + keyboard: { + enabled: !0, + onlyInViewport: !0, + }, + initialSlide: this._currentIndex, + } + this.timer && + !this.isDesignMode() && + (null === (o = a.modules) || void 0 === o || o.push(h.Autoplay), + (a.autoplay = { + delay: this.timer, + pauseOnMouseEnter: !0, + })) + var c = new h.Swiper(e, a) + e.addEventListener('mouseenter', function (e) { + var t + null === (t = c.autoplay) || void 0 === t || t.stop() + }), + e.addEventListener('mouseleave', function (e) { + var t + null === (t = c.autoplay) || void 0 === t || t.start() + }), + c.on('navigationNext', function (e) { + s.raiseCarouselEvent(l.CarouselInteractionEvent.NavigationNext) + }), + c.on('navigationPrev', function (e) { + s.raiseCarouselEvent(l.CarouselInteractionEvent.NavigationPrevious) + }), + c.on('slideChangeTransitionEnd', function (e) { + ;(s.currentIndex = e.realIndex), s.raiseCarouselEvent(l.CarouselInteractionEvent.Pagination) + }), + c.on('autoplay', function () { + s.raiseCarouselEvent(l.CarouselInteractionEvent.Autoplay) + }), + (this._carousel = c) + }), + (Carousel.prototype.createCarouselPageInstance = function (e, t) { + return t.parseCardObject( + this, + e, + this.forbiddenChildElements(), + !this.isDesignMode(), + function (e) { + return e && 'CarouselPage' !== e ? void 0 : new _() + }, + function (e, n) { + t.logParseEvent( + void 0, + p.ValidationEvent.ElementTypeNotAllowed, + u.Strings.errors.elementTypeNotAllowed(e), + ) + }, + ) + }), + (Carousel.prototype.slideTo = function (e) { + var t + null === (t = this._carousel) || void 0 === t || t.slideTo(e) + }), + Object.defineProperty(Carousel.prototype, 'carouselPageContainer', { + get: function () { + return this._carouselPageContainer + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Carousel.prototype, 'currentIndex', { + get: function () { + return this._currentIndex + }, + set: function (e) { + this._currentIndex = e + }, + enumerable: !1, + configurable: !0, + }), + (Carousel.prototype.createCarouselEvent = function (e) { + var t + return ( + null != this.currentPageIndex && (t = this.getItemAt(this.currentPageIndex).id), + new CarouselEvent(e, this.id, t, this.currentPageIndex) + ) + }), + (Carousel.prototype.raiseCarouselEvent = function (e) { + var t = this.parent ? this.parent.getRootElement() : void 0, + n = t && t.onCarouselEvent ? t.onCarouselEvent : a.AdaptiveCard.onCarouselEvent + n && e == l.CarouselInteractionEvent.Pagination && n(this.createCarouselEvent(this.previousEventType)), + (this.previousEventType = e) + }), + (Carousel.timerProperty = new c.NumProperty(c.Versions.v1_6, 'timer', void 0)), + (Carousel.initialPageProperty = new c.NumProperty(c.Versions.v1_6, 'initialPage', 0)), + o([(0, c.property)(Carousel.timerProperty)], Carousel.prototype, 'timer', null), + o([(0, c.property)(Carousel.initialPageProperty)], Carousel.prototype, 'initialPageIndex', null), + Carousel + ) + })(a.Container) + t.Carousel = f + var CarouselEvent = function (e, t, n, i) { + ;(this.type = e), (this.carouselId = t), (this.activeCarouselPageId = n), (this.activeCarouselPageIndex = i) + } + ;(t.CarouselEvent = CarouselEvent), d.GlobalRegistry.defaultElements.register('Carousel', f, c.Versions.v1_6) + }, + 160: (e, t) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.ChannelAdapter = void 0) + var ChannelAdapter = function () {} + t.ChannelAdapter = ChannelAdapter + }, + 8607: (e, t) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.Collection = void 0) + var n = (function () { + function Collection() { + this._items = [] + } + return ( + (Collection.prototype.get = function (e) { + return this._items[e] + }), + (Collection.prototype.add = function (e) { + this._items.push(e), this.onItemAdded && this.onItemAdded(e) + }), + (Collection.prototype.remove = function (e) { + var t = this._items.indexOf(e) + t >= 0 && ((this._items = this._items.splice(t, 1)), this.onItemRemoved && this.onItemRemoved(e)) + }), + (Collection.prototype.indexOf = function (e) { + return this._items.indexOf(e) + }), + Object.defineProperty(Collection.prototype, 'length', { + get: function () { + return this._items.length + }, + enumerable: !1, + configurable: !0, + }), + Collection + ) + })() + t.Collection = n + }, + 336: (e, t) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.Constants = void 0) + var n = (function () { + function Constants() {} + return ( + (Constants.keys = { + tab: 'Tab', + enter: 'Enter', + escape: 'Escape', + space: ' ', + up: 'ArrowUp', + down: 'ArrowDown', + delete: 'Delete', + }), + Constants + ) + })() + t.Constants = n + }, + 9336: function (e, t, n) { + 'use strict' + var i = + (this && this.__createBinding) || + (Object.create + ? function (e, t, n, i) { + void 0 === i && (i = n) + var r = Object.getOwnPropertyDescriptor(t, n) + ;(r && !('get' in r ? !t.__esModule : r.writable || r.configurable)) || + (r = { + enumerable: !0, + get: function () { + return t[n] + }, + }), + Object.defineProperty(e, i, r) + } + : function (e, t, n, i) { + void 0 === i && (i = n), (e[i] = t[n]) + }), + r = + (this && this.__exportStar) || + function (e, t) { + for (var n in e) 'default' === n || Object.prototype.hasOwnProperty.call(t, n) || i(t, e, n) + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + r(n(2044), t), + r(n(3468), t) + }, + 2044: (e, t, n) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.MenuItem = void 0) + var i = n(351), + r = n(336), + o = (function () { + function MenuItem(e, t) { + ;(this._isEnabled = !0), (this.key = e), (this._value = t) + } + return ( + (MenuItem.prototype.click = function () { + this.isEnabled && this.onClick && this.onClick(this) + }), + (MenuItem.prototype.updateCssClasses = function () { + if (this._element) { + var e = this._hostConfig ? this._hostConfig : i.defaultHostConfig + ;(this._element.className = e.makeCssClassName('ac-ctrl')), + this._element.classList.add( + e.makeCssClassName(this.isEnabled ? 'ac-ctrl-dropdown-item' : 'ac-ctrl-dropdown-item-disabled'), + ), + this.isEnabled || this._element.classList.add(e.makeCssClassName('ac-disabled')) + } + }), + (MenuItem.prototype.toString = function () { + return this.value + }), + (MenuItem.prototype.render = function (e) { + var t = this + return ( + (this._hostConfig = e), + this._element || + ((this._element = document.createElement('span')), + (this._element.innerText = this.value), + this._element.setAttribute('role', 'menuitem'), + this.isEnabled || this._element.setAttribute('aria-disabled', 'true'), + this._element.setAttribute('aria-current', 'false'), + (this._element.onmouseup = function (e) { + t.click() + }), + (this._element.onkeydown = function (e) { + e.key === r.Constants.keys.enter && ((e.cancelBubble = !0), t.click()) + }), + this.updateCssClasses()), + this._element + ) + }), + Object.defineProperty(MenuItem.prototype, 'value', { + get: function () { + return this._value + }, + set: function (e) { + ;(this._value = e), this._element && (this._element.innerText = e) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(MenuItem.prototype, 'isEnabled', { + get: function () { + return this._isEnabled + }, + set: function (e) { + this._isEnabled !== e && ((this._isEnabled = e), this.updateCssClasses()) + }, + enumerable: !1, + configurable: !0, + }), + MenuItem + ) + })() + t.MenuItem = o + }, + 9985: (e, t, n) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.PopupControl = void 0) + var i = n(336), + r = n(7794), + o = n(351), + s = (function () { + function PopupControl() { + this._isOpen = !1 + } + return ( + (PopupControl.prototype.keyDown = function (e) { + if (e.key === i.Constants.keys.escape) this.closePopup(!0) + }), + (PopupControl.prototype.render = function (e) { + var t = this, + n = document.createElement('div') + return ( + (n.tabIndex = 0), + (n.className = this.hostConfig.makeCssClassName('ac-ctrl', 'ac-ctrl-popup-container')), + n.setAttribute('role', 'dialog'), + n.setAttribute('aria-modal', 'true'), + (n.onkeydown = function (e) { + return t.keyDown(e), !e.cancelBubble + }), + n.appendChild(this.renderContent()), + n + ) + }), + (PopupControl.prototype.focus = function () { + this._popupElement && this._popupElement.firstElementChild.focus() + }), + (PopupControl.prototype.popup = function (e) { + var t, + n, + i, + o, + s, + a = this + if (!this._isOpen) { + ;(this._overlayElement = document.createElement('div')), + (this._overlayElement.className = this.hostConfig.makeCssClassName('ac-ctrl-overlay')), + (this._overlayElement.tabIndex = 0), + (this._overlayElement.style.width = document.documentElement.scrollWidth + 'px'), + (this._overlayElement.style.height = document.documentElement.scrollHeight + 'px'), + (this._overlayElement.onfocus = function (e) { + a.closePopup(!0) + }), + document.body.appendChild(this._overlayElement) + var l = e.getBoundingClientRect() + ;(this._popupElement = this.render(l)), + (t = this._popupElement.classList).remove.apply( + t, + this.hostConfig.makeCssClassNames( + 'ac-ctrl-slide', + 'ac-ctrl-slideLeftToRight', + 'ac-ctrl-slideRightToLeft', + 'ac-ctrl-slideTopToBottom', + 'ac-ctrl-slideRightToLeft', + ), + ), + window.addEventListener('resize', function (e) { + a.closePopup(!0) + }) + var c = e.getAttribute('aria-label') + c && this._popupElement.setAttribute('aria-label', c), + this._overlayElement.appendChild(this._popupElement) + var d, + p = this._popupElement.getBoundingClientRect(), + u = window.innerHeight - l.bottom, + h = l.top, + m = window.innerWidth - l.right, + g = l.left, + _ = l.left + r.getScrollX() + if (h < p.height && u < p.height) { + var f = Math.min(p.height, window.innerHeight) + if ( + ((this._popupElement.style.maxHeight = f + 'px'), + (d = f < p.height ? r.getScrollY() : r.getScrollY() + l.top + (l.height - f) / 2), + g < p.width && m < p.width) + ) { + var y = Math.min(p.width, window.innerWidth) + ;(this._popupElement.style.maxWidth = y + 'px'), + (_ = y < p.width ? r.getScrollX() : r.getScrollX() + l.left + (l.width - y) / 2) + } else + m >= p.width + ? ((_ = r.getScrollX() + l.right), + (n = this._popupElement.classList).add.apply( + n, + this.hostConfig.makeCssClassNames('ac-ctrl-slide', 'ac-ctrl-slideLeftToRight'), + )) + : ((_ = r.getScrollX() + l.left - p.width), + (i = this._popupElement.classList).add.apply( + i, + this.hostConfig.makeCssClassNames('ac-ctrl-slide', 'ac-ctrl-slideRightToLeft'), + )) + } else + u >= p.height + ? ((d = r.getScrollY() + l.bottom), + (o = this._popupElement.classList).add.apply( + o, + this.hostConfig.makeCssClassNames('ac-ctrl-slide', 'ac-ctrl-slideTopToBottom'), + )) + : ((d = r.getScrollY() + l.top - p.height), + (s = this._popupElement.classList).add.apply( + s, + this.hostConfig.makeCssClassNames('ac-ctrl-slide', 'ac-ctrl-slideBottomToTop'), + )), + m < p.width && (_ = r.getScrollX() + l.right - p.width) + ;(this._popupElement.style.left = _ + 'px'), + (this._popupElement.style.top = d + 'px'), + this._popupElement.focus(), + (this._isOpen = !0) + } + }), + (PopupControl.prototype.closePopup = function (e) { + this._isOpen && + (document.body.removeChild(this._overlayElement), + (this._isOpen = !1), + this.onClose && this.onClose(this, e)) + }), + Object.defineProperty(PopupControl.prototype, 'hostConfig', { + get: function () { + return this._hostConfig ? this._hostConfig : o.defaultHostConfig + }, + set: function (e) { + this._hostConfig = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(PopupControl.prototype, 'isOpen', { + get: function () { + return this._isOpen + }, + enumerable: !1, + configurable: !0, + }), + PopupControl + ) + })() + t.PopupControl = s + }, + 3468: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.PopupMenu = void 0) + var o = n(336), + s = n(8607), + a = (function (e) { + function PopupMenu() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._items = new s.Collection()), (t._renderedItems = []), (t._selectedIndex = -1), t + } + return ( + r(PopupMenu, e), + (PopupMenu.prototype.renderContent = function () { + var e = document.createElement('div') + ;(e.className = this.hostConfig.makeCssClassName('ac-ctrl ac-popup')), e.setAttribute('role', 'listbox') + for (var t = 0; t < this._items.length; t++) { + var n = this._items.get(t).render(this.hostConfig) + ;(n.tabIndex = 0), + e.appendChild(n), + t === this.selectedIndex && n.focus(), + this._renderedItems.push(n) + } + return e + }), + (PopupMenu.prototype.keyDown = function (t) { + e.prototype.keyDown.call(this, t) + var n = this._selectedIndex + switch (t.key) { + case o.Constants.keys.tab: + this.closePopup(!0) + break + case o.Constants.keys.up: + ;(n <= 0 || --n < 0) && (n = this._renderedItems.length - 1), + (this.selectedIndex = n), + (t.cancelBubble = !0) + break + case o.Constants.keys.down: + ;(n < 0 || ++n >= this._renderedItems.length) && (n = 0), + (this.selectedIndex = n), + (t.cancelBubble = !0) + } + }), + Object.defineProperty(PopupMenu.prototype, 'items', { + get: function () { + return this._items + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(PopupMenu.prototype, 'selectedIndex', { + get: function () { + return this._selectedIndex + }, + set: function (e) { + e >= 0 && + e < this._renderedItems.length && + (this._renderedItems[e].focus(), (this._selectedIndex = e)) + }, + enumerable: !1, + configurable: !0, + }), + PopupMenu + ) + })(n(9985).PopupControl) + t.PopupMenu = a + }, + 9003: (e, t) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.CarouselInteractionEvent = + t.LogLevel = + t.RefreshMode = + t.TypeErrorType = + t.ContainerFitStatus = + t.ValidationEvent = + t.ValidationPhase = + t.InputTextStyle = + t.ActionIconPlacement = + t.FillMode = + t.Orientation = + t.ShowCardActionMode = + t.ImageStyle = + t.ActionAlignment = + t.VerticalAlignment = + t.HorizontalAlignment = + t.TextColor = + t.Spacing = + t.FontType = + t.TextWeight = + t.TextSize = + t.SizeUnit = + t.ImageSize = + t.Size = + t.ActionMode = + t.ActionStyle = + t.ContainerStyle = + void 0) + var n = (function () { + function ContainerStyle() {} + return ( + (ContainerStyle.Default = 'default'), + (ContainerStyle.Emphasis = 'emphasis'), + (ContainerStyle.Accent = 'accent'), + (ContainerStyle.Good = 'good'), + (ContainerStyle.Attention = 'attention'), + (ContainerStyle.Warning = 'warning'), + ContainerStyle + ) + })() + t.ContainerStyle = n + var i = (function () { + function ActionStyle() {} + return ( + (ActionStyle.Default = 'default'), + (ActionStyle.Positive = 'positive'), + (ActionStyle.Destructive = 'destructive'), + ActionStyle + ) + })() + t.ActionStyle = i + var r = (function () { + function ActionMode() {} + return (ActionMode.Primary = 'primary'), (ActionMode.Secondary = 'secondary'), ActionMode + })() + ;(t.ActionMode = r), + (function (e) { + ;(e[(e.Auto = 0)] = 'Auto'), + (e[(e.Stretch = 1)] = 'Stretch'), + (e[(e.Small = 2)] = 'Small'), + (e[(e.Medium = 3)] = 'Medium'), + (e[(e.Large = 4)] = 'Large') + })(t.Size || (t.Size = {})), + (function (e) { + ;(e[(e.Small = 0)] = 'Small'), (e[(e.Medium = 1)] = 'Medium'), (e[(e.Large = 2)] = 'Large') + })(t.ImageSize || (t.ImageSize = {})), + (function (e) { + ;(e[(e.Weight = 0)] = 'Weight'), (e[(e.Pixel = 1)] = 'Pixel') + })(t.SizeUnit || (t.SizeUnit = {})), + (function (e) { + ;(e[(e.Small = 0)] = 'Small'), + (e[(e.Default = 1)] = 'Default'), + (e[(e.Medium = 2)] = 'Medium'), + (e[(e.Large = 3)] = 'Large'), + (e[(e.ExtraLarge = 4)] = 'ExtraLarge') + })(t.TextSize || (t.TextSize = {})), + (function (e) { + ;(e[(e.Lighter = 0)] = 'Lighter'), (e[(e.Default = 1)] = 'Default'), (e[(e.Bolder = 2)] = 'Bolder') + })(t.TextWeight || (t.TextWeight = {})), + (function (e) { + ;(e[(e.Default = 0)] = 'Default'), (e[(e.Monospace = 1)] = 'Monospace') + })(t.FontType || (t.FontType = {})), + (function (e) { + ;(e[(e.None = 0)] = 'None'), + (e[(e.Small = 1)] = 'Small'), + (e[(e.Default = 2)] = 'Default'), + (e[(e.Medium = 3)] = 'Medium'), + (e[(e.Large = 4)] = 'Large'), + (e[(e.ExtraLarge = 5)] = 'ExtraLarge'), + (e[(e.Padding = 6)] = 'Padding') + })(t.Spacing || (t.Spacing = {})), + (function (e) { + ;(e[(e.Default = 0)] = 'Default'), + (e[(e.Dark = 1)] = 'Dark'), + (e[(e.Light = 2)] = 'Light'), + (e[(e.Accent = 3)] = 'Accent'), + (e[(e.Good = 4)] = 'Good'), + (e[(e.Warning = 5)] = 'Warning'), + (e[(e.Attention = 6)] = 'Attention') + })(t.TextColor || (t.TextColor = {})), + (function (e) { + ;(e[(e.Left = 0)] = 'Left'), (e[(e.Center = 1)] = 'Center'), (e[(e.Right = 2)] = 'Right') + })(t.HorizontalAlignment || (t.HorizontalAlignment = {})), + (function (e) { + ;(e[(e.Top = 0)] = 'Top'), (e[(e.Center = 1)] = 'Center'), (e[(e.Bottom = 2)] = 'Bottom') + })(t.VerticalAlignment || (t.VerticalAlignment = {})), + (function (e) { + ;(e[(e.Left = 0)] = 'Left'), + (e[(e.Center = 1)] = 'Center'), + (e[(e.Right = 2)] = 'Right'), + (e[(e.Stretch = 3)] = 'Stretch') + })(t.ActionAlignment || (t.ActionAlignment = {})), + (function (e) { + ;(e[(e.Default = 0)] = 'Default'), (e[(e.Person = 1)] = 'Person') + })(t.ImageStyle || (t.ImageStyle = {})), + (function (e) { + ;(e[(e.Inline = 0)] = 'Inline'), (e[(e.Popup = 1)] = 'Popup') + })(t.ShowCardActionMode || (t.ShowCardActionMode = {})), + (function (e) { + ;(e[(e.Horizontal = 0)] = 'Horizontal'), (e[(e.Vertical = 1)] = 'Vertical') + })(t.Orientation || (t.Orientation = {})), + (function (e) { + ;(e[(e.Cover = 0)] = 'Cover'), + (e[(e.RepeatHorizontally = 1)] = 'RepeatHorizontally'), + (e[(e.RepeatVertically = 2)] = 'RepeatVertically'), + (e[(e.Repeat = 3)] = 'Repeat') + })(t.FillMode || (t.FillMode = {})), + (function (e) { + ;(e[(e.LeftOfTitle = 0)] = 'LeftOfTitle'), (e[(e.AboveTitle = 1)] = 'AboveTitle') + })(t.ActionIconPlacement || (t.ActionIconPlacement = {})), + (function (e) { + ;(e[(e.Text = 0)] = 'Text'), + (e[(e.Tel = 1)] = 'Tel'), + (e[(e.Url = 2)] = 'Url'), + (e[(e.Email = 3)] = 'Email'), + (e[(e.Password = 4)] = 'Password') + })(t.InputTextStyle || (t.InputTextStyle = {})), + (function (e) { + ;(e[(e.Parse = 0)] = 'Parse'), (e[(e.ToJSON = 1)] = 'ToJSON'), (e[(e.Validation = 2)] = 'Validation') + })(t.ValidationPhase || (t.ValidationPhase = {})), + (function (e) { + ;(e[(e.Hint = 0)] = 'Hint'), + (e[(e.ActionTypeNotAllowed = 1)] = 'ActionTypeNotAllowed'), + (e[(e.CollectionCantBeEmpty = 2)] = 'CollectionCantBeEmpty'), + (e[(e.Deprecated = 3)] = 'Deprecated'), + (e[(e.ElementTypeNotAllowed = 4)] = 'ElementTypeNotAllowed'), + (e[(e.InteractivityNotAllowed = 5)] = 'InteractivityNotAllowed'), + (e[(e.InvalidPropertyValue = 6)] = 'InvalidPropertyValue'), + (e[(e.MissingCardType = 7)] = 'MissingCardType'), + (e[(e.PropertyCantBeNull = 8)] = 'PropertyCantBeNull'), + (e[(e.TooManyActions = 9)] = 'TooManyActions'), + (e[(e.UnknownActionType = 10)] = 'UnknownActionType'), + (e[(e.UnknownElementType = 11)] = 'UnknownElementType'), + (e[(e.UnsupportedCardVersion = 12)] = 'UnsupportedCardVersion'), + (e[(e.DuplicateId = 13)] = 'DuplicateId'), + (e[(e.UnsupportedProperty = 14)] = 'UnsupportedProperty'), + (e[(e.RequiredInputsShouldHaveLabel = 15)] = 'RequiredInputsShouldHaveLabel'), + (e[(e.RequiredInputsShouldHaveErrorMessage = 16)] = 'RequiredInputsShouldHaveErrorMessage'), + (e[(e.Other = 17)] = 'Other') + })(t.ValidationEvent || (t.ValidationEvent = {})), + (function (e) { + ;(e[(e.FullyInContainer = 0)] = 'FullyInContainer'), + (e[(e.Overflowing = 1)] = 'Overflowing'), + (e[(e.FullyOutOfContainer = 2)] = 'FullyOutOfContainer') + })(t.ContainerFitStatus || (t.ContainerFitStatus = {})), + (function (e) { + ;(e[(e.UnknownType = 0)] = 'UnknownType'), (e[(e.ForbiddenType = 1)] = 'ForbiddenType') + })(t.TypeErrorType || (t.TypeErrorType = {})), + (function (e) { + ;(e[(e.Disabled = 0)] = 'Disabled'), (e[(e.Manual = 1)] = 'Manual'), (e[(e.Automatic = 2)] = 'Automatic') + })(t.RefreshMode || (t.RefreshMode = {})), + (function (e) { + ;(e[(e.Info = 0)] = 'Info'), (e[(e.Warning = 1)] = 'Warning'), (e[(e.Error = 2)] = 'Error') + })(t.LogLevel || (t.LogLevel = {})), + (function (e) { + ;(e[(e.NavigationNext = 0)] = 'NavigationNext'), + (e[(e.NavigationPrevious = 1)] = 'NavigationPrevious'), + (e[(e.Pagination = 2)] = 'Pagination'), + (e[(e.Autoplay = 3)] = 'Autoplay') + })(t.CarouselInteractionEvent || (t.CarouselInteractionEvent = {})) + }, + 9779: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.HostCapabilities = void 0) + var o = n(2421), + s = (function (e) { + function HostCapabilities() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._capabilities = {}), t + } + return ( + r(HostCapabilities, e), + (HostCapabilities.prototype.getSchemaKey = function () { + return 'HostCapabilities' + }), + (HostCapabilities.prototype.internalParse = function (t, n) { + if ((e.prototype.internalParse.call(this, t, n), t)) + for (var i in t) { + var r = t[i] + if ('string' == typeof r) + if ('*' === r) this.addCapability(i, '*') + else { + var s = o.Version.parse(r, n) + ;(null == s ? void 0 : s.isValid) && this.addCapability(i, s) + } + } + }), + (HostCapabilities.prototype.internalToJSON = function (t, n) { + for (var i in (e.prototype.internalToJSON.call(this, t, n), this._capabilities)) + t[i] = this._capabilities[i] + }), + (HostCapabilities.prototype.addCapability = function (e, t) { + this._capabilities[e] = t + }), + (HostCapabilities.prototype.removeCapability = function (e) { + delete this._capabilities[e] + }), + (HostCapabilities.prototype.clear = function () { + this._capabilities = {} + }), + (HostCapabilities.prototype.hasCapability = function (e, t) { + return ( + !!this._capabilities.hasOwnProperty(e) && + ('*' === t || '*' === this._capabilities[e] || t.compareTo(this._capabilities[e]) <= 0) + ) + }), + (HostCapabilities.prototype.areAllMet = function (e) { + for (var t in this._capabilities) if (!e.hasCapability(t, this._capabilities[t])) return !1 + return !0 + }), + HostCapabilities + ) + })(o.SerializableObject) + t.HostCapabilities = s + }, + 351: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.defaultHostConfig = + t.HostConfig = + t.CarouselConfig = + t.FontTypeSet = + t.FontTypeDefinition = + t.ContainerStyleSet = + t.ContainerStyleDefinition = + t.ColorSetDefinition = + t.ActionsConfig = + t.ShowCardActionConfig = + t.FactSetConfig = + t.FactTitleDefinition = + t.FactTextDefinition = + t.InputConfig = + t.InputLabelConfig = + t.RequiredInputLabelTextDefinition = + t.TextBlockConfig = + t.TextStyleSet = + t.TextStyleDefinition = + t.BaseTextDefinition = + t.TableConfig = + t.MediaConfig = + t.ImageSetConfig = + t.AdaptiveCardConfig = + t.TextColorDefinition = + t.ColorDefinition = + void 0) + var o = n(9003), + s = n(7794), + a = n(8418), + l = n(9779) + function parseHostConfigEnum(e, t, n) { + if ('string' == typeof t) { + var i = s.parseEnum(e, t, n) + return void 0 !== i ? i : n + } + return 'number' == typeof t ? t : n + } + var c = (function () { + function ColorDefinition(e, t) { + ;(this.default = '#000000'), (this.subtle = '#666666'), e && (this.default = e), t && (this.subtle = t) + } + return ( + (ColorDefinition.prototype.parse = function (e) { + e && ((this.default = e.default || this.default), (this.subtle = e.subtle || this.subtle)) + }), + ColorDefinition + ) + })() + t.ColorDefinition = c + var d = (function (e) { + function TextColorDefinition() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.highlightColors = new c('#22000000', '#11000000')), t + } + return ( + r(TextColorDefinition, e), + (TextColorDefinition.prototype.parse = function (t) { + e.prototype.parse.call(this, t), t && this.highlightColors.parse(t.highlightColors) + }), + TextColorDefinition + ) + })(c) + t.TextColorDefinition = d + var AdaptiveCardConfig = function (e) { + ;(this.allowCustomStyle = !1), e && (this.allowCustomStyle = e.allowCustomStyle || this.allowCustomStyle) + } + t.AdaptiveCardConfig = AdaptiveCardConfig + var p = (function () { + function ImageSetConfig(e) { + ;(this.imageSize = o.Size.Medium), + (this.maxImageHeight = 100), + e && + ((this.imageSize = null != e.imageSize ? e.imageSize : this.imageSize), + (this.maxImageHeight = s.parseNumber(e.maxImageHeight, 100))) + } + return ( + (ImageSetConfig.prototype.toJSON = function () { + return { + imageSize: o.Size[this.imageSize], + maxImageHeight: this.maxImageHeight, + } + }), + ImageSetConfig + ) + })() + t.ImageSetConfig = p + var u = (function () { + function MediaConfig(e) { + ;(this.allowInlinePlayback = !0), + e && + ((this.defaultPoster = e.defaultPoster), + (this.allowInlinePlayback = e.allowInlinePlayback || this.allowInlinePlayback)) + } + return ( + (MediaConfig.prototype.toJSON = function () { + return { + defaultPoster: this.defaultPoster, + allowInlinePlayback: this.allowInlinePlayback, + } + }), + MediaConfig + ) + })() + t.MediaConfig = u + var h = (function () { + function TableConfig(e) { + ;(this.cellSpacing = 8), + e && + (this.cellSpacing = + e.cellSpacing && 'number' == typeof e.cellSpacing ? e.cellSpacing : this.cellSpacing) + } + return ( + (TableConfig.prototype.toJSON = function () { + return { + cellSpacing: this.cellSpacing, + } + }), + TableConfig + ) + })() + t.TableConfig = h + var m = (function () { + function BaseTextDefinition(e) { + ;(this.size = o.TextSize.Default), + (this.color = o.TextColor.Default), + (this.isSubtle = !1), + (this.weight = o.TextWeight.Default), + this.parse(e) + } + return ( + (BaseTextDefinition.prototype.parse = function (e) { + e && + ((this.size = parseHostConfigEnum(o.TextSize, e.size, this.size)), + (this.color = parseHostConfigEnum(o.TextColor, e.color, this.color)), + (this.isSubtle = void 0 !== e.isSubtle && 'boolean' == typeof e.isSubtle ? e.isSubtle : this.isSubtle), + (this.weight = parseHostConfigEnum(o.TextWeight, e.weight, this.getDefaultWeight()))) + }), + (BaseTextDefinition.prototype.getDefaultWeight = function () { + return o.TextWeight.Default + }), + (BaseTextDefinition.prototype.toJSON = function () { + return { + size: o.TextSize[this.size], + color: o.TextColor[this.color], + isSubtle: this.isSubtle, + weight: o.TextWeight[this.weight], + } + }), + BaseTextDefinition + ) + })() + t.BaseTextDefinition = m + var g = (function (e) { + function TextStyleDefinition() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.fontType = o.FontType.Default), t + } + return ( + r(TextStyleDefinition, e), + (TextStyleDefinition.prototype.parse = function (t) { + e.prototype.parse.call(this, t), + t && (this.fontType = parseHostConfigEnum(o.FontType, t.fontType, this.fontType)) + }), + TextStyleDefinition + ) + })(m) + t.TextStyleDefinition = g + var _ = (function () { + function TextStyleSet(e) { + ;(this.default = new g()), + (this.heading = new g({ + size: 'Large', + weight: 'Bolder', + })), + (this.columnHeader = new g({ + weight: 'Bolder', + })), + e && (this.heading.parse(e.heading), this.columnHeader.parse(e.columnHeader)) + } + return ( + (TextStyleSet.prototype.getStyleByName = function (e) { + switch (e.toLowerCase()) { + case 'heading': + return this.heading + case 'columnHeader': + return this.columnHeader + default: + return this.default + } + }), + TextStyleSet + ) + })() + t.TextStyleSet = _ + var TextBlockConfig = function (e) { + e && (this.headingLevel = s.parseNumber(e.headingLevel)) + } + t.TextBlockConfig = TextBlockConfig + var f = (function (e) { + function RequiredInputLabelTextDefinition() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.suffix = ' *'), (t.suffixColor = o.TextColor.Attention), t + } + return ( + r(RequiredInputLabelTextDefinition, e), + (RequiredInputLabelTextDefinition.prototype.parse = function (t) { + e.prototype.parse.call(this, t), + t && + ((this.suffix = t.suffix || this.suffix), + (this.suffixColor = parseHostConfigEnum(o.TextColor, t.suffixColor, this.suffixColor))) + }), + (RequiredInputLabelTextDefinition.prototype.toJSON = function () { + var t = e.prototype.toJSON.call(this) + return (t.suffix = this.suffix), (t.suffixColor = o.TextColor[this.suffixColor]), t + }), + RequiredInputLabelTextDefinition + ) + })(m) + t.RequiredInputLabelTextDefinition = f + var InputLabelConfig = function (e) { + ;(this.inputSpacing = o.Spacing.Small), + (this.requiredInputs = new f()), + (this.optionalInputs = new m()), + e && + ((this.inputSpacing = parseHostConfigEnum(o.Spacing, e.inputSpacing, this.inputSpacing)), + (this.requiredInputs = new f(e.requiredInputs)), + (this.optionalInputs = new m(e.optionalInputs))) + } + t.InputLabelConfig = InputLabelConfig + var InputConfig = function (e) { + ;(this.label = new InputLabelConfig()), + (this.errorMessage = new m({ + color: o.TextColor.Attention, + })), + e && ((this.label = new InputLabelConfig(e.label)), (this.errorMessage = new m(e.errorMessage))) + } + t.InputConfig = InputConfig + var y = (function (e) { + function FactTextDefinition() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.wrap = !0), t + } + return ( + r(FactTextDefinition, e), + (FactTextDefinition.prototype.parse = function (t) { + e.prototype.parse.call(this, t), t && (this.wrap = null != t.wrap ? t.wrap : this.wrap) + }), + (FactTextDefinition.prototype.toJSON = function () { + var t = e.prototype.toJSON.call(this) + return (t.wrap = this.wrap), t + }), + FactTextDefinition + ) + })(m) + t.FactTextDefinition = y + var v = (function (e) { + function FactTitleDefinition(t) { + var n = e.call(this, t) || this + return ( + (n.maxWidth = 150), + (n.weight = o.TextWeight.Bolder), + t && + ((n.maxWidth = null != t.maxWidth ? t.maxWidth : n.maxWidth), + (n.weight = parseHostConfigEnum(o.TextWeight, t.weight, o.TextWeight.Bolder))), + n + ) + } + return ( + r(FactTitleDefinition, e), + (FactTitleDefinition.prototype.getDefaultWeight = function () { + return o.TextWeight.Bolder + }), + FactTitleDefinition + ) + })(y) + t.FactTitleDefinition = v + var FactSetConfig = function (e) { + ;(this.title = new v()), + (this.value = new y()), + (this.spacing = 10), + e && + ((this.title = new v(e.title)), + (this.value = new y(e.value)), + (this.spacing = e.spacing && null != e.spacing ? e.spacing && e.spacing : this.spacing)) + } + t.FactSetConfig = FactSetConfig + var b = (function () { + function ShowCardActionConfig(e) { + ;(this.actionMode = o.ShowCardActionMode.Inline), + (this.inlineTopMargin = 16), + (this.style = o.ContainerStyle.Emphasis), + e && + ((this.actionMode = parseHostConfigEnum( + o.ShowCardActionMode, + e.actionMode, + o.ShowCardActionMode.Inline, + )), + (this.inlineTopMargin = null != e.inlineTopMargin ? e.inlineTopMargin : this.inlineTopMargin), + (this.style = e.style && 'string' == typeof e.style ? e.style : o.ContainerStyle.Emphasis)) + } + return ( + (ShowCardActionConfig.prototype.toJSON = function () { + return { + actionMode: o.ShowCardActionMode[this.actionMode], + inlineTopMargin: this.inlineTopMargin, + style: this.style, + } + }), + ShowCardActionConfig + ) + })() + t.ShowCardActionConfig = b + var S = (function () { + function ActionsConfig(e) { + if ( + ((this.maxActions = 5), + (this.spacing = o.Spacing.Default), + (this.buttonSpacing = 20), + (this.showCard = new b()), + (this.preExpandSingleShowCardAction = !1), + (this.actionsOrientation = o.Orientation.Horizontal), + (this.actionAlignment = o.ActionAlignment.Left), + (this.iconPlacement = o.ActionIconPlacement.LeftOfTitle), + (this.allowTitleToWrap = !1), + (this.iconSize = 16), + e) + ) { + ;(this.maxActions = null != e.maxActions ? e.maxActions : this.maxActions), + (this.spacing = parseHostConfigEnum(o.Spacing, e.spacing && e.spacing, o.Spacing.Default)), + (this.buttonSpacing = null != e.buttonSpacing ? e.buttonSpacing : this.buttonSpacing), + (this.showCard = new b(e.showCard)), + (this.preExpandSingleShowCardAction = s.parseBool(e.preExpandSingleShowCardAction, !1)), + (this.actionsOrientation = parseHostConfigEnum( + o.Orientation, + e.actionsOrientation, + o.Orientation.Horizontal, + )), + (this.actionAlignment = parseHostConfigEnum( + o.ActionAlignment, + e.actionAlignment, + o.ActionAlignment.Left, + )), + (this.iconPlacement = parseHostConfigEnum( + o.ActionIconPlacement, + e.iconPlacement, + o.ActionIconPlacement.LeftOfTitle, + )), + (this.allowTitleToWrap = null != e.allowTitleToWrap ? e.allowTitleToWrap : this.allowTitleToWrap) + try { + var t = a.SizeAndUnit.parse(e.iconSize) + t.unit === o.SizeUnit.Pixel && (this.iconSize = t.physicalSize) + } catch (e) {} + } + } + return ( + (ActionsConfig.prototype.toJSON = function () { + return { + maxActions: this.maxActions, + spacing: o.Spacing[this.spacing], + buttonSpacing: this.buttonSpacing, + showCard: this.showCard, + preExpandSingleShowCardAction: this.preExpandSingleShowCardAction, + actionsOrientation: o.Orientation[this.actionsOrientation], + actionAlignment: o.ActionAlignment[this.actionAlignment], + } + }), + ActionsConfig + ) + })() + t.ActionsConfig = S + var C = (function () { + function ColorSetDefinition(e) { + ;(this.default = new d()), + (this.dark = new d()), + (this.light = new d()), + (this.accent = new d()), + (this.good = new d()), + (this.warning = new d()), + (this.attention = new d()), + this.parse(e) + } + return ( + (ColorSetDefinition.prototype.parseSingleColor = function (e, t) { + e && this[t].parse(e[t]) + }), + (ColorSetDefinition.prototype.parse = function (e) { + e && + (this.parseSingleColor(e, 'default'), + this.parseSingleColor(e, 'dark'), + this.parseSingleColor(e, 'light'), + this.parseSingleColor(e, 'accent'), + this.parseSingleColor(e, 'good'), + this.parseSingleColor(e, 'warning'), + this.parseSingleColor(e, 'attention')) + }), + ColorSetDefinition + ) + })() + t.ColorSetDefinition = C + var E = (function () { + function ContainerStyleDefinition(e) { + ;(this.foregroundColors = new C({ + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#E69500', + subtle: '#DDE69500', + }, + attention: { + default: '#CC3300', + subtle: '#DDCC3300', + }, + })), + this.parse(e) + } + return ( + (ContainerStyleDefinition.prototype.parse = function (e) { + e && + ((this.backgroundColor = e.backgroundColor), + this.foregroundColors.parse(e.foregroundColors), + (this.highlightBackgroundColor = e.highlightBackgroundColor), + (this.highlightForegroundColor = e.highlightForegroundColor), + (this.borderColor = e.borderColor)) + }), + Object.defineProperty(ContainerStyleDefinition.prototype, 'isBuiltIn', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + ContainerStyleDefinition + ) + })() + t.ContainerStyleDefinition = E + var T = (function (e) { + function BuiltInContainerStyleDefinition() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(BuiltInContainerStyleDefinition, e), + Object.defineProperty(BuiltInContainerStyleDefinition.prototype, 'isBuiltIn', { + get: function () { + return !0 + }, + enumerable: !1, + configurable: !0, + }), + BuiltInContainerStyleDefinition + ) + })(E), + I = (function () { + function ContainerStyleSet(e) { + if ( + ((this._allStyles = {}), + (this._allStyles[o.ContainerStyle.Default] = new T()), + (this._allStyles[o.ContainerStyle.Emphasis] = new T()), + (this._allStyles[o.ContainerStyle.Accent] = new T()), + (this._allStyles[o.ContainerStyle.Good] = new T()), + (this._allStyles[o.ContainerStyle.Attention] = new T()), + (this._allStyles[o.ContainerStyle.Warning] = new T()), + e) + ) { + this._allStyles[o.ContainerStyle.Default].parse(e[o.ContainerStyle.Default]), + this._allStyles[o.ContainerStyle.Emphasis].parse(e[o.ContainerStyle.Emphasis]), + this._allStyles[o.ContainerStyle.Accent].parse(e[o.ContainerStyle.Accent]), + this._allStyles[o.ContainerStyle.Good].parse(e[o.ContainerStyle.Good]), + this._allStyles[o.ContainerStyle.Attention].parse(e[o.ContainerStyle.Attention]), + this._allStyles[o.ContainerStyle.Warning].parse(e[o.ContainerStyle.Warning]) + var t = e.customStyles + if (t && Array.isArray(t)) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n] + if (r) { + var s = r.name + s && + 'string' == typeof s && + (this._allStyles.hasOwnProperty(s) + ? this._allStyles[s].parse(r.style) + : (this._allStyles[s] = new E(r.style))) + } + } + } + } + return ( + (ContainerStyleSet.prototype.toJSON = function () { + var e = this, + t = [] + Object.keys(this._allStyles).forEach(function (n) { + e._allStyles[n].isBuiltIn || + t.push({ + name: n, + style: e._allStyles[n], + }) + }) + var n = { + default: this.default, + emphasis: this.emphasis, + } + return t.length > 0 && (n.customStyles = t), n + }), + (ContainerStyleSet.prototype.getStyleByName = function (e, t) { + return e && this._allStyles.hasOwnProperty(e) + ? this._allStyles[e] + : t || this._allStyles[o.ContainerStyle.Default] + }), + Object.defineProperty(ContainerStyleSet.prototype, 'default', { + get: function () { + return this._allStyles[o.ContainerStyle.Default] + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ContainerStyleSet.prototype, 'emphasis', { + get: function () { + return this._allStyles[o.ContainerStyle.Emphasis] + }, + enumerable: !1, + configurable: !0, + }), + ContainerStyleSet + ) + })() + t.ContainerStyleSet = I + var w = (function () { + function FontTypeDefinition(e) { + ;(this.fontFamily = 'Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif'), + (this.fontSizes = { + small: 12, + default: 14, + medium: 17, + large: 21, + extraLarge: 26, + }), + (this.fontWeights = { + lighter: 200, + default: 400, + bolder: 600, + }), + e && (this.fontFamily = e) + } + return ( + (FontTypeDefinition.prototype.parse = function (e) { + ;(this.fontFamily = e.fontFamily || this.fontFamily), + (this.fontSizes = { + small: (e.fontSizes && e.fontSizes.small) || this.fontSizes.small, + default: (e.fontSizes && e.fontSizes.default) || this.fontSizes.default, + medium: (e.fontSizes && e.fontSizes.medium) || this.fontSizes.medium, + large: (e.fontSizes && e.fontSizes.large) || this.fontSizes.large, + extraLarge: (e.fontSizes && e.fontSizes.extraLarge) || this.fontSizes.extraLarge, + }), + (this.fontWeights = { + lighter: (e.fontWeights && e.fontWeights.lighter) || this.fontWeights.lighter, + default: (e.fontWeights && e.fontWeights.default) || this.fontWeights.default, + bolder: (e.fontWeights && e.fontWeights.bolder) || this.fontWeights.bolder, + }) + }), + (FontTypeDefinition.monospace = new FontTypeDefinition("'Courier New', Courier, monospace")), + FontTypeDefinition + ) + })() + t.FontTypeDefinition = w + var A = (function () { + function FontTypeSet(e) { + ;(this.default = new w()), + (this.monospace = new w("'Courier New', Courier, monospace")), + e && (this.default.parse(e.default), this.monospace.parse(e.monospace)) + } + return ( + (FontTypeSet.prototype.getStyleDefinition = function (e) { + switch (e) { + case o.FontType.Monospace: + return this.monospace + case o.FontType.Default: + default: + return this.default + } + }), + FontTypeSet + ) + })() + t.FontTypeSet = A + var R = (function () { + function CarouselConfig(e) { + ;(this.maxCarouselPages = 10), + (this.minAutoplayDelay = 5e3), + e && + ((this.maxCarouselPages = null != e.maxCarouselPages ? e.maxCarouselPages : this.maxCarouselPages), + (this.minAutoplayDelay = null != e.minAutoplayDelay ? e.minAutoplayDelay : this.minAutoplayDelay)) + } + return ( + (CarouselConfig.prototype.toJSON = function () { + return { + maxCarouselPages: this.maxCarouselPages, + minAutoplayDelay: this.minAutoplayDelay, + } + }), + CarouselConfig + ) + })() + t.CarouselConfig = R + var x = (function () { + function HostConfig(e) { + ;(this.hostCapabilities = new l.HostCapabilities()), + (this.choiceSetInputValueSeparator = ','), + (this.supportsInteractivity = !0), + (this.spacing = { + small: 3, + default: 8, + medium: 20, + large: 30, + extraLarge: 40, + padding: 15, + }), + (this.separator = { + lineThickness: 1, + lineColor: '#EEEEEE', + }), + (this.imageSizes = { + small: 40, + medium: 80, + large: 160, + }), + (this.containerStyles = new I()), + (this.inputs = new InputConfig()), + (this.actions = new S()), + (this.adaptiveCard = new AdaptiveCardConfig()), + (this.imageSet = new p()), + (this.media = new u()), + (this.factSet = new FactSetConfig()), + (this.table = new h()), + (this.textStyles = new _()), + (this.textBlock = new TextBlockConfig()), + (this.carousel = new R()), + (this.alwaysAllowBleed = !1), + e && + (('string' == typeof e || e instanceof String) && (e = JSON.parse(e)), + (this.choiceSetInputValueSeparator = + e && 'string' == typeof e.choiceSetInputValueSeparator + ? e.choiceSetInputValueSeparator + : this.choiceSetInputValueSeparator), + (this.supportsInteractivity = + e && 'boolean' == typeof e.supportsInteractivity + ? e.supportsInteractivity + : this.supportsInteractivity), + (this._legacyFontType = new w()), + this._legacyFontType.parse(e), + e.fontTypes && (this.fontTypes = new A(e.fontTypes)), + e.lineHeights && + (this.lineHeights = { + small: e.lineHeights.small, + default: e.lineHeights.default, + medium: e.lineHeights.medium, + large: e.lineHeights.large, + extraLarge: e.lineHeights.extraLarge, + }), + (this.imageSizes = { + small: (e.imageSizes && e.imageSizes.small) || this.imageSizes.small, + medium: (e.imageSizes && e.imageSizes.medium) || this.imageSizes.medium, + large: (e.imageSizes && e.imageSizes.large) || this.imageSizes.large, + }), + (this.containerStyles = new I(e.containerStyles)), + (this.spacing = { + small: (e.spacing && e.spacing.small) || this.spacing.small, + default: (e.spacing && e.spacing.default) || this.spacing.default, + medium: (e.spacing && e.spacing.medium) || this.spacing.medium, + large: (e.spacing && e.spacing.large) || this.spacing.large, + extraLarge: (e.spacing && e.spacing.extraLarge) || this.spacing.extraLarge, + padding: (e.spacing && e.spacing.padding) || this.spacing.padding, + }), + (this.separator = { + lineThickness: (e.separator && e.separator.lineThickness) || this.separator.lineThickness, + lineColor: (e.separator && e.separator.lineColor) || this.separator.lineColor, + }), + (this.inputs = new InputConfig(e.inputs || this.inputs)), + (this.actions = new S(e.actions || this.actions)), + (this.adaptiveCard = new AdaptiveCardConfig(e.adaptiveCard || this.adaptiveCard)), + (this.imageSet = new p(e.imageSet)), + (this.factSet = new FactSetConfig(e.factSet)), + (this.textStyles = new _(e.textStyles)), + (this.textBlock = new TextBlockConfig(e.textBlock)), + (this.carousel = new R(e.carousel))) + } + return ( + (HostConfig.prototype.getFontTypeDefinition = function (e) { + return this.fontTypes + ? this.fontTypes.getStyleDefinition(e) + : e === o.FontType.Monospace + ? w.monospace + : this._legacyFontType + }), + (HostConfig.prototype.getEffectiveSpacing = function (e) { + switch (e) { + case o.Spacing.Small: + return this.spacing.small + case o.Spacing.Default: + return this.spacing.default + case o.Spacing.Medium: + return this.spacing.medium + case o.Spacing.Large: + return this.spacing.large + case o.Spacing.ExtraLarge: + return this.spacing.extraLarge + case o.Spacing.Padding: + return this.spacing.padding + default: + return 0 + } + }), + (HostConfig.prototype.paddingDefinitionToSpacingDefinition = function (e) { + return new a.SpacingDefinition( + this.getEffectiveSpacing(e.top), + this.getEffectiveSpacing(e.right), + this.getEffectiveSpacing(e.bottom), + this.getEffectiveSpacing(e.left), + ) + }), + (HostConfig.prototype.makeCssClassNames = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t] + for (var n = [], i = 0, r = e; i < r.length; i++) { + var o = r[i] + n.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + '-' : '') + o) + } + return n + }), + (HostConfig.prototype.makeCssClassName = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t] + var n = this.makeCssClassNames.apply(this, e).join(' ') + return n || '' + }), + Object.defineProperty(HostConfig.prototype, 'fontFamily', { + get: function () { + return this._legacyFontType.fontFamily + }, + set: function (e) { + this._legacyFontType.fontFamily = e + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(HostConfig.prototype, 'fontSizes', { + get: function () { + return this._legacyFontType.fontSizes + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(HostConfig.prototype, 'fontWeights', { + get: function () { + return this._legacyFontType.fontWeights + }, + enumerable: !1, + configurable: !0, + }), + HostConfig + ) + })() + ;(t.HostConfig = x), + (t.defaultHostConfig = new x({ + supportsInteractivity: !0, + spacing: { + small: 10, + default: 20, + medium: 30, + large: 40, + extraLarge: 50, + padding: 20, + }, + separator: { + lineThickness: 1, + lineColor: '#EEEEEE', + }, + fontTypes: { + default: { + fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif", + fontSizes: { + small: 12, + default: 14, + medium: 17, + large: 21, + extraLarge: 26, + }, + fontWeights: { + lighter: 200, + default: 400, + bolder: 600, + }, + }, + monospace: { + fontFamily: "'Courier New', Courier, monospace", + fontSizes: { + small: 12, + default: 14, + medium: 17, + large: 21, + extraLarge: 26, + }, + fontWeights: { + lighter: 200, + default: 400, + bolder: 600, + }, + }, + }, + imageSizes: { + small: 40, + medium: 80, + large: 160, + }, + containerStyles: { + default: { + backgroundColor: '#FFFFFF', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + emphasis: { + backgroundColor: '#08000000', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + accent: { + backgroundColor: '#C7DEF9', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + good: { + backgroundColor: '#CCFFCC', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + attention: { + backgroundColor: '#FFC5B2', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + warning: { + backgroundColor: '#FFE2B2', + foregroundColors: { + default: { + default: '#333333', + subtle: '#EE333333', + }, + dark: { + default: '#000000', + subtle: '#66000000', + }, + light: { + default: '#FFFFFF', + subtle: '#33000000', + }, + accent: { + default: '#2E89FC', + subtle: '#882E89FC', + }, + attention: { + default: '#cc3300', + subtle: '#DDcc3300', + }, + good: { + default: '#028A02', + subtle: '#DD027502', + }, + warning: { + default: '#e69500', + subtle: '#DDe69500', + }, + }, + }, + }, + inputs: { + label: { + requiredInputs: { + weight: o.TextWeight.Bolder, + suffix: ' *', + suffixColor: o.TextColor.Attention, + }, + optionalInputs: { + weight: o.TextWeight.Bolder, + }, + }, + errorMessage: { + color: o.TextColor.Attention, + weight: o.TextWeight.Bolder, + }, + }, + actions: { + maxActions: 5, + spacing: o.Spacing.Default, + buttonSpacing: 10, + showCard: { + actionMode: o.ShowCardActionMode.Inline, + inlineTopMargin: 16, + }, + actionsOrientation: o.Orientation.Horizontal, + actionAlignment: o.ActionAlignment.Left, + }, + adaptiveCard: { + allowCustomStyle: !1, + }, + imageSet: { + imageSize: o.Size.Medium, + maxImageHeight: 100, + }, + factSet: { + title: { + color: o.TextColor.Default, + size: o.TextSize.Default, + isSubtle: !1, + weight: o.TextWeight.Bolder, + wrap: !0, + maxWidth: 150, + }, + value: { + color: o.TextColor.Default, + size: o.TextSize.Default, + isSubtle: !1, + weight: o.TextWeight.Default, + wrap: !0, + }, + spacing: 10, + }, + carousel: { + maxCarouselPages: 10, + minAutoplayDuration: 5e3, + }, + })) + }, + 9301: (e, t, n) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.GlobalRegistry = t.CardObjectRegistry = void 0) + var i = n(2421), + r = (function () { + function CardObjectRegistry() { + this._items = {} + } + return ( + (CardObjectRegistry.prototype.findByName = function (e) { + return this._items.hasOwnProperty(e) ? this._items[e] : void 0 + }), + (CardObjectRegistry.prototype.clear = function () { + this._items = {} + }), + (CardObjectRegistry.prototype.copyTo = function (e) { + for (var t = 0, n = Object.keys(this._items); t < n.length; t++) { + var i = n[t], + r = this._items[i] + e.register(r.typeName, r.objectType, r.schemaVersion) + } + }), + (CardObjectRegistry.prototype.register = function (e, t, n) { + void 0 === n && (n = i.Versions.v1_0) + var r = this.findByName(e) + void 0 !== r + ? (r.objectType = t) + : (r = { + typeName: e, + objectType: t, + schemaVersion: n, + }), + (this._items[e] = r) + }), + (CardObjectRegistry.prototype.unregister = function (e) { + delete this._items[e] + }), + (CardObjectRegistry.prototype.createInstance = function (e, t) { + var n = this.findByName(e) + return n && n.schemaVersion.compareTo(t) <= 0 ? new n.objectType() : void 0 + }), + (CardObjectRegistry.prototype.getItemCount = function () { + return Object.keys(this._items).length + }), + (CardObjectRegistry.prototype.getItemAt = function (e) { + var t = this + return Object.keys(this._items).map(function (e) { + return t._items[e] + })[e] + }), + CardObjectRegistry + ) + })() + t.CardObjectRegistry = r + var o = (function () { + function GlobalRegistry() {} + return ( + (GlobalRegistry.populateWithDefaultElements = function (e) { + e.clear(), GlobalRegistry.defaultElements.copyTo(e) + }), + (GlobalRegistry.populateWithDefaultActions = function (e) { + e.clear(), GlobalRegistry.defaultActions.copyTo(e) + }), + Object.defineProperty(GlobalRegistry, 'elements', { + get: function () { + return ( + GlobalRegistry._elements || + ((GlobalRegistry._elements = new r()), + GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements)), + GlobalRegistry._elements + ) + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(GlobalRegistry, 'actions', { + get: function () { + return ( + GlobalRegistry._actions || + ((GlobalRegistry._actions = new r()), + GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions)), + GlobalRegistry._actions + ) + }, + enumerable: !1, + configurable: !0, + }), + (GlobalRegistry.reset = function () { + ;(GlobalRegistry._elements = void 0), (GlobalRegistry._actions = void 0) + }), + (GlobalRegistry.defaultElements = new r()), + (GlobalRegistry.defaultActions = new r()), + GlobalRegistry + ) + })() + t.GlobalRegistry = o + }, + 2421: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.SerializableObject = + t.property = + t.SerializableObjectSchema = + t.CustomProperty = + t.SerializableObjectCollectionProperty = + t.SerializableObjectProperty = + t.EnumProperty = + t.ValueSetProperty = + t.StringArrayProperty = + t.PixelSizeProperty = + t.NumProperty = + t.BoolProperty = + t.StringProperty = + t.PropertyDefinition = + t.BaseSerializationContext = + t.isVersionLessOrEqual = + t.Versions = + t.Version = + void 0) + var o = n(8418), + s = n(7794), + a = n(9003), + l = n(6758), + c = (function () { + function Version(e, t, n) { + void 0 === e && (e = 1), + void 0 === t && (t = 1), + (this._isValid = !0), + (this._major = e), + (this._minor = t), + (this._label = n) + } + return ( + (Version.parse = function (e, t) { + if (e) { + var n = new Version() + n._versionString = e + var i = /(\d+).(\d+)/gi.exec(e) + return ( + null != i && 3 === i.length + ? ((n._major = parseInt(i[1])), (n._minor = parseInt(i[2]))) + : (n._isValid = !1), + n._isValid || + t.logParseEvent( + void 0, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidVersionString(n._versionString), + ), + n + ) + } + }), + (Version.prototype.toString = function () { + return this._isValid ? this._major + '.' + this._minor : this._versionString + }), + (Version.prototype.toJSON = function () { + return this.toString() + }), + (Version.prototype.compareTo = function (e) { + if (!this.isValid || !e.isValid) throw new Error('Cannot compare invalid version.') + return this.major > e.major + ? 1 + : this.major < e.major + ? -1 + : this.minor > e.minor + ? 1 + : this.minor < e.minor + ? -1 + : 0 + }), + Object.defineProperty(Version.prototype, 'label', { + get: function () { + return this._label ? this._label : this.toString() + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Version.prototype, 'major', { + get: function () { + return this._major + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Version.prototype, 'minor', { + get: function () { + return this._minor + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(Version.prototype, 'isValid', { + get: function () { + return this._isValid + }, + enumerable: !1, + configurable: !0, + }), + Version + ) + })() + t.Version = c + var d = (function () { + function Versions() {} + return ( + (Versions.getAllDeclaredVersions = function () { + var e = Versions, + t = [] + for (var n in e) + if (n.match(/^v[0-9_]*$/)) + try { + var i = e[n] + i instanceof c && t.push(i) + } catch (e) {} + return t.sort(function (e, t) { + return e.compareTo(t) + }) + }), + (Versions.v1_0 = new c(1, 0)), + (Versions.v1_1 = new c(1, 1)), + (Versions.v1_2 = new c(1, 2)), + (Versions.v1_3 = new c(1, 3)), + (Versions.v1_4 = new c(1, 4)), + (Versions.v1_5 = new c(1, 5)), + (Versions.v1_6 = new c(1, 6)), + (Versions.latest = Versions.v1_6), + Versions + ) + })() + ;(t.Versions = d), + (t.isVersionLessOrEqual = function (e, t) { + return !(e instanceof c) || !(t instanceof c) || t.compareTo(e) >= 0 + }) + var p = (function () { + function BaseSerializationContext(e) { + void 0 === e && (e = d.latest), (this._validationEvents = []), (this.targetVersion = e) + } + return ( + (BaseSerializationContext.prototype.serializeValue = function (e, t, n, i, r) { + void 0 === i && (i = void 0), + void 0 === r && (r = !1), + null == n || n === i + ? (o.GlobalSettings.enableFullJsonRoundTrip && !r) || delete e[t] + : n === i + ? delete e[t] + : (e[t] = n) + }), + (BaseSerializationContext.prototype.serializeString = function (e, t, n, i) { + null == n || n === i ? o.GlobalSettings.enableFullJsonRoundTrip || delete e[t] : (e[t] = n) + }), + (BaseSerializationContext.prototype.serializeBool = function (e, t, n, i) { + null == n || n === i ? o.GlobalSettings.enableFullJsonRoundTrip || delete e[t] : (e[t] = n) + }), + (BaseSerializationContext.prototype.serializeNumber = function (e, t, n, i) { + null == n || n === i || isNaN(n) ? o.GlobalSettings.enableFullJsonRoundTrip || delete e[t] : (e[t] = n) + }), + (BaseSerializationContext.prototype.serializeEnum = function (e, t, n, i, r) { + void 0 === r && (r = void 0), + null == i || i === r ? o.GlobalSettings.enableFullJsonRoundTrip || delete t[n] : (t[n] = e[i]) + }), + (BaseSerializationContext.prototype.serializeArray = function (e, t, n) { + var i = [] + if (n) + for (var r = 0, o = n; r < o.length; r++) { + var s = o[r], + a = void 0 + void 0 !== (a = s instanceof I ? s.toJSON(this) : s.toJSON ? s.toJSON() : s) && i.push(a) + } + 0 === i.length ? e.hasOwnProperty(t) && Array.isArray(e[t]) && delete e[t] : this.serializeValue(e, t, i) + }), + (BaseSerializationContext.prototype.clearEvents = function () { + this._validationEvents = [] + }), + (BaseSerializationContext.prototype.logEvent = function (e, t, n, i) { + this._validationEvents.push({ + source: e, + phase: t, + event: n, + message: i, + }) + }), + (BaseSerializationContext.prototype.logParseEvent = function (e, t, n) { + this.logEvent(e, a.ValidationPhase.Parse, t, n) + }), + (BaseSerializationContext.prototype.getEventAt = function (e) { + return this._validationEvents[e] + }), + Object.defineProperty(BaseSerializationContext.prototype, 'eventCount', { + get: function () { + return this._validationEvents.length + }, + enumerable: !1, + configurable: !0, + }), + BaseSerializationContext + ) + })() + t.BaseSerializationContext = p + var u = (function (e) { + function SimpleSerializationContext() { + return (null !== e && e.apply(this, arguments)) || this + } + return r(SimpleSerializationContext, e), SimpleSerializationContext + })(p), + h = (function () { + function PropertyDefinition(e, t, n, i) { + ;(this.targetVersion = e), + (this.name = t), + (this.defaultValue = n), + (this.onGetInitialValue = i), + (this.isSerializationEnabled = !0), + (this.sequentialNumber = PropertyDefinition._sequentialNumber), + PropertyDefinition._sequentialNumber++ + } + return ( + (PropertyDefinition.prototype.getInternalName = function () { + return this.name + }), + (PropertyDefinition.prototype.parse = function (e, t, n) { + return t[this.name] + }), + (PropertyDefinition.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, n, this.defaultValue) + }), + (PropertyDefinition._sequentialNumber = 0), + PropertyDefinition + ) + })() + t.PropertyDefinition = h + var m = (function (e) { + function StringProperty(t, n, i, r, o, s) { + void 0 === i && (i = !0) + var a = e.call(this, t, n, o, s) || this + return ( + (a.targetVersion = t), + (a.name = n), + (a.treatEmptyAsUndefined = i), + (a.regEx = r), + (a.defaultValue = o), + (a.onGetInitialValue = s), + a + ) + } + return ( + r(StringProperty, e), + (StringProperty.prototype.parse = function (e, t, n) { + var i = s.parseString(t[this.name], this.defaultValue) + if ( + !(void 0 === i || ('' === i && this.treatEmptyAsUndefined)) && + void 0 !== this.regEx && + !this.regEx.exec(i) + ) + return void n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidPropertyValue(i, this.name), + ) + return i + }), + (StringProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeString(t, this.name, '' === n && this.treatEmptyAsUndefined ? void 0 : n, this.defaultValue) + }), + StringProperty + ) + })(h) + t.StringProperty = m + var g = (function (e) { + function BoolProperty(t, n, i, r) { + var o = e.call(this, t, n, i, r) || this + return (o.targetVersion = t), (o.name = n), (o.defaultValue = i), (o.onGetInitialValue = r), o + } + return ( + r(BoolProperty, e), + (BoolProperty.prototype.parse = function (e, t, n) { + return s.parseBool(t[this.name], this.defaultValue) + }), + (BoolProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeBool(t, this.name, n, this.defaultValue) + }), + BoolProperty + ) + })(h) + t.BoolProperty = g + var _ = (function (e) { + function NumProperty(t, n, i, r) { + var o = e.call(this, t, n, i, r) || this + return (o.targetVersion = t), (o.name = n), (o.defaultValue = i), (o.onGetInitialValue = r), o + } + return ( + r(NumProperty, e), + (NumProperty.prototype.parse = function (e, t, n) { + return s.parseNumber(t[this.name], this.defaultValue) + }), + (NumProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeNumber(t, this.name, n, this.defaultValue) + }), + NumProperty + ) + })(h) + t.NumProperty = _ + var f = (function (e) { + function PixelSizeProperty() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(PixelSizeProperty, e), + (PixelSizeProperty.prototype.parse = function (e, t, n) { + var i = void 0, + r = t[this.name] + if ('string' == typeof r) { + var s = !1 + try { + var c = o.SizeAndUnit.parse(r, !0) + c.unit === a.SizeUnit.Pixel && ((i = c.physicalSize), (s = !0)) + } catch (e) {} + s || + n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidPropertyValue(t[this.name], 'minHeight'), + ) + } + return i + }), + (PixelSizeProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeValue(t, this.name, 'number' != typeof n || isNaN(n) ? void 0 : n + 'px') + }), + PixelSizeProperty + ) + })(h) + t.PixelSizeProperty = f + var y = (function (e) { + function StringArrayProperty(t, n, i, r) { + var o = e.call(this, t, n, i, r) || this + return (o.targetVersion = t), (o.name = n), (o.defaultValue = i), (o.onGetInitialValue = r), o + } + return ( + r(StringArrayProperty, e), + (StringArrayProperty.prototype.parse = function (e, t, n) { + var i = t[this.name] + if (void 0 === i || !Array.isArray(i)) return this.defaultValue + for (var r = [], o = 0, s = i; o < s.length; o++) { + var l = s[o] + 'string' == typeof l + ? r.push(l) + : n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + 'Invalid array value "' + .concat(JSON.stringify(l), '" of type "') + .concat(typeof l, '" ignored for "') + .concat(this.name, '".'), + ) + } + return r + }), + (StringArrayProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeArray(t, this.name, n) + }), + StringArrayProperty + ) + })(h) + t.StringArrayProperty = y + var v = (function (e) { + function ValueSetProperty(t, n, i, r, o) { + var s = e.call(this, t, n, r, o) || this + return ( + (s.targetVersion = t), (s.name = n), (s.values = i), (s.defaultValue = r), (s.onGetInitialValue = o), s + ) + } + return ( + r(ValueSetProperty, e), + (ValueSetProperty.prototype.isValidValue = function (e, t) { + for (var n = 0, i = this.values; n < i.length; n++) { + var r = i[n] + if (e.toLowerCase() === r.value.toLowerCase()) + return (r.targetVersion ? r.targetVersion : this.targetVersion).compareTo(t.targetVersion) <= 0 + } + return !1 + }), + (ValueSetProperty.prototype.parse = function (e, t, n) { + var i = t[this.name] + if (void 0 === i) return this.defaultValue + if ('string' == typeof i) + for (var r = 0, o = this.values; r < o.length; r++) { + var s = o[r] + if (i.toLowerCase() === s.value.toLowerCase()) { + var c = s.targetVersion ? s.targetVersion : this.targetVersion + return c.compareTo(n.targetVersion) <= 0 + ? s.value + : (n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.propertyValueNotSupported( + i, + this.name, + c.toString(), + n.targetVersion.toString(), + ), + ), + this.defaultValue) + } + } + return ( + n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidPropertyValue(i, this.name), + ), + this.defaultValue + ) + }), + (ValueSetProperty.prototype.toJSON = function (e, t, n, i) { + var r = !1 + if (void 0 !== n) { + r = !0 + for (var o = 0, s = this.values; o < s.length; o++) { + var c = s[o] + if (c.value === n) { + var d = c.targetVersion ? c.targetVersion : this.targetVersion + if (d.compareTo(i.targetVersion) <= 0) { + r = !1 + break + } + i.logEvent( + e, + a.ValidationPhase.ToJSON, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.propertyValueNotSupported( + n, + this.name, + d.toString(), + i.targetVersion.toString(), + ), + ) + } + } + } + r || i.serializeValue(t, this.name, n, this.defaultValue, !0) + }), + ValueSetProperty + ) + })(h) + t.ValueSetProperty = v + var b = (function (e) { + function EnumProperty(t, n, i, r, o, s) { + var a = e.call(this, t, n, r, s) || this + if ( + ((a.targetVersion = t), + (a.name = n), + (a.enumType = i), + (a.defaultValue = r), + (a.onGetInitialValue = s), + (a._values = []), + o) + ) + a._values = o + else + for (var l in i) { + var c = parseInt(l, 10) + c >= 0 && + a._values.push({ + value: c, + }) + } + return a + } + return ( + r(EnumProperty, e), + (EnumProperty.prototype.parse = function (e, t, n) { + var i = t[this.name] + if ('string' != typeof i) return this.defaultValue + var r = s.getEnumValueByName(this.enumType, i) + if (void 0 !== r) + for (var o = 0, c = this.values; o < c.length; o++) { + var d = c[o] + if (d.value === r) { + var p = d.targetVersion ? d.targetVersion : this.targetVersion + return p.compareTo(n.targetVersion) <= 0 + ? r + : (n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.propertyValueNotSupported( + i, + this.name, + p.toString(), + n.targetVersion.toString(), + ), + ), + this.defaultValue) + } + } + return ( + n.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidPropertyValue(i, this.name), + ), + this.defaultValue + ) + }), + (EnumProperty.prototype.toJSON = function (e, t, n, i) { + var r = !1 + if (void 0 !== n) { + r = !0 + for (var o = 0, s = this.values; o < s.length; o++) { + var c = s[o] + if (c.value === n) { + if ((c.targetVersion ? c.targetVersion : this.targetVersion).compareTo(i.targetVersion) <= 0) { + r = !1 + break + } + i.logEvent( + e, + a.ValidationPhase.ToJSON, + a.ValidationEvent.InvalidPropertyValue, + l.Strings.errors.invalidPropertyValue(n, this.name), + ) + } + } + } + r || i.serializeEnum(this.enumType, t, this.name, n, this.defaultValue) + }), + Object.defineProperty(EnumProperty.prototype, 'values', { + get: function () { + return this._values + }, + enumerable: !1, + configurable: !0, + }), + EnumProperty + ) + })(h) + t.EnumProperty = b + var S = (function (e) { + function SerializableObjectProperty(t, n, i, r, o) { + void 0 === r && (r = !1) + var s = + e.call(this, t, n, o, function (e) { + return s.nullable ? void 0 : new s.objectType() + }) || this + return (s.targetVersion = t), (s.name = n), (s.objectType = i), (s.nullable = r), s + } + return ( + r(SerializableObjectProperty, e), + (SerializableObjectProperty.prototype.parse = function (e, t, n) { + var i = t[this.name] + if (void 0 === i) return this.onGetInitialValue ? this.onGetInitialValue(e) : this.defaultValue + var r = new this.objectType() + return r.parse(i, n), r + }), + (SerializableObjectProperty.prototype.toJSON = function (e, t, n, i) { + var r = void 0 + void 0 === n || n.hasAllDefaultValues() || (r = n.toJSON(i)), + 'object' == typeof r && 0 === Object.keys(r).length && (r = void 0), + i.serializeValue(t, this.name, r, this.defaultValue, !0) + }), + SerializableObjectProperty + ) + })(h) + t.SerializableObjectProperty = S + var C = (function (e) { + function SerializableObjectCollectionProperty(t, n, i, r) { + var o = + e.call(this, t, n, void 0, function (e) { + return [] + }) || this + return (o.targetVersion = t), (o.name = n), (o.objectType = i), (o.onItemAdded = r), o + } + return ( + r(SerializableObjectCollectionProperty, e), + (SerializableObjectCollectionProperty.prototype.parse = function (e, t, n) { + var i = [], + r = t[this.name] + if (Array.isArray(r)) + for (var o = 0, s = r; o < s.length; o++) { + var a = s[o], + l = new this.objectType() + l.parse(a, n), i.push(l), this.onItemAdded && this.onItemAdded(e, l) + } + return i.length > 0 ? i : this.onGetInitialValue ? this.onGetInitialValue(e) : void 0 + }), + (SerializableObjectCollectionProperty.prototype.toJSON = function (e, t, n, i) { + i.serializeArray(t, this.name, n) + }), + SerializableObjectCollectionProperty + ) + })(h) + t.SerializableObjectCollectionProperty = C + var E = (function (e) { + function CustomProperty(t, n, i, r, o, s) { + var a = e.call(this, t, n, o, s) || this + if ( + ((a.targetVersion = t), + (a.name = n), + (a.onParse = i), + (a.onToJSON = r), + (a.defaultValue = o), + (a.onGetInitialValue = s), + !a.onParse) + ) + throw new Error('CustomPropertyDefinition instances must have an onParse handler.') + if (!a.onToJSON) throw new Error('CustomPropertyDefinition instances must have an onToJSON handler.') + return a + } + return ( + r(CustomProperty, e), + (CustomProperty.prototype.parse = function (e, t, n) { + return this.onParse(e, this, t, n) + }), + (CustomProperty.prototype.toJSON = function (e, t, n, i) { + this.onToJSON(e, this, t, n, i) + }), + CustomProperty + ) + })(h) + t.CustomProperty = E + var T = (function () { + function SerializableObjectSchema() { + this._properties = [] + } + return ( + (SerializableObjectSchema.prototype.indexOf = function (e) { + for (var t = 0; t < this._properties.length; t++) if (this._properties[t] === e) return t + return -1 + }), + (SerializableObjectSchema.prototype.add = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t] + for (var n = 0, i = e; n < i.length; n++) { + var r = i[n] + ;-1 === this.indexOf(r) && this._properties.push(r) + } + }), + (SerializableObjectSchema.prototype.remove = function () { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t] + for (var n = 0, i = e; n < i.length; n++) + for (var r = i[n]; ; ) { + var o = this.indexOf(r) + if (!(o >= 0)) break + this._properties.splice(o, 1) + } + }), + (SerializableObjectSchema.prototype.getItemAt = function (e) { + return this._properties[e] + }), + (SerializableObjectSchema.prototype.getCount = function () { + return this._properties.length + }), + SerializableObjectSchema + ) + })() + ;(t.SerializableObjectSchema = T), + (t.property = function (e) { + return function (t, n) { + var i = Object.getOwnPropertyDescriptor(t, n) || {} + i.get || + i.set || + ((i.get = function () { + return this.getValue(e) + }), + (i.set = function (t) { + this.setValue(e, t) + }), + Object.defineProperty(t, n, i)) + } + }) + var I = (function () { + function SerializableObject() { + ;(this._propertyBag = {}), + (this._rawProperties = {}), + (this.maxVersion = SerializableObject.defaultMaxVersion) + for (var e = this.getSchema(), t = 0; t < e.getCount(); t++) { + var n = e.getItemAt(t) + n.onGetInitialValue && this.setValue(n, n.onGetInitialValue(this)) + } + } + return ( + (SerializableObject.prototype.getDefaultSerializationContext = function () { + return new u() + }), + (SerializableObject.prototype.populateSchema = function (e) { + var t = this.constructor, + n = [] + for (var i in t) + try { + var r = t[i] + r instanceof h && n.push(r) + } catch (e) {} + if (n.length > 0) { + var o = n.sort(function (e, t) { + return e.sequentialNumber > t.sequentialNumber ? 1 : e.sequentialNumber < t.sequentialNumber ? -1 : 0 + }) + e.add.apply(e, o) + } + SerializableObject.onRegisterCustomProperties && SerializableObject.onRegisterCustomProperties(this, e) + }), + (SerializableObject.prototype.getValue = function (e) { + return this._propertyBag.hasOwnProperty(e.getInternalName()) + ? this._propertyBag[e.getInternalName()] + : e.defaultValue + }), + (SerializableObject.prototype.setValue = function (e, t) { + null == t ? delete this._propertyBag[e.getInternalName()] : (this._propertyBag[e.getInternalName()] = t) + }), + (SerializableObject.prototype.internalParse = function (e, t) { + if ( + ((this._propertyBag = {}), + (this._rawProperties = (o.GlobalSettings.enableFullJsonRoundTrip && e) || {}), + e) + ) + for (var n = this.getSchema(), i = 0; i < n.getCount(); i++) { + var r = n.getItemAt(i) + if (r.isSerializationEnabled) { + var s = r.onGetInitialValue ? r.onGetInitialValue(this) : void 0 + e.hasOwnProperty(r.name) && + (r.targetVersion.compareTo(t.targetVersion) <= 0 + ? (s = r.parse(this, e, t)) + : t.logParseEvent( + this, + a.ValidationEvent.UnsupportedProperty, + l.Strings.errors.propertyNotSupported( + r.name, + r.targetVersion.toString(), + t.targetVersion.toString(), + ), + )), + this.setValue(r, s) + } + } + else this.resetDefaultValues() + }), + (SerializableObject.prototype.internalToJSON = function (e, t) { + for (var n = this.getSchema(), i = [], r = 0; r < n.getCount(); r++) { + var o = n.getItemAt(r) + o.isSerializationEnabled && + o.targetVersion.compareTo(t.targetVersion) <= 0 && + -1 === i.indexOf(o.name) && + (o.toJSON(this, e, this.getValue(o), t), i.push(o.name)) + } + }), + (SerializableObject.prototype.shouldSerialize = function (e) { + return !0 + }), + (SerializableObject.prototype.parse = function (e, t) { + this.internalParse(e, t || new u()) + }), + (SerializableObject.prototype.toJSON = function (e) { + var t + if ( + (e && e instanceof p ? (t = e) : ((t = this.getDefaultSerializationContext()).toJSONOriginalParam = e), + this.shouldSerialize(t)) + ) { + var n = void 0 + return ( + (n = + o.GlobalSettings.enableFullJsonRoundTrip && + this._rawProperties && + 'object' == typeof this._rawProperties + ? this._rawProperties + : {}), + this.internalToJSON(n, t), + n + ) + } + }), + (SerializableObject.prototype.hasDefaultValue = function (e) { + return this.getValue(e) === e.defaultValue + }), + (SerializableObject.prototype.hasAllDefaultValues = function () { + for (var e = this.getSchema(), t = 0; t < e.getCount(); t++) { + var n = e.getItemAt(t) + if (!this.hasDefaultValue(n)) return !1 + } + return !0 + }), + (SerializableObject.prototype.resetDefaultValues = function () { + for (var e = this.getSchema(), t = 0; t < e.getCount(); t++) { + var n = e.getItemAt(t) + this.setValue(n, n.defaultValue) + } + }), + (SerializableObject.prototype.setCustomProperty = function (e, t) { + ;('string' == typeof t && !t) || null == t ? delete this._rawProperties[e] : (this._rawProperties[e] = t) + }), + (SerializableObject.prototype.getCustomProperty = function (e) { + return this._rawProperties[e] + }), + (SerializableObject.prototype.getSchema = function () { + var e = SerializableObject._schemaCache[this.getSchemaKey()] + return ( + e || + ((e = new T()), this.populateSchema(e), (SerializableObject._schemaCache[this.getSchemaKey()] = e)), + e + ) + }), + (SerializableObject.defaultMaxVersion = d.latest), + (SerializableObject._schemaCache = {}), + SerializableObject + ) + })() + t.SerializableObject = I + }, + 8418: (e, t, n) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.UUID = + t.SizeAndUnit = + t.PaddingDefinition = + t.SpacingDefinition = + t.StringWithSubstitutions = + t.ContentTypes = + t.GlobalSettings = + void 0) + var i = n(9003), + r = (function () { + function GlobalSettings() {} + return ( + (GlobalSettings.useAdvancedTextBlockTruncation = !0), + (GlobalSettings.useAdvancedCardBottomTruncation = !1), + (GlobalSettings.useMarkdownInRadioButtonAndCheckbox = !0), + (GlobalSettings.allowMarkForTextHighlighting = !1), + (GlobalSettings.alwaysBleedSeparators = !1), + (GlobalSettings.enableFullJsonRoundTrip = !1), + (GlobalSettings.displayInputValidationErrors = !0), + (GlobalSettings.allowPreProcessingPropertyValues = !1), + (GlobalSettings.setTabIndexAtCardRoot = !0), + (GlobalSettings.enableFallback = !0), + (GlobalSettings.useWebkitLineClamp = !0), + (GlobalSettings.allowMoreThanMaxActionsInOverflowMenu = !1), + (GlobalSettings.removePaddingFromContainersWithBackgroundImage = !1), + (GlobalSettings.resetInputsDirtyStateAfterActionExecution = !0), + (GlobalSettings.applets = { + logEnabled: !0, + logLevel: i.LogLevel.Error, + maximumRetryAttempts: 3, + defaultTimeBetweenRetryAttempts: 3e3, + authPromptWidth: 400, + authPromptHeight: 600, + refresh: { + mode: i.RefreshMode.Manual, + timeBetweenAutomaticRefreshes: 3e3, + maximumConsecutiveAutomaticRefreshes: 3, + allowManualRefreshesAfterAutomaticRefreshes: !0, + }, + }), + GlobalSettings + ) + })() + ;(t.GlobalSettings = r), + (t.ContentTypes = { + applicationJson: 'application/json', + applicationXWwwFormUrlencoded: 'application/x-www-form-urlencoded', + }) + var o = (function () { + function StringWithSubstitutions() { + this._isProcessed = !1 + } + return ( + (StringWithSubstitutions.prototype.getReferencedInputs = function (e, t) { + if (!t) throw new Error('The referencedInputs parameter cannot be null.') + if (this._original) + for (var n = 0, i = e; n < i.length; n++) { + var r = i[n] + null != new RegExp('\\{{2}(' + r.id + ').value\\}{2}', 'gi').exec(this._original) && + r.id && + (t[r.id] = r) + } + }), + (StringWithSubstitutions.prototype.substituteInputValues = function (e, n) { + if (((this._processed = this._original), this._original)) + for ( + var i = /\{{2}([a-z0-9_$@]+).value\}{2}/gi, r = void 0; + null !== (r = i.exec(this._original)) && this._processed; + + ) + for (var o = 0, s = Object.keys(e); o < s.length; o++) { + var a = s[o] + if (a.toLowerCase() === r[1].toLowerCase()) { + var l = e[a], + c = '' + l.value && (c = l.value), + n === t.ContentTypes.applicationJson + ? (c = (c = JSON.stringify(c)).slice(1, -1)) + : n === t.ContentTypes.applicationXWwwFormUrlencoded && (c = encodeURIComponent(c)), + (this._processed = this._processed.replace(r[0], c)) + break + } + } + this._isProcessed = !0 + }), + (StringWithSubstitutions.prototype.getOriginal = function () { + return this._original + }), + (StringWithSubstitutions.prototype.get = function () { + return this._isProcessed ? this._processed : this._original + }), + (StringWithSubstitutions.prototype.set = function (e) { + ;(this._original = e), (this._isProcessed = !1) + }), + StringWithSubstitutions + ) + })() + t.StringWithSubstitutions = o + var SpacingDefinition = function (e, t, n, i) { + void 0 === e && (e = 0), + void 0 === t && (t = 0), + void 0 === n && (n = 0), + void 0 === i && (i = 0), + (this.left = 0), + (this.top = 0), + (this.right = 0), + (this.bottom = 0), + (this.top = e), + (this.right = t), + (this.bottom = n), + (this.left = i) + } + t.SpacingDefinition = SpacingDefinition + var PaddingDefinition = function (e, t, n, r) { + void 0 === e && (e = i.Spacing.None), + void 0 === t && (t = i.Spacing.None), + void 0 === n && (n = i.Spacing.None), + void 0 === r && (r = i.Spacing.None), + (this.top = i.Spacing.None), + (this.right = i.Spacing.None), + (this.bottom = i.Spacing.None), + (this.left = i.Spacing.None), + (this.top = e), + (this.right = t), + (this.bottom = n), + (this.left = r) + } + t.PaddingDefinition = PaddingDefinition + var s = (function () { + function SizeAndUnit(e, t) { + ;(this.physicalSize = e), (this.unit = t) + } + return ( + (SizeAndUnit.parse = function (e, t) { + void 0 === t && (t = !1) + var n = new SizeAndUnit(0, i.SizeUnit.Weight) + if ('number' == typeof e) return (n.physicalSize = e), n + if ('string' == typeof e) { + var r = /^([0-9]+)(px|\*)?$/g.exec(e), + o = t ? 3 : 2 + if (r && r.length >= o) + return ( + (n.physicalSize = parseInt(r[1])), 3 === r.length && 'px' === r[2] && (n.unit = i.SizeUnit.Pixel), n + ) + } + throw new Error('Invalid size: ' + e) + }), + SizeAndUnit + ) + })() + t.SizeAndUnit = s + var a = (function () { + function UUID() {} + return ( + (UUID.generate = function () { + var e = (4294967295 * Math.random()) | 0, + t = (4294967295 * Math.random()) | 0, + n = (4294967295 * Math.random()) | 0, + i = (4294967295 * Math.random()) | 0 + return ( + UUID.lut[255 & e] + + UUID.lut[(e >> 8) & 255] + + UUID.lut[(e >> 16) & 255] + + UUID.lut[(e >> 24) & 255] + + '-' + + UUID.lut[255 & t] + + UUID.lut[(t >> 8) & 255] + + '-' + + UUID.lut[((t >> 16) & 15) | 64] + + UUID.lut[(t >> 24) & 255] + + '-' + + UUID.lut[(63 & n) | 128] + + UUID.lut[(n >> 8) & 255] + + '-' + + UUID.lut[(n >> 16) & 255] + + UUID.lut[(n >> 24) & 255] + + UUID.lut[255 & i] + + UUID.lut[(i >> 8) & 255] + + UUID.lut[(i >> 16) & 255] + + UUID.lut[(i >> 24) & 255] + ) + }), + (UUID.initialize = function () { + for (var e = 0; e < 256; e++) UUID.lut[e] = (e < 16 ? '0' : '') + e.toString(16) + }), + (UUID.lut = []), + UUID + ) + })() + ;(t.UUID = a), a.initialize() + }, + 6758: (e, t) => { + 'use strict' + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.Strings = void 0) + var n = (function () { + function Strings() {} + return ( + (Strings.errors = { + unknownElementType: function (e) { + return 'Unknown element type "'.concat(e, '". Fallback will be used if present.') + }, + unknownActionType: function (e) { + return 'Unknown action type "'.concat(e, '". Fallback will be used if present.') + }, + elementTypeNotAllowed: function (e) { + return 'Element type "'.concat(e, '" is not allowed in this context.') + }, + actionTypeNotAllowed: function (e) { + return 'Action type "'.concat(e, '" is not allowed in this context.') + }, + invalidPropertyValue: function (e, t) { + return 'Invalid value "'.concat(e, '" for property "').concat(t, '".') + }, + showCardMustHaveCard: function () { + return '"An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.' + }, + invalidColumnWidth: function (e) { + return 'Invalid column width "'.concat(e, '" - defaulting to "auto".') + }, + invalidCardVersion: function (e) { + return 'Invalid card version. Defaulting to "'.concat(e, '".') + }, + invalidVersionString: function (e) { + return 'Invalid version string "'.concat(e, '".') + }, + propertyValueNotSupported: function (e, t, n, i) { + return 'Value "' + .concat(e, '" for property "') + .concat(t, '" is supported in version ') + .concat(n, ', but you are using version ') + .concat(i, '.') + }, + propertyNotSupported: function (e, t, n) { + return 'Property "' + .concat(e, '" is supported in version ') + .concat(t, ', but you are using version ') + .concat(n, '.') + }, + indexOutOfRange: function (e) { + return 'Index out of range ('.concat(e, ').') + }, + elementCannotBeUsedAsInline: function () { + return 'RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.' + }, + inlineAlreadyParented: function () { + return 'RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.' + }, + interactivityNotAllowed: function () { + return 'Interactivity is not allowed.' + }, + inputsMustHaveUniqueId: function () { + return 'All inputs must have a unique Id.' + }, + choiceSetMustHaveAtLeastOneChoice: function () { + return 'An Input.ChoiceSet must have at least one choice defined.' + }, + choiceSetChoicesMustHaveTitleAndValue: function () { + return 'All choices in an Input.ChoiceSet must have their title and value properties set.' + }, + propertyMustBeSet: function (e) { + return 'Property "'.concat(e, '" must be set.') + }, + actionHttpHeadersMustHaveNameAndValue: function () { + return 'All headers of an Action.Http must have their name and value properties set.' + }, + tooManyActions: function (e) { + return 'Maximum number of actions exceeded ('.concat(e, ').') + }, + tooLittleTimeDelay: function (e) { + return 'Autoplay Delay is too short ('.concat(e, ').') + }, + tooManyCarouselPages: function (e) { + return 'Maximum number of Carousel pages exceeded ('.concat(e, ').') + }, + invalidInitialPageIndex: function (e) { + return 'InitialPage for carousel is invalid ('.concat(e, ').') + }, + columnAlreadyBelongsToAnotherSet: function () { + return 'This column already belongs to another ColumnSet.' + }, + invalidCardType: function () { + return 'Invalid or missing card type. Make sure the card\'s type property is set to "AdaptiveCard".' + }, + unsupportedCardVersion: function (e, t) { + return 'The specified card version (' + .concat(e, ') is not supported or still in preview. The latest released card version is ') + .concat(t, '.') + }, + duplicateId: function (e) { + return 'Duplicate Id "'.concat(e, '".') + }, + markdownProcessingNotEnabled: function () { + return "Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown" + }, + processMarkdownEventRemoved: function () { + return 'The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.' + }, + elementAlreadyParented: function () { + return 'The element already belongs to another container.' + }, + actionAlreadyParented: function () { + return 'The action already belongs to another element.' + }, + elementTypeNotStandalone: function (e) { + return 'Elements of type '.concat(e, ' cannot be used as standalone elements.') + }, + }), + (Strings.magicCodeInputCard = { + tryAgain: function () { + return "That didn't work... let's try again." + }, + pleaseLogin: function () { + return 'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"' + }, + enterMagicCode: function () { + return 'Enter magic code' + }, + pleaseEnterMagicCodeYouReceived: function () { + return 'Please enter the magic code you received.' + }, + submit: function () { + return 'Submit' + }, + cancel: function () { + return 'Cancel' + }, + somethingWentWrong: function () { + return "Something went wrong. This action can't be handled." + }, + authenticationFailed: function () { + return 'Authentication failed.' + }, + }), + (Strings.runtime = { + automaticRefreshPaused: function () { + return 'Automatic refresh paused.' + }, + clckToRestartAutomaticRefresh: function () { + return 'Click to restart.' + }, + refreshThisCard: function () { + return 'Refresh this card' + }, + }), + (Strings.hints = { + dontUseWeightedAndStrecthedColumnsInSameSet: function () { + return 'It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.' + }, + }), + (Strings.defaults = { + inlineActionTitle: function () { + return 'Inline Action' + }, + overflowButtonText: function () { + return '...' + }, + overflowButtonTooltip: function () { + return 'More options' + }, + mediaPlayerAriaLabel: function () { + return 'Media content' + }, + mediaPlayerPlayMedia: function () { + return 'Play media' + }, + youTubeVideoPlayer: function () { + return 'YouTube video player' + }, + vimeoVideoPlayer: function () { + return 'Vimeo video player' + }, + dailymotionVideoPlayer: function () { + return 'Dailymotion video player' + }, + }), + Strings + ) + })() + t.Strings = n + }, + 6629: function (e, t, n) { + 'use strict' + var i, + r = + (this && this.__extends) || + ((i = function (e, t) { + return ( + (i = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + i(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }), + o = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + s = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i) + else + for (var a = e.length - 1; a >= 0; a--) + (r = e[a]) && (s = (o < 3 ? r(s) : o > 3 ? r(t, n, s) : r(t, n)) || s) + return o > 3 && s && Object.defineProperty(t, n, s), s + } + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.Table = t.TableRow = t.TableCell = t.StylableContainer = t.TableColumnDefinition = void 0) + var s = n(7191), + a = n(9003), + l = n(9301), + c = n(2421), + d = n(8418), + p = n(6758), + u = n(7794), + h = (function (e) { + function TableColumnDefinition() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t.width = new d.SizeAndUnit(1, a.SizeUnit.Weight)), t + } + return ( + r(TableColumnDefinition, e), + (TableColumnDefinition.prototype.getSchemaKey = function () { + return 'ColumnDefinition' + }), + (TableColumnDefinition.horizontalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'horizontalCellContentAlignment', + a.HorizontalAlignment, + )), + (TableColumnDefinition.verticalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'verticalCellContentAlignment', + a.VerticalAlignment, + )), + (TableColumnDefinition.widthProperty = new c.CustomProperty( + c.Versions.v1_5, + 'width', + function (e, t, n, i) { + var r = t.defaultValue, + o = n[t.name], + s = !1 + if ('number' != typeof o || isNaN(o)) + if ('string' == typeof o) + try { + r = d.SizeAndUnit.parse(o) + } catch (e) { + s = !0 + } + else s = !0 + else r = new d.SizeAndUnit(o, a.SizeUnit.Weight) + return ( + s && + i.logParseEvent( + e, + a.ValidationEvent.InvalidPropertyValue, + p.Strings.errors.invalidColumnWidth(o), + ), + r + ) + }, + function (e, t, n, i, r) { + i.unit === a.SizeUnit.Pixel + ? r.serializeValue(n, 'width', i.physicalSize + 'px') + : r.serializeNumber(n, 'width', i.physicalSize) + }, + new d.SizeAndUnit(1, a.SizeUnit.Weight), + )), + o( + [(0, c.property)(TableColumnDefinition.horizontalCellContentAlignmentProperty)], + TableColumnDefinition.prototype, + 'horizontalCellContentAlignment', + void 0, + ), + o( + [(0, c.property)(TableColumnDefinition.verticalCellContentAlignmentProperty)], + TableColumnDefinition.prototype, + 'verticalCellContentAlignment', + void 0, + ), + o( + [(0, c.property)(TableColumnDefinition.widthProperty)], + TableColumnDefinition.prototype, + 'width', + void 0, + ), + TableColumnDefinition + ) + })(c.SerializableObject) + t.TableColumnDefinition = h + var m = (function (e) { + function StylableContainer() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._items = []), t + } + return ( + r(StylableContainer, e), + (StylableContainer.prototype.parseItem = function (e, t) { + var n = this + return t.parseCardObject( + this, + e, + [], + !this.isDesignMode(), + function (e) { + return n.createItemInstance(e) + }, + function (e, n) { + t.logParseEvent( + void 0, + a.ValidationEvent.ElementTypeNotAllowed, + p.Strings.errors.elementTypeNotAllowed(e), + ) + }, + ) + }), + (StylableContainer.prototype.internalAddItem = function (e) { + if (e.parent) throw new Error(p.Strings.errors.elementAlreadyParented()) + this._items.push(e), e.setParent(this) + }), + (StylableContainer.prototype.internalRemoveItem = function (e) { + var t = this._items.indexOf(e) + return t >= 0 && (this._items.splice(t, 1), e.setParent(void 0), this.updateLayout(), !0) + }), + (StylableContainer.prototype.internalIndexOf = function (e) { + return this._items.indexOf(e) + }), + (StylableContainer.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), (this._items = []) + var i = t[this.getCollectionPropertyName()] + if (Array.isArray(i)) + for (var r = 0, o = i; r < o.length; r++) { + var s = o[r], + a = this.parseItem(s, n) + a && this._items.push(a) + } + }), + (StylableContainer.prototype.internalToJSON = function (t, n) { + e.prototype.internalToJSON.call(this, t, n), + n.serializeArray(t, this.getCollectionPropertyName(), this._items) + }), + (StylableContainer.prototype.removeItem = function (e) { + return this.internalRemoveItem(e) + }), + (StylableContainer.prototype.getItemCount = function () { + return this._items.length + }), + (StylableContainer.prototype.getItemAt = function (e) { + return this._items[e] + }), + (StylableContainer.prototype.getFirstVisibleRenderedItem = function () { + return this.getItemCount() > 0 ? this.getItemAt(0) : void 0 + }), + (StylableContainer.prototype.getLastVisibleRenderedItem = function () { + return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : void 0 + }), + StylableContainer + ) + })(s.StylableCardElementContainer) + t.StylableContainer = m + var g = (function (e) { + function TableCell() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._columnIndex = -1), (t._cellType = 'data'), t + } + return ( + r(TableCell, e), + (TableCell.prototype.getHasBorder = function () { + return this.parentRow.parentTable.showGridLines + }), + (TableCell.prototype.applyBorder = function () { + if (this.renderedElement && this.getHasBorder()) { + var e = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle) + if (e.borderColor) { + var t = (0, u.stringToCssColor)(e.borderColor) + t && + ((this.renderedElement.style.borderRight = '1px solid ' + t), + (this.renderedElement.style.borderBottom = '1px solid ' + t)) + } + } + }), + (TableCell.prototype.getDefaultPadding = function () { + return this.getHasBackground() || this.getHasBorder() + ? new d.PaddingDefinition(a.Spacing.Small, a.Spacing.Small, a.Spacing.Small, a.Spacing.Small) + : e.prototype.getDefaultPadding.call(this) + }), + (TableCell.prototype.internalRender = function () { + var t = e.prototype.internalRender.call(this) + return ( + t && + (t.setAttribute('role', 'data' === this.cellType ? 'cell' : 'columnheader'), + (t.style.minWidth = '0'), + 'header' === this.cellType && t.setAttribute('scope', 'col')), + t + ) + }), + (TableCell.prototype.shouldSerialize = function (e) { + return !0 + }), + (TableCell.prototype.getJsonTypeName = function () { + return 'TableCell' + }), + (TableCell.prototype.getEffectiveTextStyleDefinition = function () { + return 'header' === this.cellType + ? this.hostConfig.textStyles.columnHeader + : e.prototype.getEffectiveTextStyleDefinition.call(this) + }), + (TableCell.prototype.getEffectiveHorizontalAlignment = function () { + if (void 0 !== this.horizontalAlignment) return this.horizontalAlignment + if (void 0 !== this.parentRow.horizontalCellContentAlignment) + return this.parentRow.horizontalCellContentAlignment + if (this.columnIndex >= 0) { + var t = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment + if (void 0 !== t) return t + } + return void 0 !== this.parentRow.parentTable.horizontalCellContentAlignment + ? this.parentRow.parentTable.horizontalCellContentAlignment + : e.prototype.getEffectiveHorizontalAlignment.call(this) + }), + (TableCell.prototype.getEffectiveVerticalContentAlignment = function () { + if (void 0 !== this.verticalContentAlignment) return this.verticalContentAlignment + if (void 0 !== this.parentRow.verticalCellContentAlignment) + return this.parentRow.verticalCellContentAlignment + if (this.columnIndex >= 0) { + var t = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment + if (void 0 !== t) return t + } + return void 0 !== this.parentRow.parentTable.verticalCellContentAlignment + ? this.parentRow.parentTable.verticalCellContentAlignment + : e.prototype.getEffectiveVerticalContentAlignment.call(this) + }), + Object.defineProperty(TableCell.prototype, 'columnIndex', { + get: function () { + return this._columnIndex + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(TableCell.prototype, 'cellType', { + get: function () { + return this._cellType + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(TableCell.prototype, 'parentRow', { + get: function () { + return this.parent + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(TableCell.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + TableCell + ) + })(s.Container) + t.TableCell = g + var _ = (function (e) { + function TableRow() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + r(TableRow, e), + (TableRow.prototype.getDefaultPadding = function () { + return new d.PaddingDefinition(a.Spacing.None, a.Spacing.None, a.Spacing.None, a.Spacing.None) + }), + (TableRow.prototype.applyBackground = function () { + if (this.renderedElement) { + var e = this.hostConfig.containerStyles.getStyleByName( + this.style, + this.hostConfig.containerStyles.getStyleByName(this.defaultStyle), + ) + if (e.backgroundColor) { + var t = (0, u.stringToCssColor)(e.backgroundColor) + t && (this.renderedElement.style.backgroundColor = t) + } + } + }), + (TableRow.prototype.getCollectionPropertyName = function () { + return 'cells' + }), + (TableRow.prototype.createItemInstance = function (e) { + return e && 'TableCell' !== e ? void 0 : new g() + }), + (TableRow.prototype.internalRender = function () { + var e = this.getIsFirstRow(), + t = this.hostConfig.table.cellSpacing, + n = document.createElement('div') + n.setAttribute('role', 'row'), (n.style.display = 'flex'), (n.style.flexDirection = 'row') + for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) { + var r = this.getItemAt(i) + ;(r._columnIndex = i), (r._cellType = this.parentTable.firstRowAsHeaders && e ? 'header' : 'data') + var o = r.render() + if (o) { + var s = this.parentTable.getColumnAt(i) + s.computedWidth.unit === a.SizeUnit.Pixel + ? (o.style.flex = '0 0 ' + s.computedWidth.physicalSize + 'px') + : (o.style.flex = '1 1 ' + s.computedWidth.physicalSize + '%'), + i > 0 && !this.parentTable.showGridLines && t > 0 && (o.style.marginLeft = t + 'px'), + n.appendChild(o) + } + } + return n.children.length > 0 ? n : void 0 + }), + (TableRow.prototype.shouldSerialize = function (e) { + return !0 + }), + (TableRow.prototype.addCell = function (e) { + this.internalAddItem(e) + }), + (TableRow.prototype.removeCellAt = function (e) { + return e >= 0 && e < this.getItemCount() && this.removeItem(this.getItemAt(e)) + }), + (TableRow.prototype.indexOf = function (e) { + return e instanceof g ? this.internalIndexOf(e) : -1 + }), + (TableRow.prototype.ensureHasEnoughCells = function (e) { + for (; this.getItemCount() < e; ) this.addCell(new g()) + }), + (TableRow.prototype.getJsonTypeName = function () { + return 'TableRow' + }), + (TableRow.prototype.getIsFirstRow = function () { + return this.parentTable.getItemAt(0) === this + }), + Object.defineProperty(TableRow.prototype, 'parentTable', { + get: function () { + return this.parent + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(TableRow.prototype, 'isStandalone', { + get: function () { + return !1 + }, + enumerable: !1, + configurable: !0, + }), + (TableRow.styleProperty = new s.ContainerStyleProperty(c.Versions.v1_5, 'style')), + (TableRow.horizontalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'horizontalCellContentAlignment', + a.HorizontalAlignment, + )), + (TableRow.verticalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'verticalCellContentAlignment', + a.VerticalAlignment, + )), + o( + [(0, c.property)(TableRow.horizontalCellContentAlignmentProperty)], + TableRow.prototype, + 'horizontalCellContentAlignment', + void 0, + ), + o( + [(0, c.property)(TableRow.verticalCellContentAlignmentProperty)], + TableRow.prototype, + 'verticalCellContentAlignment', + void 0, + ), + TableRow + ) + })(m) + t.TableRow = _ + var f = (function (e) { + function Table() { + var t = (null !== e && e.apply(this, arguments)) || this + return (t._columns = []), (t.firstRowAsHeaders = !0), (t.showGridLines = !0), t + } + return ( + r(Table, e), + Object.defineProperty(Table.prototype, 'gridStyle', { + get: function () { + var e = this.getValue(Table.gridStyleProperty) + if (e && this.hostConfig.containerStyles.getStyleByName(e)) return e + }, + set: function (e) { + this.setValue(Table.gridStyleProperty, e) + }, + enumerable: !1, + configurable: !0, + }), + (Table.prototype.ensureRowsHaveEnoughCells = function () { + for (var e = 0; e < this.getItemCount(); e++) + this.getItemAt(e).ensureHasEnoughCells(this.getColumnCount()) + }), + (Table.prototype.removeCellsFromColumn = function (e) { + for (var t = 0; t < this.getItemCount(); t++) this.getItemAt(t).removeCellAt(e) + }), + (Table.prototype.getCollectionPropertyName = function () { + return 'rows' + }), + (Table.prototype.createItemInstance = function (e) { + return e && 'TableRow' !== e ? void 0 : new _() + }), + (Table.prototype.internalParse = function (t, n) { + e.prototype.internalParse.call(this, t, n), this.ensureRowsHaveEnoughCells() + }), + (Table.prototype.internalRender = function () { + if (this.getItemCount() > 0) { + for (var e = 0, t = 0, n = this._columns; t < n.length; t++) { + ;(o = n[t]).width.unit === a.SizeUnit.Weight && (e += o.width.physicalSize) + } + for (var i = 0, r = this._columns; i < r.length; i++) { + var o + ;(o = r[i]).width.unit === a.SizeUnit.Pixel + ? (o.computedWidth = new d.SizeAndUnit(o.width.physicalSize, a.SizeUnit.Pixel)) + : (o.computedWidth = new d.SizeAndUnit((100 / e) * o.width.physicalSize, a.SizeUnit.Weight)) + } + var s = document.createElement('div') + if ( + (s.setAttribute('role', 'table'), + (s.style.display = 'flex'), + (s.style.flexDirection = 'column'), + this.showGridLines) + ) { + var l = this.hostConfig.containerStyles.getStyleByName(this.gridStyle) + if (l.borderColor) { + var c = (0, u.stringToCssColor)(l.borderColor) + c && ((s.style.borderTop = '1px solid ' + c), (s.style.borderLeft = '1px solid ' + c)) + } + } + for (var p = this.hostConfig.table.cellSpacing, h = 0; h < this.getItemCount(); h++) { + var m = this.getItemAt(h).render() + if (m) { + if (h > 0 && !this.showGridLines && p > 0) { + var g = document.createElement('div') + g.setAttribute('aria-hidden', 'true'), (g.style.height = p + 'px'), s.appendChild(g) + } + s.appendChild(m) + } + } + return s + } + }), + (Table.prototype.addColumn = function (e) { + this._columns.push(e), this.ensureRowsHaveEnoughCells() + }), + (Table.prototype.removeColumn = function (e) { + var t = this._columns.indexOf(e) + t >= 0 && (this.removeCellsFromColumn(t), this._columns.splice(t, 1)) + }), + (Table.prototype.getColumnCount = function () { + return this._columns.length + }), + (Table.prototype.getColumnAt = function (e) { + return this._columns[e] + }), + (Table.prototype.addRow = function (e) { + this.internalAddItem(e), e.ensureHasEnoughCells(this.getColumnCount()) + }), + (Table.prototype.indexOf = function (e) { + return e instanceof _ ? this.internalIndexOf(e) : -1 + }), + (Table.prototype.getJsonTypeName = function () { + return 'Table' + }), + (Table._columnsProperty = new c.SerializableObjectCollectionProperty(c.Versions.v1_5, 'columns', h)), + (Table.firstRowAsHeadersProperty = new c.BoolProperty(c.Versions.v1_5, 'firstRowAsHeaders', !0)), + (Table.showGridLinesProperty = new c.BoolProperty(c.Versions.v1_5, 'showGridLines', !0)), + (Table.gridStyleProperty = new s.ContainerStyleProperty(c.Versions.v1_5, 'gridStyle')), + (Table.horizontalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'horizontalCellContentAlignment', + a.HorizontalAlignment, + )), + (Table.verticalCellContentAlignmentProperty = new c.EnumProperty( + c.Versions.v1_5, + 'verticalCellContentAlignment', + a.VerticalAlignment, + )), + o([(0, c.property)(Table._columnsProperty)], Table.prototype, '_columns', void 0), + o([(0, c.property)(Table.firstRowAsHeadersProperty)], Table.prototype, 'firstRowAsHeaders', void 0), + o([(0, c.property)(Table.showGridLinesProperty)], Table.prototype, 'showGridLines', void 0), + o([(0, c.property)(Table.gridStyleProperty)], Table.prototype, 'gridStyle', null), + o( + [(0, c.property)(Table.horizontalCellContentAlignmentProperty)], + Table.prototype, + 'horizontalCellContentAlignment', + void 0, + ), + o( + [(0, c.property)(Table.verticalCellContentAlignmentProperty)], + Table.prototype, + 'verticalCellContentAlignment', + void 0, + ), + Table + ) + })(m) + ;(t.Table = f), l.GlobalRegistry.defaultElements.register('Table', f, c.Versions.v1_5) + }, + 9514: function (e, t) { + 'use strict' + var n, + i = + (this && this.__extends) || + ((n = function (e, t) { + return ( + (n = + Object.setPrototypeOf || + ({ + __proto__: [], + } instanceof Array && + function (e, t) { + e.__proto__ = t + }) || + function (e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }), + n(e, t) + ) + }), + function (e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null') + function __() { + this.constructor = e + } + n(e, t), (e.prototype = null === t ? Object.create(t) : ((__.prototype = t.prototype), new __())) + }) + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.formatText = void 0) + var r = (function () { + function AbstractTextFormatter(e) { + this._regularExpression = e + } + return ( + (AbstractTextFormatter.prototype.format = function (e, t) { + var n + if (t) { + for (var i = t; null != (n = this._regularExpression.exec(t)); ) + i = i.replace(n[0], this.internalFormat(e, n)) + return i + } + return t + }), + AbstractTextFormatter + ) + })(), + o = (function (e) { + function DateFormatter() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + i(DateFormatter, e), + (DateFormatter.prototype.internalFormat = function (e, t) { + var n = new Date(Date.parse(t[1])), + i = void 0 !== t[2] ? t[2].toLowerCase() : 'compact' + return 'compact' !== i + ? n.toLocaleDateString(e, { + day: 'numeric', + weekday: i, + month: i, + year: 'numeric', + }) + : n.toLocaleDateString() + }), + DateFormatter + ) + })(r), + s = (function (e) { + function TimeFormatter() { + return (null !== e && e.apply(this, arguments)) || this + } + return ( + i(TimeFormatter, e), + (TimeFormatter.prototype.internalFormat = function (e, t) { + return new Date(Date.parse(t[1])).toLocaleTimeString(e, { + hour: 'numeric', + minute: '2-digit', + }) + }), + TimeFormatter + ) + })(r) + t.formatText = function (e, t) { + for ( + var n = t, + i = 0, + r = [ + new o( + /\{{2}DATE\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\)\}{2}/g, + ), + new s(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g), + ]; + i < r.length; + i++ + ) { + n = r[i].format(e, n) + } + return n + } + }, + 7794: (e, t, n) => { + 'use strict' + var i + Object.defineProperty(t, '__esModule', { + value: !0, + }), + (t.addCancelSelectActionEventHandler = + t.clearElementChildren = + t.getScrollY = + t.getScrollX = + t.getFitStatus = + t.truncate = + t.truncateText = + t.stringToCssColor = + t.parseEnum = + t.getEnumValueByName = + t.parseBool = + t.parseNumber = + t.parseString = + t.appendChild = + t.generateUniqueId = + t.isMobileOS = + t.isInternetExplorer = + void 0) + var r = n(9003), + o = n(8418) + function getEnumValueByName(e, t) { + for (var n in e) { + var i = parseInt(n, 10) + if (i >= 0) { + var r = e[n] + if (r && 'string' == typeof r && r.toLowerCase() === t.toLowerCase()) return i + } + } + } + function truncateWorker(e, t, n, i, r) { + var fits = function () { + return t - e.scrollHeight >= -1 + } + if (!fits()) { + for ( + var o = (function (e) { + var t = [], + n = findNextCharacter(e, -1) + for (; n < e.length; ) ' ' === e[n] && t.push(n), (n = findNextCharacter(e, n)) + return t + })(n), + s = 0, + a = o.length, + l = 0; + s < a; + + ) { + var c = Math.floor((s + a) / 2) + i(n, o[c]), fits() ? ((l = o[c]), (s = c + 1)) : (a = c) + } + if ((i(n, l), r && t - e.scrollHeight >= r - 1)) { + for (var d = findNextCharacter(n, l); d < n.length && (i(n, d), fits()); ) + (l = d), (d = findNextCharacter(n, d)) + i(n, l) + } + } + } + ;(t.isInternetExplorer = function () { + return void 0 !== window.document.documentMode + }), + (t.isMobileOS = function () { + var e = window.navigator.userAgent + return !!e.match(/Android/i) || !!e.match(/iPad/i) || !!e.match(/iPhone/i) + }), + (t.generateUniqueId = function () { + return '__ac-' + o.UUID.generate() + }), + (t.appendChild = function (e, t) { + t && e.appendChild(t) + }), + (t.parseString = function (e, t) { + return 'string' == typeof e ? e : t + }), + (t.parseNumber = function (e, t) { + return 'number' == typeof e ? e : t + }), + (t.parseBool = function (e, t) { + if ('boolean' == typeof e) return e + if ('string' == typeof e) + switch (e.toLowerCase()) { + case 'true': + return !0 + case 'false': + return !1 + default: + return t + } + return t + }), + (t.getEnumValueByName = getEnumValueByName), + (t.parseEnum = function (e, t, n) { + if (!t) return n + var i = getEnumValueByName(e, t) + return void 0 !== i ? i : n + }), + (t.stringToCssColor = function (e) { + if (e) { + var t = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi.exec(e) + if (t && t[4]) { + var n = parseInt(t[1], 16) / 255 + return ( + 'rgba(' + parseInt(t[2], 16) + ',' + parseInt(t[3], 16) + ',' + parseInt(t[4], 16) + ',' + n + ')' + ) + } + } + return e + }), + (t.truncateText = function (e, t, n) { + truncateWorker( + e, + t, + e.innerText, + function (t, n) { + e.innerText = t.substring(0, n) + '...' + }, + n, + ) + }) + var s = + 'undefined' == typeof window || null === (i = window.trustedTypes) || void 0 === i + ? void 0 + : i.createPolicy('adaptivecards#deprecatedExportedFunctionPolicy', { + createHTML: function (e) { + return e + }, + }) + function findNextCharacter(e, t) { + for (t += 1; t < e.length && '<' === e[t]; ) for (; t < e.length && '>' !== e[t++]; ); + return t + } + ;(t.truncate = function (e, t, n) { + truncateWorker( + e, + t, + e.innerHTML, + function (t, n) { + var i, + r = t.substring(0, n) + '...', + o = null !== (i = null == s ? void 0 : s.createHTML(r)) && void 0 !== i ? i : r + e.innerHTML = o + }, + n, + ) + }), + (t.getFitStatus = function (e, t) { + var n = e.offsetTop + return n + e.clientHeight <= t + ? r.ContainerFitStatus.FullyInContainer + : n < t + ? r.ContainerFitStatus.Overflowing + : r.ContainerFitStatus.FullyOutOfContainer + }), + (t.getScrollX = function () { + return window.pageXOffset + }), + (t.getScrollY = function () { + return window.pageYOffset + }), + (t.clearElementChildren = function (e) { + for (; e.firstChild; ) e.removeChild(e.firstChild) + }), + (t.addCancelSelectActionEventHandler = function (e) { + e.onclick = function (e) { + e.preventDefault(), (e.cancelBubble = !0) + } + }) + }, + 7423: (e, t, n) => { + 'use strict' + function assign(e) { + var t = Array.prototype.slice.call(arguments, 1) + return ( + t.forEach(function (t) { + t && + Object.keys(t).forEach(function (n) { + e[n] = t[n] + }) + }), + e + ) + } + function _class(e) { + return Object.prototype.toString.call(e) + } + function isFunction(e) { + return '[object Function]' === _class(e) + } + function escapeRE(e) { + return e.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&') + } + var i = { + fuzzyLink: !0, + fuzzyEmail: !0, + fuzzyIP: !1, + } + var r = { + 'http:': { + validate: function (e, t, n) { + var i = e.slice(t) + return ( + n.re.http || + (n.re.http = new RegExp( + '^\\/\\/' + n.re.src_auth + n.re.src_host_port_strict + n.re.src_path, + 'i', + )), + n.re.http.test(i) ? i.match(n.re.http)[0].length : 0 + ) + }, + }, + 'https:': 'http:', + 'ftp:': 'http:', + '//': { + validate: function (e, t, n) { + var i = e.slice(t) + return ( + n.re.no_http || + (n.re.no_http = new RegExp( + '^' + + n.re.src_auth + + '(?:localhost|(?:(?:' + + n.re.src_domain + + ')\\.)+' + + n.re.src_domain_root + + ')' + + n.re.src_port + + n.re.src_host_terminator + + n.re.src_path, + 'i', + )), + n.re.no_http.test(i) + ? (t >= 3 && ':' === e[t - 3]) || (t >= 3 && '/' === e[t - 3]) + ? 0 + : i.match(n.re.no_http)[0].length + : 0 + ) + }, + }, + 'mailto:': { + validate: function (e, t, n) { + var i = e.slice(t) + return ( + n.re.mailto || + (n.re.mailto = new RegExp('^' + n.re.src_email_name + '@' + n.re.src_host_strict, 'i')), + n.re.mailto.test(i) ? i.match(n.re.mailto)[0].length : 0 + ) + }, + }, + }, + o = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|') + function compile(e) { + var t = (e.re = n(6582)(e.__opts__)), + i = e.__tlds__.slice() + function untpl(e) { + return e.replace('%TLDS%', t.src_tlds) + } + e.onCompile(), + e.__tlds_replaced__ || + i.push( + 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]', + ), + i.push(t.src_xn), + (t.src_tlds = i.join('|')), + (t.email_fuzzy = RegExp(untpl(t.tpl_email_fuzzy), 'i')), + (t.link_fuzzy = RegExp(untpl(t.tpl_link_fuzzy), 'i')), + (t.link_no_ip_fuzzy = RegExp(untpl(t.tpl_link_no_ip_fuzzy), 'i')), + (t.host_fuzzy_test = RegExp(untpl(t.tpl_host_fuzzy_test), 'i')) + var r = [] + function schemaError(e, t) { + throw new Error('(LinkifyIt) Invalid schema "' + e + '": ' + t) + } + ;(e.__compiled__ = {}), + Object.keys(e.__schemas__).forEach(function (t) { + var n = e.__schemas__[t] + if (null !== n) { + var i = { + validate: null, + link: null, + } + if (((e.__compiled__[t] = i), '[object Object]' === _class(n))) + return ( + !(function (e) { + return '[object RegExp]' === _class(e) + })(n.validate) + ? isFunction(n.validate) + ? (i.validate = n.validate) + : schemaError(t, n) + : (i.validate = (function (e) { + return function (t, n) { + var i = t.slice(n) + return e.test(i) ? i.match(e)[0].length : 0 + } + })(n.validate)), + void (isFunction(n.normalize) + ? (i.normalize = n.normalize) + : n.normalize + ? schemaError(t, n) + : (i.normalize = function (e, t) { + t.normalize(e) + })) + ) + !(function (e) { + return '[object String]' === _class(e) + })(n) + ? schemaError(t, n) + : r.push(t) + } + }), + r.forEach(function (t) { + e.__compiled__[e.__schemas__[t]] && + ((e.__compiled__[t].validate = e.__compiled__[e.__schemas__[t]].validate), + (e.__compiled__[t].normalize = e.__compiled__[e.__schemas__[t]].normalize)) + }), + (e.__compiled__[''] = { + validate: null, + normalize: function (e, t) { + t.normalize(e) + }, + }) + var o = Object.keys(e.__compiled__) + .filter(function (t) { + return t.length > 0 && e.__compiled__[t] + }) + .map(escapeRE) + .join('|') + ;(e.re.schema_test = RegExp('(^|(?!_)(?:[><|]|' + t.src_ZPCc + '))(' + o + ')', 'i')), + (e.re.schema_search = RegExp('(^|(?!_)(?:[><|]|' + t.src_ZPCc + '))(' + o + ')', 'ig')), + (e.re.schema_at_start = RegExp('^' + e.re.schema_search.source, 'i')), + (e.re.pretest = RegExp('(' + e.re.schema_test.source + ')|(' + e.re.host_fuzzy_test.source + ')|@', 'i')), + (function (e) { + ;(e.__index__ = -1), (e.__text_cache__ = '') + })(e) + } + function Match(e, t) { + var n = e.__index__, + i = e.__last_index__, + r = e.__text_cache__.slice(n, i) + ;(this.schema = e.__schema__.toLowerCase()), + (this.index = n + t), + (this.lastIndex = i + t), + (this.raw = r), + (this.text = r), + (this.url = r) + } + function createMatch(e, t) { + var n = new Match(e, t) + return e.__compiled__[n.schema].normalize(n, e), n + } + function LinkifyIt(e, t) { + if (!(this instanceof LinkifyIt)) return new LinkifyIt(e, t) + var n + t || + ((n = e), + Object.keys(n || {}).reduce(function (e, t) { + return e || i.hasOwnProperty(t) + }, !1) && ((t = e), (e = {}))), + (this.__opts__ = assign({}, i, t)), + (this.__index__ = -1), + (this.__last_index__ = -1), + (this.__schema__ = ''), + (this.__text_cache__ = ''), + (this.__schemas__ = assign({}, r, e)), + (this.__compiled__ = {}), + (this.__tlds__ = o), + (this.__tlds_replaced__ = !1), + (this.re = {}), + compile(this) + } + ;(LinkifyIt.prototype.add = function (e, t) { + return (this.__schemas__[e] = t), compile(this), this + }), + (LinkifyIt.prototype.set = function (e) { + return (this.__opts__ = assign(this.__opts__, e)), this + }), + (LinkifyIt.prototype.test = function (e) { + if (((this.__text_cache__ = e), (this.__index__ = -1), !e.length)) return !1 + var t, n, i, r, o, s, a, l + if (this.re.schema_test.test(e)) + for ((a = this.re.schema_search).lastIndex = 0; null !== (t = a.exec(e)); ) + if ((r = this.testSchemaAt(e, t[2], a.lastIndex))) { + ;(this.__schema__ = t[2]), + (this.__index__ = t.index + t[1].length), + (this.__last_index__ = t.index + t[0].length + r) + break + } + return ( + this.__opts__.fuzzyLink && + this.__compiled__['http:'] && + (l = e.search(this.re.host_fuzzy_test)) >= 0 && + (this.__index__ < 0 || l < this.__index__) && + null !== (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) && + ((o = n.index + n[1].length), + (this.__index__ < 0 || o < this.__index__) && + ((this.__schema__ = ''), (this.__index__ = o), (this.__last_index__ = n.index + n[0].length))), + this.__opts__.fuzzyEmail && + this.__compiled__['mailto:'] && + e.indexOf('@') >= 0 && + null !== (i = e.match(this.re.email_fuzzy)) && + ((o = i.index + i[1].length), + (s = i.index + i[0].length), + (this.__index__ < 0 || o < this.__index__ || (o === this.__index__ && s > this.__last_index__)) && + ((this.__schema__ = 'mailto:'), (this.__index__ = o), (this.__last_index__ = s))), + this.__index__ >= 0 + ) + }), + (LinkifyIt.prototype.pretest = function (e) { + return this.re.pretest.test(e) + }), + (LinkifyIt.prototype.testSchemaAt = function (e, t, n) { + return this.__compiled__[t.toLowerCase()] ? this.__compiled__[t.toLowerCase()].validate(e, n, this) : 0 + }), + (LinkifyIt.prototype.match = function (e) { + var t = 0, + n = [] + this.__index__ >= 0 && + this.__text_cache__ === e && + (n.push(createMatch(this, t)), (t = this.__last_index__)) + for (var i = t ? e.slice(t) : e; this.test(i); ) + n.push(createMatch(this, t)), (i = i.slice(this.__last_index__)), (t += this.__last_index__) + return n.length ? n : null + }), + (LinkifyIt.prototype.matchAtStart = function (e) { + if (((this.__text_cache__ = e), (this.__index__ = -1), !e.length)) return null + var t = this.re.schema_at_start.exec(e) + if (!t) return null + var n = this.testSchemaAt(e, t[2], t[0].length) + return n + ? ((this.__schema__ = t[2]), + (this.__index__ = t.index + t[1].length), + (this.__last_index__ = t.index + t[0].length + n), + createMatch(this, 0)) + : null + }), + (LinkifyIt.prototype.tlds = function (e, t) { + return ( + (e = Array.isArray(e) ? e : [e]), + t + ? ((this.__tlds__ = this.__tlds__ + .concat(e) + .sort() + .filter(function (e, t, n) { + return e !== n[t - 1] + }) + .reverse()), + compile(this), + this) + : ((this.__tlds__ = e.slice()), (this.__tlds_replaced__ = !0), compile(this), this) + ) + }), + (LinkifyIt.prototype.normalize = function (e) { + e.schema || (e.url = 'http://' + e.url), + 'mailto:' !== e.schema || /^mailto:/i.test(e.url) || (e.url = 'mailto:' + e.url) + }), + (LinkifyIt.prototype.onCompile = function () {}), + (e.exports = LinkifyIt) + }, + 6582: (e, t, n) => { + 'use strict' + e.exports = function (e) { + var t = {} + ;(e = e || {}), + (t.src_Any = n(1816).source), + (t.src_Cc = n(355).source), + (t.src_Z = n(21).source), + (t.src_P = n(6121).source), + (t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join('|')), + (t.src_ZCc = [t.src_Z, t.src_Cc].join('|')) + var i = '[><|]' + return ( + (t.src_pseudo_letter = '(?:(?![><|]|' + t.src_ZPCc + ')' + t.src_Any + ')'), + (t.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'), + (t.src_auth = '(?:(?:(?!' + t.src_ZCc + '|[@/\\[\\]()]).)+@)?'), + (t.src_port = '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?'), + (t.src_host_terminator = + '(?=$|[><|]|' + + t.src_ZPCc + + ')(?!' + + (e['---'] ? '-(?!--)|' : '-|') + + '_|:\\d|\\.-|\\.(?!$|' + + t.src_ZPCc + + '))'), + (t.src_path = + '(?:[/?#](?:(?!' + + t.src_ZCc + + '|' + + i + + '|[()[\\]{}.,"\'?!\\-;]).|\\[(?:(?!' + + t.src_ZCc + + '|\\]).)*\\]|\\((?:(?!' + + t.src_ZCc + + '|[)]).)*\\)|\\{(?:(?!' + + t.src_ZCc + + '|[}]).)*\\}|\\"(?:(?!' + + t.src_ZCc + + '|["]).)+\\"|\\\'(?:(?!' + + t.src_ZCc + + "|[']).)+\\'|\\'(?=" + + t.src_pseudo_letter + + '|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!' + + t.src_ZCc + + '|[.]|$)|' + + (e['---'] ? '\\-(?!--(?:[^-]|$))(?:-*)|' : '\\-+|') + + ',(?!' + + t.src_ZCc + + '|$)|;(?!' + + t.src_ZCc + + '|$)|\\!+(?!' + + t.src_ZCc + + '|[!]|$)|\\?(?!' + + t.src_ZCc + + '|[?]|$))+|\\/)?'), + (t.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'), + (t.src_xn = 'xn--[a-z0-9\\-]{1,59}'), + (t.src_domain_root = '(?:' + t.src_xn + '|' + t.src_pseudo_letter + '{1,63})'), + (t.src_domain = + '(?:' + + t.src_xn + + '|(?:' + + t.src_pseudo_letter + + ')|(?:' + + t.src_pseudo_letter + + '(?:-|' + + t.src_pseudo_letter + + '){0,61}' + + t.src_pseudo_letter + + '))'), + (t.src_host = '(?:(?:(?:(?:' + t.src_domain + ')\\.)*' + t.src_domain + '))'), + (t.tpl_host_fuzzy = '(?:' + t.src_ip4 + '|(?:(?:(?:' + t.src_domain + ')\\.)+(?:%TLDS%)))'), + (t.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + t.src_domain + ')\\.)+(?:%TLDS%))'), + (t.src_host_strict = t.src_host + t.src_host_terminator), + (t.tpl_host_fuzzy_strict = t.tpl_host_fuzzy + t.src_host_terminator), + (t.src_host_port_strict = t.src_host + t.src_port + t.src_host_terminator), + (t.tpl_host_port_fuzzy_strict = t.tpl_host_fuzzy + t.src_port + t.src_host_terminator), + (t.tpl_host_port_no_ip_fuzzy_strict = t.tpl_host_no_ip_fuzzy + t.src_port + t.src_host_terminator), + (t.tpl_host_fuzzy_test = 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + t.src_ZPCc + '|>|$))'), + (t.tpl_email_fuzzy = + '(^|[><|]|"|\\(|' + t.src_ZCc + ')(' + t.src_email_name + '@' + t.tpl_host_fuzzy_strict + ')'), + (t.tpl_link_fuzzy = + '(^|(?![.:/\\-_@])(?:[$+<=>^`||]|' + + t.src_ZPCc + + '))((?![$+<=>^`||])' + + t.tpl_host_port_fuzzy_strict + + t.src_path + + ')'), + (t.tpl_link_no_ip_fuzzy = + '(^|(?![.:/\\-_@])(?:[$+<=>^`||]|' + + t.src_ZPCc + + '))((?![$+<=>^`||])' + + t.tpl_host_port_no_ip_fuzzy_strict + + t.src_path + + ')'), + t + ) + } + }, + 4868: (e, t, n) => { + 'use strict' + e.exports = n(506) + }, + 4216: (e, t, n) => { + 'use strict' + e.exports = n(4058) + }, + 9606: (e) => { + 'use strict' + e.exports = [ + 'address', + 'article', + 'aside', + 'base', + 'basefont', + 'blockquote', + 'body', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dialog', + 'dir', + 'div', + 'dl', + 'dt', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hr', + 'html', + 'iframe', + 'legend', + 'li', + 'link', + 'main', + 'menu', + 'menuitem', + 'nav', + 'noframes', + 'ol', + 'optgroup', + 'option', + 'p', + 'param', + 'section', + 'source', + 'summary', + 'table', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + ] + }, + 8247: (e) => { + 'use strict' + var t = + '<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"\'=<>`\\x00-\\x20]+|\'[^\']*\'|"[^"]*"))?)*\\s*\\/?>', + n = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>', + i = new RegExp( + '^(?:' + + t + + '|' + + n + + '|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)', + ), + r = new RegExp('^(?:' + t + '|' + n + ')') + ;(e.exports.n = i), (e.exports.q = r) + }, + 9086: (e, t, n) => { + 'use strict' + var i = Object.prototype.hasOwnProperty + function has(e, t) { + return i.call(e, t) + } + function isValidEntityCode(e) { + return ( + !(e >= 55296 && e <= 57343) && + !(e >= 64976 && e <= 65007) && + 65535 != (65535 & e) && + 65534 != (65535 & e) && + !(e >= 0 && e <= 8) && + 11 !== e && + !(e >= 14 && e <= 31) && + !(e >= 127 && e <= 159) && + !(e > 1114111) + ) + } + function fromCodePoint(e) { + if (e > 65535) { + var t = 55296 + ((e -= 65536) >> 10), + n = 56320 + (1023 & e) + return String.fromCharCode(t, n) + } + return String.fromCharCode(e) + } + var r = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g, + o = new RegExp(r.source + '|' + /&([a-z#][a-z0-9]{1,31});/gi.source, 'gi'), + s = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i, + a = n(4216) + var l = /[&<>"]/, + c = /[&<>"]/g, + d = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + } + function replaceUnsafeChar(e) { + return d[e] + } + var p = /[.?*+^$[\]\\(){}|-]/g + var u = n(6121) + ;(t.lib = {}), + (t.lib.mdurl = n(3771)), + (t.lib.ucmicro = n(8274)), + (t.assign = function (e) { + var t = Array.prototype.slice.call(arguments, 1) + return ( + t.forEach(function (t) { + if (t) { + if ('object' != typeof t) throw new TypeError(t + 'must be object') + Object.keys(t).forEach(function (n) { + e[n] = t[n] + }) + } + }), + e + ) + }), + (t.isString = function (e) { + return ( + '[object String]' === + (function (e) { + return Object.prototype.toString.call(e) + })(e) + ) + }), + (t.has = has), + (t.unescapeMd = function (e) { + return e.indexOf('\\') < 0 ? e : e.replace(r, '$1') + }), + (t.unescapeAll = function (e) { + return e.indexOf('\\') < 0 && e.indexOf('&') < 0 + ? e + : e.replace(o, function (e, t, n) { + return ( + t || + (function (e, t) { + var n = 0 + return has(a, t) + ? a[t] + : 35 === t.charCodeAt(0) && + s.test(t) && + isValidEntityCode( + (n = 'x' === t[1].toLowerCase() ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10)), + ) + ? fromCodePoint(n) + : e + })(e, n) + ) + }) + }), + (t.isValidEntityCode = isValidEntityCode), + (t.fromCodePoint = fromCodePoint), + (t.escapeHtml = function (e) { + return l.test(e) ? e.replace(c, replaceUnsafeChar) : e + }), + (t.arrayReplaceAt = function (e, t, n) { + return [].concat(e.slice(0, t), n, e.slice(t + 1)) + }), + (t.isSpace = function (e) { + switch (e) { + case 9: + case 32: + return !0 + } + return !1 + }), + (t.isWhiteSpace = function (e) { + if (e >= 8192 && e <= 8202) return !0 + switch (e) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 160: + case 5760: + case 8239: + case 8287: + case 12288: + return !0 + } + return !1 + }), + (t.isMdAsciiPunct = function (e) { + switch (e) { + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 123: + case 124: + case 125: + case 126: + return !0 + default: + return !1 + } + }), + (t.isPunctChar = function (e) { + return u.test(e) + }), + (t.escapeRE = function (e) { + return e.replace(p, '\\$&') + }), + (t.normalizeReference = function (e) { + return ( + (e = e.trim().replace(/\s+/g, ' ')), + 'Ṿ' === 'ẞ'.toLowerCase() && (e = e.replace(/ẞ/g, 'ß')), + e.toLowerCase().toUpperCase() + ) + }) + }, + 9699: (e, t, n) => { + 'use strict' + ;(t.parseLinkLabel = n(9347)), (t.parseLinkDestination = n(6366)), (t.parseLinkTitle = n(9677)) + }, + 6366: (e, t, n) => { + 'use strict' + var i = n(9086).unescapeAll + e.exports = function (e, t, n) { + var r, + o, + s = t, + a = { + ok: !1, + pos: 0, + lines: 0, + str: '', + } + if (60 === e.charCodeAt(t)) { + for (t++; t < n; ) { + if (10 === (r = e.charCodeAt(t))) return a + if (60 === r) return a + if (62 === r) return (a.pos = t + 1), (a.str = i(e.slice(s + 1, t))), (a.ok = !0), a + 92 === r && t + 1 < n ? (t += 2) : t++ + } + return a + } + for (o = 0; t < n && 32 !== (r = e.charCodeAt(t)) && !(r < 32 || 127 === r); ) + if (92 === r && t + 1 < n) { + if (32 === e.charCodeAt(t + 1)) break + t += 2 + } else { + if (40 === r && ++o > 32) return a + if (41 === r) { + if (0 === o) break + o-- + } + t++ + } + return s === t || 0 !== o || ((a.str = i(e.slice(s, t))), (a.lines = 0), (a.pos = t), (a.ok = !0)), a + } + }, + 9347: (e) => { + 'use strict' + e.exports = function (e, t, n) { + var i, + r, + o, + s, + a = -1, + l = e.posMax, + c = e.pos + for (e.pos = t + 1, i = 1; e.pos < l; ) { + if (93 === (o = e.src.charCodeAt(e.pos)) && 0 === --i) { + r = !0 + break + } + if (((s = e.pos), e.md.inline.skipToken(e), 91 === o)) + if (s === e.pos - 1) i++ + else if (n) return (e.pos = c), -1 + } + return r && (a = e.pos), (e.pos = c), a + } + }, + 9677: (e, t, n) => { + 'use strict' + var i = n(9086).unescapeAll + e.exports = function (e, t, n) { + var r, + o, + s = 0, + a = t, + l = { + ok: !1, + pos: 0, + lines: 0, + str: '', + } + if (t >= n) return l + if (34 !== (o = e.charCodeAt(t)) && 39 !== o && 40 !== o) return l + for (t++, 40 === o && (o = 41); t < n; ) { + if ((r = e.charCodeAt(t)) === o) + return (l.pos = t + 1), (l.lines = s), (l.str = i(e.slice(a + 1, t))), (l.ok = !0), l + if (40 === r && 41 === o) return l + 10 === r ? s++ : 92 === r && t + 1 < n && (t++, 10 === e.charCodeAt(t) && s++), t++ + } + return l + } + }, + 506: (e, t, n) => { + 'use strict' + var i = n(9086), + r = n(9699), + o = n(3726), + s = n(7645), + a = n(9567), + l = n(8218), + c = n(7423), + d = n(3771), + p = n(2322), + u = { + default: n(8376), + zero: n(4105), + commonmark: n(6874), + }, + h = /^(vbscript|javascript|file|data):/, + m = /^data:image\/(gif|png|jpeg|webp);/ + function validateLink(e) { + var t = e.trim().toLowerCase() + return !h.test(t) || !!m.test(t) + } + var g = ['http:', 'https:', 'mailto:'] + function normalizeLink(e) { + var t = d.parse(e, !0) + if (t.hostname && (!t.protocol || g.indexOf(t.protocol) >= 0)) + try { + t.hostname = p.toASCII(t.hostname) + } catch (e) {} + return d.encode(d.format(t)) + } + function normalizeLinkText(e) { + var t = d.parse(e, !0) + if (t.hostname && (!t.protocol || g.indexOf(t.protocol) >= 0)) + try { + t.hostname = p.toUnicode(t.hostname) + } catch (e) {} + return d.decode(d.format(t), d.decode.defaultChars + '%') + } + function MarkdownIt(e, t) { + if (!(this instanceof MarkdownIt)) return new MarkdownIt(e, t) + t || i.isString(e) || ((t = e || {}), (e = 'default')), + (this.inline = new l()), + (this.block = new a()), + (this.core = new s()), + (this.renderer = new o()), + (this.linkify = new c()), + (this.validateLink = validateLink), + (this.normalizeLink = normalizeLink), + (this.normalizeLinkText = normalizeLinkText), + (this.utils = i), + (this.helpers = i.assign({}, r)), + (this.options = {}), + this.configure(e), + t && this.set(t) + } + ;(MarkdownIt.prototype.set = function (e) { + return i.assign(this.options, e), this + }), + (MarkdownIt.prototype.configure = function (e) { + var t, + n = this + if (i.isString(e) && !(e = u[(t = e)])) + throw new Error('Wrong `markdown-it` preset "' + t + '", check name') + if (!e) throw new Error("Wrong `markdown-it` preset, can't be empty") + return ( + e.options && n.set(e.options), + e.components && + Object.keys(e.components).forEach(function (t) { + e.components[t].rules && n[t].ruler.enableOnly(e.components[t].rules), + e.components[t].rules2 && n[t].ruler2.enableOnly(e.components[t].rules2) + }), + this + ) + }), + (MarkdownIt.prototype.enable = function (e, t) { + var n = [] + Array.isArray(e) || (e = [e]), + ['core', 'block', 'inline'].forEach(function (t) { + n = n.concat(this[t].ruler.enable(e, !0)) + }, this), + (n = n.concat(this.inline.ruler2.enable(e, !0))) + var i = e.filter(function (e) { + return n.indexOf(e) < 0 + }) + if (i.length && !t) throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + i) + return this + }), + (MarkdownIt.prototype.disable = function (e, t) { + var n = [] + Array.isArray(e) || (e = [e]), + ['core', 'block', 'inline'].forEach(function (t) { + n = n.concat(this[t].ruler.disable(e, !0)) + }, this), + (n = n.concat(this.inline.ruler2.disable(e, !0))) + var i = e.filter(function (e) { + return n.indexOf(e) < 0 + }) + if (i.length && !t) throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + i) + return this + }), + (MarkdownIt.prototype.use = function (e) { + var t = [this].concat(Array.prototype.slice.call(arguments, 1)) + return e.apply(e, t), this + }), + (MarkdownIt.prototype.parse = function (e, t) { + if ('string' != typeof e) throw new Error('Input data should be a String') + var n = new this.core.State(e, this, t) + return this.core.process(n), n.tokens + }), + (MarkdownIt.prototype.render = function (e, t) { + return (t = t || {}), this.renderer.render(this.parse(e, t), this.options, t) + }), + (MarkdownIt.prototype.parseInline = function (e, t) { + var n = new this.core.State(e, this, t) + return (n.inlineMode = !0), this.core.process(n), n.tokens + }), + (MarkdownIt.prototype.renderInline = function (e, t) { + return (t = t || {}), this.renderer.render(this.parseInline(e, t), this.options, t) + }), + (e.exports = MarkdownIt) + }, + 9567: (e, t, n) => { + 'use strict' + var i = n(5991), + r = [ + ['table', n(2674), ['paragraph', 'reference']], + ['code', n(7935)], + ['fence', n(9346), ['paragraph', 'reference', 'blockquote', 'list']], + ['blockquote', n(2048), ['paragraph', 'reference', 'blockquote', 'list']], + ['hr', n(791), ['paragraph', 'reference', 'blockquote', 'list']], + ['list', n(1937), ['paragraph', 'reference', 'blockquote']], + ['reference', n(8543)], + ['html_block', n(4224), ['paragraph', 'reference', 'blockquote']], + ['heading', n(284), ['paragraph', 'reference', 'blockquote']], + ['lheading', n(1084)], + ['paragraph', n(3097)], + ] + function ParserBlock() { + this.ruler = new i() + for (var e = 0; e < r.length; e++) + this.ruler.push(r[e][0], r[e][1], { + alt: (r[e][2] || []).slice(), + }) + } + ;(ParserBlock.prototype.tokenize = function (e, t, n) { + for ( + var i, r = this.ruler.getRules(''), o = r.length, s = t, a = !1, l = e.md.options.maxNesting; + s < n && ((e.line = s = e.skipEmptyLines(s)), !(s >= n)) && !(e.sCount[s] < e.blkIndent); + + ) { + if (e.level >= l) { + e.line = n + break + } + for (i = 0; i < o && !r[i](e, s, n, !1); i++); + ;(e.tight = !a), + e.isEmpty(e.line - 1) && (a = !0), + (s = e.line) < n && e.isEmpty(s) && ((a = !0), s++, (e.line = s)) + } + }), + (ParserBlock.prototype.parse = function (e, t, n, i) { + var r + e && ((r = new this.State(e, t, n, i)), this.tokenize(r, r.line, r.lineMax)) + }), + (ParserBlock.prototype.State = n(9562)), + (e.exports = ParserBlock) + }, + 7645: (e, t, n) => { + 'use strict' + var i = n(5991), + r = [ + ['normalize', n(3285)], + ['block', n(5185)], + ['inline', n(4420)], + ['linkify', n(2716)], + ['replacements', n(5643)], + ['smartquotes', n(3859)], + ['text_join', n(1418)], + ] + function Core() { + this.ruler = new i() + for (var e = 0; e < r.length; e++) this.ruler.push(r[e][0], r[e][1]) + } + ;(Core.prototype.process = function (e) { + var t, n, i + for (t = 0, n = (i = this.ruler.getRules('')).length; t < n; t++) i[t](e) + }), + (Core.prototype.State = n(5748)), + (e.exports = Core) + }, + 8218: (e, t, n) => { + 'use strict' + var i = n(5991), + r = [ + ['text', n(9431)], + ['linkify', n(2386)], + ['newline', n(7014)], + ['escape', n(5491)], + ['backticks', n(1389)], + ['strikethrough', n(1606).w], + ['emphasis', n(9639).w], + ['link', n(4771)], + ['image', n(4506)], + ['autolink', n(5837)], + ['html_inline', n(6425)], + ['entity', n(6277)], + ], + o = [ + ['balance_pairs', n(1503)], + ['strikethrough', n(1606).g], + ['emphasis', n(9639).g], + ['fragments_join', n(1305)], + ] + function ParserInline() { + var e + for (this.ruler = new i(), e = 0; e < r.length; e++) this.ruler.push(r[e][0], r[e][1]) + for (this.ruler2 = new i(), e = 0; e < o.length; e++) this.ruler2.push(o[e][0], o[e][1]) + } + ;(ParserInline.prototype.skipToken = function (e) { + var t, + n, + i = e.pos, + r = this.ruler.getRules(''), + o = r.length, + s = e.md.options.maxNesting, + a = e.cache + if (void 0 === a[i]) { + if (e.level < s) for (n = 0; n < o && (e.level++, (t = r[n](e, !0)), e.level--, !t); n++); + else e.pos = e.posMax + t || e.pos++, (a[i] = e.pos) + } else e.pos = a[i] + }), + (ParserInline.prototype.tokenize = function (e) { + for ( + var t, n, i = this.ruler.getRules(''), r = i.length, o = e.posMax, s = e.md.options.maxNesting; + e.pos < o; + + ) { + if (e.level < s) for (n = 0; n < r && !(t = i[n](e, !1)); n++); + if (t) { + if (e.pos >= o) break + } else e.pending += e.src[e.pos++] + } + e.pending && e.pushPending() + }), + (ParserInline.prototype.parse = function (e, t, n, i) { + var r, + o, + s, + a = new this.State(e, t, n, i) + for (this.tokenize(a), s = (o = this.ruler2.getRules('')).length, r = 0; r < s; r++) o[r](a) + }), + (ParserInline.prototype.State = n(5793)), + (e.exports = ParserInline) + }, + 6874: (e) => { + 'use strict' + e.exports = { + options: { + html: !0, + xhtmlOut: !0, + breaks: !1, + langPrefix: 'language-', + linkify: !1, + typographer: !1, + quotes: '“”‘’', + highlight: null, + maxNesting: 20, + }, + components: { + core: { + rules: ['normalize', 'block', 'inline', 'text_join'], + }, + block: { + rules: [ + 'blockquote', + 'code', + 'fence', + 'heading', + 'hr', + 'html_block', + 'lheading', + 'list', + 'reference', + 'paragraph', + ], + }, + inline: { + rules: [ + 'autolink', + 'backticks', + 'emphasis', + 'entity', + 'escape', + 'html_inline', + 'image', + 'link', + 'newline', + 'text', + ], + rules2: ['balance_pairs', 'emphasis', 'fragments_join'], + }, + }, + } + }, + 8376: (e) => { + 'use strict' + e.exports = { + options: { + html: !1, + xhtmlOut: !1, + breaks: !1, + langPrefix: 'language-', + linkify: !1, + typographer: !1, + quotes: '“”‘’', + highlight: null, + maxNesting: 100, + }, + components: { + core: {}, + block: {}, + inline: {}, + }, + } + }, + 4105: (e) => { + 'use strict' + e.exports = { + options: { + html: !1, + xhtmlOut: !1, + breaks: !1, + langPrefix: 'language-', + linkify: !1, + typographer: !1, + quotes: '“”‘’', + highlight: null, + maxNesting: 20, + }, + components: { + core: { + rules: ['normalize', 'block', 'inline', 'text_join'], + }, + block: { + rules: ['paragraph'], + }, + inline: { + rules: ['text'], + rules2: ['balance_pairs', 'fragments_join'], + }, + }, + } + }, + 3726: (e, t, n) => { + 'use strict' + var i = n(9086).assign, + r = n(9086).unescapeAll, + o = n(9086).escapeHtml, + s = {} + function Renderer() { + this.rules = i({}, s) + } + ;(s.code_inline = function (e, t, n, i, r) { + var s = e[t] + return '' + o(e[t].content) + '' + }), + (s.code_block = function (e, t, n, i, r) { + var s = e[t] + return '' + o(e[t].content) + '\n' + }), + (s.fence = function (e, t, n, i, s) { + var a, + l, + c, + d, + p, + u = e[t], + h = u.info ? r(u.info).trim() : '', + m = '', + g = '' + return ( + h && ((m = (c = h.split(/(\s+)/g))[0]), (g = c.slice(2).join(''))), + 0 === (a = (n.highlight && n.highlight(u.content, m, g)) || o(u.content)).indexOf('' + a + '\n') + : '
' + a + '
\n' + ) + }), + (s.image = function (e, t, n, i, r) { + var o = e[t] + return (o.attrs[o.attrIndex('alt')][1] = r.renderInlineAsText(o.children, n, i)), r.renderToken(e, t, n) + }), + (s.hardbreak = function (e, t, n) { + return n.xhtmlOut ? '
\n' : '
\n' + }), + (s.softbreak = function (e, t, n) { + return n.breaks ? (n.xhtmlOut ? '
\n' : '
\n') : '\n' + }), + (s.text = function (e, t) { + return o(e[t].content) + }), + (s.html_block = function (e, t) { + return e[t].content + }), + (s.html_inline = function (e, t) { + return e[t].content + }), + (Renderer.prototype.renderAttrs = function (e) { + var t, n, i + if (!e.attrs) return '' + for (i = '', t = 0, n = e.attrs.length; t < n; t++) + i += ' ' + o(e.attrs[t][0]) + '="' + o(e.attrs[t][1]) + '"' + return i + }), + (Renderer.prototype.renderToken = function (e, t, n) { + var i, + r = '', + o = !1, + s = e[t] + return s.hidden + ? '' + : (s.block && -1 !== s.nesting && t && e[t - 1].hidden && (r += '\n'), + (r += (-1 === s.nesting ? '\n' : '>')) + }), + (Renderer.prototype.renderInline = function (e, t, n) { + for (var i, r = '', o = this.rules, s = 0, a = e.length; s < a; s++) + void 0 !== o[(i = e[s].type)] ? (r += o[i](e, s, t, n, this)) : (r += this.renderToken(e, s, t)) + return r + }), + (Renderer.prototype.renderInlineAsText = function (e, t, n) { + for (var i = '', r = 0, o = e.length; r < o; r++) + 'text' === e[r].type + ? (i += e[r].content) + : 'image' === e[r].type + ? (i += this.renderInlineAsText(e[r].children, t, n)) + : 'softbreak' === e[r].type && (i += '\n') + return i + }), + (Renderer.prototype.render = function (e, t, n) { + var i, + r, + o, + s = '', + a = this.rules + for (i = 0, r = e.length; i < r; i++) + 'inline' === (o = e[i].type) + ? (s += this.renderInline(e[i].children, t, n)) + : void 0 !== a[o] + ? (s += a[e[i].type](e, i, t, n, this)) + : (s += this.renderToken(e, i, t, n)) + return s + }), + (e.exports = Renderer) + }, + 5991: (e) => { + 'use strict' + function Ruler() { + ;(this.__rules__ = []), (this.__cache__ = null) + } + ;(Ruler.prototype.__find__ = function (e) { + for (var t = 0; t < this.__rules__.length; t++) if (this.__rules__[t].name === e) return t + return -1 + }), + (Ruler.prototype.__compile__ = function () { + var e = this, + t = [''] + e.__rules__.forEach(function (e) { + e.enabled && + e.alt.forEach(function (e) { + t.indexOf(e) < 0 && t.push(e) + }) + }), + (e.__cache__ = {}), + t.forEach(function (t) { + ;(e.__cache__[t] = []), + e.__rules__.forEach(function (n) { + n.enabled && ((t && n.alt.indexOf(t) < 0) || e.__cache__[t].push(n.fn)) + }) + }) + }), + (Ruler.prototype.at = function (e, t, n) { + var i = this.__find__(e), + r = n || {} + if (-1 === i) throw new Error('Parser rule not found: ' + e) + ;(this.__rules__[i].fn = t), (this.__rules__[i].alt = r.alt || []), (this.__cache__ = null) + }), + (Ruler.prototype.before = function (e, t, n, i) { + var r = this.__find__(e), + o = i || {} + if (-1 === r) throw new Error('Parser rule not found: ' + e) + this.__rules__.splice(r, 0, { + name: t, + enabled: !0, + fn: n, + alt: o.alt || [], + }), + (this.__cache__ = null) + }), + (Ruler.prototype.after = function (e, t, n, i) { + var r = this.__find__(e), + o = i || {} + if (-1 === r) throw new Error('Parser rule not found: ' + e) + this.__rules__.splice(r + 1, 0, { + name: t, + enabled: !0, + fn: n, + alt: o.alt || [], + }), + (this.__cache__ = null) + }), + (Ruler.prototype.push = function (e, t, n) { + var i = n || {} + this.__rules__.push({ + name: e, + enabled: !0, + fn: t, + alt: i.alt || [], + }), + (this.__cache__ = null) + }), + (Ruler.prototype.enable = function (e, t) { + Array.isArray(e) || (e = [e]) + var n = [] + return ( + e.forEach(function (e) { + var i = this.__find__(e) + if (i < 0) { + if (t) return + throw new Error('Rules manager: invalid rule name ' + e) + } + ;(this.__rules__[i].enabled = !0), n.push(e) + }, this), + (this.__cache__ = null), + n + ) + }), + (Ruler.prototype.enableOnly = function (e, t) { + Array.isArray(e) || (e = [e]), + this.__rules__.forEach(function (e) { + e.enabled = !1 + }), + this.enable(e, t) + }), + (Ruler.prototype.disable = function (e, t) { + Array.isArray(e) || (e = [e]) + var n = [] + return ( + e.forEach(function (e) { + var i = this.__find__(e) + if (i < 0) { + if (t) return + throw new Error('Rules manager: invalid rule name ' + e) + } + ;(this.__rules__[i].enabled = !1), n.push(e) + }, this), + (this.__cache__ = null), + n + ) + }), + (Ruler.prototype.getRules = function (e) { + return null === this.__cache__ && this.__compile__(), this.__cache__[e] || [] + }), + (e.exports = Ruler) + }, + 2048: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + e.exports = function (e, t, n, r) { + var o, + s, + a, + l, + c, + d, + p, + u, + h, + m, + g, + _, + f, + y, + v, + b, + S, + C, + E, + T, + I = e.lineMax, + w = e.bMarks[t] + e.tShift[t], + A = e.eMarks[t] + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (62 !== e.src.charCodeAt(w++)) return !1 + if (r) return !0 + for ( + l = h = e.sCount[t] + 1, + 32 === e.src.charCodeAt(w) + ? (w++, l++, h++, (o = !1), (b = !0)) + : 9 === e.src.charCodeAt(w) + ? ((b = !0), (e.bsCount[t] + h) % 4 == 3 ? (w++, l++, h++, (o = !1)) : (o = !0)) + : (b = !1), + m = [e.bMarks[t]], + e.bMarks[t] = w; + w < A && ((s = e.src.charCodeAt(w)), i(s)); + + ) + 9 === s ? (h += 4 - ((h + e.bsCount[t] + (o ? 1 : 0)) % 4)) : h++, w++ + for ( + g = [e.bsCount[t]], + e.bsCount[t] = e.sCount[t] + 1 + (b ? 1 : 0), + d = w >= A, + y = [e.sCount[t]], + e.sCount[t] = h - l, + v = [e.tShift[t]], + e.tShift[t] = w - e.bMarks[t], + C = e.md.block.ruler.getRules('blockquote'), + f = e.parentType, + e.parentType = 'blockquote', + u = t + 1; + u < n && ((T = e.sCount[u] < e.blkIndent), !((w = e.bMarks[u] + e.tShift[u]) >= (A = e.eMarks[u]))); + u++ + ) + if (62 !== e.src.charCodeAt(w++) || T) { + if (d) break + for (S = !1, a = 0, c = C.length; a < c; a++) + if (C[a](e, u, n, !0)) { + S = !0 + break + } + if (S) { + ;(e.lineMax = u), + 0 !== e.blkIndent && + (m.push(e.bMarks[u]), + g.push(e.bsCount[u]), + v.push(e.tShift[u]), + y.push(e.sCount[u]), + (e.sCount[u] -= e.blkIndent)) + break + } + m.push(e.bMarks[u]), g.push(e.bsCount[u]), v.push(e.tShift[u]), y.push(e.sCount[u]), (e.sCount[u] = -1) + } else { + for ( + l = h = e.sCount[u] + 1, + 32 === e.src.charCodeAt(w) + ? (w++, l++, h++, (o = !1), (b = !0)) + : 9 === e.src.charCodeAt(w) + ? ((b = !0), (e.bsCount[u] + h) % 4 == 3 ? (w++, l++, h++, (o = !1)) : (o = !0)) + : (b = !1), + m.push(e.bMarks[u]), + e.bMarks[u] = w; + w < A && ((s = e.src.charCodeAt(w)), i(s)); + + ) + 9 === s ? (h += 4 - ((h + e.bsCount[u] + (o ? 1 : 0)) % 4)) : h++, w++ + ;(d = w >= A), + g.push(e.bsCount[u]), + (e.bsCount[u] = e.sCount[u] + 1 + (b ? 1 : 0)), + y.push(e.sCount[u]), + (e.sCount[u] = h - l), + v.push(e.tShift[u]), + (e.tShift[u] = w - e.bMarks[u]) + } + for ( + _ = e.blkIndent, + e.blkIndent = 0, + (E = e.push('blockquote_open', 'blockquote', 1)).markup = '>', + E.map = p = [t, 0], + e.md.block.tokenize(e, t, u), + (E = e.push('blockquote_close', 'blockquote', -1)).markup = '>', + e.lineMax = I, + e.parentType = f, + p[1] = e.line, + a = 0; + a < v.length; + a++ + ) + (e.bMarks[a + t] = m[a]), (e.tShift[a + t] = v[a]), (e.sCount[a + t] = y[a]), (e.bsCount[a + t] = g[a]) + return (e.blkIndent = _), !0 + } + }, + 7935: (e) => { + 'use strict' + e.exports = function (e, t, n) { + var i, r, o + if (e.sCount[t] - e.blkIndent < 4) return !1 + for (r = i = t + 1; i < n; ) + if (e.isEmpty(i)) i++ + else { + if (!(e.sCount[i] - e.blkIndent >= 4)) break + r = ++i + } + return ( + (e.line = r), + ((o = e.push('code_block', 'code', 0)).content = e.getLines(t, r, 4 + e.blkIndent, !1) + '\n'), + (o.map = [t, e.line]), + !0 + ) + } + }, + 9346: (e) => { + 'use strict' + e.exports = function (e, t, n, i) { + var r, + o, + s, + a, + l, + c, + d, + p = !1, + u = e.bMarks[t] + e.tShift[t], + h = e.eMarks[t] + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (u + 3 > h) return !1 + if (126 !== (r = e.src.charCodeAt(u)) && 96 !== r) return !1 + if (((l = u), (o = (u = e.skipChars(u, r)) - l) < 3)) return !1 + if (((d = e.src.slice(l, u)), (s = e.src.slice(u, h)), 96 === r && s.indexOf(String.fromCharCode(r)) >= 0)) + return !1 + if (i) return !0 + for ( + a = t; + !(++a >= n) && !((u = l = e.bMarks[a] + e.tShift[a]) < (h = e.eMarks[a]) && e.sCount[a] < e.blkIndent); + + ) + if ( + e.src.charCodeAt(u) === r && + !(e.sCount[a] - e.blkIndent >= 4 || (u = e.skipChars(u, r)) - l < o || (u = e.skipSpaces(u)) < h) + ) { + p = !0 + break + } + return ( + (o = e.sCount[t]), + (e.line = a + (p ? 1 : 0)), + ((c = e.push('fence', 'code', 0)).info = s), + (c.content = e.getLines(t + 1, a, o, !0)), + (c.markup = d), + (c.map = [t, e.line]), + !0 + ) + } + }, + 284: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + e.exports = function (e, t, n, r) { + var o, + s, + a, + l, + c = e.bMarks[t] + e.tShift[t], + d = e.eMarks[t] + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (35 !== (o = e.src.charCodeAt(c)) || c >= d) return !1 + for (s = 1, o = e.src.charCodeAt(++c); 35 === o && c < d && s <= 6; ) s++, (o = e.src.charCodeAt(++c)) + return ( + !(s > 6 || (c < d && !i(o))) && + (r || + ((d = e.skipSpacesBack(d, c)), + (a = e.skipCharsBack(d, 35, c)) > c && i(e.src.charCodeAt(a - 1)) && (d = a), + (e.line = t + 1), + ((l = e.push('heading_open', 'h' + String(s), 1)).markup = '########'.slice(0, s)), + (l.map = [t, e.line]), + ((l = e.push('inline', '', 0)).content = e.src.slice(c, d).trim()), + (l.map = [t, e.line]), + (l.children = []), + ((l = e.push('heading_close', 'h' + String(s), -1)).markup = '########'.slice(0, s))), + !0) + ) + } + }, + 791: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + e.exports = function (e, t, n, r) { + var o, + s, + a, + l, + c = e.bMarks[t] + e.tShift[t], + d = e.eMarks[t] + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (42 !== (o = e.src.charCodeAt(c++)) && 45 !== o && 95 !== o) return !1 + for (s = 1; c < d; ) { + if ((a = e.src.charCodeAt(c++)) !== o && !i(a)) return !1 + a === o && s++ + } + return ( + !(s < 3) && + (r || + ((e.line = t + 1), + ((l = e.push('hr', 'hr', 0)).map = [t, e.line]), + (l.markup = Array(s + 1).join(String.fromCharCode(o)))), + !0) + ) + } + }, + 4224: (e, t, n) => { + 'use strict' + var i = n(9606), + r = n(8247).q, + o = [ + [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0], + [/^/, !0], + [/^<\?/, /\?>/, !0], + [/^/, !0], + [/^/, !0], + [new RegExp('^|$))', 'i'), /^$/, !0], + [new RegExp(r.source + '\\s*$'), /^$/, !1], + ] + e.exports = function (e, t, n, i) { + var r, + s, + a, + l, + c = e.bMarks[t] + e.tShift[t], + d = e.eMarks[t] + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (!e.md.options.html) return !1 + if (60 !== e.src.charCodeAt(c)) return !1 + for (l = e.src.slice(c, d), r = 0; r < o.length && !o[r][0].test(l); r++); + if (r === o.length) return !1 + if (i) return o[r][2] + if (((s = t + 1), !o[r][1].test(l))) + for (; s < n && !(e.sCount[s] < e.blkIndent); s++) + if (((c = e.bMarks[s] + e.tShift[s]), (d = e.eMarks[s]), (l = e.src.slice(c, d)), o[r][1].test(l))) { + 0 !== l.length && s++ + break + } + return ( + (e.line = s), + ((a = e.push('html_block', '', 0)).map = [t, s]), + (a.content = e.getLines(t, s, e.blkIndent, !0)), + !0 + ) + } + }, + 1084: (e) => { + 'use strict' + e.exports = function (e, t, n) { + var i, + r, + o, + s, + a, + l, + c, + d, + p, + u, + h = t + 1, + m = e.md.block.ruler.getRules('paragraph') + if (e.sCount[t] - e.blkIndent >= 4) return !1 + for (u = e.parentType, e.parentType = 'paragraph'; h < n && !e.isEmpty(h); h++) + if (!(e.sCount[h] - e.blkIndent > 3)) { + if ( + e.sCount[h] >= e.blkIndent && + (l = e.bMarks[h] + e.tShift[h]) < (c = e.eMarks[h]) && + (45 === (p = e.src.charCodeAt(l)) || 61 === p) && + ((l = e.skipChars(l, p)), (l = e.skipSpaces(l)) >= c) + ) { + d = 61 === p ? 1 : 2 + break + } + if (!(e.sCount[h] < 0)) { + for (r = !1, o = 0, s = m.length; o < s; o++) + if (m[o](e, h, n, !0)) { + r = !0 + break + } + if (r) break + } + } + return ( + !!d && + ((i = e.getLines(t, h, e.blkIndent, !1).trim()), + (e.line = h + 1), + ((a = e.push('heading_open', 'h' + String(d), 1)).markup = String.fromCharCode(p)), + (a.map = [t, e.line]), + ((a = e.push('inline', '', 0)).content = i), + (a.map = [t, e.line - 1]), + (a.children = []), + ((a = e.push('heading_close', 'h' + String(d), -1)).markup = String.fromCharCode(p)), + (e.parentType = u), + !0) + ) + } + }, + 1937: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + function skipBulletListMarker(e, t) { + var n, r, o, s + return ( + (r = e.bMarks[t] + e.tShift[t]), + (o = e.eMarks[t]), + (42 !== (n = e.src.charCodeAt(r++)) && 45 !== n && 43 !== n) || + (r < o && ((s = e.src.charCodeAt(r)), !i(s))) + ? -1 + : r + ) + } + function skipOrderedListMarker(e, t) { + var n, + r = e.bMarks[t] + e.tShift[t], + o = r, + s = e.eMarks[t] + if (o + 1 >= s) return -1 + if ((n = e.src.charCodeAt(o++)) < 48 || n > 57) return -1 + for (;;) { + if (o >= s) return -1 + if (!((n = e.src.charCodeAt(o++)) >= 48 && n <= 57)) { + if (41 === n || 46 === n) break + return -1 + } + if (o - r >= 10) return -1 + } + return o < s && ((n = e.src.charCodeAt(o)), !i(n)) ? -1 : o + } + e.exports = function (e, t, n, i) { + var r, + o, + s, + a, + l, + c, + d, + p, + u, + h, + m, + g, + _, + f, + y, + v, + b, + S, + C, + E, + T, + I, + w, + A, + R, + x, + O, + N, + P = !1, + D = !0 + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (e.listIndent >= 0 && e.sCount[t] - e.listIndent >= 4 && e.sCount[t] < e.blkIndent) return !1 + if ( + (i && 'paragraph' === e.parentType && e.sCount[t] >= e.blkIndent && (P = !0), + (w = skipOrderedListMarker(e, t)) >= 0) + ) { + if (((d = !0), (R = e.bMarks[t] + e.tShift[t]), (_ = Number(e.src.slice(R, w - 1))), P && 1 !== _)) + return !1 + } else { + if (!((w = skipBulletListMarker(e, t)) >= 0)) return !1 + d = !1 + } + if (P && e.skipSpaces(w) >= e.eMarks[t]) return !1 + if (((g = e.src.charCodeAt(w - 1)), i)) return !0 + for ( + m = e.tokens.length, + d + ? ((N = e.push('ordered_list_open', 'ol', 1)), 1 !== _ && (N.attrs = [['start', _]])) + : (N = e.push('bullet_list_open', 'ul', 1)), + N.map = h = [t, 0], + N.markup = String.fromCharCode(g), + y = t, + A = !1, + O = e.md.block.ruler.getRules('list'), + S = e.parentType, + e.parentType = 'list'; + y < n; + + ) { + for (I = w, f = e.eMarks[y], c = v = e.sCount[y] + w - (e.bMarks[t] + e.tShift[t]); I < f; ) { + if (9 === (r = e.src.charCodeAt(I))) v += 4 - ((v + e.bsCount[y]) % 4) + else { + if (32 !== r) break + v++ + } + I++ + } + if ( + ((l = (o = I) >= f ? 1 : v - c) > 4 && (l = 1), + (a = c + l), + ((N = e.push('list_item_open', 'li', 1)).markup = String.fromCharCode(g)), + (N.map = p = [t, 0]), + d && (N.info = e.src.slice(R, w - 1)), + (T = e.tight), + (E = e.tShift[t]), + (C = e.sCount[t]), + (b = e.listIndent), + (e.listIndent = e.blkIndent), + (e.blkIndent = a), + (e.tight = !0), + (e.tShift[t] = o - e.bMarks[t]), + (e.sCount[t] = v), + o >= f && e.isEmpty(t + 1) ? (e.line = Math.min(e.line + 2, n)) : e.md.block.tokenize(e, t, n, !0), + (e.tight && !A) || (D = !1), + (A = e.line - t > 1 && e.isEmpty(e.line - 1)), + (e.blkIndent = e.listIndent), + (e.listIndent = b), + (e.tShift[t] = E), + (e.sCount[t] = C), + (e.tight = T), + ((N = e.push('list_item_close', 'li', -1)).markup = String.fromCharCode(g)), + (y = t = e.line), + (p[1] = y), + (o = e.bMarks[t]), + y >= n) + ) + break + if (e.sCount[y] < e.blkIndent) break + if (e.sCount[t] - e.blkIndent >= 4) break + for (x = !1, s = 0, u = O.length; s < u; s++) + if (O[s](e, y, n, !0)) { + x = !0 + break + } + if (x) break + if (d) { + if ((w = skipOrderedListMarker(e, y)) < 0) break + R = e.bMarks[y] + e.tShift[y] + } else if ((w = skipBulletListMarker(e, y)) < 0) break + if (g !== e.src.charCodeAt(w - 1)) break + } + return ( + ((N = d ? e.push('ordered_list_close', 'ol', -1) : e.push('bullet_list_close', 'ul', -1)).markup = + String.fromCharCode(g)), + (h[1] = y), + (e.line = y), + (e.parentType = S), + D && + (function (e, t) { + var n, + i, + r = e.level + 2 + for (n = t + 2, i = e.tokens.length - 2; n < i; n++) + e.tokens[n].level === r && + 'paragraph_open' === e.tokens[n].type && + ((e.tokens[n + 2].hidden = !0), (e.tokens[n].hidden = !0), (n += 2)) + })(e, m), + !0 + ) + } + }, + 3097: (e) => { + 'use strict' + e.exports = function (e, t) { + var n, + i, + r, + o, + s, + a, + l = t + 1, + c = e.md.block.ruler.getRules('paragraph'), + d = e.lineMax + for (a = e.parentType, e.parentType = 'paragraph'; l < d && !e.isEmpty(l); l++) + if (!(e.sCount[l] - e.blkIndent > 3 || e.sCount[l] < 0)) { + for (i = !1, r = 0, o = c.length; r < o; r++) + if (c[r](e, l, d, !0)) { + i = !0 + break + } + if (i) break + } + return ( + (n = e.getLines(t, l, e.blkIndent, !1).trim()), + (e.line = l), + ((s = e.push('paragraph_open', 'p', 1)).map = [t, e.line]), + ((s = e.push('inline', '', 0)).content = n), + (s.map = [t, e.line]), + (s.children = []), + (s = e.push('paragraph_close', 'p', -1)), + (e.parentType = a), + !0 + ) + } + }, + 8543: (e, t, n) => { + 'use strict' + var i = n(9086).normalizeReference, + r = n(9086).isSpace + e.exports = function (e, t, n, o) { + var s, + a, + l, + c, + d, + p, + u, + h, + m, + g, + _, + f, + y, + v, + b, + S, + C = 0, + E = e.bMarks[t] + e.tShift[t], + T = e.eMarks[t], + I = t + 1 + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if (91 !== e.src.charCodeAt(E)) return !1 + for (; ++E < T; ) + if (93 === e.src.charCodeAt(E) && 92 !== e.src.charCodeAt(E - 1)) { + if (E + 1 === T) return !1 + if (58 !== e.src.charCodeAt(E + 1)) return !1 + break + } + for ( + c = e.lineMax, b = e.md.block.ruler.getRules('reference'), g = e.parentType, e.parentType = 'reference'; + I < c && !e.isEmpty(I); + I++ + ) + if (!(e.sCount[I] - e.blkIndent > 3 || e.sCount[I] < 0)) { + for (v = !1, p = 0, u = b.length; p < u; p++) + if (b[p](e, I, c, !0)) { + v = !0 + break + } + if (v) break + } + for (T = (y = e.getLines(t, I, e.blkIndent, !1).trim()).length, E = 1; E < T; E++) { + if (91 === (s = y.charCodeAt(E))) return !1 + if (93 === s) { + m = E + break + } + ;(10 === s || (92 === s && ++E < T && 10 === y.charCodeAt(E))) && C++ + } + if (m < 0 || 58 !== y.charCodeAt(m + 1)) return !1 + for (E = m + 2; E < T; E++) + if (10 === (s = y.charCodeAt(E))) C++ + else if (!r(s)) break + if (!(_ = e.md.helpers.parseLinkDestination(y, E, T)).ok) return !1 + if (((d = e.md.normalizeLink(_.str)), !e.md.validateLink(d))) return !1 + for (a = E = _.pos, l = C += _.lines, f = E; E < T; E++) + if (10 === (s = y.charCodeAt(E))) C++ + else if (!r(s)) break + for ( + _ = e.md.helpers.parseLinkTitle(y, E, T), + E < T && f !== E && _.ok ? ((S = _.str), (E = _.pos), (C += _.lines)) : ((S = ''), (E = a), (C = l)); + E < T && ((s = y.charCodeAt(E)), r(s)); + + ) + E++ + if (E < T && 10 !== y.charCodeAt(E) && S) + for (S = '', E = a, C = l; E < T && ((s = y.charCodeAt(E)), r(s)); ) E++ + return ( + !(E < T && 10 !== y.charCodeAt(E)) && + !!(h = i(y.slice(1, m))) && + (o || + (void 0 === e.env.references && (e.env.references = {}), + void 0 === e.env.references[h] && + (e.env.references[h] = { + title: S, + href: d, + }), + (e.parentType = g), + (e.line = t + C + 1)), + !0) + ) + } + }, + 9562: (e, t, n) => { + 'use strict' + var i = n(8843), + r = n(9086).isSpace + function StateBlock(e, t, n, i) { + var o, s, a, l, c, d, p, u + for ( + this.src = e, + this.md = t, + this.env = n, + this.tokens = i, + this.bMarks = [], + this.eMarks = [], + this.tShift = [], + this.sCount = [], + this.bsCount = [], + this.blkIndent = 0, + this.line = 0, + this.lineMax = 0, + this.tight = !1, + this.ddIndent = -1, + this.listIndent = -1, + this.parentType = 'root', + this.level = 0, + this.result = '', + u = !1, + a = l = d = p = 0, + c = (s = this.src).length; + l < c; + l++ + ) { + if (((o = s.charCodeAt(l)), !u)) { + if (r(o)) { + d++, 9 === o ? (p += 4 - (p % 4)) : p++ + continue + } + u = !0 + } + ;(10 !== o && l !== c - 1) || + (10 !== o && l++, + this.bMarks.push(a), + this.eMarks.push(l), + this.tShift.push(d), + this.sCount.push(p), + this.bsCount.push(0), + (u = !1), + (d = 0), + (p = 0), + (a = l + 1)) + } + this.bMarks.push(s.length), + this.eMarks.push(s.length), + this.tShift.push(0), + this.sCount.push(0), + this.bsCount.push(0), + (this.lineMax = this.bMarks.length - 1) + } + ;(StateBlock.prototype.push = function (e, t, n) { + var r = new i(e, t, n) + return ( + (r.block = !0), n < 0 && this.level--, (r.level = this.level), n > 0 && this.level++, this.tokens.push(r), r + ) + }), + (StateBlock.prototype.isEmpty = function (e) { + return this.bMarks[e] + this.tShift[e] >= this.eMarks[e] + }), + (StateBlock.prototype.skipEmptyLines = function (e) { + for (var t = this.lineMax; e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++); + return e + }), + (StateBlock.prototype.skipSpaces = function (e) { + for (var t, n = this.src.length; e < n && ((t = this.src.charCodeAt(e)), r(t)); e++); + return e + }), + (StateBlock.prototype.skipSpacesBack = function (e, t) { + if (e <= t) return e + for (; e > t; ) if (!r(this.src.charCodeAt(--e))) return e + 1 + return e + }), + (StateBlock.prototype.skipChars = function (e, t) { + for (var n = this.src.length; e < n && this.src.charCodeAt(e) === t; e++); + return e + }), + (StateBlock.prototype.skipCharsBack = function (e, t, n) { + if (e <= n) return e + for (; e > n; ) if (t !== this.src.charCodeAt(--e)) return e + 1 + return e + }), + (StateBlock.prototype.getLines = function (e, t, n, i) { + var o, + s, + a, + l, + c, + d, + p, + u = e + if (e >= t) return '' + for (d = new Array(t - e), o = 0; u < t; u++, o++) { + for ( + s = 0, p = l = this.bMarks[u], c = u + 1 < t || i ? this.eMarks[u] + 1 : this.eMarks[u]; + l < c && s < n; + + ) { + if (((a = this.src.charCodeAt(l)), r(a))) 9 === a ? (s += 4 - ((s + this.bsCount[u]) % 4)) : s++ + else { + if (!(l - p < this.tShift[u])) break + s++ + } + l++ + } + d[o] = s > n ? new Array(s - n + 1).join(' ') + this.src.slice(l, c) : this.src.slice(l, c) + } + return d.join('') + }), + (StateBlock.prototype.Token = i), + (e.exports = StateBlock) + }, + 2674: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + function getLine(e, t) { + var n = e.bMarks[t] + e.tShift[t], + i = e.eMarks[t] + return e.src.slice(n, i) + } + function escapedSplit(e) { + var t, + n = [], + i = 0, + r = e.length, + o = !1, + s = 0, + a = '' + for (t = e.charCodeAt(i); i < r; ) + 124 === t && + (o ? ((a += e.substring(s, i - 1)), (s = i)) : (n.push(a + e.substring(s, i)), (a = ''), (s = i + 1))), + (o = 92 === t), + i++, + (t = e.charCodeAt(i)) + return n.push(a + e.substring(s)), n + } + e.exports = function (e, t, n, r) { + var o, s, a, l, c, d, p, u, h, m, g, _, f, y, v, b, S, C + if (t + 2 > n) return !1 + if (((d = t + 1), e.sCount[d] < e.blkIndent)) return !1 + if (e.sCount[d] - e.blkIndent >= 4) return !1 + if ((a = e.bMarks[d] + e.tShift[d]) >= e.eMarks[d]) return !1 + if (124 !== (S = e.src.charCodeAt(a++)) && 45 !== S && 58 !== S) return !1 + if (a >= e.eMarks[d]) return !1 + if (124 !== (C = e.src.charCodeAt(a++)) && 45 !== C && 58 !== C && !i(C)) return !1 + if (45 === S && i(C)) return !1 + for (; a < e.eMarks[d]; ) { + if (124 !== (o = e.src.charCodeAt(a)) && 45 !== o && 58 !== o && !i(o)) return !1 + a++ + } + for (p = (s = getLine(e, t + 1)).split('|'), m = [], l = 0; l < p.length; l++) { + if (!(g = p[l].trim())) { + if (0 === l || l === p.length - 1) continue + return !1 + } + if (!/^:?-+:?$/.test(g)) return !1 + 58 === g.charCodeAt(g.length - 1) + ? m.push(58 === g.charCodeAt(0) ? 'center' : 'right') + : 58 === g.charCodeAt(0) + ? m.push('left') + : m.push('') + } + if (-1 === (s = getLine(e, t).trim()).indexOf('|')) return !1 + if (e.sCount[t] - e.blkIndent >= 4) return !1 + if ( + ((p = escapedSplit(s)).length && '' === p[0] && p.shift(), + p.length && '' === p[p.length - 1] && p.pop(), + 0 === (u = p.length) || u !== m.length) + ) + return !1 + if (r) return !0 + for ( + y = e.parentType, + e.parentType = 'table', + b = e.md.block.ruler.getRules('blockquote'), + (h = e.push('table_open', 'table', 1)).map = _ = [t, 0], + (h = e.push('thead_open', 'thead', 1)).map = [t, t + 1], + (h = e.push('tr_open', 'tr', 1)).map = [t, t + 1], + l = 0; + l < p.length; + l++ + ) + (h = e.push('th_open', 'th', 1)), + m[l] && (h.attrs = [['style', 'text-align:' + m[l]]]), + ((h = e.push('inline', '', 0)).content = p[l].trim()), + (h.children = []), + (h = e.push('th_close', 'th', -1)) + for ( + h = e.push('tr_close', 'tr', -1), h = e.push('thead_close', 'thead', -1), d = t + 2; + d < n && !(e.sCount[d] < e.blkIndent); + d++ + ) { + for (v = !1, l = 0, c = b.length; l < c; l++) + if (b[l](e, d, n, !0)) { + v = !0 + break + } + if (v) break + if (!(s = getLine(e, d).trim())) break + if (e.sCount[d] - e.blkIndent >= 4) break + for ( + (p = escapedSplit(s)).length && '' === p[0] && p.shift(), + p.length && '' === p[p.length - 1] && p.pop(), + d === t + 2 && ((h = e.push('tbody_open', 'tbody', 1)).map = f = [t + 2, 0]), + (h = e.push('tr_open', 'tr', 1)).map = [d, d + 1], + l = 0; + l < u; + l++ + ) + (h = e.push('td_open', 'td', 1)), + m[l] && (h.attrs = [['style', 'text-align:' + m[l]]]), + ((h = e.push('inline', '', 0)).content = p[l] ? p[l].trim() : ''), + (h.children = []), + (h = e.push('td_close', 'td', -1)) + h = e.push('tr_close', 'tr', -1) + } + return ( + f && ((h = e.push('tbody_close', 'tbody', -1)), (f[1] = d)), + (h = e.push('table_close', 'table', -1)), + (_[1] = d), + (e.parentType = y), + (e.line = d), + !0 + ) + } + }, + 5185: (e) => { + 'use strict' + e.exports = function (e) { + var t + e.inlineMode + ? (((t = new e.Token('inline', '', 0)).content = e.src), + (t.map = [0, 1]), + (t.children = []), + e.tokens.push(t)) + : e.md.block.parse(e.src, e.md, e.env, e.tokens) + } + }, + 4420: (e) => { + 'use strict' + e.exports = function (e) { + var t, + n, + i, + r = e.tokens + for (n = 0, i = r.length; n < i; n++) + 'inline' === (t = r[n]).type && e.md.inline.parse(t.content, e.md, e.env, t.children) + } + }, + 2716: (e, t, n) => { + 'use strict' + var i = n(9086).arrayReplaceAt + function isLinkClose(e) { + return /^<\/a\s*>/i.test(e) + } + e.exports = function (e) { + var t, + n, + r, + o, + s, + a, + l, + c, + d, + p, + u, + h, + m, + g, + _, + f, + y, + v, + b = e.tokens + if (e.md.options.linkify) + for (n = 0, r = b.length; n < r; n++) + if ('inline' === b[n].type && e.md.linkify.pretest(b[n].content)) + for (m = 0, t = (o = b[n].children).length - 1; t >= 0; t--) + if ('link_close' !== (a = o[t]).type) { + if ( + ('html_inline' === a.type && + ((v = a.content), /^\s]/i.test(v) && m > 0 && m--, isLinkClose(a.content) && m++), + !(m > 0) && 'text' === a.type && e.md.linkify.test(a.content)) + ) { + for ( + d = a.content, + y = e.md.linkify.match(d), + l = [], + h = a.level, + u = 0, + y.length > 0 && + 0 === y[0].index && + t > 0 && + 'text_special' === o[t - 1].type && + (y = y.slice(1)), + c = 0; + c < y.length; + c++ + ) + (g = y[c].url), + (_ = e.md.normalizeLink(g)), + e.md.validateLink(_) && + ((f = y[c].text), + (f = y[c].schema + ? 'mailto:' !== y[c].schema || /^mailto:/i.test(f) + ? e.md.normalizeLinkText(f) + : e.md.normalizeLinkText('mailto:' + f).replace(/^mailto:/, '') + : e.md.normalizeLinkText('http://' + f).replace(/^http:\/\//, '')), + (p = y[c].index) > u && + (((s = new e.Token('text', '', 0)).content = d.slice(u, p)), (s.level = h), l.push(s)), + ((s = new e.Token('link_open', 'a', 1)).attrs = [['href', _]]), + (s.level = h++), + (s.markup = 'linkify'), + (s.info = 'auto'), + l.push(s), + ((s = new e.Token('text', '', 0)).content = f), + (s.level = h), + l.push(s), + ((s = new e.Token('link_close', 'a', -1)).level = --h), + (s.markup = 'linkify'), + (s.info = 'auto'), + l.push(s), + (u = y[c].lastIndex)) + u < d.length && + (((s = new e.Token('text', '', 0)).content = d.slice(u)), (s.level = h), l.push(s)), + (b[n].children = o = i(o, t, l)) + } + } else for (t--; o[t].level !== a.level && 'link_open' !== o[t].type; ) t-- + } + }, + 3285: (e) => { + 'use strict' + var t = /\r\n?|\n/g, + n = /\0/g + e.exports = function (e) { + var i + ;(i = (i = e.src.replace(t, '\n')).replace(n, '�')), (e.src = i) + } + }, + 5643: (e) => { + 'use strict' + var t = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, + n = /\((c|tm|r)\)/i, + i = /\((c|tm|r)\)/gi, + r = { + c: '©', + r: '®', + tm: '™', + } + function replaceFn(e, t) { + return r[t.toLowerCase()] + } + function replace_scoped(e) { + var t, + n, + r = 0 + for (t = e.length - 1; t >= 0; t--) + 'text' !== (n = e[t]).type || r || (n.content = n.content.replace(i, replaceFn)), + 'link_open' === n.type && 'auto' === n.info && r--, + 'link_close' === n.type && 'auto' === n.info && r++ + } + function replace_rare(e) { + var n, + i, + r = 0 + for (n = e.length - 1; n >= 0; n--) + 'text' !== (i = e[n]).type || + r || + (t.test(i.content) && + (i.content = i.content + .replace(/\+-/g, '±') + .replace(/\.{2,}/g, '…') + .replace(/([?!])…/g, '$1..') + .replace(/([?!]){4,}/g, '$1$1$1') + .replace(/,{2,}/g, ',') + .replace(/(^|[^-])---(?=[^-]|$)/gm, '$1—') + .replace(/(^|\s)--(?=\s|$)/gm, '$1–') + .replace(/(^|[^-\s])--(?=[^-\s]|$)/gm, '$1–'))), + 'link_open' === i.type && 'auto' === i.info && r--, + 'link_close' === i.type && 'auto' === i.info && r++ + } + e.exports = function (e) { + var i + if (e.md.options.typographer) + for (i = e.tokens.length - 1; i >= 0; i--) + 'inline' === e.tokens[i].type && + (n.test(e.tokens[i].content) && replace_scoped(e.tokens[i].children), + t.test(e.tokens[i].content) && replace_rare(e.tokens[i].children)) + } + }, + 3859: (e, t, n) => { + 'use strict' + var i = n(9086).isWhiteSpace, + r = n(9086).isPunctChar, + o = n(9086).isMdAsciiPunct, + s = /['"]/, + a = /['"]/g + function replaceAt(e, t, n) { + return e.slice(0, t) + n + e.slice(t + 1) + } + function process_inlines(e, t) { + var n, s, l, c, d, p, u, h, m, g, _, f, y, v, b, S, C, E, T, I, w + for (T = [], n = 0; n < e.length; n++) { + for (s = e[n], u = e[n].level, C = T.length - 1; C >= 0 && !(T[C].level <= u); C--); + if (((T.length = C + 1), 'text' === s.type)) { + ;(d = 0), (p = (l = s.content).length) + e: for (; d < p && ((a.lastIndex = d), (c = a.exec(l))); ) { + if (((b = S = !0), (d = c.index + 1), (E = "'" === c[0]), (m = 32), c.index - 1 >= 0)) + m = l.charCodeAt(c.index - 1) + else + for (C = n - 1; C >= 0 && 'softbreak' !== e[C].type && 'hardbreak' !== e[C].type; C--) + if (e[C].content) { + m = e[C].content.charCodeAt(e[C].content.length - 1) + break + } + if (((g = 32), d < p)) g = l.charCodeAt(d) + else + for (C = n + 1; C < e.length && 'softbreak' !== e[C].type && 'hardbreak' !== e[C].type; C++) + if (e[C].content) { + g = e[C].content.charCodeAt(0) + break + } + if ( + ((_ = o(m) || r(String.fromCharCode(m))), + (f = o(g) || r(String.fromCharCode(g))), + (y = i(m)), + (v = i(g)) ? (b = !1) : f && (y || _ || (b = !1)), + y ? (S = !1) : _ && (v || f || (S = !1)), + 34 === g && '"' === c[0] && m >= 48 && m <= 57 && (S = b = !1), + b && S && ((b = _), (S = f)), + b || S) + ) { + if (S) + for (C = T.length - 1; C >= 0 && ((h = T[C]), !(T[C].level < u)); C--) + if (h.single === E && T[C].level === u) { + ;(h = T[C]), + E + ? ((I = t.md.options.quotes[2]), (w = t.md.options.quotes[3])) + : ((I = t.md.options.quotes[0]), (w = t.md.options.quotes[1])), + (s.content = replaceAt(s.content, c.index, w)), + (e[h.token].content = replaceAt(e[h.token].content, h.pos, I)), + (d += w.length - 1), + h.token === n && (d += I.length - 1), + (p = (l = s.content).length), + (T.length = C) + continue e + } + b + ? T.push({ + token: n, + pos: c.index, + single: E, + level: u, + }) + : S && E && (s.content = replaceAt(s.content, c.index, '’')) + } else E && (s.content = replaceAt(s.content, c.index, '’')) + } + } + } + } + e.exports = function (e) { + var t + if (e.md.options.typographer) + for (t = e.tokens.length - 1; t >= 0; t--) + 'inline' === e.tokens[t].type && s.test(e.tokens[t].content) && process_inlines(e.tokens[t].children, e) + } + }, + 5748: (e, t, n) => { + 'use strict' + var i = n(8843) + function StateCore(e, t, n) { + ;(this.src = e), (this.env = n), (this.tokens = []), (this.inlineMode = !1), (this.md = t) + } + ;(StateCore.prototype.Token = i), (e.exports = StateCore) + }, + 1418: (e) => { + 'use strict' + e.exports = function (e) { + var t, + n, + i, + r, + o, + s, + a = e.tokens + for (t = 0, n = a.length; t < n; t++) + if ('inline' === a[t].type) { + for (o = (i = a[t].children).length, r = 0; r < o; r++) + 'text_special' === i[r].type && (i[r].type = 'text') + for (r = s = 0; r < o; r++) + 'text' === i[r].type && r + 1 < o && 'text' === i[r + 1].type + ? (i[r + 1].content = i[r].content + i[r + 1].content) + : (r !== s && (i[s] = i[r]), s++) + r !== s && (i.length = s) + } + } + }, + 5837: (e) => { + 'use strict' + var t = + /^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, + n = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/ + e.exports = function (e, i) { + var r, + o, + s, + a, + l, + c, + d = e.pos + if (60 !== e.src.charCodeAt(d)) return !1 + for (l = e.pos, c = e.posMax; ; ) { + if (++d >= c) return !1 + if (60 === (a = e.src.charCodeAt(d))) return !1 + if (62 === a) break + } + return ( + (r = e.src.slice(l + 1, d)), + n.test(r) + ? ((o = e.md.normalizeLink(r)), + !!e.md.validateLink(o) && + (i || + (((s = e.push('link_open', 'a', 1)).attrs = [['href', o]]), + (s.markup = 'autolink'), + (s.info = 'auto'), + ((s = e.push('text', '', 0)).content = e.md.normalizeLinkText(r)), + ((s = e.push('link_close', 'a', -1)).markup = 'autolink'), + (s.info = 'auto')), + (e.pos += r.length + 2), + !0)) + : !!t.test(r) && + ((o = e.md.normalizeLink('mailto:' + r)), + !!e.md.validateLink(o) && + (i || + (((s = e.push('link_open', 'a', 1)).attrs = [['href', o]]), + (s.markup = 'autolink'), + (s.info = 'auto'), + ((s = e.push('text', '', 0)).content = e.md.normalizeLinkText(r)), + ((s = e.push('link_close', 'a', -1)).markup = 'autolink'), + (s.info = 'auto')), + (e.pos += r.length + 2), + !0)) + ) + } + }, + 1389: (e) => { + 'use strict' + e.exports = function (e, t) { + var n, + i, + r, + o, + s, + a, + l, + c, + d = e.pos + if (96 !== e.src.charCodeAt(d)) return !1 + for (n = d, d++, i = e.posMax; d < i && 96 === e.src.charCodeAt(d); ) d++ + if (((l = (r = e.src.slice(n, d)).length), e.backticksScanned && (e.backticks[l] || 0) <= n)) + return t || (e.pending += r), (e.pos += l), !0 + for (s = a = d; -1 !== (s = e.src.indexOf('`', a)); ) { + for (a = s + 1; a < i && 96 === e.src.charCodeAt(a); ) a++ + if ((c = a - s) === l) + return ( + t || + (((o = e.push('code_inline', 'code', 0)).markup = r), + (o.content = e.src + .slice(d, s) + .replace(/\n/g, ' ') + .replace(/^ (.+) $/, '$1'))), + (e.pos = a), + !0 + ) + e.backticks[c] = s + } + return (e.backticksScanned = !0), t || (e.pending += r), (e.pos += l), !0 + } + }, + 1503: (e) => { + 'use strict' + function processDelimiters(e, t) { + var n, + i, + r, + o, + s, + a, + l, + c, + d = {}, + p = t.length + if (p) { + var u = 0, + h = -2, + m = [] + for (n = 0; n < p; n++) + if ( + ((r = t[n]), + m.push(0), + (t[u].marker === r.marker && h === r.token - 1) || (u = n), + (h = r.token), + (r.length = r.length || 0), + r.close) + ) { + for ( + d.hasOwnProperty(r.marker) || (d[r.marker] = [-1, -1, -1, -1, -1, -1]), + s = d[r.marker][(r.open ? 3 : 0) + (r.length % 3)], + a = i = u - m[u] - 1; + i > s; + i -= m[i] + 1 + ) + if ( + (o = t[i]).marker === r.marker && + o.open && + o.end < 0 && + ((l = !1), + (o.close || r.open) && + (o.length + r.length) % 3 == 0 && + ((o.length % 3 == 0 && r.length % 3 == 0) || (l = !0)), + !l) + ) { + ;(c = i > 0 && !t[i - 1].open ? m[i - 1] + 1 : 0), + (m[n] = n - i + c), + (m[i] = c), + (r.open = !1), + (o.end = n), + (o.close = !1), + (a = -1), + (h = -2) + break + } + ;-1 !== a && (d[r.marker][(r.open ? 3 : 0) + ((r.length || 0) % 3)] = a) + } + } + } + e.exports = function (e) { + var t, + n = e.tokens_meta, + i = e.tokens_meta.length + for (processDelimiters(0, e.delimiters), t = 0; t < i; t++) + n[t] && n[t].delimiters && processDelimiters(0, n[t].delimiters) + } + }, + 9639: (e) => { + 'use strict' + function postProcess(e, t) { + var n, i, r, o, s, a + for (n = t.length - 1; n >= 0; n--) + (95 !== (i = t[n]).marker && 42 !== i.marker) || + (-1 !== i.end && + ((r = t[i.end]), + (a = + n > 0 && + t[n - 1].end === i.end + 1 && + t[n - 1].marker === i.marker && + t[n - 1].token === i.token - 1 && + t[i.end + 1].token === r.token + 1), + (s = String.fromCharCode(i.marker)), + ((o = e.tokens[i.token]).type = a ? 'strong_open' : 'em_open'), + (o.tag = a ? 'strong' : 'em'), + (o.nesting = 1), + (o.markup = a ? s + s : s), + (o.content = ''), + ((o = e.tokens[r.token]).type = a ? 'strong_close' : 'em_close'), + (o.tag = a ? 'strong' : 'em'), + (o.nesting = -1), + (o.markup = a ? s + s : s), + (o.content = ''), + a && ((e.tokens[t[n - 1].token].content = ''), (e.tokens[t[i.end + 1].token].content = ''), n--))) + } + ;(e.exports.w = function (e, t) { + var n, + i, + r = e.pos, + o = e.src.charCodeAt(r) + if (t) return !1 + if (95 !== o && 42 !== o) return !1 + for (i = e.scanDelims(e.pos, 42 === o), n = 0; n < i.length; n++) + (e.push('text', '', 0).content = String.fromCharCode(o)), + e.delimiters.push({ + marker: o, + length: i.length, + token: e.tokens.length - 1, + end: -1, + open: i.can_open, + close: i.can_close, + }) + return (e.pos += i.length), !0 + }), + (e.exports.g = function (e) { + var t, + n = e.tokens_meta, + i = e.tokens_meta.length + for (postProcess(e, e.delimiters), t = 0; t < i; t++) + n[t] && n[t].delimiters && postProcess(e, n[t].delimiters) + }) + }, + 6277: (e, t, n) => { + 'use strict' + var i = n(4216), + r = n(9086).has, + o = n(9086).isValidEntityCode, + s = n(9086).fromCodePoint, + a = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, + l = /^&([a-z][a-z0-9]{1,31});/i + e.exports = function (e, t) { + var n, + c, + d, + p = e.pos, + u = e.posMax + if (38 !== e.src.charCodeAt(p)) return !1 + if (p + 1 >= u) return !1 + if (35 === e.src.charCodeAt(p + 1)) { + if ((c = e.src.slice(p).match(a))) + return ( + t || + ((n = 'x' === c[1][0].toLowerCase() ? parseInt(c[1].slice(1), 16) : parseInt(c[1], 10)), + ((d = e.push('text_special', '', 0)).content = o(n) ? s(n) : s(65533)), + (d.markup = c[0]), + (d.info = 'entity')), + (e.pos += c[0].length), + !0 + ) + } else if ((c = e.src.slice(p).match(l)) && r(i, c[1])) + return ( + t || (((d = e.push('text_special', '', 0)).content = i[c[1]]), (d.markup = c[0]), (d.info = 'entity')), + (e.pos += c[0].length), + !0 + ) + return !1 + } + }, + 5491: (e, t, n) => { + 'use strict' + for (var i = n(9086).isSpace, r = [], o = 0; o < 256; o++) r.push(0) + '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (e) { + r[e.charCodeAt(0)] = 1 + }), + (e.exports = function (e, t) { + var n, + o, + s, + a, + l, + c = e.pos, + d = e.posMax + if (92 !== e.src.charCodeAt(c)) return !1 + if (++c >= d) return !1 + if (10 === (n = e.src.charCodeAt(c))) { + for (t || e.push('hardbreak', 'br', 0), c++; c < d && ((n = e.src.charCodeAt(c)), i(n)); ) c++ + return (e.pos = c), !0 + } + return ( + (a = e.src[c]), + n >= 55296 && + n <= 56319 && + c + 1 < d && + (o = e.src.charCodeAt(c + 1)) >= 56320 && + o <= 57343 && + ((a += e.src[c + 1]), c++), + (s = '\\' + a), + t || + ((l = e.push('text_special', '', 0)), + n < 256 && 0 !== r[n] ? (l.content = a) : (l.content = s), + (l.markup = s), + (l.info = 'escape')), + (e.pos = c + 1), + !0 + ) + }) + }, + 1305: (e) => { + 'use strict' + e.exports = function (e) { + var t, + n, + i = 0, + r = e.tokens, + o = e.tokens.length + for (t = n = 0; t < o; t++) + r[t].nesting < 0 && i--, + (r[t].level = i), + r[t].nesting > 0 && i++, + 'text' === r[t].type && t + 1 < o && 'text' === r[t + 1].type + ? (r[t + 1].content = r[t].content + r[t + 1].content) + : (t !== n && (r[n] = r[t]), n++) + t !== n && (r.length = n) + } + }, + 6425: (e, t, n) => { + 'use strict' + var i = n(8247).n + e.exports = function (e, t) { + var n, + r, + o, + s, + a, + l = e.pos + return ( + !!e.md.options.html && + ((o = e.posMax), + !(60 !== e.src.charCodeAt(l) || l + 2 >= o) && + !( + 33 !== (n = e.src.charCodeAt(l + 1)) && + 63 !== n && + 47 !== n && + !(function (e) { + var t = 32 | e + return t >= 97 && t <= 122 + })(n) + ) && + !!(r = e.src.slice(l).match(i)) && + (t || + (((s = e.push('html_inline', '', 0)).content = e.src.slice(l, l + r[0].length)), + (a = s.content), + /^\s]/i.test(a) && e.linkLevel++, + (function (e) { + return /^<\/a\s*>/i.test(e) + })(s.content) && e.linkLevel--), + (e.pos += r[0].length), + !0)) + ) + } + }, + 4506: (e, t, n) => { + 'use strict' + var i = n(9086).normalizeReference, + r = n(9086).isSpace + e.exports = function (e, t) { + var n, + o, + s, + a, + l, + c, + d, + p, + u, + h, + m, + g, + _, + f = '', + y = e.pos, + v = e.posMax + if (33 !== e.src.charCodeAt(e.pos)) return !1 + if (91 !== e.src.charCodeAt(e.pos + 1)) return !1 + if (((c = e.pos + 2), (l = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1)) < 0)) return !1 + if ((d = l + 1) < v && 40 === e.src.charCodeAt(d)) { + for (d++; d < v && ((o = e.src.charCodeAt(d)), r(o) || 10 === o); d++); + if (d >= v) return !1 + for ( + _ = d, + (u = e.md.helpers.parseLinkDestination(e.src, d, e.posMax)).ok && + ((f = e.md.normalizeLink(u.str)), e.md.validateLink(f) ? (d = u.pos) : (f = '')), + _ = d; + d < v && ((o = e.src.charCodeAt(d)), r(o) || 10 === o); + d++ + ); + if (((u = e.md.helpers.parseLinkTitle(e.src, d, e.posMax)), d < v && _ !== d && u.ok)) + for (h = u.str, d = u.pos; d < v && ((o = e.src.charCodeAt(d)), r(o) || 10 === o); d++); + else h = '' + if (d >= v || 41 !== e.src.charCodeAt(d)) return (e.pos = y), !1 + d++ + } else { + if (void 0 === e.env.references) return !1 + if ( + (d < v && 91 === e.src.charCodeAt(d) + ? ((_ = d + 1), (d = e.md.helpers.parseLinkLabel(e, d)) >= 0 ? (a = e.src.slice(_, d++)) : (d = l + 1)) + : (d = l + 1), + a || (a = e.src.slice(c, l)), + !(p = e.env.references[i(a)])) + ) + return (e.pos = y), !1 + ;(f = p.href), (h = p.title) + } + return ( + t || + ((s = e.src.slice(c, l)), + e.md.inline.parse(s, e.md, e.env, (g = [])), + ((m = e.push('image', 'img', 0)).attrs = n = + [ + ['src', f], + ['alt', ''], + ]), + (m.children = g), + (m.content = s), + h && n.push(['title', h])), + (e.pos = d), + (e.posMax = v), + !0 + ) + } + }, + 4771: (e, t, n) => { + 'use strict' + var i = n(9086).normalizeReference, + r = n(9086).isSpace + e.exports = function (e, t) { + var n, + o, + s, + a, + l, + c, + d, + p, + u = '', + h = '', + m = e.pos, + g = e.posMax, + _ = e.pos, + f = !0 + if (91 !== e.src.charCodeAt(e.pos)) return !1 + if (((l = e.pos + 1), (a = e.md.helpers.parseLinkLabel(e, e.pos, !0)) < 0)) return !1 + if ((c = a + 1) < g && 40 === e.src.charCodeAt(c)) { + for (f = !1, c++; c < g && ((o = e.src.charCodeAt(c)), r(o) || 10 === o); c++); + if (c >= g) return !1 + if (((_ = c), (d = e.md.helpers.parseLinkDestination(e.src, c, e.posMax)).ok)) { + for ( + u = e.md.normalizeLink(d.str), e.md.validateLink(u) ? (c = d.pos) : (u = ''), _ = c; + c < g && ((o = e.src.charCodeAt(c)), r(o) || 10 === o); + c++ + ); + if (((d = e.md.helpers.parseLinkTitle(e.src, c, e.posMax)), c < g && _ !== c && d.ok)) + for (h = d.str, c = d.pos; c < g && ((o = e.src.charCodeAt(c)), r(o) || 10 === o); c++); + } + ;(c >= g || 41 !== e.src.charCodeAt(c)) && (f = !0), c++ + } + if (f) { + if (void 0 === e.env.references) return !1 + if ( + (c < g && 91 === e.src.charCodeAt(c) + ? ((_ = c + 1), (c = e.md.helpers.parseLinkLabel(e, c)) >= 0 ? (s = e.src.slice(_, c++)) : (c = a + 1)) + : (c = a + 1), + s || (s = e.src.slice(l, a)), + !(p = e.env.references[i(s)])) + ) + return (e.pos = m), !1 + ;(u = p.href), (h = p.title) + } + return ( + t || + ((e.pos = l), + (e.posMax = a), + (e.push('link_open', 'a', 1).attrs = n = [['href', u]]), + h && n.push(['title', h]), + e.linkLevel++, + e.md.inline.tokenize(e), + e.linkLevel--, + e.push('link_close', 'a', -1)), + (e.pos = c), + (e.posMax = g), + !0 + ) + } + }, + 2386: (e) => { + 'use strict' + var t = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i + e.exports = function (e, n) { + var i, r, o, s, a, l, c + return ( + !!e.md.options.linkify && + !(e.linkLevel > 0) && + !((i = e.pos) + 3 > e.posMax) && + 58 === e.src.charCodeAt(i) && + 47 === e.src.charCodeAt(i + 1) && + 47 === e.src.charCodeAt(i + 2) && + !!(r = e.pending.match(t)) && + ((o = r[1]), + !!(s = e.md.linkify.matchAtStart(e.src.slice(i - o.length))) && + ((a = (a = s.url).replace(/\*+$/, '')), + (l = e.md.normalizeLink(a)), + !!e.md.validateLink(l) && + (n || + ((e.pending = e.pending.slice(0, -o.length)), + ((c = e.push('link_open', 'a', 1)).attrs = [['href', l]]), + (c.markup = 'linkify'), + (c.info = 'auto'), + ((c = e.push('text', '', 0)).content = e.md.normalizeLinkText(a)), + ((c = e.push('link_close', 'a', -1)).markup = 'linkify'), + (c.info = 'auto')), + (e.pos += a.length - o.length), + !0))) + ) + } + }, + 7014: (e, t, n) => { + 'use strict' + var i = n(9086).isSpace + e.exports = function (e, t) { + var n, + r, + o, + s = e.pos + if (10 !== e.src.charCodeAt(s)) return !1 + if (((n = e.pending.length - 1), (r = e.posMax), !t)) + if (n >= 0 && 32 === e.pending.charCodeAt(n)) + if (n >= 1 && 32 === e.pending.charCodeAt(n - 1)) { + for (o = n - 1; o >= 1 && 32 === e.pending.charCodeAt(o - 1); ) o-- + ;(e.pending = e.pending.slice(0, o)), e.push('hardbreak', 'br', 0) + } else (e.pending = e.pending.slice(0, -1)), e.push('softbreak', 'br', 0) + else e.push('softbreak', 'br', 0) + for (s++; s < r && i(e.src.charCodeAt(s)); ) s++ + return (e.pos = s), !0 + } + }, + 5793: (e, t, n) => { + 'use strict' + var i = n(8843), + r = n(9086).isWhiteSpace, + o = n(9086).isPunctChar, + s = n(9086).isMdAsciiPunct + function StateInline(e, t, n, i) { + ;(this.src = e), + (this.env = n), + (this.md = t), + (this.tokens = i), + (this.tokens_meta = Array(i.length)), + (this.pos = 0), + (this.posMax = this.src.length), + (this.level = 0), + (this.pending = ''), + (this.pendingLevel = 0), + (this.cache = {}), + (this.delimiters = []), + (this._prev_delimiters = []), + (this.backticks = {}), + (this.backticksScanned = !1), + (this.linkLevel = 0) + } + ;(StateInline.prototype.pushPending = function () { + var e = new i('text', '', 0) + return (e.content = this.pending), (e.level = this.pendingLevel), this.tokens.push(e), (this.pending = ''), e + }), + (StateInline.prototype.push = function (e, t, n) { + this.pending && this.pushPending() + var r = new i(e, t, n), + o = null + return ( + n < 0 && (this.level--, (this.delimiters = this._prev_delimiters.pop())), + (r.level = this.level), + n > 0 && + (this.level++, + this._prev_delimiters.push(this.delimiters), + (this.delimiters = []), + (o = { + delimiters: this.delimiters, + })), + (this.pendingLevel = this.level), + this.tokens.push(r), + this.tokens_meta.push(o), + r + ) + }), + (StateInline.prototype.scanDelims = function (e, t) { + var n, + i, + a, + l, + c, + d, + p, + u, + h, + m = e, + g = !0, + _ = !0, + f = this.posMax, + y = this.src.charCodeAt(e) + for (n = e > 0 ? this.src.charCodeAt(e - 1) : 32; m < f && this.src.charCodeAt(m) === y; ) m++ + return ( + (a = m - e), + (i = m < f ? this.src.charCodeAt(m) : 32), + (p = s(n) || o(String.fromCharCode(n))), + (h = s(i) || o(String.fromCharCode(i))), + (d = r(n)), + (u = r(i)) ? (g = !1) : h && (d || p || (g = !1)), + d ? (_ = !1) : p && (u || h || (_ = !1)), + t ? ((l = g), (c = _)) : ((l = g && (!_ || p)), (c = _ && (!g || h))), + { + can_open: l, + can_close: c, + length: a, + } + ) + }), + (StateInline.prototype.Token = i), + (e.exports = StateInline) + }, + 1606: (e) => { + 'use strict' + function postProcess(e, t) { + var n, + i, + r, + o, + s, + a = [], + l = t.length + for (n = 0; n < l; n++) + 126 === (r = t[n]).marker && + -1 !== r.end && + ((o = t[r.end]), + ((s = e.tokens[r.token]).type = 's_open'), + (s.tag = 's'), + (s.nesting = 1), + (s.markup = '~~'), + (s.content = ''), + ((s = e.tokens[o.token]).type = 's_close'), + (s.tag = 's'), + (s.nesting = -1), + (s.markup = '~~'), + (s.content = ''), + 'text' === e.tokens[o.token - 1].type && '~' === e.tokens[o.token - 1].content && a.push(o.token - 1)) + for (; a.length; ) { + for (i = (n = a.pop()) + 1; i < e.tokens.length && 's_close' === e.tokens[i].type; ) i++ + n !== --i && ((s = e.tokens[i]), (e.tokens[i] = e.tokens[n]), (e.tokens[n] = s)) + } + } + ;(e.exports.w = function (e, t) { + var n, + i, + r, + o, + s = e.pos, + a = e.src.charCodeAt(s) + if (t) return !1 + if (126 !== a) return !1 + if (((r = (i = e.scanDelims(e.pos, !0)).length), (o = String.fromCharCode(a)), r < 2)) return !1 + for (r % 2 && ((e.push('text', '', 0).content = o), r--), n = 0; n < r; n += 2) + (e.push('text', '', 0).content = o + o), + e.delimiters.push({ + marker: a, + length: 0, + token: e.tokens.length - 1, + end: -1, + open: i.can_open, + close: i.can_close, + }) + return (e.pos += i.length), !0 + }), + (e.exports.g = function (e) { + var t, + n = e.tokens_meta, + i = e.tokens_meta.length + for (postProcess(e, e.delimiters), t = 0; t < i; t++) + n[t] && n[t].delimiters && postProcess(e, n[t].delimiters) + }) + }, + 9431: (e) => { + 'use strict' + function isTerminatorChar(e) { + switch (e) { + case 10: + case 33: + case 35: + case 36: + case 37: + case 38: + case 42: + case 43: + case 45: + case 58: + case 60: + case 61: + case 62: + case 64: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 123: + case 125: + case 126: + return !0 + default: + return !1 + } + } + e.exports = function (e, t) { + for (var n = e.pos; n < e.posMax && !isTerminatorChar(e.src.charCodeAt(n)); ) n++ + return n !== e.pos && (t || (e.pending += e.src.slice(e.pos, n)), (e.pos = n), !0) + } + }, + 8843: (e) => { + 'use strict' + function Token(e, t, n) { + ;(this.type = e), + (this.tag = t), + (this.attrs = null), + (this.map = null), + (this.nesting = n), + (this.level = 0), + (this.children = null), + (this.content = ''), + (this.markup = ''), + (this.info = ''), + (this.meta = null), + (this.block = !1), + (this.hidden = !1) + } + ;(Token.prototype.attrIndex = function (e) { + var t, n, i + if (!this.attrs) return -1 + for (n = 0, i = (t = this.attrs).length; n < i; n++) if (t[n][0] === e) return n + return -1 + }), + (Token.prototype.attrPush = function (e) { + this.attrs ? this.attrs.push(e) : (this.attrs = [e]) + }), + (Token.prototype.attrSet = function (e, t) { + var n = this.attrIndex(e), + i = [e, t] + n < 0 ? this.attrPush(i) : (this.attrs[n] = i) + }), + (Token.prototype.attrGet = function (e) { + var t = this.attrIndex(e), + n = null + return t >= 0 && (n = this.attrs[t][1]), n + }), + (Token.prototype.attrJoin = function (e, t) { + var n = this.attrIndex(e) + n < 0 ? this.attrPush([e, t]) : (this.attrs[n][1] = this.attrs[n][1] + ' ' + t) + }), + (e.exports = Token) + }, + 5036: (e) => { + 'use strict' + var t = {} + function decode(e, n) { + var i + return ( + 'string' != typeof n && (n = decode.defaultChars), + (i = (function (e) { + var n, + i, + r = t[e] + if (r) return r + for (r = t[e] = [], n = 0; n < 128; n++) (i = String.fromCharCode(n)), r.push(i) + for (n = 0; n < e.length; n++) + r[(i = e.charCodeAt(n))] = '%' + ('0' + i.toString(16).toUpperCase()).slice(-2) + return r + })(n)), + e.replace(/(%[a-f0-9]{2})+/gi, function (e) { + var t, + n, + r, + o, + s, + a, + l, + c = '' + for (t = 0, n = e.length; t < n; t += 3) + (r = parseInt(e.slice(t + 1, t + 3), 16)) < 128 + ? (c += i[r]) + : 192 == (224 & r) && t + 3 < n && 128 == (192 & (o = parseInt(e.slice(t + 4, t + 6), 16))) + ? ((c += (l = ((r << 6) & 1984) | (63 & o)) < 128 ? '��' : String.fromCharCode(l)), (t += 3)) + : 224 == (240 & r) && + t + 6 < n && + ((o = parseInt(e.slice(t + 4, t + 6), 16)), + (s = parseInt(e.slice(t + 7, t + 9), 16)), + 128 == (192 & o) && 128 == (192 & s)) + ? ((c += + (l = ((r << 12) & 61440) | ((o << 6) & 4032) | (63 & s)) < 2048 || (l >= 55296 && l <= 57343) + ? '���' + : String.fromCharCode(l)), + (t += 6)) + : 240 == (248 & r) && + t + 9 < n && + ((o = parseInt(e.slice(t + 4, t + 6), 16)), + (s = parseInt(e.slice(t + 7, t + 9), 16)), + (a = parseInt(e.slice(t + 10, t + 12), 16)), + 128 == (192 & o) && 128 == (192 & s) && 128 == (192 & a)) + ? ((l = ((r << 18) & 1835008) | ((o << 12) & 258048) | ((s << 6) & 4032) | (63 & a)) < 65536 || + l > 1114111 + ? (c += '����') + : ((l -= 65536), (c += String.fromCharCode(55296 + (l >> 10), 56320 + (1023 & l)))), + (t += 9)) + : (c += '�') + return c + }) + ) + } + ;(decode.defaultChars = ';/?:@&=+$,#'), (decode.componentChars = ''), (e.exports = decode) + }, + 2030: (e) => { + 'use strict' + var t = {} + function encode(e, n, i) { + var r, + o, + s, + a, + l, + c = '' + for ( + 'string' != typeof n && ((i = n), (n = encode.defaultChars)), + void 0 === i && (i = !0), + l = (function (e) { + var n, + i, + r = t[e] + if (r) return r + for (r = t[e] = [], n = 0; n < 128; n++) + (i = String.fromCharCode(n)), + /^[0-9a-z]$/i.test(i) ? r.push(i) : r.push('%' + ('0' + n.toString(16).toUpperCase()).slice(-2)) + for (n = 0; n < e.length; n++) r[e.charCodeAt(n)] = e[n] + return r + })(n), + r = 0, + o = e.length; + r < o; + r++ + ) + if (((s = e.charCodeAt(r)), i && 37 === s && r + 2 < o && /^[0-9a-f]{2}$/i.test(e.slice(r + 1, r + 3)))) + (c += e.slice(r, r + 3)), (r += 2) + else if (s < 128) c += l[s] + else if (s >= 55296 && s <= 57343) { + if (s >= 55296 && s <= 56319 && r + 1 < o && (a = e.charCodeAt(r + 1)) >= 56320 && a <= 57343) { + ;(c += encodeURIComponent(e[r] + e[r + 1])), r++ + continue + } + c += '%EF%BF%BD' + } else c += encodeURIComponent(e[r]) + return c + } + ;(encode.defaultChars = ";/?:@&=+$,-_.!~*'()#"), (encode.componentChars = "-_.!~*'()"), (e.exports = encode) + }, + 576: (e) => { + 'use strict' + e.exports = function (e) { + var t = '' + return ( + (t += e.protocol || ''), + (t += e.slashes ? '//' : ''), + (t += e.auth ? e.auth + '@' : ''), + e.hostname && -1 !== e.hostname.indexOf(':') ? (t += '[' + e.hostname + ']') : (t += e.hostname || ''), + (t += e.port ? ':' + e.port : ''), + (t += e.pathname || ''), + (t += e.search || ''), + (t += e.hash || '') + ) + } + }, + 3771: (e, t, n) => { + 'use strict' + ;(e.exports.encode = n(2030)), + (e.exports.decode = n(5036)), + (e.exports.format = n(576)), + (e.exports.parse = n(167)) + }, + 167: (e) => { + 'use strict' + function Url() { + ;(this.protocol = null), + (this.slashes = null), + (this.auth = null), + (this.port = null), + (this.hostname = null), + (this.hash = null), + (this.search = null), + (this.pathname = null) + } + var t = /^([a-z0-9.+-]+:)/i, + n = /:[0-9]*$/, + i = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + r = ['{', '}', '|', '\\', '^', '`'].concat(['<', '>', '"', '`', ' ', '\r', '\n', '\t']), + o = ["'"].concat(r), + s = ['%', '/', '?', ';', '#'].concat(o), + a = ['/', '?', '#'], + l = /^[+a-z0-9A-Z_-]{0,63}$/, + c = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + d = { + javascript: !0, + 'javascript:': !0, + }, + p = { + http: !0, + https: !0, + ftp: !0, + gopher: !0, + file: !0, + 'http:': !0, + 'https:': !0, + 'ftp:': !0, + 'gopher:': !0, + 'file:': !0, + } + ;(Url.prototype.parse = function (e, n) { + var r, + o, + u, + h, + m, + g = e + if (((g = g.trim()), !n && 1 === e.split('#').length)) { + var _ = i.exec(g) + if (_) return (this.pathname = _[1]), _[2] && (this.search = _[2]), this + } + var f = t.exec(g) + if ( + (f && ((u = (f = f[0]).toLowerCase()), (this.protocol = f), (g = g.substr(f.length))), + (n || f || g.match(/^\/\/[^@\/]+@[^@\/]+/)) && + (!(m = '//' === g.substr(0, 2)) || (f && d[f]) || ((g = g.substr(2)), (this.slashes = !0))), + !d[f] && (m || (f && !p[f]))) + ) { + var y, + v, + b = -1 + for (r = 0; r < a.length; r++) -1 !== (h = g.indexOf(a[r])) && (-1 === b || h < b) && (b = h) + for ( + -1 !== (v = -1 === b ? g.lastIndexOf('@') : g.lastIndexOf('@', b)) && + ((y = g.slice(0, v)), (g = g.slice(v + 1)), (this.auth = y)), + b = -1, + r = 0; + r < s.length; + r++ + ) + -1 !== (h = g.indexOf(s[r])) && (-1 === b || h < b) && (b = h) + ;-1 === b && (b = g.length), ':' === g[b - 1] && b-- + var S = g.slice(0, b) + ;(g = g.slice(b)), this.parseHost(S), (this.hostname = this.hostname || '') + var C = '[' === this.hostname[0] && ']' === this.hostname[this.hostname.length - 1] + if (!C) { + var E = this.hostname.split(/\./) + for (r = 0, o = E.length; r < o; r++) { + var T = E[r] + if (T && !T.match(l)) { + for (var I = '', w = 0, A = T.length; w < A; w++) T.charCodeAt(w) > 127 ? (I += 'x') : (I += T[w]) + if (!I.match(l)) { + var R = E.slice(0, r), + x = E.slice(r + 1), + O = T.match(c) + O && (R.push(O[1]), x.unshift(O[2])), + x.length && (g = x.join('.') + g), + (this.hostname = R.join('.')) + break + } + } + } + } + this.hostname.length > 255 && (this.hostname = ''), + C && (this.hostname = this.hostname.substr(1, this.hostname.length - 2)) + } + var N = g.indexOf('#') + ;-1 !== N && ((this.hash = g.substr(N)), (g = g.slice(0, N))) + var P = g.indexOf('?') + return ( + -1 !== P && ((this.search = g.substr(P)), (g = g.slice(0, P))), + g && (this.pathname = g), + p[u] && this.hostname && !this.pathname && (this.pathname = ''), + this + ) + }), + (Url.prototype.parseHost = function (e) { + var t = n.exec(e) + t && (':' !== (t = t[0]) && (this.port = t.substr(1)), (e = e.substr(0, e.length - t.length))), + e && (this.hostname = e) + }), + (e.exports = function (e, t) { + if (e && e instanceof Url) return e + var n = new Url() + return n.parse(e, t), n + }) + }, + 2322: (e, t, n) => { + 'use strict' + n.r(t), + n.d(t, { + ucs2decode: () => ucs2decode, + ucs2encode: () => ucs2encode, + decode: () => decode, + encode: () => encode, + toASCII: () => toASCII, + toUnicode: () => toUnicode, + default: () => p, + }) + const i = 2147483647, + r = 36, + o = /^xn--/, + s = /[^\0-\x7E]/, + a = /[\x2E\u3002\uFF0E\uFF61]/g, + l = { + overflow: 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input', + }, + c = Math.floor, + d = String.fromCharCode + function error(e) { + throw new RangeError(l[e]) + } + function mapDomain(e, t) { + const n = e.split('@') + let i = '' + n.length > 1 && ((i = n[0] + '@'), (e = n[1])) + const r = (function (e, t) { + const n = [] + let i = e.length + for (; i--; ) n[i] = t(e[i]) + return n + })((e = e.replace(a, '.')).split('.'), t).join('.') + return i + r + } + function ucs2decode(e) { + const t = [] + let n = 0 + const i = e.length + for (; n < i; ) { + const r = e.charCodeAt(n++) + if (r >= 55296 && r <= 56319 && n < i) { + const i = e.charCodeAt(n++) + 56320 == (64512 & i) ? t.push(((1023 & r) << 10) + (1023 & i) + 65536) : (t.push(r), n--) + } else t.push(r) + } + return t + } + const ucs2encode = (e) => String.fromCodePoint(...e), + digitToBasic = function (e, t) { + return e + 22 + 75 * (e < 26) - ((0 != t) << 5) + }, + adapt = function (e, t, n) { + let i = 0 + for (e = n ? c(e / 700) : e >> 1, e += c(e / t); e > 455; i += r) e = c(e / 35) + return c(i + (36 * e) / (e + 38)) + }, + decode = function (e) { + const t = [], + n = e.length + let o = 0, + s = 128, + a = 72, + l = e.lastIndexOf('-') + l < 0 && (l = 0) + for (let n = 0; n < l; ++n) e.charCodeAt(n) >= 128 && error('not-basic'), t.push(e.charCodeAt(n)) + for (let p = l > 0 ? l + 1 : 0; p < n; ) { + let l = o + for (let t = 1, s = r; ; s += r) { + p >= n && error('invalid-input') + const l = (d = e.charCodeAt(p++)) - 48 < 10 ? d - 22 : d - 65 < 26 ? d - 65 : d - 97 < 26 ? d - 97 : r + ;(l >= r || l > c((i - o) / t)) && error('overflow'), (o += l * t) + const u = s <= a ? 1 : s >= a + 26 ? 26 : s - a + if (l < u) break + const h = r - u + t > c(i / h) && error('overflow'), (t *= h) + } + const u = t.length + 1 + ;(a = adapt(o - l, u, 0 == l)), + c(o / u) > i - s && error('overflow'), + (s += c(o / u)), + (o %= u), + t.splice(o++, 0, s) + } + var d + return String.fromCodePoint(...t) + }, + encode = function (e) { + const t = [] + let n = (e = ucs2decode(e)).length, + o = 128, + s = 0, + a = 72 + for (const n of e) n < 128 && t.push(d(n)) + let l = t.length, + p = l + for (l && t.push('-'); p < n; ) { + let n = i + for (const t of e) t >= o && t < n && (n = t) + const u = p + 1 + n - o > c((i - s) / u) && error('overflow'), (s += (n - o) * u), (o = n) + for (const n of e) + if ((n < o && ++s > i && error('overflow'), n == o)) { + let e = s + for (let n = r; ; n += r) { + const i = n <= a ? 1 : n >= a + 26 ? 26 : n - a + if (e < i) break + const o = e - i, + s = r - i + t.push(d(digitToBasic(i + (o % s), 0))), (e = c(o / s)) + } + t.push(d(digitToBasic(e, 0))), (a = adapt(s, u, p == l)), (s = 0), ++p + } + ++s, ++o + } + return t.join('') + }, + toUnicode = function (e) { + return mapDomain(e, function (e) { + return o.test(e) ? decode(e.slice(4).toLowerCase()) : e + }) + }, + toASCII = function (e) { + return mapDomain(e, function (e) { + return s.test(e) ? 'xn--' + encode(e) : e + }) + }, + p = { + version: '2.1.0', + ucs2: { + decode: ucs2decode, + encode: ucs2encode, + }, + decode, + encode, + toASCII, + toUnicode, + } + }, + 355: (e) => { + e.exports = /[\0-\x1F\x7F-\x9F]/ + }, + 9591: (e) => { + e.exports = + /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/ + }, + 6121: (e) => { + e.exports = + /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/ + }, + 21: (e) => { + e.exports = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/ + }, + 8274: (e, t, n) => { + 'use strict' + ;(t.Any = n(1816)), (t.Cc = n(355)), (t.Cf = n(9591)), (t.P = n(6121)), (t.Z = n(21)) + }, + 1816: (e) => { + e.exports = + /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ + }, + 9870: (e, t, n) => { + var i + var r = Object.hasOwnProperty, + o = Object.setPrototypeOf, + s = Object.isFrozen, + a = Object.getPrototypeOf, + l = Object.getOwnPropertyDescriptor, + c = Object.freeze, + d = Object.seal, + p = Object.create, + u = 'undefined' != typeof Reflect && Reflect, + h = u.apply, + m = u.construct + h || + (h = function (e, t, n) { + return e.apply(t, n) + }), + c || + (c = function (e) { + return e + }), + d || + (d = function (e) { + return e + }), + m || + (m = function (e, t) { + return new (Function.prototype.bind.apply( + e, + [null].concat( + (function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t] + return n + } + return Array.from(e) + })(t), + ), + ))() + }) + var g, + _ = unapply(Array.prototype.forEach), + f = unapply(Array.prototype.pop), + y = unapply(Array.prototype.push), + v = unapply(String.prototype.toLowerCase), + b = unapply(String.prototype.match), + S = unapply(String.prototype.replace), + C = unapply(String.prototype.indexOf), + E = unapply(String.prototype.trim), + T = unapply(RegExp.prototype.test), + I = + ((g = TypeError), + function () { + for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n] + return m(g, t) + }) + function unapply(e) { + return function (t) { + for (var n = arguments.length, i = Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++) i[r - 1] = arguments[r] + return h(e, t, i) + } + } + function addToSet(e, t) { + o && o(e, null) + for (var n = t.length; n--; ) { + var i = t[n] + if ('string' == typeof i) { + var r = v(i) + r !== i && (s(t) || (t[n] = r), (i = r)) + } + e[i] = !0 + } + return e + } + function clone(e) { + var t = p(null), + n = void 0 + for (n in e) h(r, e, [n]) && (t[n] = e[n]) + return t + } + function lookupGetter(e, t) { + for (; null !== e; ) { + var n = l(e, t) + if (n) { + if (n.get) return unapply(n.get) + if ('function' == typeof n.value) return unapply(n.value) + } + e = a(e) + } + return function (e) { + return console.warn('fallback value for', e), null + } + } + var w = c([ + 'a', + 'abbr', + 'acronym', + 'address', + 'area', + 'article', + 'aside', + 'audio', + 'b', + 'bdi', + 'bdo', + 'big', + 'blink', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'center', + 'cite', + 'code', + 'col', + 'colgroup', + 'content', + 'data', + 'datalist', + 'dd', + 'decorator', + 'del', + 'details', + 'dfn', + 'dialog', + 'dir', + 'div', + 'dl', + 'dt', + 'element', + 'em', + 'fieldset', + 'figcaption', + 'figure', + 'font', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'i', + 'img', + 'input', + 'ins', + 'kbd', + 'label', + 'legend', + 'li', + 'main', + 'map', + 'mark', + 'marquee', + 'menu', + 'menuitem', + 'meter', + 'nav', + 'nobr', + 'ol', + 'optgroup', + 'option', + 'output', + 'p', + 'picture', + 'pre', + 'progress', + 'q', + 'rp', + 'rt', + 'ruby', + 's', + 'samp', + 'section', + 'select', + 'shadow', + 'small', + 'source', + 'spacer', + 'span', + 'strike', + 'strong', + 'style', + 'sub', + 'summary', + 'sup', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'time', + 'tr', + 'track', + 'tt', + 'u', + 'ul', + 'var', + 'video', + 'wbr', + ]), + A = c([ + 'svg', + 'a', + 'altglyph', + 'altglyphdef', + 'altglyphitem', + 'animatecolor', + 'animatemotion', + 'animatetransform', + 'circle', + 'clippath', + 'defs', + 'desc', + 'ellipse', + 'filter', + 'font', + 'g', + 'glyph', + 'glyphref', + 'hkern', + 'image', + 'line', + 'lineargradient', + 'marker', + 'mask', + 'metadata', + 'mpath', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialgradient', + 'rect', + 'stop', + 'style', + 'switch', + 'symbol', + 'text', + 'textpath', + 'title', + 'tref', + 'tspan', + 'view', + 'vkern', + ]), + R = c([ + 'feBlend', + 'feColorMatrix', + 'feComponentTransfer', + 'feComposite', + 'feConvolveMatrix', + 'feDiffuseLighting', + 'feDisplacementMap', + 'feDistantLight', + 'feFlood', + 'feFuncA', + 'feFuncB', + 'feFuncG', + 'feFuncR', + 'feGaussianBlur', + 'feMerge', + 'feMergeNode', + 'feMorphology', + 'feOffset', + 'fePointLight', + 'feSpecularLighting', + 'feSpotLight', + 'feTile', + 'feTurbulence', + ]), + x = c([ + 'animate', + 'color-profile', + 'cursor', + 'discard', + 'fedropshadow', + 'feimage', + 'font-face', + 'font-face-format', + 'font-face-name', + 'font-face-src', + 'font-face-uri', + 'foreignobject', + 'hatch', + 'hatchpath', + 'mesh', + 'meshgradient', + 'meshpatch', + 'meshrow', + 'missing-glyph', + 'script', + 'set', + 'solidcolor', + 'unknown', + 'use', + ]), + O = c([ + 'math', + 'menclose', + 'merror', + 'mfenced', + 'mfrac', + 'mglyph', + 'mi', + 'mlabeledtr', + 'mmultiscripts', + 'mn', + 'mo', + 'mover', + 'mpadded', + 'mphantom', + 'mroot', + 'mrow', + 'ms', + 'mspace', + 'msqrt', + 'mstyle', + 'msub', + 'msup', + 'msubsup', + 'mtable', + 'mtd', + 'mtext', + 'mtr', + 'munder', + 'munderover', + ]), + N = c([ + 'maction', + 'maligngroup', + 'malignmark', + 'mlongdiv', + 'mscarries', + 'mscarry', + 'msgroup', + 'mstack', + 'msline', + 'msrow', + 'semantics', + 'annotation', + 'annotation-xml', + 'mprescripts', + 'none', + ]), + P = c(['#text']), + D = c([ + 'accept', + 'action', + 'align', + 'alt', + 'autocapitalize', + 'autocomplete', + 'autopictureinpicture', + 'autoplay', + 'background', + 'bgcolor', + 'border', + 'capture', + 'cellpadding', + 'cellspacing', + 'checked', + 'cite', + 'class', + 'clear', + 'color', + 'cols', + 'colspan', + 'controls', + 'controlslist', + 'coords', + 'crossorigin', + 'datetime', + 'decoding', + 'default', + 'dir', + 'disabled', + 'disablepictureinpicture', + 'disableremoteplayback', + 'download', + 'draggable', + 'enctype', + 'enterkeyhint', + 'face', + 'for', + 'headers', + 'height', + 'hidden', + 'high', + 'href', + 'hreflang', + 'id', + 'inputmode', + 'integrity', + 'ismap', + 'kind', + 'label', + 'lang', + 'list', + 'loading', + 'loop', + 'low', + 'max', + 'maxlength', + 'media', + 'method', + 'min', + 'minlength', + 'multiple', + 'muted', + 'name', + 'noshade', + 'novalidate', + 'nowrap', + 'open', + 'optimum', + 'pattern', + 'placeholder', + 'playsinline', + 'poster', + 'preload', + 'pubdate', + 'radiogroup', + 'readonly', + 'rel', + 'required', + 'rev', + 'reversed', + 'role', + 'rows', + 'rowspan', + 'spellcheck', + 'scope', + 'selected', + 'shape', + 'size', + 'sizes', + 'span', + 'srclang', + 'start', + 'src', + 'srcset', + 'step', + 'style', + 'summary', + 'tabindex', + 'title', + 'translate', + 'type', + 'usemap', + 'valign', + 'value', + 'width', + 'xmlns', + 'slot', + ]), + M = c([ + 'accent-height', + 'accumulate', + 'additive', + 'alignment-baseline', + 'ascent', + 'attributename', + 'attributetype', + 'azimuth', + 'basefrequency', + 'baseline-shift', + 'begin', + 'bias', + 'by', + 'class', + 'clip', + 'clippathunits', + 'clip-path', + 'clip-rule', + 'color', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'cx', + 'cy', + 'd', + 'dx', + 'dy', + 'diffuseconstant', + 'direction', + 'display', + 'divisor', + 'dur', + 'edgemode', + 'elevation', + 'end', + 'fill', + 'fill-opacity', + 'fill-rule', + 'filter', + 'filterunits', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'fx', + 'fy', + 'g1', + 'g2', + 'glyph-name', + 'glyphref', + 'gradientunits', + 'gradienttransform', + 'height', + 'href', + 'id', + 'image-rendering', + 'in', + 'in2', + 'k', + 'k1', + 'k2', + 'k3', + 'k4', + 'kerning', + 'keypoints', + 'keysplines', + 'keytimes', + 'lang', + 'lengthadjust', + 'letter-spacing', + 'kernelmatrix', + 'kernelunitlength', + 'lighting-color', + 'local', + 'marker-end', + 'marker-mid', + 'marker-start', + 'markerheight', + 'markerunits', + 'markerwidth', + 'maskcontentunits', + 'maskunits', + 'max', + 'mask', + 'media', + 'method', + 'mode', + 'min', + 'name', + 'numoctaves', + 'offset', + 'operator', + 'opacity', + 'order', + 'orient', + 'orientation', + 'origin', + 'overflow', + 'paint-order', + 'path', + 'pathlength', + 'patterncontentunits', + 'patterntransform', + 'patternunits', + 'points', + 'preservealpha', + 'preserveaspectratio', + 'primitiveunits', + 'r', + 'rx', + 'ry', + 'radius', + 'refx', + 'refy', + 'repeatcount', + 'repeatdur', + 'restart', + 'result', + 'rotate', + 'scale', + 'seed', + 'shape-rendering', + 'specularconstant', + 'specularexponent', + 'spreadmethod', + 'startoffset', + 'stddeviation', + 'stitchtiles', + 'stop-color', + 'stop-opacity', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke', + 'stroke-width', + 'style', + 'surfacescale', + 'systemlanguage', + 'tabindex', + 'targetx', + 'targety', + 'transform', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'textlength', + 'type', + 'u1', + 'u2', + 'unicode', + 'values', + 'viewbox', + 'visibility', + 'version', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'width', + 'word-spacing', + 'wrap', + 'writing-mode', + 'xchannelselector', + 'ychannelselector', + 'x', + 'x1', + 'x2', + 'xmlns', + 'y', + 'y1', + 'y2', + 'z', + 'zoomandpan', + ]), + L = c([ + 'accent', + 'accentunder', + 'align', + 'bevelled', + 'close', + 'columnsalign', + 'columnlines', + 'columnspan', + 'denomalign', + 'depth', + 'dir', + 'display', + 'displaystyle', + 'encoding', + 'fence', + 'frame', + 'height', + 'href', + 'id', + 'largeop', + 'length', + 'linethickness', + 'lspace', + 'lquote', + 'mathbackground', + 'mathcolor', + 'mathsize', + 'mathvariant', + 'maxsize', + 'minsize', + 'movablelimits', + 'notation', + 'numalign', + 'open', + 'rowalign', + 'rowlines', + 'rowspacing', + 'rowspan', + 'rspace', + 'rquote', + 'scriptlevel', + 'scriptminsize', + 'scriptsizemultiplier', + 'selection', + 'separator', + 'separators', + 'stretchy', + 'subscriptshift', + 'supscriptshift', + 'symmetric', + 'voffset', + 'width', + 'xmlns', + ]), + k = c(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']), + F = d(/\{\{[\s\S]*|[\s\S]*\}\}/gm), + B = d(/<%[\s\S]*|[\s\S]*%>/gm), + G = d(/^data-[\-\w.\u00B7-\uFFFF]/), + U = d(/^aria-[\-\w]+$/), + z = d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), + V = d(/^(?:\w+script|data):/i), + H = d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), + q = + 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator + ? function (e) { + return typeof e + } + : function (e) { + return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype + ? 'symbol' + : typeof e + } + function _toConsumableArray$1(e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t] + return n + } + return Array.from(e) + } + var getGlobal = function () { + return 'undefined' == typeof window ? null : window + }, + _createTrustedTypesPolicy = function (e, t) { + if ('object' !== (void 0 === e ? 'undefined' : q(e)) || 'function' != typeof e.createPolicy) return null + var n = null, + i = 'data-tt-policy-suffix' + t.currentScript && t.currentScript.hasAttribute(i) && (n = t.currentScript.getAttribute(i)) + var r = 'dompurify' + (n ? '#' + n : '') + try { + return e.createPolicy(r, { + createHTML: function (e) { + return e + }, + }) + } catch (e) { + return console.warn('TrustedTypes policy ' + r + ' could not be created.'), null + } + } + var j = (function createDOMPurify() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : getGlobal(), + DOMPurify = function (e) { + return createDOMPurify(e) + } + if (((DOMPurify.version = '2.3.1'), (DOMPurify.removed = []), !e || !e.document || 9 !== e.document.nodeType)) + return (DOMPurify.isSupported = !1), DOMPurify + var t = e.document, + n = e.document, + i = e.DocumentFragment, + r = e.HTMLTemplateElement, + o = e.Node, + s = e.Element, + a = e.NodeFilter, + l = e.NamedNodeMap, + d = void 0 === l ? e.NamedNodeMap || e.MozNamedAttrMap : l, + p = e.Text, + u = e.Comment, + h = e.DOMParser, + m = e.trustedTypes, + g = s.prototype, + j = lookupGetter(g, 'cloneNode'), + W = lookupGetter(g, 'nextSibling'), + Y = lookupGetter(g, 'childNodes'), + K = lookupGetter(g, 'parentNode') + if ('function' == typeof r) { + var Q = n.createElement('template') + Q.content && Q.content.ownerDocument && (n = Q.content.ownerDocument) + } + var Z = _createTrustedTypesPolicy(m, t), + X = Z && Oe ? Z.createHTML('') : '', + J = n, + ee = J.implementation, + te = J.createNodeIterator, + ne = J.createDocumentFragment, + ie = J.getElementsByTagName, + re = t.importNode, + oe = {} + try { + oe = clone(n).documentMode ? n.documentMode : {} + } catch (e) {} + var se = {} + DOMPurify.isSupported = 'function' == typeof K && ee && void 0 !== ee.createHTMLDocument && 9 !== oe + var ae = F, + le = B, + ce = G, + de = U, + pe = V, + ue = H, + he = z, + me = null, + ge = addToSet( + {}, + [].concat( + _toConsumableArray$1(w), + _toConsumableArray$1(A), + _toConsumableArray$1(R), + _toConsumableArray$1(O), + _toConsumableArray$1(P), + ), + ), + _e = null, + fe = addToSet( + {}, + [].concat( + _toConsumableArray$1(D), + _toConsumableArray$1(M), + _toConsumableArray$1(L), + _toConsumableArray$1(k), + ), + ), + ye = null, + ve = null, + be = !0, + Se = !0, + Ce = !1, + Ee = !1, + Te = !1, + Ie = !1, + we = !1, + Ae = !1, + Re = !1, + xe = !0, + Oe = !1, + Ne = !0, + Pe = !0, + De = !1, + Me = {}, + Le = null, + ke = addToSet({}, [ + 'annotation-xml', + 'audio', + 'colgroup', + 'desc', + 'foreignobject', + 'head', + 'iframe', + 'math', + 'mi', + 'mn', + 'mo', + 'ms', + 'mtext', + 'noembed', + 'noframes', + 'noscript', + 'plaintext', + 'script', + 'style', + 'svg', + 'template', + 'thead', + 'title', + 'video', + 'xmp', + ]), + Fe = null, + Be = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']), + Ge = null, + Ue = addToSet({}, [ + 'alt', + 'class', + 'for', + 'id', + 'label', + 'name', + 'pattern', + 'placeholder', + 'role', + 'summary', + 'title', + 'value', + 'style', + 'xmlns', + ]), + ze = 'http://www.w3.org/1998/Math/MathML', + $e = 'http://www.w3.org/2000/svg', + Ve = 'http://www.w3.org/1999/xhtml', + He = Ve, + qe = !1, + je = null, + We = n.createElement('form'), + _parseConfig = function (e) { + ;(je && je === e) || + ((e && 'object' === (void 0 === e ? 'undefined' : q(e))) || (e = {}), + (e = clone(e)), + (me = 'ALLOWED_TAGS' in e ? addToSet({}, e.ALLOWED_TAGS) : ge), + (_e = 'ALLOWED_ATTR' in e ? addToSet({}, e.ALLOWED_ATTR) : fe), + (Ge = 'ADD_URI_SAFE_ATTR' in e ? addToSet(clone(Ue), e.ADD_URI_SAFE_ATTR) : Ue), + (Fe = 'ADD_DATA_URI_TAGS' in e ? addToSet(clone(Be), e.ADD_DATA_URI_TAGS) : Be), + (Le = 'FORBID_CONTENTS' in e ? addToSet({}, e.FORBID_CONTENTS) : ke), + (ye = 'FORBID_TAGS' in e ? addToSet({}, e.FORBID_TAGS) : {}), + (ve = 'FORBID_ATTR' in e ? addToSet({}, e.FORBID_ATTR) : {}), + (Me = 'USE_PROFILES' in e && e.USE_PROFILES), + (be = !1 !== e.ALLOW_ARIA_ATTR), + (Se = !1 !== e.ALLOW_DATA_ATTR), + (Ce = e.ALLOW_UNKNOWN_PROTOCOLS || !1), + (Ee = e.SAFE_FOR_TEMPLATES || !1), + (Te = e.WHOLE_DOCUMENT || !1), + (Ae = e.RETURN_DOM || !1), + (Re = e.RETURN_DOM_FRAGMENT || !1), + (xe = !1 !== e.RETURN_DOM_IMPORT), + (Oe = e.RETURN_TRUSTED_TYPE || !1), + (we = e.FORCE_BODY || !1), + (Ne = !1 !== e.SANITIZE_DOM), + (Pe = !1 !== e.KEEP_CONTENT), + (De = e.IN_PLACE || !1), + (he = e.ALLOWED_URI_REGEXP || he), + (He = e.NAMESPACE || Ve), + Ee && (Se = !1), + Re && (Ae = !0), + Me && + ((me = addToSet({}, [].concat(_toConsumableArray$1(P)))), + (_e = []), + !0 === Me.html && (addToSet(me, w), addToSet(_e, D)), + !0 === Me.svg && (addToSet(me, A), addToSet(_e, M), addToSet(_e, k)), + !0 === Me.svgFilters && (addToSet(me, R), addToSet(_e, M), addToSet(_e, k)), + !0 === Me.mathMl && (addToSet(me, O), addToSet(_e, L), addToSet(_e, k))), + e.ADD_TAGS && (me === ge && (me = clone(me)), addToSet(me, e.ADD_TAGS)), + e.ADD_ATTR && (_e === fe && (_e = clone(_e)), addToSet(_e, e.ADD_ATTR)), + e.ADD_URI_SAFE_ATTR && addToSet(Ge, e.ADD_URI_SAFE_ATTR), + e.FORBID_CONTENTS && (Le === ke && (Le = clone(Le)), addToSet(Le, e.FORBID_CONTENTS)), + Pe && (me['#text'] = !0), + Te && addToSet(me, ['html', 'head', 'body']), + me.table && (addToSet(me, ['tbody']), delete ye.tbody), + c && c(e), + (je = e)) + }, + Ye = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']), + Ke = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']), + Qe = addToSet({}, A) + addToSet(Qe, R), addToSet(Qe, x) + var Ze = addToSet({}, O) + addToSet(Ze, N) + var _checkValidNamespace = function (e) { + var t = K(e) + ;(t && t.tagName) || + (t = { + namespaceURI: Ve, + tagName: 'template', + }) + var n = v(e.tagName), + i = v(t.tagName) + if (e.namespaceURI === $e) + return t.namespaceURI === Ve + ? 'svg' === n + : t.namespaceURI === ze + ? 'svg' === n && ('annotation-xml' === i || Ye[i]) + : Boolean(Qe[n]) + if (e.namespaceURI === ze) + return t.namespaceURI === Ve + ? 'math' === n + : t.namespaceURI === $e + ? 'math' === n && Ke[i] + : Boolean(Ze[n]) + if (e.namespaceURI === Ve) { + if (t.namespaceURI === $e && !Ke[i]) return !1 + if (t.namespaceURI === ze && !Ye[i]) return !1 + var r = addToSet({}, ['title', 'style', 'font', 'a', 'script']) + return !Ze[n] && (r[n] || !Qe[n]) + } + return !1 + }, + _forceRemove = function (e) { + y(DOMPurify.removed, { + element: e, + }) + try { + e.parentNode.removeChild(e) + } catch (t) { + try { + e.outerHTML = X + } catch (t) { + e.remove() + } + } + }, + _removeAttribute = function (e, t) { + try { + y(DOMPurify.removed, { + attribute: t.getAttributeNode(e), + from: t, + }) + } catch (e) { + y(DOMPurify.removed, { + attribute: null, + from: t, + }) + } + if ((t.removeAttribute(e), 'is' === e && !_e[e])) + if (Ae || Re) + try { + _forceRemove(t) + } catch (e) {} + else + try { + t.setAttribute(e, '') + } catch (e) {} + }, + _initDocument = function (e) { + var t = void 0, + i = void 0 + if (we) e = '' + e + else { + var r = b(e, /^[\r\n\t ]+/) + i = r && r[0] + } + var o = Z ? Z.createHTML(e) : e + if (He === Ve) + try { + t = new h().parseFromString(o, 'text/html') + } catch (e) {} + if (!t || !t.documentElement) { + t = ee.createDocument(He, 'template', null) + try { + t.documentElement.innerHTML = qe ? '' : o + } catch (e) {} + } + var s = t.body || t.documentElement + return ( + e && i && s.insertBefore(n.createTextNode(i), s.childNodes[0] || null), + He === Ve ? ie.call(t, Te ? 'html' : 'body')[0] : Te ? t.documentElement : s + ) + }, + _createIterator = function (e) { + return te.call(e.ownerDocument || e, e, a.SHOW_ELEMENT | a.SHOW_COMMENT | a.SHOW_TEXT, null, !1) + }, + _isClobbered = function (e) { + return ( + !(e instanceof p || e instanceof u) && + !( + 'string' == typeof e.nodeName && + 'string' == typeof e.textContent && + 'function' == typeof e.removeChild && + e.attributes instanceof d && + 'function' == typeof e.removeAttribute && + 'function' == typeof e.setAttribute && + 'string' == typeof e.namespaceURI && + 'function' == typeof e.insertBefore + ) + ) + }, + _isNode = function (e) { + return 'object' === (void 0 === o ? 'undefined' : q(o)) + ? e instanceof o + : e && + 'object' === (void 0 === e ? 'undefined' : q(e)) && + 'number' == typeof e.nodeType && + 'string' == typeof e.nodeName + }, + _executeHook = function (e, t, n) { + se[e] && + _(se[e], function (e) { + e.call(DOMPurify, t, n, je) + }) + }, + _sanitizeElements = function (e) { + var t = void 0 + if ((_executeHook('beforeSanitizeElements', e, null), _isClobbered(e))) return _forceRemove(e), !0 + if (b(e.nodeName, /[\u0080-\uFFFF]/)) return _forceRemove(e), !0 + var n = v(e.nodeName) + if ( + (_executeHook('uponSanitizeElement', e, { + tagName: n, + allowedTags: me, + }), + !_isNode(e.firstElementChild) && + (!_isNode(e.content) || !_isNode(e.content.firstElementChild)) && + T(/<[/\w]/g, e.innerHTML) && + T(/<[/\w]/g, e.textContent)) + ) + return _forceRemove(e), !0 + if ('select' === n && T(/